Changeset 112 in 3DVCSoftware for branches/HTM-4.0-Orange/source
- Timestamp:
- 30 Aug 2012, 09:18:03 (12 years ago)
- Location:
- branches/HTM-4.0-Orange/source
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-4.0-Orange/source/App/TAppEncoder/TAppEncCfg.cpp
r110 r112 340 340 ("VSDWeight", m_iVSDWeight , 1 , "SAIT Weight" ) 341 341 ("DWeight", m_iDWeight , 1 , "SSE Weight" ) 342 #endif 343 344 #if OL_DEPTHLIMIT 345 ("DPL", m_bDepthPartitionLimiting , false , "Use DepthPartitionLimiting" ) 342 346 #endif 343 347 … … 1701 1705 printf("WVSO:%d ", m_bWVSO ); 1702 1706 #endif 1707 #if OL_DEPTHLIMIT 1708 printf("DPL:%d ", m_bDepthPartitionLimiting); 1709 #endif 1703 1710 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX 1704 1711 printf("DMM:%d ", m_bUseDMM ); -
branches/HTM-4.0-Orange/source/App/TAppEncoder/TAppEncCfg.h
r110 r112 308 308 #endif 309 309 310 #if OL_DEPTHLIMIT 311 Bool m_bDepthPartitionLimiting; 312 #endif 313 310 314 // internal member functions 311 315 Void xSetGlobal (); ///< set global variables -
branches/HTM-4.0-Orange/source/App/TAppEncoder/TAppEncTop.cpp
r110 r112 364 364 m_acTEncTopList[iViewIdx]->setUseDMM ( false ); 365 365 #endif 366 #if OL_DEPTHLIMIT 367 m_acTEncTopList[iViewIdx]->setUseDPL ( false ); 368 #endif 366 369 #if HHI_MPI 367 370 m_acTEncTopList[iViewIdx]->setUseMVI( false ); … … 639 642 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX 640 643 m_acTEncDepthTopList[iViewIdx]->setUseDMM ( m_bUseDMM ); 644 #endif 645 #if OL_DEPTHLIMIT 646 m_acTEncDepthTopList[iViewIdx]->setUseDPL (m_bDepthPartitionLimiting); 641 647 #endif 642 648 #if HHI_MPI -
branches/HTM-4.0-Orange/source/Lib/TLibCommon/TComDataCU.cpp
r100 r112 152 152 #endif 153 153 #endif 154 #if OL_DEPTHLIMIT 155 //add a variable to store the partition information 156 //a 2D array in part_symbol,uidepth format 157 //initialize m_partInfo to OL_END_CU 158 for (int i=0; i < OL_PART_BUF_SIZE; i++) 159 { 160 for (int j=0; j < 2; j++) 161 m_uiPartInfo[i][j] = OL_END_CU; 162 } 163 #endif 154 164 } 155 165 … … 456 466 Void TComDataCU::initCU( TComPic* pcPic, UInt iCUAddr ) 457 467 { 468 #if OL_DEPTHLIMIT 469 TComDataCU* pcCU = pcPic->getCU(iCUAddr); 470 #endif 458 471 459 472 m_pcPic = pcPic; … … 672 685 m_apcCUColocated[1] = getSlice()->getRefPic( REF_PIC_LIST_1, 0)->getCU( m_uiCUAddr ); 673 686 } 687 #if OL_DEPTHLIMIT 688 setPartDumpFlag (pcCU->getPartDumpFlag()); 689 #endif 674 690 } 675 691 … … 1001 1017 memcpy(m_uiSliceStartCU,pcCU->m_uiSliceStartCU+uiPartOffset,sizeof(UInt)*m_uiNumPartition); 1002 1018 memcpy(m_uiEntropySliceStartCU,pcCU->m_uiEntropySliceStartCU+uiPartOffset,sizeof(UInt)*m_uiNumPartition); 1019 #if OL_DEPTHLIMIT 1020 setPartDumpFlag (pcCU->getPartDumpFlag()); 1021 #endif 1003 1022 } 1004 1023 -
branches/HTM-4.0-Orange/source/Lib/TLibCommon/TComDataCU.h
r100 r112 237 237 UInt* m_uiSliceStartCU; ///< Start CU address of current slice 238 238 UInt* m_uiEntropySliceStartCU; ///< Start CU address of current slice 239 240 #if OL_DEPTHLIMIT 241 //add a variable to store the partition information 242 //a 2D array in uidepth,part_symbol format 243 UInt m_uiPartInfo[OL_PART_BUF_SIZE][2]; 244 UInt m_uiPartNum; 245 Bool b_dumpPartInfo; 246 #endif 239 247 240 248 // ------------------------------------------------------------------------------------------------------------------- … … 596 604 597 605 Void compressMV (); 606 607 #if OL_DEPTHLIMIT 608 Void resetPartInfo () {m_uiPartNum = 0;}; 609 Void incrementPartInfo () {m_uiPartNum ++;}; 610 Void updatePartInfo(UInt uiSymbol, UInt uiDepth) {m_uiPartInfo[m_uiPartNum][0] = uiSymbol; m_uiPartInfo 611 [m_uiPartNum][1] = uiDepth;}; 612 UInt* readPartInfo() {return (UInt*)m_uiPartInfo;}; 613 // UInt getPartNumIdx() {return m_uiPartNum;}; //added this to get the index 614 //flag to signal to start dumping 615 Void setPartDumpFlag(bool flag) {b_dumpPartInfo = flag;}; 616 Bool getPartDumpFlag() {return b_dumpPartInfo;}; 617 #endif 598 618 599 619 // ------------------------------------------------------------------------------------------------------------------- -
branches/HTM-4.0-Orange/source/Lib/TLibCommon/TComSlice.cpp
r101 r112 1441 1441 , m_bUseDMM (false) 1442 1442 #endif 1443 #if OL_DEPTHLIMIT 1444 , m_bDepthPartitionLimiting (false) 1445 #endif 1443 1446 { 1444 1447 // AMVP parameter -
branches/HTM-4.0-Orange/source/Lib/TLibCommon/TComSlice.h
r101 r112 354 354 #endif 355 355 356 #if OL_DEPTHLIMIT 357 Bool m_bDepthPartitionLimiting; 358 #endif 359 356 360 #if DEPTH_MAP_GENERATION 357 361 UInt m_uiPredDepthMapGeneration; … … 619 623 #endif 620 624 625 #if OL_DEPTHLIMIT 626 Void setUseDPL(Bool b) {m_bDepthPartitionLimiting = b; } 627 Bool getUseDPL() {return m_bDepthPartitionLimiting;} 628 #endif 629 621 630 Void initMultiviewSPS ( UInt uiViewId, Int iViewOrderIdx = 0, UInt uiCamParPrecision = 0, Bool bCamParSlice = false, Int** aaiScale = 0, Int** aaiOffset = 0 ); 622 631 Void initMultiviewSPSDepth ( UInt uiViewId, Int iViewOrderIdx ); -
branches/HTM-4.0-Orange/source/Lib/TLibCommon/TypeDef.h
r110 r112 42 42 //! \{ 43 43 44 #define OL_DEPTHLIMIT 1 //JCT2-A0044 45 #if OL_DEPTHLIMIT 46 #define OL_DO_NOT_LIMIT_INTRA_SLICES_PART 1 //Turn this on to not perform depth limiting for I-SLICES. 47 #define OL_END_CU MAX_INT //Default for initialising the partition information buffer 48 #define OL_PART_BUF_SIZE 86 //maximum number of possible partition bits in a CU 49 #endif 50 44 51 #define FIXES 1 45 52 #define POZNAN_CABAC_INIT_FLAG_FIX 1 … … 94 101 #define SAIT_VSO_EST_A0033 1 // JCT2-A0033 modification 3 95 102 #define LGE_VSO_EARLY_SKIP_A0093 1 // JCT2-A0093 modification 4 96 #define LGE_WVSO_A0119 1// JCT2-A0119 Depth Metric with a weighted depth fidelity term103 #define LGE_WVSO_A0119 0 // JCT2-A0119 Depth Metric with a weighted depth fidelity term 97 104 98 105 #define HHI_INTERVIEW_SKIP 1 -
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.