Changeset 117 in 3DVCSoftware for branches/HTM-4.0-Orange/source/Lib/TLibEncoder
- Timestamp:
- 30 Aug 2012, 16:24:21 (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
r112 r117 206 206 #if LGE_WVSO_A0119 207 207 Bool m_bWVSO; 208 Int 208 Int m_iVSOWeight; 209 209 Int m_iVSDWeight; 210 Int 210 Int m_iDWeight; 211 211 #endif 212 212 #endif … … 315 315 #endif 316 316 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX 317 Bool 318 #endif 319 320 #if OL_DEPTHLIMIT 321 Bool 317 Bool m_bUseDMM; 318 #endif 319 320 #if OL_DEPTHLIMIT_A0044 321 Bool m_bDepthPartitionLimiting; 322 322 #endif 323 323 … … 477 477 #endif 478 478 #if LGE_WVSO_A0119 479 Void setWVSO ( Bool b ) { m_bWVSO= b; }480 Void setVSOWeight ( Int i ) { m_iVSOWeight= i; }481 Void setVSDWeight ( Int i ) { m_iVSDWeight= i; }482 Void setDWeight ( Int i ) { m_iDWeight= i; }479 Void setWVSO ( Bool b ) { m_bWVSO = b; } 480 Void setVSOWeight ( Int i ) { m_iVSOWeight = i; } 481 Void setVSDWeight ( Int i ) { m_iVSDWeight = i; } 482 Void setDWeight ( Int i ) { m_iDWeight = i; } 483 483 #endif 484 484 #endif … … 566 566 Int getVSOWeight () { return m_iVSOWeight; } 567 567 Int getVSDWeight () { return m_iVSDWeight; } 568 Int getDWeight 568 Int getDWeight () { return m_iDWeight; } 569 569 #endif 570 570 #endif … … 821 821 #endif 822 822 823 #if OL_DEPTHLIMIT 823 #if OL_DEPTHLIMIT_A0044 824 824 Void setUseDPL(Bool b) {m_bDepthPartitionLimiting = b; } 825 825 Bool getUseDPL() {return m_bDepthPartitionLimiting;} -
branches/HTM-4.0-Orange/source/Lib/TLibEncoder/TEncCu.cpp
r114 r117 451 451 TComPic* pcPic = rpcBestCU->getPic(); 452 452 453 #if OL_DEPTHLIMIT 453 #if OL_DEPTHLIMIT_A0044 454 454 TComSPS *sps = pcPic->getSlice(0)->getSPS(); 455 455 TComPic *pcTexture; 456 TComDataCU *pcTextureCU; 456 TComDataCU * pcTextureCU; 457 457 458 static UInt* texPartInfo; 458 static UInt uiTexPartIndex; 459 static Bool depthMapDetect = false; 460 UInt uiPrevTexPartIndex = 0; 459 static UInt uiTexPartIndex; 460 static Bool depthMapDetect = false; 461 462 UInt uiPrevTexPartIndex = 0; 461 463 #if OL_DO_NOT_LIMIT_INTRA_SLICES_PART 462 464 static Bool bIntraSliceDetect = false; … … 466 468 if(uiDepth == 0) 467 469 { 468 469 470 470 pcTexture = rpcBestCU->getSlice()->getTexturePic(); 471 if(pcTexture != NULL) //depth map being encoded 472 { 471 473 #if OL_DO_NOT_LIMIT_INTRA_SLICES_PART 472 473 #endif 474 475 476 477 478 479 480 481 482 474 bIntraSliceDetect = (rpcBestCU->getSlice()->getSliceType()==I_SLICE); 475 #endif 476 pcTextureCU = pcTexture->getCU( rpcBestCU->getAddr() ); 477 texPartInfo = pcTextureCU -> readPartInfo(); 478 uiTexPartIndex = 0; 479 depthMapDetect = true; 480 } 481 else 482 { 483 depthMapDetect = false; 484 } 483 485 } 484 486 #endif … … 488 490 // variables for fast encoder decision 489 491 Bool bEarlySkip = false; 490 Bool bTrySplit 492 Bool bTrySplit = true; 491 493 Double fRD_Skip = MAX_DOUBLE; 492 494 … … 499 501 Bool bTrySplitDQP = true; 500 502 501 static Double afCost [ MAX_CU_DEPTH ];503 static Double afCost [ MAX_CU_DEPTH ]; 502 504 static Int aiNum [ MAX_CU_DEPTH ]; 503 505 … … 581 583 isAddLowestQP = true; 582 584 iMinQP = iMinQP - 1; 583 585 584 586 } 585 587 #endif … … 625 627 rpcTempCU->initEstData( uiDepth, iQP ); 626 628 627 #if OL_DEPTHLIMIT 628 //logic for setting bTrySplit using the partition information that is stored of the texture colocated CU629 #if OL_DEPTHLIMIT_A0044 630 //logic for setting bTrySplit using the partition information that is stored of the texture colocated CU 629 631 #if OL_DO_NOT_LIMIT_INTRA_SLICES_PART 630 if(depthMapDetect && !bIntraSliceDetect && sps->getUseDPL())631 #else 632 if(depthMapDetect && sps->getUseDPL()) //depth map being encoded633 #endif 634 {635 636 if((UInt)texPartInfo[uiTexPartIndex+0] == 1) //NxN modes637 638 639 640 641 642 643 644 else if((UInt)texPartInfo[uiTexPartIndex+0] == 0) //2Nx2N modes645 646 647 648 649 //scan ahead till next depth 650 uiTexdepth = (UInt)texPartInfo[uiTexPartIndex+1]; 651 uiPrevTexPartIndex = uiTexPartIndex;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 671 672 673 674 675 else if((UInt)texPartInfo[uiTexPartIndex+0] == OL_END_CU)676 677 678 679 680 681 else if((UInt)texPartInfo[uiTexPartIndex+0] == 2) //2NxN case682 683 684 685 686 687 688 689 else if((UInt)texPartInfo[uiTexPartIndex+0] == 3) //Nx2N case690 691 692 693 694 695 696 697 }632 if(depthMapDetect && !bIntraSliceDetect && sps->getUseDPL()) 633 #else 634 if(depthMapDetect && sps->getUseDPL()) //depth map being encoded 635 #endif 636 { 637 assert(uiDepth == (UInt)texPartInfo[uiTexPartIndex+1]); 638 if((UInt)texPartInfo[uiTexPartIndex] == 1) //NxN modes 639 { 640 bTrySplit = true; 641 bTryNx2N = true; 642 bTry2NxN = true; 643 uiPrevTexPartIndex = uiTexPartIndex; 644 uiTexPartIndex += 2; 645 } 646 else if((UInt)texPartInfo[uiTexPartIndex] == 0) //2Nx2N modes 647 { 648 UInt uiTexdepth; 649 UInt temp_uiTexPartIndex; 650 bTrySplit = false; 651 652 //scan ahead till next depth 653 uiTexdepth = (UInt)texPartInfo[uiTexPartIndex+1]; 654 uiPrevTexPartIndex = uiTexPartIndex; 655 uiTexPartIndex+=2; 656 temp_uiTexPartIndex = uiTexPartIndex; //store in case to rewind 657 658 while(uiTexdepth != (UInt)texPartInfo[uiTexPartIndex+1] && uiTexdepth != 0) 659 { 660 if((UInt)texPartInfo[uiTexPartIndex+1] < uiTexdepth) 661 { 662 break; 663 } 664 uiTexPartIndex+=2; 665 666 if((UInt)texPartInfo[uiTexPartIndex+1] == OL_END_CU) 667 { 668 uiTexPartIndex = temp_uiTexPartIndex; 669 uiTexdepth++; 670 if(uiTexdepth >= g_uiMaxCUDepth) 671 { 672 break; 673 } 674 } 675 } 676 } 677 else if((UInt)texPartInfo[uiTexPartIndex] == OL_END_CU) 678 { 679 bTrySplit = false; 680 bTryNx2N = false; 681 bTry2NxN = false; 682 } 683 else if((UInt)texPartInfo[uiTexPartIndex] == 2) //2NxN case 684 { 685 bTrySplit = false; 686 bTryNx2N = false; 687 bTry2NxN = true; 688 uiPrevTexPartIndex = uiTexPartIndex; 689 uiTexPartIndex += 2; 690 } 691 else if((UInt)texPartInfo[uiTexPartIndex] == 3) //Nx2N case 692 { 693 bTrySplit = false; 694 bTryNx2N = true; 695 bTry2NxN = false; 696 uiPrevTexPartIndex = uiTexPartIndex; 697 uiTexPartIndex += 2; 698 } 699 } 698 700 #endif 699 701 … … 722 724 #endif 723 725 #if HHI_INTER_VIEW_RESIDUAL_PRED 724 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 725 #endif 726 // SKIP 727 #if HHI_INTERVIEW_SKIP 728 xCheckRDCostMerge2Nx2N( rpcBestCU, rpcTempCU, bFullyRenderedSec ); 729 #else 730 xCheckRDCostMerge2Nx2N( rpcBestCU, rpcTempCU ); 731 #endif 732 rpcTempCU->initEstData( uiDepth, iQP ); 733 734 // fast encoder decision for early skip 735 if ( m_pcEncCfg->getUseFastEnc() ) 726 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 727 #endif 728 // SKIP 729 #if HHI_INTERVIEW_SKIP 730 xCheckRDCostMerge2Nx2N( rpcBestCU, rpcTempCU, bFullyRenderedSec ); 731 #else 732 xCheckRDCostMerge2Nx2N( rpcBestCU, rpcTempCU ); 733 #endif 734 rpcTempCU->initEstData( uiDepth, iQP ); 735 736 // fast encoder decision for early skip 737 if ( m_pcEncCfg->getUseFastEnc() ) 738 { 739 Int iIdx = g_aucConvertToBit[ rpcBestCU->getWidth(0) ]; 740 if ( aiNum [ iIdx ] > 5 && fRD_Skip < EARLY_SKIP_THRES*afCost[ iIdx ]/aiNum[ iIdx ] ) 741 { 742 bEarlySkip = true; 743 bTrySplit = false; 744 } 745 } 746 747 // 2Nx2N, NxN 748 if ( !bEarlySkip ) 749 { 750 #if HHI_INTER_VIEW_RESIDUAL_PRED 751 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 752 #endif 753 #if HHI_INTERVIEW_SKIP 754 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2Nx2N, bFullyRenderedSec ); 755 756 #else 757 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2Nx2N ); 758 #endif 759 rpcTempCU->initEstData( uiDepth, iQP ); 760 if(m_pcEncCfg->getUseCbfFastMode()) 761 { 762 doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0; 763 } 764 } 765 #if HHI_INTER_VIEW_RESIDUAL_PRED 766 } // uiResPrdId 767 #endif 768 } // != I_SLICE 769 770 #if OL_DEPTHLIMIT_A0044 771 #if OL_DO_NOT_LIMIT_INTRA_SLICES_PART 772 if(depthMapDetect && !bIntraSliceDetect && sps->getUseDPL()) 773 #else 774 if(depthMapDetect && sps->getUseDPL()) //depth map being encoded 775 #endif 776 { 777 bTrySplitDQP = bTrySplit; 778 } 779 else 780 { 781 if( (g_uiMaxCUWidth>>uiDepth) >= rpcTempCU->getSlice()->getPPS()->getMinCuDQPSize() ) 736 782 { 737 Int iIdx = g_aucConvertToBit[ rpcBestCU->getWidth(0) ]; 738 if ( aiNum [ iIdx ] > 5 && fRD_Skip < EARLY_SKIP_THRES*afCost[ iIdx ]/aiNum[ iIdx ] ) 783 if(iQP == iBaseQP) 739 784 { 740 bEarlySkip = true; 741 bTrySplit = false; 785 bTrySplitDQP = bTrySplit; 742 786 } 743 787 } 744 745 // 2Nx2N, NxN 746 if ( !bEarlySkip ) 788 else 747 789 { 748 #if HHI_INTER_VIEW_RESIDUAL_PRED 749 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 750 #endif 751 #if HHI_INTERVIEW_SKIP 752 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2Nx2N, bFullyRenderedSec ); 753 754 #else 755 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2Nx2N ); 756 #endif 757 rpcTempCU->initEstData( uiDepth, iQP ); 758 if(m_pcEncCfg->getUseCbfFastMode()) 759 { 760 doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0; 761 } 790 bTrySplitDQP = bTrySplit; 762 791 } 763 #if HHI_INTER_VIEW_RESIDUAL_PRED 764 } // uiResPrdId 765 #endif 766 } // != I_SLICE 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 } 792 } 791 793 #else 792 794 … … 844 846 Bool bResPredFlag = ( uiResPrdId > 0 ); 845 847 #endif 846 // 2Nx2N, NxN 847 if ( !bEarlySkip ) 848 { 849 850 if(!( rpcBestCU->getSlice()->getSPS()->getDisInter4x4() && (rpcBestCU->getWidth(0)==8) && (rpcBestCU->getHeight(0)==8) )) 851 { 852 if( uiDepth == g_uiMaxCUDepth - g_uiAddCUDepth && doNotBlockPu) 848 // 2Nx2N, NxN 849 if ( !bEarlySkip ) 853 850 { 854 #if OL_DEPTHLIMIT //add code here to select 2NxN or Nx2N or none 851 852 if(!( rpcBestCU->getSlice()->getSPS()->getDisInter4x4() && (rpcBestCU->getWidth(0)==8) && (rpcBestCU->getHeight(0)==8) )) 853 { 854 if( uiDepth == g_uiMaxCUDepth - g_uiAddCUDepth && doNotBlockPu) 855 { 856 #if OL_DEPTHLIMIT_A0044 //add code here to select 2NxN or Nx2N or none 855 857 #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 865 #if HHI_INTER_VIEW_RESIDUAL_PRED 866 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 867 #endif 868 #if HHI_INTERVIEW_SKIP 869 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_NxN, bFullyRenderedSec ); 870 #else 871 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_NxN ); 872 #endif 873 rpcTempCU->initEstData( uiDepth, iQP ); 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 } 891 } 892 } 893 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 906 if(doNotBlockPu) 907 { 908 #if HHI_INTER_VIEW_RESIDUAL_PRED 909 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 910 #endif 911 #if HHI_INTERVIEW_SKIP 912 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_Nx2N, bFullyRenderedSec ); 913 #else 914 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_Nx2N ); 915 #endif 916 rpcTempCU->initEstData( uiDepth, iQP ); 917 if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_Nx2N ) 918 { 919 doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0; 858 if(depthMapDetect && !bIntraSliceDetect && sps->getUseDPL()) 859 #else 860 if(depthMapDetect && sps->getUseDPL()) //depth map being encoded 861 #endif 862 { 863 assert(uiDepth == (UInt)texPartInfo[uiPrevTexPartIndex+1]); 864 if (bTrySplit) 865 { 866 #endif 867 #if HHI_INTER_VIEW_RESIDUAL_PRED 868 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 869 #endif 870 #if HHI_INTERVIEW_SKIP 871 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_NxN, bFullyRenderedSec ); 872 #else 873 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_NxN ); 874 #endif 875 rpcTempCU->initEstData( uiDepth, iQP ); 876 #if OL_DEPTHLIMIT_A0044 877 }//bTrySplit 878 }//depthMapDetect 879 else//do things normally 880 { 881 #if HHI_INTER_VIEW_RESIDUAL_PRED 882 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 883 #endif 884 #if HHI_INTERVIEW_SKIP 885 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_NxN, bFullyRenderedSec ); 886 #else 887 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_NxN ); 888 #endif 889 rpcTempCU->initEstData( uiDepth, iQP ); 890 } 891 #endif 892 } 920 893 } 921 894 } 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 ) 895 896 { // 2NxN, Nx2N 897 #if OL_DEPTHLIMIT_A0044 //add code here to select 2NxN or Nx2N or none 898 #if OL_DO_NOT_LIMIT_INTRA_SLICES_PART 899 if(depthMapDetect && !bIntraSliceDetect && sps->getUseDPL()) 900 #else 901 if(depthMapDetect && sps->getUseDPL()) //depth map being encoded 902 #endif 939 903 { 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 957 if(doNotBlockPu) 958 { 959 #if HHI_INTER_VIEW_RESIDUAL_PRED 960 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 961 #endif 962 #if HHI_INTERVIEW_SKIP 963 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxN, bFullyRenderedSec ); 964 #else 965 xCheckRDCostInter ( rpcBestCU, rpcTempCU, SIZE_2NxN ); 966 #endif 967 rpcTempCU->initEstData( uiDepth, iQP ); 968 if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_2NxN) 904 assert(uiDepth == (UInt)texPartInfo[uiPrevTexPartIndex+1]); 905 if (bTryNx2N) 906 { 907 #endif 908 if(doNotBlockPu) 909 { 910 #if HHI_INTER_VIEW_RESIDUAL_PRED 911 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 912 #endif 913 #if HHI_INTERVIEW_SKIP 914 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_Nx2N, bFullyRenderedSec ); 915 #else 916 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_Nx2N ); 917 #endif 918 rpcTempCU->initEstData( uiDepth, iQP ); 919 if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_Nx2N ) 920 { 921 doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0; 922 } 923 } 924 #if OL_DEPTHLIMIT_A0044 925 }//bTryNx2N 926 }//depthMapDetect 927 else//do things normally 969 928 { 970 doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0; 971 } 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 996 } 997 998 #if 1 999 //! Try AMP (SIZE_2NxnU, SIZE_2NxnD, SIZE_nLx2N, SIZE_nRx2N) 1000 if( pcPic->getSlice(0)->getSPS()->getAMPAcc(uiDepth) ) 1001 { 1002 #if AMP_ENC_SPEEDUP 1003 Bool bTestAMP_Hor = false, bTestAMP_Ver = false; 1004 1005 #if AMP_MRG 1006 Bool bTestMergeAMP_Hor = false, bTestMergeAMP_Ver = false; 1007 1008 deriveTestModeAMP (rpcBestCU, eParentPartSize, bTestAMP_Hor, bTestAMP_Ver, bTestMergeAMP_Hor, bTestMergeAMP_Ver); 1009 #else 1010 deriveTestModeAMP (rpcBestCU, eParentPartSize, bTestAMP_Hor, bTestAMP_Ver); 1011 #endif 1012 1013 //! Do horizontal AMP 1014 if ( bTestAMP_Hor ) 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 1027 if(doNotBlockPu) 1028 { 1029 #if HHI_INTER_VIEW_RESIDUAL_PRED 1030 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 1031 #endif 1032 #if HHI_INTERVIEW_SKIP 1033 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnU, bFullyRenderedSec ); 1034 #else 1035 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnU ); 1036 #endif 1037 rpcTempCU->initEstData( uiDepth, iQP ); 1038 if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_2NxnU ) 929 if(doNotBlockPu) 1039 930 { 1040 doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0; 931 #if HHI_INTER_VIEW_RESIDUAL_PRED 932 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 933 #endif 934 #if HHI_INTERVIEW_SKIP 935 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_Nx2N, bFullyRenderedSec ); 936 #else 937 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_Nx2N ); 938 #endif 939 rpcTempCU->initEstData( uiDepth, iQP ); 940 if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_Nx2N ) 941 { 942 doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0; 943 } 1041 944 } 1042 945 } 1043 if(doNotBlockPu) 946 #endif 947 948 #if OL_DEPTHLIMIT_A0044 //add code here to select 2NxN or Nx2N or none 949 #if OL_DO_NOT_LIMIT_INTRA_SLICES_PART 950 if(depthMapDetect && !bIntraSliceDetect && sps->getUseDPL()) 951 #else 952 if(depthMapDetect && sps->getUseDPL()) //depth map being encoded 953 #endif 1044 954 { 1045 #if HHI_INTER_VIEW_RESIDUAL_PRED 1046 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 1047 #endif 1048 #if HHI_INTERVIEW_SKIP 1049 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnD, bFullyRenderedSec ); 1050 #else 1051 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnD ); 1052 #endif 1053 rpcTempCU->initEstData( uiDepth, iQP ); 1054 if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_2NxnD ) 955 assert(uiDepth == (UInt)texPartInfo[uiPrevTexPartIndex+1]); 956 if (bTry2NxN) 1055 957 { 1056 doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0; 958 #endif 959 if(doNotBlockPu) 960 { 961 #if HHI_INTER_VIEW_RESIDUAL_PRED 962 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 963 #endif 964 #if HHI_INTERVIEW_SKIP 965 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxN, bFullyRenderedSec ); 966 #else 967 xCheckRDCostInter ( rpcBestCU, rpcTempCU, SIZE_2NxN ); 968 #endif 969 rpcTempCU->initEstData( uiDepth, iQP ); 970 if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_2NxN) 971 { 972 doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0; 973 } 974 } 975 #if OL_DEPTHLIMIT_A0044 976 }//bTryNx2N 977 }//depthMapDetect 978 else//do things normally 979 { 980 if(doNotBlockPu) 981 { 982 #if HHI_INTER_VIEW_RESIDUAL_PRED 983 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 984 #endif 985 #if HHI_INTERVIEW_SKIP 986 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxN, bFullyRenderedSec ); 987 #else 988 xCheckRDCostInter ( rpcBestCU, rpcTempCU, SIZE_2NxN ); 989 #endif 990 rpcTempCU->initEstData( uiDepth, iQP ); 991 if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_2NxN) 992 { 993 doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0; 994 } 1057 995 } 1058 996 } 1059 #if OL_DEPTHLIMIT 1060 }//bTry2NxN 1061 }//depthMapDetect 1062 else//do things normally 1063 { 1064 if(doNotBlockPu) 997 #endif 998 } 999 1000 #if 1 1001 //! Try AMP (SIZE_2NxnU, SIZE_2NxnD, SIZE_nLx2N, SIZE_nRx2N) 1002 if( pcPic->getSlice(0)->getSPS()->getAMPAcc(uiDepth) ) 1003 { 1004 #if AMP_ENC_SPEEDUP 1005 Bool bTestAMP_Hor = false, bTestAMP_Ver = false; 1006 1007 #if AMP_MRG 1008 Bool bTestMergeAMP_Hor = false, bTestMergeAMP_Ver = false; 1009 1010 deriveTestModeAMP (rpcBestCU, eParentPartSize, bTestAMP_Hor, bTestAMP_Ver, bTestMergeAMP_Hor, bTestMergeAMP_Ver); 1011 #else 1012 deriveTestModeAMP (rpcBestCU, eParentPartSize, bTestAMP_Hor, bTestAMP_Ver); 1013 #endif 1014 1015 //! Do horizontal AMP 1016 if ( bTestAMP_Hor ) 1065 1017 { 1066 #if HHI_INTER_VIEW_RESIDUAL_PRED 1067 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 1068 #endif 1069 #if HHI_INTERVIEW_SKIP 1070 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnU, bFullyRenderedSec ); 1071 #else 1072 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnU ); 1073 #endif 1074 rpcTempCU->initEstData( uiDepth, iQP ); 1075 if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_2NxnU ) 1018 #if OL_DEPTHLIMIT_A0044 //add code here to select 2NxN or Nx2N or none 1019 #if OL_DO_NOT_LIMIT_INTRA_SLICES_PART 1020 if(depthMapDetect && !bIntraSliceDetect && sps->getUseDPL()) 1021 #else 1022 if(depthMapDetect && sps->getUseDPL()) //depth map being encoded 1023 #endif 1076 1024 { 1077 doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0; 1025 assert(uiDepth == (UInt)texPartInfo[uiPrevTexPartIndex+1]); 1026 if (bTry2NxN) 1027 { 1028 #endif 1029 if(doNotBlockPu) 1030 { 1031 #if HHI_INTER_VIEW_RESIDUAL_PRED 1032 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 1033 #endif 1034 #if HHI_INTERVIEW_SKIP 1035 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnU, bFullyRenderedSec ); 1036 #else 1037 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnU ); 1038 #endif 1039 rpcTempCU->initEstData( uiDepth, iQP ); 1040 if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_2NxnU ) 1041 { 1042 doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0; 1043 } 1044 } 1045 if(doNotBlockPu) 1046 { 1047 #if HHI_INTER_VIEW_RESIDUAL_PRED 1048 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 1049 #endif 1050 #if HHI_INTERVIEW_SKIP 1051 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnD, bFullyRenderedSec ); 1052 #else 1053 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnD ); 1054 #endif 1055 rpcTempCU->initEstData( uiDepth, iQP ); 1056 if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_2NxnD ) 1057 { 1058 doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0; 1059 } 1060 } 1061 #if OL_DEPTHLIMIT_A0044 1062 }//bTry2NxN 1063 }//depthMapDetect 1064 else//do things normally 1065 { 1066 if(doNotBlockPu) 1067 { 1068 #if HHI_INTER_VIEW_RESIDUAL_PRED 1069 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 1070 #endif 1071 #if HHI_INTERVIEW_SKIP 1072 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnU, bFullyRenderedSec ); 1073 #else 1074 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnU ); 1075 #endif 1076 rpcTempCU->initEstData( uiDepth, iQP ); 1077 if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_2NxnU ) 1078 { 1079 doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0; 1080 } 1081 } 1082 if(doNotBlockPu) 1083 { 1084 #if HHI_INTER_VIEW_RESIDUAL_PRED 1085 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 1086 #endif 1087 #if HHI_INTERVIEW_SKIP 1088 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnD, bFullyRenderedSec ); 1089 #else 1090 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnD ); 1091 #endif 1092 rpcTempCU->initEstData( uiDepth, iQP ); 1093 if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_2NxnD ) 1094 { 1095 doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0; 1096 } 1097 } 1078 1098 } 1099 #endif 1079 1100 } 1080 if(doNotBlockPu) 1101 #if AMP_MRG 1102 else if ( bTestMergeAMP_Hor ) 1081 1103 { 1082 #if HHI_INTER_VIEW_RESIDUAL_PRED 1083 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 1084 #endif 1085 #if HHI_INTERVIEW_SKIP 1086 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnD, bFullyRenderedSec ); 1087 #else 1088 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnD ); 1089 #endif 1090 rpcTempCU->initEstData( uiDepth, iQP ); 1091 if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_2NxnD ) 1104 #if OL_DEPTHLIMIT_A0044 //add code here to select 2NxN or Nx2N or none 1105 #if OL_DO_NOT_LIMIT_INTRA_SLICES_PART 1106 if(depthMapDetect && !bIntraSliceDetect && sps->getUseDPL()) 1107 #else 1108 if(depthMapDetect && sps->getUseDPL()) //depth map being encoded 1109 #endif 1092 1110 { 1093 doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0; 1111 assert(uiDepth == (UInt)texPartInfo[uiPrevTexPartIndex+1]); 1112 if (bTry2NxN) 1113 { 1114 #endif 1115 if(doNotBlockPu) 1116 { 1117 #if HHI_INTER_VIEW_RESIDUAL_PRED 1118 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 1119 #endif 1120 #if HHI_INTERVIEW_SKIP 1121 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnU, bFullyRenderedSec, true ); 1122 #else 1123 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnU, true ); 1124 #endif 1125 rpcTempCU->initEstData( uiDepth, iQP ); 1126 if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_2NxnU ) 1127 { 1128 doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0; 1129 } 1130 } 1131 if(doNotBlockPu) 1132 { 1133 #if HHI_INTER_VIEW_RESIDUAL_PRED 1134 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 1135 #endif 1136 #if HHI_INTERVIEW_SKIP 1137 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnD, bFullyRenderedSec, true ); 1138 #else 1139 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnD, true ); 1140 #endif 1141 rpcTempCU->initEstData( uiDepth, iQP ); 1142 if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_2NxnD ) 1143 { 1144 doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0; 1145 } 1146 } 1147 #if OL_DEPTHLIMIT_A0044 1148 }//bTry2NxN 1149 }//depthMapDetect 1150 else//do things normally 1151 { 1152 if(doNotBlockPu) 1153 { 1154 #if HHI_INTER_VIEW_RESIDUAL_PRED 1155 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 1156 #endif 1157 #if HHI_INTERVIEW_SKIP 1158 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnU, bFullyRenderedSec, true ); 1159 #else 1160 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnU, true ); 1161 #endif 1162 rpcTempCU->initEstData( uiDepth, iQP ); 1163 if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_2NxnU ) 1164 { 1165 doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0; 1166 } 1167 } 1168 if(doNotBlockPu) 1169 { 1170 #if HHI_INTER_VIEW_RESIDUAL_PRED 1171 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 1172 #endif 1173 #if HHI_INTERVIEW_SKIP 1174 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnD, bFullyRenderedSec, true ); 1175 #else 1176 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnD, true ); 1177 #endif 1178 rpcTempCU->initEstData( uiDepth, iQP ); 1179 if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_2NxnD ) 1180 { 1181 doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0; 1182 } 1183 } 1184 1094 1185 } 1186 #endif 1095 1187 } 1096 } 1097 #endif 1098 } 1188 #endif 1189 1190 //! Do horizontal AMP 1191 if ( bTestAMP_Ver ) 1192 { 1193 #if OL_DEPTHLIMIT_A0044 //add code here to select 2NxN or Nx2N or none 1194 #if OL_DO_NOT_LIMIT_INTRA_SLICES_PART 1195 if(depthMapDetect && !bIntraSliceDetect && sps->getUseDPL()) 1196 #else 1197 if(depthMapDetect && sps->getUseDPL()) //depth map being encoded 1198 #endif 1199 { 1200 assert(uiDepth == (UInt)texPartInfo[uiPrevTexPartIndex+1]); 1201 if (bTryNx2N) 1202 { 1203 #endif 1204 if(doNotBlockPu) 1205 { 1206 #if HHI_INTER_VIEW_RESIDUAL_PRED 1207 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 1208 #endif 1209 #if HHI_INTERVIEW_SKIP 1210 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nLx2N, bFullyRenderedSec ); 1211 #else 1212 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nLx2N ); 1213 #endif 1214 rpcTempCU->initEstData( uiDepth, iQP ); 1215 if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_nLx2N ) 1216 { 1217 doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0; 1218 } 1219 } 1220 if(doNotBlockPu) 1221 { 1222 #if HHI_INTER_VIEW_RESIDUAL_PRED 1223 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 1224 #endif 1225 #if HHI_INTERVIEW_SKIP 1226 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nRx2N, bFullyRenderedSec ); 1227 #else 1228 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nRx2N ); 1229 #endif 1230 rpcTempCU->initEstData( uiDepth, iQP ); 1231 } 1232 #if OL_DEPTHLIMIT_A0044 1233 }//bTryNx2N 1234 }//depthMapDetect 1235 else//do things normally 1236 { 1237 if(doNotBlockPu) 1238 { 1239 #if HHI_INTER_VIEW_RESIDUAL_PRED 1240 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 1241 #endif 1242 #if HHI_INTERVIEW_SKIP 1243 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nLx2N, bFullyRenderedSec ); 1244 #else 1245 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nLx2N ); 1246 #endif 1247 rpcTempCU->initEstData( uiDepth, iQP ); 1248 if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_nLx2N ) 1249 { 1250 doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0; 1251 } 1252 } 1253 if(doNotBlockPu) 1254 { 1255 #if HHI_INTER_VIEW_RESIDUAL_PRED 1256 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 1257 #endif 1258 #if HHI_INTERVIEW_SKIP 1259 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nRx2N, bFullyRenderedSec ); 1260 #else 1261 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nRx2N ); 1262 #endif 1263 rpcTempCU->initEstData( uiDepth, iQP ); 1264 } 1265 } 1266 #endif 1267 } 1099 1268 #if AMP_MRG 1100 else if ( bTestMergeAMP_Hor )1101 {1102 #if OL_DEPTHLIMIT //add code here to select 2NxN or Nx2N or none1269 else if ( bTestMergeAMP_Ver ) 1270 { 1271 #if OL_DEPTHLIMIT_A0044 //add code here to select 2NxN or Nx2N or none 1103 1272 #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 ) 1273 if(depthMapDetect && !bIntraSliceDetect && sps->getUseDPL()) 1274 #else 1275 if(depthMapDetect && sps->getUseDPL()) //depth map being encoded 1276 #endif 1125 1277 { 1126 doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0; 1278 assert(uiDepth == (UInt)texPartInfo[uiPrevTexPartIndex+1]); 1279 if (bTryNx2N) 1280 { 1281 #endif 1282 if(doNotBlockPu) 1283 { 1284 #if HHI_INTER_VIEW_RESIDUAL_PRED 1285 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 1286 #endif 1287 #if HHI_INTERVIEW_SKIP 1288 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nLx2N, bFullyRenderedSec, true ); 1289 #else 1290 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nLx2N, true ); 1291 #endif 1292 rpcTempCU->initEstData( uiDepth, iQP ); 1293 if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_nLx2N ) 1294 { 1295 doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0; 1296 } 1297 } 1298 if(doNotBlockPu) 1299 { 1300 #if HHI_INTER_VIEW_RESIDUAL_PRED 1301 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 1302 #endif 1303 #if HHI_INTERVIEW_SKIP 1304 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nRx2N, bFullyRenderedSec, true ); 1305 #else 1306 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nRx2N, true ); 1307 #endif 1308 rpcTempCU->initEstData( uiDepth, iQP ); 1309 } 1310 #if OL_DEPTHLIMIT_A0044 1311 }//bTryNx2N 1312 }//depthMapDetect 1313 else//do things normally 1314 { 1315 if(doNotBlockPu) 1316 { 1317 #if HHI_INTER_VIEW_RESIDUAL_PRED 1318 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 1319 #endif 1320 #if HHI_INTERVIEW_SKIP 1321 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nLx2N, bFullyRenderedSec, true ); 1322 #else 1323 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nLx2N, true ); 1324 #endif 1325 rpcTempCU->initEstData( uiDepth, iQP ); 1326 if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_nLx2N ) 1327 { 1328 doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0; 1329 } 1330 } 1331 if(doNotBlockPu) 1332 { 1333 #if HHI_INTER_VIEW_RESIDUAL_PRED 1334 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 1335 #endif 1336 #if HHI_INTERVIEW_SKIP 1337 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nRx2N, bFullyRenderedSec, true ); 1338 #else 1339 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nRx2N, true ); 1340 #endif 1341 rpcTempCU->initEstData( uiDepth, iQP ); 1342 } 1127 1343 } 1344 #endif 1128 1345 } 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 1187 1188 //! Do horizontal AMP 1189 if ( bTestAMP_Ver ) 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 1202 if(doNotBlockPu) 1203 { 1204 #if HHI_INTER_VIEW_RESIDUAL_PRED 1205 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 1206 #endif 1207 #if HHI_INTERVIEW_SKIP 1208 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nLx2N, bFullyRenderedSec ); 1209 #else 1210 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nLx2N ); 1211 #endif 1212 rpcTempCU->initEstData( uiDepth, iQP ); 1213 if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_nLx2N ) 1214 { 1215 doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0; 1216 } 1217 } 1218 if(doNotBlockPu) 1219 { 1220 #if HHI_INTER_VIEW_RESIDUAL_PRED 1221 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 1222 #endif 1223 #if HHI_INTERVIEW_SKIP 1224 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nRx2N, bFullyRenderedSec ); 1225 #else 1226 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nRx2N ); 1227 #endif 1228 rpcTempCU->initEstData( uiDepth, iQP ); 1229 } 1230 #if OL_DEPTHLIMIT 1231 }//bTryNx2N 1232 }//depthMapDetect 1233 else//do things normally 1234 { 1235 if(doNotBlockPu) 1236 { 1237 #if HHI_INTER_VIEW_RESIDUAL_PRED 1238 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 1239 #endif 1240 #if HHI_INTERVIEW_SKIP 1241 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nLx2N, bFullyRenderedSec ); 1242 #else 1243 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nLx2N ); 1244 #endif 1245 rpcTempCU->initEstData( uiDepth, iQP ); 1246 if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_nLx2N ) 1247 { 1248 doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0; 1249 } 1250 } 1251 if(doNotBlockPu) 1252 { 1253 #if HHI_INTER_VIEW_RESIDUAL_PRED 1254 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 1255 #endif 1256 #if HHI_INTERVIEW_SKIP 1257 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nRx2N, bFullyRenderedSec ); 1258 #else 1259 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nRx2N ); 1260 #endif 1261 rpcTempCU->initEstData( uiDepth, iQP ); 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 1343 } 1344 #endif 1345 1346 #else 1347 #if HHI_INTER_VIEW_RESIDUAL_PRED 1348 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 1349 #endif 1350 #if HHI_INTERVIEW_SKIP 1351 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnU, bFullyRenderedSec ); 1352 #else 1353 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnU ); 1354 #endif 1355 rpcTempCU->initEstData( uiDepth, iQP ); 1356 #if HHI_INTER_VIEW_RESIDUAL_PRED 1357 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 1358 #endif 1359 #if HHI_INTERVIEW_SKIP 1360 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnD, bFullyRenderedSec ); 1361 #else 1362 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnD ); 1363 #endif 1364 rpcTempCU->initEstData( uiDepth, iQP ); 1365 #if HHI_INTER_VIEW_RESIDUAL_PRED 1366 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 1367 #endif 1368 #if HHI_INTERVIEW_SKIP 1369 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nLx2N, bFullyRenderedSec ); 1370 #else 1371 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nLx2N ); 1372 #endif 1373 rpcTempCU->initEstData( uiDepth, iQP ); 1374 #if HHI_INTER_VIEW_RESIDUAL_PRED 1375 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 1376 #endif 1377 #if HHI_INTERVIEW_SKIP 1378 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nRx2N, bFullyRenderedSec ); 1379 #else 1380 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nRx2N ); 1381 #endif 1382 rpcTempCU->initEstData( uiDepth, iQP ); 1383 1384 #endif 1385 } //! Try AMP (SIZE_2NxnU, SIZE_2NxnD, SIZE_nLx2N, SIZE_nRx2N) 1346 #endif 1347 1348 #else 1349 #if HHI_INTER_VIEW_RESIDUAL_PRED 1350 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 1351 #endif 1352 #if HHI_INTERVIEW_SKIP 1353 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnU, bFullyRenderedSec ); 1354 #else 1355 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnU ); 1356 #endif 1357 rpcTempCU->initEstData( uiDepth, iQP ); 1358 #if HHI_INTER_VIEW_RESIDUAL_PRED 1359 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 1360 #endif 1361 #if HHI_INTERVIEW_SKIP 1362 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnD, bFullyRenderedSec ); 1363 #else 1364 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnD ); 1365 #endif 1366 rpcTempCU->initEstData( uiDepth, iQP ); 1367 #if HHI_INTER_VIEW_RESIDUAL_PRED 1368 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 1369 #endif 1370 #if HHI_INTERVIEW_SKIP 1371 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nLx2N, bFullyRenderedSec ); 1372 #else 1373 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nLx2N ); 1374 #endif 1375 rpcTempCU->initEstData( uiDepth, iQP ); 1376 #if HHI_INTER_VIEW_RESIDUAL_PRED 1377 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 1378 #endif 1379 #if HHI_INTERVIEW_SKIP 1380 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nRx2N, bFullyRenderedSec ); 1381 #else 1382 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nRx2N ); 1383 #endif 1384 rpcTempCU->initEstData( uiDepth, iQP ); 1385 1386 #endif 1387 } //! Try AMP (SIZE_2NxnU, SIZE_2NxnD, SIZE_nLx2N, SIZE_nRx2N) 1386 1388 #endif 1387 1389 #if HHI_INTER_VIEW_RESIDUAL_PRED … … 1399 1401 // speedup for inter frames 1400 1402 #if HHI_INTERVIEW_SKIP 1401 if( ( rpcBestCU->getSlice()->getSliceType() == I_SLICE ||1402 1403 1404 1403 if( ( rpcBestCU->getSlice()->getSliceType() == I_SLICE || 1404 rpcBestCU->getCbf( 0, TEXT_LUMA ) != 0 || 1405 rpcBestCU->getCbf( 0, TEXT_CHROMA_U ) != 0 || 1406 rpcBestCU->getCbf( 0, TEXT_CHROMA_V ) != 0 ) && !bFullyRenderedSec ) // avoid very complex intra if it is unlikely 1405 1407 #else 1406 1408 if( rpcBestCU->getSlice()->getSliceType() == I_SLICE || … … 1414 1416 if( uiDepth == g_uiMaxCUDepth - g_uiAddCUDepth ) 1415 1417 { 1416 #if OL_DEPTHLIMIT //add code here to select or deselect NxN mode for Intra1418 #if OL_DEPTHLIMIT_A0044 //add code here to select or deselect NxN mode for Intra 1417 1419 #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 1428 if( rpcTempCU->getWidth(0) > ( 1 << rpcTempCU->getSlice()->getSPS()->getQuadtreeTULog2MinSize() ) ) 1420 if(depthMapDetect && !bIntraSliceDetect && sps->getUseDPL()) 1421 #else 1422 if(depthMapDetect && sps->getUseDPL()) //depth map being encoded 1423 #endif 1429 1424 { 1430 xCheckRDCostIntra( rpcBestCU, rpcTempCU, SIZE_NxN ); 1431 rpcTempCU->initEstData( uiDepth, iQP ); 1425 assert(uiDepth == (UInt)texPartInfo[uiPrevTexPartIndex+1]); 1426 if (bTrySplit) 1427 { 1428 1429 #endif 1430 if( rpcTempCU->getWidth(0) > ( 1 << rpcTempCU->getSlice()->getSPS()->getQuadtreeTULog2MinSize() ) ) 1431 { 1432 xCheckRDCostIntra( rpcBestCU, rpcTempCU, SIZE_NxN ); 1433 rpcTempCU->initEstData( uiDepth, iQP ); 1434 } 1435 #if OL_DEPTHLIMIT_A0044 1436 }//bTrySplit 1437 }//depthMapDetect 1438 else 1439 { 1440 if( rpcTempCU->getWidth(0) > ( 1 << rpcTempCU->getSlice()->getSPS()->getQuadtreeTULog2MinSize() ) ) 1441 { 1442 xCheckRDCostIntra( rpcBestCU, rpcTempCU, SIZE_NxN ); 1443 rpcTempCU->initEstData( uiDepth, iQP ); 1444 } 1432 1445 } 1433 #if OL_DEPTHLIMIT1434 }//bTrySplit1435 }//depthMapDetect1436 else1437 {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 1446 #endif 1445 1447 } … … 1498 1500 #endif 1499 1501 { 1500 rpcBestCU->getTotalCost() = m_pcRdCost->calcRdCost( rpcBestCU->getTotalBits(), rpcBestCU->getTotalDistortion() );1502 rpcBestCU->getTotalCost() = m_pcRdCost->calcRdCost( rpcBestCU->getTotalBits(), rpcBestCU->getTotalDistortion() ); 1501 1503 } 1502 1504 … … 1522 1524 } 1523 1525 #if HHI_INTERVIEW_SKIP 1524 rpcBestCU->setRenderableSubParts(bFullyRenderedSec,0,rpcBestCU->getDepth( 0 )) ;1526 rpcBestCU->setRenderableSubParts(bFullyRenderedSec,0,rpcBestCU->getDepth( 0 )) ; 1525 1527 #endif 1526 1528 } … … 1586 1588 { 1587 1589 #if LOSSLESS_CODING 1588 1589 1590 1591 1590 if (isAddLowestQP && (iQP == iMinQP)) 1591 { 1592 iQP = lowestQP; 1593 } 1592 1594 #endif 1593 1595 rpcTempCU->initEstData( uiDepth, iQP ); … … 1698 1700 #endif 1699 1701 { 1700 rpcTempCU->getTotalCost() = m_pcRdCost->calcRdCost( rpcTempCU->getTotalBits(), rpcTempCU->getTotalDistortion() );1702 rpcTempCU->getTotalCost() = m_pcRdCost->calcRdCost( rpcTempCU->getTotalBits(), rpcTempCU->getTotalDistortion() ); 1701 1703 } 1702 1704 … … 1707 1709 { 1708 1710 if( ( pcPic->getCU( rpcTempCU->getAddr() )->getEntropySliceStartCU(uiBlkIdx+rpcTempCU->getZorderIdxInCU()) == rpcTempCU->getSlice()->getEntropySliceCurStartCUAddr() ) && 1709 1711 ( rpcTempCU->getCbf( uiBlkIdx, TEXT_LUMA ) || rpcTempCU->getCbf( uiBlkIdx, TEXT_CHROMA_U ) || rpcTempCU->getCbf( uiBlkIdx, TEXT_CHROMA_V ) ) ) 1710 1712 { 1711 1713 bHasRedisual = true; … … 1741 1743 #endif 1742 1744 { 1743 rpcTempCU->getTotalCost() = m_pcRdCost->calcRdCost( rpcTempCU->getTotalBits(), rpcTempCU->getTotalDistortion() );1745 rpcTempCU->getTotalCost() = m_pcRdCost->calcRdCost( rpcTempCU->getTotalBits(), rpcTempCU->getTotalDistortion() ); 1744 1746 } 1745 1747 #endif … … 1790 1792 } // with sub partitioned prediction. 1791 1793 #if LOSSLESS_CODING 1792 1793 1794 1795 1794 if (isAddLowestQP && (iQP == lowestQP)) 1795 { 1796 iQP = iMinQP; 1797 } 1796 1798 #endif 1797 1799 } // SPLIT- QP Loop … … 1800 1802 if( m_pcRdCost->getUseRenModel() ) 1801 1803 { 1802 1803 1804 1805 1806 1804 UInt uiWidth = m_ppcRecoYuvBest[uiDepth]->getWidth ( ); 1805 UInt uiHeight = m_ppcRecoYuvBest[uiDepth]->getHeight ( ); 1806 Pel* piSrc = m_ppcRecoYuvBest[uiDepth]->getLumaAddr( 0 ); 1807 UInt uiSrcStride = m_ppcRecoYuvBest[uiDepth]->getStride ( ); 1808 m_pcRdCost->setRenModelData( rpcBestCU, 0, piSrc, uiSrcStride, uiWidth, uiHeight ); 1807 1809 } 1808 1810 #endif … … 2027 2029 2028 2030 if( ( uiRPelX < pcSlice->getSPS()->getPicWidthInLumaSamples() ) && ( uiBPelY < pcSlice->getSPS()->getPicHeightInLumaSamples() ) ) 2029 2031 { 2030 2032 m_pcEntropyCoder->encodeSplitFlag( pcCU, uiAbsPartIdx, uiDepth ); 2031 } 2033 } 2034 2032 2035 if( !pcCU->getSlice()->isIntra() ) 2033 2036 { … … 2095 2098 if( pcCU->isSkipped( uiAbsPartIdx ) ) 2096 2099 { 2097 #if OL_DEPTHLIMIT 2098 2099 2100 2101 2102 2100 #if OL_DEPTHLIMIT_A0044 2101 if(pcCU->getPartDumpFlag()) 2102 { 2103 pcCU->updatePartInfo(0,uiDepth); 2104 pcCU->incrementPartInfo(); 2105 } 2103 2106 #endif 2104 2107 m_pcEntropyCoder->encodeMergeIndex( pcCU, uiAbsPartIdx, 0 ); -
branches/HTM-4.0-Orange/source/Lib/TLibEncoder/TEncGOP.cpp
r112 r117 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 // } 1138 #if OL_DEPTHLIMIT_A0044 //start dumping partition information 1139 m_pcSliceEncoder->setPartDumpFlag(1); 1144 1140 #endif 1145 1141 pcSlice->setTileLocationCount ( 0 ); 1146 1142 m_pcSliceEncoder->encodeSlice(pcPic, pcBitstreamRedirect, pcSubstreamsOut); // redirect is only used for CAVLC tile position info. 1147 #if OL_DEPTHLIMIT //stop dumping partition information1148 1143 #if OL_DEPTHLIMIT_A0044 //stop dumping partition information 1144 m_pcSliceEncoder->setPartDumpFlag(0); 1149 1145 #endif 1150 1146 } 1151 1147 else 1152 1148 { 1153 #if OL_DEPTHLIMIT //start dumping partition information1154 1149 #if OL_DEPTHLIMIT_A0044 //start dumping partition information 1150 m_pcSliceEncoder->setPartDumpFlag(1); 1155 1151 #endif 1156 1152 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 information1158 1153 #if OL_DEPTHLIMIT_A0044 //stop dumping partition information 1154 m_pcSliceEncoder->setPartDumpFlag(0); 1159 1155 #endif 1160 1156 } -
branches/HTM-4.0-Orange/source/Lib/TLibEncoder/TEncSbac.cpp
r112 r117 580 580 { 581 581 PartSize eSize = pcCU->getPartitionSize( uiAbsPartIdx ); 582 #if OL_DEPTHLIMIT 582 #if OL_DEPTHLIMIT_A0044 583 583 UInt uiSymbol; 584 584 #endif … … 588 588 { 589 589 m_pcBinIf->encodeBin( eSize == SIZE_2Nx2N? 1 : 0, m_cCUPartSizeSCModel.get( 0, 0, 0 ) ); 590 #if OL_DEPTHLIMIT 591 592 593 594 595 596 597 #endif 598 } 599 #if OL_DEPTHLIMIT 600 601 602 603 604 590 #if OL_DEPTHLIMIT_A0044 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_A0044 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 605 #endif 606 606 return; … … 609 609 switch(eSize) 610 610 { 611 611 case SIZE_2Nx2N: 612 612 { 613 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 } 614 #if OL_DEPTHLIMIT_A0044 615 if(pcCU->getPartDumpFlag()) 616 { 617 pcCU->updatePartInfo(0,uiDepth); //0 for 2Nx2N 618 pcCU->incrementPartInfo(); 619 } 623 620 #endif 624 621 break; 625 622 } 626 627 628 623 case SIZE_2NxN: 624 case SIZE_2NxnU: 625 case SIZE_2NxnD: 629 626 { 630 627 m_pcBinIf->encodeBin( 0, m_cCUPartSizeSCModel.get( 0, 0, 0) ); … … 651 648 } 652 649 } 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 } 650 #if OL_DEPTHLIMIT_A0044 651 if(pcCU->getPartDumpFlag()) 652 { 653 pcCU->updatePartInfo(2,uiDepth); //2 for 2NxN 654 pcCU->incrementPartInfo(); 655 } 662 656 #endif 663 657 break; 664 658 } 665 666 667 659 case SIZE_Nx2N: 660 case SIZE_nLx2N: 661 case SIZE_nRx2N: 668 662 { 669 663 m_pcBinIf->encodeBin( 0, m_cCUPartSizeSCModel.get( 0, 0, 0) ); … … 694 688 } 695 689 } 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 } 690 #if OL_DEPTHLIMIT_A0044 691 if(pcCU->getPartDumpFlag()) 692 { 693 pcCU->updatePartInfo(3,uiDepth); //3 for Nx2N 694 pcCU->incrementPartInfo(); 695 } 705 696 #endif 706 697 break; 707 698 } 708 699 case SIZE_NxN: 709 700 { 710 701 if( uiDepth == g_uiMaxCUDepth - g_uiAddCUDepth && !( pcCU->getSlice()->getSPS()->getDisInter4x4() && pcCU->getWidth(uiAbsPartIdx) == 8 && pcCU->getHeight(uiAbsPartIdx) == 8 ) ) … … 713 704 m_pcBinIf->encodeBin( 0, m_cCUPartSizeSCModel.get( 0, 0, 1) ); 714 705 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 } 706 #if OL_DEPTHLIMIT_A0044 707 if(pcCU->getPartDumpFlag()) 708 { 709 pcCU->updatePartInfo(1,uiDepth); //2Nx2N here since we disable NxN in Inter 710 pcCU->incrementPartInfo(); 711 } 712 #endif 713 } 714 else 715 { 716 #if OL_DEPTHLIMIT_A0044 717 if(pcCU->getPartDumpFlag()) 718 { 719 pcCU->updatePartInfo(0,uiDepth); //2Nx2N here since we disable NxN in Inter 720 pcCU->incrementPartInfo(); 721 } 737 722 #endif 738 723 } 739 724 break; 740 725 } 741 726 default: 742 727 { 743 728 assert(0); … … 899 884 assert( uiCtx < 3 ); 900 885 m_pcBinIf->encodeBin( uiCurrSplitFlag, m_cCUSplitFlagSCModel.get( 0, 0, uiCtx ) ); 901 #if OL_DEPTHLIMIT 886 #if OL_DEPTHLIMIT_A0044 902 887 if(pcCU->getPartDumpFlag()) 903 888 { 904 905 906 907 908 889 if(pcCU->getSlice()->isIntra() || (!pcCU->getSlice()->isIntra() && uiCurrSplitFlag!=0)) 890 { 891 pcCU->updatePartInfo(uiCurrSplitFlag,uiDepth); 892 pcCU->incrementPartInfo(); 893 } 909 894 } 910 895 #endif -
branches/HTM-4.0-Orange/source/Lib/TLibEncoder/TEncSlice.cpp
r112 r117 849 849 #endif 850 850 851 #if OL_DEPTHLIMIT //stop dumping partition information852 b_dumpPartInfo = 0;853 pcCU->setPartDumpFlag(b_dumpPartInfo);851 #if OL_DEPTHLIMIT_A0044 //stop dumping partition information 852 m_bDumpPartInfo = 0; 853 pcCU->setPartDumpFlag(m_bDumpPartInfo); 854 854 #endif 855 855 … … 1312 1312 1313 1313 TComDataCU*& pcCU = rpcPic->getCU( uiCUAddr ); 1314 #if OL_DEPTHLIMIT 1315 pcCU->setPartDumpFlag(b_dumpPartInfo);1316 1314 #if OL_DEPTHLIMIT_A0044 1315 pcCU->setPartDumpFlag(m_bDumpPartInfo); 1316 pcCU->resetPartInfo(); 1317 1317 #endif 1318 1318 #if !REMOVE_TILE_DEPENDENCE -
branches/HTM-4.0-Orange/source/Lib/TLibEncoder/TEncSlice.h
r112 r117 101 101 102 102 UInt m_uiSliceIdx; 103 #if OL_DEPTHLIMIT //flag to signal to start dumping104 bool b_dumpPartInfo;103 #if OL_DEPTHLIMIT_A0044 //flag to signal to start dumping 104 Bool m_bDumpPartInfo; 105 105 #endif 106 106 public: … … 131 131 UInt getSliceIdx() { return m_uiSliceIdx; } 132 132 Void setSliceIdx(UInt i) { m_uiSliceIdx = i; } 133 #if OL_DEPTHLIMIT //flag to signal to start dumping134 Void setPartDumpFlag(bool flag) {b_dumpPartInfo = flag;};133 #if OL_DEPTHLIMIT_A0044 //flag to signal to start dumping 134 Void setPartDumpFlag(Bool flag) { m_bDumpPartInfo = flag;}; 135 135 #endif 136 136 }; -
branches/HTM-4.0-Orange/source/Lib/TLibEncoder/TEncTop.cpp
r112 r117 768 768 m_cSPS.setUseDMM( m_bUseDMM ); 769 769 #endif 770 #if OL_DEPTHLIMIT 770 #if OL_DEPTHLIMIT_A0044 771 771 m_cSPS.setUseDPL( m_bDepthPartitionLimiting ); 772 772 #endif
Note: See TracChangeset for help on using the changeset viewer.