Changeset 5 in 3DVCSoftware for trunk/source/Lib/TLibRenderer/TRenSingleModel.cpp
- Timestamp:
- 12 Dec 2011, 18:35:44 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/Lib/TLibRenderer/TRenSingleModel.cpp
r2 r5 1 /* The copyright in this software is being made available under the BSD 2 * License, included below. This software may be subject to other third party 3 * and contributor rights, including patent rights, and no such rights are 4 * granted under this license. 5 * 6 * Copyright (c) 2010-2011, ISO/IEC 7 * All rights reserved. 8 * 9 * Redistribution and use in source and binary forms, with or without 10 * modification, are permitted provided that the following conditions are met: 11 * 12 * * Redistributions of source code must retain the above copyright notice, 13 * this list of conditions and the following disclaimer. 14 * * Redistributions in binary form must reproduce the above copyright notice, 15 * this list of conditions and the following disclaimer in the documentation 16 * and/or other materials provided with the distribution. 17 * * Neither the name of the ISO/IEC nor the names of its contributors may 18 * be used to endorse or promote products derived from this software without 19 * specific prior written permission. 20 * 21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS 25 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 31 * THE POSSIBILITY OF SUCH DAMAGE. 32 */ 33 1 34 2 35 #include "TRenImage.h" … … 451 484 if ( iCurSPos < iMinChangedSPos ) 452 485 { 453 #if GERHARD_RM_HOLE_EXT454 if ( (iCurSPos > 0) && (m_apiFilledRow[m_iCurViewPos][ iCurSPos-1 ] != REN_IS_FILLED) || (iCurSPos > 1) && (m_apiFilledRow[m_iCurViewPos][ iCurSPos-2 ] != REN_IS_FILLED) )455 {456 iMinChangedSPos = iMinChangedSPos - m_iHoleMargin - 2;457 }458 else459 {460 486 break; 461 487 } 462 #else 463 break; 464 #endif 465 } 488 466 489 iCurPosX--; 467 490 iLastSPos = iCurSPos; … … 554 577 if ( iCurSPos > iMaxChangedSPos ) 555 578 { 556 #if GERHARD_RM_HOLE_EXT557 if ( (iCurSPos > 0) && (m_apiFilledRow[m_iCurViewPos][ iCurSPos-1 ] != REN_IS_FILLED) || (iCurSPos > 1) && (m_apiFilledRow[m_iCurViewPos][ iCurSPos-2 ] != REN_IS_FILLED) )558 {559 iMaxChangedSPos = iMaxChangedSPos - m_iHoleMargin - 2;560 }561 else562 {563 579 break; 564 580 } 565 #else566 break;567 #endif568 }569 581 iCurPosX++; 570 582 iLastSPos = iCurSPos; … … 584 596 Int iCurPosX = iEndChangePos; 585 597 586 #if GERHARD_RM_HOLE_EXT587 Int iEndFillSPos = iLastSPos + m_iHoleMargin;588 while ( (iCurPosX + 1 < m_iWidth) && ( xShift(iCurPosX + 1) <= iEndFillSPos) && !(m_apbOccludedRow[m_iCurViewPos][ iCurPosX + 1] ) )589 iCurPosX++;590 #endif591 592 598 if ( ( iCurPosX + 1 < m_iWidth ) && (m_apbOccludedRow[m_iCurViewPos][ iCurPosX + 1] ) ) 593 599 { … … 615 621 616 622 m_bInOcclusion = iLastSPos >= m_iLastOccludedSPos; 617 618 #if GERHARD_RM_HOLE_EXT619 // RE-RENDER if not filled620 if ( ( ( ( iLastSPos < m_iLastOccludedSPos) && ( m_apiFilledRow[m_iCurViewPos][ iLastSPos ] != REN_IS_FILLED ) )))621 {622 xRemoveHoleExtL(iLastSPos, iEndChangePos+1, iError );623 }624 #endif625 623 }; 626 624 … … 630 628 // GET MINIMAL OCCLUDED SAMPLE POSITION 631 629 Int iCurPosX = iStartChangePos; 632 633 #if GERHARD_RM_HOLE_EXT634 Int iEndFillSPos = iLastSPos + m_iHoleMargin;635 while ( (iCurPosX + 1 < m_iWidth) && ( xShift(iCurPosX + 1) <= iEndFillSPos) && !(m_apbOccludedRow[m_iCurViewPos][ iCurPosX + 1] ) )636 iCurPosX++;637 #endif638 630 639 631 if ( ( iCurPosX - 1 > -1 ) && (m_apbOccludedRow[m_iCurViewPos][ iCurPosX - 1] ) ) … … 652 644 m_iLastOccludedSPos = xShift(iCurPosX) - 1; 653 645 } 654 #if GERHARD_RM_SPLAT655 646 m_iLastOccludedSPosFP = xRoundR( m_iLastOccludedSPos ); 656 #else657 m_iLastOccludedSPosFP = xRangeLeftR( m_iLastOccludedSPos );658 #endif659 647 } 660 648 else … … 665 653 666 654 m_bInOcclusion = iLastSPos <= m_iLastOccludedSPos; 667 668 #if GERHARD_RM_HOLE_EXT669 // RE-RENDER if not filled670 if ( ( ( ( iLastSPos < m_iLastOccludedSPos) && ( m_apiFilledRow[m_iCurViewPos][ iLastSPos ] != REN_IS_FILLED ) )))671 {672 xRemoveHoleExtL(iLastSPos, iStartChangePos+1, iError );673 }674 #endif675 655 }; 676 656 … … 752 732 { 753 733 m_iLastOccludedSPos = iLastSPos; 754 #if GERHARD_RM_SPLAT 734 755 735 Int iRightSPosFP = xRoundL( iLastSPos ); 756 736 if ( ( iRightSPosFP == xRangeRightL(iLastSPos)) && (iRightSPosFP >= 0) ) … … 760 740 } 761 741 m_iLastOccludedSPosFP = iRightSPosFP; 762 #else763 m_iLastOccludedSPosFP = xRangeLeftL( m_iLastOccludedSPos );764 #endif765 742 766 743 m_bInOcclusion = true; … … 813 790 m_iLastOccludedSPos = iLastSPos; 814 791 815 #if GERHARD_RM_SPLAT816 792 Int iLeftSPosFP = xRoundR( iLastSPos ); 817 793 if ( ( iLeftSPosFP == xRangeLeftR(iLastSPos)) && (iLeftSPosFP <= m_iWidth - 1) ) … … 821 797 } 822 798 m_iLastOccludedSPosFP = iLeftSPosFP; 823 #endif824 799 825 800 m_bInOcclusion = true; … … 862 837 } 863 838 864 865 866 839 __inline Void 867 840 TRenSingleModel::xFillHoleL( Int iCurSPos, Int iLastSPos, Int iCurPos, RMDist& riError ) … … 874 847 Int iLastPos = iCurPos + 1; 875 848 876 #if GERHARD_RM_HOLE_EXT877 Int iErrorCorrection = 0;878 Int iLastPosInNewData = iLastPos - m_iStartChangePosX;879 Int iEndFillSPos = iLastSPos + m_iHoleMargin;880 ////////// Go back hole margin width and correct error ///////881 while( ( (iLastPos+1) < m_iWidth) && (iLastSPos > iEndFillSPos) )882 {883 iCurPos++;884 iLastPos++;885 iLastPosInNewData++;886 iCurSPos = iLastSPos;887 888 iLastSPos = xShift( iLastPos, iLastPosInNewData);889 890 if ( iLastSPos < 0 ) iLastSPos = 0;891 if ( iLastSPos >= m_iWidth ) iLastSPos = m_iWidth-1;892 893 Int iDiff = iLastSPos - iCurSPos;894 895 // Stop if other hole begins, or if position is occluded896 if (iDiff > 2 || iLastSPos >= Min( iEndFillSPos, m_iLastOccludedSPos ) || iCurSPos == 0)897 {898 iCurPos--;899 iLastPos--;900 iLastPosInNewData--;901 iLastSPos = iCurSPos;902 iCurSPos = xShift( iCurPos, iLastPosInNewData-1);903 break;904 }905 906 if ( !m_bSet )907 {908 xRenderShiftedRangeL(iCurSPos, iLastSPos, iCurPos, iLastPos, iErrorCorrection );909 }910 }911 912 riError -= iErrorCorrection;913 914 ////////// Fill enlarged hole ///////915 #endif916 917 849 Int iStartFillSPosFP = xRangeLeftL(iStartFillSPos); 918 850 919 #if GERHARD_RM_SPLAT920 851 if (iStartFillSPosFP == xRoundL(iStartFillSPos)) 921 852 { 922 #endif923 853 if ((iStartFillSPosFP >= 0) && (iStartFillSPosFP < m_iLastOccludedSPosFP) ) 924 854 { … … 926 856 xSetShiftedPel ( iStartFillPos << m_iShiftPrec, iStartFillSPosFP, REN_IS_FILLED, riError ); 927 857 } 928 #if GERHARD_RM_SPLAT929 858 } 930 859 else … … 932 861 iStartFillSPosFP--; 933 862 } 934 #endif935 863 936 864 m_iThisDepth = m_iLastDepth; … … 951 879 Int iLastPos = iCurPos - 1; 952 880 953 954 #if GERHARD_RM_HOLE_EXT955 Int iErrorCorrection = 0;956 Int iLPosInNewData = iLastPos - m_iStartChangePosX;957 Int iEndFillSPos = iLastSPos + m_iHoleMargin;958 ////////// Go back hole margin width and correct error ///////959 while( ( (iLastPos+1) < m_iWidth) && (iLastSPos > iEndFillSPos) )960 {961 iCurPos++;962 iLastPos++;963 iLPosInNewData++;964 iCurSPos = iLastSPos;965 966 iLastSPos = xShift( iLastPos, iLPosInNewData);967 968 if ( iLastSPos < 0 ) iLastSPos = 0;969 if ( iLastSPos >= m_iWidth ) iLastSPos = m_iWidth-1;970 971 Int iDiff = iLastSPos - iCurSPos;972 973 // Stop if other hole begins, or if position is occluded974 if (iDiff > 2 || iLastSPos >= Min( iEndFillSPos, m_iLastOccludedSPos ) || iCurSPos == 0)975 {976 iCurPos--;977 iLastPos--;978 iLPosInNewData--;979 iLastSPos = iCurSPos;980 iCurSPos = xShift( iCurPos, iLPosInNewData-1);981 break;982 }983 984 if ( !m_bSet )985 {986 xRenderShiftedRangeL(iCurSPos, iLastSPos, iCurPos, iLastPos, iErrorCorrection );987 }988 }989 990 riError -= iErrorCorrection;991 992 ////////// Fill enlarged hole ///////993 #endif994 995 881 Int iStartFillSPosFP = xRangeRightR(iStartFillSPos); 996 882 997 #if GERHARD_RM_SPLAT998 883 if (iStartFillSPosFP == xRoundR(iStartFillSPos)) 999 884 { 1000 #endif1001 885 if ((iStartFillSPosFP < m_iWidth) && (iStartFillSPosFP > m_iLastOccludedSPosFP) ) 1002 886 { … … 1004 888 xSetShiftedPel( iEndFillPos << m_iShiftPrec, iStartFillSPosFP, REN_IS_FILLED, riError ); 1005 889 } 1006 #if GERHARD_RM_SPLAT1007 890 } 1008 891 else … … 1010 893 iStartFillSPosFP++; 1011 894 } 1012 #endif1013 895 1014 896 m_iThisDepth = m_iLastDepth; … … 1018 900 } 1019 901 } 1020 1021 #if GERHARD_RM_HOLE_EXT1022 Void TRenSingleModel::xRemoveHoleExtL( Int iShiftedLeftPos, Int iLeftPos, Int& riError )1023 {1024 if (iShiftedLeftPos < 0 || iShiftedLeftPos == (m_iWidth - 1) )1025 return;1026 1027 Int iStartRemovePos = iLeftPos;1028 Int iEndRemoveSPos = iShiftedLeftPos + m_iHoleMargin;1029 Int iRightPos = iLeftPos + 1;1030 1031 Int iShiftedRightPos;1032 1033 ////////// Go back hole margin width ///////1034 while( iRightPos < m_iWidth )1035 {1036 iShiftedRightPos = xShift(iRightPos);1037 1038 if ( iShiftedRightPos < 0 ) iShiftedRightPos = 0;1039 if ( iShiftedRightPos >= m_iWidth ) iShiftedRightPos = m_iWidth-1;1040 1041 Int iDiff = iShiftedRightPos - iShiftedLeftPos;1042 1043 // Stop if other hole begins, or if position is occluded1044 if ( iDiff > 2 || iShiftedRightPos >= m_iLastOccludedSPos )1045 {1046 // Go back one1047 iShiftedRightPos = iShiftedLeftPos;1048 iRightPos--;1049 iLeftPos--;1050 iShiftedLeftPos = xShift(iLeftPos);1051 break;1052 }1053 1054 if ( (iShiftedRightPos > iEndRemoveSPos) )1055 {1056 break;1057 }1058 1059 iShiftedLeftPos = iShiftedRightPos;1060 iLeftPos++;1061 iRightPos++;1062 }1063 1064 ////////// Remove Hole margin ///////1065 while( iLeftPos >= iStartRemovePos )1066 {1067 xRenderShiftedRangeL(iShiftedLeftPos, iShiftedRightPos, iLeftPos, iRightPos, riError );1068 iLeftPos--;1069 iRightPos--;1070 iShiftedRightPos = iShiftedLeftPos;1071 iShiftedLeftPos = xShift(iLeftPos);1072 }1073 }1074 #endif1075 902 1076 903 __inline Void … … 1266 1093 { 1267 1094 m_aapiSynthVideoPelRow[m_iCurViewPos][0][iTargetSPos] = m_aapiBaseVideoPelRow[m_iCurViewPos][0][iSourcePos]; 1268 #if GERHARD_RM_COLOR_PLANES1095 #if HHI_VSO_COLOR_PLANES 1269 1096 m_aapiSynthVideoPelRow[m_iCurViewPos][1][iTargetSPos] = m_aapiBaseVideoPelRow[m_iCurViewPos][1][iSourcePos]; 1270 1097 m_aapiSynthVideoPelRow[m_iCurViewPos][2][iTargetSPos] = m_aapiBaseVideoPelRow[m_iCurViewPos][2][iSourcePos]; … … 1272 1099 m_apiFilledRow [m_iCurViewPos] [iTargetSPos] = iFilled; 1273 1100 Int iDiffY = m_aapiRefVideoPelRow [0][iTargetSPos] - m_aapiSynthVideoPelRow[m_iCurViewPos][0][iTargetSPos]; 1274 #if GERHARD_RM_COLOR_PLANES1101 #if HHI_VSO_COLOR_PLANES 1275 1102 Int iDiffU = m_aapiRefVideoPelRow [1][iTargetSPos] - m_aapiSynthVideoPelRow[m_iCurViewPos][1][iTargetSPos]; 1276 1103 Int iDiffV = m_aapiRefVideoPelRow [2][iTargetSPos] - m_aapiSynthVideoPelRow[m_iCurViewPos][2][iTargetSPos]; … … 1284 1111 Int iSDOld = m_apiErrorRow [iTargetSPos]; 1285 1112 Int iDiffY = m_aapiRefVideoPelRow [0][iTargetSPos] - m_aapiBaseVideoPelRow [m_iCurViewPos][0][iSourcePos]; 1286 #if GERHARD_RM_COLOR_PLANES1113 #if HHI_VSO_COLOR_PLANES 1287 1114 Int iDiffU = m_aapiRefVideoPelRow [1][iTargetSPos] - m_aapiBaseVideoPelRow [m_iCurViewPos][1][iSourcePos]; 1288 1115 Int iDiffV = m_aapiRefVideoPelRow [2][iTargetSPos] - m_aapiBaseVideoPelRow [m_iCurViewPos][2][iSourcePos]; … … 1305 1132 1306 1133 Pel piBlendedValueY; 1307 #if GERHARD_RM_COLOR_PLANES1134 #if HHI_VSO_COLOR_PLANES 1308 1135 Pel piBlendedValueU; 1309 1136 Pel piBlendedValueV; … … 1316 1143 m_aapiBaseVideoPelRow [0][0][iSourcePos ] , 1317 1144 m_aapiSynthVideoPelRow [1][0][iTargetSPos] , 1318 #if GERHARD_RM_COLOR_PLANES1145 #if HHI_VSO_COLOR_PLANES 1319 1146 m_aapiBaseVideoPelRow [0][1][iSourcePos ] , 1320 1147 m_aapiSynthVideoPelRow [1][1][iTargetSPos] , … … 1327 1154 m_apiFilledRow [1] [iTargetSPos] , 1328 1155 piBlendedValueY 1329 #if GERHARD_RM_COLOR_PLANES1156 #if HHI_VSO_COLOR_PLANES 1330 1157 , piBlendedValueU, 1331 1158 piBlendedValueV … … 1338 1165 m_aapiSynthVideoPelRow [0][0][iTargetSPos], 1339 1166 m_aapiBaseVideoPelRow [1][0][iSourcePos ], 1340 #if GERHARD_RM_COLOR_PLANES1167 #if HHI_VSO_COLOR_PLANES 1341 1168 m_aapiSynthVideoPelRow [0][1][iTargetSPos], 1342 1169 m_aapiBaseVideoPelRow [1][1][iSourcePos ], … … 1349 1176 iFilled , 1350 1177 piBlendedValueY 1351 #if GERHARD_RM_COLOR_PLANES1178 #if HHI_VSO_COLOR_PLANES 1352 1179 , piBlendedValueU, 1353 1180 piBlendedValueV … … 1361 1188 m_aapiSynthVideoPelRow[m_iCurViewPos][0][iTargetSPos] = m_aapiBaseVideoPelRow[m_iCurViewPos][0][iSourcePos]; 1362 1189 m_aapiSynthVideoPelRow[2 ][0][iTargetSPos] = piBlendedValueY; 1363 #if GERHARD_RM_COLOR_PLANES1190 #if HHI_VSO_COLOR_PLANES 1364 1191 m_aapiSynthVideoPelRow[m_iCurViewPos][1][iTargetSPos] = m_aapiBaseVideoPelRow[m_iCurViewPos][1][iSourcePos]; 1365 1192 m_aapiSynthVideoPelRow[2 ][1][iTargetSPos] = piBlendedValueU; … … 1370 1197 1371 1198 Int iDiffY = m_aapiRefVideoPelRow [0][iTargetSPos] - piBlendedValueY; 1372 #if GERHARD_RM_COLOR_PLANES1199 #if HHI_VSO_COLOR_PLANES 1373 1200 Int iDiffU = m_aapiRefVideoPelRow [1][iTargetSPos] - piBlendedValueU; 1374 1201 Int iDiffV = m_aapiRefVideoPelRow [2][iTargetSPos] - piBlendedValueV; … … 1382 1209 Int iSDOld = m_apiErrorRow [iTargetSPos]; 1383 1210 Int iDiffY = m_aapiRefVideoPelRow [0][iTargetSPos] - piBlendedValueY; 1384 #if GERHARD_RM_COLOR_PLANES1211 #if HHI_VSO_COLOR_PLANES 1385 1212 Int iDiffU = m_aapiRefVideoPelRow [1][iTargetSPos] - piBlendedValueU; 1386 1213 Int iDiffV = m_aapiRefVideoPelRow [2][iTargetSPos] - piBlendedValueV; … … 1411 1238 } 1412 1239 1413 #if GERHARD_RM_COLOR_PLANES1240 #if HHI_VSO_COLOR_PLANES 1414 1241 __inline Void 1415 1242 TRenSingleModel::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 ) … … 1423 1250 if (m_iBlendMode == 1 ) 1424 1251 { 1252 #if HHI_VSO_COLOR_PLANES 1425 1253 xGetBlendedValueBM1( iYL, iYR, iUL, iUR, iVL, iVR, iDepthL, iDepthR, iFilledL, iFilledR, riY, riU, riV ); 1254 #else 1255 xGetBlendedValueBM1( iYL, iYR, iDepthL, iDepthR, iFilledL, iFilledR, riY ); 1256 #endif 1426 1257 } 1427 1258 else 1428 1259 { 1260 #if HHI_VSO_COLOR_PLANES 1429 1261 xGetBlendedValueBM2( iYL, iYR, iUL, iUR, iVL, iVR, iDepthL, iDepthR, iFilledL, iFilledR, riY, riU, riV ); 1262 #else 1263 xGetBlendedValueBM2( iYL, iYR, iDepthL, iDepthR, iFilledL, iFilledR, riY ); 1264 #endif 1430 1265 } 1431 1266 return; … … 1441 1276 { 1442 1277 riY = xBlend( iYL, iYR, iFilledR >> 1 ); 1443 #if GERHARD_RM_COLOR_PLANES1278 #if HHI_VSO_COLOR_PLANES 1444 1279 riU = xBlend( iUL, iUR, iFilledR >> 1 ); 1445 1280 riV = xBlend( iVL, iVR, iFilledR >> 1 ); … … 1450 1285 { 1451 1286 riY = xBlend( iYR, iYL, (iFilledL >> 1) ); 1452 #if GERHARD_RM_COLOR_PLANES1287 #if HHI_VSO_COLOR_PLANES 1453 1288 riU = xBlend( iUR, iUL, (iFilledL >> 1) ); 1454 1289 riV = xBlend( iVR, iVL, (iFilledL >> 1) ); … … 1458 1293 { 1459 1294 riY = xBlend( iYR, iYL, m_iBlendDistWeight ); 1460 #if GERHARD_RM_COLOR_PLANES1295 #if HHI_VSO_COLOR_PLANES 1461 1296 riU = xBlend( iUR, iUL, m_iBlendDistWeight ); 1462 1297 riV = xBlend( iVR, iVL, m_iBlendDistWeight ); … … 1467 1302 { 1468 1303 riY = iYL; 1469 #if GERHARD_RM_COLOR_PLANES1304 #if HHI_VSO_COLOR_PLANES 1470 1305 riU = iUL; 1471 1306 riV = iVL; … … 1475 1310 { 1476 1311 riY = iYR; 1477 #if GERHARD_RM_COLOR_PLANES1312 #if HHI_VSO_COLOR_PLANES 1478 1313 riU = iUR; 1479 1314 riV = iVR; … … 1486 1321 { 1487 1322 riY = iYR; 1488 #if GERHARD_RM_COLOR_PLANES1323 #if HHI_VSO_COLOR_PLANES 1489 1324 riU = iUR; 1490 1325 riV = iVR; … … 1494 1329 { 1495 1330 riY = iYL; 1496 #if GERHARD_RM_COLOR_PLANES1331 #if HHI_VSO_COLOR_PLANES 1497 1332 riU = iUL; 1498 1333 riV = iVL; … … 1505 1340 { 1506 1341 riY = iYL; 1507 #if GERHARD_RM_COLOR_PLANES1342 #if HHI_VSO_COLOR_PLANES 1508 1343 riU = iUL; 1509 1344 riV = iVL; … … 1513 1348 { 1514 1349 riY = iYR; 1515 #if GERHARD_RM_COLOR_PLANES1350 #if HHI_VSO_COLOR_PLANES 1516 1351 riU = iUR; 1517 1352 riV = iVR; … … 1523 1358 1524 1359 __inline Void 1360 #if HHI_VSO_COLOR_PLANES 1525 1361 TRenSingleModel::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 ) 1362 #else 1363 TRenSingleModel::xGetBlendedValueBM1( Pel iYL, Pel iYR, Pel iDepthL, Pel iDepthR, Int iFilledL, Int iFilledR, Pel& riY ) 1364 #endif 1526 1365 { 1527 1366 if ( iFilledL == REN_IS_FILLED || iFilledR == REN_IS_HOLE ) 1528 1367 { 1529 1368 riY = iYL; 1530 #if GERHARD_RM_COLOR_PLANES1369 #if HHI_VSO_COLOR_PLANES 1531 1370 riU = iUL; 1532 1371 riV = iVL; … … 1536 1375 { 1537 1376 riY = iYR; 1538 #if GERHARD_RM_COLOR_PLANES1377 #if HHI_VSO_COLOR_PLANES 1539 1378 riU = iUR; 1540 1379 riV = iVR; … … 1544 1383 { 1545 1384 riY = xBlend( iYR, iYL, iFilledL ); 1546 #if GERHARD_RM_COLOR_PLANES1385 #if HHI_VSO_COLOR_PLANES 1547 1386 riU = xBlend( iUR, iUL, iFilledL ); 1548 1387 riV = xBlend( iVR, iUL, iFilledL ); … … 1552 1391 1553 1392 __inline Void 1393 #if HHI_VSO_COLOR_PLANES 1554 1394 TRenSingleModel::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 ) 1395 #else 1396 TRenSingleModel::xGetBlendedValueBM2( Pel iYL, Pel iYR, Pel iDepthL, Pel iDepthR, Int iFilledL, Int iFilledR, Pel& riY ) 1397 #endif 1555 1398 { 1556 1399 if ( iFilledR == REN_IS_FILLED || iFilledL == REN_IS_HOLE ) 1557 1400 { 1558 1401 riY = iYR; 1559 #if GERHARD_RM_COLOR_PLANES1402 #if HHI_VSO_COLOR_PLANES 1560 1403 riU = iUR; 1561 1404 riV = iVR; … … 1565 1408 { 1566 1409 riY = iYL; 1567 #if GERHARD_RM_COLOR_PLANES1410 #if HHI_VSO_COLOR_PLANES 1568 1411 riU = iUL; 1569 1412 riV = iVL; … … 1573 1416 { 1574 1417 riY = xBlend( iYL, iYR, iFilledR ); 1575 #if GERHARD_RM_COLOR_PLANES1418 #if HHI_VSO_COLOR_PLANES 1576 1419 riU = xBlend( iUL, iUR, iFilledR ); 1577 1420 riV = xBlend( iVL, iUR, iFilledR ); … … 1580 1423 } 1581 1424 1582 1583 1584 1425 __inline Pel 1585 1426 TRenSingleModel::xBlend( Pel pVal1, Pel pVal2, Int iWeightVal2 ) … … 1587 1428 return pVal1 + (Pel) ( ( (Int) ( pVal2 - pVal1) * iWeightVal2 + (1 << (REN_VDWEIGHT_PREC - 1)) ) >> REN_VDWEIGHT_PREC ); 1588 1429 } 1589 1590 #if GERHARD_RM_DEBUG_MM1591 Bool1592 TRenSingleModel::compare( TRenSingleModel* pcRefModel )1593 {1594 Bool bNoDirectStop = true;1595 Bool bEqual = true;1596 1597 for (Int iBaseView = 0; iBaseView < 2; iBaseView++ )1598 {1599 for (Int iPosY = 0; iPosY < m_iHeight; iPosY++ ) //GT: change to 1 !!! for small tests1600 {1601 for (Int iPosX = 0; iPosX < m_iWidth; iPosX++ )1602 {1603 if (( iBaseView == m_iMode ) || ( m_iMode == 2 ))1604 {1605 // MEV_RF( "imswitch", &mxAW(m_iWidth, m_iHeight, m_aiBaseDepthStrides[iBaseView], m_apiBaseDepthPel [iBaseView] ), &mxAW(m_iWidth, m_iHeight, pcRefModel->m_aiBaseDepthStrides[iBaseView], pcRefModel->m_apiBaseDepthPel [iBaseView] ), &mxAW("u" ), 0);1606 bEqual = bEqual && ( m_apiBaseDepthPel [iBaseView] [iPosX+iPosY* m_aiBaseDepthStrides[iBaseView]] == pcRefModel->m_apiBaseDepthPel [iBaseView] [iPosX+iPosY* pcRefModel->m_aiBaseDepthStrides[iBaseView] ] );AOF( bNoDirectStop || bEqual );1607 bEqual = bEqual && ( m_apiFilled [iBaseView] [iPosX+iPosY* m_iStride] == pcRefModel->m_apiFilled [iBaseView] [iPosX+iPosY* m_iStride] ); AOF( bNoDirectStop || bEqual );1608 bEqual = bEqual && ( m_piError [iPosX+iPosY* m_iStride] == pcRefModel->m_piError [iPosX+iPosY* m_iStride] ); AOF( bNoDirectStop || bEqual );1609 bEqual = bEqual && ( m_apbOccluded [iBaseView] [iPosX+iPosY* m_iStride] == pcRefModel->m_apbOccluded [iBaseView] [iPosX+iPosY* m_iStride] ); AOF( bNoDirectStop || bEqual );1610 bEqual = bEqual && ( m_aapiSynthVideoPel[iBaseView][0][iPosX+iPosY* m_iStride] == pcRefModel->m_aapiSynthVideoPel[iBaseView][0][iPosX+iPosY* m_iStride] ); AOF( bNoDirectStop || bEqual );1611 bEqual = bEqual && ( m_aapiSynthVideoPel[iBaseView][0][iPosX+iPosY* m_iStride] >= 0 ); AOF( bNoDirectStop || bEqual );1612 bEqual = bEqual && ( m_aapiSynthVideoPel[iBaseView][0][iPosX+iPosY* m_iStride] <= g_uiIBDI_MAX ); AOF( bNoDirectStop || bEqual );1613 if (m_iMode == 2 )1614 {1615 bEqual = bEqual && ( m_apiSynthDepthPel [iBaseView] [iPosX+iPosY* m_iStride] == pcRefModel->m_apiSynthDepthPel [iBaseView] [iPosX+iPosY* m_iStride] ); AOF( bNoDirectStop || bEqual );1616 }1617 //if (!bEqual)1618 //{1619 // std::cout << "Mismatch in PosX: " << iPosX << " PosY: " << iPosY << std::endl;1620 // AOF(false);1621 // exit(55);1622 //}1623 }1624 }1625 }1626 }1627 return bEqual;1628 }1629 1630 #endif
Note: See TracChangeset for help on using the changeset viewer.