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


Ignore:
Timestamp:
14 Aug 2014, 00:00:45 (12 years ago)
Author:
seregin
Message:

Move conformance window signalling to the rep_format (JCTVC-R0156), patch was provided by Danny Hong <danny@…>

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

Legend:

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

    r866 r869  
    729729#endif
    730730#endif
    731   READ_FLAG(     uiCode, "conformance_window_flag");
    732   if (uiCode != 0)
    733   {
    734     Window &conf = pcSPS->getConformanceWindow();
     731
     732#if R0156_CONF_WINDOW_IN_REP_FORMAT
    735733#if REPN_FORMAT_IN_VPS
    736     READ_UVLC(   uiCode, "conf_win_left_offset" );               conf.setWindowLeftOffset  ( uiCode );
    737     READ_UVLC(   uiCode, "conf_win_right_offset" );              conf.setWindowRightOffset ( uiCode );
    738     READ_UVLC(   uiCode, "conf_win_top_offset" );                conf.setWindowTopOffset   ( uiCode );
    739     READ_UVLC(   uiCode, "conf_win_bottom_offset" );             conf.setWindowBottomOffset( uiCode );
    740 #else
    741     READ_UVLC(   uiCode, "conf_win_left_offset" );               conf.setWindowLeftOffset  ( uiCode * TComSPS::getWinUnitX( pcSPS->getChromaFormatIdc() ) );
    742     READ_UVLC(   uiCode, "conf_win_right_offset" );              conf.setWindowRightOffset ( uiCode * TComSPS::getWinUnitX( pcSPS->getChromaFormatIdc() ) );
    743     READ_UVLC(   uiCode, "conf_win_top_offset" );                conf.setWindowTopOffset   ( uiCode * TComSPS::getWinUnitY( pcSPS->getChromaFormatIdc() ) );
    744     READ_UVLC(   uiCode, "conf_win_bottom_offset" );             conf.setWindowBottomOffset( uiCode * TComSPS::getWinUnitY( pcSPS->getChromaFormatIdc() ) );
    745 #endif
    746   }
     734#if O0096_REP_FORMAT_INDEX
     735  if( pcSPS->getLayerId() == 0 )
     736#else
     737  if(  pcSPS->getLayerId() == 0 || pcSPS->getUpdateRepFormatFlag() )
     738#endif
     739  {
     740#endif
     741#endif
     742    READ_FLAG(     uiCode, "conformance_window_flag");
     743    if (uiCode != 0)
     744    {
     745      Window &conf = pcSPS->getConformanceWindow();
     746#if REPN_FORMAT_IN_VPS
     747      READ_UVLC(   uiCode, "conf_win_left_offset" );               conf.setWindowLeftOffset  ( uiCode );
     748      READ_UVLC(   uiCode, "conf_win_right_offset" );              conf.setWindowRightOffset ( uiCode );
     749      READ_UVLC(   uiCode, "conf_win_top_offset" );                conf.setWindowTopOffset   ( uiCode );
     750      READ_UVLC(   uiCode, "conf_win_bottom_offset" );             conf.setWindowBottomOffset( uiCode );
     751#else
     752      READ_UVLC(   uiCode, "conf_win_left_offset" );               conf.setWindowLeftOffset  ( uiCode * TComSPS::getWinUnitX( pcSPS->getChromaFormatIdc() ) );
     753      READ_UVLC(   uiCode, "conf_win_right_offset" );              conf.setWindowRightOffset ( uiCode * TComSPS::getWinUnitX( pcSPS->getChromaFormatIdc() ) );
     754      READ_UVLC(   uiCode, "conf_win_top_offset" );                conf.setWindowTopOffset   ( uiCode * TComSPS::getWinUnitY( pcSPS->getChromaFormatIdc() ) );
     755      READ_UVLC(   uiCode, "conf_win_bottom_offset" );             conf.setWindowBottomOffset( uiCode * TComSPS::getWinUnitY( pcSPS->getChromaFormatIdc() ) );
     756#endif
     757    }
     758#if R0156_CONF_WINDOW_IN_REP_FORMAT
     759#if REPN_FORMAT_IN_VPS
     760  }
     761#endif
     762#endif
     763
    747764#if REPN_FORMAT_IN_VPS
    748765#if O0096_REP_FORMAT_INDEX
     
    20692086    repFormat->setBitDepthVpsChroma         ( repFormatPrev->getBitDepthVpsChroma() );
    20702087  }
     2088
    20712089#else
    20722090#if AUXILIARY_PICTURES
     
    20872105  READ_CODE( 4, uiCode, "bit_depth_chroma_minus8" );         repFormat->setBitDepthVpsChroma( uiCode + 8 );
    20882106#endif
     2107
     2108#if R0156_CONF_WINDOW_IN_REP_FORMAT
     2109  READ_FLAG( uiCode, "conformance_window_vps_flag" );
     2110  if( uiCode != 0)
     2111  {
     2112    Window &conf = repFormat->getConformanceWindowVps();
     2113    READ_UVLC( uiCode, "conf_win_vps_left_offset" );         conf.setWindowLeftOffset  ( uiCode );
     2114    READ_UVLC( uiCode, "conf_win_vps_right_offset" );        conf.setWindowRightOffset ( uiCode );
     2115    READ_UVLC( uiCode, "conf_win_vps_top_offset" );          conf.setWindowTopOffset   ( uiCode );
     2116    READ_UVLC( uiCode, "conf_win_vps_bottom_offset" );       conf.setWindowBottomOffset( uiCode );
     2117  }
     2118#endif
    20892119}
    20902120#endif
  • branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.cpp

    r858 r869  
    214214
    215215    Int  numReorderPics[MAX_TLAYER];
     216#if R0156_CONF_WINDOW_IN_REP_FORMAT
     217    Window &conformanceWindow = slice->getConformanceWindow();
     218#else
    216219    Window &conformanceWindow = pcSPS->getConformanceWindow();
     220#endif
    217221    Window defaultDisplayWindow = pcSPS->getVuiParametersPresentFlag() ? pcSPS->getVuiParameters()->getDefaultDisplayWindow() : Window();
    218222
     
    303307{
    304308  Int  numReorderPics[MAX_TLAYER];
     309#if R0156_CONF_WINDOW_IN_REP_FORMAT
     310  Window &conformanceWindow = pcSlice->getConformanceWindow();
     311#else
    305312  Window &conformanceWindow = pcSlice->getSPS()->getConformanceWindow();
     313#endif
    306314  Window defaultDisplayWindow = pcSlice->getSPS()->getVuiParametersPresentFlag() ? pcSlice->getSPS()->getVuiParameters()->getDefaultDisplayWindow() : Window();
    307315
     
    765773
    766774      Int  numReorderPics[MAX_TLAYER];
     775#if !R0156_CONF_WINDOW_IN_REP_FORMAT
    767776      Window conformanceWindow;
     777#endif
    768778      Window defaultDisplayWindow;
    769779
     780#if R0156_CONF_WINDOW_IN_REP_FORMAT
     781#if AUXILIARY_PICTURES
     782      pBLPic->create( repFormat->getPicWidthVpsInLumaSamples(), repFormat->getPicHeightVpsInLumaSamples(), repFormat->getChromaFormatVpsIdc(), activeSPS->getMaxCUWidth(), activeSPS->getMaxCUHeight(), activeSPS->getMaxCUDepth(), repFormat->getConformanceWindowVps(), defaultDisplayWindow, numReorderPics, NULL, true);
     783#else
     784      pBLPic->create( repFormat->getPicWidthVpsInLumaSamples(), repFormat->getPicHeightVpsInLumaSamples(), activeSPS->getMaxCUWidth(), activeSPS->getMaxCUHeight(), activeSPS->getMaxCUDepth(), repFormat->getConformanceWindowVps(), defaultDisplayWindow, numReorderPics, NULL, true);
     785#endif
     786#else
    770787#if AUXILIARY_PICTURES
    771788      pBLPic->create( repFormat->getPicWidthVpsInLumaSamples(), repFormat->getPicHeightVpsInLumaSamples(), repFormat->getChromaFormatVpsIdc(), activeSPS->getMaxCUWidth(), activeSPS->getMaxCUHeight(), activeSPS->getMaxCUDepth(), conformanceWindow, defaultDisplayWindow, numReorderPics, NULL, true);
    772789#else
    773790      pBLPic->create( repFormat->getPicWidthVpsInLumaSamples(), repFormat->getPicHeightVpsInLumaSamples(), activeSPS->getMaxCUWidth(), activeSPS->getMaxCUHeight(), activeSPS->getMaxCUDepth(), conformanceWindow, defaultDisplayWindow, numReorderPics, NULL, true);
     791#endif
    774792#endif
    775793      // it is needed where the VPS is accessed through the slice
Note: See TracChangeset for help on using the changeset viewer.