Changeset 608 in 3DVCSoftware for trunk/source/Lib/TLibRenderer
- Timestamp:
- 1 Sep 2013, 22:47:26 (11 years ago)
- Location:
- trunk/source/Lib/TLibRenderer
- Files:
-
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/Lib/TLibRenderer/TRenFilter.cpp
r296 r608 36 36 #include "TRenFilter.h" 37 37 #include "TRenInterpFilter.h" 38 38 #if H_3D 39 39 40 40 ///// COMMON ///// … … 72 72 } 73 73 // Set Threshold 74 riBlendZThres = ( Max( abs(piInvZLUTLeft[0]- piInvZLUTLeft[255]), abs(piInvZLUTRight[0]- piInvZLUTRight[255]) ) * iBlendZThresPerc + 50) / 100;74 riBlendZThres = ( std::max( abs(piInvZLUTLeft[0]- piInvZLUTLeft[255]), abs(piInvZLUTRight[0]- piInvZLUTRight[255]) ) * iBlendZThresPerc + 50) / 100; 75 75 } 76 76 … … 194 194 195 195 /////////// Comparison /////////// 196 Int64 TRenFilter::SSE (PelImagePlane* pcInputPlane1, PelImagePlane* pcInputPlane2 196 Int64 TRenFilter::SSE (PelImagePlane* pcInputPlane1, PelImagePlane* pcInputPlane2, Bool bLuma ) 197 197 { 198 198 UInt uiWidth = pcInputPlane1->getWidth(); … … 205 205 Pel* pucImData2 = pcInputPlane2->getPlaneData(); 206 206 207 return SSE( pucImData1, (Int) uiStride1, (Int) uiWidth, (Int) uiHeight, pucImData2, (Int) uiStride2 );208 } 209 210 Int64 TRenFilter::SSE( Pel* piSrc1, Int iSrcStride1, Int iWidth, Int iHeight, Pel* piSrc2, Int iSrcStride2 )207 return SSE( pucImData1, (Int) uiStride1, (Int) uiWidth, (Int) uiHeight, pucImData2, (Int) uiStride2, bLuma ); 208 } 209 210 Int64 TRenFilter::SSE( Pel* piSrc1, Int iSrcStride1, Int iWidth, Int iHeight, Pel* piSrc2, Int iSrcStride2, Bool bLuma ) 211 211 { 212 212 Int64 iSSE = 0; 213 213 214 Int iShift = g_uiBitIncrement << 1; 214 215 Int iShift = DISTORTION_PRECISION_ADJUSTMENT( ( bLuma ? g_bitDepthY : g_bitDepthC ) - 8 ) << 1 ; 215 216 for(Int iPosY = 0; iPosY < iHeight; iPosY++) 216 217 { … … 266 267 267 268 inline Void TRenFilter::sampleUp2Tap13(PelImage* pcInputImage, PelImage* pcOutputImage) 268 {// UpSampling from JSVM Software (DownConvertStatic) ??? 269 { // UpSampling from JSVM Software (DownConvertStatic) ??? 270 271 AOF( g_bitDepthC == g_bitDepthY ); 269 272 UInt uiNumPlanes = pcInputImage->getNumberOfPlanes(); 270 273 … … 397 400 { 398 401 // Scale and copy to image buffer. 399 pcOutputPlaneData[iOffset+i] = Max(Min((Pel) ((piDst[i] + iAddH) / iDivH), g_uiBASE_MAX ),0);402 pcOutputPlaneData[iOffset+i] = ClipY((Pel) ((piDst[i] + iAddH) / iDivH)); 400 403 } 401 404 } … … 421 424 Void TRenFilter::sampleDown2Tap13( Pel* pcInputPlaneData, Int iInputStride, Int iWidth, Int iHeight, Pel* pcOutputPlaneData, Int iOutputStride ) 422 425 { // DownSampling from JSVM Software (DownConvertStatic) ?? 426 427 AOF( g_bitDepthC == g_bitDepthY ); 428 423 429 Int iOffset, iPosX, iPosY, k; 424 430 Int* piDataHorDown = new Int[(Int)(iWidth * iHeight / 2)]; … … 543 549 { 544 550 // Scale and copy back to image buffer. 545 pcOutputPlaneData[iOutputStride*iPosY+iPosX] = Max(Min( ( Pel) ( (piDst[iPosY] + iAddV) / iDivV), g_uiBASE_MAX ),0);551 pcOutputPlaneData[iOutputStride*iPosY+iPosX] = ClipY( ( Pel) ( (piDst[iPosY] + iAddV) / iDivV)); 546 552 } 547 553 } … … 569 575 570 576 Void TRenFilter::sampleVerDown2Tap13( PelImagePlane* pcInputPlane, PelImagePlane* pcOutputPlane, Int uiPad) 571 { // DownSampling from JSVM Software (DownConvertStatic) ?? 577 { 578 assert( g_bitDepthY == g_bitDepthC); // ToDo: Update renderer to work with different luma/chroma bit depth 579 // DownSampling from JSVM Software (DownConvertStatic) ?? 572 580 Int iWidth = pcInputPlane->getWidth(); 573 581 Int iHeight = pcInputPlane->getHeight(); … … 614 622 615 623 Int iSum = iTmp4 + iTmp3 - iTmp2 + ((iTmp0 + iTmp4 + iTmp5 - iTmp2) << 1) + ( ( iTmp3 - iTmp1) << 2) + ( iTmp5 << 3 ) + (( iTmp4 + iTmp5 ) << 4); 616 pcOutputPlaneData[ iXPos ] = (Pel) Clip ((iSum + 32) >> 6);624 pcOutputPlaneData[ iXPos ] = (Pel) ClipY((iSum + 32) >> 6); 617 625 pcTmpIn++; 618 626 } … … 623 631 624 632 Void TRenFilter::sampleHorDown2Tap13( PelImagePlane* pcInputPlane, PelImagePlane* pcOutputPlane, Int uiPad ) 625 { // DownSampling from JSVM Software (DownConvertStatic) ?? 633 { 634 assert( g_bitDepthY == g_bitDepthC); // ToDo: Update renderer to work with different luma/chroma bit depth 635 // DownSampling from JSVM Software (DownConvertStatic) ?? 626 636 Int iWidth = pcInputPlane->getWidth(); 627 637 Int iHeight = pcInputPlane->getHeight(); … … 653 663 654 664 Int iSum = iTmp4 + iTmp3 - iTmp2 + ((iTmp0 + iTmp4 + iTmp5 - iTmp2) << 1) + ( ( iTmp3 - iTmp1) << 2) + ( iTmp5 << 3 ) + (( iTmp4 + iTmp5 ) << 4); 655 pcOutputPlaneData[ iXPos ] = (Pel) Clip ((iSum + 32) >> 6);665 pcOutputPlaneData[ iXPos ] = (Pel) ClipY((iSum + 32) >> 6); 656 666 pcTmpIn += 2; 657 667 } … … 810 820 Pel TRenFilter::xFiltBinom3( Pel* pcInputData, Int iStride ) 811 821 { 822 assert( g_bitDepthY == g_bitDepthC); // ToDo: Update renderer to work with different luma/chroma bit depth 823 812 824 Int iSum = pcInputData[-1 * iStride ] + pcInputData[ 0 ] + (pcInputData[iStride ] << 1 ); 813 return Clip ( (iSum + 2) >> 2 );825 return ClipY( (iSum + 2) >> 2 ); 814 826 } 815 827 816 828 Pel TRenFilter::xFiltBinom5( Pel* pcInputData, Int iStride ) 817 829 { 830 assert( g_bitDepthY == g_bitDepthC); // ToDo: Update renderer to work with different luma/chroma bit depth 818 831 // { 1,4,6,4,1 } 819 832 Int iStride0 = 0; … … 828 841 829 842 Int iSum = iTmp0 + (iTmp2 << 1) + ((iTmp1 + iTmp2) << 2); 830 return Clip ( (iSum + 8) >> 4 );843 return ClipY( (iSum + 8) >> 4 ); 831 844 } 832 845 833 846 Pel TRenFilter::xFiltBinom7( Pel* pcInputData, Int iStride ) 834 847 { 848 assert( g_bitDepthY == g_bitDepthC); // ToDo: Update renderer to work with different luma/chroma bit depth 835 849 // { 1,6,15,20,15,6,1 } 836 850 Int iStride0 = 0; … … 849 863 Int iSum = iTmp0 - iTmp2 + ( iTmp1 << 1) + ( (iTmp1 + iTmp3) << 2) + ((iTmp2 + iTmp3) << 4); 850 864 851 return Clip ( (iSum + 32) >> 6 );865 return ClipY( (iSum + 32) >> 6 ); 852 866 } 853 867 854 868 Pel TRenFilter::xFiltBinom9( Pel* pcInputData, Int iStride ) 855 869 { 870 assert( g_bitDepthY == g_bitDepthC); // ToDo: Update renderer to work with different luma/chroma bit depth 856 871 // { 1 8 28 56 70 56 28 8 1 } 857 872 Int iStride0 = 0; … … 873 888 Int iSum = iTmp0 + ((iTmp4 ) << 1) + ( ( iTmp4 - iTmp2 ) << 2) + ( (iTmp1 - iTmp3) << 3 ) + ((iTmp2 ) << 5) + ((iTmp3+ iTmp4 ) << 6); 874 889 875 return Clip ( (iSum + 128) >> 8 );890 return ClipY( (iSum + 128) >> 8 ); 876 891 } 877 892 … … 1226 1241 Void TRenFilter::xInterpHorChroma( Pel* piSrc, Int iSrcStride, Int iSrcStepX, Int iSrcStepY, Int iWidth, Int iHeight, Pel* piDst, Int iDstStride, Int iDstStepX, Int iDstStepY, FpChromaIntFilt fpFilter ) 1227 1242 { 1243 assert( g_bitDepthY == g_bitDepthC); // ToDo: Update renderer to work with different luma/chroma bit depth 1228 1244 Int iSum; 1229 1245 Pel* piSrcTmp; … … 1236 1252 { 1237 1253 iSum = (cFilter.*fpFilter)( piSrcTmp, iSrcStepX ); 1238 piDst[x * iDstStepX ] = Clip ((iSum + 32) >> 6 );1254 piDst[x * iDstStepX ] = ClipC ((iSum + 32) >> 6 ); 1239 1255 piSrcTmp+= iSrcStepX; 1240 1256 } … … 1246 1262 Void TRenFilter::xInterpVerChroma( Pel* piSrc, Int iSrcStride, Int iSrcStepX, Int iSrcStepY, Int iWidth, Int iHeight, Pel* piDst, Int iDstStride, Int iDstStepX, Int iDstStepY, FpChromaIntFilt fpFilter ) 1247 1263 { 1264 assert( g_bitDepthY == g_bitDepthC); // ToDo: Update renderer to work with different luma/chroma bit depth 1248 1265 Int iSum; 1249 1266 Pel* piSrcTmp; … … 1256 1273 { 1257 1274 iSum = (cFilter.*fpFilter)( piSrcTmp, iSrcStepY * iSrcStride ); 1258 piDst[x * iDstStepX ] = Clip ((iSum + 32) >> 6 );1275 piDst[x * iDstStepX ] = ClipC ((iSum + 32) >> 6 ); 1259 1276 piSrcTmp += iSrcStepX; 1260 1277 } … … 1267 1284 Void TRenFilter::xSampleDownHor2( Pel* piSrc, Int iSrcStride, Int iSrcWidth, Int iHeight, Pel* piDst, Int iDstStride ) 1268 1285 { 1286 1287 assert( g_bitDepthY == g_bitDepthC); // ToDo: Update renderer to work with different luma/chroma bit depth 1288 1269 1289 Int iSum; 1270 1290 Pel* piSrcTmp; … … 1278 1298 // { 1,2,1 } 1279 1299 iSum = piSrcTmp[0] + piSrcTmp[2] + (piSrcTmp[1] << 1); 1280 piDst[x] = Clip ( (iSum + 2) >> 2 );1300 piDst[x] = ClipY( (iSum + 2) >> 2 ); 1281 1301 piSrcTmp += 2; 1282 1302 } … … 1288 1308 Void TRenFilter::xSampleDownVer2( Pel* piSrc, Int iSrcStride, Int iSrcWidth, Int iSrcHeight, Pel* piDst, Int iDstStride ) 1289 1309 { 1310 assert( g_bitDepthY == g_bitDepthC); // ToDo: Update renderer to work with different luma/chroma bit depth 1311 1290 1312 Int iSum; 1291 1313 Pel* piSrcTmp; … … 1298 1320 // { 1,2,1 } 1299 1321 iSum = piSrcTmp[0] + piSrcTmp[ iSrcStride << 1] + (piSrcTmp[ iSrcStride ] << 1); 1300 piDst[x] = Clip ( (iSum + 2) >> 2 );1322 piDst[x] = ClipY( (iSum + 2) >> 2 ); 1301 1323 piSrcTmp += 1; 1302 1324 } … … 1308 1330 Void TRenFilter::xSampleDownHor4( Pel* piSrc, Int iSrcStride, Int iSrcWidth, Int iHeight, Pel* piDst, Int iDstStride ) 1309 1331 { 1332 assert( g_bitDepthY == g_bitDepthC); // ToDo: Update renderer to work with different luma/chroma bit depth 1333 1310 1334 Int iSum; 1311 1335 Pel* piSrcTmp; … … 1324 1348 1325 1349 iSum = iTmp0 + (iTmp2 << 1) + ((iTmp1 + iTmp2) << 2); 1326 piDst[x] = Clip ( (iSum + 8) >> 4 );1350 piDst[x] = ClipY( (iSum + 8) >> 4 ); 1327 1351 piSrcTmp += 4; 1328 1352 } … … 1334 1358 Void TRenFilter::xSampleDownHor8( Pel* piSrc, Int iSrcStride, Int iSrcWidth, Int iHeight, Pel* piDst, Int iDstStride ) 1335 1359 { 1360 assert( g_bitDepthY == g_bitDepthC); // ToDo: Update renderer to work with different luma/chroma bit depth 1361 1336 1362 Int iSum; 1337 1363 Pel* piSrcTmp; … … 1351 1377 1352 1378 iSum = iTmp0 - iTmp2 + ( iTmp1 << 1) + ( (iTmp1 + iTmp3) << 2) + ((iTmp2 + iTmp3) << 4); 1353 piDst[x] = Clip ( (iSum + 32) >> 6 );1379 piDst[x] = ClipY( (iSum + 32) >> 6 ); 1354 1380 piSrcTmp += 8; 1355 1381 } … … 1433 1459 template Void TRenFilter::mirrorHor( TRenImage<Int> *pcImage ); 1434 1460 template Void TRenFilter::mirrorHor( TRenImagePlane<Pel> *pcImagePlane ); 1461 1462 #endif 1463 -
trunk/source/Lib/TLibRenderer/TRenFilter.h
r56 r608 33 33 34 34 35 36 35 #ifndef __TRENFILTER__ 37 36 #define __TRENFILTER__ … … 40 39 #include "TRenImage.h" 41 40 #include "TRenInterpFilter.h" 41 #if H_3D 42 42 43 43 typedef Int (TRenInterpFilter::*FpChromaIntFilt) ( Pel*, Int ); … … 62 62 /////////// Comparison /////////// 63 63 64 static Int64 SSE ( PelImagePlane* pcInputPlane1, PelImagePlane* pcInputPlane2 );65 static Int64 SSE ( Pel* piSrc1, Int iSrcStride1, Int iWidth, Int iHeight, Pel* piSrc2, Int iSrcStride2 );64 static Int64 SSE ( PelImagePlane* pcInputPlane1, PelImagePlane* pcInputPlane2, Bool bLuma ); 65 static Int64 SSE ( Pel* piSrc1, Int iSrcStride1, Int iWidth, Int iHeight, Pel* piSrc2, Int iSrcStride2, Bool bLuma ); 66 66 67 67 template <typename T> static Bool compare (TRenImage<T> *pcInputImage1 , TRenImage<T> *pcInputImage2); … … 138 138 }; 139 139 140 140 #endif 141 141 #endif //__TRENFILTER__ -
trunk/source/Lib/TLibRenderer/TRenImage.cpp
r189 r608 37 37 #include "TRenFilter.h" 38 38 #include "assert.h" 39 #if H_3D 40 39 41 40 42 template<typename T> … … 231 233 for (UInt uiCurPlane = 1; uiCurPlane < m_uiNumberOfPlanes; uiCurPlane++) 232 234 { 233 m_apcPlanes[uiCurPlane]->assign( (Pel) ( (g_uiIBDI_MAX+1) >> 1) );235 m_apcPlanes[uiCurPlane]->assign( (Pel) ( 1 << ( g_bitDepthC - 1 ) ) ); 234 236 } 235 237 } … … 270 272 template Void TRenImage<Pel>::assign<Pel> (TRenImage<Pel>* ); 271 273 274 #endif // H_3D -
trunk/source/Lib/TLibRenderer/TRenImage.h
r189 r608 39 39 #include "../TLibCommon/TComPicYuv.h" 40 40 #include "TRenImagePlane.h" 41 #if H_3D 41 42 42 43 … … 99 100 }; 100 101 102 #endif // H_3D 101 103 #endif // __TRENIMAGE__ 102 104 -
trunk/source/Lib/TLibRenderer/TRenImagePlane.cpp
r56 r608 36 36 #include "TRenFilter.h" 37 37 #include <string.h> 38 #if H_3D 39 38 40 /////// TRenImagePlane /////// 39 41 … … 526 528 template class TRenImagePlanePart<Bool>; 527 529 template class TRenImagePlanePart<Int>; 530 #endif // H_3D 531 -
trunk/source/Lib/TLibRenderer/TRenImagePlane.h
r56 r608 39 39 #include "../TLibCommon/TComPicYuv.h" 40 40 41 #if H_3D 41 42 #define PelImagePlane TRenImagePlane<Pel> 42 43 #define DoubleImagePlane TRenImagePlane<Double> … … 121 122 }; 122 123 124 #endif // H_3D 123 125 #endif // __TRENIMAGEPLANE__ -
trunk/source/Lib/TLibRenderer/TRenInterpFilter.cpp
r56 r608 39 39 40 40 #include "TRenInterpFilter.h" 41 #if H_3D 41 42 42 43 // ==================================================================================================================== … … 49 50 } 50 51 52 #endif // H_3D 53 -
trunk/source/Lib/TLibRenderer/TRenInterpFilter.h
r56 r608 44 44 #include "TLibCommon/CommonDef.h" 45 45 #include "assert.h" 46 #if H_3D 47 46 48 // ==================================================================================================================== 47 49 // Constants … … 103 105 __inline Int xCTI_Filter_VI04_C_OCT3( Int* pSrc, Int iStride ); 104 106 105 #if HIGH_ACCURACY_BI106 __inline Void xCTI_FilterHalfHor_ha(Pel* piSrc, Int iSrcStride, Int iSrcStep, Int iWidth, Int iHeight, Int iDstStride, Int iDstStep, Pel*& rpiDst); //107 __inline Void xCTI_FilterHalfHor_ha(Int* piSrc, Int iSrcStride, Int iSrcStep, Int iWidth, Int iHeight, Int iDstStride, Int iDstStep, Pel*& rpiDst);//108 109 110 __inline Void xCTI_FilterQuarter0Hor_ha(Pel* piSrc, Int iSrcStride, Int iSrcStep, Int iWidth, Int iHeight, Int iDstStride, Int iDstStep, Pel*& rpiDst); //111 __inline Void xCTI_FilterQuarter0Hor_ha(Int* piSrc, Int iSrcStride, Int iSrcStep, Int iWidth, Int iHeight, Int iDstStride, Int iDstStep, Pel*& rpiDst); //112 113 __inline Void xCTI_FilterQuarter1Hor_ha(Pel* piSrc, Int iSrcStride, Int iSrcStep, Int iWidth, Int iHeight, Int iDstStride, Int iDstStep, Pel*& rpiDst); //114 __inline Void xCTI_FilterQuarter1Hor_ha(Int* piSrc, Int iSrcStride, Int iSrcStep, Int iWidth, Int iHeight, Int iDstStride, Int iDstStep, Pel*& rpiDst); //115 116 __inline Void xCTI_FilterHalfVer_ha (Pel* piSrc, Int iSrcStride, Int iSrcStep, Int iWidth, Int iHeight, Int iDstStride, Int iDstStep, Pel*& rpiDst ); //117 118 __inline Void xCTI_FilterQuarter0Ver_ha (Pel* piSrc, Int iSrcStride, Int iSrcStep, Int iWidth, Int iHeight, Int iDstStride, Int iDstStep, Pel*& rpiDst );119 __inline Void xCTI_FilterQuarter1Ver_ha (Pel* piSrc, Int iSrcStride, Int iSrcStep, Int iWidth, Int iHeight, Int iDstStride, Int iDstStep, Pel*& rpiDst );120 121 __inline Void xCTI_Filter1DHorC_ha (Pel* piSrc, Int iSrcStride, Int iWidth, Int iHeight, Int iDstStride, Pel*& rpiDst, Int iMV);122 __inline Void xCTI_Filter1DVerC_ha (Pel* piSrc, Int iSrcStride, Int iWidth, Int iHeight, Int iDstStride, Pel*& rpiDst, Int iMV);123 __inline Void xCTI_Filter2DHorC_ha (Int* piSrc, Int iSrcStride, Int iWidth, Int iHeight, Int iDstStride, Pel*& rpiDst, Int iMV);124 125 #endif126 107 }; 127 108 128 #if HIGH_ACCURACY_BI 129 __inline Void TRenInterpFilter::xCTI_FilterHalfHor_ha(Pel* piSrc, Int iSrcStride, Int iSrcStep, Int iWidth, Int iHeight, Int iDstStride, Int iDstStep, Pel*& rpiDst) 130 { 109 110 // ------------------------------------------------------------------------------------------------ 111 // DCTIF filters 112 // ------------------------------------------------------------------------------------------------ 113 114 __inline Void TRenInterpFilter::xCTI_FilterHalfHor(Pel* piSrc, Int iSrcStride, Int iSrcStep, Int iWidth, Int iHeight, Int iDstStride, Int iDstStep, Pel*& rpiDst) 115 { 116 assert( g_bitDepthC == g_bitDepthY); // ToDo: Update renderer to work with different luma/chroma bit depth 117 131 118 Pel* piDst = rpiDst; 132 119 Int iSum; 133 120 Pel* piSrcTmp; 134 135 121 Int iSrcStep2 = iSrcStep*2; 136 122 Int iSrcStep3 = iSrcStep*3; … … 141 127 142 128 Int iTmp0, iTmp1, iTmp2, iTmp3, iTmpA; 143 Int shiftNum = g_uiBitIncrement + g_uiBitDepth - 8; 144 Int shiftOffset = (shiftNum > 0) ? ( 1 << (shiftNum - 1)) : 0 ; 129 145 130 for ( Int y = iHeight; y != 0; y-- ) 146 131 { … … 160 145 + ( iTmpA << 1 ) 161 146 - iTmp0 - iTmp2; 162 #if REMOVE_INTERMEDIATE_CLIPPING 163 piDst [x * iDstStep] = (iSum + shiftOffset) >> shiftNum; 164 #else 165 piDst [x * iDstStep] = Clip3(0,16383, (iSum + shiftOffset) >> shiftNum ); 166 #endif 167 147 148 piDst [x * iDstStep] = ClipY( (iSum + 32) >> 6 ); 168 149 piSrcTmp += iSrcStep; 169 150 } … … 172 153 } 173 154 return; 174 175 } 176 177 __inline Void TRenInterpFilter::xCTI_FilterHalfHor_ha(Int* piSrc, Int iSrcStride, Int iSrcStep, Int iWidth, Int iHeight, Int iDstStride, Int iDstStep, Pel*& rpiDst) 178 { 155 } 156 157 __inline Void TRenInterpFilter::xCTI_FilterHalfHor(Int* piSrc, Int iSrcStride, Int iSrcStep, Int iWidth, Int iHeight, Int iDstStride, Int iDstStep, Pel*& rpiDst) 158 { 159 assert( g_bitDepthC == g_bitDepthY); // ToDo: Update renderer to work with different luma/chroma bit depth 160 179 161 Pel* piDst = rpiDst; 180 162 Int iSum; 181 163 Int* piSrcTmp; 182 183 164 Int iSrcStep2 = iSrcStep*2; 184 165 Int iSrcStep3 = iSrcStep*3; … … 189 170 190 171 Int iTmp0, iTmp1, iTmp2, iTmp3, iTmpA; 191 Int shiftNum = 6 + g_uiBitIncrement + g_uiBitDepth - 8; 192 Int shiftOffset = (shiftNum > 0) ? ( 1 << (shiftNum - 1)) : 0 ; 172 193 173 for ( Int y = iHeight; y != 0; y-- ) 194 174 { … … 209 189 - iTmp0 - iTmp2; 210 190 211 #if REMOVE_INTERMEDIATE_CLIPPING 212 piDst [x * iDstStep] = (iSum + shiftOffset) >> shiftNum; 213 #else 214 piDst [x * iDstStep] = Clip3(0,16383, (iSum + shiftOffset) >> shiftNum ); 215 #endif 216 191 piDst [x * iDstStep] = ClipY( (iSum + 2048) >> 12 ); 217 192 piSrcTmp += iSrcStep; 218 193 } … … 221 196 } 222 197 return; 223 224 } 225 226 227 __inline Void TRenInterpFilter::xCTI_FilterQuarter0Hor_ha(Pel* piSrc, Int iSrcStride, Int iSrcStep, Int iWidth, Int iHeight, Int iDstStride, Int iDstStep, Pel*& rpiDst) 228 { 198 } 199 200 __inline Void TRenInterpFilter::xCTI_FilterQuarter0Hor(Pel* piSrc, Int iSrcStride, Int iSrcStep, Int iWidth, Int iHeight, Int iDstStride, Int iDstStep, Pel*& rpiDst) 201 { 202 assert( g_bitDepthC == g_bitDepthY); // ToDo: Update renderer to work with different luma/chroma bit depth 229 203 Pel* piDst = rpiDst; 230 204 Int iSum; 231 205 Pel* piSrcTmp; 232 233 206 Int iSrcStep2 = iSrcStep*2; 234 207 Int iSrcStep3 = iSrcStep*3; … … 239 212 240 213 Int iTmp1, iTmp2; 241 Int shiftNum = g_uiBitIncrement + g_uiBitDepth - 8; 242 Int shiftOffset = (shiftNum > 0) ? ( 1 << (shiftNum - 1)) : 0 ; 214 243 215 for ( Int y = iHeight; y != 0; y-- ) 244 216 { … … 252 224 253 225 iSum = iTmp1 + iTmp2 - piSrcTmp[0] - piSrcTmp[iSrcStep7] 254 - ( ( piSrcTmp[iSrcStep2] - iTmp2 ) << 1 ) 255 + ( piSrcTmp[iSrcStep] << 2 ) 256 - ( ( piSrcTmp[iSrcStep2] + iTmp1 ) << 3 ) 257 + ( piSrcTmp[iSrcStep4] << 4 ) 258 + ( piSrcTmp[iSrcStep3] << 6); 259 260 #if REMOVE_INTERMEDIATE_CLIPPING 261 piDst [x * iDstStep] = (iSum + shiftOffset) >> shiftNum; 262 #else 263 piDst [x * iDstStep] = Clip3(0,16383, (iSum + shiftOffset) >> shiftNum ); 264 #endif 226 - ( ( piSrcTmp[iSrcStep2] - iTmp2 ) << 1 ) 227 + ( piSrcTmp[iSrcStep] << 2 ) 228 - ( ( piSrcTmp[iSrcStep2] + iTmp1 ) << 3 ) 229 + ( piSrcTmp[iSrcStep4] << 4 ); 230 231 piDst [x * iDstStep] = ClipY(( (iSum + 32) >> 6 )+ piSrcTmp[iSrcStep3]); 265 232 piSrcTmp += iSrcStep; 266 233 } … … 271 238 } 272 239 273 __inline Void TRenInterpFilter::xCTI_FilterQuarter0Hor_ha(Int* piSrc, Int iSrcStride, Int iSrcStep, Int iWidth, Int iHeight, Int iDstStride, Int iDstStep, Pel*& rpiDst) 274 { 240 __inline Void TRenInterpFilter::xCTI_FilterQuarter0Hor(Int* piSrc, Int iSrcStride, Int iSrcStep, Int iWidth, Int iHeight, Int iDstStride, Int iDstStep, Pel*& rpiDst) 241 { 242 assert( g_bitDepthC == g_bitDepthY); // ToDo: Update renderer to work with different luma/chroma bit depth 243 275 244 Pel* piDst = rpiDst; 276 245 Int iSum; 277 246 Int* piSrcTmp; 278 279 247 Int iSrcStep2 = iSrcStep*2; 280 248 Int iSrcStep3 = iSrcStep*3; … … 283 251 Int iSrcStep6 = iSrcStep*6; 284 252 Int iSrcStep7 = iSrcStep*7; 285 Int shiftNum = 6 + g_uiBitIncrement + g_uiBitDepth - 8; 286 Int shiftOffset = (shiftNum > 0) ? ( 1 << (shiftNum - 1)) : 0 ; 253 287 254 Int iTmp1, iTmp2; 288 255 … … 304 271 + ( piSrcTmp[iSrcStep3] << 6 ); 305 272 306 #if REMOVE_INTERMEDIATE_CLIPPING 307 piDst [x * iDstStep] = (iSum + shiftOffset) >> shiftNum; 308 #else 309 piDst [x * iDstStep] = Clip3(0, 16383, (iSum + shiftOffset) >> shiftNum ); 310 #endif 273 piDst [x * iDstStep] = ClipY( (iSum + 2048) >> 12 ); 311 274 piSrcTmp += iSrcStep; 312 275 } … … 315 278 } 316 279 return; 317 318 } 319 320 321 __inline Void TRenInterpFilter::xCTI_FilterQuarter1Hor_ha(Pel* piSrc, Int iSrcStride, Int iSrcStep, Int iWidth, Int iHeight, Int iDstStride, Int iDstStep, Pel*& rpiDst) 322 { 280 } 281 282 __inline Void TRenInterpFilter::xCTI_FilterQuarter1Hor(Pel* piSrc, Int iSrcStride, Int iSrcStep, Int iWidth, Int iHeight, Int iDstStride, Int iDstStep, Pel*& rpiDst) 283 { 284 assert( g_bitDepthC == g_bitDepthY); // ToDo: Update renderer to work with different luma/chroma bit depth 323 285 Pel* piDst = rpiDst; 324 286 Int iSum; 325 287 Pel* piSrcTmp; 326 327 288 Int iSrcStep2 = iSrcStep*2; 328 289 Int iSrcStep3 = iSrcStep*3; … … 331 292 Int iSrcStep6 = iSrcStep*6; 332 293 Int iSrcStep7 = iSrcStep*7; 333 Int shiftNum = g_uiBitIncrement + g_uiBitDepth - 8; 334 Int shiftOffset = (shiftNum > 0) ? ( 1 << (shiftNum - 1)) : 0 ; 294 295 Int iTmp1, iTmp2; 296 for ( Int y = iHeight; y != 0; y-- ) 297 { 298 piSrcTmp = &piSrc[ -3*iSrcStep ]; 299 for ( Int x = 0; x < iWidth; x++ ) 300 { 301 // {-1, 3, -7, 19, 57, -10, 4, -1 }, 302 303 iTmp1 = piSrcTmp[iSrcStep4] + piSrcTmp[iSrcStep2]; 304 iTmp2 = piSrcTmp[iSrcStep ] + piSrcTmp[iSrcStep3]; 305 306 iSum = iTmp1 + iTmp2 - piSrcTmp[0] - piSrcTmp[iSrcStep7] 307 - ( ( piSrcTmp[iSrcStep5] - iTmp2 ) << 1 ) 308 + ( piSrcTmp[iSrcStep6] << 2 ) 309 - ( ( piSrcTmp[iSrcStep5] + iTmp1 ) << 3 ) 310 + ( piSrcTmp[iSrcStep3] << 4 ); 311 312 piDst [x * iDstStep] = ClipY( ((iSum + 32) >> 6) + piSrcTmp[iSrcStep4] ); 313 piSrcTmp += iSrcStep; 314 } 315 piSrc += iSrcStride; 316 piDst += iDstStride; 317 } 318 return; 319 } 320 321 __inline Void TRenInterpFilter::xCTI_FilterQuarter1Hor(Int* piSrc, Int iSrcStride, Int iSrcStep, Int iWidth, Int iHeight, Int iDstStride, Int iDstStep, Pel*& rpiDst) 322 { 323 assert( g_bitDepthC == g_bitDepthY); // ToDo: Update renderer to work with different luma/chroma bit depth 324 325 Pel* piDst = rpiDst; 326 Int iSum; 327 Int* piSrcTmp; 328 Int iSrcStep2 = iSrcStep*2; 329 Int iSrcStep3 = iSrcStep*3; 330 Int iSrcStep4 = iSrcStep*4; 331 Int iSrcStep5 = iSrcStep*5; 332 Int iSrcStep6 = iSrcStep*6; 333 Int iSrcStep7 = iSrcStep*7; 335 334 336 335 Int iTmp1, iTmp2; … … 351 350 + ( piSrcTmp[iSrcStep3] << 4 ) 352 351 + ( piSrcTmp[iSrcStep4] << 6 ); 353 354 #if REMOVE_INTERMEDIATE_CLIPPING 355 piDst [x * iDstStep] = (iSum + shiftOffset) >> shiftNum; 356 #else 357 piDst [x * iDstStep] = Clip3(0, 16383, (iSum + shiftOffset) >> shiftNum ); 358 #endif 352 353 piDst [x * iDstStep] = ClipY( (iSum + 2048) >> 12 ); 359 354 piSrcTmp += iSrcStep; 360 355 } … … 363 358 } 364 359 return; 365 366 367 } 368 369 __inline Void TRenInterpFilter::xCTI_FilterQuarter1Hor_ha(Int* piSrc, Int iSrcStride, Int iSrcStep, Int iWidth, Int iHeight, Int iDstStride, Int iDstStep, Pel*& rpiDst) 370 { 371 Pel* piDst = rpiDst; 372 Int iSum; 373 Int* piSrcTmp; 374 375 Int iSrcStep2 = iSrcStep*2; 376 Int iSrcStep3 = iSrcStep*3; 377 Int iSrcStep4 = iSrcStep*4; 378 Int iSrcStep5 = iSrcStep*5; 379 Int iSrcStep6 = iSrcStep*6; 380 Int iSrcStep7 = iSrcStep*7; 381 Int shiftNum = 6+g_uiBitIncrement + g_uiBitDepth - 8; 382 Int shiftOffset = (shiftNum > 0) ? ( 1 << (shiftNum - 1)) : 0 ; 383 Int iTmp1, iTmp2; 360 } 361 362 __inline Void TRenInterpFilter::xCTI_FilterHalfVer (Pel* piSrc, Int iSrcStride, Int iSrcStep, Int iWidth, Int iHeight, Int iDstStride, Int iDstStep, Int*& rpiDst, Int iDstStridePel, Pel*& rpiDstPel ) 363 { 364 assert( g_bitDepthC == g_bitDepthY); // ToDo: Update renderer to work with different luma/chroma bit depth 365 Int* piDst = rpiDst; 366 Pel* piDstPel = rpiDstPel; 367 Int iSum; 368 Pel* piSrcTmp; 369 Int iSrcStride2 = iSrcStride*2; 370 Int iSrcStride3 = iSrcStride*3; 371 Int iSrcStride4 = iSrcStride*4; 372 Int iSrcStride5 = iSrcStride*5; 373 Int iSrcStride6 = iSrcStride*6; 374 Int iSrcStride7 = iSrcStride*7; 375 376 Int iTmp0, iTmp1, iTmp2, iTmp3, iTmpA; 384 377 for ( Int y = iHeight; y != 0; y-- ) 385 378 { 386 piSrcTmp = &piSrc[ -3*iSrcSt ep];379 piSrcTmp = &piSrc[ -3*iSrcStride ]; 387 380 for ( Int x = 0; x < iWidth; x++ ) 388 381 { 389 // {-1, 3, -7, 19, 57, -10, 4, -1 }, 390 391 iTmp1 = piSrcTmp[iSrcStep4] + piSrcTmp[iSrcStep2]; 392 iTmp2 = piSrcTmp[iSrcStep ] + piSrcTmp[iSrcStep3]; 393 394 iSum = iTmp1 + iTmp2 - piSrcTmp[0] - piSrcTmp[iSrcStep7] 395 - ( ( piSrcTmp[iSrcStep5] - iTmp2 ) << 1 ) 396 + ( piSrcTmp[iSrcStep6] << 2 ) 397 - ( ( piSrcTmp[iSrcStep5] + iTmp1 ) << 3 ) 398 + ( piSrcTmp[iSrcStep3] << 4 ) 399 + ( piSrcTmp[iSrcStep4] << 6 ); 400 401 #if REMOVE_INTERMEDIATE_CLIPPING 402 piDst [x * iDstStep] = (iSum + shiftOffset) >> shiftNum; 403 #else 404 piDst [x * iDstStep] = Clip3(0, 16383, (iSum + shiftOffset) >> shiftNum ); 405 #endif 382 // { -1,4,-11,40,40,-11,4,-1 } 383 iTmp0 = piSrcTmp[ 0]+piSrcTmp[iSrcStride7]; 384 iTmp1 = piSrcTmp[iSrcStride ]+piSrcTmp[iSrcStride6]; 385 iTmp2 = piSrcTmp[iSrcStride2]+piSrcTmp[iSrcStride5]; 386 iTmp3 = piSrcTmp[iSrcStride3]+piSrcTmp[iSrcStride4]; 387 388 iTmpA = (iTmp3 << 2) - iTmp2; 389 390 iSum = ( iTmp1 << 2 ) 391 + ( iTmpA << 3 ) 392 + ( iTmpA << 1 ) 393 - iTmp0 - iTmp2; 394 395 piDst[x * iDstStep] = iSum; 396 piDstPel[x * iDstStep] = ClipY( (iSum + 32) >> 6 ); 406 397 piSrcTmp += iSrcStep; 407 398 } 408 399 piSrc += iSrcStride; 409 400 piDst += iDstStride; 410 } 411 return; 412 413 } 414 415 416 417 __inline Void TRenInterpFilter::xCTI_FilterQuarter0Ver_ha (Pel* piSrc, Int iSrcStride, Int iSrcStep, Int iWidth, Int iHeight, Int iDstStride, Int iDstStep, Pel*& rpiDst) 418 { 401 piDstPel += iDstStridePel; 402 } 403 return; 404 } 405 406 __inline Void TRenInterpFilter::xCTI_FilterHalfVer (Pel* piSrc, Int iSrcStride, Int iSrcStep, Int iWidth, Int iHeight, Int iDstStride, Int iDstStep, Int*& rpiDst) 407 { 408 Int* piDst = rpiDst; 409 Int iSum; 410 Pel* piSrcTmp; 411 Int iSrcStride2 = iSrcStride*2; 412 Int iSrcStride3 = iSrcStride*3; 413 Int iSrcStride4 = iSrcStride*4; 414 Int iSrcStride5 = iSrcStride*5; 415 Int iSrcStride6 = iSrcStride*6; 416 Int iSrcStride7 = iSrcStride*7; 417 418 Int iTmp0, iTmp1, iTmp2, iTmp3, iTmpA; 419 for ( Int y = iHeight; y != 0; y-- ) 420 { 421 piSrcTmp = &piSrc[ -3*iSrcStride ]; 422 for ( Int x = 0; x < iWidth; x++ ) 423 { 424 // { -1,4,-11,40,40,-11,4,-1 } 425 iTmp0 = piSrcTmp[ 0]+piSrcTmp[iSrcStride7]; 426 iTmp1 = piSrcTmp[iSrcStride ]+piSrcTmp[iSrcStride6]; 427 iTmp2 = piSrcTmp[iSrcStride2]+piSrcTmp[iSrcStride5]; 428 iTmp3 = piSrcTmp[iSrcStride3]+piSrcTmp[iSrcStride4]; 429 430 iTmpA = (iTmp3 << 2) - iTmp2; 431 432 iSum = ( iTmp1 << 2 ) 433 + ( iTmpA << 3 ) 434 + ( iTmpA << 1 ) 435 - iTmp0 - iTmp2; 436 437 piDst[x * iDstStep] = iSum; 438 piSrcTmp += iSrcStep; 439 } 440 piSrc += iSrcStride; 441 piDst += iDstStride; 442 } 443 return; 444 } 445 446 __inline Void TRenInterpFilter::xCTI_FilterHalfVer (Pel* piSrc, Int iSrcStride, Int iSrcStep, Int iWidth, Int iHeight, Int iDstStride, Int iDstStep, Pel*& rpiDst) 447 { 448 assert( g_bitDepthC == g_bitDepthY); // ToDo: Update renderer to work with different luma/chroma bit depth 419 449 Pel* piDst = rpiDst; 420 450 Int iSum; … … 427 457 Int iSrcStride6 = iSrcStride*6; 428 458 Int iSrcStride7 = iSrcStride*7; 429 Int shiftNum = g_uiBitIncrement + g_uiBitDepth - 8; 430 Int shiftOffset = (shiftNum > 0) ? ( 1 << (shiftNum - 1)) : 0 ; 431 Int iTmp1, iTmp2; 459 460 Int iTmp0, iTmp1, iTmp2, iTmp3, iTmpA; 432 461 for ( Int y = iHeight; y != 0; y-- ) 433 462 { … … 435 464 for ( Int x = 0; x < iWidth; x++ ) 436 465 { 437 // {-1, 4, -10, 57, 19, -7, 3, -1 }, 438 439 iTmp1 = piSrcTmp[iSrcStride3] + piSrcTmp[iSrcStride5]; 440 iTmp2 = piSrcTmp[iSrcStride6] + piSrcTmp[iSrcStride4]; 441 442 iSum = iTmp1 + iTmp2 - piSrcTmp[0] - piSrcTmp[iSrcStride7] 443 - ( ( piSrcTmp[iSrcStride2] - iTmp2 ) << 1 ) 444 + ( piSrcTmp[iSrcStride] << 2 ) 445 - ( ( piSrcTmp[iSrcStride2] + iTmp1 ) << 3 ) 446 + ( piSrcTmp[iSrcStride4] << 4 ) 447 + ( piSrcTmp[iSrcStride3] << 6); 448 449 #if REMOVE_INTERMEDIATE_CLIPPING 450 piDst [x * iDstStep] = (iSum + shiftOffset) >> shiftNum; 451 #else 452 piDst [x * iDstStep] = Clip3(0, 16383, (iSum + shiftOffset) >> shiftNum ); 453 #endif 466 // { -1,4,-11,40,40,-11,4,-1 } 467 iTmp0 = piSrcTmp[ 0]+piSrcTmp[iSrcStride7]; 468 iTmp1 = piSrcTmp[iSrcStride ]+piSrcTmp[iSrcStride6]; 469 iTmp2 = piSrcTmp[iSrcStride2]+piSrcTmp[iSrcStride5]; 470 iTmp3 = piSrcTmp[iSrcStride3]+piSrcTmp[iSrcStride4]; 471 472 iTmpA = (iTmp3 << 2) - iTmp2; 473 474 iSum = ( iTmp1 << 2 ) 475 + ( iTmpA << 3 ) 476 + ( iTmpA << 1 ) 477 - iTmp0 - iTmp2; 478 479 piDst[x * iDstStep] = ClipY( (iSum + 32) >> 6 ); 454 480 piSrcTmp += iSrcStep; 455 481 } … … 458 484 } 459 485 return; 460 461 } 462 463 464 __inline Void TRenInterpFilter::xCTI_FilterQuarter1Ver_ha (Pel* piSrc, Int iSrcStride, Int iSrcStep, Int iWidth, Int iHeight, Int iDstStride, Int iDstStep, Pel*& rpiDst) 465 { 466 Pel* piDst = rpiDst; 486 } 487 488 __inline Void TRenInterpFilter::xCTI_FilterQuarter0Ver (Pel* piSrc, Int iSrcStride, Int iSrcStep, Int iWidth, Int iHeight, Int iDstStride, Int iDstStep, Int*& rpiDst) 489 { 490 Int* piDst = rpiDst; 467 491 Int iSum; 468 492 Pel* piSrcTmp; 469 470 493 Int iSrcStride2 = iSrcStride*2; 471 494 Int iSrcStride3 = iSrcStride*3; … … 474 497 Int iSrcStride6 = iSrcStride*6; 475 498 Int iSrcStride7 = iSrcStride*7; 476 Int shiftNum = g_uiBitIncrement + g_uiBitDepth - 8; 477 Int shiftOffset = (shiftNum > 0) ? ( 1 << (shiftNum - 1)) : 0 ; 499 478 500 Int iTmp1, iTmp2; 479 480 501 for ( Int y = iHeight; y != 0; y-- ) 481 502 { … … 483 504 for ( Int x = 0; x < iWidth; x++ ) 484 505 { 485 /// {-1, 3, -7, 19, 57, -10, 4, -1 }, 486 iTmp1 = piSrcTmp[iSrcStride4] + piSrcTmp[iSrcStride2]; 487 iTmp2 = piSrcTmp[iSrcStride ] + piSrcTmp[iSrcStride3]; 506 // {-1, 4, -10, 57, 19, -7, 3, -1 }, 507 508 iTmp1 = piSrcTmp[iSrcStride3] + piSrcTmp[iSrcStride5]; 509 iTmp2 = piSrcTmp[iSrcStride6] + piSrcTmp[iSrcStride4]; 488 510 489 511 iSum = iTmp1 + iTmp2 - piSrcTmp[0] - piSrcTmp[iSrcStride7] 490 - ( ( piSrcTmp[iSrcStride5] - iTmp2 ) << 1 ) 491 + ( piSrcTmp[iSrcStride6] << 2 ) 492 - ( ( piSrcTmp[iSrcStride5] + iTmp1 ) << 3 ) 493 + ( piSrcTmp[iSrcStride3] << 4 ) 494 + ( piSrcTmp[iSrcStride4] << 6 ); 495 496 #if REMOVE_INTERMEDIATE_CLIPPING 497 piDst [x * iDstStep] = (iSum + shiftOffset) >> shiftNum; 498 #else 499 piDst [x * iDstStep] = Clip3(0, 16383, (iSum + shiftOffset) >> shiftNum ); 500 #endif 512 - ( ( piSrcTmp[iSrcStride2] - iTmp2 ) << 1 ) 513 + ( piSrcTmp[iSrcStride] << 2 ) 514 - ( ( piSrcTmp[iSrcStride2] + iTmp1 ) << 3 ) 515 + ( piSrcTmp[iSrcStride4] << 4 ) 516 + ( piSrcTmp[iSrcStride3] << 6 ); 517 518 piDst[x * iDstStep] = iSum; 501 519 piSrcTmp += iSrcStep; 502 520 } … … 505 523 } 506 524 return; 507 508 } 509 510 __inline Void TRenInterpFilter::xCTI_FilterHalfVer_ha (Pel* piSrc, Int iSrcStride, Int iSrcStep, Int iWidth, Int iHeight, Int iDstStride, Int iDstStep, Pel*& rpiDst) 511 { 525 } 526 527 __inline Void TRenInterpFilter::xCTI_FilterQuarter0Ver (Pel* piSrc, Int iSrcStride, Int iSrcStep, Int iWidth, Int iHeight, Int iDstStride, Int iDstStep, Pel*& rpiDst) 528 { 529 assert( g_bitDepthC == g_bitDepthY ); // ToDo: Update renderer to work with different luma/chroma bit depth 512 530 Pel* piDst = rpiDst; 513 531 Int iSum; … … 520 538 Int iSrcStride6 = iSrcStride*6; 521 539 Int iSrcStride7 = iSrcStride*7; 522 Int shiftNum = g_uiBitIncrement + g_uiBitDepth - 8;523 Int shiftOffset = (shiftNum > 0) ? ( 1 << (shiftNum - 1)) : 0 ;524 Int iTmp0, iTmp1, iTmp2, iTmp3, iTmpA;525 for ( Int y = iHeight; y != 0; y-- )526 {527 piSrcTmp = &piSrc[ -3*iSrcStride ];528 for ( Int x = 0; x < iWidth; x++ )529 {530 // { -1,4,-11,40,40,-11,4,-1 }531 iTmp0 = piSrcTmp[ 0]+piSrcTmp[iSrcStride7];532 iTmp1 = piSrcTmp[iSrcStride ]+piSrcTmp[iSrcStride6];533 iTmp2 = piSrcTmp[iSrcStride2]+piSrcTmp[iSrcStride5];534 iTmp3 = piSrcTmp[iSrcStride3]+piSrcTmp[iSrcStride4];535 536 iTmpA = (iTmp3 << 2) - iTmp2;537 538 iSum = ( iTmp1 << 2 )539 + ( iTmpA << 3 )540 + ( iTmpA << 1 )541 - iTmp0 - iTmp2;542 543 #if REMOVE_INTERMEDIATE_CLIPPING544 piDst [x * iDstStep] = (iSum + shiftOffset) >> shiftNum;545 #else546 piDst [x * iDstStep] = Clip3(0, 16383, (iSum + shiftOffset) >> shiftNum );547 #endif548 piSrcTmp += iSrcStep;549 }550 piSrc += iSrcStride;551 piDst += iDstStride;552 }553 return;554 555 }556 557 558 #endif559 560 // ------------------------------------------------------------------------------------------------561 // DCTIF filters562 // ------------------------------------------------------------------------------------------------563 564 __inline Void TRenInterpFilter::xCTI_FilterHalfHor(Pel* piSrc, Int iSrcStride, Int iSrcStep, Int iWidth, Int iHeight, Int iDstStride, Int iDstStep, Pel*& rpiDst)565 {566 Pel* piDst = rpiDst;567 Int iSum;568 Pel* piSrcTmp;569 Int iSrcStep2 = iSrcStep*2;570 Int iSrcStep3 = iSrcStep*3;571 Int iSrcStep4 = iSrcStep*4;572 Int iSrcStep5 = iSrcStep*5;573 Int iSrcStep6 = iSrcStep*6;574 Int iSrcStep7 = iSrcStep*7;575 576 Int iTmp0, iTmp1, iTmp2, iTmp3, iTmpA;577 578 for ( Int y = iHeight; y != 0; y-- )579 {580 piSrcTmp = &piSrc[ -3*iSrcStep ];581 for ( Int x = 0; x < iWidth; x++ )582 {583 // { -1,4,-11,40,40,-11,4,-1 }584 iTmp0 = piSrcTmp[ 0]+piSrcTmp[iSrcStep7];585 iTmp1 = piSrcTmp[iSrcStep]+piSrcTmp[iSrcStep6];586 iTmp2 = piSrcTmp[iSrcStep2]+piSrcTmp[iSrcStep5];587 iTmp3 = piSrcTmp[iSrcStep3]+piSrcTmp[iSrcStep4];588 589 iTmpA = (iTmp3 << 2) - iTmp2;590 591 iSum = ( iTmp1 << 2 )592 + ( iTmpA << 3 )593 + ( iTmpA << 1 )594 - iTmp0 - iTmp2;595 596 piDst [x * iDstStep] = Clip( (iSum + 32) >> 6 );597 piSrcTmp += iSrcStep;598 }599 piSrc += iSrcStride;600 piDst += iDstStride;601 }602 return;603 }604 605 __inline Void TRenInterpFilter::xCTI_FilterHalfHor(Int* piSrc, Int iSrcStride, Int iSrcStep, Int iWidth, Int iHeight, Int iDstStride, Int iDstStep, Pel*& rpiDst)606 {607 Pel* piDst = rpiDst;608 Int iSum;609 Int* piSrcTmp;610 Int iSrcStep2 = iSrcStep*2;611 Int iSrcStep3 = iSrcStep*3;612 Int iSrcStep4 = iSrcStep*4;613 Int iSrcStep5 = iSrcStep*5;614 Int iSrcStep6 = iSrcStep*6;615 Int iSrcStep7 = iSrcStep*7;616 617 Int iTmp0, iTmp1, iTmp2, iTmp3, iTmpA;618 619 for ( Int y = iHeight; y != 0; y-- )620 {621 piSrcTmp = &piSrc[ -3*iSrcStep ];622 for ( Int x = 0; x < iWidth; x++ )623 {624 // { -1,4,-11,40,40,-11,4,-1 }625 iTmp0 = piSrcTmp[ 0]+piSrcTmp[iSrcStep7];626 iTmp1 = piSrcTmp[iSrcStep ]+piSrcTmp[iSrcStep6];627 iTmp2 = piSrcTmp[iSrcStep2]+piSrcTmp[iSrcStep5];628 iTmp3 = piSrcTmp[iSrcStep3]+piSrcTmp[iSrcStep4];629 630 iTmpA = (iTmp3 << 2) - iTmp2;631 632 iSum = ( iTmp1 << 2 )633 + ( iTmpA << 3 )634 + ( iTmpA << 1 )635 - iTmp0 - iTmp2;636 637 piDst [x * iDstStep] = Clip( (iSum + 2048) >> 12 );638 piSrcTmp += iSrcStep;639 }640 piSrc += iSrcStride;641 piDst += iDstStride;642 }643 return;644 }645 646 __inline Void TRenInterpFilter::xCTI_FilterQuarter0Hor(Pel* piSrc, Int iSrcStride, Int iSrcStep, Int iWidth, Int iHeight, Int iDstStride, Int iDstStep, Pel*& rpiDst)647 {648 Pel* piDst = rpiDst;649 Int iSum;650 Pel* piSrcTmp;651 Int iSrcStep2 = iSrcStep*2;652 Int iSrcStep3 = iSrcStep*3;653 Int iSrcStep4 = iSrcStep*4;654 Int iSrcStep5 = iSrcStep*5;655 Int iSrcStep6 = iSrcStep*6;656 Int iSrcStep7 = iSrcStep*7;657 658 Int iTmp1, iTmp2;659 660 for ( Int y = iHeight; y != 0; y-- )661 {662 piSrcTmp = &piSrc[ -3*iSrcStep ];663 for ( Int x = 0; x < iWidth; x++ )664 {665 // {-1, 4, -10, 57, 19, -7, 3, -1 },666 667 iTmp1 = piSrcTmp[iSrcStep3] + piSrcTmp[iSrcStep5];668 iTmp2 = piSrcTmp[iSrcStep6] + piSrcTmp[iSrcStep4];669 670 iSum = iTmp1 + iTmp2 - piSrcTmp[0] - piSrcTmp[iSrcStep7]671 - ( ( piSrcTmp[iSrcStep2] - iTmp2 ) << 1 )672 + ( piSrcTmp[iSrcStep] << 2 )673 - ( ( piSrcTmp[iSrcStep2] + iTmp1 ) << 3 )674 + ( piSrcTmp[iSrcStep4] << 4 );675 676 piDst [x * iDstStep] = Clip(( (iSum + 32) >> 6 )+ piSrcTmp[iSrcStep3]);677 piSrcTmp += iSrcStep;678 }679 piSrc += iSrcStride;680 piDst += iDstStride;681 }682 return;683 }684 685 __inline Void TRenInterpFilter::xCTI_FilterQuarter0Hor(Int* piSrc, Int iSrcStride, Int iSrcStep, Int iWidth, Int iHeight, Int iDstStride, Int iDstStep, Pel*& rpiDst)686 {687 Pel* piDst = rpiDst;688 Int iSum;689 Int* piSrcTmp;690 Int iSrcStep2 = iSrcStep*2;691 Int iSrcStep3 = iSrcStep*3;692 Int iSrcStep4 = iSrcStep*4;693 Int iSrcStep5 = iSrcStep*5;694 Int iSrcStep6 = iSrcStep*6;695 Int iSrcStep7 = iSrcStep*7;696 697 Int iTmp1, iTmp2;698 699 for ( Int y = iHeight; y != 0; y-- )700 {701 piSrcTmp = &piSrc[ -3*iSrcStep ];702 for ( Int x = 0; x < iWidth; x++ )703 {704 // {-1, 4, -10, 57, 19, -7, 3, -1 },705 706 iTmp1 = piSrcTmp[iSrcStep3] + piSrcTmp[iSrcStep5];707 iTmp2 = piSrcTmp[iSrcStep6] + piSrcTmp[iSrcStep4];708 709 iSum = iTmp1 + iTmp2 - piSrcTmp[0] - piSrcTmp[iSrcStep7]710 - ( ( piSrcTmp[iSrcStep2] - iTmp2 ) << 1 )711 + ( piSrcTmp[iSrcStep] << 2 )712 - ( ( piSrcTmp[iSrcStep2] + iTmp1 ) << 3 )713 + ( piSrcTmp[iSrcStep4] << 4 )714 + ( piSrcTmp[iSrcStep3] << 6 );715 716 piDst [x * iDstStep] = Clip( (iSum + 2048) >> 12 );717 piSrcTmp += iSrcStep;718 }719 piSrc += iSrcStride;720 piDst += iDstStride;721 }722 return;723 }724 725 __inline Void TRenInterpFilter::xCTI_FilterQuarter1Hor(Pel* piSrc, Int iSrcStride, Int iSrcStep, Int iWidth, Int iHeight, Int iDstStride, Int iDstStep, Pel*& rpiDst)726 {727 Pel* piDst = rpiDst;728 Int iSum;729 Pel* piSrcTmp;730 Int iSrcStep2 = iSrcStep*2;731 Int iSrcStep3 = iSrcStep*3;732 Int iSrcStep4 = iSrcStep*4;733 Int iSrcStep5 = iSrcStep*5;734 Int iSrcStep6 = iSrcStep*6;735 Int iSrcStep7 = iSrcStep*7;736 737 Int iTmp1, iTmp2;738 for ( Int y = iHeight; y != 0; y-- )739 {740 piSrcTmp = &piSrc[ -3*iSrcStep ];741 for ( Int x = 0; x < iWidth; x++ )742 {743 // {-1, 3, -7, 19, 57, -10, 4, -1 },744 745 iTmp1 = piSrcTmp[iSrcStep4] + piSrcTmp[iSrcStep2];746 iTmp2 = piSrcTmp[iSrcStep ] + piSrcTmp[iSrcStep3];747 748 iSum = iTmp1 + iTmp2 - piSrcTmp[0] - piSrcTmp[iSrcStep7]749 - ( ( piSrcTmp[iSrcStep5] - iTmp2 ) << 1 )750 + ( piSrcTmp[iSrcStep6] << 2 )751 - ( ( piSrcTmp[iSrcStep5] + iTmp1 ) << 3 )752 + ( piSrcTmp[iSrcStep3] << 4 );753 754 piDst [x * iDstStep] = Clip( ((iSum + 32) >> 6) + piSrcTmp[iSrcStep4] );755 piSrcTmp += iSrcStep;756 }757 piSrc += iSrcStride;758 piDst += iDstStride;759 }760 return;761 }762 763 __inline Void TRenInterpFilter::xCTI_FilterQuarter1Hor(Int* piSrc, Int iSrcStride, Int iSrcStep, Int iWidth, Int iHeight, Int iDstStride, Int iDstStep, Pel*& rpiDst)764 {765 Pel* piDst = rpiDst;766 Int iSum;767 Int* piSrcTmp;768 Int iSrcStep2 = iSrcStep*2;769 Int iSrcStep3 = iSrcStep*3;770 Int iSrcStep4 = iSrcStep*4;771 Int iSrcStep5 = iSrcStep*5;772 Int iSrcStep6 = iSrcStep*6;773 Int iSrcStep7 = iSrcStep*7;774 775 Int iTmp1, iTmp2;776 for ( Int y = iHeight; y != 0; y-- )777 {778 piSrcTmp = &piSrc[ -3*iSrcStep ];779 for ( Int x = 0; x < iWidth; x++ )780 {781 // {-1, 3, -7, 19, 57, -10, 4, -1 },782 783 iTmp1 = piSrcTmp[iSrcStep4] + piSrcTmp[iSrcStep2];784 iTmp2 = piSrcTmp[iSrcStep ] + piSrcTmp[iSrcStep3];785 786 iSum = iTmp1 + iTmp2 - piSrcTmp[0] - piSrcTmp[iSrcStep7]787 - ( ( piSrcTmp[iSrcStep5] - iTmp2 ) << 1 )788 + ( piSrcTmp[iSrcStep6] << 2 )789 - ( ( piSrcTmp[iSrcStep5] + iTmp1 ) << 3 )790 + ( piSrcTmp[iSrcStep3] << 4 )791 + ( piSrcTmp[iSrcStep4] << 6 );792 793 piDst [x * iDstStep] = Clip( (iSum + 2048) >> 12 );794 piSrcTmp += iSrcStep;795 }796 piSrc += iSrcStride;797 piDst += iDstStride;798 }799 return;800 }801 802 __inline Void TRenInterpFilter::xCTI_FilterHalfVer (Pel* piSrc, Int iSrcStride, Int iSrcStep, Int iWidth, Int iHeight, Int iDstStride, Int iDstStep, Int*& rpiDst, Int iDstStridePel, Pel*& rpiDstPel )803 {804 Int* piDst = rpiDst;805 Pel* piDstPel = rpiDstPel;806 Int iSum;807 Pel* piSrcTmp;808 Int iSrcStride2 = iSrcStride*2;809 Int iSrcStride3 = iSrcStride*3;810 Int iSrcStride4 = iSrcStride*4;811 Int iSrcStride5 = iSrcStride*5;812 Int iSrcStride6 = iSrcStride*6;813 Int iSrcStride7 = iSrcStride*7;814 815 Int iTmp0, iTmp1, iTmp2, iTmp3, iTmpA;816 for ( Int y = iHeight; y != 0; y-- )817 {818 piSrcTmp = &piSrc[ -3*iSrcStride ];819 for ( Int x = 0; x < iWidth; x++ )820 {821 // { -1,4,-11,40,40,-11,4,-1 }822 iTmp0 = piSrcTmp[ 0]+piSrcTmp[iSrcStride7];823 iTmp1 = piSrcTmp[iSrcStride ]+piSrcTmp[iSrcStride6];824 iTmp2 = piSrcTmp[iSrcStride2]+piSrcTmp[iSrcStride5];825 iTmp3 = piSrcTmp[iSrcStride3]+piSrcTmp[iSrcStride4];826 827 iTmpA = (iTmp3 << 2) - iTmp2;828 829 iSum = ( iTmp1 << 2 )830 + ( iTmpA << 3 )831 + ( iTmpA << 1 )832 - iTmp0 - iTmp2;833 834 piDst[x * iDstStep] = iSum;835 piDstPel[x * iDstStep] = Clip( (iSum + 32) >> 6 );836 piSrcTmp += iSrcStep;837 }838 piSrc += iSrcStride;839 piDst += iDstStride;840 piDstPel += iDstStridePel;841 }842 return;843 }844 845 __inline Void TRenInterpFilter::xCTI_FilterHalfVer (Pel* piSrc, Int iSrcStride, Int iSrcStep, Int iWidth, Int iHeight, Int iDstStride, Int iDstStep, Int*& rpiDst)846 {847 Int* piDst = rpiDst;848 Int iSum;849 Pel* piSrcTmp;850 Int iSrcStride2 = iSrcStride*2;851 Int iSrcStride3 = iSrcStride*3;852 Int iSrcStride4 = iSrcStride*4;853 Int iSrcStride5 = iSrcStride*5;854 Int iSrcStride6 = iSrcStride*6;855 Int iSrcStride7 = iSrcStride*7;856 857 Int iTmp0, iTmp1, iTmp2, iTmp3, iTmpA;858 for ( Int y = iHeight; y != 0; y-- )859 {860 piSrcTmp = &piSrc[ -3*iSrcStride ];861 for ( Int x = 0; x < iWidth; x++ )862 {863 // { -1,4,-11,40,40,-11,4,-1 }864 iTmp0 = piSrcTmp[ 0]+piSrcTmp[iSrcStride7];865 iTmp1 = piSrcTmp[iSrcStride ]+piSrcTmp[iSrcStride6];866 iTmp2 = piSrcTmp[iSrcStride2]+piSrcTmp[iSrcStride5];867 iTmp3 = piSrcTmp[iSrcStride3]+piSrcTmp[iSrcStride4];868 869 iTmpA = (iTmp3 << 2) - iTmp2;870 871 iSum = ( iTmp1 << 2 )872 + ( iTmpA << 3 )873 + ( iTmpA << 1 )874 - iTmp0 - iTmp2;875 876 piDst[x * iDstStep] = iSum;877 piSrcTmp += iSrcStep;878 }879 piSrc += iSrcStride;880 piDst += iDstStride;881 }882 return;883 }884 885 __inline Void TRenInterpFilter::xCTI_FilterHalfVer (Pel* piSrc, Int iSrcStride, Int iSrcStep, Int iWidth, Int iHeight, Int iDstStride, Int iDstStep, Pel*& rpiDst)886 {887 Pel* piDst = rpiDst;888 Int iSum;889 Pel* piSrcTmp;890 891 Int iSrcStride2 = iSrcStride*2;892 Int iSrcStride3 = iSrcStride*3;893 Int iSrcStride4 = iSrcStride*4;894 Int iSrcStride5 = iSrcStride*5;895 Int iSrcStride6 = iSrcStride*6;896 Int iSrcStride7 = iSrcStride*7;897 898 Int iTmp0, iTmp1, iTmp2, iTmp3, iTmpA;899 for ( Int y = iHeight; y != 0; y-- )900 {901 piSrcTmp = &piSrc[ -3*iSrcStride ];902 for ( Int x = 0; x < iWidth; x++ )903 {904 // { -1,4,-11,40,40,-11,4,-1 }905 iTmp0 = piSrcTmp[ 0]+piSrcTmp[iSrcStride7];906 iTmp1 = piSrcTmp[iSrcStride ]+piSrcTmp[iSrcStride6];907 iTmp2 = piSrcTmp[iSrcStride2]+piSrcTmp[iSrcStride5];908 iTmp3 = piSrcTmp[iSrcStride3]+piSrcTmp[iSrcStride4];909 910 iTmpA = (iTmp3 << 2) - iTmp2;911 912 iSum = ( iTmp1 << 2 )913 + ( iTmpA << 3 )914 + ( iTmpA << 1 )915 - iTmp0 - iTmp2;916 917 piDst[x * iDstStep] = Clip( (iSum + 32) >> 6 );918 piSrcTmp += iSrcStep;919 }920 piSrc += iSrcStride;921 piDst += iDstStride;922 }923 return;924 }925 926 __inline Void TRenInterpFilter::xCTI_FilterQuarter0Ver (Pel* piSrc, Int iSrcStride, Int iSrcStep, Int iWidth, Int iHeight, Int iDstStride, Int iDstStep, Int*& rpiDst)927 {928 Int* piDst = rpiDst;929 Int iSum;930 Pel* piSrcTmp;931 Int iSrcStride2 = iSrcStride*2;932 Int iSrcStride3 = iSrcStride*3;933 Int iSrcStride4 = iSrcStride*4;934 Int iSrcStride5 = iSrcStride*5;935 Int iSrcStride6 = iSrcStride*6;936 Int iSrcStride7 = iSrcStride*7;937 938 Int iTmp1, iTmp2;939 for ( Int y = iHeight; y != 0; y-- )940 {941 piSrcTmp = &piSrc[ -3*iSrcStride ];942 for ( Int x = 0; x < iWidth; x++ )943 {944 // {-1, 4, -10, 57, 19, -7, 3, -1 },945 946 iTmp1 = piSrcTmp[iSrcStride3] + piSrcTmp[iSrcStride5];947 iTmp2 = piSrcTmp[iSrcStride6] + piSrcTmp[iSrcStride4];948 949 iSum = iTmp1 + iTmp2 - piSrcTmp[0] - piSrcTmp[iSrcStride7]950 - ( ( piSrcTmp[iSrcStride2] - iTmp2 ) << 1 )951 + ( piSrcTmp[iSrcStride] << 2 )952 - ( ( piSrcTmp[iSrcStride2] + iTmp1 ) << 3 )953 + ( piSrcTmp[iSrcStride4] << 4 )954 + ( piSrcTmp[iSrcStride3] << 6 );955 956 piDst[x * iDstStep] = iSum;957 piSrcTmp += iSrcStep;958 }959 piSrc += iSrcStride;960 piDst += iDstStride;961 }962 return;963 }964 965 __inline Void TRenInterpFilter::xCTI_FilterQuarter0Ver (Pel* piSrc, Int iSrcStride, Int iSrcStep, Int iWidth, Int iHeight, Int iDstStride, Int iDstStep, Pel*& rpiDst)966 {967 Pel* piDst = rpiDst;968 Int iSum;969 Pel* piSrcTmp;970 971 Int iSrcStride2 = iSrcStride*2;972 Int iSrcStride3 = iSrcStride*3;973 Int iSrcStride4 = iSrcStride*4;974 Int iSrcStride5 = iSrcStride*5;975 Int iSrcStride6 = iSrcStride*6;976 Int iSrcStride7 = iSrcStride*7;977 540 978 541 Int iTmp1, iTmp2; … … 993 556 + ( piSrcTmp[iSrcStride4] << 4 ); 994 557 995 piDst[x * iDstStep] = Clip ( ((iSum + 32) >> 6) + piSrcTmp[iSrcStride3] );558 piDst[x * iDstStep] = ClipY( ((iSum + 32) >> 6) + piSrcTmp[iSrcStride3] ); 996 559 piSrcTmp += iSrcStep; 997 560 } … … 1043 606 __inline Void TRenInterpFilter::xCTI_FilterQuarter1Ver (Pel* piSrc, Int iSrcStride, Int iSrcStep, Int iWidth, Int iHeight, Int iDstStride, Int iDstStep, Pel*& rpiDst) 1044 607 { 608 assert( g_bitDepthC == g_bitDepthY); // ToDo: Update renderer to work with different luma/chroma bit depth 609 1045 610 Pel* piDst = rpiDst; 1046 611 Int iSum; … … 1070 635 + ( piSrcTmp[iSrcStride3] << 4 ); 1071 636 1072 piDst[x * iDstStep] = Clip ( ((iSum + 32) >> 6) + piSrcTmp[iSrcStride4] );637 piDst[x * iDstStep] = ClipY( ((iSum + 32) >> 6) + piSrcTmp[iSrcStride4] ); 1073 638 piSrcTmp += iSrcStep; 1074 639 } … … 1211 776 __inline Void TRenInterpFilter::xCTI_Filter2DHorC(Int* piSrc, Int iSrcStride, Int iWidth, Int iHeight, Int iDstStride, Pel*& rpiDst, Int iMV) 1212 777 { 778 assert( g_bitDepthC == g_bitDepthY); // ToDo: Update renderer to work with different luma/chroma bit depth 1213 779 Pel* piDst = rpiDst; 1214 780 Int iSum; … … 1225 791 { 1226 792 iSum = xCTI_Filter_VI04_C_OCT0( piSrcTmp, 1 ); 1227 piDst [x ] = Clip ((iSum + 2048) >> 12 );793 piDst [x ] = ClipC ((iSum + 2048) >> 12 ); 1228 794 piSrcTmp++; 1229 795 } … … 1241 807 { 1242 808 iSum = xCTI_Filter_VI04_C_QUA0( piSrcTmp, 1 ); 1243 piDst [x ] = Clip ((iSum + 2048) >> 12 );809 piDst [x ] = ClipC ((iSum + 2048) >> 12 ); 1244 810 piSrcTmp++; 1245 811 } … … 1257 823 { 1258 824 iSum = xCTI_Filter_VI04_C_QUA1( piSrcTmp, 1 ); 1259 piDst [x ] = Clip ((iSum + 2048) >> 12 );825 piDst [x ] = ClipC ((iSum + 2048) >> 12 ); 1260 826 piSrcTmp++; 1261 827 } … … 1273 839 { 1274 840 iSum = xCTI_Filter_VI04_C_OCT1( piSrcTmp, 1 ); 1275 piDst [x ] = Clip ((iSum + 2048) >> 12 );841 piDst [x ] = ClipC ((iSum + 2048) >> 12 ); 1276 842 piSrcTmp++; 1277 843 } … … 1289 855 { 1290 856 iSum = xCTI_Filter_VI04_C_OCT2( piSrcTmp, 1 ); 1291 piDst [x ] = Clip ((iSum + 2048) >> 12 );857 piDst [x ] = ClipC ((iSum + 2048) >> 12 ); 1292 858 piSrcTmp++; 1293 859 } … … 1305 871 { 1306 872 iSum = xCTI_Filter_VI04_C_OCT3( piSrcTmp, 1 ); 1307 piDst [x ] = Clip ((iSum + 2048) >> 12 );873 piDst [x ] = ClipC ((iSum + 2048) >> 12 ); 1308 874 piSrcTmp++; 1309 875 } … … 1321 887 { 1322 888 iSum = xCTI_Filter_VIS04_C_HAL( piSrcTmp, 1 ); 1323 piDst [x ] = Clip ((iSum + 2048) >> 12 );889 piDst [x ] = ClipC ((iSum + 2048) >> 12 ); 1324 890 piSrcTmp++; 1325 891 } … … 1338 904 __inline Void TRenInterpFilter::xCTI_Filter1DVerC (Pel* piSrc, Int iSrcStride, Int iWidth, Int iHeight, Int iDstStride, Pel*& rpiDst, Int iMV) 1339 905 { 906 assert( g_bitDepthC == g_bitDepthY); // ToDo: Update renderer to work with different luma/chroma bit depth 907 1340 908 Pel* piDst = rpiDst; 1341 909 Int iSum; … … 1352 920 { 1353 921 iSum = xCTI_Filter_VP04_C_OCT0( piSrcTmp, iSrcStride ); 1354 piDst[x ] = Clip ((iSum + 32) >> 6 );922 piDst[x ] = ClipC ((iSum + 32) >> 6 ); 1355 923 piSrcTmp++; 1356 924 } … … 1368 936 { 1369 937 iSum = xCTI_Filter_VP04_C_QUA0( piSrcTmp, iSrcStride ); 1370 piDst[x ] = Clip ((iSum + 32) >> 6 );938 piDst[x ] = ClipC ((iSum + 32) >> 6 ); 1371 939 piSrcTmp++; 1372 940 } … … 1384 952 { 1385 953 iSum = xCTI_Filter_VP04_C_QUA1( piSrcTmp, iSrcStride ); 1386 piDst[x ] = Clip ((iSum + 32) >> 6 );954 piDst[x ] = ClipC ((iSum + 32) >> 6 ); 1387 955 piSrcTmp++; 1388 956 } … … 1400 968 { 1401 969 iSum = xCTI_Filter_VP04_C_OCT1( piSrcTmp, iSrcStride ); 1402 piDst[x ] = Clip ((iSum + 32) >> 6 );970 piDst[x ] = ClipC ((iSum + 32) >> 6 ); 1403 971 piSrcTmp++; 1404 972 } … … 1416 984 { 1417 985 iSum = xCTI_Filter_VP04_C_OCT2( piSrcTmp, iSrcStride ); 1418 piDst[x ] = Clip ((iSum + 32) >> 6 );986 piDst[x ] = ClipC ((iSum + 32) >> 6 ); 1419 987 piSrcTmp++; 1420 988 } … … 1432 1000 { 1433 1001 iSum = xCTI_Filter_VP04_C_OCT3( piSrcTmp, iSrcStride ); 1434 piDst[x ] = Clip ((iSum + 32) >> 6 );1002 piDst[x ] = ClipC ((iSum + 32) >> 6 ); 1435 1003 piSrcTmp++; 1436 1004 } … … 1448 1016 { 1449 1017 iSum = xCTI_Filter_VPS04_C_HAL( piSrcTmp, iSrcStride ); 1450 piDst[x ] = Clip ((iSum + 32) >> 6 );1018 piDst[x ] = ClipC ((iSum + 32) >> 6 ); 1451 1019 piSrcTmp++; 1452 1020 } … … 1478 1046 { 1479 1047 iSum = xCTI_Filter_VP04_C_OCT0( piSrcTmp, 1 ); 1480 piDst[x ] = Clip ((iSum + 32) >> 6 );1048 piDst[x ] = ClipC ((iSum + 32) >> 6 ); 1481 1049 piSrcTmp++; 1482 1050 } … … 1494 1062 { 1495 1063 iSum = xCTI_Filter_VP04_C_QUA0( piSrcTmp, 1 ); 1496 piDst[x ] = Clip ((iSum + 32) >> 6 );1064 piDst[x ] = ClipC ((iSum + 32) >> 6 ); 1497 1065 piSrcTmp++; 1498 1066 } … … 1510 1078 { 1511 1079 iSum = xCTI_Filter_VP04_C_QUA1( piSrcTmp, 1 ); 1512 piDst[x ] = Clip ((iSum + 32) >> 6 );1080 piDst[x ] = ClipC ((iSum + 32) >> 6 ); 1513 1081 piSrcTmp++; 1514 1082 } … … 1526 1094 { 1527 1095 iSum = xCTI_Filter_VP04_C_OCT1( piSrcTmp, 1 ); 1528 piDst[x ] = Clip ((iSum + 32) >> 6 );1096 piDst[x ] = ClipC ((iSum + 32) >> 6 ); 1529 1097 piSrcTmp++; 1530 1098 } … … 1542 1110 { 1543 1111 iSum = xCTI_Filter_VP04_C_OCT2( piSrcTmp, 1 ); 1544 piDst[x ] = Clip ((iSum + 32) >> 6 );1112 piDst[x ] = ClipC ((iSum + 32) >> 6 ); 1545 1113 piSrcTmp++; 1546 1114 } … … 1558 1126 { 1559 1127 iSum = xCTI_Filter_VP04_C_OCT3( piSrcTmp, 1 ); 1560 piDst[x ] = Clip ((iSum + 32) >> 6 );1128 piDst[x ] = ClipC ((iSum + 32) >> 6 ); 1561 1129 piSrcTmp++; 1562 1130 } … … 1574 1142 { 1575 1143 iSum = xCTI_Filter_VPS04_C_HAL( piSrcTmp, 1 ); 1576 piDst[x ] = Clip ((iSum + 32) >> 6 );1144 piDst[x ] = ClipC ((iSum + 32) >> 6 ); 1577 1145 piSrcTmp++; 1578 1146 } … … 1587 1155 return; 1588 1156 } 1589 1590 #if HIGH_ACCURACY_BI1591 __inline Void TRenInterpFilter::xCTI_Filter2DHorC_ha(Int* piSrc, Int iSrcStride, Int iWidth, Int iHeight, Int iDstStride, Pel*& rpiDst, Int iMV)1592 {1593 Pel* piDst = rpiDst;1594 Int iSum;1595 Int* piSrcTmp;1596 Int shiftNum = 6 + g_uiBitIncrement + g_uiBitDepth - 8;1597 Int shiftOffset = (shiftNum > 0) ? ( 1 << (shiftNum - 1)) : 0 ;1598 1599 switch (iMV)1600 {1601 case 1:1602 {1603 for ( Int y = iHeight; y != 0; y-- )1604 {1605 piSrcTmp = &piSrc[ -1 ];1606 for ( Int x = 0; x < iWidth; x++ )1607 {1608 iSum = xCTI_Filter_VI04_C_OCT0( piSrcTmp, 1 );1609 #if REMOVE_INTERMEDIATE_CLIPPING1610 piDst[x ] = (iSum + shiftOffset) >> shiftNum;1611 #else1612 piDst[x ] = Clip3(0,16383, (iSum + shiftOffset) >> shiftNum );1613 #endif1614 piSrcTmp++;1615 }1616 piSrc += iSrcStride;1617 piDst += iDstStride;1618 }1619 }1620 break;1621 case 2:1622 {1623 for ( Int y = iHeight; y != 0; y-- )1624 {1625 piSrcTmp = &piSrc[ -1 ];1626 for ( Int x = 0; x < iWidth; x++ )1627 {1628 iSum = xCTI_Filter_VI04_C_QUA0( piSrcTmp, 1 );1629 #if REMOVE_INTERMEDIATE_CLIPPING1630 piDst[x ] = (iSum + shiftOffset) >> shiftNum;1631 #else1632 piDst[x ] = Clip3(0,16383, (iSum + shiftOffset) >> shiftNum );1633 #endif1634 piSrcTmp++;1635 }1636 piSrc += iSrcStride;1637 piDst += iDstStride;1638 }1639 }1640 break;1641 case 6:1642 {1643 for ( Int y = iHeight; y != 0; y-- )1644 {1645 piSrcTmp = &piSrc[ -1 ];1646 for ( Int x = 0; x < iWidth; x++ )1647 {1648 iSum = xCTI_Filter_VI04_C_QUA1( piSrcTmp, 1 );1649 #if REMOVE_INTERMEDIATE_CLIPPING1650 piDst[x ] = (iSum + shiftOffset) >> shiftNum;1651 #else1652 piDst[x ] = Clip3(0,16383, (iSum + shiftOffset) >> shiftNum );1653 #endif1654 piSrcTmp++;1655 }1656 piSrc += iSrcStride;1657 piDst += iDstStride;1658 }1659 }1660 break;1661 case 3:1662 {1663 for ( Int y = iHeight; y != 0; y-- )1664 {1665 piSrcTmp = &piSrc[ -1 ];1666 for ( Int x = 0; x < iWidth; x++ )1667 {1668 iSum = xCTI_Filter_VI04_C_OCT1( piSrcTmp, 1 );1669 #if REMOVE_INTERMEDIATE_CLIPPING1670 piDst[x ] = (iSum + shiftOffset) >> shiftNum;1671 #else1672 piDst[x ] = Clip3(0,16383, (iSum + shiftOffset) >> shiftNum );1673 #endif1674 piSrcTmp++;1675 }1676 piSrc += iSrcStride;1677 piDst += iDstStride;1678 }1679 }1680 break;1681 case 5:1682 {1683 for ( Int y = iHeight; y != 0; y-- )1684 {1685 piSrcTmp = &piSrc[ -1 ];1686 for ( Int x = 0; x < iWidth; x++ )1687 {1688 iSum = xCTI_Filter_VI04_C_OCT2( piSrcTmp, 1 );1689 #if REMOVE_INTERMEDIATE_CLIPPING1690 piDst[x ] = (iSum + shiftOffset) >> shiftNum;1691 #else1692 piDst[x ] = Clip3(0,16383, (iSum + shiftOffset) >> shiftNum );1693 #endif1694 piSrcTmp++;1695 }1696 piSrc += iSrcStride;1697 piDst += iDstStride;1698 }1699 }1700 break;1701 case 7:1702 {1703 for ( Int y = iHeight; y != 0; y-- )1704 {1705 piSrcTmp = &piSrc[ -1 ];1706 for ( Int x = 0; x < iWidth; x++ )1707 {1708 iSum = xCTI_Filter_VI04_C_OCT3( piSrcTmp, 1 );1709 #if REMOVE_INTERMEDIATE_CLIPPING1710 piDst[x ] = (iSum + shiftOffset) >> shiftNum;1711 #else1712 piDst[x ] = Clip3(0,16383, (iSum + shiftOffset) >> shiftNum );1713 #endif1714 piSrcTmp++;1715 }1716 piSrc += iSrcStride;1717 piDst += iDstStride;1718 }1719 }1720 break;1721 case 4:1722 {1723 for ( Int y = iHeight; y != 0; y-- )1724 {1725 piSrcTmp = &piSrc[ -1 ];1726 for ( Int x = 0; x < iWidth; x++ )1727 {1728 iSum = xCTI_Filter_VIS04_C_HAL( piSrcTmp, 1 );1729 #if REMOVE_INTERMEDIATE_CLIPPING1730 piDst[x ] = (iSum + shiftOffset) >> shiftNum;1731 #else1732 piDst[x ] = Clip3(0,16383, (iSum + shiftOffset) >> shiftNum );1733 #endif1734 piSrcTmp++;1735 }1736 piSrc += iSrcStride;1737 piDst += iDstStride;1738 }1739 }1740 break;1741 default:1742 assert( 0 );1743 }1744 1745 return;1746 }1747 1748 __inline Void TRenInterpFilter::xCTI_Filter1DVerC_ha (Pel* piSrc, Int iSrcStride, Int iWidth, Int iHeight, Int iDstStride, Pel*& rpiDst, Int iMV)1749 {1750 Pel* piDst = rpiDst;1751 Int iSum;1752 Pel* piSrcTmp;1753 Int shiftNum = g_uiBitIncrement + g_uiBitDepth - 8;1754 Int shiftOffset = (shiftNum > 0) ? ( 1 << (shiftNum - 1)) : 0 ;1755 1756 switch (iMV)1757 {1758 case 1:1759 {1760 for ( Int y = iHeight; y != 0; y-- )1761 {1762 piSrcTmp = &piSrc[ -iSrcStride ];1763 for ( Int x = 0; x < iWidth; x++ )1764 {1765 iSum = xCTI_Filter_VP04_C_OCT0( piSrcTmp, iSrcStride );1766 #if REMOVE_INTERMEDIATE_CLIPPING1767 piDst[x ] = (iSum + shiftOffset) >> shiftNum;1768 #else1769 piDst[x ] = Clip3(0,16383, (iSum + shiftOffset) >> shiftNum );1770 #endif1771 piSrcTmp++;1772 }1773 piSrc += iSrcStride;1774 piDst += iDstStride;1775 }1776 }1777 break;1778 case 2:1779 {1780 for ( Int y = iHeight; y != 0; y-- )1781 {1782 piSrcTmp = &piSrc[ -iSrcStride ];1783 for ( Int x = 0; x < iWidth; x++ )1784 {1785 iSum = xCTI_Filter_VP04_C_QUA0( piSrcTmp, iSrcStride );1786 #if REMOVE_INTERMEDIATE_CLIPPING1787 piDst[x ] = (iSum + shiftOffset) >> shiftNum;1788 #else1789 piDst[x ] = Clip3(0,16383, (iSum + shiftOffset) >> shiftNum );1790 #endif1791 piSrcTmp++;1792 }1793 piSrc += iSrcStride;1794 piDst += iDstStride;1795 }1796 }1797 break;1798 case 6:1799 {1800 for ( Int y = iHeight; y != 0; y-- )1801 {1802 piSrcTmp = &piSrc[ -iSrcStride ];1803 for ( Int x = 0; x < iWidth; x++ )1804 {1805 iSum = xCTI_Filter_VP04_C_QUA1( piSrcTmp, iSrcStride );1806 #if REMOVE_INTERMEDIATE_CLIPPING1807 piDst[x ] = (iSum + shiftOffset) >> shiftNum;1808 #else1809 piDst[x ] = Clip3(0,16383, (iSum + shiftOffset) >> shiftNum );1810 #endif1811 piSrcTmp++;1812 }1813 piSrc += iSrcStride;1814 piDst += iDstStride;1815 }1816 }1817 break;1818 case 3:1819 {1820 for ( Int y = iHeight; y != 0; y-- )1821 {1822 piSrcTmp = &piSrc[ -iSrcStride ];1823 for ( Int x = 0; x < iWidth; x++ )1824 {1825 iSum = xCTI_Filter_VP04_C_OCT1( piSrcTmp, iSrcStride );1826 #if REMOVE_INTERMEDIATE_CLIPPING1827 piDst[x ] = (iSum + shiftOffset) >> shiftNum;1828 #else1829 piDst[x ] = Clip3(0,16383, (iSum + shiftOffset) >> shiftNum );1830 #endif1831 piSrcTmp++;1832 }1833 piSrc += iSrcStride;1834 piDst += iDstStride;1835 }1836 }1837 break;1838 case 5:1839 {1840 for ( Int y = iHeight; y != 0; y-- )1841 {1842 piSrcTmp = &piSrc[ -iSrcStride ];1843 for ( Int x = 0; x < iWidth; x++ )1844 {1845 iSum = xCTI_Filter_VP04_C_OCT2( piSrcTmp, iSrcStride );1846 #if REMOVE_INTERMEDIATE_CLIPPING1847 piDst[x ] = (iSum + shiftOffset) >> shiftNum;1848 #else1849 piDst[x ] = Clip3(0,16383, (iSum + shiftOffset) >> shiftNum );1850 #endif1851 piSrcTmp++;1852 }1853 piSrc += iSrcStride;1854 piDst += iDstStride;1855 }1856 }1857 break;1858 case 7:1859 {1860 for ( Int y = iHeight; y != 0; y-- )1861 {1862 piSrcTmp = &piSrc[ -iSrcStride ];1863 for ( Int x = 0; x < iWidth; x++ )1864 {1865 iSum = xCTI_Filter_VP04_C_OCT3( piSrcTmp, iSrcStride );1866 #if REMOVE_INTERMEDIATE_CLIPPING1867 piDst[x ] = (iSum + shiftOffset) >> shiftNum;1868 #else1869 piDst[x ] = Clip3(0,16383, (iSum + shiftOffset) >> shiftNum );1870 #endif1871 piSrcTmp++;1872 }1873 piSrc += iSrcStride;1874 piDst += iDstStride;1875 }1876 }1877 break;1878 case 4:1879 {1880 for ( Int y = iHeight; y != 0; y-- )1881 {1882 piSrcTmp = &piSrc[-iSrcStride ];1883 for ( Int x = 0; x < iWidth; x++ )1884 {1885 iSum = xCTI_Filter_VPS04_C_HAL( piSrcTmp, iSrcStride );1886 #if REMOVE_INTERMEDIATE_CLIPPING1887 piDst[x ] = (iSum + shiftOffset) >> shiftNum;1888 #else1889 piDst[x ] = Clip3(0,16383, (iSum + shiftOffset) >> shiftNum );1890 #endif1891 piSrcTmp++;1892 }1893 piSrc += iSrcStride;1894 piDst += iDstStride;1895 }1896 }1897 break;1898 default:1899 assert( 0 );1900 }1901 return;1902 }1903 1904 __inline Void TRenInterpFilter::xCTI_Filter1DHorC_ha(Pel* piSrc, Int iSrcStride, Int iWidth, Int iHeight, Int iDstStride, Pel*& rpiDst, Int iMV)1905 {1906 Pel* piDst = rpiDst;1907 Int iSum;1908 Pel* piSrcTmp;1909 Int shiftNum = g_uiBitIncrement + g_uiBitDepth - 8;1910 Int shiftOffset = (shiftNum > 0) ? ( 1 << (shiftNum - 1)) : 0 ;1911 1912 switch (iMV)1913 {1914 case 1:1915 {1916 for ( Int y = iHeight; y != 0; y-- )1917 {1918 piSrcTmp = &piSrc[ -1 ];1919 for ( Int x = 0; x < iWidth; x++ )1920 {1921 iSum = xCTI_Filter_VP04_C_OCT0( piSrcTmp, 1 );1922 #if REMOVE_INTERMEDIATE_CLIPPING1923 piDst[x ] = (iSum + shiftOffset) >> shiftNum;1924 #else1925 piDst[x ] = Clip3(0,16383, (iSum + shiftOffset) >> shiftNum );1926 #endif1927 piSrcTmp++;1928 }1929 piSrc += iSrcStride;1930 piDst += iDstStride;1931 }1932 }1933 break;1934 case 2:1935 {1936 for ( Int y = iHeight; y != 0; y-- )1937 {1938 piSrcTmp = &piSrc[ -1 ];1939 for ( Int x = 0; x < iWidth; x++ )1940 {1941 iSum = xCTI_Filter_VP04_C_QUA0( piSrcTmp, 1 );1942 #if REMOVE_INTERMEDIATE_CLIPPING1943 piDst[x ] = (iSum + shiftOffset) >> shiftNum;1944 #else1945 piDst[x ] = Clip3(0,16383, (iSum + shiftOffset) >> shiftNum );1946 #endif1947 piSrcTmp++;1948 }1949 piSrc += iSrcStride;1950 piDst += iDstStride;1951 }1952 }1953 break;1954 case 6:1955 {1956 for ( Int y = iHeight; y != 0; y-- )1957 {1958 piSrcTmp = &piSrc[ -1 ];1959 for ( Int x = 0; x < iWidth; x++ )1960 {1961 iSum = xCTI_Filter_VP04_C_QUA1( piSrcTmp, 1 );1962 #if REMOVE_INTERMEDIATE_CLIPPING1963 piDst[x ] = (iSum + shiftOffset) >> shiftNum;1964 #else1965 piDst[x ] = Clip3(0,16383, (iSum + shiftOffset) >> shiftNum );1966 #endif1967 piSrcTmp++;1968 }1969 piSrc += iSrcStride;1970 piDst += iDstStride;1971 }1972 }1973 break;1974 case 3:1975 {1976 for ( Int y = iHeight; y != 0; y-- )1977 {1978 piSrcTmp = &piSrc[ -1 ];1979 for ( Int x = 0; x < iWidth; x++ )1980 {1981 iSum = xCTI_Filter_VP04_C_OCT1( piSrcTmp, 1 );1982 #if REMOVE_INTERMEDIATE_CLIPPING1983 piDst[x ] = (iSum + shiftOffset) >> shiftNum;1984 #else1985 piDst[x ] = Clip3(0,16383, (iSum + shiftOffset) >> shiftNum );1986 #endif1987 piSrcTmp++;1988 }1989 piSrc += iSrcStride;1990 piDst += iDstStride;1991 }1992 }1993 break;1994 case 5:1995 {1996 for ( Int y = iHeight; y != 0; y-- )1997 {1998 piSrcTmp = &piSrc[ -1 ];1999 for ( Int x = 0; x < iWidth; x++ )2000 {2001 iSum = xCTI_Filter_VP04_C_OCT2( piSrcTmp, 1 );2002 #if REMOVE_INTERMEDIATE_CLIPPING2003 piDst[x ] = (iSum + shiftOffset) >> shiftNum;2004 #else2005 piDst[x ] = Clip3(0,16383, (iSum + shiftOffset) >> shiftNum );2006 #endif2007 piSrcTmp++;2008 }2009 piSrc += iSrcStride;2010 piDst += iDstStride;2011 }2012 }2013 break;2014 case 7:2015 {2016 for ( Int y = iHeight; y != 0; y-- )2017 {2018 piSrcTmp = &piSrc[ -1 ];2019 for ( Int x = 0; x < iWidth; x++ )2020 {2021 iSum = xCTI_Filter_VP04_C_OCT3( piSrcTmp, 1 );2022 #if REMOVE_INTERMEDIATE_CLIPPING2023 piDst[x ] = (iSum + shiftOffset) >> shiftNum;2024 #else2025 piDst[x ] = Clip3(0,16383, (iSum + shiftOffset) >> shiftNum );2026 #endif2027 piSrcTmp++;2028 }2029 piSrc += iSrcStride;2030 piDst += iDstStride;2031 }2032 }2033 break;2034 case 4:2035 {2036 for ( Int y = iHeight; y != 0; y-- )2037 {2038 piSrcTmp = &piSrc[ -1 ];2039 for ( Int x = 0; x < iWidth; x++ )2040 {2041 iSum = xCTI_Filter_VPS04_C_HAL( piSrcTmp, 1 );2042 #if REMOVE_INTERMEDIATE_CLIPPING2043 piDst[x ] = (iSum + shiftOffset) >> shiftNum;2044 #else2045 piDst[x ] = Clip3(0,16383, (iSum + shiftOffset) >> shiftNum );2046 #endif2047 piSrcTmp++;2048 }2049 piSrc += iSrcStride;2050 piDst += iDstStride;2051 }2052 }2053 break;2054 default:2055 assert( 0 );2056 2057 }2058 return;2059 }2060 #endif2061 2062 1157 2063 1158 __inline Int TRenInterpFilter::xCTI_Filter_VP04_C_OCT0( Pel* pSrc, Int iStride ) … … 2231 1326 return iSum; 2232 1327 } 2233 1328 #endif // H_3D 2234 1329 #endif // __TRENINTERP__ -
trunk/source/Lib/TLibRenderer/TRenModSetupStrParser.cpp
r210 r608 36 36 #include "TRenFilter.h" 37 37 #include "TRenModSetupStrParser.h" 38 #if !QC_MVHEVC_B0046 38 39 #if H_3D 39 40 Int 40 41 TRenModSetupStrParser::getNumOfModels() … … 450 451 rcNextChar = m_pchSetStr[iPos]; 451 452 } 452 #endif 453 453 #endif // H_3D 454 -
trunk/source/Lib/TLibRenderer/TRenModSetupStrParser.h
r210 r608 31 31 * THE POSSIBILITY OF SUCH DAMAGE. 32 32 */ 33 #if !QC_MVHEVC_B0046 33 34 34 #ifndef __TRENMODSETUPSTRPARSER__ 35 35 #define __TRENMODSETUPSTRPARSER__ … … 39 39 #include "../TLibCommon/TypeDef.h" 40 40 #include "../TAppCommon/TAppComCamPara.h" 41 #if H_3D 42 41 43 42 44 … … 126 128 }; 127 129 130 #endif // H_3D 128 131 #endif //__TRENMODEL__ 129 #endif130 132 133 -
trunk/source/Lib/TLibRenderer/TRenModel.cpp
r210 r608 35 35 #include "TRenFilter.h" 36 36 #include "TRenModel.h" 37 #if !QC_MVHEVC_B0046 37 38 #if H_3D_VSO 38 39 /////////// TRENMODEL ////////////////////// 39 40 TRenModel::TRenModel() … … 48 49 m_iHoleMargin = 1; 49 50 m_uiHorOff = -1; 50 #if LGE_VSO_EARLY_SKIP_A009351 #if H_3D_VSO_EARLY_SKIP 51 52 m_bEarlySkip = false; 52 53 #endif … … 214 215 215 216 Void 216 #if LGE_VSO_EARLY_SKIP_A0093217 #if H_3D_VSO_EARLY_SKIP 217 218 TRenModel::create( Int iNumOfBaseViews, Int iNumOfModels, Int iWidth, Int iHeight, Int iShiftPrec, Int iHoleMargin, Bool bEarlySkip ) 218 219 #else … … 226 227 m_iShiftPrec = iShiftPrec; 227 228 m_iHoleMargin = iHoleMargin; 228 #if LGE_VSO_EARLY_SKIP_A0093229 #if H_3D_VSO_EARLY_SKIP 229 230 m_bEarlySkip = bEarlySkip; 230 231 #endif … … 357 358 AOT( iContent < -1 || iContent > 1 ); 358 359 AOT( iBlendMode < -1 || iBlendMode > 2 ); 359 360 Bool bBitInc = (g_uiBitIncrement != 0); 360 AOT( g_bitDepthY != g_bitDepthC ); 361 362 Bool bBitInc = ( DISTORTION_PRECISION_ADJUSTMENT( g_bitDepthY - 8 ) != 0); 361 363 362 364 AOT( m_apcRenModels[iModelNum] ); … … 414 416 415 417 416 #if LGE_VSO_EARLY_SKIP_A0093418 #if H_3D_VSO_EARLY_SKIP 417 419 m_apcRenModels[iModelNum]->create( iMode ,m_iWidth, m_iHeight, m_iShiftPrec, m_aaaiSubPelShiftLut, m_iHoleMargin, bUseOrgRef, iBlendMode, m_bEarlySkip ); 418 420 #else … … 550 552 } 551 553 552 #if LGE_VSO_EARLY_SKIP_A0093554 #if H_3D_VSO_EARLY_SKIP 553 555 RMDist 554 556 TRenModel::getDist( Int iStartPosX, Int iStartPosY, Int iWidth, Int iHeight, Int iStride, Pel* piNewData, Pel * piOrgData, Int iOrgStride) … … 574 576 if (m_iCurrentContent == 1) 575 577 { 576 #if LGE_VSO_EARLY_SKIP_A0093578 #if H_3D_VSO_EARLY_SKIP 577 579 iDist += m_apcCurRenModels[iModelNum]->getDistDepth ( m_aiCurPosInModels[iModelNum], iStartPosX, iStartPosY, iWidth, iHeight, iStride, piNewData , piOrgData, iOrgStride); 578 580 #else … … 606 608 if (m_iCurrentContent == 1) 607 609 { 608 #if def LGE_VSO_EARLY_SKIP_A0093610 #if H_3D_VSO_EARLY_SKIP 609 611 Int iTargetStride = m_aiCurDepthStrides[ m_iCurrentView ]; 610 612 m_apcCurRenModels[iModelNum]->setDepth ( m_aiCurPosInModels[iModelNum], iStartPosX, iStartPosY, iWidth, iHeight, iStride, piNewData,m_apiCurDepthPel[ m_iCurrentView ] + iStartPosY * iTargetStride + iStartPosX ,iTargetStride ); … … 619 621 } 620 622 621 #if def LGE_VSO_EARLY_SKIP_A0093623 #if H_3D_VSO_EARLY_SKIP 622 624 if (m_iCurrentContent == 1) 623 625 { … … 658 660 m_apcCurRenModels[iCurModel]->getRefVideo ( m_aiCurPosInModels[iCurModel], &cPicYuvTempRef ); 659 661 660 iSSEY += TRenFilter::SSE( cPicYuvSynth.getLumaAddr(), cPicYuvSynth.getStride(), m_iWidth, m_iUsedHeight , cPicYuvTempRef.getLumaAddr(), cPicYuvTempRef.getStride() );661 iSSEU += TRenFilter::SSE( cPicYuvSynth.getCbAddr() , cPicYuvSynth.getCStride(), m_iWidth >> 1, m_iUsedHeight >> 1, cPicYuvTempRef.getCbAddr() , cPicYuvTempRef.getCStride() );662 iSSEV += TRenFilter::SSE( cPicYuvSynth.getCrAddr() , cPicYuvSynth.getCStride(), m_iWidth >> 1, m_iUsedHeight >> 1, cPicYuvTempRef.getCrAddr() , cPicYuvTempRef.getCStride() );662 iSSEY += TRenFilter::SSE( cPicYuvSynth.getLumaAddr(), cPicYuvSynth.getStride(), m_iWidth, m_iUsedHeight , cPicYuvTempRef.getLumaAddr(), cPicYuvTempRef.getStride() , true ); 663 iSSEU += TRenFilter::SSE( cPicYuvSynth.getCbAddr() , cPicYuvSynth.getCStride(), m_iWidth >> 1, m_iUsedHeight >> 1, cPicYuvTempRef.getCbAddr() , cPicYuvTempRef.getCStride(), false ); 664 iSSEV += TRenFilter::SSE( cPicYuvSynth.getCrAddr() , cPicYuvSynth.getCStride(), m_iWidth >> 1, m_iUsedHeight >> 1, cPicYuvTempRef.getCrAddr() , cPicYuvTempRef.getCStride(), false ); 663 665 } 664 666 … … 697 699 } 698 700 } 699 #endif 700 701 #endif // H_3D -
trunk/source/Lib/TLibRenderer/TRenModel.h
r210 r608 32 32 */ 33 33 34 #if !QC_MVHEVC_B0046 34 35 35 #ifndef __TRENMODEL__ 36 36 #define __TRENMODEL__ … … 42 42 #include "../TLibCommon/TypeDef.h" 43 43 44 #if H_3D_VSO 45 44 46 class TRenModel 45 47 { … … 50 52 51 53 // Creation 52 #if LGE_VSO_EARLY_SKIP_A009354 #if H_3D_VSO_EARLY_SKIP 53 55 Void create ( Int iNumOfBaseViews, Int iNumOfModels, Int iWidth, Int iHeight, Int iShiftPrec, Int iHoleMargin, Bool bEarlySkip ); 54 56 #else … … 68 70 69 71 // Get Distortion, set Data 70 #if def LGE_VSO_EARLY_SKIP_A009372 #if H_3D_VSO_EARLY_SKIP 71 73 Int64 getDist ( Int iStartPosX, Int iStartPosY, Int iWidth, Int iHeight, Int iStride, Pel* piNewData, Pel * piOrgData, Int iOrgStride); 72 74 #else … … 91 93 Int** m_aaaiSubPelShiftLut[2]; 92 94 Int m_iHoleMargin; 93 #if LGE_VSO_EARLY_SKIP_A009395 #if H_3D_VSO_EARLY_SKIP 94 96 Bool m_bEarlySkip; 95 97 #endif … … 155 157 }; 156 158 159 #endif // H_3D 157 160 #endif //__TRENMODEL__ 158 #endif159 161 -
trunk/source/Lib/TLibRenderer/TRenSingleModel.cpp
r210 r608 36 36 #include "TRenSingleModel.h" 37 37 38 #if !QC_MVHEVC_B0046 38 #if H_3D_VSO 39 39 40 ////////////// TRENSINGLE MODEL /////////////// 40 41 template <BlenMod iBM, Bool bBitInc> 41 42 TRenSingleModelC<iBM,bBitInc>::TRenSingleModelC() 42 : m_iDistShift ( g_uiBitIncrement<< 1 )43 : m_iDistShift ( ( g_bitDepthY - 8) << 1 ) 43 44 { 44 45 m_iWidth = -1; … … 84 85 } 85 86 86 #if def LGE_VSO_EARLY_SKIP_A009387 #if H_3D_VSO_EARLY_SKIP 87 88 m_pbHorSkip = NULL; 88 89 #endif … … 92 93 TRenSingleModelC<iBM,bBitInc>::~TRenSingleModelC() 93 94 { 94 #if def LGE_VSO_EARLY_SKIP_A009395 #if H_3D_VSO_EARLY_SKIP 95 96 if ( m_pbHorSkip ) 96 97 { … … 114 115 115 116 template <BlenMod iBM, Bool bBitInc> Void 116 #if LGE_VSO_EARLY_SKIP_A0093117 #if H_3D_VSO_EARLY_SKIP 117 118 TRenSingleModelC<iBM,bBitInc>::create( Int iMode, Int iWidth, Int iHeight, Int iShiftPrec, Int*** aaaiSubPelShiftTable, Int iHoleMargin, Bool bUseOrgRef, Int iBlendMode, Bool bEarlySkip ) 118 119 #else … … 121 122 122 123 { 123 #if LGE_VSO_EARLY_SKIP_A0093124 #if H_3D_VSO_EARLY_SKIP 124 125 m_pbHorSkip = new Bool [MAX_CU_SIZE]; 125 126 m_bEarlySkip = bEarlySkip; … … 182 183 Pel* piDRow = piCurDepthPel; 183 184 Pel* piYRow = apiCurVideoPel[0]; 184 #if H HI_VSO_COLOR_PLANES185 #if H_3D_VSO_COLOR_PLANES 185 186 Pel* piURow = apiCurVideoPel[1]; 186 187 Pel* piVRow = apiCurVideoPel[2]; … … 196 197 Int iSubPosX = (1 << m_iShiftPrec); 197 198 pcCurInputSampleRow[0].aiY[iSubPosX] = piYRow[0]; 198 #if H HI_VSO_COLOR_PLANES199 #if H_3D_VSO_COLOR_PLANES 199 200 pcCurInputSampleRow[0].aiU[iSubPosX] = piURow[0]; 200 201 pcCurInputSampleRow[0].aiV[iSubPosX] = piVRow[0]; … … 210 211 Int iShift = (iPosX << m_iShiftPrec) + iSubPosX; 211 212 pcCurInputSampleRow[iPosX+iOffsetX].aiY[iSubPosX] = piYRow[iShift]; 212 #if H HI_VSO_COLOR_PLANES213 #if H_3D_VSO_COLOR_PLANES 213 214 pcCurInputSampleRow[iPosX+iOffsetX].aiU[iSubPosX] = piURow[iShift]; 214 215 pcCurInputSampleRow[iPosX+iOffsetX].aiV[iSubPosX] = piVRow[iShift]; … … 221 222 piDRow += iCurDepthStride; 222 223 piYRow += aiCurVideoStride[0]; 223 #if H HI_VSO_COLOR_PLANES224 #if H_3D_VSO_COLOR_PLANES 224 225 piURow += aiCurVideoStride[1]; 225 226 piVRow += aiCurVideoStride[2]; … … 270 271 { 271 272 case 0: 272 #if LGE_VSO_EARLY_SKIP_A0093273 #if H_3D_VSO_EARLY_SKIP 273 274 xRenderL<true>( 0, 0, m_iWidth, m_iUsedHeight, m_aiBaseDepthStrides[0], m_apiBaseDepthPel[0],false ); 274 275 #else … … 277 278 break; 278 279 case 1: 279 #if def LGE_VSO_EARLY_SKIP_A0093280 #if H_3D_VSO_EARLY_SKIP 280 281 xRenderR<true>( 0, 0, m_iWidth, m_iUsedHeight, m_aiBaseDepthStrides[1], m_apiBaseDepthPel[1],false); 281 282 #else … … 285 286 case 2: 286 287 TRenFilter::setupZLUT( true, 30, iDistToLeft, ppiBaseShiftLutLeft, ppiBaseShiftLutRight, m_iBlendZThres, m_iBlendDistWeight, m_piInvZLUTLeft, m_piInvZLUTRight ); 287 #if def LGE_VSO_EARLY_SKIP_A0093288 #if H_3D_VSO_EARLY_SKIP 288 289 xRenderL<true>( 0, 0, m_iWidth, m_iUsedHeight, m_aiBaseDepthStrides[0], m_apiBaseDepthPel[0],false); 289 290 xRenderR<true>( 0, 0, m_iWidth, m_iUsedHeight, m_aiBaseDepthStrides[1], m_apiBaseDepthPel[1],false); … … 306 307 307 308 template <BlenMod iBM, Bool bBitInc> Void 308 #if H HI_VSO_COLOR_PLANES309 #if H_3D_VSO_COLOR_PLANES 309 310 TRenSingleModelC<iBM,bBitInc>::xGetSampleStrTextPtrs( Int iViewNum, Pel RenModelOutPels::*& rpiSrcY, Pel RenModelOutPels::*& rpiSrcU, Pel RenModelOutPels::*& rpiSrcV ) 310 311 #else … … 316 317 case 0: 317 318 rpiSrcY = &RenModelOutPels::iYLeft; 318 #if H HI_VSO_COLOR_PLANES319 #if H_3D_VSO_COLOR_PLANES 319 320 rpiSrcU = &RenModelOutPels::iULeft; 320 321 rpiSrcV = &RenModelOutPels::iVLeft; … … 323 324 case 1: 324 325 rpiSrcY = &RenModelOutPels::iYRight; 325 #if H HI_VSO_COLOR_PLANES326 #if H_3D_VSO_COLOR_PLANES 326 327 rpiSrcU = &RenModelOutPels::iURight; 327 328 rpiSrcV = &RenModelOutPels::iVRight; … … 330 331 case 2: 331 332 rpiSrcY = &RenModelOutPels::iYBlended; 332 #if H HI_VSO_COLOR_PLANES333 #if H_3D_VSO_COLOR_PLANES 333 334 rpiSrcU = &RenModelOutPels::iUBlended; 334 335 rpiSrcV = &RenModelOutPels::iVBlended; … … 353 354 354 355 Pel* piYRow = m_aapiRefVideoPel[0]; 355 #if H HI_VSO_COLOR_PLANES356 #if H_3D_VSO_COLOR_PLANES 356 357 Pel* piURow = m_aapiRefVideoPel[1]; 357 358 Pel* piVRow = m_aapiRefVideoPel[2]; … … 363 364 { 364 365 pcCurOutSampleRow[iPosX].iYRef = piYRow[iPosX]; 365 #if H HI_VSO_COLOR_PLANES366 #if H_3D_VSO_COLOR_PLANES 366 367 pcCurOutSampleRow[iPosX].iURef = piURow[iPosX]; 367 368 pcCurOutSampleRow[iPosX].iVRef = piVRow[iPosX]; … … 372 373 373 374 piYRow += m_aiRefVideoStrides[0]; 374 #if H HI_VSO_COLOR_PLANES375 #if H_3D_VSO_COLOR_PLANES 375 376 piURow += m_aiRefVideoStrides[1]; 376 377 piVRow += m_aiRefVideoStrides[2]; … … 403 404 Pel RenModelOutPels::* piSrcY = NULL; 404 405 405 #if H HI_VSO_COLOR_PLANES406 #if H_3D_VSO_COLOR_PLANES 406 407 Pel RenModelOutPels::* piSrcU = NULL; 407 408 Pel RenModelOutPels::* piSrcV = NULL; … … 416 417 { 417 418 pcCurOutSampleRow[iPosX].iYRef = pcCurOutSampleRow[iPosX].*piSrcY; 418 #if H HI_VSO_COLOR_PLANES419 #if H_3D_VSO_COLOR_PLANES 419 420 pcCurOutSampleRow[iPosX].iURef = pcCurOutSampleRow[iPosX].*piSrcU; 420 421 pcCurOutSampleRow[iPosX].iVRef = pcCurOutSampleRow[iPosX].*piSrcV; … … 449 450 pcOutSampleRow[iPosX].iYRight = 0; 450 451 pcOutSampleRow[iPosX].iYBlended = 0; 451 #if H HI_VSO_COLOR_PLANES452 #if H_3D_VSO_COLOR_PLANES 452 453 // U Planes 453 pcOutSampleRow[iPosX].iULeft = 1 28 << g_uiBitIncrement;454 pcOutSampleRow[iPosX].iURight = 1 28 << g_uiBitIncrement;455 pcOutSampleRow[iPosX].iUBlended = 1 28 << g_uiBitIncrement;454 pcOutSampleRow[iPosX].iULeft = 1 << (g_bitDepthC - 1); 455 pcOutSampleRow[iPosX].iURight = 1 << (g_bitDepthC - 1); 456 pcOutSampleRow[iPosX].iUBlended = 1 << (g_bitDepthC - 1); 456 457 457 458 // V Planes 458 pcOutSampleRow[iPosX].iVLeft = 1 28 << g_uiBitIncrement;459 pcOutSampleRow[iPosX].iVRight = 1 28 << g_uiBitIncrement;460 pcOutSampleRow[iPosX].iVBlended = 1 28 << g_uiBitIncrement;459 pcOutSampleRow[iPosX].iVLeft = 1 << (g_bitDepthC - 1); 460 pcOutSampleRow[iPosX].iVRight = 1 << (g_bitDepthC - 1); 461 pcOutSampleRow[iPosX].iVBlended = 1 << (g_bitDepthC - 1); 461 462 #endif 462 463 //// Input Samples … … 472 473 473 474 474 #if def LGE_VSO_EARLY_SKIP_A0093475 #if H_3D_VSO_EARLY_SKIP 475 476 template <BlenMod iBM, Bool bBitInc> RMDist 476 477 TRenSingleModelC<iBM,bBitInc>::getDistDepth( Int iViewPos, Int iStartPosX, Int iStartPosY, Int iWidth, Int iHeight, Int iStride, Pel* piNewData , Pel * piOrgData, Int iOrgStride ) … … 481 482 { 482 483 RMDist iSSE = 0; 483 #if def LGE_VSO_EARLY_SKIP_A0093484 #if H_3D_VSO_EARLY_SKIP 484 485 Bool bEarlySkip; 485 486 #endif … … 487 488 { 488 489 case 0: 489 #if def LGE_VSO_EARLY_SKIP_A0093490 #if H_3D_VSO_EARLY_SKIP 490 491 bEarlySkip = m_bEarlySkip ? xDetectEarlySkipL(iStartPosX, iStartPosY, iWidth, iHeight, iStride, piNewData, piOrgData, iOrgStride) : false; 491 492 if( !bEarlySkip ) … … 498 499 break; 499 500 case 1: 500 #if def LGE_VSO_EARLY_SKIP_A0093501 #if H_3D_VSO_EARLY_SKIP 501 502 bEarlySkip = m_bEarlySkip ? xDetectEarlySkipR(iStartPosX, iStartPosY, iWidth, iHeight, iStride, piNewData, piOrgData, iOrgStride) : false; 502 503 if( !bEarlySkip ) … … 514 515 return iSSE; 515 516 } 516 #if def LGE_VSO_EARLY_SKIP_A0093517 #if H_3D_VSO_EARLY_SKIP 517 518 template <BlenMod iBM, Bool bBitInc> Void 518 519 TRenSingleModelC<iBM,bBitInc>::setDepth( Int iViewPos, Int iStartPosX, Int iStartPosY, Int iWidth, Int iHeight, Int iStride, Pel* piNewData, Pel* piOrgData, Int iOrgStride ) … … 522 523 #endif 523 524 { 524 #ifdef LGE_VSO_EARLY_SKIP_A0093525 #ifdef H_3D_VSO_EARLY_SKIP 525 526 Bool bEarlySkip; 526 527 #endif … … 528 529 { 529 530 case 0: 530 #if def LGE_VSO_EARLY_SKIP_A0093531 #if H_3D_VSO_EARLY_SKIP 531 532 bEarlySkip = m_bEarlySkip ? xDetectEarlySkipL(iStartPosX, iStartPosY, iWidth, iHeight, iStride, piNewData, piOrgData,iOrgStride) : false; 532 533 if( !bEarlySkip ) … … 539 540 break; 540 541 case 1: 541 #if def LGE_VSO_EARLY_SKIP_A0093542 #if H_3D_VSO_EARLY_SKIP 542 543 bEarlySkip = m_bEarlySkip ? xDetectEarlySkipR(iStartPosX, iStartPosY, iWidth, iHeight, iStride, piNewData, piOrgData,iOrgStride) : false; 543 544 if( !bEarlySkip ) … … 560 561 AOT( pcPicYuv->getHeight() < m_iUsedHeight + m_iHorOffset ); 561 562 562 #if H HI_VSO_COLOR_PLANES563 #if H_3D_VSO_COLOR_PLANES 563 564 Pel RenModelOutPels::* piText[3] = { NULL, NULL, NULL }; 564 565 xGetSampleStrTextPtrs(iViewPos, piText[0], piText[1], piText[2]); … … 581 582 xGetSampleStrTextPtrs(iViewPos, piY); 582 583 xCopyFromSampleStruct( m_pcOutputSamples, m_iOutputSamplesStride, piY, pcPicYuv->getLumaAddr() + m_iHorOffset * pcPicYuv->getStride(), pcPicYuv->getStride(), m_iWidth, m_iUsedHeight ); 583 pcPicYuv->setChromaTo( 1 28 << g_uiBitIncrement);584 pcPicYuv->setChromaTo( 1 << (g_bitDepthC - 1) ); 584 585 #endif 585 586 } … … 595 596 xGetSampleStrDepthPtrs(iViewPos, piD); 596 597 xCopyFromSampleStruct( m_pcOutputSamples, m_iOutputSamplesStride, piD, pcPicYuv->getLumaAddr() + pcPicYuv->getStride() * m_iHorOffset, pcPicYuv->getStride(), m_iWidth, m_iUsedHeight ); 597 pcPicYuv->setChromaTo( 1 28 << g_uiBitIncrement);598 pcPicYuv->setChromaTo( 1 << (g_bitDepthC - 1) ); 598 599 } 599 600 … … 605 606 AOT( pcPicYuv->getHeight() < m_iUsedHeight + m_iHorOffset); 606 607 607 #if H HI_VSO_COLOR_PLANES608 #if H_3D_VSO_COLOR_PLANES 608 609 Pel RenModelOutPels::* piText[3]; 609 610 piText[0] = &RenModelOutPels::iYRef; … … 627 628 #else 628 629 xCopyFromSampleStruct( m_pcOutputSamples, m_iOutputSamplesStride, &RenModelOutPels::iYRef, pcPicYuv->getLumaAddr() * pcPicYuv->getStride() + m_iHorOffset, pcPicYuv->getStride(), m_iWidth, m_iUsedHeight ); 629 pcPicYuv->setChromaTo( 1 28 << g_uiBitIncrement);630 pcPicYuv->setChromaTo( 1 << ( g_bitDepthC - 1 ) ); 630 631 #endif 631 632 } … … 662 663 m_pcOutputSamplesRow += m_iOutputSamplesStride; 663 664 } 664 #if LGE_VSO_EARLY_SKIP_A0093665 #if H_3D_VSO_EARLY_SKIP 665 666 template <BlenMod iBM, Bool bBitInc> template<Bool bSet> __inline RMDist 666 667 TRenSingleModelC<iBM,bBitInc>::xRenderL( Int iStartPosX, Int iStartPosY, Int iWidth, Int iHeight, Int iStride, Pel* piNewData, Bool bFast) … … 695 696 for (Int iPosY = iStartPosY; iPosY < iStartPosY + iHeight; iPosY++ ) 696 697 { 697 #if def LGE_VSO_EARLY_SKIP_A0093698 #if H_3D_VSO_EARLY_SKIP 698 699 if( m_bEarlySkip && bFast ) 699 700 { … … 721 722 xExtrapolateMarginL<bSet> ( iCurSPos, iEndChangePos, iError ); 722 723 723 iMinChangedSPos = Min( iMinChangedSPos, (iEndChangePos << m_iShiftPrec) - m_ppiCurLUT[0][ RenModRemoveBitInc( Max(m_pcInputSamplesRow[iCurViewPos][iEndChangePos].iD, m_piNewDepthData[iPosXinNewData] )) ]);724 iMinChangedSPos = std::min( iMinChangedSPos, (iEndChangePos << m_iShiftPrec) - m_ppiCurLUT[0][ RenModRemoveBitInc( std::max(m_pcInputSamplesRow[iCurViewPos][iEndChangePos].iD, m_piNewDepthData[iPosXinNewData] )) ]); 724 725 iLastSPos = iCurSPos; 725 726 m_iLastDepth = m_iCurDepth; … … 746 747 // Get minimal changed sample position 747 748 748 iMinChangedSPos = Min( iMinChangedSPos, (iCurPosX << m_iShiftPrec) - m_ppiCurLUT[0][ RenModRemoveBitInc( Max(m_pcInputSamplesRow[iCurViewPos][iCurPosX].iD, m_piNewDepthData[iPosXinNewData] )) ]);749 iMinChangedSPos = std::min( iMinChangedSPos, (iCurPosX << m_iShiftPrec) - m_ppiCurLUT[0][ RenModRemoveBitInc( std::max(m_pcInputSamplesRow[iCurViewPos][iCurPosX].iD, m_piNewDepthData[iPosXinNewData] )) ]); 749 750 Int iCurSPos = xShiftNewData(iCurPosX,iPosXinNewData); 750 751 m_iCurDepth = m_piNewDepthData[iPosXinNewData]; … … 786 787 } 787 788 788 #ifdef LGE_VSO_EARLY_SKIP_A0093789 #ifdef H_3D_VSO_EARLY_SKIP 789 790 template <BlenMod iBM, Bool bBitInc> template<Bool bSet> __inline RMDist 790 791 TRenSingleModelC<iBM,bBitInc>::xRenderR( Int iStartPosX, Int iStartPosY, Int iWidth, Int iHeight, Int iStride, Pel* piNewData , Bool bFast) … … 820 821 for (Int iPosY = iStartPosY; iPosY < iStartPosY + iHeight; iPosY++ ) 821 822 { 822 #if def LGE_VSO_EARLY_SKIP_A0093823 #if H_3D_VSO_EARLY_SKIP 823 824 if( m_bEarlySkip && bFast ) 824 825 { … … 846 847 xExtrapolateMarginR<bSet> ( iCurSPos, iStartChangePos, iError ); 847 848 848 iMaxChangedSPos = Max( iMaxChangedSPos, (iStartChangePos << m_iShiftPrec) - m_ppiCurLUT[0][ RenModRemoveBitInc( Max(m_pcInputSamplesRow[iCurViewPos][iStartChangePos].iD, m_piNewDepthData[iPosXinNewData] )) ]);849 iMaxChangedSPos = std::max( iMaxChangedSPos, (iStartChangePos << m_iShiftPrec) - m_ppiCurLUT[0][ RenModRemoveBitInc( std::max(m_pcInputSamplesRow[iCurViewPos][iStartChangePos].iD, m_piNewDepthData[iPosXinNewData] )) ]); 849 850 iLastSPos = iCurSPos; 850 851 m_iLastDepth = m_iCurDepth; … … 872 873 // Get minimal changed sample position 873 874 874 iMaxChangedSPos = Max( iMaxChangedSPos, (iCurPosX << m_iShiftPrec) - m_ppiCurLUT[0][ RenModRemoveBitInc( Max(m_pcInputSamplesRow[iCurViewPos][iCurPosX].iD, m_piNewDepthData[iPosXinNewData] )) ]);875 iMaxChangedSPos = std::max( iMaxChangedSPos, (iCurPosX << m_iShiftPrec) - m_ppiCurLUT[0][ RenModRemoveBitInc( std::max(m_pcInputSamplesRow[iCurViewPos][iCurPosX].iD, m_piNewDepthData[iPosXinNewData] )) ]); 875 876 Int iCurSPos = xShiftNewData(iCurPosX,iPosXinNewData); 876 877 m_iCurDepth = m_piNewDepthData[iPosXinNewData]; … … 1002 1003 1003 1004 m_iThisDepth = m_iCurDepth; 1004 for (Int iFillSPos = Max(0, xRangeLeftL(iCurSPos) ); iFillSPos <= min(xRangeRightL( iLastSPos ) ,m_iLastOccludedSPosFP-1); iFillSPos++ )1005 for (Int iFillSPos = std::max(0, xRangeLeftL(iCurSPos) ); iFillSPos <= min(xRangeRightL( iLastSPos ) ,m_iLastOccludedSPosFP-1); iFillSPos++ ) 1005 1006 { 1006 1007 Int iDeltaCurSPos = (iFillSPos << m_iShiftPrec) - iCurSPos; … … 1189 1190 1190 1191 m_iThisDepth = m_iLastDepth; 1191 for (Int iFillSPos = Max(iStartFillSPosFP+1,0); iFillSPos <= min(xRangeRightL( iLastSPos ), m_iLastOccludedSPosFP-1 ); iFillSPos++ )1192 for (Int iFillSPos = std::max(iStartFillSPosFP+1,0); iFillSPos <= min(xRangeRightL( iLastSPos ), m_iLastOccludedSPosFP-1 ); iFillSPos++ ) 1192 1193 { 1193 1194 xSetShiftedPelL<bSet>( iLastPos, 0, iFillSPos, REN_IS_HOLE, riError ); … … 1233 1234 // return; 1234 1235 1235 Int iSPosFullPel = Max(0,xRangeLeftL(iCurSPos));1236 Int iSPosFullPel = std::max(0,xRangeLeftL(iCurSPos)); 1236 1237 1237 1238 m_iThisDepth = m_iCurDepth; … … 1253 1254 // return; 1254 1255 1255 Int iSPosFullPel = Min(m_iWidth-1,xRangeRightR(iCurSPos));1256 Int iSPosFullPel = std::min(m_iWidth-1,xRangeRightR(iCurSPos)); 1256 1257 1257 1258 m_iThisDepth = m_iCurDepth; … … 1413 1414 // Yuv 1414 1415 pcOutSample->iYLeft = pcInSample->aiY[iSubSourcePos]; 1415 #if H HI_VSO_COLOR_PLANES1416 #if H_3D_VSO_COLOR_PLANES 1416 1417 pcOutSample->iULeft = pcInSample->aiU[iSubSourcePos]; 1417 1418 pcOutSample->iVLeft = pcInSample->aiV[iSubSourcePos]; … … 1428 1429 else 1429 1430 { 1430 #if H HI_VSO_COLOR_PLANES1431 #if H_3D_VSO_COLOR_PLANES 1431 1432 riError += xGetDist( pcInSample->aiY[iSubSourcePos] - pcOutSample->iYRef, 1432 1433 pcInSample->aiU[iSubSourcePos] - pcOutSample->iURef, … … 1445 1446 { 1446 1447 Pel piBlendedValueY; 1447 #if H HI_VSO_COLOR_PLANES1448 #if H_3D_VSO_COLOR_PLANES 1448 1449 Pel piBlendedValueU; 1449 1450 Pel piBlendedValueV; … … 1453 1454 pcInSample ->aiY[iSubSourcePos], 1454 1455 pcOutSample->iYRight, 1455 #if H HI_VSO_COLOR_PLANES1456 #if H_3D_VSO_COLOR_PLANES 1456 1457 pcInSample ->aiU[iSubSourcePos], 1457 1458 pcOutSample->iURight, … … 1464 1465 pcOutSample->iFilledRight , 1465 1466 piBlendedValueY 1466 #if H HI_VSO_COLOR_PLANES1467 #if H_3D_VSO_COLOR_PLANES 1467 1468 , piBlendedValueU, 1468 1469 piBlendedValueV … … 1476 1477 pcOutSample->iYLeft = pcInSample ->aiY[iSubSourcePos]; 1477 1478 pcOutSample->iYBlended = piBlendedValueY; 1478 #if H HI_VSO_COLOR_PLANES1479 #if H_3D_VSO_COLOR_PLANES 1479 1480 pcOutSample->iULeft = pcInSample ->aiU[iSubSourcePos]; 1480 1481 pcOutSample->iUBlended = piBlendedValueU; … … 1486 1487 // Get Error 1487 1488 Int iDiffY = pcOutSample->iYRef - piBlendedValueY; 1488 #if H HI_VSO_COLOR_PLANES1489 #if H_3D_VSO_COLOR_PLANES 1489 1490 Int iDiffU = pcOutSample->iURef - piBlendedValueU; 1490 1491 Int iDiffV = pcOutSample->iVRef - piBlendedValueV; … … 1497 1498 { 1498 1499 Int iDiffY = pcOutSample->iYRef - piBlendedValueY; 1499 #if H HI_VSO_COLOR_PLANES1500 #if H_3D_VSO_COLOR_PLANES 1500 1501 Int iDiffU = pcOutSample->iURef - piBlendedValueU; 1501 1502 Int iDiffV = pcOutSample->iVRef - piBlendedValueV; … … 1543 1544 // Yuv 1544 1545 pcOutSample->iYRight = pcInSample->aiY[iSubSourcePos]; 1545 #if H HI_VSO_COLOR_PLANES1546 #if H_3D_VSO_COLOR_PLANES 1546 1547 pcOutSample->iURight = pcInSample->aiU[iSubSourcePos]; 1547 1548 pcOutSample->iVRight = pcInSample->aiV[iSubSourcePos]; … … 1559 1560 else 1560 1561 { 1561 #if H HI_VSO_COLOR_PLANES1562 #if H_3D_VSO_COLOR_PLANES 1562 1563 riError += xGetDist( pcInSample->aiY[iSubSourcePos] - pcOutSample->iYRef, 1563 1564 pcInSample->aiU[iSubSourcePos] - pcOutSample->iURef, … … 1576 1577 { 1577 1578 Pel piBlendedValueY; 1578 #if H HI_VSO_COLOR_PLANES1579 #if H_3D_VSO_COLOR_PLANES 1579 1580 Pel piBlendedValueU; 1580 1581 Pel piBlendedValueV; … … 1584 1585 pcOutSample->iYLeft, 1585 1586 pcInSample ->aiY[iSubSourcePos], 1586 #if H HI_VSO_COLOR_PLANES1587 #if H_3D_VSO_COLOR_PLANES 1587 1588 pcOutSample->iULeft, 1588 1589 pcInSample ->aiU[iSubSourcePos], … … 1595 1596 iFilled, 1596 1597 piBlendedValueY 1597 #if H HI_VSO_COLOR_PLANES1598 #if H_3D_VSO_COLOR_PLANES 1598 1599 , piBlendedValueU, 1599 1600 piBlendedValueV … … 1607 1608 pcOutSample->iYRight = pcInSample ->aiY[iSubSourcePos]; 1608 1609 pcOutSample->iYBlended = piBlendedValueY; 1609 #if H HI_VSO_COLOR_PLANES1610 #if H_3D_VSO_COLOR_PLANES 1610 1611 pcOutSample->iURight = pcInSample ->aiU[iSubSourcePos]; 1611 1612 pcOutSample->iUBlended = piBlendedValueU; … … 1617 1618 // Get Error 1618 1619 Int iDiffY = pcOutSample->iYRef - piBlendedValueY; 1619 #if H HI_VSO_COLOR_PLANES1620 #if H_3D_VSO_COLOR_PLANES 1620 1621 Int iDiffU = pcOutSample->iURef - piBlendedValueU; 1621 1622 Int iDiffV = pcOutSample->iVRef - piBlendedValueV; … … 1628 1629 { 1629 1630 Int iDiffY = pcOutSample->iYRef - piBlendedValueY; 1630 #if H HI_VSO_COLOR_PLANES1631 #if H_3D_VSO_COLOR_PLANES 1631 1632 Int iDiffU = pcOutSample->iURef - piBlendedValueU; 1632 1633 Int iDiffV = pcOutSample->iVRef - piBlendedValueV; … … 1680 1681 1681 1682 1682 #if H HI_VSO_COLOR_PLANES1683 #if H_3D_VSO_COLOR_PLANES 1683 1684 template <BlenMod iBM, Bool bBitInc> __inline Void 1684 1685 TRenSingleModelC<iBM,bBitInc>::xGetBlendedValue( Pel iYL, Pel iYR, Pel iUL, Pel iUR, Pel iVL, Pel iVR, Pel iDepthL, Pel iDepthR, Int iFilledL, Int iFilledR, Pel& riY, Pel& riU, Pel&riV ) … … 1695 1696 if (iBM == BLEND_LEFT ) 1696 1697 { 1697 #if H HI_VSO_COLOR_PLANES1698 #if H_3D_VSO_COLOR_PLANES 1698 1699 xGetBlendedValueBM1( iYL, iYR, iUL, iUR, iVL, iVR, iDepthL, iDepthR, iFilledL, iFilledR, riY, riU, riV ); 1699 1700 #else … … 1703 1704 else 1704 1705 { 1705 #if H HI_VSO_COLOR_PLANES1706 #if H_3D_VSO_COLOR_PLANES 1706 1707 xGetBlendedValueBM2( iYL, iYR, iUL, iUR, iVL, iVR, iDepthL, iDepthR, iFilledL, iFilledR, riY, riU, riV ); 1707 1708 #else … … 1721 1722 { 1722 1723 riY = xBlend( iYL, iYR, iFilledR >> 1 ); 1723 #if H HI_VSO_COLOR_PLANES1724 #if H_3D_VSO_COLOR_PLANES 1724 1725 riU = xBlend( iUL, iUR, iFilledR >> 1 ); 1725 1726 riV = xBlend( iVL, iVR, iFilledR >> 1 ); … … 1730 1731 { 1731 1732 riY = xBlend( iYR, iYL, (iFilledL >> 1) ); 1732 #if H HI_VSO_COLOR_PLANES1733 #if H_3D_VSO_COLOR_PLANES 1733 1734 riU = xBlend( iUR, iUL, (iFilledL >> 1) ); 1734 1735 riV = xBlend( iVR, iVL, (iFilledL >> 1) ); … … 1738 1739 { 1739 1740 riY = xBlend( iYL, iYR, m_iBlendDistWeight ); 1740 #if H HI_VSO_COLOR_PLANES1741 #if H_3D_VSO_COLOR_PLANES 1741 1742 riU = xBlend( iUL, iUR, m_iBlendDistWeight ); 1742 1743 riV = xBlend( iVL, iVR, m_iBlendDistWeight ); … … 1747 1748 { 1748 1749 riY = iYL; 1749 #if H HI_VSO_COLOR_PLANES1750 #if H_3D_VSO_COLOR_PLANES 1750 1751 riU = iUL; 1751 1752 riV = iVL; … … 1755 1756 { 1756 1757 riY = iYR; 1757 #if H HI_VSO_COLOR_PLANES1758 #if H_3D_VSO_COLOR_PLANES 1758 1759 riU = iUR; 1759 1760 riV = iVR; … … 1766 1767 { 1767 1768 riY = iYR; 1768 #if H HI_VSO_COLOR_PLANES1769 #if H_3D_VSO_COLOR_PLANES 1769 1770 riU = iUR; 1770 1771 riV = iVR; … … 1774 1775 { 1775 1776 riY = iYL; 1776 #if H HI_VSO_COLOR_PLANES1777 #if H_3D_VSO_COLOR_PLANES 1777 1778 riU = iUL; 1778 1779 riV = iVL; … … 1785 1786 { 1786 1787 riY = iYL; 1787 #if H HI_VSO_COLOR_PLANES1788 #if H_3D_VSO_COLOR_PLANES 1788 1789 riU = iUL; 1789 1790 riV = iVL; … … 1793 1794 { 1794 1795 riY = iYR; 1795 #if H HI_VSO_COLOR_PLANES1796 #if H_3D_VSO_COLOR_PLANES 1796 1797 riU = iUR; 1797 1798 riV = iVR; … … 1802 1803 1803 1804 template <BlenMod iBM, Bool bBitInc> __inline Void 1804 #if H HI_VSO_COLOR_PLANES1805 #if H_3D_VSO_COLOR_PLANES 1805 1806 TRenSingleModelC<iBM,bBitInc>::xGetBlendedValueBM1( Pel iYL, Pel iYR, Pel iUL, Pel iUR, Pel iVL, Pel iVR, Pel iDepthL, Pel iDepthR, Int iFilledL, Int iFilledR, Pel& riY, Pel& riU, Pel&riV ) 1806 1807 #else … … 1811 1812 { 1812 1813 riY = iYL; 1813 #if H HI_VSO_COLOR_PLANES1814 #if H_3D_VSO_COLOR_PLANES 1814 1815 riU = iUL; 1815 1816 riV = iVL; … … 1819 1820 { 1820 1821 riY = iYR; 1821 #if H HI_VSO_COLOR_PLANES1822 #if H_3D_VSO_COLOR_PLANES 1822 1823 riU = iUR; 1823 1824 riV = iVR; … … 1827 1828 { 1828 1829 riY = xBlend( iYR, iYL, iFilledL ); 1829 #if H HI_VSO_COLOR_PLANES1830 #if H_3D_VSO_COLOR_PLANES 1830 1831 riU = xBlend( iUR, iUL, iFilledL ); 1831 1832 riV = xBlend( iVR, iUL, iFilledL ); … … 1835 1836 1836 1837 template <BlenMod iBM, Bool bBitInc> __inline Void 1837 #if H HI_VSO_COLOR_PLANES1838 #if H_3D_VSO_COLOR_PLANES 1838 1839 TRenSingleModelC<iBM,bBitInc>::xGetBlendedValueBM2( Pel iYL, Pel iYR, Pel iUL, Pel iUR, Pel iVL, Pel iVR, Pel iDepthL, Pel iDepthR, Int iFilledL, Int iFilledR, Pel& riY, Pel& riU, Pel&riV ) 1839 1840 #else … … 1844 1845 { 1845 1846 riY = iYR; 1846 #if H HI_VSO_COLOR_PLANES1847 #if H_3D_VSO_COLOR_PLANES 1847 1848 riU = iUR; 1848 1849 riV = iVR; … … 1852 1853 { 1853 1854 riY = iYL; 1854 #if H HI_VSO_COLOR_PLANES1855 #if H_3D_VSO_COLOR_PLANES 1855 1856 riU = iUL; 1856 1857 riV = iVL; … … 1860 1861 { 1861 1862 riY = xBlend( iYL, iYR, iFilledR ); 1862 #if H HI_VSO_COLOR_PLANES1863 #if H_3D_VSO_COLOR_PLANES 1863 1864 riU = xBlend( iUL, iUR, iFilledR ); 1864 1865 riV = xBlend( iVL, iUR, iFilledR ); … … 1891 1892 template class TRenSingleModelC<BLEND_RIGHT,false>; 1892 1893 1893 #if def LGE_VSO_EARLY_SKIP_A00931894 #if H_3D_VSO_EARLY_SKIP 1894 1895 template <BlenMod iBM, Bool bBitInc> 1895 1896 __inline Bool … … 1957 1958 } 1958 1959 #endif 1959 #endif 1960 1960 #endif // H_3D 1961 -
trunk/source/Lib/TLibRenderer/TRenSingleModel.h
r210 r608 32 32 */ 33 33 34 #if !QC_MVHEVC_B0046 34 35 35 #ifndef __TRENSINGLEMODEL__ 36 36 #define __TRENSINGLEMODEL__ … … 51 51 #include <cstring> 52 52 53 53 #if H_3D_VSO 54 54 using namespace std; 55 55 56 57 #if HHI_VSO_RM_ASSERTIONS 56 #if H_3D_VSO_RM_ASSERTIONS 58 57 #define RM_AOT( exp ) AOT ( exp ) 59 58 #define RM_AOF( exp ) AOF ( exp ) … … 70 69 71 70 virtual ~TRenSingleModel() { } 72 #if LGE_VSO_EARLY_SKIP_A009371 #if H_3D_VSO_EARLY_SKIP 73 72 virtual Void create ( Int iMode, Int iWidth, Int iHeight, Int iShiftPrec, Int*** aaaiSubPelShiftTable, Int iHoleMargin, Bool bUseOrgRef, Int iBlendMode, Bool bEarlySkip ) = 0; 74 73 #else … … 82 81 83 82 // Set Data 84 #if def LGE_VSO_EARLY_SKIP_A009383 #if H_3D_VSO_EARLY_SKIP 85 84 virtual Void setDepth ( Int iViewPos, Int iStartPosX, Int iStartPosY, Int iWidth, Int iHeight, Int iStride, Pel* piNewData, Pel* piOrgData, Int iOrgStride ) = 0; 86 85 #else … … 90 89 91 90 // Get Distortion 92 #if def LGE_VSO_EARLY_SKIP_A009391 #if H_3D_VSO_EARLY_SKIP 93 92 virtual RMDist getDistDepth ( Int iViewPos, Int iStartPosX, Int iStartPosY, Int iWidth, Int iHeight, Int iStride, Pel* piNewData, Pel * piOrgData , Int iOrgStride)=0; 94 93 #else … … 109 108 // video 110 109 Pel aiY[5] ; // y-value 111 #if H HI_VSO_COLOR_PLANES110 #if H_3D_VSO_COLOR_PLANES 112 111 Pel aiU[5] ; // u-value 113 112 Pel aiV[5] ; // v-value … … 126 125 Pel iYRight ; 127 126 Pel iYBlended ; 128 #if H HI_VSO_COLOR_PLANES127 #if H_3D_VSO_COLOR_PLANES 129 128 Pel iULeft ; 130 129 Pel iURight ; … … 148 147 // reference 149 148 Pel iYRef ; 150 #if H HI_VSO_COLOR_PLANES149 #if H_3D_VSO_COLOR_PLANES 151 150 Pel iURef ; 152 151 Pel iVRef ; … … 161 160 162 161 // Create Model 163 #if LGE_VSO_EARLY_SKIP_A0093162 #if H_3D_VSO_EARLY_SKIP 164 163 Void create ( Int iMode, Int iWidth, Int iHeight, Int iShiftPrec, Int*** aaaiSubPelShiftTable, Int iHoleMargin, Bool bUseOrgRef, Int iBlendMode, Bool bEarlySkip ); 165 164 #else … … 172 171 Void setup ( TComPicYuv* pcOrgVideo, Int** ppiShiftLutLeft, Int** ppiBaseShiftLutLeft, Int** ppiShiftLutRight, Int** ppiBaseShiftLutRight, Int iDistToLeft, Bool bKeepReference ); 173 172 174 #if LGE_VSO_EARLY_SKIP_A0093173 #if H_3D_VSO_EARLY_SKIP 175 174 Void setDepth ( Int iViewPos, Int iStartPosX, Int iStartPosY, Int iWidth, Int iHeight, Int iStride, Pel* piNewData, Pel* piOrgData, Int iOrgStride ); 176 175 #else … … 180 179 181 180 // Get Distortion 182 #if def LGE_VSO_EARLY_SKIP_A0093181 #if H_3D_VSO_EARLY_SKIP 183 182 RMDist getDistDepth ( Int iViewPos, Int iStartPosX, Int iStartPosY, Int iWidth, Int iHeight, Int iStride, Pel* piNewData, Pel * piOrgData , Int iOrgStride); 184 183 #else … … 198 197 ///// Rendering ///// 199 198 // Left to Right 200 #if LGE_VSO_EARLY_SKIP_A0093199 #if H_3D_VSO_EARLY_SKIP 201 200 __inline Bool xDetectEarlySkipL ( Int iStartPosX, Int iStartPosY, Int iWidth, Int iHeight, Int iStride, Pel* piNewData,Pel* piOrgData, Int iOrgStride ); 202 201 __inline Bool xDetectEarlySkipR ( Int iStartPosX, Int iStartPosY, Int iWidth, Int iHeight, Int iStride, Pel* piNewData,Pel* piOrgData, Int iOrgStride ); … … 229 228 template<Bool bSet> __inline Void xSetShiftedPelBlend ( Int iSourcePos, Int iTargetSPos, Pel iFilled, RMDist& riError ); 230 229 231 #if H HI_VSO_COLOR_PLANES230 #if H_3D_VSO_COLOR_PLANES 232 231 __inline Void xGetBlendedValue ( Pel iYL, Pel iYR, Pel iUL, Pel iUR, Pel iVL, Pel iVR, Pel iDepthL, Pel iDepthR, Int iFilledL, Int iFilledR, Pel& riY, Pel& riU, Pel&riV ); 233 232 __inline Void xGetBlendedValueBM1 ( Pel iYL, Pel iYR, Pel iUL, Pel iUR, Pel iVL, Pel iVR, Pel iDepthL, Pel iDepthR, Int iFilledL, Int iFilledR, Pel& riY, Pel& riU, Pel&riV ); … … 260 259 __inline Void xSetInts ( Int* piPelSource , Int iSourceStride, Int iWidth, Int iHeight, Int iVal ); 261 260 262 #if H HI_VSO_COLOR_PLANES261 #if H_3D_VSO_COLOR_PLANES 263 262 Void xGetSampleStrTextPtrs ( Int iViewNum, Pel RenModelOutPels::*& rpiSrcY, Pel RenModelOutPels::*& rpiSrcU, Pel RenModelOutPels::*& rpiSrcV ); 264 263 #else … … 367 366 Int m_iShiftPrec; 368 367 Int m_iHoleMargin; 369 #if def LGE_VSO_EARLY_SKIP_A0093368 #if H_3D_VSO_EARLY_SKIP 370 369 Bool m_bEarlySkip; 371 370 #endif … … 385 384 386 385 //// Early Skip 387 #if def LGE_VSO_EARLY_SKIP_A0093386 #if H_3D_VSO_EARLY_SKIP 388 387 Bool* m_pbHorSkip; 389 388 #endif 390 389 }; 391 390 391 #endif // H_3D 392 392 #endif //__TRENSINGLEMODEL__ 393 #endif 394 393 394 -
trunk/source/Lib/TLibRenderer/TRenTop.cpp
r296 r608 32 32 */ 33 33 34 34 35 #include "TRenImage.h" 35 36 #include "TRenTop.h" … … 39 40 #include <math.h> 40 41 #include "../TLibCommon/CommonDef.h" 42 #if H_3D 43 41 44 42 45 Void TRenTop::xGetDataPointers( PelImage*& rpcInputImage, PelImage*& rpcOutputImage, PelImage*& rpcInputDepth, PelImage*& rpcOutputDepth, PelImage*& rpcFilled, Bool bRenderDepth ) … … 1030 1033 for ( ; iInterPolPos <= xCeil (iShiftedPos ) -1 ; iInterPolPos++) 1031 1034 { 1035 #if H_3D_FIX_REN 1036 if ( ( iInterPolPos >= 0 ) && ( iInterPolPos < iOutputWidth ) ) 1037 { 1038 if( pcFilledData[iInterPolPos] == REN_IS_HOLE ) 1039 { 1040 Int iNextPos = std::min(iInputWidth-1,iPosX + iStep); 1041 Int iPosXBG = ( std::abs( pcDepthData[iNextPos] - pcDepthData[iPosX] ) > 5 ) ? iPosX : iNextPos; 1042 for( UInt uiCurPlane = 0; uiCurPlane < uiNumberOfPlanes; uiCurPlane++) 1043 { 1044 apcOutputData[uiCurPlane][iInterPolPos] = apcInputData[uiCurPlane][iPosXBG]; 1045 } 1046 } 1047 else 1048 { 1049 pcFilledData[iInterPolPos] = REN_IS_HOLE + 1; 1050 } 1051 } 1052 #else 1032 1053 for( UInt uiCurPlane = 0; uiCurPlane < uiNumberOfPlanes; uiCurPlane++) 1033 1054 { … … 1037 1058 } 1038 1059 } 1060 #endif 1039 1061 } 1040 1062 } … … 1282 1304 else 1283 1305 { 1306 #if H_3D_FIX_REN 1307 pcAlphaData[iXPos] = pcFilledData[iXPos]; 1308 #else 1284 1309 pcAlphaData[iXPos] = REN_IS_FILLED; 1310 #endif 1285 1311 } 1286 1312 } … … 1588 1614 Void TRenTop::xEnhSimilarityPlane ( PelImagePlane** apcLeftPlane, PelImagePlane** apcRightPlane, PelImagePlane* pcFilledLeftPlane, PelImagePlane* pcFilledRightPlane, UInt uiNumberOfPlanes ) 1589 1615 { 1616 AOF( g_bitDepthC == g_bitDepthY ); 1590 1617 AOT( m_iSimEnhBaseView != 1 && m_iSimEnhBaseView != 2 ); 1591 1618 Int iWidth = (*apcRightPlane)->getWidth (); 1592 1619 Int iHeight = (*apcRightPlane)->getHeight(); 1593 1620 1594 Int* aiHistLeft = new Int[ g_uiIBDI_MAX + 1];1595 Int* aiHistRight = new Int[ g_uiIBDI_MAX + 1];1596 Pel* aiConvLUT = new Pel[ g_uiIBDI_MAX + 1];1621 Int* aiHistLeft = new Int[ ((Int64)1 ) << g_bitDepthY ]; 1622 Int* aiHistRight = new Int[ ((Int64)1 ) << g_bitDepthY ]; 1623 Pel* aiConvLUT = new Pel[ ((Int64)1 ) << g_bitDepthY ]; 1597 1624 1598 1625 for (UInt uiCurPlane = 0; uiCurPlane < uiNumberOfPlanes; uiCurPlane++ ) 1599 1626 { 1600 for (Int iCurVal = 0 ; iCurVal < = g_uiIBDI_MAX; iCurVal++)1627 for (Int iCurVal = 0 ; iCurVal < ( 1 << g_bitDepthY ); iCurVal++) 1601 1628 { 1602 1629 aiHistLeft [iCurVal] = 0; … … 1645 1672 Int iCheckSumRight = 0; 1646 1673 1647 for (Int iCurVal = 0 ; iCurVal < = g_uiIBDI_MAX; iCurVal++)1674 for (Int iCurVal = 0 ; iCurVal < ( 1 << g_bitDepthY ); iCurVal++) 1648 1675 { 1649 1676 iCheckSumLeft += aiHistLeft [iCurVal]; … … 1652 1679 1653 1680 1654 while( iCurChangeVal < = g_uiIBDI_MAX)1681 while( iCurChangeVal < ( 1 << g_bitDepthY ) ) 1655 1682 { 1656 1683 if ( iCumSumBase == iCumSumChange ) 1657 1684 { 1658 aiConvLUT[iCurChangeVal] = Min(iCurBaseVal, g_uiIBDI_MAX);1685 aiConvLUT[iCurChangeVal] = std::min( iCurBaseVal, ( 1 << g_bitDepthY ) - 1 ); 1659 1686 iCurBaseVal ++; 1660 1687 iCurChangeVal++; 1661 1688 iCumSumChange += aiHistChange[iCurChangeVal]; 1662 if (iCurBaseVal < = g_uiIBDI_MAX)1689 if (iCurBaseVal < ( 1 << g_bitDepthY ) ) 1663 1690 { 1664 1691 iCumSumBase += aiHistBase [iCurBaseVal] ; … … 1668 1695 { 1669 1696 iCurBaseVal++; 1670 if (iCurBaseVal < = g_uiIBDI_MAX)1697 if (iCurBaseVal < ( 1 << g_bitDepthY ) ) 1671 1698 { 1672 1699 iCumSumBase += aiHistBase [iCurBaseVal] ; … … 1675 1702 else if ( iCumSumBase > iCumSumChange) 1676 1703 { 1677 aiConvLUT[iCurChangeVal] = Min(iCurBaseVal, g_uiIBDI_MAX);1704 aiConvLUT[iCurChangeVal] = std::min(iCurBaseVal, ( 1 << g_bitDepthY )-1); 1678 1705 iCurChangeVal++; 1679 1706 iCumSumChange += aiHistChange [iCurChangeVal] ; … … 1884 1911 Void TRenTop::temporalFilterVSRS( TComPicYuv* pcPicYuvVideoCur, TComPicYuv* pcPicYuvDepthCur, TComPicYuv* pcPicYuvVideoLast, TComPicYuv* pcPicYuvDepthLast, Bool bFirstFrame ) 1885 1912 { 1913 AOF( g_bitDepthY == g_bitDepthC ); 1886 1914 Int iSADThres = 100 ; //threshold of sad in 4*4 block motion detection 1887 1915 … … 1950 1978 { //Weight: 0.75 1951 1979 Int iFilt = (( (pcDepthLastDataBlk[iCurPosX] << 1 ) + pcDepthLastDataBlk[iCurPosX] + pcDepthCurDataBlk[iCurPosX] + 2 ) >> 2 ); 1952 assert( (iFilt >= 0) && (iFilt < = g_uiIBDI_MAX) );1980 assert( (iFilt >= 0) && (iFilt < ( 1 << g_bitDepthY ) ) ); 1953 1981 pcDepthCurDataBlk[iCurPosX] = pcDepthLastDataBlk[iCurPosX]; 1954 1982 pcDepthCurDataBlk[iCurPosX] = iFilt; … … 2221 2249 if(m_aiBlkMoving != NULL ) delete[] m_aiBlkMoving; 2222 2250 } 2251 #endif // H_3D 2252 -
trunk/source/Lib/TLibRenderer/TRenTop.h
r56 r608 38 38 #include "../TLibCommon/CommonDef.h" 39 39 #include "../TLibCommon/TComPicYuv.h" 40 41 #if H_3D 40 42 #include <list> 41 43 #include <vector> … … 268 270 }; 269 271 272 #endif // H_3D 270 273 #endif //__TRENTOP__
Note: See TracChangeset for help on using the changeset viewer.