Changeset 1430 in SHVCSoftware for branches/SHM-dev


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

fix posScalingFactor invocation for CGS

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

Legend:

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

    r1419 r1430  
    125125      shift = bitDepthLuma - currSlice->getPPS()->getCGSOutputBitDepthY();
    126126    }
     127#endif
    127128    assert( shift >= 0 );
    128 #endif
    129129
    130130    for( i = 0; i < heightBL; i++ )
     
    159159    if( currSlice->getPPS()->getCGSFlag() )
    160160    {
    161       shift = currSlice->getBitDepth(CHANNEL_TYPE_CHROMA) - currSlice->getPPS()->getCGSOutputBitDepthC();
     161      shift = bitDepthChroma - currSlice->getPPS()->getCGSOutputBitDepthC();
    162162    }
    163163#endif
     164    assert( shift >= 0 );
    164165
    165166    for( i = 0; i < heightBL; i++ )
     
    220221    Int rlClipB = heightBL - 1 + (NTAPS_US_LUMA>>1);
    221222
    222     // g_bitDepthY was set to EL bit-depth, but shift1 should be calculated using BL bit-depth
     223    // shift1 should be calculated using BL bit-depth
    223224    Int shift1 = refBitDepthLuma - 8;
    224225
     
    320321    heightBL  = min<Int>( pcBasePic->getHeight(COMPONENT_Y) >> 1, heightEL );
    321322
    322     // g_bitDepthC was set to EL bit-depth, but shift1 should be calculated using BL bit-depth
     323    // shift1 should be calculated using BL bit-depth
    323324    shift1 = refBitDepthChroma - 8;
    324325
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncGOP.cpp

    r1429 r1430  
    17991799          m_Enc3DAsymLUTPicUpdate.addRefLayerId( pcSlice->getVPS()->getRefLayerId(m_layerId, refLayerIdc) );
    18001800
    1801           if( pcSlice->getPic()->getMvScalingFactor(refLayerIdc, 0) < (1<<16) || pcSlice->getPic()->getMvScalingFactor(refLayerIdc, 1) < (1<<16) ) //if(pcPic->isSpatialEnhLayer(refLayerIdc))
     1801          if( pcSlice->getPic()->getPosScalingFactor(refLayerIdc, 0) < (1<<16) || pcSlice->getPic()->getPosScalingFactor(refLayerIdc, 1) < (1<<16) ) //if(pcPic->isSpatialEnhLayer(refLayerIdc))
    18021802          {
    18031803            //downsampling
    1804             downScalePic(pcPic->getPicYuvOrg(), pcSlice->getBaseColPic(refLayerIdc)->getPicYuvOrg(), pcSlice->getBitDepths(), pcPic->getPosScalingFactor());
     1804            downScalePic(pcPic->getPicYuvOrg(), pcSlice->getBaseColPic(refLayerIdc)->getPicYuvOrg(), pcSlice->getBitDepths(), pcPic->getPosScalingFactor(refLayerIdc, 0));
    18051805           
    18061806            m_Enc3DAsymLUTPPS.setDsOrigPic(pcSlice->getBaseColPic(refLayerIdc)->getPicYuvOrg());
     
    41944194}
    41954195
    4196 Void TEncGOP::downScalePic( TComPicYuv* pcYuvSrc, TComPicYuv* pcYuvDest, BitDepths& bitDepth, Int** posScalingFactor)
     4196Void TEncGOP::downScalePic( TComPicYuv* pcYuvSrc, TComPicYuv* pcYuvDest, BitDepths& bitDepth, const Int posScalingFactorX)
    41974197{
    41984198  pcYuvSrc->setBorderExtension(false);
     
    42054205  if(!m_temp)
    42064206  {
    4207     initDs(iWidth, iHeight, m_pcCfg->getIntraPeriod()>1, posScalingFactor);
     4207    initDs(iWidth, iHeight, m_pcCfg->getIntraPeriod()>1, posScalingFactorX);
    42084208  }
    42094209
     
    43294329}
    43304330
    4331 Void TEncGOP::initDs(Int iWidth, Int iHeight, Int iType, Int** posScalingFactor)
     4331Void TEncGOP::initDs(Int iWidth, Int iHeight, Int iType, const Int posScalingFactorX)
    43324332{
    43334333  m_iTap = 13;
    4334   if(posScalingFactor[0][0] == (1<<15))
     4334  if(posScalingFactorX == (1<<15))
    43354335  {
    43364336    m_iM = 4;
    43374337    m_iN = 8;
    43384338    m_phase_filter_luma = iType? m_phase_filter_0_t1 : m_phase_filter_0_t0;
    4339     m_phase_filter_chroma = m_phase_filter_0_t1_chroma;
     4339    m_phase_filter_chroma = m_phase_filter_0_t1_chroma;    
    43404340  }
    43414341  else
     
    43474347  }
    43484348
    4349   get_mem2DintWithPad (&m_temp, iHeight, iWidth*m_iM/m_iN,   m_iTap>>1, 0);
     4349  get_mem2DintWithPad (&m_temp, iHeight, iWidth*m_iM/m_iN, m_iTap>>1, 0);
    43504350}
    43514351
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncGOP.h

    r1429 r1430  
    287287#if CGS_3D_ASYMLUT
    288288  Void xDetermine3DAsymLUT( TComSlice * pSlice , TComPic * pCurPic , UInt refLayerIdc , TEncCfg * pCfg , Bool bSignalPPS );
    289   Void downScalePic( TComPicYuv* pcYuvSrc, TComPicYuv* pcYuvDest, BitDepths& bitDepth, Int** posScalingFactor);
     289  Void downScalePic( TComPicYuv* pcYuvSrc, TComPicYuv* pcYuvDest, BitDepths& bitDepth, const Int posScalingFactorX);
    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, Int** posScalingFactor);
     292  Void initDs(Int iWidth, Int iHeight, Int iType, const Int posScalingFactorX);
    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.