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


Ignore:
Timestamp:
19 Apr 2014, 06:59:58 (11 years ago)
Author:
seregin
Message:

change the conformance input to be not multiplied by SubWidthC and SubHeightC, it should be a lossless change

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

Legend:

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

    r683 r705  
    509509  if (conf.getWindowEnabledFlag())
    510510  {
     511#if REPN_FORMAT_IN_VPS
     512    WRITE_UVLC( conf.getWindowLeftOffset(),   "conf_win_left_offset"   );
     513    WRITE_UVLC( conf.getWindowRightOffset(),  "conf_win_right_offset"  );
     514    WRITE_UVLC( conf.getWindowTopOffset(),    "conf_win_top_offset"    );
     515    WRITE_UVLC( conf.getWindowBottomOffset(), "conf_win_bottom_offset" );
     516#else
    511517    WRITE_UVLC( conf.getWindowLeftOffset()   / TComSPS::getWinUnitX(pcSPS->getChromaFormatIdc() ), "conf_win_left_offset" );
    512518    WRITE_UVLC( conf.getWindowRightOffset()  / TComSPS::getWinUnitX(pcSPS->getChromaFormatIdc() ), "conf_win_right_offset" );
    513519    WRITE_UVLC( conf.getWindowTopOffset()    / TComSPS::getWinUnitY(pcSPS->getChromaFormatIdc() ), "conf_win_top_offset" );
    514520    WRITE_UVLC( conf.getWindowBottomOffset() / TComSPS::getWinUnitY(pcSPS->getChromaFormatIdc() ), "conf_win_bottom_offset" );
     521#endif
    515522  }
    516523
  • branches/SHM-6-dev/source/Lib/TLibEncoder/TEncGOP.cpp

    r703 r705  
    10491049        Int heightBL  = pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec()->getHeight();
    10501050#if Q0200_CONFORMANCE_BL_SIZE
    1051         const Window &confBL = pcSlice->getBaseColPic(refLayerIdc)->getConformanceWindow();
    1052         widthBL  -= confBL.getWindowLeftOffset() + confBL.getWindowRightOffset();
    1053         heightBL -= confBL.getWindowTopOffset() + confBL.getWindowBottomOffset();
     1051        Int chromaFormatIdc = pcSlice->getBaseColPic(refLayerIdc)->getSlice(0)->getChromaFormatIdc();
     1052        const Window &confBL = pcSlice->getBaseColPic(refLayerIdc)->getConformanceWindow();
     1053        widthBL  -= ( confBL.getWindowLeftOffset() + confBL.getWindowRightOffset() ) * TComSPS::getWinUnitX( chromaFormatIdc );
     1054        heightBL -= ( confBL.getWindowTopOffset() + confBL.getWindowBottomOffset() ) * TComSPS::getWinUnitY( chromaFormatIdc );
    10541055#endif
    10551056        Int widthEL   = pcPic->getPicYuvRec()->getWidth()  - scalEL.getWindowLeftOffset() - scalEL.getWindowRightOffset();
Note: See TracChangeset for help on using the changeset viewer.