Changeset 694 in SHVCSoftware for branches/SHM-6-dev/source/App/TAppDecoder


Ignore:
Timestamp:
18 Apr 2014, 19:14:51 (11 years ago)
Author:
seregin
Message:

commit the patch implementing JCTVC-Q0074 provided by Bordes Philippe <philippe.bordes@…>

File:
1 edited

Legend:

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

    r688 r694  
    693693          const Window &defDisp = m_respectDefDispWindow ? pcPicTop->getDefDisplayWindow() : Window();
    694694          const Bool isTff = pcPicTop->isTopField();
     695          TComPicYuv* pPicCYuvRecTop = pcPicTop->getPicYuvRec();
     696          TComPicYuv* pPicCYuvRecBot = pcPicBottom->getPicYuvRec();
     697#if Q0074_SEI_COLOR_MAPPING
     698          if( m_acTDecTop[layerId].m_ColorMapping->getColorMappingFlag() )
     699          {
     700            pPicCYuvRecTop = m_acTDecTop[layerId].m_ColorMapping->getColorMapping( pPicCYuvRecTop, 0, layerId );
     701            pPicCYuvRecBot = m_acTDecTop[layerId].m_ColorMapping->getColorMapping( pPicCYuvRecBot, 1, layerId );
     702          }
     703#endif
    695704#if REPN_FORMAT_IN_VPS
    696705#if Q0200_CONFORMANCE_BL_SIZE
    697 Int xScal=1,yScal=1;
    698 #else
    699 UInt chromaFormatIdc = pcPic->getSlice(0)->getChromaFormatIdc();
    700 Int xScal =  TComSPS::getWinUnitX( chromaFormatIdc ), yScal = TComSPS::getWinUnitY( chromaFormatIdc );
    701 #endif
    702 m_acTVideoIOYuvReconFile[layerId].write( pcPicTop->getPicYuvRec(), pcPicBottom->getPicYuvRec(),
    703 conf.getWindowLeftOffset()  * xScal + defDisp.getWindowLeftOffset(),
    704 conf.getWindowRightOffset() * xScal + defDisp.getWindowRightOffset(),
    705 conf.getWindowTopOffset()   * yScal + defDisp.getWindowTopOffset(),
    706 conf.getWindowBottomOffset()* yScal + defDisp.getWindowBottomOffset(), isTff );
     706          Int xScal=1,yScal=1;
     707#else
     708          UInt chromaFormatIdc = pcPic->getSlice(0)->getChromaFormatIdc();
     709          Int xScal =  TComSPS::getWinUnitX( chromaFormatIdc ), yScal = TComSPS::getWinUnitY( chromaFormatIdc );
     710#endif
     711          m_acTVideoIOYuvReconFile[layerId].write( pPicCYuvRecTop, pPicCYuvRecBot,
     712            conf.getWindowLeftOffset()  * xScal + defDisp.getWindowLeftOffset(),
     713            conf.getWindowRightOffset() * xScal + defDisp.getWindowRightOffset(),
     714            conf.getWindowTopOffset()   * yScal + defDisp.getWindowTopOffset(),
     715            conf.getWindowBottomOffset()* yScal + defDisp.getWindowBottomOffset(), isTff );
    707716#else
    708717#if O0194_DIFFERENT_BITDEPTH_EL_BL
    709718          // Compile time bug-fix
    710           m_acTVideoIOYuvReconFile[layerId].write( pcPicTop->getPicYuvRec(), pcPicBottom->getPicYuvRec(),
    711 #else
    712           m_cTVideoIOYuvReconFile.write( pcPicTop->getPicYuvRec(), pcPicBottom->getPicYuvRec(),
     719          m_acTVideoIOYuvReconFile[layerId].write( pPicCYuvRecTop, pPicCYuvRecBot,
     720#else
     721          m_cTVideoIOYuvReconFile.write( pPicCYuvRecTop, pPicCYuvRecBot,
    713722#endif
    714723            conf.getWindowLeftOffset() + defDisp.getWindowLeftOffset(),
     
    727736          const Window &defDisp = m_respectDefDispWindow ? pcPicTop->getDefDisplayWindow() : Window();
    728737          const Bool isTff = pcPicTop->isTopField();
    729           m_cTVideoIOYuvReconFile.write( pcPicTop->getPicYuvRec(), pcPicBottom->getPicYuvRec(),
     738          TComPicYuv* pPicCYuvRecTop = pcPicTop->getPicYuvRec();
     739          TComPicYuv* pPicCYuvRecBot = pcPicBottom->getPicYuvRec();
     740#if Q0074_SEI_COLOR_MAPPING
     741          if ( m_cTDecTop.m_ColorMapping->getColorMappingFlag() )
     742          {
     743            pPicCYuvRecTop = m_cTDecTop.m_ColorMapping->getColorMapping( pPicCYuvRecTop, 0 );
     744            pPicCYuvRecBot = m_cTDecTop.m_ColorMapping->getColorMapping( pPicCYuvRecBot, 1 );
     745          }
     746#endif
     747          m_cTVideoIOYuvReconFile.write( pPicCYuvRecTop, pPicCYuvRecBot,
    730748            conf.getWindowLeftOffset() + defDisp.getWindowLeftOffset(),
    731749            conf.getWindowRightOffset() + defDisp.getWindowRightOffset(),
     
    800818          const Window &conf = pcPic->getConformanceWindow();
    801819          const Window &defDisp = m_respectDefDispWindow ? pcPic->getDefDisplayWindow() : Window();
     820          TComPicYuv* pPicCYuvRec = pcPic->getPicYuvRec();
     821#if Q0074_SEI_COLOR_MAPPING
     822          if ( m_acTDecTop[layerId].m_ColorMapping->getColorMappingFlag() )
     823          {
     824            pPicCYuvRec = m_acTDecTop[layerId].m_ColorMapping->getColorMapping( pPicCYuvRec, 0, layerId );
     825          }
     826#endif
     827
    802828#if REPN_FORMAT_IN_VPS
    803829#if Q0200_CONFORMANCE_BL_SIZE
    804 Int xScal=1,yScal=1;
    805 #else
    806 UInt chromaFormatIdc = pcPic->getSlice(0)->getChromaFormatIdc();
    807 Int xScal =  TComSPS::getWinUnitX( chromaFormatIdc ), yScal = TComSPS::getWinUnitY( chromaFormatIdc );
    808 #endif
    809 m_acTVideoIOYuvReconFile[layerId].write( pcPic->getPicYuvRec(),
    810 conf.getWindowLeftOffset()  * xScal + defDisp.getWindowLeftOffset(),
    811 conf.getWindowRightOffset() * xScal + defDisp.getWindowRightOffset(),
    812 conf.getWindowTopOffset()   * yScal + defDisp.getWindowTopOffset(),
    813 conf.getWindowBottomOffset()* yScal + defDisp.getWindowBottomOffset() );
    814 #else
    815           m_acTVideoIOYuvReconFile[layerId].write( pcPic->getPicYuvRec(),
     830          Int xScal=1,yScal=1;
     831#else
     832          UInt chromaFormatIdc = pcPic->getSlice(0)->getChromaFormatIdc();
     833          Int xScal =  TComSPS::getWinUnitX( chromaFormatIdc ), yScal = TComSPS::getWinUnitY( chromaFormatIdc );
     834#endif
     835          m_acTVideoIOYuvReconFile[layerId].write( pPicCYuvRec,
     836            conf.getWindowLeftOffset()  * xScal + defDisp.getWindowLeftOffset(),
     837            conf.getWindowRightOffset() * xScal + defDisp.getWindowRightOffset(),
     838            conf.getWindowTopOffset()   * yScal + defDisp.getWindowTopOffset(),
     839            conf.getWindowBottomOffset()* yScal + defDisp.getWindowBottomOffset() );
     840#else
     841          m_acTVideoIOYuvReconFile[layerId].write( pPicCYuvRec,
    816842            conf.getWindowLeftOffset() + defDisp.getWindowLeftOffset(),
    817843            conf.getWindowRightOffset() + defDisp.getWindowRightOffset(),
     
    827853        {
    828854#if SYNTAX_OUTPUT
     855          TComPicYuv* pPicCYuvRec = pcPic->getPicYuvRec();
     856#if Q0074_SEI_COLOR_MAPPING
     857          if( m_acTDecTop[layerIdx].m_ColorMapping->getColorMappingFlag() )
     858          {
     859            pPicCYuvRec = m_acTDecTop[layerIdx].m_ColorMapping->getColorMapping( pPicCYuvRec, 0, layerIdx );
     860          }
     861#endif
    829862          const Window &conf = pcPic->getConformanceWindow();
    830863          const Window &defDisp = m_respectDefDispWindow ? pcPic->getDefDisplayWindow() : Window();
    831           m_cTVideoIOYuvReconFile.write( pcPic->getPicYuvRec(),
     864          m_cTVideoIOYuvReconFile.write( pPicCYuvRec,
    832865            conf.getWindowLeftOffset() + defDisp.getWindowLeftOffset(),
    833866            conf.getWindowRightOffset() + defDisp.getWindowRightOffset(),
     
    903936          const Window &defDisp = m_respectDefDispWindow ? pcPicTop->getDefDisplayWindow() : Window();
    904937          const Bool isTff = pcPicTop->isTopField();
     938          TComPicYuv* pPicCYuvRecTop = pcPicTop->getPicYuvRec();
     939          TComPicYuv* pPicCYuvRecBot = pcPicBottom->getPicYuvRec();
     940#if Q0074_SEI_COLOR_MAPPING
     941          if( m_acTDecTop[layerId].m_ColorMapping->getColorMappingFlag() )
     942          {
     943            pPicCYuvRecTop = m_acTDecTop[layerId].m_ColorMapping->getColorMapping( pPicCYuvRecTop, 0, layerId );
     944            pPicCYuvRecBot = m_acTDecTop[layerId].m_ColorMapping->getColorMapping( pPicCYuvRecBot, 1, layerId );
     945          }
     946#endif
    905947#if REPN_FORMAT_IN_VPS
    906948#if Q0200_CONFORMANCE_BL_SIZE
    907 Int xScal=1,yScal=1;
    908 #else
    909 UInt chromaFormatIdc = pcPic->getSlice(0)->getChromaFormatIdc();
    910 Int xScal =  TComSPS::getWinUnitX( chromaFormatIdc ), yScal = TComSPS::getWinUnitY( chromaFormatIdc );
    911 #endif
    912 m_acTVideoIOYuvReconFile[layerId].write( pcPicTop->getPicYuvRec(), pcPicBottom->getPicYuvRec(),
    913 conf.getWindowLeftOffset()  *xScal + defDisp.getWindowLeftOffset(),
    914 conf.getWindowRightOffset() *xScal + defDisp.getWindowRightOffset(),
    915 conf.getWindowTopOffset()   *yScal + defDisp.getWindowTopOffset(),
    916 conf.getWindowBottomOffset()*yScal + defDisp.getWindowBottomOffset(), isTff );
     949          Int xScal=1,yScal=1;
     950#else
     951          UInt chromaFormatIdc = pcPic->getSlice(0)->getChromaFormatIdc();
     952          Int xScal =  TComSPS::getWinUnitX( chromaFormatIdc ), yScal = TComSPS::getWinUnitY( chromaFormatIdc );
     953#endif
     954          m_acTVideoIOYuvReconFile[layerId].write( pPicCYuvRecTop, pPicCYuvRecBot,
     955            conf.getWindowLeftOffset()  *xScal + defDisp.getWindowLeftOffset(),
     956            conf.getWindowRightOffset() *xScal + defDisp.getWindowRightOffset(),
     957            conf.getWindowTopOffset()   *yScal + defDisp.getWindowTopOffset(),
     958            conf.getWindowBottomOffset()*yScal + defDisp.getWindowBottomOffset(), isTff );
    917959#else
    918960#if O0194_DIFFERENT_BITDEPTH_EL_BL
    919961          // Compile time bug-fix
    920           m_acTVideoIOYuvReconFile[layerId].write( pcPicTop->getPicYuvRec(), pcPicBottom->getPicYuvRec(),
    921 #else
    922           m_cTVideoIOYuvReconFile[layerId].write( pcPicTop->getPicYuvRec(), pcPicBottom->getPicYuvRec(),
     962          m_acTVideoIOYuvReconFile[layerId].write( pPicCYuvRecTop, pPicCYuvRecBot,
     963#else
     964          m_cTVideoIOYuvReconFile[layerId].write( pPicCYuvRecTop, pPicCYuvRecBot,
    923965#endif
    924966            conf.getWindowLeftOffset() + defDisp.getWindowLeftOffset(),
     
    937979          const Window &defDisp = m_respectDefDispWindow ? pcPicTop->getDefDisplayWindow() : Window();
    938980          const Bool isTff = pcPicTop->isTopField();
    939           m_cTVideoIOYuvReconFile.write( pcPicTop->getPicYuvRec(), pcPicBottom->getPicYuvRec(),
     981          TComPicYuv* pPicCYuvRecTop = pcPicTop->getPicYuvRec();
     982          TComPicYuv* pPicCYuvRecBot = pcPicBottom->getPicYuvRec();
     983#if Q0074_SEI_COLOR_MAPPING
     984          if( m_cTDecTop.m_ColorMapping->getColorMappingFlag() )
     985          {
     986            pPicCYuvRecTop = m_cTDecTop.m_ColorMapping->getColorMapping( pPicCYuvRecTop, 0 );
     987            pPicCYuvRecBot = m_cTDecTop.m_ColorMapping->getColorMapping( pPicCYuvRecBot, 1 );
     988          }
     989#endif
     990          m_cTVideoIOYuvReconFile.write( pPicCYuvRecTop, pPicCYuvRecBot,
    940991            conf.getWindowLeftOffset() + defDisp.getWindowLeftOffset(),
    941992            conf.getWindowRightOffset() + defDisp.getWindowRightOffset(),
     
    10131064          const Window &conf = pcPic->getConformanceWindow();
    10141065          const Window &defDisp = m_respectDefDispWindow ? pcPic->getDefDisplayWindow() : Window();
     1066          TComPicYuv* pPicCYuvRec = pcPic->getPicYuvRec();
     1067#if Q0074_SEI_COLOR_MAPPING
     1068          if( m_acTDecTop[layerId].m_ColorMapping->getColorMappingFlag() )
     1069          {
     1070            pPicCYuvRec = m_acTDecTop[layerId].m_ColorMapping->getColorMapping( pPicCYuvRec, 0, layerId );
     1071          }
     1072#endif
    10151073#if REPN_FORMAT_IN_VPS
    10161074#if Q0200_CONFORMANCE_BL_SIZE
    1017 Int xScal=1,yScal=1;
    1018 #else
    1019 UInt chromaFormatIdc = pcPic->getSlice(0)->getChromaFormatIdc();
    1020 Int xScal =  TComSPS::getWinUnitX( chromaFormatIdc ), yScal = TComSPS::getWinUnitY( chromaFormatIdc );
    1021 #endif
    1022 m_acTVideoIOYuvReconFile[layerId].write( pcPic->getPicYuvRec(),
    1023 conf.getWindowLeftOffset()  *xScal + defDisp.getWindowLeftOffset(),
    1024 conf.getWindowRightOffset() *xScal + defDisp.getWindowRightOffset(),
    1025 conf.getWindowTopOffset()   *yScal + defDisp.getWindowTopOffset(),
    1026 conf.getWindowBottomOffset()*yScal + defDisp.getWindowBottomOffset() );
    1027 #else
    1028           m_acTVideoIOYuvReconFile[layerId].write( pcPic->getPicYuvRec(),
     1075          Int xScal=1,yScal=1;
     1076#else
     1077          UInt chromaFormatIdc = pcPic->getSlice(0)->getChromaFormatIdc();
     1078          Int xScal =  TComSPS::getWinUnitX( chromaFormatIdc ), yScal = TComSPS::getWinUnitY( chromaFormatIdc );
     1079#endif
     1080          m_acTVideoIOYuvReconFile[layerId].write( pPicCYuvRec,
     1081            conf.getWindowLeftOffset()  *xScal + defDisp.getWindowLeftOffset(),
     1082            conf.getWindowRightOffset() *xScal + defDisp.getWindowRightOffset(),
     1083            conf.getWindowTopOffset()   *yScal + defDisp.getWindowTopOffset(),
     1084            conf.getWindowBottomOffset()*yScal + defDisp.getWindowBottomOffset() );
     1085#else
     1086          m_acTVideoIOYuvReconFile[layerId].write( pPicCYuvRec,
    10291087            conf.getWindowLeftOffset() + defDisp.getWindowLeftOffset(),
    10301088            conf.getWindowRightOffset() + defDisp.getWindowRightOffset(),
     
    10411099          const Window &conf = pcPic->getConformanceWindow();
    10421100          const Window &defDisp = m_respectDefDispWindow ? pcPic->getDefDisplayWindow() : Window();
    1043           m_cTVideoIOYuvReconFile.write( pcPic->getPicYuvRec(),
     1101          TComPicYuv* pPicCYuvRec = pcPic->getPicYuvRec();
     1102#if Q0074_SEI_COLOR_MAPPING
     1103          if( m_cTDecTop.m_ColorMapping->getColorMappingFlag() )
     1104          {
     1105            pPicCYuvRec = m_cTDecTop.m_ColorMapping->getColorMapping( pPicCYuvRec );
     1106          }
     1107#endif
     1108          m_cTVideoIOYuvReconFile.write( pPicCYuvRec,
    10441109            conf.getWindowLeftOffset() + defDisp.getWindowLeftOffset(),
    10451110            conf.getWindowRightOffset() + defDisp.getWindowRightOffset(),
     
    11181183    Int xScal =  1, yScal = 1;
    11191184#if REPN_FORMAT_IN_VPS && !Q0200_CONFORMANCE_BL_SIZE
    1120 UInt chromaFormatIdc = pic->getSlice(0)->getChromaFormatIdc();
    1121 xScal = TComSPS::getWinUnitX( chromaFormatIdc );
    1122 yScal = TComSPS::getWinUnitY( chromaFormatIdc );
    1123 #endif
    1124 m_acTVideoIOYuvReconFile[layerIdx].write( pic->getPicYuvRec(),
    1125 conf.getWindowLeftOffset()  * xScal + defDisp.getWindowLeftOffset(),
    1126 conf.getWindowRightOffset() * xScal + defDisp.getWindowRightOffset(),
    1127 conf.getWindowTopOffset()   * yScal + defDisp.getWindowTopOffset(),
    1128 conf.getWindowBottomOffset()* yScal + defDisp.getWindowBottomOffset() );
     1185    UInt chromaFormatIdc = pic->getSlice(0)->getChromaFormatIdc();
     1186    xScal = TComSPS::getWinUnitX( chromaFormatIdc );
     1187    yScal = TComSPS::getWinUnitY( chromaFormatIdc );
     1188#endif
     1189    TComPicYuv* pPicCYuvRec = pic->getPicYuvRec();
     1190#if Q0074_SEI_COLOR_MAPPING
     1191    pPicCYuvRec = m_acTDecTop[layerIdx].m_ColorMapping->getColorMapping( pPicCYuvRec, 0, layerIdx );
     1192#endif
     1193    m_acTVideoIOYuvReconFile[layerIdx].write( pPicCYuvRec,
     1194      conf.getWindowLeftOffset()  * xScal + defDisp.getWindowLeftOffset(),
     1195      conf.getWindowRightOffset() * xScal + defDisp.getWindowRightOffset(),
     1196      conf.getWindowTopOffset()   * yScal + defDisp.getWindowTopOffset(),
     1197      conf.getWindowBottomOffset()* yScal + defDisp.getWindowBottomOffset() );
    11291198  }
    11301199  // update POC of display order
Note: See TracChangeset for help on using the changeset viewer.