Ignore:
Timestamp:
29 Jul 2014, 14:03:05 (10 years ago)
Author:
sharp
Message:

JCTVC-R0340 Resampling modifications (Macro:R0340_RESAMPLING_MODIFICATION)

Include generic phase (R0209), ref. region offset (R0013), move scaled ref offset to PPS (R0013), remove clip to scaled ref window (R0220) and ref offset signal change (R0220).

From: Tomoyuki Yamamoto <yamamoto.tomoyuki@…>

File:
1 edited

Legend:

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

    r839 r849  
    273273    {
    274274      WRITE_FLAG( pcPPS->getPocResetInfoPresentFlag() ? 1 : 0, "poc_reset_info_present_flag" );
     275#if REF_REGION_OFFSET
     276      WRITE_UVLC( pcPPS->getNumScaledRefLayerOffsets(),      "num_scaled_ref_layer_offsets" );
     277      for(Int i = 0; i < pcPPS->getNumScaledRefLayerOffsets(); i++)
     278      {
     279        WRITE_CODE( pcPPS->getScaledRefLayerId(i), 6, "scaled_ref_layer_id" );
     280        WRITE_FLAG( pcPPS->getScaledRefLayerOffsetPresentFlag(i) ? 1 : 0, "scaled_ref_layer_offset_prsent_flag" );
     281        if (pcPPS->getScaledRefLayerOffsetPresentFlag(i))
     282        {
     283          Window scaledWindow = pcPPS->getScaledRefLayerWindow(i);
     284          WRITE_SVLC( scaledWindow.getWindowLeftOffset()   >> 1, "scaled_ref_layer_left_offset" );
     285          WRITE_SVLC( scaledWindow.getWindowTopOffset()    >> 1, "scaled_ref_layer_top_offset" );
     286          WRITE_SVLC( scaledWindow.getWindowRightOffset()  >> 1, "scaled_ref_layer_right_offset" );
     287          WRITE_SVLC( scaledWindow.getWindowBottomOffset() >> 1, "scaled_ref_layer_bottom_offset" );
     288        }
     289        WRITE_FLAG( pcPPS->getRefRegionOffsetPresentFlag(i) ? 1 : 0, "ref_region_offset_prsent_flag" );
     290        if (pcPPS->getRefRegionOffsetPresentFlag(i))
     291        {
     292          Window refWindow = pcPPS->getRefLayerWindow(i);
     293          WRITE_SVLC( refWindow.getWindowLeftOffset()   >> 1, "ref_layer_left_offset" );
     294          WRITE_SVLC( refWindow.getWindowTopOffset()    >> 1, "ref_layer_top_offset" );
     295          WRITE_SVLC( refWindow.getWindowRightOffset()  >> 1, "ref_layer_right_offset" );
     296          WRITE_SVLC( refWindow.getWindowBottomOffset() >> 1, "ref_layer_bottom_offset" );
     297        }
     298#if R0209_GENERIC_PHASE
     299        WRITE_FLAG( pcPPS->getResamplePhaseSetPresentFlag(i) ? 1 : 0, "resample_phase_set_present_flag" );
     300        if (pcPPS->getResamplePhaseSetPresentFlag(i))
     301        {
     302          WRITE_UVLC( pcPPS->getPhaseHorLuma(i), "phase_hor_luma" );
     303          WRITE_UVLC( pcPPS->getPhaseVerLuma(i), "phase_ver_luma" );
     304          WRITE_UVLC( pcPPS->getPhaseHorChroma(i) + 8, "phase_hor_chroma_plus8" );
     305          WRITE_UVLC( pcPPS->getPhaseVerChroma(i) + 8, "phase_ver_chroma_plus8" );
     306        }
     307#endif
     308      }
     309#else
     310#if MOVE_SCALED_OFFSET_TO_PPS
     311      WRITE_UVLC( pcPPS->getNumScaledRefLayerOffsets(),      "num_scaled_ref_layer_offsets" );
     312      for(Int i = 0; i < pcPPS->getNumScaledRefLayerOffsets(); i++)
     313      {
     314        Window scaledWindow = pcPPS->getScaledRefLayerWindow(i);
     315#if O0098_SCALED_REF_LAYER_ID
     316        WRITE_CODE( pcPPS->getScaledRefLayerId(i), 6,          "scaled_ref_layer_id" );
     317#endif
     318        WRITE_SVLC( scaledWindow.getWindowLeftOffset()   >> 1, "scaled_ref_layer_left_offset" );
     319        WRITE_SVLC( scaledWindow.getWindowTopOffset()    >> 1, "scaled_ref_layer_top_offset" );
     320        WRITE_SVLC( scaledWindow.getWindowRightOffset()  >> 1, "scaled_ref_layer_right_offset" );
     321        WRITE_SVLC( scaledWindow.getWindowBottomOffset() >> 1, "scaled_ref_layer_bottom_offset" );
     322      }
     323#endif
     324#endif
    275325#if Q0048_CGS_3D_ASYMLUT
    276326      UInt uiPos = getNumberOfWrittenBits();
     
    672722  WRITE_FLAG( 0, "inter_view_mv_vert_constraint_flag" );
    673723
     724#if !MOVE_SCALED_OFFSET_TO_PPS
    674725  if( pcSPS->getLayerId() > 0 )
    675726  {
     
    690741    }
    691742  }
     743#endif
    692744}
    693745#endif //SVC_EXTENSION
Note: See TracChangeset for help on using the changeset viewer.