Changeset 1287 in SHVCSoftware for branches/SHM-dev/source/Lib/TLibDecoder


Ignore:
Timestamp:
17 Jul 2015, 05:43:37 (10 years ago)
Author:
seregin
Message:

port rev 4322 (g_bitDepth)

Location:
branches/SHM-dev/source/Lib/TLibDecoder
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r1275 r1287  
    766766  READ_UVLC(     uiCode, "bit_depth_luma_minus8" );
    767767#if O0043_BEST_EFFORT_DECODING
     768  pcSPS->setStreamBitDepth(CHANNEL_TYPE_LUMA, 8 + uiCode);
    768769  const UInt forceDecodeBitDepth = pcSPS->getForceDecodeBitDepth();
    769   g_bitDepthInStream[CHANNEL_TYPE_LUMA] = 8 + uiCode;
    770770  if (forceDecodeBitDepth != 0)
    771771  {
     
    774774#endif
    775775  assert(uiCode <= 8);
    776 
    777776  pcSPS->setBitDepth(CHANNEL_TYPE_LUMA, 8 + uiCode);
     777
    778778#if O0043_BEST_EFFORT_DECODING
    779   pcSPS->setQpBDOffset(CHANNEL_TYPE_LUMA, (Int) (6*(g_bitDepthInStream[CHANNEL_TYPE_LUMA]-8)) );
     779  pcSPS->setQpBDOffset(CHANNEL_TYPE_LUMA, (Int) (6*(pcSPS->getStreamBitDepth(CHANNEL_TYPE_LUMA)-8)) );
    780780#else
    781781  pcSPS->setQpBDOffset(CHANNEL_TYPE_LUMA, (Int) (6*uiCode) );
     
    784784  READ_UVLC( uiCode,    "bit_depth_chroma_minus8" );
    785785#if O0043_BEST_EFFORT_DECODING
    786   g_bitDepthInStream[CHANNEL_TYPE_CHROMA] = 8 + uiCode;
     786  pcSPS->setStreamBitDepth(CHANNEL_TYPE_CHROMA, 8 + uiCode);
    787787  if (forceDecodeBitDepth != 0)
    788788  {
     
    793793  pcSPS->setBitDepth(CHANNEL_TYPE_CHROMA, 8 + uiCode);
    794794#if O0043_BEST_EFFORT_DECODING
    795   pcSPS->setQpBDOffset(CHANNEL_TYPE_CHROMA,  (Int) (6*(g_bitDepthInStream[CHANNEL_TYPE_CHROMA]-8)) );
     795  pcSPS->setQpBDOffset(CHANNEL_TYPE_CHROMA,  (Int) (6*(pcSPS->getStreamBitDepth(CHANNEL_TYPE_CHROMA)-8)) );
    796796#else
    797797  pcSPS->setQpBDOffset(CHANNEL_TYPE_CHROMA,  (Int) (6*uiCode) );
     
    18211821
    18221822#if SVC_EXTENSION
    1823     g_bitDepthLayer[CHANNEL_TYPE_LUMA][pcSlice->getLayerId()] = pcSlice->getBitDepthY();
    1824     g_bitDepthLayer[CHANNEL_TYPE_CHROMA][pcSlice->getLayerId()] = pcSlice->getBitDepthC();
    1825 
    1826     assert( pcSlice->getSliceQp() >= -pcSlice->getQpBDOffsetY() );
     1823    assert( pcSlice->getSliceQp() >= -pcSlice->getQpBDOffset(CHANNEL_TYPE_LUMA) );
    18271824#else   
    18281825    assert( pcSlice->getSliceQp() >= -sps->getQpBDOffset(CHANNEL_TYPE_LUMA) );
     
    23602357
    23612358#if SVC_EXTENSION
    2362   Int qpBdOffsetY = pcCU->getSlice()->getQpBDOffsetY();
     2359  Int qpBdOffsetY = pcCU->getSlice()->getQpBDOffset(CHANNEL_TYPE_LUMA);
    23632360#else
    23642361  Int qpBdOffsetY = pcCU->getSlice()->getSPS()->getQpBDOffset(CHANNEL_TYPE_LUMA);
     
    24832480        wp[COMPONENT_Y].iWeight = (iDeltaWeight + (1<<wp[COMPONENT_Y].uiLog2WeightDenom));
    24842481        READ_SVLC( wp[COMPONENT_Y].iOffset, iNumRef==0?"luma_offset_l0[i]":"luma_offset_l1[i]" );
    2485         Int range=sps->getUseHighPrecisionPredictionWeighting() ? (1<<g_bitDepth[CHANNEL_TYPE_LUMA])/2 : 128;
     2482#if SVC_EXTENSION
     2483        Int range=sps->getUseHighPrecisionPredictionWeighting() ? (1<<pcSlice->getBitDepth(CHANNEL_TYPE_LUMA))/2 : 128;
     2484#else
     2485        Int range=sps->getUseHighPrecisionPredictionWeighting() ? (1<<sps->getBitDepth(CHANNEL_TYPE_LUMA))/2 : 128;
     2486#endif
    24862487        assert( wp[0].iOffset >= -range );
    24872488        assert( wp[0].iOffset <   range );
     
    24962497        if ( wp[COMPONENT_Cb].bPresentFlag )
    24972498        {
    2498           Int range=sps->getUseHighPrecisionPredictionWeighting() ? (1<<g_bitDepth[CHANNEL_TYPE_CHROMA])/2 : 128;
     2499#if SVC_EXTENSION
     2500          Int range=sps->getUseHighPrecisionPredictionWeighting() ? (1<<pcSlice->getBitDepth(CHANNEL_TYPE_CHROMA))/2 : 128;
     2501#else
     2502          Int range=sps->getUseHighPrecisionPredictionWeighting() ? (1<<sps->getBitDepth(CHANNEL_TYPE_CHROMA))/2 : 128;
     2503#endif
    24992504          for ( Int j=1 ; j<numValidComp ; j++ )
    25002505          {
  • branches/SHM-dev/source/Lib/TLibDecoder/TDecCu.cpp

    r1263 r1287  
    499499  if  ( pcCU->getQtRootCbf( 0) )
    500500  {
    501     m_ppcYuvReco[uiDepth]->addClip( m_ppcYuvReco[uiDepth], m_ppcYuvResi[uiDepth], 0, pcCU->getWidth( 0 ) );
     501#if SVC_EXTENSION
     502    m_ppcYuvReco[uiDepth]->addClip( m_ppcYuvReco[uiDepth], m_ppcYuvResi[uiDepth], 0, pcCU->getWidth( 0 ), pcCU->getSlice()->getBitDepths() );
     503#else
     504    m_ppcYuvReco[uiDepth]->addClip( m_ppcYuvReco[uiDepth], m_ppcYuvResi[uiDepth], 0, pcCU->getWidth( 0 ), pcCU->getSlice()->getSPS()->getBitDepths() );
     505#endif
    502506  }
    503507  else
     
    642646#endif
    643647
     648#if SVC_EXTENSION
     649  const Int clipbd = pcCU->getSlice()->getBitDepth(toChannelType(compID));
     650#else
     651  const Int clipbd = pcCU->getSlice()->getSPS()->getBitDepth(toChannelType(compID));
     652#endif
    644653#if O0043_BEST_EFFORT_DECODING
    645   const Int bitDepthDelta = g_bitDepthInStream[toChannelType(compID)] - g_bitDepth[toChannelType(compID)];
    646 #endif
    647   const Int clipbd = g_bitDepth[toChannelType(compID)];
     654  const Int bitDepthDelta = pcCU->getSlice()->getSPS()->getStreamBitDepth(toChannelType(compID)) - clipbd;
     655#endif
    648656
    649657  if( useCrossComponentPrediction )
     
    825833        Pel* piPicReco         = pcCU->getPic()->getPicYuvRec()->getAddr(compID, pcCU->getCtuRsAddr(), pcCU->getZorderIdxInCtu()+uiPartIdx);
    826834  const UInt uiPicStride       = pcCU->getPic()->getPicYuvRec()->getStride(compID);
    827   const UInt uiPcmLeftShiftBit = g_bitDepth[toChannelType(compID)] - pcCU->getSlice()->getSPS()->getPCMBitDepth(toChannelType(compID));
     835#if SVC_EXTENSION
     836  const UInt uiPcmLeftShiftBit = pcCU->getSlice()->getBitDepth(toChannelType(compID)) - pcCU->getSlice()->getSPS()->getPCMBitDepth(toChannelType(compID));
     837#else
     838  const UInt uiPcmLeftShiftBit = pcCU->getSlice()->getSPS()->getBitDepth(toChannelType(compID)) - pcCU->getSlice()->getSPS()->getPCMBitDepth(toChannelType(compID));
     839#endif
    828840
    829841  for(UInt uiY = 0; uiY < uiHeight; uiY++ )
  • branches/SHM-dev/source/Lib/TLibDecoder/TDecGop.cpp

    r1273 r1287  
    6363//! \ingroup TLibDecoder
    6464//! \{
    65 static Void calcAndPrintHashStatus(TComPicYuv& pic, const SEIDecodedPictureHash* pictureHashSEI);
     65static Void calcAndPrintHashStatus(TComPicYuv& pic, const SEIDecodedPictureHash* pictureHashSEI, const BitDepths &bitDepths);
    6666// ====================================================================================================================
    6767// Constructor / destructor / initialization / destroy
     
    246246      printf ("Warning: Got multiple decoded picture hash SEI messages. Using first.");
    247247    }
    248     calcAndPrintHashStatus(*(pcPic->getPicYuvRec()), hash);
     248#if SVC_EXTENSION
     249    calcAndPrintHashStatus(*(pcPic->getPicYuvRec()), hash, pcSlice->getBitDepths());
     250#else
     251    calcAndPrintHashStatus(*(pcPic->getPicYuvRec()), hash, pcSlice->getSPS()->getBitDepths());
     252#endif
    249253  }
    250254#if CONFORMANCE_BITSTREAM_MODE
     
    275279 *            unk         - no SEI message was available for comparison
    276280 */
    277 static Void calcAndPrintHashStatus(TComPicYuv& pic, const SEIDecodedPictureHash* pictureHashSEI)
     281static Void calcAndPrintHashStatus(TComPicYuv& pic, const SEIDecodedPictureHash* pictureHashSEI, const BitDepths &bitDepths)
    278282{
    279283  /* calculate MD5sum for entire reconstructed picture */
     
    289293        {
    290294          hashType = "MD5";
    291           numChar = calcMD5(pic, recon_digest);
     295          numChar = calcMD5(pic, recon_digest, bitDepths);
    292296          break;
    293297        }
     
    295299        {
    296300          hashType = "CRC";
    297           numChar = calcCRC(pic, recon_digest);
     301          numChar = calcCRC(pic, recon_digest, bitDepths);
    298302          break;
    299303        }
     
    301305        {
    302306          hashType = "Checksum";
    303           numChar = calcChecksum(pic, recon_digest);
     307          numChar = calcChecksum(pic, recon_digest, bitDepths);
    304308          break;
    305309        }
  • branches/SHM-dev/source/Lib/TLibDecoder/TDecSbac.cpp

    r1285 r1287  
    947947    UInt uiSign;
    948948#if SVC_EXTENSION
    949     Int qpBdOffsetY = pcCU->getSlice()->getQpBDOffsetY();
     949    Int qpBdOffsetY = pcCU->getSlice()->getQpBDOffset(CHANNEL_TYPE_LUMA);
    950950#else
    951951    Int qpBdOffsetY = pcCU->getSlice()->getSPS()->getQpBDOffset(CHANNEL_TYPE_LUMA);
     
    16871687
    16881688Void TDecSbac::parseSAOBlkParam (SAOBlkParam& saoBlkParam
    1689 #if SVC_EXTENSION
    1690                                 , UInt* saoMaxOffsetQVal
    1691 #endif
    16921689                                , Bool* sliceEnabled
    16931690                                , Bool leftMergeAvail
    16941691                                , Bool aboveMergeAvail
     1692                                , const BitDepths &bitDepths
    16951693                                )
    16961694{
     
    17271725      const ComponentID firstCompOfChType = getFirstComponentOfChannel(toChannelType(compIdx));
    17281726      SAOOffset& ctbParam = saoBlkParam[compIdx];
    1729 
     1727#if O0043_BEST_EFFORT_DECODING
     1728      const Int bitDepthOrig = bitDepths.stream[toChannelType(compIdx)];
     1729      const Int forceBitDepthAdjust = bitDepthOrig - bitDepths.recon[toChannelType(compIdx)];
     1730#else
     1731      const Int bitDepthOrig = bitDepths.recon[toChannelType(compIdx)];
     1732#endif
     1733      const Int maxOffsetQVal=TComSampleAdaptiveOffset::getMaxOffsetQVal(bitDepthOrig);
    17301734      if(!sliceEnabled[compIdx])
    17311735      {
     
    17661770      if(ctbParam.modeIdc == SAO_MODE_NEW)
    17671771      {
    1768 #if O0043_BEST_EFFORT_DECODING
    1769         Int bitDepthOrig = g_bitDepthInStream[toChannelType(compIdx)];
    1770         Int forceBitDepthAdjust = bitDepthOrig - g_bitDepth[toChannelType(compIdx)];
    1771 #endif
    17721772        Int offset[4];
    17731773        for(Int i=0; i< 4; i++)
    17741774        {
    1775 #if O0043_BEST_EFFORT_DECODING
    1776           Int saoMaxOffsetQVal = (1<<(min(bitDepthOrig, MAX_SAO_TRUNCATED_BITDEPTH)-5))-1;
    1777           parseSaoMaxUvlc(uiSymbol, saoMaxOffsetQVal); //sao_offset_abs
    1778 #else
    1779 #if SVC_EXTENSION
    1780           parseSaoMaxUvlc(uiSymbol,  saoMaxOffsetQVal[compIdx] ); //sao_offset_abs
    1781 #else
    1782           parseSaoMaxUvlc(uiSymbol,  g_saoMaxOffsetQVal[compIdx] ); //sao_offset_abs
    1783 #endif
    1784 #endif
     1775          parseSaoMaxUvlc(uiSymbol, maxOffsetQVal ); //sao_offset_abs
    17851776          offset[i] = (Int)uiSymbol;
    17861777        }
  • branches/SHM-dev/source/Lib/TLibDecoder/TDecSbac.h

    r1285 r1287  
    9393  Void  parseSaoTypeIdx           ( UInt&  ruiVal  );
    9494  Void  parseSaoUflc              ( UInt uiLength, UInt& ruiVal     );
    95 
    96 #if SVC_EXTENSION
    97   Void parseSAOBlkParam           (SAOBlkParam& saoBlkParam, UInt* saoMaxOffsetQVal, Bool* sliceEnabled, Bool leftMergeAvail, Bool aboveMergeAvail );
    98 #else
    99   Void parseSAOBlkParam           (SAOBlkParam& saoBlkParam, Bool* sliceEnabled, Bool leftMergeAvail, Bool aboveMergeAvail);
    100 #endif
     95  Void parseSAOBlkParam           (SAOBlkParam& saoBlkParam, Bool* sliceEnabled, Bool leftMergeAvail, Bool aboveMergeAvail, const BitDepths &bitDepths);
    10196  Void parseSaoSign               (UInt& val);
    10297
  • branches/SHM-dev/source/Lib/TLibDecoder/TDecSlice.cpp

    r1259 r1287  
    6161}
    6262
    63 #if SVC_EXTENSION
    64 Void TDecSlice::init(TDecEntropy* pcEntropyDecoder, TDecCu* pcCuDecoder, UInt* saoMaxOffsetQVal)
     63Void TDecSlice::init(TDecEntropy* pcEntropyDecoder, TDecCu* pcCuDecoder)
    6564{
    6665  m_pcEntropyDecoder  = pcEntropyDecoder;
    6766  m_pcCuDecoder       = pcCuDecoder;
    68   m_saoMaxOffsetQVal  = saoMaxOffsetQVal;
    69 }
    70 #else
    71 Void TDecSlice::init(TDecEntropy* pcEntropyDecoder, TDecCu* pcCuDecoder)
    72 {
    73   m_pcEntropyDecoder  = pcEntropyDecoder;
    74   m_pcCuDecoder       = pcCuDecoder;
    75 }
    76 #endif
     67}
    7768
    7869Void TDecSlice::decompressSlice(TComInputBitstream** ppcSubstreams, TComPic* pcPic, TDecSbac* pcSbacDecoder)
     
    211202        }
    212203#if SVC_EXTENSION
    213         pcSbacDecoder->parseSAOBlkParam( saoblkParam, m_saoMaxOffsetQVal, sliceEnabled, leftMergeAvail, aboveMergeAvail);
     204        pcSbacDecoder->parseSAOBlkParam( saoblkParam, sliceEnabled, leftMergeAvail, aboveMergeAvail, pcSlice->getBitDepths());
    214205#else
    215         pcSbacDecoder->parseSAOBlkParam( saoblkParam, sliceEnabled, leftMergeAvail, aboveMergeAvail);
    216 #endif     
     206        pcSbacDecoder->parseSAOBlkParam( saoblkParam, sliceEnabled, leftMergeAvail, aboveMergeAvail, pcSlice->getSPS()->getBitDepths());
     207#endif
    217208      }
    218209    }
  • branches/SHM-dev/source/Lib/TLibDecoder/TDecSlice.h

    r1259 r1287  
    7777  virtual ~TDecSlice();
    7878 
    79 #if SVC_EXTENSION 
    80   Void  init              ( TDecEntropy* pcEntropyDecoder, TDecCu* pcMbDecoder, UInt* saoMaxOffsetQVal );
    81 #else
    8279  Void  init              ( TDecEntropy* pcEntropyDecoder, TDecCu* pcMbDecoder );
    83 #endif
    8480  Void  create            ();
    8581  Void  destroy           ();
  • branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.cpp

    r1285 r1287  
    181181#if SVC_EXTENSION
    182182  m_cGopDecoder.init( m_ppcTDecTop, &m_cEntropyDecoder, &m_cSbacDecoder, &m_cBinCABAC, &m_cCavlcDecoder, &m_cSliceDecoder, &m_cLoopFilter, &m_cSAO);
    183   m_cSliceDecoder.init( &m_cEntropyDecoder, &m_cCuDecoder, m_cSAO.getSaoMaxOffsetQVal() );
    184183#else
    185184  m_cGopDecoder.init( &m_cEntropyDecoder, &m_cSbacDecoder, &m_cBinCABAC, &m_cCavlcDecoder, &m_cSliceDecoder, &m_cLoopFilter, &m_cSAO);
     185#endif
    186186  m_cSliceDecoder.init( &m_cEntropyDecoder, &m_cCuDecoder );
    187 #endif
    188187  m_cEntropyDecoder.init(&m_cPrediction);
    189188}
     
    499498        // it is needed where the VPS is accessed through the slice
    500499        pBLPic->getSlice(0)->setVPS( vps );
    501 
    502         g_bitDepthLayer[CHANNEL_TYPE_LUMA][0] = repFormat->getBitDepthVpsLuma();
    503         g_bitDepthLayer[CHANNEL_TYPE_CHROMA][0] = repFormat->getBitDepthVpsChroma();
    504500      }
    505501    }
     
    577573
    578574    // TODO: remove the use of the following globals:
    579     for (UInt channel = 0; channel < MAX_NUM_CHANNEL_TYPE; channel++)
    580     {
    581 #if SVC_EXTENSION
    582       g_bitDepth[channel] = isLuma(ChannelType(channel)) ? vps->getBitDepthY(sps, m_apcSlicePilot->getLayerId()) : vps->getBitDepthC(sps, m_apcSlicePilot->getLayerId());
    583 #else
    584       g_bitDepth[channel] = sps->getBitDepth(ChannelType(channel));
    585 #endif     
    586     }
    587575    g_uiMaxCUWidth  = sps->getMaxCUWidth();
    588576    g_uiMaxCUHeight = sps->getMaxCUHeight();
     
    13101298      if( pFile->good() )
    13111299      {
    1312         Bool is16bit  = g_bitDepthLayer[CHANNEL_TYPE_LUMA][0] > 8 || g_bitDepthLayer[CHANNEL_TYPE_CHROMA][0] > 8;
     1300        Bool is16bit  = pBLPic->getSlice(0)->getBitDepth(CHANNEL_TYPE_LUMA) > 8 || pBLPic->getSlice(0)->getBitDepth(CHANNEL_TYPE_CHROMA) > 8;
    13131301        UInt uiWidth  = pBLPic->getPicYuvRec()->getWidth(COMPONENT_Y);
    13141302        UInt uiHeight = pBLPic->getPicYuvRec()->getHeight(COMPONENT_Y);
     
    16041592        if( pcSlice->getPPS()->getCGSFlag() && m_c3DAsymLUTPPS.isRefLayer( pcSlice->getVPS()->getRefLayerId(m_layerId, refLayerIdc) ) )
    16051593        {
    1606           assert( pcSlice->getBaseColPic( refLayerIdc )->getSlice( 0 )->getBitDepthY() == m_c3DAsymLUTPPS.getInputBitDepthY() );
    1607           assert( pcSlice->getBaseColPic( refLayerIdc )->getSlice( 0 )->getBitDepthC() == m_c3DAsymLUTPPS.getInputBitDepthC() );
    1608           assert( pcSlice->getBitDepthY() >= m_c3DAsymLUTPPS.getOutputBitDepthY() );
    1609           assert( pcSlice->getBitDepthY() >= m_c3DAsymLUTPPS.getOutputBitDepthC() );
     1594          assert( pcSlice->getBaseColPic( refLayerIdc )->getSlice( 0 )->getBitDepth(CHANNEL_TYPE_LUMA) == m_c3DAsymLUTPPS.getInputBitDepthY() );
     1595          assert( pcSlice->getBaseColPic( refLayerIdc )->getSlice( 0 )->getBitDepth(CHANNEL_TYPE_CHROMA) == m_c3DAsymLUTPPS.getInputBitDepthC() );
     1596          assert( pcSlice->getBitDepth(CHANNEL_TYPE_LUMA) >= m_c3DAsymLUTPPS.getOutputBitDepthY() );
     1597          assert( pcSlice->getBitDepth(CHANNEL_TYPE_LUMA) >= m_c3DAsymLUTPPS.getOutputBitDepthC() );
    16101598
    16111599          if( !m_pColorMappedPic )
     
    16141602          }
    16151603
    1616           m_c3DAsymLUTPPS.colorMapping( pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec(),  m_pColorMappedPic );
     1604          m_c3DAsymLUTPPS.colorMapping( pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec(), m_pColorMappedPic );
    16171605          pBaseColRec = m_pColorMappedPic;
    16181606        }
     
    16241612          if( pcSlice->getVPS()->isSamplePredictionType( pcSlice->getVPS()->getLayerIdxInVps(m_layerId), pcSlice->getVPS()->getLayerIdxInVps(refLayerId) ) )
    16251613          {
    1626             m_cPrediction.upsampleBasePic( pcSlice, refLayerIdc, m_pcPic->getFullPelBaseRec(refLayerIdc), pBaseColRec, m_pcPic->getPicYuvRec());
     1614            m_cPrediction.upsampleBasePic( pcSlice, refLayerIdc, m_pcPic->getFullPelBaseRec(refLayerIdc), pBaseColRec, m_pcPic->getPicYuvRec(), pcSlice->getBaseColPic( refLayerIdc )->getSlice( 0 )->getBitDepth(CHANNEL_TYPE_LUMA), pcSlice->getBaseColPic( refLayerIdc )->getSlice( 0 )->getBitDepth(CHANNEL_TYPE_CHROMA));
    16271615          }
    16281616        }
     
    18041792    };
    18051793#if SVC_EXTENSION
    1806     m_cTrQuant.setFlatScalingList(pcSlice->getChromaFormatIdc(), maxLog2TrDynamicRange);
     1794    m_cTrQuant.setFlatScalingList(pcSlice->getChromaFormatIdc(), maxLog2TrDynamicRange, pcSlice->getBitDepths());
    18071795#else
    1808     m_cTrQuant.setFlatScalingList(pcSlice->getSPS()->getChromaFormatIdc(), maxLog2TrDynamicRange);
     1796    m_cTrQuant.setFlatScalingList(pcSlice->getSPS()->getChromaFormatIdc(), maxLog2TrDynamicRange, pcSlice->getSPS()->getBitDepths());
    18091797#endif
    18101798    m_cTrQuant.setUseScalingList(false);
     
    22102198  const TComSPS* sps  = slice->getSPS();
    22112199
    2212   Int bitDepthY   = slice->getBitDepthY();
    2213   Int bitDepthC   = slice->getBitDepthC();
    2214 
    22152200  if( m_layerId > 0 )
    22162201  {
    2217 
    2218     g_bitDepth[CHANNEL_TYPE_LUMA]     = bitDepthY;
    2219     g_bitDepth[CHANNEL_TYPE_CHROMA]   = bitDepthC;
    22202202    g_uiMaxCUWidth  = sps->getMaxCUWidth();
    22212203    g_uiMaxCUHeight = sps->getMaxCUHeight();
     
    25592541
    25602542    TDecTop *pcTDecTopBase = (TDecTop *)getRefLayerDec( i );
    2561     TComPicYuv* pcPicYuvRecBase = (*(pcTDecTopBase->getListPic()->begin()))->getPicYuvRec();
    2562 
    2563     UInt refLayerId = vps.getRefLayerId(m_layerId, i);
    2564     Bool sameBitDepths = ( g_bitDepthLayer[CHANNEL_TYPE_LUMA][m_layerId] == g_bitDepthLayer[CHANNEL_TYPE_LUMA][refLayerId] ) && ( g_bitDepthLayer[CHANNEL_TYPE_CHROMA][m_layerId] == g_bitDepthLayer[CHANNEL_TYPE_CHROMA][refLayerId] );
     2543    TComPicYuv* pcPicYuvRecBase = (*(pcTDecTopBase->getListPic()->begin()))->getPicYuvRec();
     2544
     2545    const Int bitDepthLuma = vps.getBitDepth(CHANNEL_TYPE_LUMA, &sps, m_layerId);
     2546    const Int bitDepthChroma = vps.getBitDepth(CHANNEL_TYPE_CHROMA, &sps, m_layerId);
     2547    const Int refBitDepthLuma = (*(pcTDecTopBase->getListPic()->begin()))->getSlice(0)->getBitDepth(CHANNEL_TYPE_LUMA);
     2548    const Int refBitDepthChroma = (*(pcTDecTopBase->getListPic()->begin()))->getSlice(0)->getBitDepth(CHANNEL_TYPE_CHROMA);
     2549   
     2550    Bool sameBitDepths = ( bitDepthLuma == refBitDepthLuma ) && ( bitDepthChroma == refBitDepthChroma );
    25652551
    25662552    if( pcPicYuvRecBase->getWidth(COMPONENT_Y) == vps.getPicWidthInLumaSamples(&sps, m_layerId) && pcPicYuvRecBase->getHeight(COMPONENT_Y) == vps.getPicHeightInLumaSamples(&sps, m_layerId) && equalOffsets && zeroPhase )
Note: See TracChangeset for help on using the changeset viewer.