Ignore:
Timestamp:
11 Dec 2015, 00:05:48 (8 years ago)
Author:
seregin
Message:

infer parameters in SPS after activation, fixing chroma scaling for non 4:2:0

File:
1 edited

Legend:

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

    r1490 r1502  
    328328      if ( !m_reconFileName[curLayerId].empty() && !openedReconFile[curLayerId] )
    329329      {
    330         const BitDepths& bitDepths = m_apcTDecTop[curLayerId]->getParameterSetManager()->getActiveVPS()->getBitDepths( m_apcTDecTop[curLayerId]->getParameterSetManager()->getActiveSPS(), curLayerId );
     330        const BitDepths& bitDepths = m_apcTDecTop[curLayerId]->getParameterSetManager()->getActiveSPS()->getBitDepths();
    331331
    332332        for( UInt channelType = 0; channelType < MAX_NUM_CHANNEL_TYPE; channelType++)
     
    786786          if (display)
    787787          {           
    788             UInt chromaFormatIdc = pcPic->getSlice(0)->getChromaFormatIdc();
     788            UInt chromaFormatIdc = pcPic->getSlice(0)->getSPS()->getChromaFormatIdc();
    789789            Int xScal =  TComSPS::getWinUnitX( chromaFormatIdc ), yScal = TComSPS::getWinUnitY( chromaFormatIdc );
    790790
     
    881881          const Window  defDisp = m_respectDefDispWindow ? pcPic->getDefDisplayWindow() : Window();         
    882882
    883           UInt chromaFormatIdc = pcPic->getSlice(0)->getChromaFormatIdc();
     883          UInt chromaFormatIdc = pcPic->getSlice(0)->getSPS()->getChromaFormatIdc();
    884884          Int xScal =  TComSPS::getWinUnitX( chromaFormatIdc ), yScal = TComSPS::getWinUnitY( chromaFormatIdc );
    885885
     
    972972          const Bool isTff = pcPicTop->isTopField();         
    973973
    974           UInt chromaFormatIdc = pcPic->getSlice(0)->getChromaFormatIdc();
     974          UInt chromaFormatIdc = pcPic->getSlice(0)->getSPS()->getChromaFormatIdc();
    975975          Int xScal =  TComSPS::getWinUnitX( chromaFormatIdc ), yScal = TComSPS::getWinUnitY( chromaFormatIdc );
    976976
     
    10501050          const Window  defDisp = m_respectDefDispWindow ? pcPic->getDefDisplayWindow() : Window();         
    10511051
    1052           UInt chromaFormatIdc = pcPic->getSlice(0)->getChromaFormatIdc();
     1052          UInt chromaFormatIdc = pcPic->getSlice(0)->getSPS()->getChromaFormatIdc();
    10531053          Int xScal =  TComSPS::getWinUnitX( chromaFormatIdc ), yScal = TComSPS::getWinUnitY( chromaFormatIdc );
    10541054
     
    14721472    Int xScal =  1, yScal = 1;
    14731473
    1474     UInt chromaFormatIdc = pic->getSlice(0)->getChromaFormatIdc();
     1474    UInt chromaFormatIdc = pic->getSlice(0)->getSPS()->getChromaFormatIdc();
    14751475    xScal = TComSPS::getWinUnitX( chromaFormatIdc );
    14761476    yScal = TComSPS::getWinUnitY( chromaFormatIdc );
     
    17011701
    17021702        TComPictureHash recon_digest;
    1703         Int numChar = calcMD5(*pic->getPicYuvRec(), recon_digest, pic->getSlice(0)->getBitDepths());
     1703        Int numChar = calcMD5(*pic->getPicYuvRec(), recon_digest, pic->getSlice(0)->getSPS()->getBitDepths());
    17041704        fprintf(fptr, "%8d%9d    MD5:%s\n", pic->getLayerId(), pic->getSlice(0)->getPOC(), hashToString(recon_digest, numChar).c_str());
    17051705        fclose(fptr);
     
    17291729        strcpy(tempFileName, this->getDecodedYuvLayerFileName( layerId ).c_str());
    17301730
    1731         const TComVPS *vps = m_apcTDecTop[layerId]->getParameterSetManager()->getActiveVPS();
    17321731        const TComSPS *sps = m_apcTDecTop[layerId]->getParameterSetManager()->getActiveSPS();
    1733         const BitDepths &bitDpeths = vps->getBitDepths(sps, layerId);
     1732        const BitDepths &bitDpeths = sps->getBitDepths();
    17341733        Int bitDepth[] = {bitDpeths.recon[CHANNEL_TYPE_LUMA], bitDpeths.recon[CHANNEL_TYPE_CHROMA]};
    17351734
     
    17461745        Int xScal = 1, yScal = 1;
    17471746 
    1748         UInt chromaFormatIdc = checkPic.getSlice(0)->getChromaFormatIdc();
     1747        UInt chromaFormatIdc = checkPic.getSlice(0)->getSPS()->getChromaFormatIdc();
    17491748        xScal = TComSPS::getWinUnitX( chromaFormatIdc );
    17501749        yScal = TComSPS::getWinUnitY( chromaFormatIdc );
Note: See TracChangeset for help on using the changeset viewer.