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


Ignore:
Timestamp:
14 Aug 2014, 00:00:45 (11 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/TLibEncoder
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncCavlc.cpp

    r866 r869  
    555555#endif
    556556#endif
    557   Window conf = pcSPS->getConformanceWindow();
    558 
    559   WRITE_FLAG( conf.getWindowEnabledFlag(),          "conformance_window_flag" );
    560   if (conf.getWindowEnabledFlag())
    561   {
     557
     558#if R0156_CONF_WINDOW_IN_REP_FORMAT
    562559#if REPN_FORMAT_IN_VPS
    563     WRITE_UVLC( conf.getWindowLeftOffset(),   "conf_win_left_offset"   );
    564     WRITE_UVLC( conf.getWindowRightOffset(),  "conf_win_right_offset"  );
    565     WRITE_UVLC( conf.getWindowTopOffset(),    "conf_win_top_offset"    );
    566     WRITE_UVLC( conf.getWindowBottomOffset(), "conf_win_bottom_offset" );
    567 #else
    568     WRITE_UVLC( conf.getWindowLeftOffset()   / TComSPS::getWinUnitX(pcSPS->getChromaFormatIdc() ), "conf_win_left_offset" );
    569     WRITE_UVLC( conf.getWindowRightOffset()  / TComSPS::getWinUnitX(pcSPS->getChromaFormatIdc() ), "conf_win_right_offset" );
    570     WRITE_UVLC( conf.getWindowTopOffset()    / TComSPS::getWinUnitY(pcSPS->getChromaFormatIdc() ), "conf_win_top_offset" );
    571     WRITE_UVLC( conf.getWindowBottomOffset() / TComSPS::getWinUnitY(pcSPS->getChromaFormatIdc() ), "conf_win_bottom_offset" );
    572 #endif
    573   }
     560#if O0096_REP_FORMAT_INDEX
     561  if( pcSPS->getLayerId() == 0 )
     562#else
     563  if( pcSPS->getLayerId() == 0 || pcSPS->getUpdateRepFormatFlag() )
     564#endif 
     565  {
     566#endif
     567#endif
     568    Window conf = pcSPS->getConformanceWindow();
     569
     570    WRITE_FLAG( conf.getWindowEnabledFlag(),          "conformance_window_flag" );
     571    if (conf.getWindowEnabledFlag())
     572    {
     573#if REPN_FORMAT_IN_VPS
     574      WRITE_UVLC( conf.getWindowLeftOffset(),   "conf_win_left_offset"   );
     575      WRITE_UVLC( conf.getWindowRightOffset(),  "conf_win_right_offset"  );
     576      WRITE_UVLC( conf.getWindowTopOffset(),    "conf_win_top_offset"    );
     577      WRITE_UVLC( conf.getWindowBottomOffset(), "conf_win_bottom_offset" );
     578#else
     579      WRITE_UVLC( conf.getWindowLeftOffset()   / TComSPS::getWinUnitX(pcSPS->getChromaFormatIdc() ), "conf_win_left_offset" );
     580      WRITE_UVLC( conf.getWindowRightOffset()  / TComSPS::getWinUnitX(pcSPS->getChromaFormatIdc() ), "conf_win_right_offset" );
     581      WRITE_UVLC( conf.getWindowTopOffset()    / TComSPS::getWinUnitY(pcSPS->getChromaFormatIdc() ), "conf_win_top_offset" );
     582      WRITE_UVLC( conf.getWindowBottomOffset() / TComSPS::getWinUnitY(pcSPS->getChromaFormatIdc() ), "conf_win_bottom_offset" );
     583#endif
     584    }
     585#if R0156_CONF_WINDOW_IN_REP_FORMAT
     586#if REPN_FORMAT_IN_VPS
     587  }
     588#endif
     589#endif
    574590
    575591#if REPN_FORMAT_IN_VPS
     
    14711487  WRITE_CODE( repFormat->getBitDepthVpsLuma() - 8,   4, "bit_depth_luma_minus8" );           
    14721488  WRITE_CODE( repFormat->getBitDepthVpsChroma() - 8, 4, "bit_depth_chroma_minus8" );
     1489#endif
     1490
     1491#if R0156_CONF_WINDOW_IN_REP_FORMAT
     1492  Window conf = repFormat->getConformanceWindowVps();
     1493
     1494  WRITE_FLAG( conf.getWindowEnabledFlag(),    "conformance_window_vps_flag" );
     1495  if (conf.getWindowEnabledFlag())
     1496  {
     1497    WRITE_UVLC( conf.getWindowLeftOffset(),   "conf_win_vps_left_offset"   );
     1498    WRITE_UVLC( conf.getWindowRightOffset(),  "conf_win_vps_right_offset"  );
     1499    WRITE_UVLC( conf.getWindowTopOffset(),    "conf_win_vps_top_offset"    );
     1500    WRITE_UVLC( conf.getWindowBottomOffset(), "conf_win_vps_bottom_offset" );
     1501  }
    14731502#endif
    14741503}
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncTop.cpp

    r849 r869  
    16981698
    16991699    Int  numReorderPics[MAX_TLAYER];
     1700#if R0156_CONF_WINDOW_IN_REP_FORMAT
     1701    Window &conformanceWindow = repFormat->getConformanceWindowVps();
     1702#else
    17001703    Window &conformanceWindow = m_cSPS.getConformanceWindow();
     1704#endif
    17011705    Window defaultDisplayWindow = m_cSPS.getVuiParametersPresentFlag() ? m_cSPS.getVuiParameters()->getDefaultDisplayWindow() : Window();
    17021706
Note: See TracChangeset for help on using the changeset viewer.