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/App/TAppEncoder/TAppEncTop.cpp

    r835 r849  
    351351        }
    352352      }
     353#if REF_REGION_OFFSET
     354      for(Int i = 0; i < m_acLayerCfg[layer].m_numScaledRefLayerOffsets; i++)
     355      {
     356#if AUXILIARY_PICTURES
     357        Int cf = m_acLayerCfg[i].m_chromaFormatIDC;
     358        Int rlSubWidthC  = ( cf == CHROMA_420 || cf == CHROMA_422 ) ? 2 : 1;
     359        Int rlSubHeightC = ( cf == CHROMA_420 ) ? 2 : 1;
     360#else
     361        Int rlSubWidthC  = 2;
     362        Int rlSubHeightC = 2;
     363#endif
     364        m_acTEncTop[layer].setRefRegionOffsetPresentFlag( i, m_acLayerCfg[layer].m_refRegionOffsetPresentFlag );
     365        m_acTEncTop[layer].getRefLayerWindow(i).setWindow( rlSubWidthC  * m_acLayerCfg[layer].m_refRegionLeftOffset[i], rlSubWidthC  * m_acLayerCfg[layer].m_refRegionRightOffset[i],
     366                                                           rlSubHeightC * m_acLayerCfg[layer].m_refRegionTopOffset[i],  rlSubHeightC * m_acLayerCfg[layer].m_refRegionBottomOffset[i]);
     367      }
     368#endif
    353369    }
    354370    else
     
    622638    if( layer > 0 )
    623639    {
     640#if REF_REGION_OFFSET
     641#if AUXILIARY_PICTURES
     642      Int cf = m_acLayerCfg[layer].m_chromaFormatIDC;
     643      Int subWidthC  = ( cf == CHROMA_420 || cf == CHROMA_422 ) ? 2 : 1;
     644      Int subHeightC = ( cf == CHROMA_420 ) ? 2 : 1;
     645#else
     646      Int subWidthC  = 2;
     647      Int subHeightC = 2;
     648#endif
     649#endif
    624650      m_acTEncTop[layer].setNumScaledRefLayerOffsets( m_acLayerCfg[layer].m_numScaledRefLayerOffsets );
    625651      for(Int i = 0; i < m_acLayerCfg[layer].m_numScaledRefLayerOffsets; i++)
     
    628654        m_acTEncTop[layer].setScaledRefLayerId(i, m_acLayerCfg[layer].m_scaledRefLayerId[i]);
    629655#endif
     656#if REF_REGION_OFFSET
     657        m_acTEncTop[layer].setScaledRefLayerOffsetPresentFlag( i, m_acLayerCfg[layer].m_scaledRefLayerOffsetPresentFlag[i] );
     658        m_acTEncTop[layer].getScaledRefLayerWindow(i).setWindow( subWidthC  * m_acLayerCfg[layer].m_scaledRefLayerLeftOffset[i], subWidthC  * m_acLayerCfg[layer].m_scaledRefLayerRightOffset[i],
     659                                                                 subHeightC * m_acLayerCfg[layer].m_scaledRefLayerTopOffset[i],  subHeightC * m_acLayerCfg[layer].m_scaledRefLayerBottomOffset[i]);
     660#else
    630661#if P0312_VERT_PHASE_ADJ
    631662        m_acTEncTop[layer].setVertPhasePositionEnableFlag( i, m_acLayerCfg[layer].m_vertPhasePositionEnableFlag[i] );
     
    635666        m_acTEncTop[layer].getScaledRefLayerWindow(i).setWindow( 2*m_acLayerCfg[layer].m_scaledRefLayerLeftOffset[i], 2*m_acLayerCfg[layer].m_scaledRefLayerRightOffset[i],
    636667                                                  2*m_acLayerCfg[layer].m_scaledRefLayerTopOffset[i], 2*m_acLayerCfg[layer].m_scaledRefLayerBottomOffset[i]);
     668#endif
     669#endif
     670#if R0209_GENERIC_PHASE
     671        m_acTEncTop[layer].setResamplePhaseSetPresentFlag( i, m_acLayerCfg[layer].m_resamplePhaseSetPresentFlag[i] );
     672        m_acTEncTop[layer].setPhaseHorLuma( i, m_acLayerCfg[layer].m_phaseHorLuma[i] );
     673        m_acTEncTop[layer].setPhaseVerLuma( i, m_acLayerCfg[layer].m_phaseVerLuma[i] );
     674        m_acTEncTop[layer].setPhaseHorChroma( i, m_acLayerCfg[layer].m_phaseHorChroma[i] );
     675        m_acTEncTop[layer].setPhaseVerChroma( i, m_acLayerCfg[layer].m_phaseVerChroma[i] );
    637676#endif
    638677      }
Note: See TracChangeset for help on using the changeset viewer.