Changeset 1431 in SHVCSoftware


Ignore:
Timestamp:
10 Aug 2015, 20:28:49 (9 years ago)
Author:
seregin
Message:

scaling factors 1x

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

Legend:

Unmodified
Added
Removed
  • branches/SHM-dev/source/Lib/TLibCommon/CommonDef.h

    r1394 r1431  
    121121static const Double MAX_DOUBLE =                             1.7e+308; ///< max. value of Double-type value
    122122
     123#if SVC_EXTENSION
     124static const Int    POS_SCALING_FACTOR_1X =                     65536; ///< position scaling factor equal to 1x
     125static const Int    MV_SCALING_FACTOR_1X =                      4096 ; ///< MV scaling factor equal to 1x
     126#endif
     127
    123128// ====================================================================================================================
    124129// Coding tool configuration
  • branches/SHM-dev/source/Lib/TLibCommon/TComMv.h

    r1408 r1431  
    167167  const TComMv scaleMv( Int iScaleX, Int iScaleY ) const
    168168  {
    169     Int mvx = iScaleX == 4096 ? getHor() : Clip3( -32768, 32767, (iScaleX * getHor() + 127 + (iScaleX * getHor() < 0)) >> 8 );
    170     Int mvy = iScaleY == 4096 ? getVer() : Clip3( -32768, 32767, (iScaleY * getVer() + 127 + (iScaleY * getVer() < 0)) >> 8 );
     169    Int mvx = iScaleX == MV_SCALING_FACTOR_1X ? getHor() : Clip3( -32768, 32767, (iScaleX * getHor() + 127 + (iScaleX * getHor() < 0)) >> 8 );
     170    Int mvy = iScaleY == MV_SCALING_FACTOR_1X ? getVer() : Clip3( -32768, 32767, (iScaleY * getVer() + 127 + (iScaleY * getVer() < 0)) >> 8 );
    171171    return TComMv( mvx, mvy );
    172172  }
  • branches/SHM-dev/source/Lib/TLibCommon/TComSlice.cpp

    r1419 r1431  
    510510        // motion resampling constraint
    511511        // Allow maximum of one motion resampling process for direct reference layers, and use motion inter-layer prediction from the same layer as texture inter-layer prediction
    512         if( !( m_pcPic->getPosScalingFactor(refLayerIdc, 0) == 65536 && m_pcPic->getPosScalingFactor(refLayerIdc, 1) == 65536 ) || !scalingOffset || !sameBitDepths
     512        if( !( m_pcPic->getPosScalingFactor(refLayerIdc, 0) == POS_SCALING_FACTOR_1X && m_pcPic->getPosScalingFactor(refLayerIdc, 1) == POS_SCALING_FACTOR_1X ) || !scalingOffset || !sameBitDepths
    513513#if CGS_3D_ASYMLUT
    514514          || getPPS()->getCGSFlag()
  • branches/SHM-dev/source/Lib/TLibCommon/TComUpsampleFilter.cpp

    r1430 r1431  
    113113
    114114  // non-normative software optimization for certain simple resampling cases
    115   if( scaleX == 65536 && scaleY == 65536 ) // ratio 1x
     115  if( scaleX == POS_SCALING_FACTOR_1X && scaleY == POS_SCALING_FACTOR_1X ) // ratio 1x
    116116  {
    117117    piSrcY = piSrcBufY;
  • branches/SHM-dev/source/Lib/TLibDecoder/TDecGop.cpp

    r1419 r1431  
    219219        assert( pcSlice->getPic()->getPosScalingFactor(refLayerIdc, 1) );
    220220
    221         printf( "%d(%d, {%1.2f, %1.2f}x)", pcSlice->getRefPOC(RefPicList(iRefList), iRefIndex), refLayerId, 65536.0/pcSlice->getPic()->getPosScalingFactor(refLayerIdc, 0), 65536.0/pcSlice->getPic()->getPosScalingFactor(refLayerIdc, 1) );
     221        printf( "%d(%d, {%1.2f, %1.2f}x)", pcSlice->getRefPOC(RefPicList(iRefList), iRefIndex), refLayerId, (Double)POS_SCALING_FACTOR_1X/pcSlice->getPic()->getPosScalingFactor(refLayerIdc, 0), (Double)POS_SCALING_FACTOR_1X/pcSlice->getPic()->getPosScalingFactor(refLayerIdc, 1) );
    222222      }
    223223      else
  • branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.cpp

    r1428 r1431  
    16581658
    16591659        m_pcPic->setMvScalingFactor( refLayerIdc,
    1660                                      widthEL  == widthBL  ? 4096 : Clip3(-4096, 4095, ((widthEL  << 8) + (widthBL  >> 1)) / widthBL),
    1661                                      heightEL == heightBL ? 4096 : Clip3(-4096, 4095, ((heightEL << 8) + (heightBL >> 1)) / heightBL) );
     1660                                     widthEL  == widthBL  ? MV_SCALING_FACTOR_1X : Clip3(-4096, 4095, ((widthEL  << 8) + (widthBL  >> 1)) / widthBL),
     1661                                     heightEL == heightBL ? MV_SCALING_FACTOR_1X : Clip3(-4096, 4095, ((heightEL << 8) + (heightBL >> 1)) / heightBL) );
    16621662
    16631663        m_pcPic->setPosScalingFactor( refLayerIdc,
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncGOP.cpp

    r1430 r1431  
    17841784
    17851785        pcSlice->getPic()->setMvScalingFactor( refLayerIdc,
    1786                                                widthEL  == widthBL  ? 4096 : Clip3(-4096, 4095, ((widthEL  << 8) + (widthBL  >> 1)) / widthBL),
    1787                                                heightEL == heightBL ? 4096 : Clip3(-4096, 4095, ((heightEL << 8) + (heightBL >> 1)) / heightBL) );
     1786                                               widthEL  == widthBL  ? MV_SCALING_FACTOR_1X : Clip3(-4096, 4095, ((widthEL  << 8) + (widthBL  >> 1)) / widthBL),
     1787                                               heightEL == heightBL ? MV_SCALING_FACTOR_1X : Clip3(-4096, 4095, ((heightEL << 8) + (heightBL >> 1)) / heightBL) );
    17881788
    17891789        pcSlice->getPic()->setPosScalingFactor( refLayerIdc,
     
    17991799          m_Enc3DAsymLUTPicUpdate.addRefLayerId( pcSlice->getVPS()->getRefLayerId(m_layerId, refLayerIdc) );
    18001800
    1801           if( pcSlice->getPic()->getPosScalingFactor(refLayerIdc, 0) < (1<<16) || pcSlice->getPic()->getPosScalingFactor(refLayerIdc, 1) < (1<<16) ) //if(pcPic->isSpatialEnhLayer(refLayerIdc))
     1801          if( pcSlice->getPic()->getPosScalingFactor(refLayerIdc, 0) < POS_SCALING_FACTOR_1X || pcSlice->getPic()->getPosScalingFactor(refLayerIdc, 1) < POS_SCALING_FACTOR_1X ) //if(pcPic->isSpatialEnhLayer(refLayerIdc))
    18021802          {
    18031803            //downsampling
     
    33123312        assert( pcSlice->getPic()->getPosScalingFactor(refLayerIdc, 1) );
    33133313
    3314         printf( "%d(%d, {%1.2f, %1.2f}x)", pcSlice->getRefPOC(RefPicList(iRefList), iRefIndex), refLayerId, 65536.0/pcSlice->getPic()->getPosScalingFactor(refLayerIdc, 0), 65536.0/pcSlice->getPic()->getPosScalingFactor(refLayerIdc, 1) );
     3314        printf( "%d(%d, {%1.2f, %1.2f}x)", pcSlice->getRefPOC(RefPicList(iRefList), iRefIndex), refLayerId, (Double)POS_SCALING_FACTOR_1X/pcSlice->getPic()->getPosScalingFactor(refLayerIdc, 0), (Double)POS_SCALING_FACTOR_1X/pcSlice->getPic()->getPosScalingFactor(refLayerIdc, 1) );
    33153315      }
    33163316      else
Note: See TracChangeset for help on using the changeset viewer.