Changeset 770 in SHVCSoftware for branches/SHM-6-dev
- Timestamp:
- 6 May 2014, 17:59:48 (11 years ago)
- Location:
- branches/SHM-6-dev/source/Lib
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-6-dev/source/Lib/TLibCommon/TCom3DAsymLUT.cpp
r751 r770 90 90 91 91 // alignment padding 92 pU += (nWidth>>1); 93 pV += (nWidth>>1); 94 for( Int y = 0 ; y < (nHeight>>1) ; y ++ ) 95 { 96 *pU = pU[-1]; 97 *pV = pV[-1]; 98 pU += nStrideC; 99 pV += nStrideC; 100 } 101 memcpy(pU-(nWidth>>1), pU-(nWidth>>1)-nStrideC, ((nWidth>>1)+1)*sizeof(Pel)); 102 memcpy(pV-(nWidth>>1), pV-(nWidth>>1)-nStrideC, ((nWidth>>1)+1)*sizeof(Pel)); 103 pU = pcPic->getCbAddr(); 104 pV = pcPic->getCrAddr(); 92 pcPic->setBorderExtension( false ); 93 pcPic->extendPicBorder(); 105 94 106 95 Pel iMaxValY = (1<<getOutputBitDepthY())-1; -
branches/SHM-6-dev/source/Lib/TLibEncoder/TEnc3DAsymLUT.cpp
r684 r770 276 276 Int nStrideILRY = pRecPic->getStride(); 277 277 Int nStrideILRC = pRecPic->getCStride(); 278 Int nWidth = m_pDsOrigPic->getWidth(); //should exclude the padding;279 Int nHeight= m_pDsOrigPic->getHeight();280 278 xReset3DArray( m_pColorInfo , xGetYSize() , xGetUSize() , xGetVSize() ); 281 279 xReset3DArray( m_pColorInfoC , xGetYSize() , xGetUSize() , xGetVSize() ); 282 280 283 281 //alignment padding 284 Pel *pU = pRecPic->getCbAddr(); 285 Pel *pV = pRecPic->getCrAddr(); 286 pU[(nWidth>>1)] = pU[(nWidth>>1)-1]; 287 pV[(nWidth>>1)] = pV[(nWidth>>1)-1]; 288 memcpy(pU-nStrideILRC, pU, ((nWidth>>1)+1)*sizeof(Pel)); 289 memcpy(pV-nStrideILRC, pV, ((nWidth>>1)+1)*sizeof(Pel)); 290 pU += nStrideILRC+ (nWidth>>1); 291 pV += nStrideILRC+ (nWidth>>1); 292 293 for( Int y = 1 ; y < (nHeight>>1) ; y ++ ) 294 { 295 *pU = pU[-1]; 296 *pV = pV[-1]; 297 pU += nStrideILRC; 298 pV += nStrideILRC; 299 } 300 memcpy(pU-(nWidth>>1), pU-(nWidth>>1)-nStrideILRC, ((nWidth>>1)+1)*sizeof(Pel)); 301 memcpy(pV-(nWidth>>1), pV-(nWidth>>1)-nStrideILRC, ((nWidth>>1)+1)*sizeof(Pel)); 302 303 for( Int i = 0 ; i < nHeight ; i++ ) 304 { 305 Int posSrcY = i * nStrideSrcY; 306 Int posIRLY = i * nStrideILRY; 307 Int posSrcUV = ( i >> 1 ) * nStrideSrcC; 308 Int posIRLUV = ( i >> 1 ) * nStrideILRC; 309 for( Int j = 0 ; j < nWidth ; j++ , posSrcY++ , posIRLY++ , posSrcUV += !( j & 0x01 ) , posIRLUV += !( j & 0x01 ) ) 282 pRecPic->setBorderExtension( false ); 283 pRecPic->extendPicBorder(); 284 285 TComSlice * pSlice = pCurPic->getSlice(pCurPic->getCurrSliceIdx()); 286 UInt refLayerId = pSlice->getVPS()->getRefLayerId(pSlice->getLayerId(), refLayerIdc); 287 const Window &scalEL = pSlice->getSPS()->getScaledRefLayerWindowForLayer(refLayerId); 288 TComPicYuv *pcRecPicBL = pSlice->getBaseColPic(refLayerIdc)->getPicYuvRec(); 289 // borders of down-sampled picture 290 Int leftDS = (scalEL.getWindowLeftOffset()*g_posScalingFactor[refLayerIdc][0]+(1<<15))>>16; 291 Int rightDS = pcRecPicBL->getWidth() - 1 + (((scalEL.getWindowRightOffset())*g_posScalingFactor[refLayerIdc][0]+(1<<15))>>16); 292 Int topDS = (((scalEL.getWindowTopOffset())*g_posScalingFactor[refLayerIdc][1]+(1<<15))>>16); 293 Int bottomDS = pcRecPicBL->getHeight() - 1 + (((scalEL.getWindowBottomOffset())*g_posScalingFactor[refLayerIdc][1]+(1<<15))>>16); 294 // overlapped region 295 Int left = max( 0 , leftDS ); 296 Int right = min( pcRecPicBL->getWidth() - 1 , rightDS ); 297 Int top = max( 0 , topDS ); 298 Int bottom = min( pcRecPicBL->getHeight() - 1 , bottomDS ); 299 // since we do data collection only for overlapped region, the border extension is good enough 300 301 for( Int i = top ; i <= bottom ; i++ ) 302 { 303 Int iDS = i-topDS; 304 Int jDS = left-leftDS; 305 Int posSrcY = iDS * nStrideSrcY + jDS; 306 Int posIRLY = i * nStrideILRY + left; 307 Int posSrcUV = ( iDS >> 1 ) * nStrideSrcC + (jDS>>1); 308 Int posIRLUV = ( i >> 1 ) * nStrideILRC + (left>>1); 309 for( Int j = left ; j <= right ; j++ , posSrcY++ , posIRLY++ , posSrcUV += !( j & 0x01 ) , posIRLUV += !( j & 0x01 ) ) 310 310 { 311 311 Int Y = pSrcY[posSrcY];
Note: See TracChangeset for help on using the changeset viewer.