Changeset 112 in 3DVCSoftware for branches/HTM-4.0-Orange/source/Lib/TLibEncoder
- Timestamp:
- 30 Aug 2012, 09:18:03 (12 years ago)
- Location:
- branches/HTM-4.0-Orange/source/Lib/TLibEncoder
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-4.0-Orange/source/Lib/TLibEncoder/TEncCfg.h
r110 r112 318 318 #endif 319 319 320 #if OL_DEPTHLIMIT 321 Bool m_bDepthPartitionLimiting; 322 #endif 323 320 324 Int m_iViewOrderIdx; 321 325 … … 817 821 #endif 818 822 823 #if OL_DEPTHLIMIT 824 Void setUseDPL(Bool b) {m_bDepthPartitionLimiting = b; } 825 Bool getUseDPL() {return m_bDepthPartitionLimiting;} 826 #endif 827 819 828 Void setViewOrderIdx ( Int i ) { m_iViewOrderIdx = i; } 820 829 Void setCamParPrecision ( UInt u ) { m_uiCamParPrecision = u; } -
branches/HTM-4.0-Orange/source/Lib/TLibEncoder/TEncCu.cpp
r100 r112 451 451 TComPic* pcPic = rpcBestCU->getPic(); 452 452 453 #if OL_DEPTHLIMIT 454 TComSPS *sps = pcPic->getSlice(0)->getSPS(); 455 TComPic *pcTexture; 456 TComDataCU *pcTextureCU; 457 static UInt* texPartInfo; 458 static UInt uiTexPartIndex; 459 static Bool depthMapDetect = false; 460 UInt uiPrevTexPartIndex; //kat debug 461 #if OL_DO_NOT_LIMIT_INTRA_SLICES_PART 462 static Bool bIntraSliceDetect = false; 463 #endif 464 Bool bTry2NxN = false; 465 Bool bTryNx2N = false; 466 if(uiDepth == 0) 467 { 468 pcTexture = rpcBestCU->getSlice()->getTexturePic(); 469 if(pcTexture != NULL) //depth map being encoded 470 { 471 #if OL_DO_NOT_LIMIT_INTRA_SLICES_PART 472 bIntraSliceDetect = (rpcBestCU->getSlice()->getSliceType()==I_SLICE); 473 #endif 474 pcTextureCU = pcTexture->getCU( rpcBestCU->getAddr() ); 475 texPartInfo = pcTextureCU -> readPartInfo(); 476 uiTexPartIndex = 0; 477 depthMapDetect = true; 478 } 479 else 480 { 481 depthMapDetect = false; 482 } 483 } 484 #endif 453 485 // get Original YUV data from picture 454 486 m_ppcOrigYuv[uiDepth]->copyFromPicYuv( pcPic->getPicYuvOrg(), rpcBestCU->getAddr(), rpcBestCU->getZorderIdxInCU() ); … … 592 624 593 625 rpcTempCU->initEstData( uiDepth, iQP ); 626 627 #if OL_DEPTHLIMIT 628 //logic for setting bTrySplit using the partition information that is stored of the texture colocated CU 629 #if OL_DO_NOT_LIMIT_INTRA_SLICES_PART 630 if(depthMapDetect && !bIntraSliceDetect && sps->getUseDPL()) 631 #else 632 if(depthMapDetect && sps->getUseDPL()) //depth map being encoded 633 #endif 634 { 635 assert(uiDepth == (UInt)texPartInfo[uiTexPartIndex+1]); 636 if((UInt)texPartInfo[uiTexPartIndex+0] == 1) //NxN modes 637 { 638 bTrySplit = true; 639 bTryNx2N = true; 640 bTry2NxN = true; 641 uiPrevTexPartIndex = uiTexPartIndex; //kat debug 642 uiTexPartIndex += 2; 643 } 644 else if((UInt)texPartInfo[uiTexPartIndex+0] == 0) //2Nx2N modes 645 { 646 UInt uiTexdepth; 647 UInt temp_uiTexPartIndex; 648 bTrySplit = false; 649 //scan ahead till next depth 650 uiTexdepth = (UInt)texPartInfo[uiTexPartIndex+1]; 651 uiPrevTexPartIndex = uiTexPartIndex; //kat debug 652 uiTexPartIndex+=2; 653 temp_uiTexPartIndex = uiTexPartIndex; //store in case to rewind 654 //temp_uiTexPartIndex+=2; 655 while(uiTexdepth != (UInt)texPartInfo[uiTexPartIndex+1] && uiTexdepth != 0) 656 { 657 if((UInt)texPartInfo[uiTexPartIndex+1] < uiTexdepth) 658 { 659 break; 660 } 661 uiTexPartIndex+=2; 662 663 if((UInt)texPartInfo[uiTexPartIndex+1] == OL_END_CU) 664 { 665 uiTexPartIndex = temp_uiTexPartIndex; 666 uiTexdepth++; 667 if(uiTexdepth >= g_uiMaxCUDepth) 668 { 669 //uiTexPartIndex-=2; 670 break; 671 } 672 } 673 } 674 } 675 else if((UInt)texPartInfo[uiTexPartIndex+0] == OL_END_CU) 676 { 677 bTrySplit = false; 678 bTryNx2N = false; 679 bTry2NxN = false; 680 } 681 else if((UInt)texPartInfo[uiTexPartIndex+0] == 2) //2NxN case 682 { 683 bTrySplit = false; 684 bTryNx2N = false; 685 bTry2NxN = true; 686 uiPrevTexPartIndex = uiTexPartIndex; //kat debug 687 uiTexPartIndex += 2; 688 } 689 else if((UInt)texPartInfo[uiTexPartIndex+0] == 3) //Nx2N case 690 { 691 bTrySplit = false; 692 bTryNx2N = true; 693 bTry2NxN = false; 694 uiPrevTexPartIndex = uiTexPartIndex; //kat debug 695 uiTexPartIndex += 2; 696 } 697 } 698 #endif 699 594 700 595 701 // do inter modes, SKIP and 2Nx2N … … 660 766 } // != I_SLICE 661 767 768 #if OL_DEPTHLIMIT 769 #if OL_DO_NOT_LIMIT_INTRA_SLICES_PART 770 if(depthMapDetect && !bIntraSliceDetect && sps->getUseDPL()) 771 #else 772 if(depthMapDetect && sps->getUseDPL()) //depth map being encoded 773 #endif 774 { 775 bTrySplitDQP = bTrySplit; 776 } 777 else 778 { 779 if( (g_uiMaxCUWidth>>uiDepth) >= rpcTempCU->getSlice()->getPPS()->getMinCuDQPSize() ) 780 { 781 if(iQP == iBaseQP) 782 { 783 bTrySplitDQP = bTrySplit; 784 } 785 } 786 else 787 { 788 bTrySplitDQP = bTrySplit; 789 } 790 } 791 #else 662 792 663 793 if( (g_uiMaxCUWidth>>uiDepth) >= rpcTempCU->getSlice()->getPPS()->getMinCuDQPSize() ) … … 672 802 bTrySplitDQP = bTrySplit; 673 803 } 804 #endif 674 805 #if LOSSLESS_CODING 675 806 if (isAddLowestQP && (iQP == lowestQP)) … … 721 852 if( uiDepth == g_uiMaxCUDepth - g_uiAddCUDepth && doNotBlockPu) 722 853 { 854 #if OL_DEPTHLIMIT //add code here to select 2NxN or Nx2N or none 855 #if OL_DO_NOT_LIMIT_INTRA_SLICES_PART 856 if(depthMapDetect && !bIntraSliceDetect && sps->getUseDPL()) 857 #else 858 if(depthMapDetect && sps->getUseDPL()) //depth map being encoded 859 #endif 860 { 861 assert(uiDepth == (UInt)texPartInfo[uiPrevTexPartIndex+1]); 862 if (bTrySplit) 863 { 864 #endif 723 865 #if HHI_INTER_VIEW_RESIDUAL_PRED 724 866 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); … … 730 872 #endif 731 873 rpcTempCU->initEstData( uiDepth, iQP ); 732 } 874 #if OL_DEPTHLIMIT 875 }//bTrySplit 876 }//depthMapDetect 877 else//do things normally 878 { 879 #if HHI_INTER_VIEW_RESIDUAL_PRED 880 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 881 #endif 882 #if HHI_INTERVIEW_SKIP 883 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_NxN, bFullyRenderedSec ); 884 #else 885 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_NxN ); 886 #endif 887 rpcTempCU->initEstData( uiDepth, iQP ); 888 } 889 #endif 890 } 733 891 } 734 892 } 735 893 736 894 { // 2NxN, Nx2N 895 #if OL_DEPTHLIMIT //add code here to select 2NxN or Nx2N or none 896 #if OL_DO_NOT_LIMIT_INTRA_SLICES_PART 897 if(depthMapDetect && !bIntraSliceDetect && sps->getUseDPL()) 898 #else 899 if(depthMapDetect && sps->getUseDPL()) //depth map being encoded 900 #endif 901 { 902 assert(uiDepth == (UInt)texPartInfo[uiPrevTexPartIndex+1]); 903 if (bTryNx2N) 904 { 905 #endif 737 906 if(doNotBlockPu) 738 907 { … … 751 920 } 752 921 } 922 #if OL_DEPTHLIMIT 923 }//bTryNx2N 924 }//depthMapDetect 925 else//do things normally 926 { 927 if(doNotBlockPu) 928 { 929 #if HHI_INTER_VIEW_RESIDUAL_PRED 930 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 931 #endif 932 #if HHI_INTERVIEW_SKIP 933 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_Nx2N, bFullyRenderedSec ); 934 #else 935 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_Nx2N ); 936 #endif 937 rpcTempCU->initEstData( uiDepth, iQP ); 938 if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_Nx2N ) 939 { 940 doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0; 941 } 942 } 943 } 944 #endif 945 946 #if OL_DEPTHLIMIT //add code here to select 2NxN or Nx2N or none 947 #if OL_DO_NOT_LIMIT_INTRA_SLICES_PART 948 if(depthMapDetect && !bIntraSliceDetect && sps->getUseDPL()) 949 #else 950 if(depthMapDetect && sps->getUseDPL()) //depth map being encoded 951 #endif 952 { 953 assert(uiDepth == (UInt)texPartInfo[uiPrevTexPartIndex+1]); 954 if (bTry2NxN) 955 { 956 #endif 753 957 if(doNotBlockPu) 754 958 { … … 767 971 } 768 972 } 973 #if OL_DEPTHLIMIT 974 }//bTryNx2N 975 }//depthMapDetect 976 else//do things normally 977 { 978 if(doNotBlockPu) 979 { 980 #if HHI_INTER_VIEW_RESIDUAL_PRED 981 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 982 #endif 983 #if HHI_INTERVIEW_SKIP 984 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxN, bFullyRenderedSec ); 985 #else 986 xCheckRDCostInter ( rpcBestCU, rpcTempCU, SIZE_2NxN ); 987 #endif 988 rpcTempCU->initEstData( uiDepth, iQP ); 989 if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_2NxN) 990 { 991 doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0; 992 } 993 } 994 } 995 #endif 769 996 } 770 997 … … 787 1014 if ( bTestAMP_Hor ) 788 1015 { 1016 #if OL_DEPTHLIMIT //add code here to select 2NxN or Nx2N or none 1017 #if OL_DO_NOT_LIMIT_INTRA_SLICES_PART 1018 if(depthMapDetect && !bIntraSliceDetect && sps->getUseDPL()) 1019 #else 1020 if(depthMapDetect && sps->getUseDPL()) //depth map being encoded 1021 #endif 1022 { 1023 assert(uiDepth == (UInt)texPartInfo[uiPrevTexPartIndex+1]); 1024 if (bTry2NxN) 1025 { 1026 #endif 789 1027 if(doNotBlockPu) 790 1028 { … … 819 1057 } 820 1058 } 821 } 822 #if AMP_MRG 823 else if ( bTestMergeAMP_Hor ) 824 { 1059 #if OL_DEPTHLIMIT 1060 }//bTry2NxN 1061 }//depthMapDetect 1062 else//do things normally 1063 { 825 1064 if(doNotBlockPu) 826 1065 { … … 829 1068 #endif 830 1069 #if HHI_INTERVIEW_SKIP 831 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnU, bFullyRenderedSec , true);832 #else 833 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnU , true);1070 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnU, bFullyRenderedSec ); 1071 #else 1072 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnU ); 834 1073 #endif 835 1074 rpcTempCU->initEstData( uiDepth, iQP ); … … 845 1084 #endif 846 1085 #if HHI_INTERVIEW_SKIP 847 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnD, bFullyRenderedSec , true);848 #else 849 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnD , true);1086 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnD, bFullyRenderedSec ); 1087 #else 1088 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnD ); 850 1089 #endif 851 1090 rpcTempCU->initEstData( uiDepth, iQP ); … … 857 1096 } 858 1097 #endif 1098 } 1099 #if AMP_MRG 1100 else if ( bTestMergeAMP_Hor ) 1101 { 1102 #if OL_DEPTHLIMIT //add code here to select 2NxN or Nx2N or none 1103 #if OL_DO_NOT_LIMIT_INTRA_SLICES_PART 1104 if(depthMapDetect && !bIntraSliceDetect && sps->getUseDPL()) 1105 #else 1106 if(depthMapDetect && sps->getUseDPL()) //depth map being encoded 1107 #endif 1108 { 1109 assert(uiDepth == (UInt)texPartInfo[uiPrevTexPartIndex+1]); 1110 if (bTry2NxN) 1111 { 1112 #endif 1113 if(doNotBlockPu) 1114 { 1115 #if HHI_INTER_VIEW_RESIDUAL_PRED 1116 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 1117 #endif 1118 #if HHI_INTERVIEW_SKIP 1119 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnU, bFullyRenderedSec, true ); 1120 #else 1121 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnU, true ); 1122 #endif 1123 rpcTempCU->initEstData( uiDepth, iQP ); 1124 if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_2NxnU ) 1125 { 1126 doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0; 1127 } 1128 } 1129 if(doNotBlockPu) 1130 { 1131 #if HHI_INTER_VIEW_RESIDUAL_PRED 1132 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 1133 #endif 1134 #if HHI_INTERVIEW_SKIP 1135 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnD, bFullyRenderedSec, true ); 1136 #else 1137 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnD, true ); 1138 #endif 1139 rpcTempCU->initEstData( uiDepth, iQP ); 1140 if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_2NxnD ) 1141 { 1142 doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0; 1143 } 1144 } 1145 #if OL_DEPTHLIMIT 1146 }//bTry2NxN 1147 }//depthMapDetect 1148 else//do things normally 1149 { 1150 if(doNotBlockPu) 1151 { 1152 #if HHI_INTER_VIEW_RESIDUAL_PRED 1153 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 1154 #endif 1155 #if HHI_INTERVIEW_SKIP 1156 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnU, bFullyRenderedSec, true ); 1157 #else 1158 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnU, true ); 1159 #endif 1160 rpcTempCU->initEstData( uiDepth, iQP ); 1161 if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_2NxnU ) 1162 { 1163 doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0; 1164 } 1165 } 1166 if(doNotBlockPu) 1167 { 1168 #if HHI_INTER_VIEW_RESIDUAL_PRED 1169 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 1170 #endif 1171 #if HHI_INTERVIEW_SKIP 1172 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnD, bFullyRenderedSec, true ); 1173 #else 1174 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnD, true ); 1175 #endif 1176 rpcTempCU->initEstData( uiDepth, iQP ); 1177 if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_2NxnD ) 1178 { 1179 doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0; 1180 } 1181 } 1182 1183 } 1184 #endif 1185 } 1186 #endif 859 1187 860 1188 //! Do horizontal AMP 861 1189 if ( bTestAMP_Ver ) 862 1190 { 1191 #if OL_DEPTHLIMIT //add code here to select 2NxN or Nx2N or none 1192 #if OL_DO_NOT_LIMIT_INTRA_SLICES_PART 1193 if(depthMapDetect && !bIntraSliceDetect && sps->getUseDPL()) 1194 #else 1195 if(depthMapDetect && sps->getUseDPL()) //depth map being encoded 1196 #endif 1197 { 1198 assert(uiDepth == (UInt)texPartInfo[uiPrevTexPartIndex+1]); 1199 if (bTryNx2N) 1200 { 1201 #endif 863 1202 if(doNotBlockPu) 864 1203 { … … 889 1228 rpcTempCU->initEstData( uiDepth, iQP ); 890 1229 } 891 } 892 #if AMP_MRG 893 else if ( bTestMergeAMP_Ver ) 894 { 1230 #if OL_DEPTHLIMIT 1231 }//bTryNx2N 1232 }//depthMapDetect 1233 else//do things normally 1234 { 895 1235 if(doNotBlockPu) 896 1236 { … … 899 1239 #endif 900 1240 #if HHI_INTERVIEW_SKIP 901 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nLx2N, bFullyRenderedSec , true);902 #else 903 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nLx2N , true);1241 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nLx2N, bFullyRenderedSec ); 1242 #else 1243 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nLx2N ); 904 1244 #endif 905 1245 rpcTempCU->initEstData( uiDepth, iQP ); … … 915 1255 #endif 916 1256 #if HHI_INTERVIEW_SKIP 917 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nRx2N, bFullyRenderedSec , true);918 #else 919 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nRx2N , true);1257 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nRx2N, bFullyRenderedSec ); 1258 #else 1259 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nRx2N ); 920 1260 #endif 921 1261 rpcTempCU->initEstData( uiDepth, iQP ); 922 1262 } 1263 } 1264 #endif 1265 } 1266 #if AMP_MRG 1267 else if ( bTestMergeAMP_Ver ) 1268 { 1269 #if OL_DEPTHLIMIT //add code here to select 2NxN or Nx2N or none 1270 #if OL_DO_NOT_LIMIT_INTRA_SLICES_PART 1271 if(depthMapDetect && !bIntraSliceDetect && sps->getUseDPL()) 1272 #else 1273 if(depthMapDetect && sps->getUseDPL()) //depth map being encoded 1274 #endif 1275 { 1276 assert(uiDepth == (UInt)texPartInfo[uiPrevTexPartIndex+1]); 1277 if (bTryNx2N) 1278 { 1279 #endif 1280 if(doNotBlockPu) 1281 { 1282 #if HHI_INTER_VIEW_RESIDUAL_PRED 1283 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 1284 #endif 1285 #if HHI_INTERVIEW_SKIP 1286 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nLx2N, bFullyRenderedSec, true ); 1287 #else 1288 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nLx2N, true ); 1289 #endif 1290 rpcTempCU->initEstData( uiDepth, iQP ); 1291 if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_nLx2N ) 1292 { 1293 doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0; 1294 } 1295 } 1296 if(doNotBlockPu) 1297 { 1298 #if HHI_INTER_VIEW_RESIDUAL_PRED 1299 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 1300 #endif 1301 #if HHI_INTERVIEW_SKIP 1302 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nRx2N, bFullyRenderedSec, true ); 1303 #else 1304 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nRx2N, true ); 1305 #endif 1306 rpcTempCU->initEstData( uiDepth, iQP ); 1307 } 1308 #if OL_DEPTHLIMIT 1309 }//bTryNx2N 1310 }//depthMapDetect 1311 else//do things normally 1312 { 1313 if(doNotBlockPu) 1314 { 1315 #if HHI_INTER_VIEW_RESIDUAL_PRED 1316 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 1317 #endif 1318 #if HHI_INTERVIEW_SKIP 1319 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nLx2N, bFullyRenderedSec, true ); 1320 #else 1321 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nLx2N, true ); 1322 #endif 1323 rpcTempCU->initEstData( uiDepth, iQP ); 1324 if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_nLx2N ) 1325 { 1326 doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0; 1327 } 1328 } 1329 if(doNotBlockPu) 1330 { 1331 #if HHI_INTER_VIEW_RESIDUAL_PRED 1332 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 1333 #endif 1334 #if HHI_INTERVIEW_SKIP 1335 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nRx2N, bFullyRenderedSec, true ); 1336 #else 1337 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nRx2N, true ); 1338 #endif 1339 rpcTempCU->initEstData( uiDepth, iQP ); 1340 } 1341 } 1342 #endif 923 1343 } 924 1344 #endif … … 994 1414 if( uiDepth == g_uiMaxCUDepth - g_uiAddCUDepth ) 995 1415 { 1416 #if OL_DEPTHLIMIT //add code here to select or deselect NxN mode for Intra 1417 #if OL_DO_NOT_LIMIT_INTRA_SLICES_PART 1418 if(depthMapDetect && !bIntraSliceDetect && sps->getUseDPL()) 1419 #else 1420 if(depthMapDetect && sps->getUseDPL()) //depth map being encoded 1421 #endif 1422 { 1423 assert(uiDepth == (UInt)texPartInfo[uiPrevTexPartIndex+1]); 1424 if (bTrySplit) 1425 { 1426 1427 #endif 996 1428 if( rpcTempCU->getWidth(0) > ( 1 << rpcTempCU->getSlice()->getSPS()->getQuadtreeTULog2MinSize() ) ) 997 1429 { … … 999 1431 rpcTempCU->initEstData( uiDepth, iQP ); 1000 1432 } 1433 #if OL_DEPTHLIMIT 1434 }//bTrySplit 1435 }//depthMapDetect 1436 else 1437 { 1438 if( rpcTempCU->getWidth(0) > ( 1 << rpcTempCU->getSlice()->getSPS()->getQuadtreeTULog2MinSize() ) ) 1439 { 1440 xCheckRDCostIntra( rpcBestCU, rpcTempCU, SIZE_NxN ); 1441 rpcTempCU->initEstData( uiDepth, iQP ); 1442 } 1443 } 1444 #endif 1001 1445 } 1002 1446 } … … 1561 2005 #if HHI_MPI 1562 2006 if( pcCU->getTextureModeDepth( uiAbsPartIdx ) == -1 || uiDepth < pcCU->getTextureModeDepth( uiAbsPartIdx ) ) 1563 #endif 2007 { 2008 #endif 2009 1564 2010 m_pcEntropyCoder->encodeSplitFlag( pcCU, uiAbsPartIdx, uiDepth ); 2011 2012 #if HHI_MPI 2013 } 2014 #endif 1565 2015 } 1566 2016 else … … 1577 2027 1578 2028 if( ( uiRPelX < pcSlice->getSPS()->getPicWidthInLumaSamples() ) && ( uiBPelY < pcSlice->getSPS()->getPicHeightInLumaSamples() ) ) 2029 { 1579 2030 m_pcEntropyCoder->encodeSplitFlag( pcCU, uiAbsPartIdx, uiDepth ); 2031 } 1580 2032 if( !pcCU->getSlice()->isIntra() ) 1581 2033 { … … 1631 2083 #if HHI_MPI 1632 2084 if( pcCU->getTextureModeDepth( uiAbsPartIdx ) == -1 ) 2085 { 1633 2086 #endif 1634 2087 if( !pcCU->getSlice()->isIntra() ) … … 1636 2089 m_pcEntropyCoder->encodeSkipFlag( pcCU, uiAbsPartIdx ); 1637 2090 } 2091 #if HHI_MPI 2092 } 2093 #endif 1638 2094 1639 2095 if( pcCU->isSkipped( uiAbsPartIdx ) ) 1640 2096 { 2097 #if OL_DEPTHLIMIT 2098 if(pcCU->getPartDumpFlag()) 2099 { 2100 pcCU->updatePartInfo(0,uiDepth); 2101 pcCU->incrementPartInfo(); 2102 } 2103 #endif 1641 2104 m_pcEntropyCoder->encodeMergeIndex( pcCU, uiAbsPartIdx, 0 ); 1642 2105 #if HHI_INTER_VIEW_RESIDUAL_PRED -
branches/HTM-4.0-Orange/source/Lib/TLibEncoder/TEncGOP.cpp
r110 r112 1136 1136 if (!bEntropySlice) 1137 1137 { 1138 #if OL_DEPTHLIMIT //start dumping partition information 1139 m_pcSliceEncoder->setPartDumpFlag(1); 1140 // if(!(pcPic->getSlice(0)->getSPS()->getUseDPL())) 1141 // { 1142 // m_pcSliceEncoder->setPartDumpFlag(0); 1143 // } 1144 #endif 1138 1145 pcSlice->setTileLocationCount ( 0 ); 1139 1146 m_pcSliceEncoder->encodeSlice(pcPic, pcBitstreamRedirect, pcSubstreamsOut); // redirect is only used for CAVLC tile position info. 1147 #if OL_DEPTHLIMIT //stop dumping partition information 1148 m_pcSliceEncoder->setPartDumpFlag(0); 1149 #endif 1140 1150 } 1141 1151 else 1142 1152 { 1153 #if OL_DEPTHLIMIT //start dumping partition information 1154 m_pcSliceEncoder->setPartDumpFlag(1); 1155 #endif 1143 1156 m_pcSliceEncoder->encodeSlice(pcPic, &nalu.m_Bitstream, pcSubstreamsOut); // nalu.m_Bitstream is only used for CAVLC tile position info. 1157 #if OL_DEPTHLIMIT //stop dumping partition information 1158 m_pcSliceEncoder->setPartDumpFlag(0); 1159 #endif 1144 1160 } 1145 1161 -
branches/HTM-4.0-Orange/source/Lib/TLibEncoder/TEncSbac.cpp
r101 r112 580 580 { 581 581 PartSize eSize = pcCU->getPartitionSize( uiAbsPartIdx ); 582 #if OL_DEPTHLIMIT 583 UInt uiSymbol; 584 #endif 582 585 if ( pcCU->isIntra( uiAbsPartIdx ) ) 583 586 { … … 585 588 { 586 589 m_pcBinIf->encodeBin( eSize == SIZE_2Nx2N? 1 : 0, m_cCUPartSizeSCModel.get( 0, 0, 0 ) ); 587 } 590 #if OL_DEPTHLIMIT 591 if(pcCU->getPartDumpFlag()) 592 { 593 uiSymbol = (UInt)(eSize == SIZE_2Nx2N? 1 : 0); 594 pcCU->updatePartInfo(uiSymbol?0:1,uiDepth); //0 for 2Nx2N and 1 for NxN 595 pcCU->incrementPartInfo(); 596 } 597 #endif 598 } 599 #if OL_DEPTHLIMIT 600 if(pcCU->getPartDumpFlag() && uiDepth < g_uiMaxCUDepth - g_uiAddCUDepth && !pcCU->getSlice()->isIntra()) 601 { 602 pcCU->updatePartInfo(0,uiDepth); //0 for 2Nx2N and 1 for NxN 603 pcCU->incrementPartInfo(); 604 } 605 #endif 588 606 return; 589 607 } … … 594 612 { 595 613 m_pcBinIf->encodeBin( 1, m_cCUPartSizeSCModel.get( 0, 0, 0) ); 614 #if OL_DEPTHLIMIT 615 if(pcCU->getPartDumpFlag()) 616 { 617 // if (!pcCU->isIntra( uiAbsPartIdx )) 618 { 619 pcCU->updatePartInfo(0,uiDepth); //0 for 2Nx2N 620 pcCU->incrementPartInfo(); 621 } 622 } 623 #endif 596 624 break; 597 625 } … … 623 651 } 624 652 } 653 #if OL_DEPTHLIMIT 654 if(pcCU->getPartDumpFlag()) 655 { 656 // if (!pcCU->isIntra( uiAbsPartIdx )) 657 { 658 pcCU->updatePartInfo(2,uiDepth); //2 for 2NxN 659 pcCU->incrementPartInfo(); 660 } 661 } 662 #endif 625 663 break; 626 664 } … … 656 694 } 657 695 } 696 #if OL_DEPTHLIMIT 697 if(pcCU->getPartDumpFlag()) 698 { 699 // if (!pcCU->isIntra( uiAbsPartIdx )) 700 { 701 pcCU->updatePartInfo(3,uiDepth); //3 for Nx2N 702 pcCU->incrementPartInfo(); 703 } 704 } 705 #endif 658 706 break; 659 707 } … … 665 713 m_pcBinIf->encodeBin( 0, m_cCUPartSizeSCModel.get( 0, 0, 1) ); 666 714 m_pcBinIf->encodeBin( 0, m_cCUPartSizeSCModel.get( 0, 0, 2) ); 715 #if OL_DEPTHLIMIT 716 if(pcCU->getPartDumpFlag()) 717 { 718 //if (!pcCU->getSlice()->isIntra()) 719 { 720 pcCU->updatePartInfo(1,uiDepth); //2Nx2N here since we disable NxN in Inter 721 pcCU->incrementPartInfo(); 722 } 723 } 724 #endif 725 } 726 else 727 { 728 #if OL_DEPTHLIMIT 729 if(pcCU->getPartDumpFlag()) 730 { 731 //if (!pcCU->getSlice()->isIntra()) 732 { 733 pcCU->updatePartInfo(0,uiDepth); //2Nx2N here since we disable NxN in Inter 734 pcCU->incrementPartInfo(); 735 } 736 } 737 #endif 667 738 } 668 739 break; … … 828 899 assert( uiCtx < 3 ); 829 900 m_pcBinIf->encodeBin( uiCurrSplitFlag, m_cCUSplitFlagSCModel.get( 0, 0, uiCtx ) ); 901 #if OL_DEPTHLIMIT 902 if(pcCU->getPartDumpFlag()) 903 { 904 if(pcCU->getSlice()->isIntra() || (!pcCU->getSlice()->isIntra() && uiCurrSplitFlag!=0)) 905 { 906 pcCU->updatePartInfo(uiCurrSplitFlag,uiDepth); 907 pcCU->incrementPartInfo(); 908 } 909 } 910 #endif 830 911 DTRACE_CABAC_VL( g_nSymbolCounter++ ) 831 912 DTRACE_CABAC_T( "\tSplitFlag\n" ) -
branches/HTM-4.0-Orange/source/Lib/TLibEncoder/TEncSlice.cpp
r110 r112 849 849 #endif 850 850 851 #if OL_DEPTHLIMIT //stop dumping partition information 852 b_dumpPartInfo = 0; 853 pcCU->setPartDumpFlag(b_dumpPartInfo); 854 #endif 851 855 852 856 // inherit from TR if necessary, select substream to use. … … 1308 1312 1309 1313 TComDataCU*& pcCU = rpcPic->getCU( uiCUAddr ); 1314 #if OL_DEPTHLIMIT 1315 pcCU->setPartDumpFlag(b_dumpPartInfo); 1316 pcCU->resetPartInfo(); 1317 #endif 1310 1318 #if !REMOVE_TILE_DEPENDENCE 1311 1319 if( (rpcPic->getPicSym()->getTileBoundaryIndependenceIdr()==0) && (rpcPic->getPicSym()->getNumColumnsMinus1()!=0) ) -
branches/HTM-4.0-Orange/source/Lib/TLibEncoder/TEncSlice.h
r77 r112 101 101 102 102 UInt m_uiSliceIdx; 103 #if OL_DEPTHLIMIT //flag to signal to start dumping 104 bool b_dumpPartInfo; 105 #endif 103 106 public: 104 107 TEncSlice(); … … 128 131 UInt getSliceIdx() { return m_uiSliceIdx; } 129 132 Void setSliceIdx(UInt i) { m_uiSliceIdx = i; } 133 #if OL_DEPTHLIMIT //flag to signal to start dumping 134 Void setPartDumpFlag(bool flag) {b_dumpPartInfo = flag;}; 135 #endif 130 136 }; 131 137 -
branches/HTM-4.0-Orange/source/Lib/TLibEncoder/TEncTop.cpp
r105 r112 768 768 m_cSPS.setUseDMM( m_bUseDMM ); 769 769 #endif 770 #if OL_DEPTHLIMIT 771 m_cSPS.setUseDPL( m_bDepthPartitionLimiting ); 772 #endif 770 773 #if HHI_MPI 771 774 m_cSPS.setUseMVI( m_bUseMVI );
Note: See TracChangeset for help on using the changeset viewer.