Changeset 1313 in 3DVCSoftware for trunk/source/Lib/TLibRenderer/TRenInterpFilter.h
- Timestamp:
- 13 Aug 2015, 17:38:13 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/Lib/TLibRenderer/TRenInterpFilter.h
r1179 r1313 44 44 #include "TLibCommon/CommonDef.h" 45 45 #include "assert.h" 46 #if H_3D46 #if NH_3D 47 47 48 48 // ==================================================================================================================== … … 60 60 61 61 /// interpolation filter class 62 template<UInt bitDepth> 62 63 class TRenInterpFilter 63 64 { … … 104 105 __inline Int xCTI_Filter_VP04_C_OCT3( Pel* pSrc, Int iStride ); 105 106 __inline Int xCTI_Filter_VI04_C_OCT3( Int* pSrc, Int iStride ); 107 private: 108 __inline Int xClipY( Pel x ) { return std::min<Pel>(Pel((1 << bitDepth)-1), std::max<Pel>( Pel(0), x)); } 109 __inline Int xClipC( Pel x ) { return std::min<Pel>(Pel((1 << bitDepth)-1), std::max<Pel>( Pel(0), x)); } 106 110 107 111 }; … … 111 115 // DCTIF filters 112 116 // ------------------------------------------------------------------------------------------------ 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 117 template<UInt bitDepth> 118 __inline Void TRenInterpFilter<bitDepth>::xCTI_FilterHalfHor(Pel* piSrc, Int iSrcStride, Int iSrcStep, Int iWidth, Int iHeight, Int iDstStride, Int iDstStep, Pel*& rpiDst) 119 { 118 120 Pel* piDst = rpiDst; 119 121 Int iSum; … … 146 148 - iTmp0 - iTmp2; 147 149 148 piDst [x * iDstStep] = ClipY( (iSum + 32) >> 6 );150 piDst [x * iDstStep] = xClipY( (iSum + 32) >> 6 ); 149 151 piSrcTmp += iSrcStep; 150 152 } … … 155 157 } 156 158 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 159 template<UInt bitDepth> 160 __inline Void TRenInterpFilter<bitDepth>::xCTI_FilterHalfHor(Int* piSrc, Int iSrcStride, Int iSrcStep, Int iWidth, Int iHeight, Int iDstStride, Int iDstStep, Pel*& rpiDst) 161 { 161 162 Pel* piDst = rpiDst; 162 163 Int iSum; … … 189 190 - iTmp0 - iTmp2; 190 191 191 piDst [x * iDstStep] = ClipY( (iSum + 2048) >> 12 );192 piDst [x * iDstStep] = xClipY( (iSum + 2048) >> 12 ); 192 193 piSrcTmp += iSrcStep; 193 194 } … … 198 199 } 199 200 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 depth201 template<UInt bitDepth> 202 __inline Void TRenInterpFilter<bitDepth>::xCTI_FilterQuarter0Hor(Pel* piSrc, Int iSrcStride, Int iSrcStep, Int iWidth, Int iHeight, Int iDstStride, Int iDstStep, Pel*& rpiDst) 203 { 203 204 Pel* piDst = rpiDst; 204 205 Int iSum; … … 229 230 + ( piSrcTmp[iSrcStep4] << 4 ); 230 231 231 piDst [x * iDstStep] = ClipY(( (iSum + 32) >> 6 )+ piSrcTmp[iSrcStep3]);232 piDst [x * iDstStep] = xClipY(( (iSum + 32) >> 6 )+ piSrcTmp[iSrcStep3]); 232 233 piSrcTmp += iSrcStep; 233 234 } … … 238 239 } 239 240 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 241 template<UInt bitDepth> 242 __inline Void TRenInterpFilter<bitDepth>::xCTI_FilterQuarter0Hor(Int* piSrc, Int iSrcStride, Int iSrcStep, Int iWidth, Int iHeight, Int iDstStride, Int iDstStep, Pel*& rpiDst) 243 { 244 244 Pel* piDst = rpiDst; 245 245 Int iSum; … … 271 271 + ( piSrcTmp[iSrcStep3] << 6 ); 272 272 273 piDst [x * iDstStep] = ClipY( (iSum + 2048) >> 12 );273 piDst [x * iDstStep] = xClipY( (iSum + 2048) >> 12 ); 274 274 piSrcTmp += iSrcStep; 275 275 } … … 280 280 } 281 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 282 template<UInt bitDepth> 283 __inline Void TRenInterpFilter<bitDepth>::xCTI_FilterQuarter1Hor(Pel* piSrc, Int iSrcStride, Int iSrcStep, Int iWidth, Int iHeight, Int iDstStride, Int iDstStep, Pel*& rpiDst) 284 { 285 285 Pel* piDst = rpiDst; 286 286 Int iSum; … … 310 310 + ( piSrcTmp[iSrcStep3] << 4 ); 311 311 312 piDst [x * iDstStep] = ClipY( ((iSum + 32) >> 6) + piSrcTmp[iSrcStep4] );312 piDst [x * iDstStep] = xClipY( ((iSum + 32) >> 6) + piSrcTmp[iSrcStep4] ); 313 313 piSrcTmp += iSrcStep; 314 314 } … … 319 319 } 320 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 321 template<UInt bitDepth> 322 __inline Void TRenInterpFilter<bitDepth>::xCTI_FilterQuarter1Hor(Int* piSrc, Int iSrcStride, Int iSrcStep, Int iWidth, Int iHeight, Int iDstStride, Int iDstStep, Pel*& rpiDst) 323 { 325 324 Pel* piDst = rpiDst; 326 325 Int iSum; … … 351 350 + ( piSrcTmp[iSrcStep4] << 6 ); 352 351 353 piDst [x * iDstStep] = ClipY( (iSum + 2048) >> 12 );352 piDst [x * iDstStep] = xClipY( (iSum + 2048) >> 12 ); 354 353 piSrcTmp += iSrcStep; 355 354 } … … 360 359 } 361 360 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 361 template<UInt bitDepth> 362 __inline Void TRenInterpFilter<bitDepth>::xCTI_FilterHalfVer (Pel* piSrc, Int iSrcStride, Int iSrcStep, Int iWidth, Int iHeight, Int iDstStride, Int iDstStep, Int*& rpiDst, Int iDstStridePel, Pel*& rpiDstPel ) 363 { 365 364 Int* piDst = rpiDst; 366 365 Pel* piDstPel = rpiDstPel; … … 394 393 395 394 piDst[x * iDstStep] = iSum; 396 piDstPel[x * iDstStep] = ClipY( (iSum + 32) >> 6 );395 piDstPel[x * iDstStep] = xClipY( (iSum + 32) >> 6 ); 397 396 piSrcTmp += iSrcStep; 398 397 } … … 404 403 } 405 404 406 __inline Void TRenInterpFilter::xCTI_FilterHalfVer (Pel* piSrc, Int iSrcStride, Int iSrcStep, Int iWidth, Int iHeight, Int iDstStride, Int iDstStep, Int*& rpiDst) 405 template<UInt bitDepth> 406 __inline Void TRenInterpFilter<bitDepth>::xCTI_FilterHalfVer (Pel* piSrc, Int iSrcStride, Int iSrcStep, Int iWidth, Int iHeight, Int iDstStride, Int iDstStep, Int*& rpiDst) 407 407 { 408 408 Int* piDst = rpiDst; … … 444 444 } 445 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 446 template<UInt bitDepth> 447 __inline Void TRenInterpFilter<bitDepth>::xCTI_FilterHalfVer (Pel* piSrc, Int iSrcStride, Int iSrcStep, Int iWidth, Int iHeight, Int iDstStride, Int iDstStep, Pel*& rpiDst) 448 { 449 449 Pel* piDst = rpiDst; 450 450 Int iSum; … … 477 477 - iTmp0 - iTmp2; 478 478 479 piDst[x * iDstStep] = ClipY( (iSum + 32) >> 6 );479 piDst[x * iDstStep] = xClipY( (iSum + 32) >> 6 ); 480 480 piSrcTmp += iSrcStep; 481 481 } … … 486 486 } 487 487 488 __inline Void TRenInterpFilter::xCTI_FilterQuarter0Ver (Pel* piSrc, Int iSrcStride, Int iSrcStep, Int iWidth, Int iHeight, Int iDstStride, Int iDstStep, Int*& rpiDst) 488 template<UInt bitDepth> 489 __inline Void TRenInterpFilter<bitDepth>::xCTI_FilterQuarter0Ver (Pel* piSrc, Int iSrcStride, Int iSrcStep, Int iWidth, Int iHeight, Int iDstStride, Int iDstStep, Int*& rpiDst) 489 490 { 490 491 Int* piDst = rpiDst; … … 525 526 } 526 527 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 528 template<UInt bitDepth> 529 __inline Void TRenInterpFilter<bitDepth>::xCTI_FilterQuarter0Ver (Pel* piSrc, Int iSrcStride, Int iSrcStep, Int iWidth, Int iHeight, Int iDstStride, Int iDstStep, Pel*& rpiDst) 530 { 530 531 Pel* piDst = rpiDst; 531 532 Int iSum; … … 556 557 + ( piSrcTmp[iSrcStride4] << 4 ); 557 558 558 piDst[x * iDstStep] = ClipY( ((iSum + 32) >> 6) + piSrcTmp[iSrcStride3] );559 piDst[x * iDstStep] = xClipY( ((iSum + 32) >> 6) + piSrcTmp[iSrcStride3] ); 559 560 piSrcTmp += iSrcStep; 560 561 } … … 565 566 } 566 567 567 __inline Void TRenInterpFilter::xCTI_FilterQuarter1Ver (Pel* piSrc, Int iSrcStride, Int iSrcStep, Int iWidth, Int iHeight, Int iDstStride, Int iDstStep, Int*& rpiDst) 568 template<UInt bitDepth> 569 __inline Void TRenInterpFilter<bitDepth>::xCTI_FilterQuarter1Ver (Pel* piSrc, Int iSrcStride, Int iSrcStep, Int iWidth, Int iHeight, Int iDstStride, Int iDstStep, Int*& rpiDst) 568 570 { 569 571 Int* piDst = rpiDst; … … 604 606 } 605 607 606 __inline Void TRenInterpFilter::xCTI_FilterQuarter1Ver (Pel* piSrc, Int iSrcStride, Int iSrcStep, Int iWidth, Int iHeight, Int iDstStride, Int iDstStep, Pel*& rpiDst) 607 { 608 assert( g_bitDepthC == g_bitDepthY); // ToDo: Update renderer to work with different luma/chroma bit depth 609 608 template<UInt bitDepth> 609 __inline Void TRenInterpFilter<bitDepth>::xCTI_FilterQuarter1Ver (Pel* piSrc, Int iSrcStride, Int iSrcStep, Int iWidth, Int iHeight, Int iDstStride, Int iDstStep, Pel*& rpiDst) 610 { 610 611 Pel* piDst = rpiDst; 611 612 Int iSum; … … 635 636 + ( piSrcTmp[iSrcStride3] << 4 ); 636 637 637 piDst[x * iDstStep] = ClipY( ((iSum + 32) >> 6) + piSrcTmp[iSrcStride4] );638 piDst[x * iDstStep] = xClipY( ((iSum + 32) >> 6) + piSrcTmp[iSrcStride4] ); 638 639 piSrcTmp += iSrcStep; 639 640 } … … 647 648 // DCTIF filters for Chroma 648 649 // ------------------------------------------------------------------------------------------------ 649 __inline Void TRenInterpFilter::xCTI_Filter2DVerC (Pel* piSrc, Int iSrcStride, Int iWidth, Int iHeight, Int iDstStride, Int*& rpiDst, Int iMV) 650 template<UInt bitDepth> 651 __inline Void TRenInterpFilter<bitDepth>::xCTI_Filter2DVerC (Pel* piSrc, Int iSrcStride, Int iWidth, Int iHeight, Int iDstStride, Int*& rpiDst, Int iMV) 650 652 { 651 653 Int* piDst = rpiDst; … … 774 776 } 775 777 776 __inline Void TRenInterpFilter::xCTI_Filter2DHorC(Int* piSrc, Int iSrcStride, Int iWidth, Int iHeight, Int iDstStride, Pel*& rpiDst, Int iMV) 777 { 778 assert( g_bitDepthC == g_bitDepthY); // ToDo: Update renderer to work with different luma/chroma bit depth 778 template<UInt bitDepth> 779 __inline Void TRenInterpFilter<bitDepth>::xCTI_Filter2DHorC(Int* piSrc, Int iSrcStride, Int iWidth, Int iHeight, Int iDstStride, Pel*& rpiDst, Int iMV) 780 { 779 781 Pel* piDst = rpiDst; 780 782 Int iSum; … … 791 793 { 792 794 iSum = xCTI_Filter_VI04_C_OCT0( piSrcTmp, 1 ); 793 piDst [x ] = ClipC ((iSum + 2048) >> 12 );795 piDst [x ] = xClipC ((iSum + 2048) >> 12 ); 794 796 piSrcTmp++; 795 797 } … … 807 809 { 808 810 iSum = xCTI_Filter_VI04_C_QUA0( piSrcTmp, 1 ); 809 piDst [x ] = ClipC ((iSum + 2048) >> 12 );811 piDst [x ] = xClipC ((iSum + 2048) >> 12 ); 810 812 piSrcTmp++; 811 813 } … … 823 825 { 824 826 iSum = xCTI_Filter_VI04_C_QUA1( piSrcTmp, 1 ); 825 piDst [x ] = ClipC ((iSum + 2048) >> 12 );827 piDst [x ] = xClipC ((iSum + 2048) >> 12 ); 826 828 piSrcTmp++; 827 829 } … … 839 841 { 840 842 iSum = xCTI_Filter_VI04_C_OCT1( piSrcTmp, 1 ); 841 piDst [x ] = ClipC ((iSum + 2048) >> 12 );843 piDst [x ] = xClipC ((iSum + 2048) >> 12 ); 842 844 piSrcTmp++; 843 845 } … … 855 857 { 856 858 iSum = xCTI_Filter_VI04_C_OCT2( piSrcTmp, 1 ); 857 piDst [x ] = ClipC ((iSum + 2048) >> 12 );859 piDst [x ] = xClipC ((iSum + 2048) >> 12 ); 858 860 piSrcTmp++; 859 861 } … … 871 873 { 872 874 iSum = xCTI_Filter_VI04_C_OCT3( piSrcTmp, 1 ); 873 piDst [x ] = ClipC ((iSum + 2048) >> 12 );875 piDst [x ] = xClipC ((iSum + 2048) >> 12 ); 874 876 piSrcTmp++; 875 877 } … … 887 889 { 888 890 iSum = xCTI_Filter_VIS04_C_HAL( piSrcTmp, 1 ); 889 piDst [x ] = ClipC ((iSum + 2048) >> 12 );891 piDst [x ] = xClipC ((iSum + 2048) >> 12 ); 890 892 piSrcTmp++; 891 893 } … … 902 904 } 903 905 904 __inline Void TRenInterpFilter::xCTI_Filter1DVerC (Pel* piSrc, Int iSrcStride, Int iWidth, Int iHeight, Int iDstStride, Pel*& rpiDst, Int iMV) 905 { 906 assert( g_bitDepthC == g_bitDepthY); // ToDo: Update renderer to work with different luma/chroma bit depth 907 906 template<UInt bitDepth> 907 __inline Void TRenInterpFilter<bitDepth>::xCTI_Filter1DVerC (Pel* piSrc, Int iSrcStride, Int iWidth, Int iHeight, Int iDstStride, Pel*& rpiDst, Int iMV) 908 { 908 909 Pel* piDst = rpiDst; 909 910 Int iSum; … … 920 921 { 921 922 iSum = xCTI_Filter_VP04_C_OCT0( piSrcTmp, iSrcStride ); 922 piDst[x ] = ClipC ((iSum + 32) >> 6 );923 piDst[x ] = xClipC ((iSum + 32) >> 6 ); 923 924 piSrcTmp++; 924 925 } … … 936 937 { 937 938 iSum = xCTI_Filter_VP04_C_QUA0( piSrcTmp, iSrcStride ); 938 piDst[x ] = ClipC ((iSum + 32) >> 6 );939 piDst[x ] = xClipC ((iSum + 32) >> 6 ); 939 940 piSrcTmp++; 940 941 } … … 952 953 { 953 954 iSum = xCTI_Filter_VP04_C_QUA1( piSrcTmp, iSrcStride ); 954 piDst[x ] = ClipC ((iSum + 32) >> 6 );955 piDst[x ] = xClipC ((iSum + 32) >> 6 ); 955 956 piSrcTmp++; 956 957 } … … 968 969 { 969 970 iSum = xCTI_Filter_VP04_C_OCT1( piSrcTmp, iSrcStride ); 970 piDst[x ] = ClipC ((iSum + 32) >> 6 );971 piDst[x ] = xClipC ((iSum + 32) >> 6 ); 971 972 piSrcTmp++; 972 973 } … … 984 985 { 985 986 iSum = xCTI_Filter_VP04_C_OCT2( piSrcTmp, iSrcStride ); 986 piDst[x ] = ClipC ((iSum + 32) >> 6 );987 piDst[x ] = xClipC ((iSum + 32) >> 6 ); 987 988 piSrcTmp++; 988 989 } … … 1000 1001 { 1001 1002 iSum = xCTI_Filter_VP04_C_OCT3( piSrcTmp, iSrcStride ); 1002 piDst[x ] = ClipC ((iSum + 32) >> 6 );1003 piDst[x ] = xClipC ((iSum + 32) >> 6 ); 1003 1004 piSrcTmp++; 1004 1005 } … … 1016 1017 { 1017 1018 iSum = xCTI_Filter_VPS04_C_HAL( piSrcTmp, iSrcStride ); 1018 piDst[x ] = ClipC ((iSum + 32) >> 6 );1019 piDst[x ] = xClipC ((iSum + 32) >> 6 ); 1019 1020 piSrcTmp++; 1020 1021 } … … 1030 1031 } 1031 1032 1032 __inline Void TRenInterpFilter::xCTI_Filter1DHorC(Pel* piSrc, Int iSrcStride, Int iWidth, Int iHeight, Int iDstStride, Pel*& rpiDst, Int iMV) 1033 template<UInt bitDepth> 1034 __inline Void TRenInterpFilter<bitDepth>::xCTI_Filter1DHorC(Pel* piSrc, Int iSrcStride, Int iWidth, Int iHeight, Int iDstStride, Pel*& rpiDst, Int iMV) 1033 1035 { 1034 1036 Pel* piDst = rpiDst; … … 1046 1048 { 1047 1049 iSum = xCTI_Filter_VP04_C_OCT0( piSrcTmp, 1 ); 1048 piDst[x ] = ClipC ((iSum + 32) >> 6 );1050 piDst[x ] = xClipC ((iSum + 32) >> 6 ); 1049 1051 piSrcTmp++; 1050 1052 } … … 1062 1064 { 1063 1065 iSum = xCTI_Filter_VP04_C_QUA0( piSrcTmp, 1 ); 1064 piDst[x ] = ClipC ((iSum + 32) >> 6 );1066 piDst[x ] = xClipC ((iSum + 32) >> 6 ); 1065 1067 piSrcTmp++; 1066 1068 } … … 1078 1080 { 1079 1081 iSum = xCTI_Filter_VP04_C_QUA1( piSrcTmp, 1 ); 1080 piDst[x ] = ClipC ((iSum + 32) >> 6 );1082 piDst[x ] = xClipC ((iSum + 32) >> 6 ); 1081 1083 piSrcTmp++; 1082 1084 } … … 1094 1096 { 1095 1097 iSum = xCTI_Filter_VP04_C_OCT1( piSrcTmp, 1 ); 1096 piDst[x ] = ClipC ((iSum + 32) >> 6 );1098 piDst[x ] = xClipC ((iSum + 32) >> 6 ); 1097 1099 piSrcTmp++; 1098 1100 } … … 1110 1112 { 1111 1113 iSum = xCTI_Filter_VP04_C_OCT2( piSrcTmp, 1 ); 1112 piDst[x ] = ClipC ((iSum + 32) >> 6 );1114 piDst[x ] = xClipC ((iSum + 32) >> 6 ); 1113 1115 piSrcTmp++; 1114 1116 } … … 1126 1128 { 1127 1129 iSum = xCTI_Filter_VP04_C_OCT3( piSrcTmp, 1 ); 1128 piDst[x ] = ClipC ((iSum + 32) >> 6 );1130 piDst[x ] = xClipC ((iSum + 32) >> 6 ); 1129 1131 piSrcTmp++; 1130 1132 } … … 1142 1144 { 1143 1145 iSum = xCTI_Filter_VPS04_C_HAL( piSrcTmp, 1 ); 1144 piDst[x ] = ClipC ((iSum + 32) >> 6 );1146 piDst[x ] = xClipC ((iSum + 32) >> 6 ); 1145 1147 piSrcTmp++; 1146 1148 } … … 1156 1158 } 1157 1159 1158 __inline Int TRenInterpFilter::xCTI_Filter_VP04_C_OCT0( Pel* pSrc, Int iStride ) 1160 template<UInt bitDepth> 1161 __inline Int TRenInterpFilter<bitDepth>::xCTI_Filter_VP04_C_OCT0( Pel* pSrc, Int iStride ) 1159 1162 {// { -3, 60, 8, -1,} // 1/8 1160 1163 Int iSum, iIdx = 0; … … 1168 1171 return iSum; 1169 1172 } 1170 __inline Int TRenInterpFilter::xCTI_Filter_VI04_C_OCT0( Int* pSrc, Int iStride ) 1173 template<UInt bitDepth> 1174 __inline Int TRenInterpFilter<bitDepth>::xCTI_Filter_VI04_C_OCT0( Int* pSrc, Int iStride ) 1171 1175 { // { -3, 60, 8, -1,} //1/8 1172 1176 Int iSum, iIdx = 0; … … 1180 1184 return iSum; 1181 1185 } 1182 __inline Int TRenInterpFilter::xCTI_Filter_VP04_C_QUA0( Pel* pSrc, Int iStride ) 1186 template<UInt bitDepth> 1187 __inline Int TRenInterpFilter<bitDepth>::xCTI_Filter_VP04_C_QUA0( Pel* pSrc, Int iStride ) 1183 1188 {// { -4, 54, 16, -2,} // 1/4 1184 1189 Int iSum, iIdx = 0; … … 1192 1197 return iSum; 1193 1198 } 1194 __inline Int TRenInterpFilter::xCTI_Filter_VI04_C_QUA0( Int* pSrc, Int iStride ) 1199 1200 template<UInt bitDepth> 1201 __inline Int TRenInterpFilter<bitDepth>::xCTI_Filter_VI04_C_QUA0( Int* pSrc, Int iStride ) 1195 1202 { // { -4, 54, 16, -2,} //1/4 1196 1203 Int iSum, iIdx = 0; … … 1204 1211 return iSum; 1205 1212 } 1206 __inline Int TRenInterpFilter::xCTI_Filter_VP04_C_QUA1( Pel* pSrc, Int iStride ) 1213 template<UInt bitDepth> 1214 __inline Int TRenInterpFilter<bitDepth>::xCTI_Filter_VP04_C_QUA1( Pel* pSrc, Int iStride ) 1207 1215 {// { -2, 16, 54, -4,}// 3/4 1208 1216 Int iSum, iIdx = 0; … … 1216 1224 return iSum; 1217 1225 } 1218 __inline Int TRenInterpFilter::xCTI_Filter_VI04_C_QUA1( Int* pSrc, Int iStride ) 1226 1227 template<UInt bitDepth> 1228 __inline Int TRenInterpFilter<bitDepth>::xCTI_Filter_VI04_C_QUA1( Int* pSrc, Int iStride ) 1219 1229 {// { -2, 16, 54, -4,}// 3/4 1220 1230 Int iSum, iIdx = 0; … … 1228 1238 return iSum; 1229 1239 } 1230 __inline Int TRenInterpFilter::xCTI_Filter_VP04_C_OCT1( Pel* pSrc, Int iStride ) 1240 1241 template<UInt bitDepth> 1242 __inline Int TRenInterpFilter<bitDepth>::xCTI_Filter_VP04_C_OCT1( Pel* pSrc, Int iStride ) 1231 1243 {// { -5, 46, 27, -4,} // 3/8 1232 1244 Int iSum, iIdx = 0; … … 1241 1253 return iSum; 1242 1254 } 1243 __inline Int TRenInterpFilter::xCTI_Filter_VI04_C_OCT1( Int* pSrc, Int iStride ) 1255 1256 template<UInt bitDepth> 1257 __inline Int TRenInterpFilter<bitDepth>::xCTI_Filter_VI04_C_OCT1( Int* pSrc, Int iStride ) 1244 1258 { // { -5, 46, 27, -4,} //3/8 1245 1259 Int iSum, iIdx = 0; … … 1254 1268 return iSum; 1255 1269 } 1256 __inline Int TRenInterpFilter::xCTI_Filter_VPS04_C_HAL( Pel* pSrc, Int iStride ) 1270 1271 template<UInt bitDepth> 1272 __inline Int TRenInterpFilter<bitDepth>::xCTI_Filter_VPS04_C_HAL( Pel* pSrc, Int iStride ) 1257 1273 { 1258 1274 // { -4, 36, 36, -4,}, // 1/2 … … 1265 1281 return iSum; 1266 1282 } 1267 __inline Int TRenInterpFilter::xCTI_Filter_VIS04_C_HAL( Int* pSrc, Int iStride ) 1283 1284 template<UInt bitDepth> 1285 __inline Int TRenInterpFilter<bitDepth>::xCTI_Filter_VIS04_C_HAL( Int* pSrc, Int iStride ) 1268 1286 { 1269 1287 // { -4, 36, 36, -4,}, //1/2 … … 1276 1294 return iSum; 1277 1295 } 1278 __inline Int TRenInterpFilter::xCTI_Filter_VP04_C_OCT2( Pel* pSrc, Int iStride ) 1296 1297 template<UInt bitDepth> 1298 __inline Int TRenInterpFilter<bitDepth>::xCTI_Filter_VP04_C_OCT2( Pel* pSrc, Int iStride ) 1279 1299 {// { -4, 27, 46, -5,}, // 5/8 1280 1300 Int iSum, iIdx = 0; … … 1289 1309 return iSum; 1290 1310 } 1291 __inline Int TRenInterpFilter::xCTI_Filter_VI04_C_OCT2( Int* pSrc, Int iStride ) 1311 1312 template<UInt bitDepth> 1313 __inline Int TRenInterpFilter<bitDepth>::xCTI_Filter_VI04_C_OCT2( Int* pSrc, Int iStride ) 1292 1314 { // { -4, 27, 46, -5,}, // 5/8 1293 1315 Int iSum, iIdx = 0; … … 1302 1324 return iSum; 1303 1325 } 1304 __inline Int TRenInterpFilter::xCTI_Filter_VP04_C_OCT3( Pel* pSrc, Int iStride ) 1326 1327 template<UInt bitDepth> 1328 __inline Int TRenInterpFilter<bitDepth>::xCTI_Filter_VP04_C_OCT3( Pel* pSrc, Int iStride ) 1305 1329 {// { -1, 8, 60, -3,} // 7/8 1306 1330 Int iSum, iIdx = 0; … … 1314 1338 return iSum; 1315 1339 } 1316 __inline Int TRenInterpFilter::xCTI_Filter_VI04_C_OCT3( Int* pSrc, Int iStride ) 1340 1341 template<UInt bitDepth> 1342 __inline Int TRenInterpFilter<bitDepth>::xCTI_Filter_VI04_C_OCT3( Int* pSrc, Int iStride ) 1317 1343 { // { -1, 8, 60, -3,} // 7/8 1318 1344 Int iSum, iIdx = 0; … … 1326 1352 return iSum; 1327 1353 } 1328 #endif // H_3D 1354 1355 #endif // NH_3D 1329 1356 #endif // __TRENINTERP__
Note: See TracChangeset for help on using the changeset viewer.