Changeset 1289 in SHVCSoftware


Ignore:
Timestamp:
18 Jul 2015, 00:52:46 (9 years ago)
Author:
seregin
Message:

port rev 4323 (g_uiMaxCUWidth, g_uiMaxCUHeight)

Location:
branches/SHM-dev/source
Files:
34 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-dev/source/App/TAppDecoder/TAppDecTop.cpp

    r1287 r1289  
    5656//! \{
    5757
    58 #if Q0074_COLOUR_REMAPPING_SEI
    59 static Void applyColourRemapping(TComPicYuv& pic, const SEIColourRemappingInfo* colourRemappingInfoSEI, const BitDepths& bitDpeths, UInt layerId=0 );
    60 static std::vector<SEIColourRemappingInfo> storeCriSEI; //Persistent Colour Remapping Information SEI
    61 static SEIColourRemappingInfo *seiColourRemappingInfoPrevious=NULL ;
    62 #endif
    63 
    6458// ====================================================================================================================
    6559// Constructor / destructor / initialization / destroy
     
    6862#if SVC_EXTENSION
    6963TAppDecTop::TAppDecTop()
     64#if Q0074_COLOUR_REMAPPING_SEI
     65: seiColourRemappingInfoPrevious(NULL)
     66#endif
    7067{
    7168  for(UInt layer=0; layer < MAX_LAYERS; layer++)
     
    7875TAppDecTop::TAppDecTop()
    7976: m_iPOCLastDisplay(-MAX_INT)
     77#if Q0074_COLOUR_REMAPPING_SEI
     78, seiColourRemappingInfoPrevious(NULL)
     79#endif
    8080{
    8181}
     
    939939          SEIMessages colourRemappingInfo = getSeisByType(pcPic->getSEIs(), SEI::COLOUR_REMAPPING_INFO );
    940940          const SEIColourRemappingInfo *seiColourRemappingInfo = ( colourRemappingInfo.size() > 0 ) ? (SEIColourRemappingInfo*) *(colourRemappingInfo.begin()) : NULL;
     941          const TComSPS *sps = pcPic->getSlice(0)->getSPS();
     942
    941943          if (colourRemappingInfo.size() > 1)
    942944          {
     
    945947          if (seiColourRemappingInfo)
    946948          {
    947             applyColourRemapping(*pcPic->getPicYuvRec(), seiColourRemappingInfo);
     949            xApplyColourRemapping(sps, *pcPic->getPicYuvRec(), seiColourRemappingInfo);
    948950          }
    949951          else  // using the last CRI SEI received
     
    951953            const SEIColourRemappingInfo *seiColourRemappingInfoCopy;
    952954            seiColourRemappingInfoCopy = seiColourRemappingInfoPrevious;
    953             applyColourRemapping(*pcPic->getPicYuvRec(), seiColourRemappingInfoCopy);
     955            xApplyColourRemapping(sps, *pcPic->getPicYuvRec(), seiColourRemappingInfoCopy);
    954956          }
    955957
     
    11641166          SEIMessages colourRemappingInfo = getSeisByType(pcPic->getSEIs(), SEI::COLOUR_REMAPPING_INFO );
    11651167          const SEIColourRemappingInfo *seiColourRemappingInfo = ( colourRemappingInfo.size() > 0 ) ? (SEIColourRemappingInfo*) *(colourRemappingInfo.begin()) : NULL;
     1168          const TComSPS *sps = pcPic->getSlice(0)->getSPS();
     1169
    11661170          if (colourRemappingInfo.size() > 1)
    11671171          {
     
    11701174          if (seiColourRemappingInfo)
    11711175          {
    1172             applyColourRemapping(*pcPic->getPicYuvRec(), seiColourRemappingInfo);
     1176            xApplyColourRemapping( sps, *pcPic->getPicYuvRec(), seiColourRemappingInfo );
    11731177          }
    11741178          else  // using the last CRI SEI received
     
    11761180            const SEIColourRemappingInfo *seiColourRemappingInfoCopy;
    11771181            seiColourRemappingInfoCopy = seiColourRemappingInfoPrevious;
    1178             applyColourRemapping(*pcPic->getPicYuvRec(), seiColourRemappingInfoCopy);
     1182            xApplyColourRemapping( sps, *pcPic->getPicYuvRec(), seiColourRemappingInfoCopy );
    11791183          }
    11801184
     
    12861290    if( m_colourRemapSEIEnabled )
    12871291    {
     1292      const TComSPS *sps = pic->getSlice(0)->getSPS();
    12881293      SEIMessages colourRemappingInfo = getSeisByType(pic->getSEIs(), SEI::COLOUR_REMAPPING_INFO );
    12891294      const SEIColourRemappingInfo *seiColourRemappingInfo = ( colourRemappingInfo.size() > 0 ) ? (SEIColourRemappingInfo*) *(colourRemappingInfo.begin()) : NULL;
     1295
    12901296      if (colourRemappingInfo.size() > 1)
    12911297      {
     
    12961302      {
    12971303        //printf ("\n\nColour Remapping is applied to POC : %d and LayerId : %d ",pic->getPOC(), pic->getLayerId());
    1298 #if SVC_EXTENSION
    1299         applyColourRemapping(*pic->getPicYuvRec(), seiColourRemappingInfo, pic->getSlice(0)->getBitDepths(), pic->getLayerId());
    1300 #else
    1301         applyColourRemapping(*pic->getPicYuvRec(), seiColourRemappingInfo, pic->getSlice(0)->getBitDepths());
    1302 #endif
     1304        xApplyColourRemapping( sps, *pic->getPicYuvRec(), seiColourRemappingInfo, pic->getLayerId() );
    13031305      }
    13041306      else  // using the last CRI SEI received
     
    13061308        const SEIColourRemappingInfo *seiColourRemappingInfoCopy;
    13071309        seiColourRemappingInfoCopy = seiColourRemappingInfoPrevious;
    1308 #if SVC_EXTENSION
    1309         applyColourRemapping(*pic->getPicYuvRec(), seiColourRemappingInfoCopy, pic->getSlice(0)->getBitDepths(), pic->getLayerId());
    1310 #else
    1311         applyColourRemapping(*pic->getPicYuvRec(), seiColourRemappingInfoCopy, pic->getSlice(0)->getBitDepths());
    1312 #endif
     1310        xApplyColourRemapping( sps, *pic->getPicYuvRec(), seiColourRemappingInfoCopy, pic->getLayerId() );
    13131311      }
    13141312
     
    18461844
    18471845#if Q0074_COLOUR_REMAPPING_SEI
    1848 Void xInitColourRemappingLut( const BitDepths &bitDepths, std::vector<Int>(&preLut)[3], std::vector<Int>(&postLut)[3], const SEIColourRemappingInfo* const pCriSEI )
     1846Void TAppDecTop::xInitColourRemappingLut( const BitDepths &bitDepths, std::vector<Int>(&preLut)[3], std::vector<Int>(&postLut)[3], const SEIColourRemappingInfo* const pCriSEI )
    18491847{
    18501848  for ( Int c=0 ; c<3 ; c++ )
     
    19031901}
    19041902
    1905 static Void applyColourRemapping(TComPicYuv& pic, const SEIColourRemappingInfo* pCriSEI, const BitDepths& bitDpeths, UInt layerId )
    1906 
     1903Void TAppDecTop::xApplyColourRemapping( const TComSPS *sps, TComPicYuv& pic, const SEIColourRemappingInfo* pCriSEI, UInt layerId )
     1904{
     1905  const BitDepths& bitDpeths = sps->getBitDepths();
     1906
    19071907  if( !storeCriSEI.size() )
     1908  {
    19081909#if SVC_EXTENSION
    19091910    storeCriSEI.resize(MAX_LAYERS);
     
    19111912    storeCriSEI.resize(1);
    19121913#endif
     1914  }
    19131915
    19141916  if ( pCriSEI ) //if a CRI SEI has just been retrieved, keep it in memory (persistence management)
     1917  {
    19151918    storeCriSEI[layerId] = *pCriSEI;
     1919  }
    19161920
    19171921  if( !storeCriSEI[layerId].m_colourRemapCancelFlag && pCriSEI)
     
    19281932   
    19291933    TComPicYuv picColourRemapped;
     1934
    19301935#if SVC_EXTENSION
    19311936#if AUXILIARY_PICTURES
    1932     picColourRemapped.create( pic.getWidth(COMPONENT_Y), pic.getHeight(COMPONENT_Y), pic.getChromaFormat(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, NULL );
    1933 #else
    1934     picColourRemapped.create( pic.getWidth(), pic.getHeight(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, NULL );
    1935 #endif
    1936 #else
    1937     picColourRemapped.create( pic.getWidth(COMPONENT_Y), pic.getHeight(COMPONENT_Y), pic.getChromaFormat(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth );
     1937    picColourRemapped.create( pic.getWidth(COMPONENT_Y), pic.getHeight(COMPONENT_Y), pic.getChromaFormat(), sps->getMaxCUWidth(), sps->getMaxCUHeight(), g_uiMaxCUDepth, true, NULL );
     1938#else
     1939    picColourRemapped.create( pic.getWidth(), pic.getHeight(), sps->getMaxCUWidth(), sps->getMaxCUHeight(), g_uiMaxCUDepth, true, NULL );
     1940#endif
     1941#else
     1942    picColourRemapped.create( pic.getWidth(COMPONENT_Y), pic.getHeight(COMPONENT_Y), pic.getChromaFormat(), sps->getMaxCUWidth(), sps->getMaxCUHeight(), g_uiMaxCUDepth, true );
    19381943#endif
    19391944    YUVOut[0] = picColourRemapped.getAddr(COMPONENT_Y);
  • branches/SHM-dev/source/App/TAppDecoder/TAppDecTop.h

    r1287 r1289  
    7373 
    7474  // for output control 
     75  std::ofstream                   m_seiMessageFileStream;         ///< Used for outputing SEI messages.
     76
    7577#if SVC_EXTENSION
    7678#if CONFORMANCE_BITSTREAM_MODE
    77   TVideoIOYuv                      m_confReconFile[63];        ///< decode YUV files
     79  TVideoIOYuv                     m_confReconFile[63];        ///< decode YUV files
    7880#endif
    7981  Int                             m_aiPOCLastDisplay [MAX_LAYERS]; ///< last POC in display order
     
    8183  Int                             m_iPOCLastDisplay;              ///< last POC in display order
    8284#endif
    83   std::ofstream                   m_seiMessageFileStream;         ///< Used for outputing SEI messages. 
     85#if Q0074_COLOUR_REMAPPING_SEI
     86  std::vector<SEIColourRemappingInfo> storeCriSEI; //Persistent Colour Remapping Information SEI
     87  SEIColourRemappingInfo *seiColourRemappingInfoPrevious;
     88#endif
    8489
    8590public:
     
    98103#if Q0074_COLOUR_REMAPPING_SEI
    99104  Void  xInitColourRemappingLut( const BitDepths &bitDepths, std::vector<Int>(&preLut)[3], std::vector<Int>(&postLut)[3], const SEIColourRemappingInfo* const pCriSEI );
     105  Void  xApplyColourRemapping( const TComSPS *sps, TComPicYuv& pic, const SEIColourRemappingInfo* pCriSEI, UInt layerId = 0 );
    100106#endif
    101107#if SVC_EXTENSION
  • branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.cpp

    r1288 r1289  
    38703870
    38713871  m_maxTempLayer = 1;
    3872   for(Int i=0; i<m_iGOPSize; i++) 
     3872  for(Int i=0; i<m_iGOPSize; i++)
    38733873  {
    38743874    if(m_GOPList[i].m_temporalId >= m_maxTempLayer)
     
    42734273  // set max CU width & height
    42744274#if SVC_EXTENSION
    4275   g_uiMaxCUWidth  = m_acLayerCfg[layerId].m_uiMaxCUWidth;
    4276   g_uiMaxCUHeight = m_acLayerCfg[layerId].m_uiMaxCUHeight;
    4277 
    42784275  // compute actual CU depth with respect to config depth and max transform size
    42794276  g_uiAddCUDepth  = 0;
     
    42894286  g_uiMaxCUDepth = m_acLayerCfg[layerId].m_uiMaxCUDepth;
    42904287#else
    4291   g_uiMaxCUWidth  = m_uiMaxCUWidth;
    4292   g_uiMaxCUHeight = m_uiMaxCUHeight;
    4293 
    42944288  // compute actual CU depth with respect to config depth and max transform size
    42954289  g_uiAddCUDepth  = 0;
  • branches/SHM-dev/source/App/TAppEncoder/TAppEncTop.cpp

    r1288 r1289  
    436436    m_acTEncTop[layer].setUseRDOQTS                                        ( m_useRDOQTS   );
    437437    m_acTEncTop[layer].setRDpenalty                                        ( m_rdPenalty );
     438    m_acTEncTop[layer].setMaxCUWidth                                       ( m_acLayerCfg[layer].m_uiMaxCUWidth );
     439    m_acTEncTop[layer].setMaxCUHeight                                      ( m_acLayerCfg[layer].m_uiMaxCUHeight );
    438440
    439441    m_acTEncTop[layer].setQuadtreeTULog2MaxSize                            ( m_acLayerCfg[layer].m_uiQuadtreeTULog2MaxSize );
     
    864866  m_cTEncTop.setUseRDOQTS                                         ( m_useRDOQTS   );
    865867  m_cTEncTop.setRDpenalty                                         ( m_rdPenalty );
     868  m_cTEncTop.setMaxCUWidth                                        ( m_uiMaxCUWidth );
     869  m_cTEncTop.setMaxCUHeight                                       ( m_uiMaxCUHeight );
    866870  m_cTEncTop.setQuadtreeTULog2MaxSize                             ( m_uiQuadtreeTULog2MaxSize );
    867871  m_cTEncTop.setQuadtreeTULog2MinSize                             ( m_uiQuadtreeTULog2MinSize );
     
    16801684    if( m_isField )
    16811685    {
    1682 #if SVC_EXTENSION
    1683       pcPicYuvOrg[layer]->create( m_acLayerCfg[layer].getSourceWidth(), m_acLayerCfg[layer].getSourceHeightOrg(), m_acLayerCfg[layer].getChromaFormatIDC(), m_acLayerCfg[layer].m_uiMaxCUWidth, m_acLayerCfg[layer].m_uiMaxCUHeight, m_acLayerCfg[layer].m_uiMaxCUDepth, NULL );
    1684       acPicYuvTrueOrg[layer].create( m_acLayerCfg[layer].getSourceWidth(), m_acLayerCfg[layer].getSourceHeightOrg(), m_acLayerCfg[layer].getChromaFormatIDC(), m_acLayerCfg[layer].m_uiMaxCUWidth, m_acLayerCfg[layer].m_uiMaxCUHeight, m_acLayerCfg[layer].m_uiMaxCUDepth, NULL );
    1685 #else
    1686       pcPicYuvOrg[layer]->create( m_acLayerCfg[layer].getSourceWidth(), m_acLayerCfg[layer].getSourceHeightOrg(), m_acLayerCfg[layer].getChromaFormatIDC(), m_uiMaxCUWidth, m_uiMaxCUHeight, m_uiMaxCUDepth, NULL );
    1687       acPicYuvTrueOrg[layer].create( m_acLayerCfg[layer].getSourceWidth(), m_acLayerCfg[layer].getSourceHeightOrg(), m_acLayerCfg[layer].getChromaFormatIDC(), m_uiMaxCUWidth, m_uiMaxCUHeight, m_uiMaxCUDepth, NULL );
    1688 #endif
     1686      pcPicYuvOrg[layer]->create( m_acLayerCfg[layer].getSourceWidth(), m_acLayerCfg[layer].getSourceHeightOrg(), m_acLayerCfg[layer].getChromaFormatIDC(), m_acLayerCfg[layer].m_uiMaxCUWidth, m_acLayerCfg[layer].m_uiMaxCUHeight, m_acLayerCfg[layer].m_uiMaxCUDepth, true, NULL );
     1687      acPicYuvTrueOrg[layer].create( m_acLayerCfg[layer].getSourceWidth(), m_acLayerCfg[layer].getSourceHeightOrg(), m_acLayerCfg[layer].getChromaFormatIDC(), m_acLayerCfg[layer].m_uiMaxCUWidth, m_acLayerCfg[layer].m_uiMaxCUHeight, m_acLayerCfg[layer].m_uiMaxCUDepth, true, NULL );
    16891688    }
    16901689    else
    16911690    {
    1692 #if SVC_EXTENSION
    1693       pcPicYuvOrg[layer]->create( m_acLayerCfg[layer].getSourceWidth(), m_acLayerCfg[layer].getSourceHeight(), m_acLayerCfg[layer].getChromaFormatIDC(), m_acLayerCfg[layer].m_uiMaxCUWidth, m_acLayerCfg[layer].m_uiMaxCUHeight, m_acLayerCfg[layer].m_uiMaxCUDepth, NULL );
    1694       acPicYuvTrueOrg[layer].create( m_acLayerCfg[layer].getSourceWidth(), m_acLayerCfg[layer].getSourceHeight(), m_acLayerCfg[layer].getChromaFormatIDC(), m_acLayerCfg[layer].m_uiMaxCUWidth, m_acLayerCfg[layer].m_uiMaxCUHeight, m_acLayerCfg[layer].m_uiMaxCUDepth, NULL );
    1695 #else
    1696       pcPicYuvOrg[layer]->create( m_acLayerCfg[layer].getSourceWidth(), m_acLayerCfg[layer].getSourceHeight(), m_acLayerCfg[layer].getChromaFormatIDC(), m_uiMaxCUWidth, m_uiMaxCUHeight, m_uiMaxCUDepth, NULL );
    1697       acPicYuvTrueOrg[layer].create( m_acLayerCfg[layer].getSourceWidth(), m_acLayerCfg[layer].getSourceHeight(), m_acLayerCfg[layer].getChromaFormatIDC(), m_uiMaxCUWidth, m_uiMaxCUHeight, m_uiMaxCUDepth, NULL );
    1698 #endif
     1691      pcPicYuvOrg[layer]->create( m_acLayerCfg[layer].getSourceWidth(), m_acLayerCfg[layer].getSourceHeight(), m_acLayerCfg[layer].getChromaFormatIDC(), m_acLayerCfg[layer].m_uiMaxCUWidth, m_acLayerCfg[layer].m_uiMaxCUHeight, m_acLayerCfg[layer].m_uiMaxCUDepth, true, NULL );
     1692      acPicYuvTrueOrg[layer].create( m_acLayerCfg[layer].getSourceWidth(), m_acLayerCfg[layer].getSourceHeight(), m_acLayerCfg[layer].getChromaFormatIDC(), m_acLayerCfg[layer].m_uiMaxCUWidth, m_acLayerCfg[layer].m_uiMaxCUHeight, m_acLayerCfg[layer].m_uiMaxCUDepth, true, NULL );
    16991693    }
    17001694  }
     
    20402034  if( m_isField )
    20412035  {
    2042     pcPicYuvOrg->create( m_iSourceWidth, m_iSourceHeightOrg, m_chromaFormatIDC, m_uiMaxCUWidth, m_uiMaxCUHeight, m_uiMaxCUDepth );
    2043   cPicYuvTrueOrg.create(m_iSourceWidth, m_iSourceHeightOrg, m_chromaFormatIDC, m_uiMaxCUWidth, m_uiMaxCUHeight, m_uiMaxCUDepth);
     2036    pcPicYuvOrg->create( m_iSourceWidth, m_iSourceHeightOrg, m_chromaFormatIDC, m_uiMaxCUWidth, m_uiMaxCUHeight, m_uiMaxCUDepth, true );
     2037  cPicYuvTrueOrg.create(m_iSourceWidth, m_iSourceHeightOrg, m_chromaFormatIDC, m_uiMaxCUWidth, m_uiMaxCUHeight, m_uiMaxCUDepth, true);
    20442038  }
    20452039  else
    20462040  {
    2047     pcPicYuvOrg->create( m_iSourceWidth, m_iSourceHeight, m_chromaFormatIDC, m_uiMaxCUWidth, m_uiMaxCUHeight, m_uiMaxCUDepth );
    2048   cPicYuvTrueOrg.create(m_iSourceWidth, m_iSourceHeight, m_chromaFormatIDC, m_uiMaxCUWidth, m_uiMaxCUHeight, m_uiMaxCUDepth);
     2041    pcPicYuvOrg->create( m_iSourceWidth, m_iSourceHeight, m_chromaFormatIDC, m_uiMaxCUWidth, m_uiMaxCUHeight, m_uiMaxCUDepth, true );
     2042  cPicYuvTrueOrg.create(m_iSourceWidth, m_iSourceHeight, m_chromaFormatIDC, m_uiMaxCUWidth, m_uiMaxCUHeight, m_uiMaxCUDepth, true );
    20492043  }
    20502044
     
    21352129    rpcPicYuvRec = new TComPicYuv;
    21362130
    2137     rpcPicYuvRec->create( m_acLayerCfg[layer].getSourceWidth(), m_acLayerCfg[layer].getSourceHeight(), m_acLayerCfg[layer].getChromaFormatIDC(), m_acLayerCfg[layer].m_uiMaxCUWidth, m_acLayerCfg[layer].m_uiMaxCUHeight, m_acLayerCfg[layer].m_uiMaxCUDepth, NULL );
     2131    rpcPicYuvRec->create( m_acLayerCfg[layer].getSourceWidth(), m_acLayerCfg[layer].getSourceHeight(), m_acLayerCfg[layer].getChromaFormatIDC(), m_acLayerCfg[layer].m_uiMaxCUWidth, m_acLayerCfg[layer].m_uiMaxCUHeight, m_acLayerCfg[layer].m_uiMaxCUDepth, true, NULL );
    21382132  }
    21392133  m_acListPicYuvRec[layer].pushBack( rpcPicYuvRec );
     
    21592153Void TAppEncTop::xWriteRecon(UInt layer, Int iNumEncoded)
    21602154{
    2161 #if SVC_EXTENSION
    21622155  ChromaFormat chromaFormatIdc = m_acLayerCfg[layer].getChromaFormatIDC();
    21632156  Int xScal = TComSPS::getWinUnitX( chromaFormatIdc );
    21642157  Int yScal = TComSPS::getWinUnitY( chromaFormatIdc );
    2165 #endif
    21662158
    21672159  const InputColourSpaceConversion ipCSC = (!m_outputInternalColourSpace) ? m_inputColourSpaceConvert : IPCOLOURSPACE_UNCHANGED;
     
    21852177      if( !m_acLayerCfg[layer].getReconFile().empty() && pcPicYuvRecTop->isReconstructed() && pcPicYuvRecBottom->isReconstructed() )
    21862178      {
    2187 #if SVC_EXTENSION
    21882179        m_acTVideoIOYuvReconFile[layer].write( pcPicYuvRecTop, pcPicYuvRecBottom, ipCSC, m_acLayerCfg[layer].getConfWinLeft() * xScal, m_acLayerCfg[layer].getConfWinRight() * xScal,
    2189           m_acLayerCfg[layer].getConfWinTop() * yScal, m_acLayerCfg[layer].getConfWinBottom() * yScal, NUM_CHROMA_FORMAT, m_isTopFieldFirst );
    2190 #else
    2191         m_acTVideoIOYuvReconFile[layer].write( pcPicYuvRecTop, pcPicYuvRecBottom, ipCSC, m_acLayerCfg[layer].getConfWinLeft(), m_acLayerCfg[layer].getConfWinRight(), m_acLayerCfg[layer].getConfWinTop(), m_acLayerCfg[layer].getConfWinBottom(), NUM_CHROMA_FORMAT, m_isTopFieldFirst );
    2192 #endif
     2180        m_acLayerCfg[layer].getConfWinTop() * yScal, m_acLayerCfg[layer].getConfWinBottom() * yScal, NUM_CHROMA_FORMAT, m_isTopFieldFirst );
    21932181      }
    21942182    }
     
    22712259    rpcPicYuvRec = new TComPicYuv;
    22722260
    2273     rpcPicYuvRec->create( m_iSourceWidth, m_iSourceHeight, m_chromaFormatIDC, m_uiMaxCUWidth, m_uiMaxCUHeight, m_uiMaxCUDepth );
     2261    rpcPicYuvRec->create( m_iSourceWidth, m_iSourceHeight, m_chromaFormatIDC, m_uiMaxCUWidth, m_uiMaxCUHeight, m_uiMaxCUDepth, true );
    22742262
    22752263  }
  • branches/SHM-dev/source/App/utils/convert_NtoMbit_YCbCr.cpp

    r1246 r1289  
    44 * granted under this license.
    55 *
    6  * Copyright (c) 2010-2014, ITU/ISO/IEC
     6 * Copyright (c) 2010-2015, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
     
    105105
    106106  TComPicYuv frame;
    107   frame.create( width, height, chromaFormatIDC, 1, 1, 0 );
     107  frame.create( width, height, chromaFormatIDC, width, height, 0, false);
    108108
    109109  Int pad[2] = {0, 0};
    110110
    111111  TComPicYuv cPicYuvTrueOrg;
    112   cPicYuvTrueOrg.create( width, height, chromaFormatIDC, 1, 1, 0 );
     112  cPicYuvTrueOrg.create( width, height, chromaFormatIDC, width, height, 0, false );
    113113
    114114  UInt num_frames_processed = 0;
  • branches/SHM-dev/source/Lib/TLibCommon/TComDataCU.cpp

    r1260 r1289  
    425425Bool TComDataCU::isLastSubCUOfCtu(const UInt absPartIdx)
    426426{
    427   TComPic* pcPic = getPic();
    428   TComSlice * pcSlice = pcPic->getSlice(pcPic->getCurrSliceIdx());
     427  const TComSPS &sps=*(getSlice()->getSPS());
    429428
    430429#if SVC_EXTENSION
     430  TComSlice * pcSlice = m_pcPic->getSlice(m_pcPic->getCurrSliceIdx());
    431431  const UInt picWidth = pcSlice->getPicWidthInLumaSamples();
    432432  const UInt picHeight = pcSlice->getPicHeightInLumaSamples();
    433433#else
    434   const UInt picWidth = pcSlice->getSPS()->getPicWidthInLumaSamples();
    435   const UInt picHeight = pcSlice->getSPS()->getPicHeightInLumaSamples();
     434  const UInt picWidth = sps.getPicWidthInLumaSamples();
     435  const UInt picHeight = sps.getPicHeightInLumaSamples();
    436436#endif
    437   const UInt granularityWidth = g_uiMaxCUWidth;
     437  const UInt granularityWidth = sps.getMaxCUWidth();
    438438
    439439  const UInt cuPosX = getCUPelX() + g_auiRasterToPelX[ g_auiZscanToRaster[absPartIdx] ];
     
    461461{
    462462
     463  const UInt maxCUWidth = pcPic->getPicSym()->getSPS().getMaxCUWidth();
     464  const UInt maxCUHeight= pcPic->getPicSym()->getSPS().getMaxCUHeight();
    463465  m_pcPic              = pcPic;
    464466  m_pcSlice            = pcPic->getSlice(pcPic->getCurrSliceIdx());
    465467  m_ctuRsAddr          = ctuRsAddr;
    466   m_uiCUPelX           = ( ctuRsAddr % pcPic->getFrameWidthInCtus() ) * g_uiMaxCUWidth;
    467   m_uiCUPelY           = ( ctuRsAddr / pcPic->getFrameWidthInCtus() ) * g_uiMaxCUHeight;
     468  m_uiCUPelX           = ( ctuRsAddr % pcPic->getFrameWidthInCtus() ) * maxCUWidth;
     469  m_uiCUPelY           = ( ctuRsAddr / pcPic->getFrameWidthInCtus() ) * maxCUHeight;
    468470  m_absZIdxInCtu       = 0;
    469471  m_dTotalCost         = MAX_DOUBLE;
     
    484486  memset( m_puhDepth          , 0,                          m_uiNumPartition * sizeof( *m_puhDepth ) );
    485487  memset( m_puhTrIdx          , 0,                          m_uiNumPartition * sizeof( *m_puhTrIdx ) );
    486   memset( m_puhWidth          , g_uiMaxCUWidth,             m_uiNumPartition * sizeof( *m_puhWidth ) );
    487   memset( m_puhHeight         , g_uiMaxCUHeight,            m_uiNumPartition * sizeof( *m_puhHeight ) );
     488  memset( m_puhWidth          , maxCUWidth,                 m_uiNumPartition * sizeof( *m_puhWidth ) );
     489  memset( m_puhHeight         , maxCUHeight,                m_uiNumPartition * sizeof( *m_puhHeight ) );
    488490  for(UInt i=0; i<NUM_REF_PIC_LIST_01; i++)
    489491  {
     
    510512  memset( m_pbIPCMFlag        , false,                    m_uiNumPartition * sizeof( *m_pbIPCMFlag ) );
    511513
    512   const UInt numCoeffY    = g_uiMaxCUWidth*g_uiMaxCUHeight;
     514  const UInt numCoeffY    = maxCUWidth*maxCUHeight;
    513515  for (UInt comp=0; comp<MAX_NUM_COMPONENT; comp++)
    514516  {
     
    585587  m_uiTotalBins        = 0;
    586588
    587   UChar uhWidth  = g_uiMaxCUWidth  >> uiDepth;
    588   UChar uhHeight = g_uiMaxCUHeight >> uiDepth;
     589  const UChar uhWidth  = getSlice()->getSPS()->getMaxCUWidth()  >> uiDepth;
     590  const UChar uhHeight = getSlice()->getSPS()->getMaxCUHeight() >> uiDepth;
    589591
    590592  for (UInt ui = 0; ui < m_uiNumPartition; ui++)
     
    656658
    657659  m_pcPic              = pcCU->getPic();
    658   m_pcSlice            = m_pcPic->getSlice(m_pcPic->getCurrSliceIdx());
     660  m_pcSlice            = pcCU->getSlice();
    659661  m_ctuRsAddr          = pcCU->getCtuRsAddr();
    660662  m_absZIdxInCtu       = pcCU->getZorderIdxInCtu() + uiPartOffset;
    661663
    662   m_uiCUPelX           = pcCU->getCUPelX() + ( g_uiMaxCUWidth>>uiDepth  )*( uiPartUnitIdx &  1 );
    663   m_uiCUPelY           = pcCU->getCUPelY() + ( g_uiMaxCUHeight>>uiDepth  )*( uiPartUnitIdx >> 1 );
     664  const UChar uhWidth  = getSlice()->getSPS()->getMaxCUWidth()  >> uiDepth;
     665  const UChar uhHeight = getSlice()->getSPS()->getMaxCUHeight() >> uiDepth;
     666
     667  m_uiCUPelX           = pcCU->getCUPelX() + ( uhWidth )*( uiPartUnitIdx &  1 );
     668  m_uiCUPelY           = pcCU->getCUPelY() + ( uhHeight)*( uiPartUnitIdx >> 1 );
    664669
    665670  m_dTotalCost         = MAX_DOUBLE;
     
    693698
    694699  memset( m_puhDepth,     uiDepth, iSizeInUchar );
    695 
    696   UChar uhWidth  = g_uiMaxCUWidth  >> uiDepth;
    697   UChar uhHeight = g_uiMaxCUHeight >> uiDepth;
    698700  memset( m_puhWidth,          uhWidth,  iSizeInUchar );
    699701  memset( m_puhHeight,         uhHeight, iSizeInUchar );
     
    744746Void TComDataCU::setOutsideCUPart( UInt uiAbsPartIdx, UInt uiDepth )
    745747{
    746   UInt uiNumPartition = m_uiNumPartition >> (uiDepth << 1);
    747   UInt uiSizeInUchar = sizeof( UChar  ) * uiNumPartition;
    748 
    749   UChar uhWidth  = g_uiMaxCUWidth  >> uiDepth;
    750   UChar uhHeight = g_uiMaxCUHeight >> uiDepth;
     748  const UInt    uiNumPartition = m_uiNumPartition >> (uiDepth << 1);
     749  const UInt     uiSizeInUchar = sizeof( UChar  ) * uiNumPartition;
     750  const TComSPS &sps            = *(getSlice()->getSPS());
     751  const UChar    uhWidth        = sps.getMaxCUWidth()  >> uiDepth;
     752  const UChar    uhHeight       = sps.getMaxCUHeight() >> uiDepth;
    751753  memset( m_puhDepth    + uiAbsPartIdx,     uiDepth,  uiSizeInUchar );
    752754  memset( m_puhWidth    + uiAbsPartIdx,     uhWidth,  uiSizeInUchar );
     
    952954  }
    953955
    954   const UInt numCoeffY = g_uiMaxCUWidth*g_uiMaxCUHeight >> (uiDepth<<1);
     956  const UInt numCoeffY = (pcCU->getSlice()->getSPS()->getMaxCUWidth()*pcCU->getSlice()->getSPS()->getMaxCUHeight()) >> (uiDepth<<1);
    955957  const UInt offsetY   = uiPartUnitIdx*numCoeffY;
    956958  for (UInt ch=0; ch<numValidComp; ch++)
     
    10301032  memcpy( pCtu->getIPCMFlag() + m_absZIdxInCtu, m_pbIPCMFlag,         iSizeInBool  );
    10311033
    1032   const UInt numCoeffY    = (g_uiMaxCUWidth*g_uiMaxCUHeight)>>(uhDepth<<1);
     1034  const UInt numCoeffY    = (pCtu->getSlice()->getSPS()->getMaxCUWidth()*pCtu->getSlice()->getSPS()->getMaxCUHeight())>>(uhDepth<<1);
    10331035  const UInt offsetY      = m_absZIdxInCtu*m_pcPic->getMinCUWidth()*m_pcPic->getMinCUHeight();
    10341036  for (UInt comp=0; comp<numValidComp; comp++)
     
    29542956Void TComDataCU::clipMv    (TComMv&  rcMv)
    29552957{
     2958  const TComSPS &sps=*(m_pcSlice->getSPS());
    29562959  Int  iMvShift = 2;
    29572960  Int iOffset = 8;
    29582961#if SVC_EXTENSION
    2959   Int iHorMax = ( m_pcSlice->getPicWidthInLumaSamples() + iOffset - m_uiCUPelX - 1 ) << iMvShift;
     2962  Int iHorMax = ( m_pcSlice->getPicWidthInLumaSamples() + iOffset - (Int)m_uiCUPelX - 1 ) << iMvShift;
    29602963#else
    2961   Int iHorMax = ( m_pcSlice->getSPS()->getPicWidthInLumaSamples() + iOffset - m_uiCUPelX - 1 ) << iMvShift;
     2964  Int iHorMax = ( sps.getPicWidthInLumaSamples() + iOffset - (Int)m_uiCUPelX - 1 ) << iMvShift;
    29622965#endif
    2963   Int iHorMin = (       -(Int)g_uiMaxCUWidth - iOffset - (Int)m_uiCUPelX + 1 ) << iMvShift;
     2966  Int iHorMin = (      -(Int)sps.getMaxCUWidth() - iOffset - (Int)m_uiCUPelX + 1 ) << iMvShift;
    29642967 
    29652968#if SVC_EXTENSION
    2966   Int iVerMax = ( m_pcSlice->getPicHeightInLumaSamples() + iOffset - m_uiCUPelY - 1 ) << iMvShift;
     2969  Int iVerMax = ( m_pcSlice->getPicHeightInLumaSamples() + iOffset - (Int)m_uiCUPelY - 1 ) << iMvShift;
    29672970#else
    2968   Int iVerMax = ( m_pcSlice->getSPS()->getPicHeightInLumaSamples() + iOffset - m_uiCUPelY - 1 ) << iMvShift;
     2971  Int iVerMax = ( sps.getPicHeightInLumaSamples() + iOffset - (Int)m_uiCUPelY - 1 ) << iMvShift;
    29692972#endif
    2970   Int iVerMin = (       -(Int)g_uiMaxCUHeight - iOffset - (Int)m_uiCUPelY + 1 ) << iMvShift;
     2973  Int iVerMin = (      -(Int)sps.getMaxCUHeight() - iOffset - (Int)m_uiCUPelY + 1 ) << iMvShift;
    29712974
    29722975  rcMv.setHor( min (iHorMax, max (iHorMin, rcMv.getHor())) );
     
    34833486  }
    34843487
    3485 #if LAYER_CTB
    3486   UInt baseMaxCUHeight = baseColPic->getPicSym()->getMaxCUHeight();
    3487   UInt baseMaxCUWidth  = baseColPic->getPicSym()->getMaxCUWidth();
     3488  UInt baseMaxCUHeight = baseColPic->getSlice(0)->getSPS()->getMaxCUHeight();
     3489  UInt baseMaxCUWidth  = baseColPic->getSlice(0)->getSPS()->getMaxCUWidth();
    34883490  UInt baseMinUnitSize = baseColPic->getMinCUWidth();
    34893491 
    34903492  uiCUAddrBase = ( iBY / baseMaxCUHeight ) * baseColPic->getFrameWidthInCtus() + ( iBX / baseMaxCUWidth );
    3491 #else
    3492   uiCUAddrBase = (iBY/g_uiMaxCUHeight)*baseColPic->getFrameWidthInCtus() + (iBX/g_uiMaxCUWidth);
    3493 #endif
    34943493
    34953494  assert(uiCUAddrBase < baseColPic->getNumberOfCtusInFrame());
    34963495
     3496  UInt uiRasterAddrBase = ( iBY - (iBY/baseMaxCUHeight)*baseMaxCUHeight ) / baseMinUnitSize * baseColPic->getNumPartInCtuWidth() + ( iBX - (iBX/baseMaxCUWidth)*baseMaxCUWidth ) / baseMinUnitSize; 
     3497
    34973498#if LAYER_CTB
    3498   UInt uiRasterAddrBase = ( iBY - (iBY/baseMaxCUHeight)*baseMaxCUHeight ) / baseMinUnitSize * baseColPic->getNumPartInCtuWidth() + ( iBX - (iBX/baseMaxCUWidth)*baseMaxCUWidth ) / baseMinUnitSize;
    3499  
    35003499  uiAbsPartIdxBase = g_auiLayerRasterToZscan[baseColPic->getLayerId()][uiRasterAddrBase];
    35013500#else
    3502   UInt uiRasterAddrBase = (iBY - (iBY/g_uiMaxCUHeight)*g_uiMaxCUHeight)/uiMinUnitSize*baseColPic->getNumPartInCtuWidth() + (iBX - (iBX/g_uiMaxCUWidth)*g_uiMaxCUWidth)/uiMinUnitSize;
    3503 
    35043501  uiAbsPartIdxBase = g_auiRasterToZscan[uiRasterAddrBase];
    35053502#endif
  • branches/SHM-dev/source/Lib/TLibCommon/TComLoopFilter.cpp

    r1287 r1289  
    177177  UInt uiCurNumParts = pcPic->getNumPartitionsInCtu() >> (uiDepth<<1);
    178178  UInt uiQNumParts   = uiCurNumParts>>2;
     179  const TComSPS &sps = *(pcCU->getSlice()->getSPS());
    179180
    180181  if( pcCU->getDepth(uiAbsZorderIdx) > uiDepth )
     
    187188      if( ( uiLPelX < pcCU->getSlice()->getPicWidthInLumaSamples() ) && ( uiTPelY < pcCU->getSlice()->getPicHeightInLumaSamples() ) )
    188189#else
    189       if( ( uiLPelX < pcCU->getSlice()->getSPS()->getPicWidthInLumaSamples() ) && ( uiTPelY < pcCU->getSlice()->getSPS()->getPicHeightInLumaSamples() ) )
     190      if( ( uiLPelX < sps.getPicWidthInLumaSamples() ) && ( uiTPelY < sps.getPicHeightInLumaSamples() ) )
    190191#endif
    191192      {
     
    201202  xSetEdgefilterPU   ( pcCU, uiAbsZorderIdx );
    202203
     204  const UInt uiPelsInPart = sps.getMaxCUWidth() >> g_uiMaxCUDepth;
     205
    203206  for( UInt uiPartIdx = uiAbsZorderIdx; uiPartIdx < uiAbsZorderIdx + uiCurNumParts; uiPartIdx++ )
    204207  {
    205208    UInt uiBSCheck;
    206     if( (g_uiMaxCUWidth >> g_uiMaxCUDepth) == 4 )
     209    if( uiPelsInPart == 4 )
    207210    {
    208211      uiBSCheck = (edgeDir == EDGE_VER && uiPartIdx%2 == 0) || (edgeDir == EDGE_HOR && (uiPartIdx-((uiPartIdx>>2)<<2))/2 == 0);
     
    219222  }
    220223
    221   UInt uiPelsInPart = g_uiMaxCUWidth >> g_uiMaxCUDepth;
    222224  UInt PartIdxIncr = DEBLOCK_SMALLEST_BLOCK / uiPelsInPart ? DEBLOCK_SMALLEST_BLOCK / uiPelsInPart : 1 ;
    223225
     
    290292
    291293  const TComRectangle &rect = rTu.getRect(COMPONENT_Y);
    292 
    293   const UInt uiWidthInBaseUnits  = rect.width / (g_uiMaxCUWidth >> g_uiMaxCUDepth);
    294   const UInt uiHeightInBaseUnits = rect.height / (g_uiMaxCUWidth >> g_uiMaxCUDepth);
     294  const TComSPS &sps=*(pcCU->getSlice()->getSPS());
     295
     296  const UInt uiWidthInBaseUnits  = rect.width  / (sps.getMaxCUWidth()  >> g_uiMaxCUDepth);
     297  const UInt uiHeightInBaseUnits = rect.height / (sps.getMaxCUHeight() >> g_uiMaxCUDepth);
    295298
    296299  xSetEdgefilterMultiple( pcCU, rTu.GetAbsPartIdxCU(), uiTransDepthTotal, EDGE_VER, 0, m_stLFCUParam.bInternalEdge, uiWidthInBaseUnits, uiHeightInBaseUnits, &rect );
     
    559562
    560563
    561 Void TComLoopFilter::xEdgeFilterLuma( TComDataCU* pcCU, UInt uiAbsZorderIdx, UInt uiDepth, DeblockEdgeDir edgeDir, Int iEdge  )
    562 {
    563   TComPicYuv* pcPicYuvRec = pcCU->getPic()->getPicYuvRec();
    564   Pel* piSrc    = pcPicYuvRec->getAddr(COMPONENT_Y, pcCU->getCtuRsAddr(), uiAbsZorderIdx );
    565   Pel* piTmpSrc = piSrc;
     564Void TComLoopFilter::xEdgeFilterLuma( TComDataCU* const pcCU, const UInt uiAbsZorderIdx, const UInt uiDepth, const DeblockEdgeDir edgeDir, const Int iEdge  )
     565{
     566        TComPicYuv *pcPicYuvRec                   = pcCU->getPic()->getPicYuvRec();
     567        Pel        *piSrc                         = pcPicYuvRec->getAddr(COMPONENT_Y, pcCU->getCtuRsAddr(), uiAbsZorderIdx );
     568        Pel        *piTmpSrc                      = piSrc;
     569  const TComSPS    &sps                           = *(pcCU->getSlice()->getSPS());
     570  const Bool        ppsTransquantBypassEnableFlag = pcCU->getSlice()->getPPS()->getTransquantBypassEnableFlag();
     571
    566572#if SVC_EXTENSION
    567   const Int bitDepthLuma = pcCU->getSlice()->getBitDepth(CHANNEL_TYPE_LUMA);
     573  const Int bitDepthLuma                          = pcCU->getSlice()->getBitDepth(CHANNEL_TYPE_LUMA);
    568574#else
    569   const Int bitDepthLuma = pcCU->getSlice()->getSPS()->getBitDepth(CHANNEL_TYPE_LUMA);
     575  const Int         bitDepthLuma                  = sps.getBitDepth(CHANNEL_TYPE_LUMA);
    570576#endif
    571577
    572   const Bool lfCrossSliceBoundaryFlag=pcCU->getSlice()->getLFCrossSliceBoundaryFlag();
     578  const Bool        lfCrossSliceBoundaryFlag      = pcCU->getSlice()->getLFCrossSliceBoundaryFlag();
    573579
    574580  Int  iStride = pcPicYuvRec->getStride(COMPONENT_Y);
     
    578584  UInt uiNumParts = pcCU->getPic()->getNumPartInCtuWidth()>>uiDepth;
    579585
    580   UInt  uiPelsInPart = g_uiMaxCUWidth >> g_uiMaxCUDepth;
     586  UInt  uiPelsInPart = sps.getMaxCUWidth() >> g_uiMaxCUDepth;
    581587  UInt  uiBsAbsIdx = 0, uiBs = 0;
    582588  Int   iOffset, iSrcStep;
    583589
    584   Bool  bPCMFilter = (pcCU->getSlice()->getSPS()->getUsePCM() && pcCU->getSlice()->getSPS()->getPCMFilterDisableFlag())? true : false;
     590  Bool  bPCMFilter = (sps.getUsePCM() && sps.getPCMFilterDisableFlag())? true : false;
    585591  Bool  bPartPNoFilter = false;
    586592  Bool  bPartQNoFilter = false;
     
    622628      else  // (iDir == EDGE_HOR)
    623629      {
    624         pcCUP = pcCUQ->getPUAbove(uiPartPIdx, uiPartQIdx,!pcCU->getSlice()->getLFCrossSliceBoundaryFlag(), false, !m_bLFCrossTileBoundary);
     630        pcCUP = pcCUQ->getPUAbove(uiPartPIdx, uiPartQIdx,!lfCrossSliceBoundaryFlag, false, !m_bLFCrossTileBoundary);
    625631      }
    626632
     
    651657        Int d =  d0 + d3;
    652658
    653         if (bPCMFilter || pcCU->getSlice()->getPPS()->getTransquantBypassEnableFlag())
     659        if (bPCMFilter || ppsTransquantBypassEnableFlag)
    654660        {
    655661          // Check if each of PUs is I_PCM with LF disabling
     
    681687
    682688
    683 Void TComLoopFilter::xEdgeFilterChroma( TComDataCU* pcCU, UInt uiAbsZorderIdx, UInt uiDepth, DeblockEdgeDir edgeDir, Int iEdge )
    684 {
    685   TComPicYuv* pcPicYuvRec = pcCU->getPic()->getPicYuvRec();
    686   Int         iStride     = pcPicYuvRec->getStride(COMPONENT_Cb);
    687   Pel*        piSrcCb     = pcPicYuvRec->getAddr( COMPONENT_Cb, pcCU->getCtuRsAddr(), uiAbsZorderIdx );
    688   Pel*        piSrcCr     = pcPicYuvRec->getAddr( COMPONENT_Cr, pcCU->getCtuRsAddr(), uiAbsZorderIdx );
     689Void TComLoopFilter::xEdgeFilterChroma( TComDataCU* const pcCU, const UInt uiAbsZorderIdx, const UInt uiDepth, const DeblockEdgeDir edgeDir, const Int iEdge )
     690{
     691        TComPicYuv *pcPicYuvRec    = pcCU->getPic()->getPicYuvRec();
     692        Int         iStride        = pcPicYuvRec->getStride(COMPONENT_Cb);
     693        Pel        *piSrcCb        = pcPicYuvRec->getAddr( COMPONENT_Cb, pcCU->getCtuRsAddr(), uiAbsZorderIdx );
     694        Pel        *piSrcCr        = pcPicYuvRec->getAddr( COMPONENT_Cr, pcCU->getCtuRsAddr(), uiAbsZorderIdx );
     695
     696  const TComSPS    &sps            = *(pcCU->getSlice()->getSPS());
    689697#if SVC_EXTENSION
    690   const Int bitDepthChroma = pcCU->getSlice()->getBitDepth(CHANNEL_TYPE_CHROMA);
    691 #else
    692   const Int bitDepthChroma = pcCU->getSlice()->getSPS()->getBitDepth(CHANNEL_TYPE_CHROMA);
     698  const Int         bitDepthChroma = pcCU->getSlice()->getBitDepth(CHANNEL_TYPE_CHROMA);
     699#else 
     700  const Int         bitDepthChroma = sps.getBitDepth(CHANNEL_TYPE_CHROMA);
    693701#endif
     702
     703  const UInt  uiPelsInPartChromaH = sps.getMaxCUWidth() >> (g_uiMaxCUDepth+pcPicYuvRec->getComponentScaleX(COMPONENT_Cb));
     704  const UInt  uiPelsInPartChromaV = sps.getMaxCUHeight() >> (g_uiMaxCUDepth+pcPicYuvRec->getComponentScaleY(COMPONENT_Cb));
     705
    694706  Int iQP = 0;
    695707  Int iQP_P = 0;
    696708  Int iQP_Q = 0;
    697 
    698   UInt  uiPelsInPartChromaH = g_uiMaxCUWidth >> (g_uiMaxCUDepth+pcPicYuvRec->getComponentScaleX(COMPONENT_Cb));
    699   UInt  uiPelsInPartChromaV = g_uiMaxCUWidth >> (g_uiMaxCUDepth+pcPicYuvRec->getComponentScaleY(COMPONENT_Cb));
    700709
    701710  Int   iOffset, iSrcStep;
     
    777786      else  // (edgeDir == EDGE_HOR)
    778787      {
    779         pcCUP = pcCUQ->getPUAbove(uiPartPIdx, uiPartQIdx,!pcCU->getSlice()->getLFCrossSliceBoundaryFlag(), false, !m_bLFCrossTileBoundary);
     788        pcCUP = pcCUQ->getPUAbove(uiPartPIdx, uiPartQIdx,!lfCrossSliceBoundaryFlag, false, !m_bLFCrossTileBoundary);
    780789      }
    781790
  • branches/SHM-dev/source/Lib/TLibCommon/TComLoopFilter.h

    r1287 r1289  
    105105                               );
    106106
    107   Void xEdgeFilterLuma            ( TComDataCU* pcCU, UInt uiAbsZorderIdx, UInt uiDepth, DeblockEdgeDir edgeDir, Int iEdge );
    108   Void xEdgeFilterChroma          ( TComDataCU* pcCU, UInt uiAbsZorderIdx, UInt uiDepth, DeblockEdgeDir edgeDir, Int iEdge );
     107  Void xEdgeFilterLuma            ( TComDataCU* const pcCU, const UInt uiAbsZorderIdx, const UInt uiDepth, const DeblockEdgeDir edgeDir, const Int iEdge );
     108  Void xEdgeFilterChroma          ( TComDataCU* const pcCU, const UInt uiAbsZorderIdx, const UInt uiDepth, const DeblockEdgeDir edgeDir, const Int iEdge );
    109109
    110110  __inline Void xPelFilterLuma( Pel* piSrc, Int iOffset, Int tc, Bool sw, Bool bPartPNoFilter, Bool bPartQNoFilter, Int iThrCut, Bool bFilterSecondP, Bool bFilterSecondQ, const Int bitDepthLuma);
  • branches/SHM-dev/source/Lib/TLibCommon/TComPattern.cpp

    r1287 r1289  
    110110
    111111  TComDataCU *pcCU=rTu.getCU();
     112  const TComSPS &sps = *(pcCU->getSlice()->getSPS());
    112113  const UInt uiZorderIdxInPart=rTu.GetAbsPartIdxTU();
    113114  const UInt uiTuWidth        = rTu.getRect(compID).width;
     
    116117  const UInt uiTuHeight2      = uiTuHeight << 1;
    117118
    118   const Int  iBaseUnitSize    = g_uiMaxCUWidth >> g_uiMaxCUDepth;
     119  const Int  iBaseUnitSize    = sps.getMaxCUWidth() >> g_uiMaxCUDepth;
    119120  const Int  iUnitWidth       = iBaseUnitSize  >> pcCU->getPic()->getPicYuvRec()->getComponentScaleX(compID);
    120121  const Int  iUnitHeight      = iBaseUnitSize  >> pcCU->getPic()->getPicYuvRec()->getComponentScaleY(compID);
     
    126127  const Int  bitDepthForChannel = pcCU->getSlice()->getBitDepth(chType);
    127128#else
    128   const Int  bitDepthForChannel = pcCU->getSlice()->getSPS()->getBitDepth(chType);
     129  const Int  bitDepthForChannel = sps.getBitDepth(chType);
    129130#endif
    130131
     
    164165    Pel *piRoiOrigin = pcCU->getPic()->getPicYuvRec()->getAddr(compID, pcCU->getCtuRsAddr(), pcCU->getZorderIdxInCtu()+uiZorderIdxInPart);
    165166#if O0043_BEST_EFFORT_DECODING
    166     const Int  bitDepthForChannelInStream = pcCU->getSlice()->getSPS()->getStreamBitDepth(chType);
     167    const Int  bitDepthForChannelInStream = sps.getStreamBitDepth(chType);
    167168    fillReferenceSamples (bitDepthForChannelInStream, bitDepthForChannelInStream - bitDepthForChannel, pcCU, piRoiOrigin, piAdiTemp, bNeighborFlags, iNumIntraNeighbor,  iUnitWidth, iUnitHeight, iAboveUnits, iLeftUnits,
    168169#else
     
    202203      //------------------------------------------------
    203204
    204       Bool useStrongIntraSmoothing = isLuma(chType) && pcCU->getSlice()->getSPS()->getUseStrongIntraSmoothing();
     205      Bool useStrongIntraSmoothing = isLuma(chType) && sps.getUseStrongIntraSmoothing();
    205206
    206207      const Pel bottomLeft = piAdiTemp[stride * uiTuHeight2];
  • branches/SHM-dev/source/Lib/TLibCommon/TComPic.cpp

    r1259 r1289  
    7575}
    7676#if SVC_EXTENSION
    77 Void TComPic::create( const TComVPS &vps, const TComSPS &sps, const TComPPS &pps, const UInt uiMaxWidth, const UInt uiMaxHeight, const UInt uiMaxDepth, const Bool bIsVirtual, const UInt layerId )
     77Void TComPic::create( const TComVPS &vps, const TComSPS &sps, const TComPPS &pps, const UInt uiMaxDepth, const Bool bIsVirtual, const UInt layerId )
    7878{
    7979  const ChromaFormat chromaFormatIDC = vps.getChromaFormatIdc(&sps, layerId);
    8080  const Int iWidth  = vps.getPicWidthInLumaSamples(&sps, layerId);
    8181  const Int iHeight = vps.getPicHeightInLumaSamples(&sps, layerId);
     82  const UInt uiMaxCuWidth  = sps.getMaxCUWidth();
     83  const UInt uiMaxCuHeight = sps.getMaxCUHeight();
    8284 
    8385  const Window& conformanceWindow = vps.getConformanceWindow( &sps, layerId );
    8486
    85   m_picSym.create( vps, sps, pps, uiMaxWidth, uiMaxHeight, uiMaxDepth, layerId );
     87  m_picSym.create( vps, sps, pps, uiMaxDepth, layerId );
    8688
    8789  if (!bIsVirtual)
    8890  {
    89     m_apcPicYuv[PIC_YUV_ORG]  = new TComPicYuv;  m_apcPicYuv[PIC_YUV_ORG]->create( iWidth, iHeight, chromaFormatIDC, uiMaxWidth, uiMaxHeight, uiMaxDepth, &conformanceWindow );
    90     m_apcPicYuv[PIC_YUV_TRUE_ORG]  = new TComPicYuv;  m_apcPicYuv[PIC_YUV_TRUE_ORG]->create( iWidth, iHeight, chromaFormatIDC, uiMaxWidth, uiMaxHeight, uiMaxDepth, &conformanceWindow );
    91   }
    92   m_apcPicYuv[PIC_YUV_REC]  = new TComPicYuv;  m_apcPicYuv[PIC_YUV_REC]->create( iWidth, iHeight, chromaFormatIDC, uiMaxWidth, uiMaxHeight, uiMaxDepth, &conformanceWindow );
     91    m_apcPicYuv[PIC_YUV_ORG]  = new TComPicYuv;  m_apcPicYuv[PIC_YUV_ORG]->create( iWidth, iHeight, chromaFormatIDC, uiMaxCuWidth, uiMaxCuHeight, uiMaxDepth, true, &conformanceWindow );
     92    m_apcPicYuv[PIC_YUV_TRUE_ORG]  = new TComPicYuv;  m_apcPicYuv[PIC_YUV_TRUE_ORG]->create( iWidth, iHeight, chromaFormatIDC, uiMaxCuWidth, uiMaxCuHeight, uiMaxDepth, true, &conformanceWindow );
     93  }
     94  m_apcPicYuv[PIC_YUV_REC]  = new TComPicYuv;  m_apcPicYuv[PIC_YUV_REC]->create( iWidth, iHeight, chromaFormatIDC, uiMaxCuWidth, uiMaxCuHeight, uiMaxDepth, true, &conformanceWindow );
    9395
    9496  for( Int i = 0; i < MAX_LAYERS; i++ )
     
    9698    if( m_bSpatialEnhLayer[i] )
    9799    {
    98       m_pcFullPelBaseRec[i] = new TComPicYuv;  m_pcFullPelBaseRec[i]->create( iWidth, iHeight, chromaFormatIDC, uiMaxWidth, uiMaxHeight, uiMaxDepth, &conformanceWindow );
     100      m_pcFullPelBaseRec[i] = new TComPicYuv;  m_pcFullPelBaseRec[i]->create( iWidth, iHeight, chromaFormatIDC, uiMaxCuWidth, uiMaxCuHeight, uiMaxDepth, true, &conformanceWindow );
    99101    }
    100102  }   
     
    108110}
    109111#else
    110 Void TComPic::create( const TComSPS &sps, const TComPPS &pps, const UInt uiMaxWidth, const UInt uiMaxHeight, const UInt uiMaxDepth, const Bool bIsVirtual)
     112Void TComPic::create( const TComSPS &sps, const TComPPS &pps, const UInt uiMaxDepth, const Bool bIsVirtual)
    111113{
    112114  const ChromaFormat chromaFormatIDC=sps.getChromaFormatIdc();
    113   const Int iWidth  = sps.getPicWidthInLumaSamples();
    114   const Int iHeight = sps.getPicHeightInLumaSamples();
    115 
    116   m_picSym.create( sps, pps, uiMaxWidth, uiMaxHeight, uiMaxDepth );
     115  const Int  iWidth        = sps.getPicWidthInLumaSamples();
     116  const Int  iHeight       = sps.getPicHeightInLumaSamples();
     117  const UInt uiMaxCuWidth  = sps.getMaxCUWidth();
     118  const UInt uiMaxCuHeight = sps.getMaxCUHeight();
     119
     120  m_picSym.create( sps, pps, uiMaxDepth );
    117121  if (!bIsVirtual)
    118122  {
    119     m_apcPicYuv[PIC_YUV_ORG    ]   = new TComPicYuv;  m_apcPicYuv[PIC_YUV_ORG     ]->create( iWidth, iHeight, chromaFormatIDC, uiMaxWidth, uiMaxHeight, uiMaxDepth );
    120     m_apcPicYuv[PIC_YUV_TRUE_ORG]  = new TComPicYuv;  m_apcPicYuv[PIC_YUV_TRUE_ORG]->create( iWidth, iHeight, chromaFormatIDC, uiMaxWidth, uiMaxHeight, uiMaxDepth );
    121   }
    122   m_apcPicYuv[PIC_YUV_REC]  = new TComPicYuv;  m_apcPicYuv[PIC_YUV_REC]->create( iWidth, iHeight, chromaFormatIDC, uiMaxWidth, uiMaxHeight, uiMaxDepth );
     123    m_apcPicYuv[PIC_YUV_ORG    ]   = new TComPicYuv;  m_apcPicYuv[PIC_YUV_ORG     ]->create( iWidth, iHeight, chromaFormatIDC, uiMaxCuWidth, uiMaxCuHeight, uiMaxDepth, true );
     124    m_apcPicYuv[PIC_YUV_TRUE_ORG]  = new TComPicYuv;  m_apcPicYuv[PIC_YUV_TRUE_ORG]->create( iWidth, iHeight, chromaFormatIDC, uiMaxCuWidth, uiMaxCuHeight, uiMaxDepth, true );
     125  }
     126  m_apcPicYuv[PIC_YUV_REC]  = new TComPicYuv;  m_apcPicYuv[PIC_YUV_REC]->create( iWidth, iHeight, chromaFormatIDC, uiMaxCuWidth, uiMaxCuHeight, uiMaxDepth, true );
    123127
    124128  // there are no SEI messages associated with this picture initially
     
    256260}
    257261
    258 Void TComPic::copyUpsampledMvField(UInt refLayerIdc, TComPic* pcPicBase)
     262Void TComPic::copyUpsampledMvField(UInt refLayerIdc)
    259263{
    260264  UInt numPartitions = 1<<(g_uiMaxCUDepth<<1);
    261   UInt widthMinPU    = g_uiMaxCUWidth/(1<<g_uiMaxCUDepth);
    262   UInt heightMinPU   = g_uiMaxCUHeight/(1<<g_uiMaxCUDepth);
    263   Int  unitNum       = max (1, (Int)((16/widthMinPU)*(16/heightMinPU)) );
     265  UInt widthMinPU    = getSlice(0)->getSPS()->getMaxCUWidth()  / (1<<g_uiMaxCUDepth);
     266  UInt heightMinPU   = getSlice(0)->getSPS()->getMaxCUHeight() / (1<<g_uiMaxCUDepth);
     267  Int  unitNum       = max( 1, (Int)((16/widthMinPU)*(16/heightMinPU)) );
    264268
    265269  for(UInt cuIdx = 0; cuIdx < getPicSym()->getNumberOfCtusInFrame(); cuIdx++)  //each LCU
     
    270274    {
    271275      //pixel position of each unit in up-sampled layer
    272       UInt  pelX = pcCUDes->getCUPelX() + g_auiRasterToPelX[ g_auiZscanToRaster[absPartIdx] ];
    273       UInt  pelY = pcCUDes->getCUPelY() + g_auiRasterToPelY[ g_auiZscanToRaster[absPartIdx] ];
     276      UInt pelX = pcCUDes->getCUPelX() + g_auiRasterToPelX[ g_auiZscanToRaster[absPartIdx] ];
     277      UInt pelY = pcCUDes->getCUPelY() + g_auiRasterToPelY[ g_auiZscanToRaster[absPartIdx] ];
    274278      UInt baseCUAddr, baseAbsPartIdx;
    275279
  • branches/SHM-dev/source/Lib/TLibCommon/TComPic.h

    r1259 r1289  
    9999
    100100#if SVC_EXTENSION
    101   Void          create( const TComVPS& vps, const TComSPS &sps, const TComPPS &pps, const UInt uiMaxWidth, const UInt uiMaxHeight, const UInt uiMaxDepth, const Bool bIsVirtual /*= false*/, const UInt layerId );
     101  Void          create( const TComVPS& vps, const TComSPS &sps, const TComPPS &pps, const UInt uiMaxDepth, const Bool bIsVirtual /*= false*/, const UInt layerId );
    102102#else
    103   Void          create( const TComSPS &sps, const TComPPS &pps, const UInt uiMaxWidth, const UInt uiMaxHeight, const UInt uiMaxDepth, const Bool bIsVirtual /*= false*/ );
     103  Void          create( const TComSPS &sps, const TComPPS &pps, const UInt uiMaxDepth, const Bool bIsVirtual /*= false*/ );
    104104#endif
    105105
     
    121121  TComDataCU*   getCtu( UInt ctuRsAddr )           { return  m_picSym.getCtu( ctuRsAddr ); }
    122122  const TComDataCU* getCtu( UInt ctuRsAddr ) const { return  m_picSym.getCtu( ctuRsAddr ); }
    123 
    124123
    125124  TComPicYuv*   getPicYuvOrg()        { return  m_apcPicYuv[PIC_YUV_ORG]; }
     
    186185
    187186#if SVC_EXTENSION
    188   Void          setLayerId (UInt layerId)   { m_layerId = layerId; }
    189   UInt          getLayerId ()               { return m_layerId; }
    190   UInt          getLayerIdx()               { return getSlice(0)->getVPS()->getLayerIdxInVps(m_layerId); }
    191   Bool          isSpatialEnhLayer(UInt refLayerIdc)             { return m_bSpatialEnhLayer[refLayerIdc]; }
    192   Void          setSpatialEnhLayerFlag (UInt refLayerIdc, Bool b) { m_bSpatialEnhLayer[refLayerIdc] = b; }
    193   Void          setFullPelBaseRec   (UInt refLayerIdc, TComPicYuv* p) { m_pcFullPelBaseRec[refLayerIdc] = p; }
    194   TComPicYuv*   getFullPelBaseRec   (UInt refLayerIdc)  { return  m_pcFullPelBaseRec[refLayerIdc];  }
    195   Bool          isILR( UInt currLayerId )   { return ( m_bIsLongTerm && m_layerId < currLayerId ); }
    196   Bool          equalPictureSizeAndOffsetFlag(UInt refLayerIdc)             { return m_equalPictureSizeAndOffsetFlag[refLayerIdc]; }
    197   Void          setEqualPictureSizeAndOffsetFlag(UInt refLayerIdc, Bool b)  { m_equalPictureSizeAndOffsetFlag[refLayerIdc] = b;    }
    198   Void          copyUpsampledMvField  ( UInt refLayerIdc, TComPic* pcPicBase );
    199   Void          initUpsampledMvField  ();
     187  Void          setLayerId(UInt layerId)                                    { m_layerId = layerId;                                      }
     188  UInt          getLayerId()                                                { return m_layerId;                                          }
     189  UInt          getLayerIdx()                                               { return getSlice(0)->getVPS()->getLayerIdxInVps(m_layerId); }
     190  Bool          isSpatialEnhLayer(UInt refLayerIdc)                         { return m_bSpatialEnhLayer[refLayerIdc];                    }
     191  Void          setSpatialEnhLayerFlag (UInt refLayerIdc, Bool b)           { m_bSpatialEnhLayer[refLayerIdc] = b;                      }
     192  Void          setFullPelBaseRec   (UInt refLayerIdc, TComPicYuv* p)       { m_pcFullPelBaseRec[refLayerIdc] = p;                      }
     193  TComPicYuv*   getFullPelBaseRec   (UInt refLayerIdc)                      { return  m_pcFullPelBaseRec[refLayerIdc];                   }
     194  Bool          isILR( UInt currLayerId )                                   { return ( m_bIsLongTerm && m_layerId < currLayerId );      }
     195  Bool          equalPictureSizeAndOffsetFlag(UInt refLayerIdc)             { return m_equalPictureSizeAndOffsetFlag[refLayerIdc];       }
     196  Void          setEqualPictureSizeAndOffsetFlag(UInt refLayerIdc, Bool b)  { m_equalPictureSizeAndOffsetFlag[refLayerIdc] = b;          }
     197  Void          copyUpsampledMvField(UInt refLayerIdc);
     198  Void          initUpsampledMvField();
    200199  Bool          checkSameRefInfo();
    201200  Void          copyUpsampledPictureYuv(TComPicYuv*   pcPicYuvIn, TComPicYuv*   pcPicYuvOut);
    202201#if CGS_3D_ASYMLUT
    203   Void          setFrameBit( Int n )  { m_nFrameBit = n;    }
    204   Int           getFrameBit()         { return m_nFrameBit; }
    205 #endif
    206   Bool          isCurrAu() { return m_currAuFlag; }
    207   Void          setCurrAuFlag(Bool x) {m_currAuFlag = x; }
     202  Void          setFrameBit( Int n )                                        { m_nFrameBit = n;     }
     203  Int           getFrameBit()                                               { return m_nFrameBit; }
     204#endif
     205  Bool          isCurrAu()                                                  { return m_currAuFlag; }
     206  Void          setCurrAuFlag(Bool x)                                       { m_currAuFlag = x;    }
    208207#endif //SVC_EXTENSION
    209208};// END CLASS DEFINITION TComPic
  • branches/SHM-dev/source/Lib/TLibCommon/TComPicSym.cpp

    r1259 r1289  
    5050:m_frameWidthInCtus(0)
    5151,m_frameHeightInCtus(0)
    52 ,m_uiMaxCUWidth(0)
    53 ,m_uiMaxCUHeight(0)
    5452,m_uiMinCUWidth(0)
    5553,m_uiMinCUHeight(0)
     
    7775
    7876#if SVC_EXTENSION
    79 Void TComPicSym::create  ( const TComVPS& vps, const TComSPS &sps, const TComPPS &pps, UInt uiMaxWidth, UInt uiMaxHeight, UInt uiMaxDepth, const UInt layerId )
     77Void TComPicSym::create  ( const TComVPS& vps, const TComSPS &sps, const TComPPS &pps, UInt uiMaxDepth, const UInt layerId )
    8078{
    8179  UInt i;
     
    8886  const Int iPicHeight = vps.getPicHeightInLumaSamples(&sps, layerId);
    8987#else
    90 Void TComPicSym::create  ( const TComSPS &sps, const TComPPS &pps, UInt uiMaxWidth, UInt uiMaxHeight, UInt uiMaxDepth )
     88Void TComPicSym::create  ( const TComSPS &sps, const TComPPS &pps, UInt uiMaxDepth )
    9189{
    9290  UInt i;
     
    9492  m_pps = pps;
    9593
    96   const ChromaFormat chromaFormatIDC=sps.getChromaFormatIdc();
    97   const Int iPicWidth  = sps.getPicWidthInLumaSamples();
    98   const Int iPicHeight = sps.getPicHeightInLumaSamples();
    99 #endif
     94  const ChromaFormat chromaFormatIDC = sps.getChromaFormatIdc();
     95  const Int iPicWidth      = sps.getPicWidthInLumaSamples();
     96  const Int iPicHeight     = sps.getPicHeightInLumaSamples();
     97#endif
     98
     99  const UInt uiMaxCuWidth  = sps.getMaxCUWidth();
     100  const UInt uiMaxCuHeight = sps.getMaxCUHeight();
    100101
    101102  m_uhTotalDepth       = uiMaxDepth;
    102103  m_numPartitionsInCtu = 1<<(m_uhTotalDepth<<1);
    103104
    104   m_uiMaxCUWidth       = uiMaxWidth;
    105   m_uiMaxCUHeight      = uiMaxHeight;
    106 
    107   m_uiMinCUWidth       = uiMaxWidth  >> m_uhTotalDepth;
    108   m_uiMinCUHeight      = uiMaxHeight >> m_uhTotalDepth;
    109 
    110   m_numPartInCtuWidth  = m_uiMaxCUWidth  / m_uiMinCUWidth;  // equivalent to 1<<m_uhTotalDepth
    111   m_numPartInCtuHeight = m_uiMaxCUHeight / m_uiMinCUHeight; // equivalent to 1<<m_uhTotalDepth
    112 
    113   m_frameWidthInCtus   = ( iPicWidth %m_uiMaxCUWidth  ) ? iPicWidth /m_uiMaxCUWidth  + 1 : iPicWidth /m_uiMaxCUWidth;
    114   m_frameHeightInCtus  = ( iPicHeight%m_uiMaxCUHeight ) ? iPicHeight/m_uiMaxCUHeight + 1 : iPicHeight/m_uiMaxCUHeight;
     105  m_uiMinCUWidth       = uiMaxCuWidth  >> m_uhTotalDepth;
     106  m_uiMinCUHeight      = uiMaxCuHeight >> m_uhTotalDepth;
     107
     108  m_numPartInCtuWidth  = uiMaxCuWidth  / m_uiMinCUWidth;  // equivalent to 1<<m_uhTotalDepth
     109  m_numPartInCtuHeight = uiMaxCuHeight / m_uiMinCUHeight; // equivalent to 1<<m_uhTotalDepth
     110
     111  m_frameWidthInCtus   = ( iPicWidth %uiMaxCuWidth  ) ? iPicWidth /uiMaxCuWidth  + 1 : iPicWidth /uiMaxCuWidth;
     112  m_frameHeightInCtus  = ( iPicHeight%uiMaxCuHeight ) ? iPicHeight/uiMaxCuHeight + 1 : iPicHeight/uiMaxCuHeight;
    115113
    116114  m_numCtusInFrame     = m_frameWidthInCtus * m_frameHeightInCtus;
     
    123121  {
    124122    m_pictureCtuArray[i] = new TComDataCU;
    125     m_pictureCtuArray[i]->create( chromaFormatIDC, m_numPartitionsInCtu, m_uiMaxCUWidth, m_uiMaxCUHeight, false, m_uiMaxCUWidth >> m_uhTotalDepth
     123    m_pictureCtuArray[i]->create( chromaFormatIDC, m_numPartitionsInCtu, uiMaxCuWidth, uiMaxCuHeight, false, uiMaxCuWidth >> m_uhTotalDepth
    126124#if ADAPTIVE_QP_SELECTION
    127125      , true
     
    291289    if (m_pps.getTilesEnabledFlag())
    292290    {
    293       minHeight = 64  / g_uiMaxCUHeight;
    294       minWidth  = 256 / g_uiMaxCUWidth;
     291      minHeight = 64  / m_sps.getMaxCUHeight();
     292      minWidth  = 256 / m_sps.getMaxCUWidth();
    295293    }
    296294  }
  • branches/SHM-dev/source/Lib/TLibCommon/TComPicSym.h

    r1259 r1289  
    8787  UInt          m_frameHeightInCtus;
    8888
    89   UInt          m_uiMaxCUWidth;
    90   UInt          m_uiMaxCUHeight;
    9189  UInt          m_uiMinCUWidth;
    9290  UInt          m_uiMinCUHeight;
     
    9997
    10098  std::deque<TComSlice*> m_apSlices;
    101 
    102   TComSlice**   m_apcTComSlice;
    103   UInt          m_uiNumAllocatedSlice;
    10499  TComDataCU**  m_pictureCtuArray;        ///< array of CU data.
    105100
     
    133128public:
    134129#if SVC_EXTENSION
    135   Void               create  ( const TComVPS &vps, const TComSPS &sps, const TComPPS &pps, UInt uiMaxWidth, UInt uiMaxHeight, UInt uiMaxDepth, const UInt layerId );
     130  Void               create  ( const TComVPS &vps, const TComSPS &sps, const TComPPS &pps, UInt uiMaxDepth, const UInt layerId );
    136131#if CGS_3D_ASYMLUT
    137132  TComPPS*           getPPSToUpdate()                                      { return &m_pps; }
    138133#endif
    139134#else
    140   Void               create  ( const TComSPS &sps, const TComPPS &pps, UInt uiMaxWidth, UInt uiMaxHeight, UInt uiMaxDepth );
     135  Void               create  ( const TComSPS &sps, const TComPPS &pps, UInt uiMaxDepth );
    141136#endif
    142137  Void               destroy ();
  • branches/SHM-dev/source/Lib/TLibCommon/TComPicYuv.cpp

    r1287 r1289  
    7676}
    7777
     78Void TComPicYuv::create ( const Int iPicWidth,
     79                          const Int iPicHeight,
     80                          const ChromaFormat chromaFormatIDC,
     81                          const UInt uiMaxCUWidth,  ///< used for generating offsets to CUs. Can use iPicWidth if no offsets are required
     82                          const UInt uiMaxCUHeight, ///< used for generating offsets to CUs. Can use iPicHeight if no offsets are required
     83                          const UInt uiMaxCUDepth,  ///< used for generating offsets to CUs. Can use 0 if no offsets are required
    7884#if SVC_EXTENSION
    79 Void TComPicYuv::create( const Int iPicWidth, const Int iPicHeight, const ChromaFormat chromaFormatIDC, const UInt uiMaxCUWidth, const UInt uiMaxCUHeight, const UInt uiMaxCUDepth, const Window* conformanceWindow )
     85                          const Bool bUseMargin,     ///< if true, then a margin of uiMaxCUWidth+16 and uiMaxCUHeight+16 is created around the image.
     86                          const Window* conformanceWindow)
    8087#else
    81 Void TComPicYuv::create( const Int  iPicWidth,    const  Int iPicHeight,    const ChromaFormat chromaFormatIDC,
    82                          const UInt uiMaxCUWidth, const UInt uiMaxCUHeight, const UInt uiMaxCUDepth )
     88                          const Bool bUseMargin)    ///< if true, then a margin of uiMaxCUWidth+16 and uiMaxCUHeight+16 is created around the image.
    8389#endif
    8490{
     91#if SVC_EXTENSION
     92  if(conformanceWindow != NULL)
     93  {
     94    m_conformanceWindow = *conformanceWindow;
     95  }
     96#endif
     97
    8598  m_iPicWidth         = iPicWidth;
    8699  m_iPicHeight        = iPicHeight;
    87100  m_chromaFormatIDC   = chromaFormatIDC;
    88  
    89 #if SVC_EXTENSION
    90   if(conformanceWindow != NULL)
    91   {
    92     m_conformanceWindow = *conformanceWindow;
    93   }
    94 #endif
    95  
    96 #if LAYER_CTB
    97   m_iMarginX    = uiMaxCUWidth  + 16; // for 16-byte alignment
    98   m_iMarginY    = uiMaxCUHeight + 16;  // margin for 8-tap filter and infinite padding
    99 #else
    100   m_iMarginX          = g_uiMaxCUWidth  + 16; // for 16-byte alignment
    101   m_iMarginY          = g_uiMaxCUHeight + 16;  // margin for 8-tap filter and infinite padding
    102 #endif
    103  
     101  m_iMarginX          = (bUseMargin?uiMaxCUWidth:0) + 16; // for 16-byte alignment
     102  m_iMarginY          = (bUseMargin?uiMaxCUHeight:0) + 16;  // margin for 8-tap filter and infinite padding
    104103  m_bIsBorderExtended = false;
    105104
  • branches/SHM-dev/source/Lib/TLibCommon/TComPicYuv.h

    r1287 r1289  
    9595  //  Memory management
    9696  // ------------------------------------------------------------------------------------------------
    97 #if SVC_EXTENSION
    98   Void  create      ( Int iPicWidth, Int iPicHeight, ChromaFormat chromaFormatIDC, UInt uiMaxCUWidth, UInt uiMaxCUHeight, UInt uiMaxCUDepth, const Window* conformanceWindow = NULL);
    99 #else
     97
    10098  Void          create            (const Int iPicWidth,
    10199                                   const Int iPicHeight,
    102100                                   const ChromaFormat chromaFormatIDC,
    103                                    const UInt uiMaxCUWidth,
    104                                    const UInt uiMaxCUHeight,
    105                                    const UInt uiMaxCUDepth );
     101                                   const UInt uiMaxCUWidth,  ///< used for generating offsets to CUs. Can use iPicWidth if no offsets are required
     102                                   const UInt uiMaxCUHeight, ///< used for generating offsets to CUs. Can use iPicHeight if no offsets are required
     103                                   const UInt uiMaxCUDepth,  ///< used for generating offsets to CUs. Can use 0 if no offsets are required
     104#if SVC_EXTENSION
     105                                   const Bool bUseMargin,    ///< if true, then a margin of uiMaxCUWidth+16 and uiMaxCUHeight+16 is created around the image.
     106                                   const Window* conformanceWindow = NULL);
     107#else
     108                                   const Bool bUseMargin);   ///< if true, then a margin of uiMaxCUWidth+16 and uiMaxCUHeight+16 is created around the image.
    106109#endif
    107110 
  • branches/SHM-dev/source/Lib/TLibCommon/TComRom.cpp

    r1287 r1289  
    249249// ====================================================================================================================
    250250
    251 UInt g_uiMaxCUWidth  = MAX_CU_SIZE;
    252 UInt g_uiMaxCUHeight = MAX_CU_SIZE;
    253251UInt g_uiMaxCUDepth  = MAX_CU_DEPTH;
    254252UInt g_uiAddCUDepth  = 0;
  • branches/SHM-dev/source/Lib/TLibCommon/TComRom.h

    r1287 r1289  
    8686
    8787// global variable (CTU width/height, max. CU depth)
    88 extern       UInt g_uiMaxCUWidth;
    89 extern       UInt g_uiMaxCUHeight;
    9088extern       UInt g_uiMaxCUDepth;
    9189extern       UInt g_uiAddCUDepth;
  • branches/SHM-dev/source/Lib/TLibCommon/TComSampleAdaptiveOffset.cpp

    r1287 r1289  
    145145  {
    146146    m_tempPicYuv = new TComPicYuv;
    147     m_tempPicYuv->create( m_picWidth, m_picHeight, m_chromaFormatIDC, m_maxCUWidth, m_maxCUHeight, maxCUDepth );
     147    m_tempPicYuv->create( m_picWidth, m_picHeight, m_chromaFormatIDC, m_maxCUWidth, m_maxCUHeight, maxCUDepth, true );
    148148  }
    149149
     
    729729  const Pel *piPcm = pcCU->getPCMSample(compID) + uiOffset;
    730730  const UInt uiStride  = pcPicYuvRec->getStride(compID);
    731   const UInt uiWidth  = ((g_uiMaxCUWidth >> uiDepth) >> csx);
    732   const UInt uiHeight = ((g_uiMaxCUWidth >> uiDepth) >> csy);
     731  const TComSPS &sps = *(pcCU->getSlice()->getSPS());
     732  const UInt uiWidth  = ((sps.getMaxCUWidth()  >> uiDepth) >> csx);
     733  const UInt uiHeight = ((sps.getMaxCUHeight() >> uiDepth) >> csy);
    733734
    734735  if ( pcCU->isLosslessCoded(uiAbsZorderIdx) && !pcCU->getIPCMFlag(uiAbsZorderIdx) )
     
    741742    uiPcmLeftShiftBit = pcCU->getSlice()->getBitDepth(toChannelType(compID)) - pcCU->getSlice()->getSPS()->getPCMBitDepth(toChannelType(compID));
    742743#else
    743     uiPcmLeftShiftBit = pcCU->getSlice()->getSPS()->getBitDepth(toChannelType(compID)) - pcCU->getSlice()->getSPS()->getPCMBitDepth(toChannelType(compID));
     744    uiPcmLeftShiftBit = sps.getBitDepth(toChannelType(compID)) - sps.getPCMBitDepth(toChannelType(compID));
    744745#endif
    745746  }
  • branches/SHM-dev/source/Lib/TLibCommon/TComSlice.cpp

    r1287 r1289  
    37903790        }
    37913791
    3792         pcIlpPic[refLayerIdc]->copyUpsampledMvField( refLayerIdc, m_pcBaseColPic[refLayerIdc] );
     3792        pcIlpPic[refLayerIdc]->copyUpsampledMvField(refLayerIdc);
    37933793      }
    37943794      else
  • branches/SHM-dev/source/Lib/TLibDecoder/TDecCu.cpp

    r1287 r1289  
    204204
    205205//! decode CU block recursively
    206 Void TDecCu::xDecodeCU( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, Bool &isLastCtuOfSliceSegment)
    207 {
    208   TComPic* pcPic = pcCU->getPic();
     206Void TDecCu::xDecodeCU( TComDataCU*const pcCU, const UInt uiAbsPartIdx, const UInt uiDepth, Bool &isLastCtuOfSliceSegment)
     207{
     208  TComPic* pcPic        = pcCU->getPic();
     209  const TComSPS &sps    = pcPic->getPicSym()->getSPS();
     210  const TComPPS &pps    = pcPic->getPicSym()->getPPS();
     211  const UInt maxCuWidth = sps.getMaxCUWidth();
     212  const UInt maxCuHeight= sps.getMaxCUHeight();
    209213  UInt uiCurNumParts    = pcPic->getNumPartitionsInCtu() >> (uiDepth<<1);
    210214  UInt uiQNumParts      = uiCurNumParts>>2;
    211215
     216
    212217  Bool bBoundary = false;
    213218  UInt uiLPelX   = pcCU->getCUPelX() + g_auiRasterToPelX[ g_auiZscanToRaster[uiAbsPartIdx] ];
    214   UInt uiRPelX   = uiLPelX + (g_uiMaxCUWidth>>uiDepth)  - 1;
     219  UInt uiRPelX   = uiLPelX + (maxCuWidth>>uiDepth)  - 1;
    215220  UInt uiTPelY   = pcCU->getCUPelY() + g_auiRasterToPelY[ g_auiZscanToRaster[uiAbsPartIdx] ];
    216   UInt uiBPelY   = uiTPelY + (g_uiMaxCUHeight>>uiDepth) - 1;
    217 
    218   TComSlice * pcSlice = pcCU->getPic()->getSlice(pcCU->getPic()->getCurrSliceIdx());
    219 
    220 #if SVC_EXTENSION
     221  UInt uiBPelY   = uiTPelY + (maxCuHeight>>uiDepth) - 1;
     222
     223#if SVC_EXTENSION
     224  TComSlice * pcSlice = pcPic->getSlice(pcPic->getCurrSliceIdx());
     225
    221226  if( ( uiRPelX < pcSlice->getPicWidthInLumaSamples() ) && ( uiBPelY < pcSlice->getPicHeightInLumaSamples() ) )
    222227#else
    223   if( ( uiRPelX < pcSlice->getSPS()->getPicWidthInLumaSamples() ) && ( uiBPelY < pcSlice->getSPS()->getPicHeightInLumaSamples() ) )
     228  if( ( uiRPelX < sps.getPicWidthInLumaSamples() ) && ( uiBPelY < sps.getPicHeightInLumaSamples() ) )
    224229#endif
    225230  {
     
    234239  {
    235240    UInt uiIdx = uiAbsPartIdx;
    236     if( (g_uiMaxCUWidth>>uiDepth) == (g_uiMaxCUWidth >> ( pcCU->getSlice()->getPPS()->getMaxCuDQPDepth())) && pcCU->getSlice()->getPPS()->getUseDQP())
     241    if( (maxCuWidth>>uiDepth) == (maxCuWidth >> ( pps.getMaxCuDQPDepth())) && pps.getUseDQP()) // TODO: tidy expression
    237242    {
    238243      setdQPFlag(true);
     
    240245    }
    241246
    242     if( (g_uiMaxCUWidth>>uiDepth) == (g_uiMaxCUWidth >> ( pcCU->getSlice()->getPPS()->getMaxCuChromaQpAdjDepth())) && pcCU->getSlice()->getUseChromaQpAdj() )
     247    if( (maxCuWidth>>uiDepth) == (maxCuWidth >> ( pps.getMaxCuChromaQpAdjDepth())) && pcCU->getSlice()->getUseChromaQpAdj() ) // TODO: tidy expression
    243248    {
    244249      setIsChromaQpAdjCoded(true);
     
    253258      if ( !isLastCtuOfSliceSegment && ( uiLPelX < pcCU->getSlice()->getPicWidthInLumaSamples() ) && ( uiTPelY < pcCU->getSlice()->getPicHeightInLumaSamples() ) )
    254259#else
    255       if ( !isLastCtuOfSliceSegment && ( uiLPelX < pcCU->getSlice()->getSPS()->getPicWidthInLumaSamples() ) && ( uiTPelY < pcCU->getSlice()->getSPS()->getPicHeightInLumaSamples() ) )
     260      if ( !isLastCtuOfSliceSegment && ( uiLPelX < sps.getPicWidthInLumaSamples() ) && ( uiTPelY < sps.getPicHeightInLumaSamples() ) )
    256261#endif
    257262      {
     
    265270      uiIdx += uiQNumParts;
    266271    }
    267     if( (g_uiMaxCUWidth>>uiDepth) == (g_uiMaxCUWidth >> ( pcCU->getSlice()->getPPS()->getMaxCuDQPDepth())) && pcCU->getSlice()->getPPS()->getUseDQP())
     272    if( (maxCuWidth>>uiDepth) == (maxCuWidth >> ( pps.getMaxCuDQPDepth())) && pps.getUseDQP()) // TODO: tidy expression
    268273    {
    269274      if ( getdQPFlag() )
     
    276281  }
    277282
    278   if( (g_uiMaxCUWidth>>uiDepth) >= (g_uiMaxCUWidth >> ( pcCU->getSlice()->getPPS()->getMaxCuDQPDepth())) && pcCU->getSlice()->getPPS()->getUseDQP())
     283  if( (maxCuWidth>>uiDepth) >= (maxCuWidth >> ( pps.getMaxCuDQPDepth())) && pps.getUseDQP()) // TODO: tidy expression
    279284  {
    280285    setdQPFlag(true);
     
    282287  }
    283288
    284   if( (g_uiMaxCUWidth>>uiDepth) >= (g_uiMaxCUWidth >> ( pcCU->getSlice()->getPPS()->getMaxCuChromaQpAdjDepth())) && pcCU->getSlice()->getUseChromaQpAdj() )
     289  if( (maxCuWidth>>uiDepth) >= (maxCuWidth >> ( pps.getMaxCuChromaQpAdjDepth())) && pcCU->getSlice()->getUseChromaQpAdj() ) // TODO: tidy expression
    285290  {
    286291    setIsChromaQpAdjCoded(true);
    287292  }
    288293
    289   if (pcCU->getSlice()->getPPS()->getTransquantBypassEnableFlag())
     294  if (pps.getTransquantBypassEnableFlag())
    290295  {
    291296    m_pcEntropyDecoder->decodeCUTransquantBypassFlag( pcCU, uiAbsPartIdx, uiDepth );
     
    393398{
    394399  TComPic* pcPic = pCtu->getPic();
     400  TComSlice * pcSlice = pCtu->getSlice();
     401  const TComSPS &sps=*(pcSlice->getSPS());
    395402
    396403  Bool bBoundary = false;
    397404  UInt uiLPelX   = pCtu->getCUPelX() + g_auiRasterToPelX[ g_auiZscanToRaster[uiAbsPartIdx] ];
    398   UInt uiRPelX   = uiLPelX + (g_uiMaxCUWidth>>uiDepth)  - 1;
     405  UInt uiRPelX   = uiLPelX + (sps.getMaxCUWidth()>>uiDepth)  - 1;
    399406  UInt uiTPelY   = pCtu->getCUPelY() + g_auiRasterToPelY[ g_auiZscanToRaster[uiAbsPartIdx] ];
    400   UInt uiBPelY   = uiTPelY + (g_uiMaxCUHeight>>uiDepth) - 1;
    401 
    402   TComSlice * pcSlice = pCtu->getPic()->getSlice(pCtu->getPic()->getCurrSliceIdx());
     407  UInt uiBPelY   = uiTPelY + (sps.getMaxCUHeight()>>uiDepth) - 1;
    403408
    404409#if SVC_EXTENSION
    405410  if( ( uiRPelX >= pcSlice->getPicWidthInLumaSamples() ) || ( uiBPelY >= pcSlice->getPicHeightInLumaSamples() ) )
    406411#else
    407   if( ( uiRPelX >= pcSlice->getSPS()->getPicWidthInLumaSamples() ) || ( uiBPelY >= pcSlice->getSPS()->getPicHeightInLumaSamples() ) )
     412  if( ( uiRPelX >= sps.getPicWidthInLumaSamples() ) || ( uiBPelY >= sps.getPicHeightInLumaSamples() ) )
    408413#endif
    409414  {
     
    424429      if( ( uiLPelX < pcSlice->getPicWidthInLumaSamples() ) && ( uiTPelY < pcSlice->getPicHeightInLumaSamples() ) )
    425430#else
    426       if( ( uiLPelX < pcSlice->getSPS()->getPicWidthInLumaSamples() ) && ( uiTPelY < pcSlice->getSPS()->getPicHeightInLumaSamples() ) )
     431      if( ( uiLPelX < sps.getPicWidthInLumaSamples() ) && ( uiTPelY < sps.getPicHeightInLumaSamples() ) )
    427432#endif
    428433      {
     
    534539
    535540  TComDataCU *pcCU = rTu.getCU();
     541  const TComSPS &sps=*(pcCU->getSlice()->getSPS());
    536542  const UInt uiAbsPartIdx=rTu.GetAbsPartIdxTU();
    537543
     
    649655  const Int clipbd = pcCU->getSlice()->getBitDepth(toChannelType(compID));
    650656#else
    651   const Int clipbd = pcCU->getSlice()->getSPS()->getBitDepth(toChannelType(compID));
     657  const Int clipbd = sps.getBitDepth(toChannelType(compID));
    652658#endif
    653659#if O0043_BEST_EFFORT_DECODING
    654   const Int bitDepthDelta = pcCU->getSlice()->getSPS()->getStreamBitDepth(toChannelType(compID)) - clipbd;
     660  const Int bitDepthDelta = sps.getStreamBitDepth(toChannelType(compID)) - clipbd;
    655661#endif
    656662
     
    836842  const UInt uiPcmLeftShiftBit = pcCU->getSlice()->getBitDepth(toChannelType(compID)) - pcCU->getSlice()->getSPS()->getPCMBitDepth(toChannelType(compID));
    837843#else
    838   const UInt uiPcmLeftShiftBit = pcCU->getSlice()->getSPS()->getBitDepth(toChannelType(compID)) - pcCU->getSlice()->getSPS()->getPCMBitDepth(toChannelType(compID));
     844  const TComSPS &sps           = *(pcCU->getSlice()->getSPS());
     845  const UInt uiPcmLeftShiftBit = sps.getBitDepth(toChannelType(compID)) - sps.getPCMBitDepth(toChannelType(compID));
    839846#endif
    840847
     
    859866Void TDecCu::xReconPCM( TComDataCU* pcCU, UInt uiDepth )
    860867{
     868  const UInt maxCuWidth     = pcCU->getSlice()->getSPS()->getMaxCUWidth();
     869  const UInt maxCuHeight    = pcCU->getSlice()->getSPS()->getMaxCUHeight();
    861870  for (UInt ch=0; ch < pcCU->getPic()->getNumberValidComponents(); ch++)
    862871  {
    863872    const ComponentID compID = ComponentID(ch);
    864     const UInt width  = (g_uiMaxCUWidth >>(uiDepth+m_ppcYuvResi[uiDepth]->getComponentScaleX(compID)));
    865     const UInt height = (g_uiMaxCUHeight>>(uiDepth+m_ppcYuvResi[uiDepth]->getComponentScaleY(compID)));
     873    const UInt width  = (maxCuWidth >>(uiDepth+m_ppcYuvResi[uiDepth]->getComponentScaleX(compID)));
     874    const UInt height = (maxCuHeight>>(uiDepth+m_ppcYuvResi[uiDepth]->getComponentScaleY(compID)));
    866875    const UInt stride = m_ppcYuvResi[uiDepth]->getStride(compID);
    867876    Pel * pPCMChannel = pcCU->getPCMSample(compID);
     
    878887{
    879888  const ChromaFormat format = pCU->getPic()->getChromaFormat();
    880   const UInt numValidComp=getNumberValidComponents(format);
     889  const UInt numValidComp   = getNumberValidComponents(format);
     890  const UInt maxCuWidth     = pCU->getSlice()->getSPS()->getMaxCUWidth();
     891  const UInt maxCuHeight    = pCU->getSlice()->getSPS()->getMaxCUHeight();
    881892
    882893  for (UInt componentIndex = 0; componentIndex < numValidComp; componentIndex++)
     
    884895    const ComponentID component = ComponentID(componentIndex);
    885896
    886     const UInt width  = g_uiMaxCUWidth  >> (depth + getComponentScaleX(component, format));
    887     const UInt height = g_uiMaxCUHeight >> (depth + getComponentScaleY(component, format));
     897    const UInt width  = maxCuWidth  >> (depth + getComponentScaleX(component, format));
     898    const UInt height = maxCuHeight >> (depth + getComponentScaleY(component, format));
    888899
    889900    Pel *source      = m_ppcYuvReco[depth]->getAddr(component, 0, width);
  • branches/SHM-dev/source/Lib/TLibDecoder/TDecCu.h

    r1263 r1289  
    106106protected:
    107107
    108   Void xDecodeCU                ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, Bool &isLastCtuOfSliceSegment);
     108  Void xDecodeCU                ( TComDataCU* const pcCU, const UInt uiAbsPartIdx, const UInt uiDepth, Bool &isLastCtuOfSliceSegment);
    109109  Void xFinishDecodeCU          ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, Bool &isLastCtuOfSliceSegment);
    110110  Bool xDecodeSliceEnd          ( TComDataCU* pcCU, UInt uiAbsPartIdx );
  • branches/SHM-dev/source/Lib/TLibDecoder/TDecSbac.cpp

    r1287 r1289  
    371371  {
    372372    Bool bIpcmFlag = true;
     373    const TComSPS &sps=*(pcCU->getSlice()->getSPS());
    373374
    374375    pcCU->setPartSizeSubParts  ( SIZE_2Nx2N, uiAbsPartIdx, uiDepth );
    375     pcCU->setSizeSubParts      ( g_uiMaxCUWidth>>uiDepth, g_uiMaxCUHeight>>uiDepth, uiAbsPartIdx, uiDepth );
     376    pcCU->setSizeSubParts      ( sps.getMaxCUWidth()>>uiDepth, sps.getMaxCUHeight()>>uiDepth, uiAbsPartIdx, uiDepth );
    376377    pcCU->setTrIdxSubParts     ( 0, uiAbsPartIdx, uiDepth );
    377378    pcCU->setIPCMFlagSubParts  ( bIpcmFlag, uiAbsPartIdx, uiDepth );
     
    439440    pcCU->setPredModeSubParts( MODE_INTER,  uiAbsPartIdx, uiDepth );
    440441    pcCU->setPartSizeSubParts( SIZE_2Nx2N, uiAbsPartIdx, uiDepth );
    441     pcCU->setSizeSubParts( g_uiMaxCUWidth>>uiDepth, g_uiMaxCUHeight>>uiDepth, uiAbsPartIdx, uiDepth );
     442    pcCU->setSizeSubParts( pcCU->getSlice()->getSPS()->getMaxCUWidth()>>uiDepth, pcCU->getSlice()->getSPS()->getMaxCUHeight()>>uiDepth, uiAbsPartIdx, uiDepth );
    442443    pcCU->setMergeFlagSubParts( true , uiAbsPartIdx, 0, uiDepth );
    443444  }
     
    515516  }
    516517#if RExt__DECODER_DEBUG_BIT_STATISTICS
    517   const TComCodingStatisticsClassType ctype(STATS__CABAC_BITS__SPLIT_FLAG, g_aucConvertToBit[g_uiMaxCUWidth>>uiDepth]+2);
     518  const TComCodingStatisticsClassType ctype(STATS__CABAC_BITS__SPLIT_FLAG, g_aucConvertToBit[pcCU->getSlice()->getSPS()->getMaxCUWidth()>>uiDepth]+2);
    518519#endif
    519520
     
    537538  UInt uiSymbol, uiMode = 0;
    538539  PartSize eMode;
     540  const UChar cuWidth =UChar(pcCU->getSlice()->getSPS()->getMaxCUWidth()>>uiDepth);
     541  const UChar cuHeight=UChar(pcCU->getSlice()->getSPS()->getMaxCUHeight()>>uiDepth);
    539542
    540543#if RExt__DECODER_DEBUG_BIT_STATISTICS
    541   const TComCodingStatisticsClassType ctype(STATS__CABAC_BITS__PART_SIZE, g_aucConvertToBit[g_uiMaxCUWidth>>uiDepth]+2);
     544  const TComCodingStatisticsClassType ctype(STATS__CABAC_BITS__PART_SIZE, g_aucConvertToBit[cuWidth]+2);
    542545#endif
    543546
     
    567570    UInt uiMaxNumBits = 2;
    568571
    569     if( uiDepth == g_uiMaxCUDepth - g_uiAddCUDepth && !( (g_uiMaxCUWidth>>uiDepth) == 8 && (g_uiMaxCUHeight>>uiDepth) == 8 ) )
     572    if( uiDepth == g_uiMaxCUDepth - g_uiAddCUDepth && !( cuWidth == 8 && cuHeight == 8 ) )
    570573    {
    571574      uiMaxNumBits ++;
     
    605608  }
    606609  pcCU->setPartSizeSubParts( eMode, uiAbsPartIdx, uiDepth );
    607   pcCU->setSizeSubParts( g_uiMaxCUWidth>>uiDepth, g_uiMaxCUHeight>>uiDepth, uiAbsPartIdx, uiDepth );
     610  pcCU->setSizeSubParts( cuWidth, cuHeight, uiAbsPartIdx, uiDepth );
    608611}
    609612
     
    643646  }
    644647#if RExt__DECODER_DEBUG_BIT_STATISTICS
    645   const TComCodingStatisticsClassType ctype(STATS__CABAC_BITS__INTRA_DIR_ANG, g_aucConvertToBit[g_uiMaxCUWidth>>depth]+2, CHANNEL_TYPE_LUMA);
     648  const TComCodingStatisticsClassType ctype(STATS__CABAC_BITS__INTRA_DIR_ANG, g_aucConvertToBit[pcCU->getSlice()->getSPS()->getMaxCUWidth()>>depth]+2, CHANNEL_TYPE_LUMA);
    646649#endif
    647650  for (j=0;j<partNum;j++)
     
    696699  UInt uiSymbol;
    697700#if RExt__DECODER_DEBUG_BIT_STATISTICS
    698   const TComCodingStatisticsClassType ctype(STATS__CABAC_BITS__INTRA_DIR_ANG, g_aucConvertToBit[g_uiMaxCUWidth>>uiDepth]+2, CHANNEL_TYPE_CHROMA);
     701  const TComCodingStatisticsClassType ctype(STATS__CABAC_BITS__INTRA_DIR_ANG, g_aucConvertToBit[pcCU->getSlice()->getSPS()->getMaxCUWidth()>>uiDepth]+2, CHANNEL_TYPE_CHROMA);
    699702#endif
    700703
     
    975978  UInt symbol;
    976979#if RExt__DECODER_DEBUG_BIT_STATISTICS
    977   const TComCodingStatisticsClassType ctype(STATS__CABAC_BITS__CHROMA_QP_ADJUSTMENT, g_aucConvertToBit[g_uiMaxCUWidth>>depth]+2, CHANNEL_TYPE_CHROMA);
     980  const TComCodingStatisticsClassType ctype(STATS__CABAC_BITS__CHROMA_QP_ADJUSTMENT, g_aucConvertToBit[cu->getSlice()->getSPS()->getMaxCUWidth()>>depth]+2, CHANNEL_TYPE_CHROMA);
    978981#endif
    979982
     
    18691872
    18701873#if RExt__DECODER_DEBUG_BIT_STATISTICS
    1871   const TComCodingStatisticsClassType ctype(STATS__EXPLICIT_RDPCM_BITS, g_aucConvertToBit[g_uiMaxCUWidth>>rTu.GetTransformDepthTotal()]+2);
     1874  const TComCodingStatisticsClassType ctype(STATS__EXPLICIT_RDPCM_BITS, g_aucConvertToBit[cu->getSlice()->getSPS()->getMaxCUWidth()>>rTu.GetTransformDepthTotal()]+2);
    18721875#endif
    18731876
  • branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.cpp

    r1288 r1289  
    254254    }
    255255
    256     rpcPic->create( vps, sps, pps, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, true, m_layerId);
     256    rpcPic->create( vps, sps, pps, g_uiMaxCUDepth, true, m_layerId);
    257257#else //SVC_EXTENSION
    258     rpcPic->create ( sps, pps, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, true);
     258    rpcPic->create ( sps, pps, g_uiMaxCUDepth, true);
    259259#endif //SVC_EXTENSION
    260260   
     
    303303  }
    304304
    305   rpcPic->create( vps, sps, pps, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, true, m_layerId);
     305  rpcPic->create( vps, sps, pps, g_uiMaxCUDepth, true, m_layerId);
    306306#else  //SVC_EXTENSION
    307   rpcPic->create ( sps, pps, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, true);
     307  rpcPic->create ( sps, pps, g_uiMaxCUDepth, true);
    308308#endif //SVC_EXTENSION
    309309}
     
    493493        UInt refLayerId = 0;
    494494
    495         pBLPic->create( *vps, *sps, *pps, sps->getMaxCUWidth(), sps->getMaxCUHeight(), sps->getMaxCUDepth(), true, refLayerId);
     495        pBLPic->create( *vps, *sps, *pps, sps->getMaxCUDepth(), true, refLayerId);
    496496
    497497        // it is needed where the VPS is accessed through the slice
     
    572572
    573573    // TODO: remove the use of the following globals:
    574     g_uiMaxCUWidth  = sps->getMaxCUWidth();
    575     g_uiMaxCUHeight = sps->getMaxCUHeight();
    576574    g_uiMaxCUDepth  = sps->getMaxCUDepth();
    577575#if SVC_EXTENSION
     
    613611    m_cLoopFilter.create( sps->getMaxCUDepth() );
    614612    m_cPrediction.initTempBuff(sps->getChromaFormatIdc());
     613
    615614
    616615    Bool isField = false;
     
    702701
    703702    // Check if any new SEI has arrived
    704     if(!m_SEIs.empty())
    705     {
    706       // Currently only decoding Unit SEI message occurring between VCL NALUs copied
    707       SEIMessages &picSEI = m_pcPic->getSEIs();
    708       SEIMessages decodingUnitInfos = extractSeisByType (m_SEIs, SEI::DECODING_UNIT_INFO);
    709       picSEI.insert(picSEI.end(), decodingUnitInfos.begin(), decodingUnitInfos.end());
    710       deleteSEIs(m_SEIs);
    711     }
     703     if(!m_SEIs.empty())
     704     {
     705       // Currently only decoding Unit SEI message occurring between VCL NALUs copied
     706       SEIMessages &picSEI = m_pcPic->getSEIs();
     707       SEIMessages decodingUnitInfos = extractSeisByType (m_SEIs, SEI::DECODING_UNIT_INFO);
     708       picSEI.insert(picSEI.end(), decodingUnitInfos.begin(), decodingUnitInfos.end());
     709       deleteSEIs(m_SEIs);
     710     }
    712711  }
    713712
     
    21992198  if( m_layerId > 0 )
    22002199  {
    2201     g_uiMaxCUWidth  = sps->getMaxCUWidth();
    2202     g_uiMaxCUHeight = sps->getMaxCUHeight();
    22032200    g_uiMaxCUDepth  = sps->getMaxCUDepth();
    22042201    g_uiAddCUDepth  = max (0, sps->getLog2MinCodingBlockSize() - (Int)sps->getQuadtreeTULog2MinSize() );
     
    22102207        m_cIlpPic[j] = new  TComPic;
    22112208
    2212         m_cIlpPic[j]->create(*vps, *sps, *slice->getPPS(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, true, m_layerId);
     2209        m_cIlpPic[j]->create(*vps, *sps, *slice->getPPS(), g_uiMaxCUDepth, true, m_layerId);
    22132210
    22142211        for (Int i=0; i<m_cIlpPic[j]->getPicSym()->getNumberOfCtusInFrame(); i++)
     
    23892386      Int picHeight   = pcSlice->getPicHeightInLumaSamples();
    23902387      m_pColorMappedPic = new TComPicYuv;
    2391       m_pColorMappedPic->create( picWidth, picHeight, pcSlice->getChromaFormatIdc()/*CHROMA_420*/, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, NULL );
     2388      m_pColorMappedPic->create( picWidth, picHeight, pcSlice->getChromaFormatIdc()/*CHROMA_420*/, pcSlice->getSPS()->getMaxCUWidth(), pcSlice->getSPS()->getMaxCUHeight(), g_uiMaxCUDepth, true, NULL );
    23922389    }
    23932390  }
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncCfg.h

    r1287 r1289  
    145145
    146146  Int       m_maxTempLayer;                      ///< Max temporal layer
    147   Bool m_useAMP;
     147  Bool      m_useAMP;
     148  UInt      m_maxCUWidth;
     149  UInt      m_maxCUHeight;
    148150  //======= Transform =============
    149151  UInt      m_uiQuadtreeTULog2MaxSize;
     
    511513  Int       getMaxTempLayer                 ()                              { return m_maxTempLayer;              }
    512514  Void      setMaxTempLayer                 ( Int maxTempLayer )            { m_maxTempLayer = maxTempLayer;      }
     515  Void      setMaxCUWidth                   ( UInt  u )      { m_maxCUWidth  = u; }
     516  Void      setMaxCUHeight                  ( UInt  u )      { m_maxCUHeight = u; }
     517
    513518  //======== Transform =============
    514519  Void      setQuadtreeTULog2MaxSize        ( UInt  u )      { m_uiQuadtreeTULog2MaxSize = u; }
     
    970975  Void  setTMVPConstraintsSEIEnabled(Int b)                  { m_TMVPConstraintsSEIEnabled = b; }
    971976  Int   getTMVPConstraintsSEIEnabled()                       {  return m_TMVPConstraintsSEIEnabled; }
    972 
    973977#endif
    974978#if P0123_ALPHA_CHANNEL_SEI
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncCu.cpp

    r1287 r1289  
    372372  TComPic* pcPic = rpcBestCU->getPic();
    373373  DEBUG_STRING_NEW(sDebug)
     374  const TComPPS &pps=*(rpcTempCU->getSlice()->getPPS());
     375  const TComSPS &sps=*(rpcTempCU->getSlice()->getSPS());
     376  const UInt maxCUWidth = sps.getMaxCUWidth();
    374377
    375378  // get Original YUV data from picture
     
    396399  const UInt numberValidComponents = rpcBestCU->getPic()->getNumberValidComponents();
    397400
    398   if( (g_uiMaxCUWidth>>uiDepth) >= (g_uiMaxCUWidth >> ( rpcTempCU->getSlice()->getPPS()->getMaxCuDQPDepth())) )
     401  if( (maxCUWidth>>uiDepth) >= (maxCUWidth >> ( pps.getMaxCuDQPDepth())) ) // TODO: tidy expression
    399402  {
    400403    Int idQP = m_pcEncCfg->getMaxDeltaQP();
     
    403406    iMaxQP = Clip3( -rpcTempCU->getSlice()->getQpBDOffset(CHANNEL_TYPE_LUMA), MAX_QP, iBaseQP+idQP );
    404407#else
    405     iMinQP = Clip3( -rpcTempCU->getSlice()->getSPS()->getQpBDOffset(CHANNEL_TYPE_LUMA), MAX_QP, iBaseQP-idQP );
    406     iMaxQP = Clip3( -rpcTempCU->getSlice()->getSPS()->getQpBDOffset(CHANNEL_TYPE_LUMA), MAX_QP, iBaseQP+idQP );
     408    iMinQP = Clip3( -sps.getQpBDOffset(CHANNEL_TYPE_LUMA), MAX_QP, iBaseQP-idQP );
     409    iMaxQP = Clip3( -sps.getQpBDOffset(CHANNEL_TYPE_LUMA), MAX_QP, iBaseQP+idQP );
    407410#endif
    408411  }
     
    423426  const Int lowestQP = iMinQP; // For TQB, use this QP which is the lowest non TQB QP tested (rather than QP'=0) - that way delta QPs are smaller, and TQB can be tested at all CU levels.
    424427
    425   if ( (rpcTempCU->getSlice()->getPPS()->getTransquantBypassEnableFlag()) )
     428  if ( (pps.getTransquantBypassEnableFlag()) )
    426429  {
    427430    isAddLowestQP = true; // mark that the first iteration is to cost TQB mode.
     
    439442       ( uiBPelY < rpcBestCU->getSlice()->getPicHeightInLumaSamples() ) )
    440443#else
    441   if ( ( uiRPelX < rpcBestCU->getSlice()->getSPS()->getPicWidthInLumaSamples() ) &&
    442        ( uiBPelY < rpcBestCU->getSlice()->getSPS()->getPicHeightInLumaSamples() ) )
     444  if ( ( uiRPelX < sps.getPicWidthInLumaSamples() ) &&
     445       ( uiBPelY < sps.getPicHeightInLumaSamples() ) )
    443446#endif
    444447  {
     
    492495         * block position
    493496         */
    494         Int lgMinCuSize = pcSlice->getSPS()->getLog2MinCodingBlockSize() +
    495                           std::max<Int>(0, pcSlice->getSPS()->getLog2DiffMaxMinCodingBlockSize()-Int(pcSlice->getPPS()->getMaxCuChromaQpAdjDepth()));
    496         m_ChromaQpAdjIdc = ((uiLPelX >> lgMinCuSize) + (uiTPelY >> lgMinCuSize)) % (pcSlice->getPPS()->getChromaQpAdjTableSize() + 1);
     497        Int lgMinCuSize = sps.getLog2MinCodingBlockSize() +
     498                          std::max<Int>(0, sps.getLog2DiffMaxMinCodingBlockSize()-Int(pps.getMaxCuChromaQpAdjDepth()));
     499        m_ChromaQpAdjIdc = ((uiLPelX >> lgMinCuSize) + (uiTPelY >> lgMinCuSize)) % (pps.getChromaQpAdjTableSize() + 1);
    497500      }
    498501
     
    591594
    592595          //! Try AMP (SIZE_2NxnU, SIZE_2NxnD, SIZE_nLx2N, SIZE_nRx2N)
    593           if(pcSlice->getSPS()->getUseAMP() && uiDepth < g_uiMaxCUDepth-g_uiAddCUDepth )
     596          if(sps.getUseAMP() && uiDepth < g_uiMaxCUDepth-g_uiAddCUDepth )
    594597          {
    595598#if AMP_ENC_SPEEDUP
     
    720723          if( uiDepth == g_uiMaxCUDepth - g_uiAddCUDepth )
    721724          {
    722             if( rpcTempCU->getWidth(0) > ( 1 << rpcTempCU->getSlice()->getSPS()->getQuadtreeTULog2MinSize() ) )
     725            if( rpcTempCU->getWidth(0) > ( 1 << sps.getQuadtreeTULog2MinSize() ) )
    723726            {
    724727              Double tmpIntraCost;
     
    731734
    732735        // test PCM
    733         if(pcPic->getSlice(0)->getSPS()->getUsePCM()
    734           && rpcTempCU->getWidth(0) <= (1<<pcPic->getSlice(0)->getSPS()->getPCMLog2MaxSize())
    735           && rpcTempCU->getWidth(0) >= (1<<pcPic->getSlice(0)->getSPS()->getPCMLog2MinSize()) )
     736        if(sps.getUsePCM()
     737          && rpcTempCU->getWidth(0) <= (1<<sps.getPCMLog2MaxSize())
     738          && rpcTempCU->getWidth(0) >= (1<<sps.getPCMLog2MinSize()) )
    736739        {
    737740#if SVC_EXTENSION
    738741          UInt uiRawBits = getTotalBits(rpcBestCU->getWidth(0), rpcBestCU->getHeight(0), rpcBestCU->getPic()->getChromaFormat(), pcPic->getSlice(0)->getBitDepths().recon);
    739742#else
    740           UInt uiRawBits = getTotalBits(rpcBestCU->getWidth(0), rpcBestCU->getHeight(0), rpcBestCU->getPic()->getChromaFormat(), pcPic->getSlice(0)->getSPS()->getBitDepths().recon);
     743          UInt uiRawBits = getTotalBits(rpcBestCU->getWidth(0), rpcBestCU->getHeight(0), rpcBestCU->getPic()->getChromaFormat(), sps.getBitDepths().recon);
    741744#endif
    742745          UInt uiBestBits = rpcBestCU->getTotalBits();
     
    799802  }
    800803
    801   if( (g_uiMaxCUWidth>>uiDepth) == (g_uiMaxCUWidth >> ( rpcTempCU->getSlice()->getPPS()->getMaxCuDQPDepth())) )
     804  if( (maxCUWidth>>uiDepth) == (maxCUWidth >> ( pps.getMaxCuDQPDepth())) ) // TODO: tidy expression
    802805  {
    803806    Int idQP = m_pcEncCfg->getMaxDeltaQP();
     
    806809    iMaxQP = Clip3( -rpcTempCU->getSlice()->getQpBDOffset(CHANNEL_TYPE_LUMA), MAX_QP, iBaseQP+idQP );
    807810#else
    808     iMinQP = Clip3( -rpcTempCU->getSlice()->getSPS()->getQpBDOffset(CHANNEL_TYPE_LUMA), MAX_QP, iBaseQP-idQP );
    809     iMaxQP = Clip3( -rpcTempCU->getSlice()->getSPS()->getQpBDOffset(CHANNEL_TYPE_LUMA), MAX_QP, iBaseQP+idQP );
     811    iMinQP = Clip3( -sps.getQpBDOffset(CHANNEL_TYPE_LUMA), MAX_QP, iBaseQP-idQP );
     812    iMaxQP = Clip3( -sps.getQpBDOffset(CHANNEL_TYPE_LUMA), MAX_QP, iBaseQP+idQP );
    810813#endif   
    811814  }
    812   else if( (g_uiMaxCUWidth>>uiDepth) > (g_uiMaxCUWidth >> ( rpcTempCU->getSlice()->getPPS()->getMaxCuDQPDepth())) )
     815  else if( (maxCUWidth>>uiDepth) > (maxCUWidth >> ( pps.getMaxCuDQPDepth())) ) // TODO: tidy expression
    813816  {
    814817    iMinQP = iBaseQP;
     
    855858        if( ( pcSubBestPartCU->getCUPelX() < pcSlice->getPicWidthInLumaSamples() ) && ( pcSubBestPartCU->getCUPelY() < pcSlice->getPicHeightInLumaSamples() ) )
    856859#else
    857         if( ( pcSubBestPartCU->getCUPelX() < pcSlice->getSPS()->getPicWidthInLumaSamples() ) && ( pcSubBestPartCU->getCUPelY() < pcSlice->getSPS()->getPicHeightInLumaSamples() ) )
     860        if( ( pcSubBestPartCU->getCUPelX() < sps.getPicWidthInLumaSamples() ) && ( pcSubBestPartCU->getCUPelY() < sps.getPicHeightInLumaSamples() ) )
    858861#endif
    859862        {
     
    903906      rpcTempCU->getTotalCost()  = m_pcRdCost->calcRdCost( rpcTempCU->getTotalBits(), rpcTempCU->getTotalDistortion() );
    904907
    905       if( (g_uiMaxCUWidth>>uiDepth) == (g_uiMaxCUWidth >> ( rpcTempCU->getSlice()->getPPS()->getMaxCuDQPDepth())) && rpcTempCU->getSlice()->getPPS()->getUseDQP())
     908      if( (maxCUWidth>>uiDepth) == (maxCUWidth >> ( pps.getMaxCuDQPDepth())) && pps.getUseDQP()) // TODO: tidy expression
    906909      {
    907910        Bool hasResidual = false;
     
    10451048Void TEncCu::xEncodeCU( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
    10461049{
    1047   TComPic* pcPic = pcCU->getPic();
    1048 
    1049   Bool bBoundary = false;
    1050   UInt uiLPelX   = pcCU->getCUPelX() + g_auiRasterToPelX[ g_auiZscanToRaster[uiAbsPartIdx] ];
    1051   UInt uiRPelX   = uiLPelX + (g_uiMaxCUWidth>>uiDepth)  - 1;
    1052   UInt uiTPelY   = pcCU->getCUPelY() + g_auiRasterToPelY[ g_auiZscanToRaster[uiAbsPartIdx] ];
    1053   UInt uiBPelY   = uiTPelY + (g_uiMaxCUHeight>>uiDepth) - 1;
    1054 
    1055   TComSlice * pcSlice = pcCU->getPic()->getSlice(pcCU->getPic()->getCurrSliceIdx());
     1050        TComPic   *const pcPic   = pcCU->getPic();
     1051        TComSlice *const pcSlice = pcCU->getSlice();
     1052  const TComSPS   &sps =*(pcSlice->getSPS());
     1053  const TComPPS   &pps =*(pcSlice->getPPS());
     1054
     1055  const UInt maxCUWidth  = sps.getMaxCUWidth();
     1056  const UInt maxCUHeight = sps.getMaxCUHeight();
     1057
     1058        Bool bBoundary = false;
     1059        UInt uiLPelX   = pcCU->getCUPelX() + g_auiRasterToPelX[ g_auiZscanToRaster[uiAbsPartIdx] ];
     1060  const UInt uiRPelX   = uiLPelX + (maxCUWidth>>uiDepth)  - 1;
     1061        UInt uiTPelY   = pcCU->getCUPelY() + g_auiRasterToPelY[ g_auiZscanToRaster[uiAbsPartIdx] ];
     1062  const UInt uiBPelY   = uiTPelY + (maxCUHeight>>uiDepth) - 1;
     1063
    10561064#if HIGHER_LAYER_IRAP_SKIP_FLAG
    10571065  if (m_pcEncCfg->getSkipPictureAtArcSwitch() && m_pcEncCfg->getAdaptiveResolutionChange() > 0 && pcSlice->getLayerId() == 1 && pcSlice->getPOC() == m_pcEncCfg->getAdaptiveResolutionChange())
     
    10641072  if( ( uiRPelX < pcSlice->getPicWidthInLumaSamples() ) && ( uiBPelY < pcSlice->getPicHeightInLumaSamples() ) )
    10651073#else
    1066   if( ( uiRPelX < pcSlice->getSPS()->getPicWidthInLumaSamples() ) && ( uiBPelY < pcSlice->getSPS()->getPicHeightInLumaSamples() ) )
     1074  if( ( uiRPelX < sps.getPicWidthInLumaSamples() ) && ( uiBPelY < sps.getPicHeightInLumaSamples() ) )
    10671075#endif
    10681076  {
     
    10771085  {
    10781086    UInt uiQNumParts = ( pcPic->getNumPartitionsInCtu() >> (uiDepth<<1) )>>2;
    1079     if( (g_uiMaxCUWidth>>uiDepth) == (g_uiMaxCUWidth >> ( pcCU->getSlice()->getPPS()->getMaxCuDQPDepth())) && pcCU->getSlice()->getPPS()->getUseDQP())
     1087    if( (maxCUWidth>>uiDepth) == (maxCUWidth >> ( pps.getMaxCuDQPDepth())) && pps.getUseDQP()) // TODO: tidy expression
    10801088    {
    10811089      setdQPFlag(true);
    10821090    }
    10831091
    1084     if( (g_uiMaxCUWidth>>uiDepth) == (g_uiMaxCUWidth >> ( pcCU->getSlice()->getPPS()->getMaxCuChromaQpAdjDepth())) && pcCU->getSlice()->getUseChromaQpAdj())
     1092    if( (maxCUWidth>>uiDepth) == (maxCUWidth >> ( pps.getMaxCuChromaQpAdjDepth())) && pcSlice->getUseChromaQpAdj()) // TODO: tidy expression
    10851093    {
    10861094      setCodeChromaQpAdjFlag(true);
     
    10951103      if( ( uiLPelX < pcSlice->getPicWidthInLumaSamples() ) && ( uiTPelY < pcSlice->getPicHeightInLumaSamples() ) )
    10961104#else
    1097       if( ( uiLPelX < pcSlice->getSPS()->getPicWidthInLumaSamples() ) && ( uiTPelY < pcSlice->getSPS()->getPicHeightInLumaSamples() ) )
     1105      if( ( uiLPelX < sps.getPicWidthInLumaSamples() ) && ( uiTPelY < sps.getPicHeightInLumaSamples() ) )
    10981106#endif
    10991107      {
     
    11041112  }
    11051113
    1106   if( (g_uiMaxCUWidth>>uiDepth) >= (g_uiMaxCUWidth >> ( pcCU->getSlice()->getPPS()->getMaxCuDQPDepth())) && pcCU->getSlice()->getPPS()->getUseDQP())
     1114  if( (maxCUWidth>>uiDepth) >= (maxCUWidth >> ( pps.getMaxCuDQPDepth())) && pps.getUseDQP()) // TODO: tidy expression
    11071115  {
    11081116    setdQPFlag(true);
    11091117  }
    11101118
    1111   if( (g_uiMaxCUWidth>>uiDepth) >= (g_uiMaxCUWidth >> ( pcCU->getSlice()->getPPS()->getMaxCuChromaQpAdjDepth())) && pcCU->getSlice()->getUseChromaQpAdj())
     1119  if( (maxCUWidth>>uiDepth) >= (maxCUWidth >> ( pps.getMaxCuChromaQpAdjDepth())) && pcSlice->getUseChromaQpAdj()) // TODO: tidy expression
    11121120  {
    11131121    setCodeChromaQpAdjFlag(true);
    11141122  }
    11151123
    1116   if (pcCU->getSlice()->getPPS()->getTransquantBypassEnableFlag())
     1124  if (pps.getTransquantBypassEnableFlag())
    11171125  {
    11181126    m_pcEntropyCoder->encodeCUTransquantBypassFlag( pcCU, uiAbsPartIdx );
    11191127  }
    11201128
    1121   if( !pcCU->getSlice()->isIntra() )
     1129  if( !pcSlice->isIntra() )
    11221130  {
    11231131    m_pcEntropyCoder->encodeSkipFlag( pcCU, uiAbsPartIdx );
     
    16391647  UInt uiDepth = pcCU->getDepth( 0 );
    16401648
    1641   if( pcCU->getSlice()->getPPS()->getUseDQP() && (g_uiMaxCUWidth>>uiDepth) >= (g_uiMaxCUWidth >> ( pcCU->getSlice()->getPPS()->getMaxCuDQPDepth())) )
     1649  const TComPPS &pps = *(pcCU->getSlice()->getPPS());
     1650  const TComSPS &sps = *(pcCU->getSlice()->getSPS());
     1651  if ( pps.getUseDQP() && (sps.getMaxCUWidth()>>uiDepth) >= (sps.getMaxCUWidth() >> ( pps.getMaxCuDQPDepth())) ) // TODO: tidy expression
    16421652  {
    16431653    if ( pcCU->getQtRootCbf( 0) )
     
    17551765  TCoeff* pCoeffY = pCtu->getCoeff(COMPONENT_Y);
    17561766  TCoeff* pArlCoeffY = pCtu->getArlCoeff(COMPONENT_Y);
    1757 
    1758   UInt uiMinCUWidth = g_uiMaxCUWidth >> g_uiMaxCUDepth;
     1767  const TComSPS &sps = *(pCtu->getSlice()->getSPS());
     1768
     1769  const UInt uiMinCUWidth = sps.getMaxCUWidth() >> g_uiMaxCUDepth;
    17591770  UInt uiMinNumCoeffInCU = 1 << uiMinCUWidth;
    17601771
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncGOP.cpp

    r1287 r1289  
    210210    m_Enc3DAsymLUTPicUpdate.create( m_pcCfg->getCGSMaxOctantDepth() , prevBitDepthLuma, prevBitDepthChroma, bitDepthLuma, bitDepthChroma , m_pcCfg->getCGSMaxYPartNumLog2() );
    211211    m_Enc3DAsymLUTPPS.create( m_pcCfg->getCGSMaxOctantDepth(), prevBitDepthLuma, prevBitDepthChroma, bitDepthLuma, prevBitDepthChroma , m_pcCfg->getCGSMaxYPartNumLog2() );
     212
    212213    if(!m_pColorMappedPic)
    213214    {
    214215      m_pColorMappedPic = new TComPicYuv;
    215       m_pColorMappedPic->create( m_ppcTEncTop[0]->getSourceWidth(), m_ppcTEncTop[0]->getSourceHeight(), m_ppcTEncTop[0]->getChromaFormatIDC(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, NULL );
     216      m_pColorMappedPic->create( m_ppcTEncTop[0]->getSourceWidth(), m_ppcTEncTop[0]->getSourceHeight(), m_ppcTEncTop[0]->getChromaFormatIDC(), pcTEncTop->getSPS()->getMaxCUWidth(), pcTEncTop->getSPS()->getMaxCUHeight(), g_uiMaxCUDepth, true, NULL );
    216217    }
    217218  }
     
    31623163  if (conversion!=IPCOLOURSPACE_UNCHANGED)
    31633164  {
    3164     cscd.create(pcPicD->getWidth(COMPONENT_Y), pcPicD->getHeight(COMPONENT_Y), pcPicD->getChromaFormat(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth);
     3165    cscd.create(pcPicD->getWidth(COMPONENT_Y), pcPicD->getHeight(COMPONENT_Y), pcPicD->getChromaFormat(), pcPicD->getWidth(COMPONENT_Y), pcPicD->getHeight(COMPONENT_Y), 0, false);
    31653166#if SVC_EXTENSION
    31663167    TVideoIOYuv::ColourSpaceConvert(*pcPicD, cscd, conversion, pcPic->getSlice(0)->getBitDepths().recon, false);
     
    33853386    {
    33863387      TComPicYuv &reconField=*(apcPicRecFields[fieldNum]);
    3387       cscd[fieldNum].create(reconField.getWidth(COMPONENT_Y), reconField.getHeight(COMPONENT_Y), reconField.getChromaFormat(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth);
     3388      cscd[fieldNum].create(reconField.getWidth(COMPONENT_Y), reconField.getHeight(COMPONENT_Y), reconField.getChromaFormat(), reconField.getWidth(COMPONENT_Y), reconField.getHeight(COMPONENT_Y), 0, false);
    33883389#if SVC_EXTENSION
    33893390      TVideoIOYuv::ColourSpaceConvert(reconField, cscd[fieldNum], conversion, pcPicOrgFirstField->getSlice(0)->getBitDepths().recon, false);
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncGOP.h

    r1287 r1289  
    194194 
    195195#if !SVC_EXTENSION
    196   Void  printOutSummary      ( UInt uiNumAllPicCoded, Bool isField, const Bool printMSEBasedSNR, const Bool printSequenceMSE );
     196  Void  printOutSummary      ( UInt uiNumAllPicCoded, Bool isField, const Bool printMSEBasedSNR, const Bool printSequenceMSE, const BitDepths &bitDepths );
    197197#endif
    198198  Void  preLoopFilterPicAll  ( TComPic* pcPic, UInt64& ruiDist );
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncPic.cpp

    r1260 r1289  
    128128#if SVC_EXTENSION
    129129// * \param vps reference to used VPS
    130 Void TEncPic::create( const TComVPS& vps, const TComSPS &sps, const TComPPS &pps, UInt uiMaxWidth, UInt uiMaxHeight, UInt uiMaxDepth, UInt uiMaxAQDepth, Bool bIsVirtual, const UInt layerId )
     130Void TEncPic::create( const TComVPS& vps, const TComSPS &sps, const TComPPS &pps, UInt uiMaxDepth, UInt uiMaxAQDepth, Bool bIsVirtual, const UInt layerId )
    131131{
    132   TComPic::create( vps, sps, pps, uiMaxWidth, uiMaxHeight, uiMaxDepth, bIsVirtual, layerId );
     132  TComPic::create( vps, sps, pps, uiMaxDepth, bIsVirtual, layerId );
    133133
    134134  const Int iWidth  = vps.getPicWidthInLumaSamples(&sps, layerId);
    135135  const Int iHeight = vps.getPicHeightInLumaSamples(&sps, layerId);
    136136#else
    137 Void TEncPic::create( const TComSPS &sps, const TComPPS &pps, UInt uiMaxWidth, UInt uiMaxHeight, UInt uiMaxDepth, UInt uiMaxAQDepth, Bool bIsVirtual )
     137Void TEncPic::create( const TComSPS &sps, const TComPPS &pps, UInt uiMaxDepth, UInt uiMaxAQDepth, Bool bIsVirtual )
    138138{
    139   TComPic::create( sps, pps, uiMaxWidth, uiMaxHeight, uiMaxDepth, bIsVirtual );
    140   const Int iWidth  = sps.getPicWidthInLumaSamples();
    141   const Int iHeight = sps.getPicHeightInLumaSamples();
     139  TComPic::create( sps, pps, uiMaxDepth, bIsVirtual );
     140  const Int  iWidth      = sps.getPicWidthInLumaSamples();
     141  const Int  iHeight    = sps.getPicHeightInLumaSamples();
    142142#endif
     143
     144  const UInt uiMaxWidth  = sps.getMaxCUWidth();
     145  const UInt uiMaxHeight = sps.getMaxCUHeight();
    143146  m_uiMaxAQDepth = uiMaxAQDepth;
    144147  if ( uiMaxAQDepth > 0 )
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncPic.h

    r1259 r1289  
    106106
    107107#if SVC_EXTENSION
    108   Void          create( const TComVPS &vps, const TComSPS &sps, const TComPPS &pps, UInt uiMaxWidth, UInt uiMaxHeight, UInt uiMaxDepth, UInt uiMaxAQDepth, Bool bIsVirtual /* = false*/, const UInt layerId );
     108  Void          create( const TComVPS &vps, const TComSPS &sps, const TComPPS &pps, UInt uiMaxDepth, UInt uiMaxAQDepth, Bool bIsVirtual /* = false*/, const UInt layerId );
    109109#else  //SVC_EXTENSION
    110   Void          create( const TComSPS &sps, const TComPPS &pps, UInt uiMaxWidth, UInt uiMaxHeight, UInt uiMaxDepth, UInt uiMaxAQDepth, Bool bIsVirtual /* = false*/ );
     110  Void          create( const TComSPS &sps, const TComPPS &pps, UInt uiMaxDepth, UInt uiMaxAQDepth, Bool bIsVirtual /* = false*/ );
    111111#endif //SVC_EXTENSION
    112112
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncSearch.cpp

    r1287 r1289  
    204204                      Int           bipredSearchRange,
    205205                      Int           iFastSearch,
     206                      const UInt    maxCUWidth,
     207                      const UInt    maxCUHeight,
    206208                      TEncEntropy*  pcEntropyCoder,
    207209                      TComRdCost*   pcRdCost,
     
    250252  initTempBuff(cform);
    251253
    252   m_pTempPel = new Pel[g_uiMaxCUWidth*g_uiMaxCUHeight];
     254  m_pTempPel = new Pel[maxCUWidth*maxCUHeight];
    253255
    254256  const UInt uiNumLayersToAllocate = pcEncCfg->getQuadtreeTULog2MaxSize()-pcEncCfg->getQuadtreeTULog2MinSize()+1;
     
    259261    const UInt csy=::getComponentScaleY(ComponentID(ch), cform);
    260262    m_ppcQTTempCoeff[ch] = new TCoeff* [uiNumLayersToAllocate];
    261     m_pcQTTempCoeff[ch]   = new TCoeff [(g_uiMaxCUWidth*g_uiMaxCUHeight)>>(csx+csy)   ];
     263    m_pcQTTempCoeff[ch]   = new TCoeff [(maxCUWidth*maxCUHeight)>>(csx+csy)   ];
    262264#if ADAPTIVE_QP_SELECTION
    263265    m_ppcQTTempArlCoeff[ch]  = new TCoeff*[uiNumLayersToAllocate];
    264     m_pcQTTempArlCoeff[ch]   = new TCoeff [(g_uiMaxCUWidth*g_uiMaxCUHeight)>>(csx+csy)   ];
     266    m_pcQTTempArlCoeff[ch]   = new TCoeff [(maxCUWidth*maxCUHeight)>>(csx+csy)   ];
    265267#endif
    266268    m_puhQTTempCbf[ch] = new UChar  [uiNumPartitions];
     
    268270    for (UInt layer = 0; layer < uiNumLayersToAllocate; layer++)
    269271    {
    270       m_ppcQTTempCoeff[ch][layer] = new TCoeff[(g_uiMaxCUWidth*g_uiMaxCUHeight)>>(csx+csy)];
     272      m_ppcQTTempCoeff[ch][layer] = new TCoeff[(maxCUWidth*maxCUHeight)>>(csx+csy)];
    271273#if ADAPTIVE_QP_SELECTION
    272       m_ppcQTTempArlCoeff[ch][layer]  = new TCoeff[(g_uiMaxCUWidth*g_uiMaxCUHeight)>>(csx+csy) ];
     274      m_ppcQTTempArlCoeff[ch][layer]  = new TCoeff[(maxCUWidth*maxCUHeight)>>(csx+csy) ];
    273275#endif
    274276    }
     
    286288  for( UInt ui = 0; ui < uiNumLayersToAllocate; ++ui )
    287289  {
    288     m_pcQTTempTComYuv[ui].create( g_uiMaxCUWidth, g_uiMaxCUHeight, pcEncCfg->getChromaFormatIdc() );
    289   }
    290   m_pcQTTempTransformSkipTComYuv.create( g_uiMaxCUWidth, g_uiMaxCUHeight, pcEncCfg->getChromaFormatIdc() );
     290    m_pcQTTempTComYuv[ui].create( maxCUWidth, maxCUHeight, pcEncCfg->getChromaFormatIdc() );
     291  }
     292  m_pcQTTempTransformSkipTComYuv.create( maxCUWidth, maxCUHeight, pcEncCfg->getChromaFormatIdc() );
    291293  m_tmpYuvPred.create(MAX_CU_SIZE, MAX_CU_SIZE, pcEncCfg->getChromaFormatIdc());
    292294}
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncSearch.h

    r1259 r1289  
    138138            Int           bipredSearchRange,
    139139            Int           iFastSearch,
     140            const UInt    maxCUWidth,
     141            const UInt    maxCUHeight,
    140142            TEncEntropy*  pcEntropyCoder,
    141143            TComRdCost*   pcRdCost,
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncSlice.cpp

    r1288 r1289  
    6868  {
    6969    m_apcPicYuvPred  = new TComPicYuv;
    70     m_apcPicYuvPred->create( iWidth, iHeight, chromaFormat, iMaxCUWidth, iMaxCUHeight, uhTotalDepth );
     70    m_apcPicYuvPred->create( iWidth, iHeight, chromaFormat, iMaxCUWidth, iMaxCUHeight, uhTotalDepth, true );
    7171  }
    7272
     
    7575  {
    7676    m_apcPicYuvResi  = new TComPicYuv;
    77     m_apcPicYuvResi->create( iWidth, iHeight, chromaFormat, iMaxCUWidth, iMaxCUHeight, uhTotalDepth );
     77    m_apcPicYuvResi->create( iWidth, iHeight, chromaFormat, iMaxCUWidth, iMaxCUHeight, uhTotalDepth, true );
    7878  }
    7979}
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncTop.cpp

    r1288 r1289  
    117117  m_cGOPEncoder.        create( );
    118118#endif
    119   m_cSliceEncoder.      create( getSourceWidth(), getSourceHeight(), m_chromaFormatIDC, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth );
    120   m_cCuEncoder.         create( g_uiMaxCUDepth, g_uiMaxCUWidth, g_uiMaxCUHeight, m_chromaFormatIDC );
     119  m_cSliceEncoder.      create( getSourceWidth(), getSourceHeight(), m_chromaFormatIDC, m_maxCUWidth, m_maxCUHeight, g_uiMaxCUDepth );
     120  m_cCuEncoder.         create( g_uiMaxCUDepth, m_maxCUWidth, m_maxCUHeight, m_chromaFormatIDC );
    121121  if (m_bUseSAO)
    122122  {
    123     m_cEncSAO.create( getSourceWidth(), getSourceHeight(), m_chromaFormatIDC, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, m_saoOffsetBitShift[CHANNEL_TYPE_LUMA], m_saoOffsetBitShift[CHANNEL_TYPE_CHROMA] );
     123    m_cEncSAO.create( getSourceWidth(), getSourceHeight(), m_chromaFormatIDC, m_maxCUWidth, m_maxCUHeight, g_uiMaxCUDepth, m_saoOffsetBitShift[CHANNEL_TYPE_LUMA], m_saoOffsetBitShift[CHANNEL_TYPE_CHROMA] );
    124124#if SAO_ENCODE_ALLOW_USE_PREDEBLOCK
    125125    m_cEncSAO.createEncData(getSaoCtuBoundary());
     
    140140  {
    141141    m_cRateCtrl.init( m_framesToBeEncoded, m_RCTargetBitrate, m_iFrameRate, m_iGOPSize, m_iSourceWidth, m_iSourceHeight,
    142                       g_uiMaxCUWidth, g_uiMaxCUHeight, m_RCKeepHierarchicalBit, m_RCUseLCUSeparateModel, m_GOPList );
     142        m_maxCUWidth, m_maxCUHeight, m_RCKeepHierarchicalBit, m_RCUseLCUSeparateModel, m_GOPList );
    143143  }
    144144
     
    258258
    259259  // initialize encoder search class
    260   m_cSearch.init( this, &m_cTrQuant, m_iSearchRange, m_bipredSearchRange, m_iFastSearch, &m_cEntropyCoder, &m_cRdCost, getRDSbacCoder(), getRDGoOnSbacCoder() );
     260  m_cSearch.init( this, &m_cTrQuant, m_iSearchRange, m_bipredSearchRange, m_iFastSearch, m_maxCUWidth, m_maxCUHeight, &m_cEntropyCoder, &m_cRdCost, getRDSbacCoder(), getRDGoOnSbacCoder() );
    261261
    262262  m_iMaxRefPicNum = 0;
     
    579579        {
    580580          rpcPicYuvRec = new TComPicYuv;
    581           rpcPicYuvRec->create( m_iSourceWidth, m_iSourceHeight, m_chromaFormatIDC, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth);
     581          rpcPicYuvRec->create( m_iSourceWidth, m_iSourceHeight, m_chromaFormatIDC, m_maxCUWidth, m_maxCUHeight, g_uiMaxCUDepth, true);
    582582        }
    583583        rcListPicYuvRecOut.pushBack( rpcPicYuvRec );
     
    620620        {
    621621          rpcPicYuvRec = new TComPicYuv;
    622           rpcPicYuvRec->create( m_iSourceWidth, m_iSourceHeight, m_chromaFormatIDC, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth);
     622          rpcPicYuvRec->create( m_iSourceWidth, m_iSourceHeight, m_chromaFormatIDC, m_maxCUWidth, m_maxCUHeight, g_uiMaxCUDepth, true);
    623623        }
    624624        rcListPicYuvRecOut.pushBack( rpcPicYuvRec );
     
    750750      }
    751751
    752       pcEPic->create( m_cVPS, m_cSPS, m_cPPS, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, m_cPPS.getMaxCuDQPDepth()+1, false, m_layerId);
     752      pcEPic->create( m_cVPS, m_cSPS, m_cPPS, g_uiMaxCUDepth, m_cPPS.getMaxCuDQPDepth()+1, false, m_layerId);
    753753#else  //SVC_EXTENSION
    754       pcEPic->create( m_cSPS, m_cPPS, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, m_cPPS.getMaxCuDQPDepth()+1, false);
     754      pcEPic->create( m_cSPS, m_cPPS, g_uiMaxCUDepth, m_cPPS.getMaxCuDQPDepth()+1, false);
    755755#endif //SVC_EXTENSION
    756756      rpcPic = pcEPic;
     
    800800      }
    801801
    802       rpcPic->create( m_cVPS, m_cSPS, m_cPPS, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, false, m_layerId );
     802      rpcPic->create( m_cVPS, m_cSPS, m_cPPS, g_uiMaxCUDepth, false, m_layerId );
    803803#else  //SVC_EXTENSION
    804       rpcPic->create( m_cSPS, m_cPPS, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, false );
     804      rpcPic->create( m_cSPS, m_cPPS, g_uiMaxCUDepth, false );
    805805#endif //SVC_EXTENSION
    806806    }
     
    887887  m_cSPS.setPicHeightInLumaSamples        ( m_iSourceHeight     );
    888888  m_cSPS.setConformanceWindow             ( m_conformanceWindow );
    889   m_cSPS.setMaxCUWidth    ( g_uiMaxCUWidth      );
    890   m_cSPS.setMaxCUHeight   ( g_uiMaxCUHeight     );
     889  m_cSPS.setMaxCUWidth    ( m_maxCUWidth      );
     890  m_cSPS.setMaxCUHeight   ( m_maxCUHeight     );
    891891  m_cSPS.setMaxCUDepth    ( g_uiMaxCUDepth      );
    892892  m_cSPS.setChromaFormatIdc( m_chromaFormatIDC);
     
    14301430Void  TEncCfg::xCheckGSParameters()
    14311431{
    1432   Int   iWidthInCU = ( m_iSourceWidth%g_uiMaxCUWidth ) ? m_iSourceWidth/g_uiMaxCUWidth + 1 : m_iSourceWidth/g_uiMaxCUWidth;
    1433   Int   iHeightInCU = ( m_iSourceHeight%g_uiMaxCUHeight ) ? m_iSourceHeight/g_uiMaxCUHeight + 1 : m_iSourceHeight/g_uiMaxCUHeight;
     1432  Int   iWidthInCU = ( m_iSourceWidth%m_maxCUWidth ) ? m_iSourceWidth/m_maxCUWidth + 1 : m_iSourceWidth/m_maxCUWidth;
     1433  Int   iHeightInCU = ( m_iSourceHeight%m_maxCUHeight ) ? m_iSourceHeight/m_maxCUHeight + 1 : m_iSourceHeight/m_maxCUHeight;
    14341434  UInt  uiCummulativeColumnWidth = 0;
    14351435  UInt  uiCummulativeRowHeight = 0;
     
    15051505  if( m_layerId > 0 )
    15061506  {
    1507     g_uiMaxCUWidth  = m_cSPS.getMaxCUWidth();
    1508     g_uiMaxCUHeight = m_cSPS.getMaxCUHeight();
    15091507    g_uiMaxCUDepth  = m_cSPS.getMaxCUDepth();
    15101508    g_uiAddCUDepth  = max (0, m_cSPS.getLog2MinCodingBlockSize() - (Int)m_cSPS.getQuadtreeTULog2MinSize() );
     
    15151513      {
    15161514        m_cIlpPic[j] = new TComPic;
    1517         m_cIlpPic[j]->create(m_cVPS, m_cSPS, m_cPPS, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, true, m_layerId);
     1515        m_cIlpPic[j]->create(m_cVPS, m_cSPS, m_cPPS, g_uiMaxCUDepth, true, m_layerId);
    15181516        for (Int i=0; i<m_cIlpPic[j]->getPicSym()->getNumberOfCtusInFrame(); i++)
    15191517        {
  • branches/SHM-dev/source/Lib/TLibVideoIO/TVideoIOYuv.cpp

    r1283 r1289  
    770770  if (ipCSC!=IPCOLOURSPACE_UNCHANGED)
    771771  {
    772     cPicYuvCSCd.create(pPicYuvUser->getWidth(COMPONENT_Y), pPicYuvUser->getHeight(COMPONENT_Y), pPicYuvUser->getChromaFormat(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth);
     772    cPicYuvCSCd.create(pPicYuvUser->getWidth(COMPONENT_Y), pPicYuvUser->getHeight(COMPONENT_Y), pPicYuvUser->getChromaFormat(), pPicYuvUser->getWidth(COMPONENT_Y), pPicYuvUser->getHeight(COMPONENT_Y), 0, false);
    773773    Int internalBitDepth[MAX_NUM_CHANNEL_TYPE];
    774774    for(UInt chType=0; chType<MAX_NUM_CHANNEL_TYPE; chType++)
     
    814814  {
    815815    dstPicYuv = new TComPicYuv;
    816     dstPicYuv->create( pPicYuv->getWidth(COMPONENT_Y), pPicYuv->getHeight(COMPONENT_Y), pPicYuv->getChromaFormat(), 1, 1, 0 );
     816    dstPicYuv->create( pPicYuv->getWidth(COMPONENT_Y), pPicYuv->getHeight(COMPONENT_Y), pPicYuv->getChromaFormat(), pPicYuv->getWidth(COMPONENT_Y), pPicYuv->getHeight(COMPONENT_Y), 0, false );
    817817    pPicYuv->copyToPic(dstPicYuv);
    818818
     
    869869  if (ipCSC!=IPCOLOURSPACE_UNCHANGED)
    870870  {
    871     cPicYuvTopCSCd   .create(pPicYuvUserTop   ->getWidth(COMPONENT_Y), pPicYuvUserTop   ->getHeight(COMPONENT_Y), pPicYuvUserTop   ->getChromaFormat(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth);
    872     cPicYuvBottomCSCd.create(pPicYuvUserBottom->getWidth(COMPONENT_Y), pPicYuvUserBottom->getHeight(COMPONENT_Y), pPicYuvUserBottom->getChromaFormat(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth);
     871    cPicYuvTopCSCd   .create(pPicYuvUserTop   ->getWidth(COMPONENT_Y), pPicYuvUserTop   ->getHeight(COMPONENT_Y), pPicYuvUserTop   ->getChromaFormat(), pPicYuvUserTop   ->getWidth(COMPONENT_Y), pPicYuvUserTop   ->getHeight(COMPONENT_Y), 0, false);
     872    cPicYuvBottomCSCd.create(pPicYuvUserBottom->getWidth(COMPONENT_Y), pPicYuvUserBottom->getHeight(COMPONENT_Y), pPicYuvUserBottom->getChromaFormat(), pPicYuvUserBottom->getWidth(COMPONENT_Y), pPicYuvUserBottom->getHeight(COMPONENT_Y), 0, false);
    873873    Int internalBitDepth[MAX_NUM_CHANNEL_TYPE];
    874874    for(UInt chType=0; chType<MAX_NUM_CHANNEL_TYPE; chType++)
     
    914914    {
    915915      dstPicYuv = new TComPicYuv;
    916       dstPicYuv->create( pPicYuv->getWidth(COMPONENT_Y), pPicYuv->getHeight(COMPONENT_Y), pPicYuv->getChromaFormat(), 1, 1, 0 );
     916      dstPicYuv->create( pPicYuv->getWidth(COMPONENT_Y), pPicYuv->getHeight(COMPONENT_Y), pPicYuv->getChromaFormat(), pPicYuv->getWidth(COMPONENT_Y), pPicYuv->getHeight(COMPONENT_Y), 0, false );
    917917      pPicYuv->copyToPic(dstPicYuv);
    918918
Note: See TracChangeset for help on using the changeset viewer.