Changeset 1419 in SHVCSoftware for branches/SHM-dev/source/Lib/TLibDecoder


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

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

Location:
branches/SHM-dev/source/Lib/TLibDecoder
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • 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();
Note: See TracChangeset for help on using the changeset viewer.