Changeset 1419 in SHVCSoftware for branches/SHM-dev
- Timestamp:
- 5 Aug 2015, 03:02:48 (9 years ago)
- Location:
- branches/SHM-dev/source/Lib
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-dev/source/Lib/TLibCommon/TComDataCU.cpp
r1418 r1419 3276 3276 3277 3277 #if SVC_EXTENSION 3278 TComDataCU* TComDataCU::getBaseColCU( UInt refLayerIdc, UInt uiCuAbsPartIdx, UInt &uiCUAddrBase, UInt &uiAbsPartIdxBase, Bool motionMapping )3278 TComDataCU* TComDataCU::getBaseColCU( UInt refLayerIdc, UInt uiCuAbsPartIdx, UInt &uiCUAddrBase, UInt &uiAbsPartIdxBase, Int** petPosScalingFactor, Bool motionMapping ) 3279 3279 { 3280 3280 UInt uiPelX = getCUPelX() + g_auiRasterToPelX[ g_auiZscanToRaster[uiCuAbsPartIdx] ]; 3281 3281 UInt uiPelY = getCUPelY() + g_auiRasterToPelY[ g_auiZscanToRaster[uiCuAbsPartIdx] ]; 3282 3282 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 3286 TComDataCU* TComDataCU::getBaseColCU( UInt refLayerIdc, UInt pelX, UInt pelY, UInt &uiCUAddrBase, UInt &uiAbsPartIdxBase, Int** posScalingFactor, Bool motionMapping ) 3287 3287 { 3288 3288 TComPic* baseColPic = m_pcSlice->getBaseColPic(refLayerIdc); … … 3302 3302 3303 3303 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(); 3306 3306 3307 3307 // offset for collocated block in the motion mapping … … 3346 3346 } 3347 3347 3348 Void TComDataCU::scaleBaseMV( UInt refLayerIdc, TComMvField& rcMvFieldEnhance, TComMvField& rcMvFieldBase )3348 Void TComDataCU::scaleBaseMV( UInt refLayerIdc, TComMvField& rcMvFieldEnhance, TComMvField& rcMvFieldBase, Int** mvScalingFactor ) 3349 3349 { 3350 3350 TComMvField cMvFieldBase; 3351 3351 TComMv cMv; 3352 3352 3353 cMv = rcMvFieldBase.getMv().scaleMv( g_mvScalingFactor[refLayerIdc][0], g_mvScalingFactor[refLayerIdc][1] );3353 cMv = rcMvFieldBase.getMv().scaleMv( mvScalingFactor[0][refLayerIdc], mvScalingFactor[1][refLayerIdc] ); 3354 3354 3355 3355 rcMvFieldEnhance.setMvField( cMv, rcMvFieldBase.getRefIdx() ); -
branches/SHM-dev/source/Lib/TLibCommon/TComDataCU.h
r1418 r1419 490 490 Bool xCheckZeroMVILRMvdL1Zero(Int iRefList, Int iRefIdx, Int MvpIdx); 491 491 #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 ); 495 495 #if FAST_INTRA_SHVC 496 496 UChar getReducedSetIntraModes(UChar idx) { assert( idx < NUM_INTRA_MODE-1 ); return m_reducedSetIntraModes[idx]; } -
branches/SHM-dev/source/Lib/TLibCommon/TComPic.cpp
r1290 r1419 64 64 memset( m_bSpatialEnhLayer, false, sizeof( m_bSpatialEnhLayer ) ); 65 65 memset( m_equalPictureSizeAndOffsetFlag, false, sizeof( m_equalPictureSizeAndOffsetFlag ) ); 66 memset( m_mvScalingFactor, NULL, sizeof( m_mvScalingFactor ) ); 67 memset( m_posScalingFactor, NULL, sizeof( m_posScalingFactor ) ); 66 68 #endif 67 69 for(UInt i=0; i<NUM_PIC_YUV; i++) … … 160 162 delete m_pcFullPelBaseRec[i]; 161 163 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; 162 179 } 163 180 } … … 220 237 221 238 #if SVC_EXTENSION 239 Void 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 248 Void 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 222 257 Void copyOnetoOnePicture( // SVC_NONCOLL 223 258 Pel *in, … … 262 297 } 263 298 264 Void TComPic::copyUpsampledMvField(UInt refLayerIdc )299 Void TComPic::copyUpsampledMvField(UInt refLayerIdc, Int** mvScalingFactor, Int** posScalingFactor) 265 300 { 266 301 const TComSPS *sps = getSlice(0)->getSPS(); … … 283 318 284 319 TComDataCU *pcColCU = 0; 285 pcColCU = pcCUDes->getBaseColCU(refLayerIdc, pelX, pelY, baseCUAddr, baseAbsPartIdx, true);320 pcColCU = pcCUDes->getBaseColCU(refLayerIdc, pelX, pelY, baseCUAddr, baseAbsPartIdx, posScalingFactor, true); 286 321 287 322 if( pcColCU && pcColCU->getPredictionMode(baseAbsPartIdx) == MODE_INTER ) //base layer unit not skip and invalid mode … … 291 326 TComMvField sMvFieldBase, sMvField; 292 327 pcColCU->getMvField( pcColCU, baseAbsPartIdx, (RefPicList)refPicList, sMvFieldBase); 293 pcCUDes->scaleBaseMV( refLayerIdc, sMvField, sMvFieldBase );328 pcCUDes->scaleBaseMV( refLayerIdc, sMvField, sMvFieldBase, mvScalingFactor ); 294 329 295 330 pcCUDes->getCUMvField((RefPicList)refPicList)->setMvField(sMvField, absPartIdx); -
branches/SHM-dev/source/Lib/TLibCommon/TComPic.h
r1383 r1419 88 88 Bool m_bSpatialEnhLayer[MAX_LAYERS]; // whether current layer is a spatial enhancement layer, 89 89 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]; 91 93 #if CGS_3D_ASYMLUT 92 94 Int m_nFrameBit; … … 199 201 Bool equalPictureSizeAndOffsetFlag(UInt refLayerIdc) { return m_equalPictureSizeAndOffsetFlag[refLayerIdc]; } 200 202 Void setEqualPictureSizeAndOffsetFlag(UInt refLayerIdc, Bool b) { m_equalPictureSizeAndOffsetFlag[refLayerIdc] = b; } 201 Void copyUpsampledMvField(UInt refLayerIdc );203 Void copyUpsampledMvField(UInt refLayerIdc, Int** mvScalingFactor, Int** posScalingFactor); 202 204 Void initUpsampledMvField(); 203 205 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); 205 215 #if CGS_3D_ASYMLUT 206 216 Void setFrameBit( Int n ) { m_nFrameBit = n; } -
branches/SHM-dev/source/Lib/TLibCommon/TComRom.cpp
r1418 r1419 725 725 const UInt g_scalingListSizeX [SCALING_LIST_SIZE_NUM] = { 4, 8, 16, 32}; 726 726 727 #if SVC_EXTENSION728 Int g_mvScalingFactor [MAX_LAYERS][2] = {{0,0}, {0,0}};729 Int g_posScalingFactor [MAX_LAYERS][2] = {{0,0}, {0,0}};730 727 #if LAYER_CTB 731 728 UInt g_auiLayerZscanToRaster[MAX_LAYERS][ MAX_NUM_SPU_W*MAX_NUM_SPU_W ]; … … 734 731 UInt g_auiLayerRasterToPelY[MAX_LAYERS][ MAX_NUM_SPU_W*MAX_NUM_SPU_W ]; 735 732 #endif 736 #endif //SVC_EXTENSION737 733 738 734 //! \} -
branches/SHM-dev/source/Lib/TLibCommon/TComRom.h
r1418 r1419 171 171 extern const UInt g_scalingListSizeX[SCALING_LIST_SIZE_NUM]; 172 172 173 #if SVC_EXTENSION174 extern Int g_mvScalingFactor [MAX_LAYERS][2];175 extern Int g_posScalingFactor [MAX_LAYERS][2];176 173 #if LAYER_CTB 177 174 extern UInt g_auiLayerZscanToRaster[MAX_LAYERS][ MAX_NUM_SPU_W*MAX_NUM_SPU_W ]; … … 180 177 extern UInt g_auiLayerRasterToPelY[MAX_LAYERS][ MAX_NUM_SPU_W*MAX_NUM_SPU_W ]; 181 178 #endif 182 #endif //SVC_EXTENSION183 179 184 180 //! \} -
branches/SHM-dev/source/Lib/TLibCommon/TComSlice.cpp
r1414 r1419 510 510 // motion resampling constraint 511 511 // 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 || !sameBitDepths512 if( !( m_pcPic->getPosScalingFactor(refLayerIdc, 0) == 65536 && m_pcPic->getPosScalingFactor(refLayerIdc, 1) == 65536 ) || !scalingOffset || !sameBitDepths 513 513 #if CGS_3D_ASYMLUT 514 514 || getPPS()->getCGSFlag() … … 3637 3637 } 3638 3638 3639 pcIlpPic[refLayerIdc]->copyUpsampledMvField( refLayerIdc);3639 pcIlpPic[refLayerIdc]->copyUpsampledMvField( refLayerIdc, m_pcPic->getMvScalingFactor(), m_pcPic->getPosScalingFactor() ); 3640 3640 } 3641 3641 else -
branches/SHM-dev/source/Lib/TLibCommon/TComUpsampleFilter.cpp
r1335 r1419 109 109 Pel* piDstV; 110 110 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); 113 113 114 114 // non-normative software optimization for certain simple resampling cases -
branches/SHM-dev/source/Lib/TLibDecoder/TDecGop.cpp
r1353 r1419 216 216 UInt refLayerId = pcSlice->getRefPic(RefPicList(iRefList), iRefIndex)->getLayerId(); 217 217 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) ); 222 222 } 223 223 else -
branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.cpp
r1385 r1419 1595 1595 if( m_layerId > 0 && m_uiSliceIdx == 0 && ( !pcSlice->getVPS()->getSingleLayerForNonIrapFlag() || pcSlice->isIRAP() ) ) 1596 1596 { 1597 // create buffers for scaling factors 1598 m_pcPic->createMvScalingFactor(pcSlice->getNumILRRefIdx()); 1599 m_pcPic->createPosScalingFactor(pcSlice->getNumILRRefIdx()); 1600 1597 1601 for( Int i = 0; i < pcSlice->getNumILRRefIdx(); i++ ) 1598 1602 { … … 1647 1651 && ( (heightEL != heightBL) || (resamplingPhase.phaseVerLuma == 0 && resamplingPhase.phaseVerChroma == 0) ) ); 1648 1652 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 ); 1655 1660 #if CGS_3D_ASYMLUT 1656 1661 TComPicYuv* pBaseColRec = pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec(); -
branches/SHM-dev/source/Lib/TLibEncoder/TEnc3DAsymLUT.cpp
r1297 r1419 549 549 TComPicYuv *pcRecPicBL = pSlice->getBaseColPic(refLayerIdc)->getPicYuvRec(); 550 550 // 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); 555 555 // overlapped region 556 556 Int left = max( 0 , leftDS ); -
branches/SHM-dev/source/Lib/TLibEncoder/TEncGOP.cpp
r1415 r1419 1732 1732 if (m_layerId > 0) 1733 1733 { 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 1734 1741 Int interLayerPredLayerIdcTmp[MAX_VPS_LAYER_IDX_PLUS1]; 1735 1742 Int activeNumILRRefIdxTmp = 0; … … 1773 1780 && ( (heightEL != heightBL) || (resamplingPhase.phaseVerLuma == 0 && resamplingPhase.phaseVerChroma == 0) ) ); 1774 1781 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 ); 1780 1789 1781 1790 #if CGS_3D_ASYMLUT … … 1787 1796 m_Enc3DAsymLUTPicUpdate.addRefLayerId( pcSlice->getVPS()->getRefLayerId(m_layerId, refLayerIdc) ); 1788 1797 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)) 1790 1799 { 1791 1800 //downsampling 1792 downScalePic(pcPic->getPicYuvOrg(), pcSlice->getBaseColPic(refLayerIdc)->getPicYuvOrg(), pcSlice->getBitDepths() );1801 downScalePic(pcPic->getPicYuvOrg(), pcSlice->getBaseColPic(refLayerIdc)->getPicYuvOrg(), pcSlice->getBitDepths(), pcPic->getPosScalingFactor()); 1793 1802 1794 1803 m_Enc3DAsymLUTPPS.setDsOrigPic(pcSlice->getBaseColPic(refLayerIdc)->getPicYuvOrg()); … … 3297 3306 UInt refLayerId = pcSlice->getRefPic(RefPicList(iRefList), iRefIndex)->getLayerId(); 3298 3307 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) ); 3303 3312 } 3304 3313 else … … 4178 4187 } 4179 4188 4180 Void TEncGOP::downScalePic( TComPicYuv* pcYuvSrc, TComPicYuv* pcYuvDest, BitDepths& bitDepth )4189 Void TEncGOP::downScalePic( TComPicYuv* pcYuvSrc, TComPicYuv* pcYuvDest, BitDepths& bitDepth, Int** posScalingFactor) 4181 4190 { 4182 4191 pcYuvSrc->setBorderExtension(false); 4183 pcYuvSrc->extendPicBorder 4192 pcYuvSrc->extendPicBorder(); // extend the border. 4184 4193 pcYuvSrc->setBorderExtension(false); 4185 4194 … … 4189 4198 if(!m_temp) 4190 4199 { 4191 initDs(iWidth, iHeight, m_pcCfg->getIntraPeriod()>1 );4200 initDs(iWidth, iHeight, m_pcCfg->getIntraPeriod()>1, posScalingFactor); 4192 4201 } 4193 4202 … … 4313 4322 } 4314 4323 4315 Void TEncGOP::initDs(Int iWidth, Int iHeight, Int iType )4324 Void TEncGOP::initDs(Int iWidth, Int iHeight, Int iType, Int** posScalingFactor) 4316 4325 { 4317 4326 m_iTap = 13; 4318 if( g_posScalingFactor[0][0] == (1<<15))4327 if(posScalingFactor[0][0] == (1<<15)) 4319 4328 { 4320 4329 m_iM = 4; -
branches/SHM-dev/source/Lib/TLibEncoder/TEncGOP.h
r1415 r1419 287 287 #if CGS_3D_ASYMLUT 288 288 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); 290 290 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 ); 291 291 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); 293 293 Void filterImg( Pel *src, Int iSrcStride, Pel *dst, Int iDstStride, Int height1, Int width1, BitDepths& bitDepth, Int plane ); 294 294
Note: See TracChangeset for help on using the changeset viewer.