Changeset 901 in SHVCSoftware


Ignore:
Timestamp:
6 Oct 2014, 22:50:44 (10 years ago)
Author:
seregin
Message:

implementation for equalPictureSizeAndOffsetFlag

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

Legend:

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

    r849 r901  
    35463546  if( motionMapping )
    35473547  {
    3548     // actually, motion field compression is performed in the Void TComPic::compressMotion() function, but with (+4) the rounding may have effect on the picture boundary check.
    3549     if( m_pcPic->isSpatialEnhLayer(refLayerIdc) )
    3550     {
     3548    if( m_pcPic->equalPictureSizeAndOffsetFlag(refLayerIdc) )
     3549    {
     3550      // copy motion field from the same sample position for the case of 1x scaling ratio and same offset value between the current and reference layers
     3551      iBX = pelX;
     3552      iBY = pelY;
     3553    }
     3554    else
     3555    {
     3556      // actually, motion field compression is performed in the Void TComPic::compressMotion() function, but with (+4) the rounding may have effect on the picture boundary check.
    35513557      iBX = ( ( iBX + 4 ) >> 4 ) << 4;
    35523558      iBY = ( ( iBY + 4 ) >> 4 ) << 4;
    3553     }
    3554     else
    3555     {
    3556       // copy motion field from the top left sample for 1x scaling ratio
    3557       iBX = pelX;
    3558       iBY = pelY;
    35593559    }
    35603560  }
  • TabularUnified branches/SHM-dev/source/Lib/TLibCommon/TComPic.cpp

    r880 r901  
    6464  memset( m_pcFullPelBaseRec, 0, sizeof( m_pcFullPelBaseRec ) );
    6565  memset( m_bSpatialEnhLayer, false, sizeof( m_bSpatialEnhLayer ) );
     66  memset( m_equalPictureSizeAndOffsetFlag, false, sizeof( m_equalPictureSizeAndOffsetFlag ) );
    6667#endif
    6768  m_apcPicYuv[0]      = NULL;
  • TabularUnified branches/SHM-dev/source/Lib/TLibCommon/TComPic.h

    r880 r901  
    8888  Bool                  m_bSpatialEnhLayer[MAX_LAYERS];       // whether current layer is a spatial enhancement layer,
    8989  TComPicYuv*           m_pcFullPelBaseRec[MAX_LAYERS];    // upsampled base layer recontruction for difference domain inter prediction
     90#if REF_IDX_MFM
     91  Bool                  m_equalPictureSizeAndOffsetFlag[MAX_LAYERS];
     92#endif
    9093#endif
    9194#if Q0048_CGS_3D_ASYMLUT
     
    203206#endif
    204207#if REF_IDX_MFM
     208  Bool          equalPictureSizeAndOffsetFlag(UInt refLayerIdc)             { return m_equalPictureSizeAndOffsetFlag[refLayerIdc]; }
     209  Void          setEqualPictureSizeAndOffsetFlag(UInt refLayerIdc, Bool b)  { m_equalPictureSizeAndOffsetFlag[refLayerIdc] = b;    }
    205210  Void          copyUpsampledMvField  ( UInt refLayerIdc, TComPic* pcPicBase );
    206211  Void          initUpsampledMvField  ();
  • TabularUnified branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.cpp

    r884 r901  
    407407        Bool sameBitDepths = ( g_bitDepthYLayer[m_layerId] == g_bitDepthYLayer[refLayerId] ) && ( g_bitDepthCLayer[m_layerId] == g_bitDepthCLayer[refLayerId] );
    408408
     409#if REF_IDX_MFM
     410        if( pcPicYuvRecBase->getWidth() == pcSlice->getPicWidthInLumaSamples() && pcPicYuvRecBase->getHeight() == pcSlice->getPicHeightInLumaSamples() && equalOffsets && zeroPhase )
     411        {
     412          rpcPic->setEqualPictureSizeAndOffsetFlag( i, true );
     413        }
     414
     415        if( !rpcPic->equalPictureSizeAndOffsetFlag(i) || !sameBitDepths
     416#else
    409417        if( pcPicYuvRecBase->getWidth() != pcSlice->getPicWidthInLumaSamples() || pcPicYuvRecBase->getHeight() != pcSlice->getPicHeightInLumaSamples() || !sameBitDepths
    410418#if REF_REGION_OFFSET && RESAMPLING_FIX
     
    415423#else
    416424          || !zeroOffsets
     425#endif
    417426#endif
    418427#if Q0048_CGS_3D_ASYMLUT
  • TabularUnified branches/SHM-dev/source/Lib/TLibEncoder/TEncTop.cpp

    r898 r901  
    820820          Bool sameBitDepths = ( g_bitDepthYLayer[m_layerId] == g_bitDepthYLayer[refLayerId] ) && ( g_bitDepthCLayer[m_layerId] == g_bitDepthCLayer[refLayerId] );
    821821
     822#if REF_IDX_MFM
     823          if( m_iSourceWidth == pcEncTopBase->getSourceWidth() && m_iSourceHeight == pcEncTopBase->getSourceHeight() && equalOffsets && zeroPhase )
     824          {
     825            pcEPic->setEqualPictureSizeAndOffsetFlag( i, true );
     826          }
     827
     828          if( !pcEPic->equalPictureSizeAndOffsetFlag(i) || !sameBitDepths
     829#else
    822830          if( m_iSourceWidth != pcEncTopBase->getSourceWidth() || m_iSourceHeight != pcEncTopBase->getSourceHeight() || !sameBitDepths
    823831#if REF_REGION_OFFSET && RESAMPLING_FIX
     
    828836#else
    829837            || !zeroOffsets
     838#endif
    830839#endif
    831840#if Q0048_CGS_3D_ASYMLUT
Note: See TracChangeset for help on using the changeset viewer.