Changeset 1419 in SHVCSoftware


Ignore:
Timestamp:
5 Aug 2015, 03:02:48 (9 years ago)
Author:
seregin
Message:

remove global variables g_mvScalingFactor and g_posScalingFactor, and make them TComPic members

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

Legend:

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

    r1418 r1419  
    32763276
    32773277#if SVC_EXTENSION
    3278 TComDataCU* TComDataCU::getBaseColCU( UInt refLayerIdc, UInt uiCuAbsPartIdx, UInt &uiCUAddrBase, UInt &uiAbsPartIdxBase, Bool motionMapping )
     3278TComDataCU* TComDataCU::getBaseColCU( UInt refLayerIdc, UInt uiCuAbsPartIdx, UInt &uiCUAddrBase, UInt &uiAbsPartIdxBase, Int** petPosScalingFactor, Bool motionMapping )
    32793279{
    32803280  UInt uiPelX = getCUPelX() + g_auiRasterToPelX[ g_auiZscanToRaster[uiCuAbsPartIdx] ];
    32813281  UInt uiPelY = getCUPelY() + g_auiRasterToPelY[ g_auiZscanToRaster[uiCuAbsPartIdx] ];
    32823282
    3283   return getBaseColCU( refLayerIdc, uiPelX, uiPelY, uiCUAddrBase, uiAbsPartIdxBase, motionMapping );
    3284 }
    3285 
    3286 TComDataCU* TComDataCU::getBaseColCU( UInt refLayerIdc, UInt pelX, UInt pelY, UInt &uiCUAddrBase, UInt &uiAbsPartIdxBase, Bool motionMapping )
     3283  return getBaseColCU( refLayerIdc, uiPelX, uiPelY, uiCUAddrBase, uiAbsPartIdxBase, petPosScalingFactor, motionMapping );
     3284}
     3285
     3286TComDataCU* TComDataCU::getBaseColCU( UInt refLayerIdc, UInt pelX, UInt pelY, UInt &uiCUAddrBase, UInt &uiAbsPartIdxBase, Int** posScalingFactor, Bool motionMapping )
    32873287{
    32883288  TComPic* baseColPic = m_pcSlice->getBaseColPic(refLayerIdc);
     
    33023302
    33033303  const Window &windowRL = m_pcSlice->getPPS()->getRefLayerWindowForLayer(baseColPic->getSlice(0)->getVPS()->getRefLayerId(getSlice()->getLayerId(), refLayerIdc));
    3304   Int iBX = (((iPelX - leftStartL)*g_posScalingFactor[refLayerIdc][0] + (1<<15)) >> 16) + windowRL.getWindowLeftOffset();
    3305   Int iBY = (((iPelY - topStartL )*g_posScalingFactor[refLayerIdc][1] + (1<<15)) >> 16) + windowRL.getWindowTopOffset();
     3304  Int iBX = (((iPelX - leftStartL) * posScalingFactor[0][refLayerIdc] + (1<<15)) >> 16) + windowRL.getWindowLeftOffset();
     3305  Int iBY = (((iPelY - topStartL ) * posScalingFactor[1][refLayerIdc] + (1<<15)) >> 16) + windowRL.getWindowTopOffset();
    33063306
    33073307  // offset for collocated block in the motion mapping
     
    33463346}
    33473347
    3348 Void TComDataCU::scaleBaseMV( UInt refLayerIdc, TComMvField& rcMvFieldEnhance, TComMvField& rcMvFieldBase )
     3348Void TComDataCU::scaleBaseMV( UInt refLayerIdc, TComMvField& rcMvFieldEnhance, TComMvField& rcMvFieldBase, Int** mvScalingFactor )
    33493349{
    33503350  TComMvField cMvFieldBase;
    33513351  TComMv cMv;
    33523352
    3353   cMv = rcMvFieldBase.getMv().scaleMv( g_mvScalingFactor[refLayerIdc][0], g_mvScalingFactor[refLayerIdc][1] );
     3353  cMv = rcMvFieldBase.getMv().scaleMv( mvScalingFactor[0][refLayerIdc], mvScalingFactor[1][refLayerIdc] );
    33543354
    33553355  rcMvFieldEnhance.setMvField( cMv, rcMvFieldBase.getRefIdx() );
  • branches/SHM-dev/source/Lib/TLibCommon/TComDataCU.h

    r1418 r1419  
    490490  Bool          xCheckZeroMVILRMvdL1Zero(Int iRefList, Int iRefIdx, Int MvpIdx);
    491491#endif
    492   TComDataCU*   getBaseColCU( UInt refLayerIdc, UInt uiCuAbsPartIdx, UInt &uiCUAddrBase, UInt &uiAbsPartIdxBase, Bool motionMapping = false );
    493   TComDataCU*   getBaseColCU( UInt refLayerIdc, UInt pelX, UInt pelY, UInt &uiCUAddrBase, UInt &uiAbsPartIdxBase, Bool motionMapping = false );
    494   Void          scaleBaseMV( UInt refLayerIdc, TComMvField& rcMvFieldEnhance, TComMvField& rcMvFieldBase );
     492  TComDataCU*   getBaseColCU( UInt refLayerIdc, UInt uiCuAbsPartIdx, UInt &uiCUAddrBase, UInt &uiAbsPartIdxBase, Int** posScalingFactor, Bool motionMapping = false );
     493  TComDataCU*   getBaseColCU( UInt refLayerIdc, UInt pelX, UInt pelY, UInt &uiCUAddrBase, UInt &uiAbsPartIdxBase, Int** posScalingFactor, Bool motionMapping = false );
     494  Void          scaleBaseMV( UInt refLayerIdc, TComMvField& rcMvFieldEnhance, TComMvField& rcMvFieldBase, Int** mvScalingFactor );
    495495#if FAST_INTRA_SHVC
    496496  UChar         getReducedSetIntraModes(UChar idx)     { assert( idx < NUM_INTRA_MODE-1 ); return m_reducedSetIntraModes[idx]; }
  • branches/SHM-dev/source/Lib/TLibCommon/TComPic.cpp

    r1290 r1419  
    6464  memset( m_bSpatialEnhLayer, false, sizeof( m_bSpatialEnhLayer ) );
    6565  memset( m_equalPictureSizeAndOffsetFlag, false, sizeof( m_equalPictureSizeAndOffsetFlag ) );
     66  memset( m_mvScalingFactor, NULL, sizeof( m_mvScalingFactor ) );
     67  memset( m_posScalingFactor, NULL, sizeof( m_posScalingFactor ) );
    6668#endif
    6769  for(UInt i=0; i<NUM_PIC_YUV; i++)
     
    160162      delete m_pcFullPelBaseRec[i];
    161163      m_pcFullPelBaseRec[i]  = NULL;
     164    }
     165  }
     166
     167  for( Int comp = 0; comp < 2; comp++ )
     168  {
     169    if( m_mvScalingFactor[comp] )
     170    {
     171      delete [] m_mvScalingFactor[comp];
     172      m_mvScalingFactor[comp] = NULL;
     173    }
     174
     175    if( m_posScalingFactor[comp] )
     176    {
     177      delete [] m_posScalingFactor[comp];
     178      m_posScalingFactor[comp] = NULL;
    162179    }
    163180  }
     
    220237
    221238#if SVC_EXTENSION
     239Void TComPic::createMvScalingFactor(UInt numOfILRPs)
     240{
     241  assert(m_mvScalingFactor[0] == NULL);
     242  m_mvScalingFactor[0] = new Int[numOfILRPs];
     243
     244  assert(m_mvScalingFactor[1] == NULL);
     245  m_mvScalingFactor[1] = new Int[numOfILRPs];
     246}
     247
     248Void TComPic::createPosScalingFactor(UInt numOfILRPs)
     249{
     250  assert(m_posScalingFactor[0] == NULL);
     251  m_posScalingFactor[0] = new Int[numOfILRPs];
     252
     253  assert(m_posScalingFactor[1] == NULL);
     254  m_posScalingFactor[1] = new Int[numOfILRPs];
     255}
     256
    222257Void copyOnetoOnePicture(    // SVC_NONCOLL
    223258                  Pel *in,       
     
    262297}
    263298
    264 Void TComPic::copyUpsampledMvField(UInt refLayerIdc)
     299Void TComPic::copyUpsampledMvField(UInt refLayerIdc, Int** mvScalingFactor, Int** posScalingFactor)
    265300{
    266301  const TComSPS *sps       = getSlice(0)->getSPS();
     
    283318
    284319      TComDataCU *pcColCU = 0;
    285       pcColCU = pcCUDes->getBaseColCU(refLayerIdc, pelX, pelY, baseCUAddr, baseAbsPartIdx, true);
     320      pcColCU = pcCUDes->getBaseColCU(refLayerIdc, pelX, pelY, baseCUAddr, baseAbsPartIdx, posScalingFactor, true);
    286321
    287322      if( pcColCU && pcColCU->getPredictionMode(baseAbsPartIdx) == MODE_INTER )  //base layer unit not skip and invalid mode
     
    291326          TComMvField sMvFieldBase, sMvField;
    292327          pcColCU->getMvField( pcColCU, baseAbsPartIdx, (RefPicList)refPicList, sMvFieldBase);
    293           pcCUDes->scaleBaseMV( refLayerIdc, sMvField, sMvFieldBase );
     328          pcCUDes->scaleBaseMV( refLayerIdc, sMvField, sMvFieldBase, mvScalingFactor );
    294329
    295330          pcCUDes->getCUMvField((RefPicList)refPicList)->setMvField(sMvField, absPartIdx);
  • branches/SHM-dev/source/Lib/TLibCommon/TComPic.h

    r1383 r1419  
    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   Bool                  m_equalPictureSizeAndOffsetFlag[MAX_LAYERS];
     90  Bool                  m_equalPictureSizeAndOffsetFlag[MAX_LAYERS];
     91  Int*                  m_mvScalingFactor[2];
     92  Int*                  m_posScalingFactor[2];
    9193#if CGS_3D_ASYMLUT
    9294  Int                   m_nFrameBit;
     
    199201  Bool          equalPictureSizeAndOffsetFlag(UInt refLayerIdc)             { return m_equalPictureSizeAndOffsetFlag[refLayerIdc];       }
    200202  Void          setEqualPictureSizeAndOffsetFlag(UInt refLayerIdc, Bool b)  { m_equalPictureSizeAndOffsetFlag[refLayerIdc] = b;          }
    201   Void          copyUpsampledMvField(UInt refLayerIdc);
     203  Void          copyUpsampledMvField(UInt refLayerIdc, Int** mvScalingFactor, Int** posScalingFactor);
    202204  Void          initUpsampledMvField();
    203205  Bool          checkSameRefInfo();
    204   Void          copyUpsampledPictureYuv(TComPicYuv*   pcPicYuvIn, TComPicYuv*   pcPicYuvOut);
     206  Void          copyUpsampledPictureYuv(TComPicYuv* pcPicYuvIn, TComPicYuv* pcPicYuvOut);
     207  Void          setMvScalingFactor(UInt refLayerIdc, Int compX, Int compY)  { m_mvScalingFactor[0][refLayerIdc] = compX; m_mvScalingFactor[1][refLayerIdc] = compY;   }
     208  Void          setPosScalingFactor(UInt refLayerIdc, Int compX, Int compY) { m_posScalingFactor[0][refLayerIdc] = compX; m_posScalingFactor[1][refLayerIdc] = compY; }
     209  Int           getMvScalingFactor(UInt refLayerIdc, UChar comp) const      { return m_mvScalingFactor[comp][refLayerIdc];  }
     210  Int           getPosScalingFactor(UInt refLayerIdc, UChar comp) const     { return m_posScalingFactor[comp][refLayerIdc]; }
     211  Int**         getPosScalingFactor()                                       { return m_posScalingFactor; }
     212  Int**         getMvScalingFactor()                                        { return m_mvScalingFactor;  }
     213  Void          createMvScalingFactor(UInt numOfILRPs);
     214  Void          createPosScalingFactor(UInt numOfILRPs);
    205215#if CGS_3D_ASYMLUT
    206216  Void          setFrameBit( Int n )                                        { m_nFrameBit = n;     }
  • branches/SHM-dev/source/Lib/TLibCommon/TComRom.cpp

    r1418 r1419  
    725725const UInt g_scalingListSizeX  [SCALING_LIST_SIZE_NUM] = { 4, 8, 16,  32};
    726726
    727 #if SVC_EXTENSION
    728 Int g_mvScalingFactor  [MAX_LAYERS][2] = {{0,0}, {0,0}};
    729 Int g_posScalingFactor [MAX_LAYERS][2] = {{0,0}, {0,0}};
    730727#if LAYER_CTB
    731728UInt g_auiLayerZscanToRaster[MAX_LAYERS][ MAX_NUM_SPU_W*MAX_NUM_SPU_W ];
     
    734731UInt g_auiLayerRasterToPelY[MAX_LAYERS][ MAX_NUM_SPU_W*MAX_NUM_SPU_W ];
    735732#endif
    736 #endif //SVC_EXTENSION
    737733
    738734//! \}
  • branches/SHM-dev/source/Lib/TLibCommon/TComRom.h

    r1418 r1419  
    171171extern const UInt g_scalingListSizeX[SCALING_LIST_SIZE_NUM];
    172172
    173 #if SVC_EXTENSION
    174 extern Int g_mvScalingFactor  [MAX_LAYERS][2];
    175 extern Int g_posScalingFactor [MAX_LAYERS][2];
    176173#if LAYER_CTB
    177174extern       UInt g_auiLayerZscanToRaster[MAX_LAYERS][ MAX_NUM_SPU_W*MAX_NUM_SPU_W ];
     
    180177extern       UInt g_auiLayerRasterToPelY[MAX_LAYERS][ MAX_NUM_SPU_W*MAX_NUM_SPU_W ];
    181178#endif
    182 #endif //SVC_EXTENSION
    183179
    184180//! \}
  • branches/SHM-dev/source/Lib/TLibCommon/TComSlice.cpp

    r1414 r1419  
    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( !( g_posScalingFactor[refLayerIdc][0] == 65536 && g_posScalingFactor[refLayerIdc][1] == 65536 ) || !scalingOffset || !sameBitDepths
     512        if( !( m_pcPic->getPosScalingFactor(refLayerIdc, 0) == 65536 && m_pcPic->getPosScalingFactor(refLayerIdc, 1) == 65536 ) || !scalingOffset || !sameBitDepths
    513513#if CGS_3D_ASYMLUT
    514514          || getPPS()->getCGSFlag()
     
    36373637        }
    36383638
    3639         pcIlpPic[refLayerIdc]->copyUpsampledMvField(refLayerIdc);
     3639        pcIlpPic[refLayerIdc]->copyUpsampledMvField( refLayerIdc, m_pcPic->getMvScalingFactor(), m_pcPic->getPosScalingFactor() );
    36403640      }
    36413641      else
  • branches/SHM-dev/source/Lib/TLibCommon/TComUpsampleFilter.cpp

    r1335 r1419  
    109109  Pel* piDstV;
    110110
    111   Int scaleX = g_posScalingFactor[refLayerIdc][0];
    112   Int scaleY = g_posScalingFactor[refLayerIdc][1];
     111  Int scaleX = currSlice->getPic()->getPosScalingFactor(refLayerIdc, 0);
     112  Int scaleY = currSlice->getPic()->getPosScalingFactor(refLayerIdc, 1);
    113113
    114114  // non-normative software optimization for certain simple resampling cases
  • branches/SHM-dev/source/Lib/TLibDecoder/TDecGop.cpp

    r1353 r1419  
    216216        UInt refLayerId = pcSlice->getRefPic(RefPicList(iRefList), iRefIndex)->getLayerId();
    217217        UInt refLayerIdc = pcSlice->getReferenceLayerIdc(refLayerId);
    218         assert( g_posScalingFactor[refLayerIdc][0] );
    219         assert( g_posScalingFactor[refLayerIdc][1] );
    220 
    221         printf( "%d(%d, {%1.2f, %1.2f}x)", pcSlice->getRefPOC(RefPicList(iRefList), iRefIndex), refLayerId, 65536.0/g_posScalingFactor[refLayerIdc][0], 65536.0/g_posScalingFactor[refLayerIdc][1] );
     218        assert( pcSlice->getPic()->getPosScalingFactor(refLayerIdc, 0) );
     219        assert( pcSlice->getPic()->getPosScalingFactor(refLayerIdc, 1) );
     220
     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) );
    222222      }
    223223      else
  • branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.cpp

    r1385 r1419  
    15951595    if( m_layerId > 0 && m_uiSliceIdx == 0 && ( !pcSlice->getVPS()->getSingleLayerForNonIrapFlag() || pcSlice->isIRAP() ) )
    15961596    {
     1597      // create buffers for scaling factors
     1598      m_pcPic->createMvScalingFactor(pcSlice->getNumILRRefIdx());
     1599      m_pcPic->createPosScalingFactor(pcSlice->getNumILRRefIdx());
     1600
    15971601      for( Int i = 0; i < pcSlice->getNumILRRefIdx(); i++ )
    15981602      {
     
    16471651             && ( (heightEL != heightBL) || (resamplingPhase.phaseVerLuma == 0 && resamplingPhase.phaseVerChroma == 0) ) );
    16481652
    1649         g_mvScalingFactor[refLayerIdc][0] = widthEL  == widthBL  ? 4096 : Clip3(-4096, 4095, ((widthEL  << 8) + (widthBL  >> 1)) / widthBL);
    1650         g_mvScalingFactor[refLayerIdc][1] = heightEL == heightBL ? 4096 : Clip3(-4096, 4095, ((heightEL << 8) + (heightBL >> 1)) / heightBL);
    1651 
    1652         g_posScalingFactor[refLayerIdc][0] = ((widthBL  << 16) + (widthEL  >> 1)) / widthEL;
    1653         g_posScalingFactor[refLayerIdc][1] = ((heightBL << 16) + (heightEL >> 1)) / heightEL;
    1654 
     1653        m_pcPic->setMvScalingFactor( refLayerIdc,
     1654                                     widthEL  == widthBL  ? 4096 : Clip3(-4096, 4095, ((widthEL  << 8) + (widthBL  >> 1)) / widthBL),
     1655                                     heightEL == heightBL ? 4096 : Clip3(-4096, 4095, ((heightEL << 8) + (heightBL >> 1)) / heightBL) );
     1656
     1657        m_pcPic->setPosScalingFactor( refLayerIdc,
     1658                                     ((widthBL  << 16) + (widthEL  >> 1)) / widthEL,
     1659                                     ((heightBL << 16) + (heightEL >> 1)) / heightEL );
    16551660#if CGS_3D_ASYMLUT
    16561661        TComPicYuv* pBaseColRec = pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec();
  • branches/SHM-dev/source/Lib/TLibEncoder/TEnc3DAsymLUT.cpp

    r1297 r1419  
    549549  TComPicYuv *pcRecPicBL = pSlice->getBaseColPic(refLayerIdc)->getPicYuvRec();
    550550  // borders of down-sampled picture
    551   Int leftDS =  (scalEL.getWindowLeftOffset()*g_posScalingFactor[refLayerIdc][0]+(1<<15))>>16;
    552   Int rightDS = pcRecPicBL->getWidth(COMPONENT_Y) - 1 + (((scalEL.getWindowRightOffset())*g_posScalingFactor[refLayerIdc][0]+(1<<15))>>16);
    553   Int topDS = (((scalEL.getWindowTopOffset())*g_posScalingFactor[refLayerIdc][1]+(1<<15))>>16);
    554   Int bottomDS = pcRecPicBL->getHeight(COMPONENT_Y) - 1 + (((scalEL.getWindowBottomOffset())*g_posScalingFactor[refLayerIdc][1]+(1<<15))>>16);
     551  Int leftDS =  (scalEL.getWindowLeftOffset() * pSlice->getPic()->getPosScalingFactor(refLayerIdc, 0)+(1<<15))>>16;
     552  Int rightDS = pcRecPicBL->getWidth(COMPONENT_Y) - 1 + (((scalEL.getWindowRightOffset()) * pSlice->getPic()->getPosScalingFactor(refLayerIdc, 0)+(1<<15))>>16);
     553  Int topDS = (((scalEL.getWindowTopOffset()) * pSlice->getPic()->getPosScalingFactor(refLayerIdc, 1)+(1<<15))>>16);
     554  Int bottomDS = pcRecPicBL->getHeight(COMPONENT_Y) - 1 + (((scalEL.getWindowBottomOffset()) * pSlice->getPic()->getPosScalingFactor(refLayerIdc, 1)+(1<<15))>>16);
    555555  // overlapped region
    556556  Int left = max( 0 , leftDS );
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncGOP.cpp

    r1415 r1419  
    17321732    if (m_layerId > 0)
    17331733    {
     1734      if( pcSlice->getSliceIdx() == 0 )
     1735      {
     1736        // create buffers for scaling factors
     1737        pcSlice->getPic()->createMvScalingFactor(pcSlice->getNumILRRefIdx());
     1738        pcSlice->getPic()->createPosScalingFactor(pcSlice->getNumILRRefIdx());
     1739      }
     1740
    17341741      Int interLayerPredLayerIdcTmp[MAX_VPS_LAYER_IDX_PLUS1];
    17351742      Int activeNumILRRefIdxTmp = 0;
     
    17731780             && ( (heightEL != heightBL) || (resamplingPhase.phaseVerLuma == 0 && resamplingPhase.phaseVerChroma == 0) ) );
    17741781
    1775         g_mvScalingFactor[refLayerIdc][0] = widthEL  == widthBL  ? 4096 : Clip3(-4096, 4095, ((widthEL  << 8) + (widthBL  >> 1)) / widthBL);
    1776         g_mvScalingFactor[refLayerIdc][1] = heightEL == heightBL ? 4096 : Clip3(-4096, 4095, ((heightEL << 8) + (heightBL >> 1)) / heightBL);
    1777 
    1778         g_posScalingFactor[refLayerIdc][0] = ((widthBL  << 16) + (widthEL  >> 1)) / widthEL;
    1779         g_posScalingFactor[refLayerIdc][1] = ((heightBL << 16) + (heightEL >> 1)) / heightEL;
     1782        pcSlice->getPic()->setMvScalingFactor( refLayerIdc,
     1783                                               widthEL  == widthBL  ? 4096 : Clip3(-4096, 4095, ((widthEL  << 8) + (widthBL  >> 1)) / widthBL),
     1784                                               heightEL == heightBL ? 4096 : Clip3(-4096, 4095, ((heightEL << 8) + (heightBL >> 1)) / heightBL) );
     1785
     1786        pcSlice->getPic()->setPosScalingFactor( refLayerIdc,
     1787                                                ((widthBL  << 16) + (widthEL  >> 1)) / widthEL,
     1788                                                ((heightBL << 16) + (heightEL >> 1)) / heightEL );
    17801789
    17811790#if CGS_3D_ASYMLUT
     
    17871796          m_Enc3DAsymLUTPicUpdate.addRefLayerId( pcSlice->getVPS()->getRefLayerId(m_layerId, refLayerIdc) );
    17881797
    1789           if( g_posScalingFactor[refLayerIdc][0] < (1<<16) || g_posScalingFactor[refLayerIdc][1] < (1<<16) ) //if(pcPic->isSpatialEnhLayer(refLayerIdc))
     1798          if( pcSlice->getPic()->getMvScalingFactor(refLayerIdc, 0) < (1<<16) || pcSlice->getPic()->getMvScalingFactor(refLayerIdc, 1) < (1<<16) ) //if(pcPic->isSpatialEnhLayer(refLayerIdc))
    17901799          {
    17911800            //downsampling
    1792             downScalePic(pcPic->getPicYuvOrg(), pcSlice->getBaseColPic(refLayerIdc)->getPicYuvOrg(), pcSlice->getBitDepths());
     1801            downScalePic(pcPic->getPicYuvOrg(), pcSlice->getBaseColPic(refLayerIdc)->getPicYuvOrg(), pcSlice->getBitDepths(), pcPic->getPosScalingFactor());
    17931802           
    17941803            m_Enc3DAsymLUTPPS.setDsOrigPic(pcSlice->getBaseColPic(refLayerIdc)->getPicYuvOrg());
     
    32973306        UInt refLayerId = pcSlice->getRefPic(RefPicList(iRefList), iRefIndex)->getLayerId();
    32983307        UInt refLayerIdc = pcSlice->getReferenceLayerIdc(refLayerId);
    3299         assert( g_posScalingFactor[refLayerIdc][0] );
    3300         assert( g_posScalingFactor[refLayerIdc][1] );
    3301 
    3302         printf( "%d(%d, {%1.2f, %1.2f}x)", pcSlice->getRefPOC(RefPicList(iRefList), iRefIndex), refLayerId, 65536.0/g_posScalingFactor[refLayerIdc][0], 65536.0/g_posScalingFactor[refLayerIdc][1] );
     3308        assert( pcSlice->getPic()->getPosScalingFactor(refLayerIdc, 0) );
     3309        assert( pcSlice->getPic()->getPosScalingFactor(refLayerIdc, 1) );
     3310
     3311        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) );
    33033312      }
    33043313      else
     
    41784187}
    41794188
    4180 Void TEncGOP::downScalePic( TComPicYuv* pcYuvSrc, TComPicYuv* pcYuvDest, BitDepths& bitDepth)
     4189Void TEncGOP::downScalePic( TComPicYuv* pcYuvSrc, TComPicYuv* pcYuvDest, BitDepths& bitDepth, Int** posScalingFactor)
    41814190{
    41824191  pcYuvSrc->setBorderExtension(false);
    4183   pcYuvSrc->extendPicBorder   (); // extend the border.
     4192  pcYuvSrc->extendPicBorder(); // extend the border.
    41844193  pcYuvSrc->setBorderExtension(false);
    41854194
     
    41894198  if(!m_temp)
    41904199  {
    4191     initDs(iWidth, iHeight, m_pcCfg->getIntraPeriod()>1);
     4200    initDs(iWidth, iHeight, m_pcCfg->getIntraPeriod()>1, posScalingFactor);
    41924201  }
    41934202
     
    43134322}
    43144323
    4315 Void TEncGOP::initDs(Int iWidth, Int iHeight, Int iType)
     4324Void TEncGOP::initDs(Int iWidth, Int iHeight, Int iType, Int** posScalingFactor)
    43164325{
    43174326  m_iTap = 13;
    4318   if(g_posScalingFactor[0][0] == (1<<15))
     4327  if(posScalingFactor[0][0] == (1<<15))
    43194328  {
    43204329    m_iM = 4;
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncGOP.h

    r1415 r1419  
    287287#if CGS_3D_ASYMLUT
    288288  Void xDetermin3DAsymLUT( TComSlice * pSlice , TComPic * pCurPic , UInt refLayerIdc , TEncCfg * pCfg , Bool bSignalPPS );
    289   Void downScalePic( TComPicYuv* pcYuvSrc, TComPicYuv* pcYuvDest, BitDepths& bitDepth);
     289  Void downScalePic( TComPicYuv* pcYuvSrc, TComPicYuv* pcYuvDest, BitDepths& bitDepth, Int** posScalingFactor);
    290290  Void downScaleComponent2x2( const Pel* pSrc, Pel* pDest, const Int iSrcStride, const Int iDestStride, const Int iSrcWidth, const Int iSrcHeight, const Int inputBitDepth, const Int outputBitDepth );
    291291  inline Short xClip( Short x , Int bitdepth );
    292   Void initDs(Int iWidth, Int iHeight, Int iType);
     292  Void initDs(Int iWidth, Int iHeight, Int iType, Int** posScalingFactor);
    293293  Void filterImg( Pel *src, Int iSrcStride, Pel *dst, Int iDstStride, Int height1, Int width1, BitDepths& bitDepth, Int plane );
    294294
Note: See TracChangeset for help on using the changeset viewer.