Changeset 1035 in SHVCSoftware for branches/SHM-dev/source


Ignore:
Timestamp:
27 Feb 2015, 19:52:41 (10 years ago)
Author:
seregin
Message:

fix for the ticket #69

Location:
branches/SHM-dev/source/Lib
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-dev/source/Lib/TLibCommon/TComSlice.cpp

    r1034 r1035  
    32353235  static Window win;
    32363236
    3237   for (Int i = 0; i < m_numRefLayerLocationOffsets; i++)
    3238   {
    3239     if (layerId == m_refLocationOffsetLayerId[i])
     3237  for( Int i = m_numRefLayerLocationOffsets; i > 0; i-- )
     3238  {
     3239    if( layerId == m_refLocationOffsetLayerId[i] )
    32403240    {
    32413241      return m_scaledRefLayerWindow[i];
     
    32523252  static Window win;
    32533253
    3254   for (Int i = 0; i < m_numRefLayerLocationOffsets; i++)
    3255   {
    3256     if (layerId == m_refLocationOffsetLayerId[i])
     3254  for( Int i = m_numRefLayerLocationOffsets; i > 0; i-- )
     3255  {
     3256    if( layerId == m_refLocationOffsetLayerId[i] )
    32573257    {
    32583258      return m_refLayerWindow[i];
     
    32673267#if RESAMPLING_FIX
    32683268#if R0209_GENERIC_PHASE
    3269 Bool TComPPS::hasZeroResamplingPhase(Int refLayerIdc)
    3270 {
    3271   Int phaseHorLuma   = this->getPhaseHorLuma(refLayerIdc);
    3272   Int phaseVerLuma   = this->getPhaseVerLuma(refLayerIdc);
    3273   Int phaseHorChroma = this->getPhaseHorChroma(refLayerIdc);
    3274   Int phaseVerChroma = this->getPhaseVerChroma(refLayerIdc);
     3269Bool TComPPS::hasZeroResamplingPhase(Int refLayerId)
     3270{
     3271  Bool phaseSetPresentFlag;
     3272  Int phaseHorLuma, phaseVerLuma, phaseHorChroma, phaseVerChroma;
     3273
     3274  getResamplingPhase(refLayerId, phaseSetPresentFlag, phaseHorLuma, phaseVerLuma, phaseHorChroma, phaseVerChroma);
     3275
    32753276  return ( phaseHorLuma == 0 && phaseHorChroma == 0 && phaseVerLuma == 0 && phaseVerChroma == 0);
     3277}
     3278
     3279Void TComPPS::getResamplingPhase(Int refLayerId, Bool& phaseSetPresentFlag, Int& phaseHorLuma, Int& phaseVerLuma, Int& phaseHorChroma, Int& phaseVerChroma)
     3280{
     3281  phaseSetPresentFlag = false;
     3282  phaseHorLuma = 0, phaseVerLuma = 0, phaseHorChroma = 0, phaseVerChroma = 0;
     3283
     3284  for( Int i = m_numRefLayerLocationOffsets; i > 0; i-- )
     3285  {
     3286    if( refLayerId == m_refLocationOffsetLayerId[i] )
     3287    {
     3288      phaseSetPresentFlag = m_resamplePhaseSetPresentFlag[i];
     3289      phaseHorLuma        = m_phaseHorLuma[i];
     3290      phaseVerLuma        = m_phaseVerLuma[i];
     3291      phaseHorChroma      = m_phaseHorChroma[i];
     3292      phaseVerChroma      = m_phaseVerChroma[i];
     3293
     3294      return;
     3295    }
     3296  }
    32763297}
    32773298#endif
  • branches/SHM-dev/source/Lib/TLibCommon/TComSlice.h

    r1030 r1035  
    22492249  Void setResamplePhaseSetPresentFlag(Int x, Bool b) { m_resamplePhaseSetPresentFlag[x] = b; }
    22502250#if RESAMPLING_FIX
    2251   Bool hasZeroResamplingPhase(Int layerId);
     2251  Bool hasZeroResamplingPhase(Int refLayerId);
     2252  Void getResamplingPhase(Int refLayerId, Bool& phaseSetPresentFlag, Int& phaseHorLuma, Int& phaseVerLuma, Int& phaseHorChroma, Int& phaseVerChroma);
    22522253#endif
    22532254#endif
  • branches/SHM-dev/source/Lib/TLibCommon/TComUpsampleFilter.cpp

    r1029 r1035  
    118118#endif
    119119#if R0209_GENERIC_PHASE
    120   Int phaseHorLuma   = currSlice->getPPS()->getPhaseHorLuma(refLayerIdc);
    121   Int phaseVerLuma   = currSlice->getPPS()->getPhaseVerLuma(refLayerIdc);
    122   Int phaseHorChroma = currSlice->getPPS()->getPhaseHorChroma(refLayerIdc);
    123   Int phaseVerChroma;
    124   if (currSlice->getPPS()->getResamplePhaseSetPresentFlag(refLayerIdc))
    125   {
    126     phaseVerChroma = currSlice->getPPS()->getPhaseVerChroma(refLayerIdc);
    127   }
    128   else
     120  Bool phaseSetPresentFlag;
     121  Int phaseHorLuma, phaseVerLuma, phaseHorChroma, phaseVerChroma; 
     122  currSlice->getPPS()->getResamplingPhase( refLayerId, phaseSetPresentFlag, phaseHorLuma, phaseVerLuma, phaseHorChroma, phaseVerChroma );
     123
     124  if( !phaseSetPresentFlag )
    129125  {
    130126    Int refRegionHeight = heightBL - windowRL.getWindowTopOffset() - windowRL.getWindowBottomOffset();
  • branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.cpp

    r1029 r1035  
    20382038#if R0209_GENERIC_PHASE
    20392039        // conformance check: when ScaledRefRegionWidthInSamplesY is equal to RefLayerRegionWidthInSamplesY, PhaseHorY shall be equal to 0, when ScaledRefRegionWidthInSamplesC is equal to RefLayerRegionWidthInSamplesC, PhaseHorC shall be equal to 0, when ScaledRefRegionHeightInSamplesY is equal to RefLayerRegionHeightInSamplesY, PhaseVerY shall be equal to 0, and when ScaledRefRegionHeightInSamplesC is equal to RefLayerRegionHeightInSamplesC, PhaseVerC shall be equal to 0.
    2040         Int phaseHorLuma   = pcSlice->getPPS()->getPhaseHorLuma(refLayerIdc);
    2041         Int phaseVerLuma   = pcSlice->getPPS()->getPhaseVerLuma(refLayerIdc);
    2042         Int phaseHorChroma = pcSlice->getPPS()->getPhaseHorChroma(refLayerIdc);
    2043         Int phaseVerChroma = pcSlice->getPPS()->getPhaseVerChroma(refLayerIdc);
     2040        Bool phaseSetPresentFlag;
     2041        Int phaseHorLuma, phaseVerLuma, phaseHorChroma, phaseVerChroma;
     2042        pcSlice->getPPS()->getResamplingPhase( refLayerId, phaseSetPresentFlag, phaseHorLuma, phaseVerLuma, phaseHorChroma, phaseVerChroma );
     2043
    20442044        assert( ( (widthEL  != widthBL)  || (phaseHorLuma == 0 && phaseHorChroma == 0) )
    20452045             && ( (heightEL != heightBL) || (phaseVerLuma == 0 && phaseVerChroma == 0) ) );
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncGOP.cpp

    r1029 r1035  
    13461346#if R0209_GENERIC_PHASE
    13471347        // conformance check: when ScaledRefRegionWidthInSamplesY is equal to RefLayerRegionWidthInSamplesY, PhaseHorY shall be equal to 0, when ScaledRefRegionWidthInSamplesC is equal to RefLayerRegionWidthInSamplesC, PhaseHorC shall be equal to 0, when ScaledRefRegionHeightInSamplesY is equal to RefLayerRegionHeightInSamplesY, PhaseVerY shall be equal to 0, and when ScaledRefRegionHeightInSamplesC is equal to RefLayerRegionHeightInSamplesC, PhaseVerC shall be equal to 0.
    1348         Int phaseHorLuma   = pcSlice->getPPS()->getPhaseHorLuma(refLayerIdc);
    1349         Int phaseVerLuma   = pcSlice->getPPS()->getPhaseVerLuma(refLayerIdc);
    1350         Int phaseHorChroma = pcSlice->getPPS()->getPhaseHorChroma(refLayerIdc);
    1351         Int phaseVerChroma = pcSlice->getPPS()->getPhaseVerChroma(refLayerIdc);
     1348        Bool phaseSetPresentFlag;
     1349        Int phaseHorLuma, phaseVerLuma, phaseHorChroma, phaseVerChroma;
     1350        pcSlice->getPPS()->getResamplingPhase( refLayerId, phaseSetPresentFlag, phaseHorLuma, phaseVerLuma, phaseHorChroma, phaseVerChroma );
     1351
    13521352        assert( ( (widthEL  != widthBL)  || (phaseHorLuma == 0 && phaseHorChroma == 0) )
    13531353             && ( (heightEL != heightBL) || (phaseVerLuma == 0 && phaseVerChroma == 0) ) );
Note: See TracChangeset for help on using the changeset viewer.