Changeset 332 in 3DVCSoftware for trunk/source/Lib/TLibEncoder
- Timestamp:
- 21 Apr 2013, 19:13:11 (12 years ago)
- Location:
- trunk/source/Lib/TLibEncoder
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/Lib/TLibEncoder/TEncCavlc.cpp
r313 r332 442 442 #endif 443 443 #endif 444 #if HHI_MPI || OL_QTLIMIT_PREDCODING_B0068444 #if HHI_MPI || H3D_QTL 445 445 Void TEncCavlc::codeSPS( TComSPS* pcSPS, Bool bIsDepth ) 446 446 #else … … 632 632 #endif 633 633 634 #if OL_QTLIMIT_PREDCODING_B0068634 #if H3D_QTL 635 635 if( bIsDepth ) 636 636 { -
trunk/source/Lib/TLibEncoder/TEncCavlc.h
r296 r332 114 114 #endif 115 115 116 #if HHI_MPI || OL_QTLIMIT_PREDCODING_B0068116 #if HHI_MPI || H3D_QTL 117 117 Void codeSPS ( TComSPS* pcSPS, Bool bIsDepth ); 118 118 #else -
trunk/source/Lib/TLibEncoder/TEncCfg.h
r296 r332 309 309 #endif 310 310 311 #if OL_QTLIMIT_PREDCODING_B0068311 #if H3D_QTL 312 312 Bool m_bUseQTLPC; 313 313 #endif … … 790 790 #endif 791 791 792 #if OL_QTLIMIT_PREDCODING_B0068792 #if H3D_QTL 793 793 Void setUseQTLPC( Bool b ) { m_bUseQTLPC = b; } 794 794 Bool getUseQTLPC() { return m_bUseQTLPC; } -
trunk/source/Lib/TLibEncoder/TEncCu.cpp
r296 r332 420 420 TComPic* pcPic = rpcBestCU->getPic(); 421 421 422 #if OL_QTLIMIT_PREDCODING_B0068422 #if H3D_QTL 423 423 TComSPS *sps = pcPic->getSlice(0)->getSPS(); 424 424 TComPic *pcTexture = rpcBestCU->getSlice()->getTexturePic(); … … 427 427 Bool bIntraSliceDetect = (rpcBestCU->getSlice()->getSliceType() == I_SLICE); 428 428 429 #if HHI_QTLPC_RAU_OFF_C0160430 429 Bool rapPic = (rpcBestCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR || rpcBestCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA); 431 #endif432 430 433 431 Bool bTry2NxN = true; … … 571 569 rpcTempCU->initEstData( uiDepth, iQP ); 572 570 573 #if OL_QTLIMIT_PREDCODING_B0068571 #if H3D_QTL 574 572 //logic for setting bTrySplit using the partition information that is stored of the texture colocated CU 575 573 576 #if HHI_QTLPC_RAU_OFF_C0160577 574 if(depthMapDetect && !bIntraSliceDetect && !rapPic && sps->getUseQTLPC()) 578 #else579 if(depthMapDetect && !bIntraSliceDetect && sps->getUseQTLPC())580 #endif581 575 { 582 576 TComDataCU* pcTextureCU = pcTexture->getCU( rpcBestCU->getAddr() ); //Corresponding texture LCU … … 602 596 { 603 597 #if H3D_IVRP 604 #if MTK_MDIVRP_C0138605 598 Bool bResPredAvailable = false; 606 599 UInt uiResPrdId = 0; 607 #else608 // check availability of residual prediction609 Bool bResPredAvailable = false;610 Bool bResPredAllowed = (!rpcBestCU->getSlice()->getSPS()->isDepth () );611 bResPredAllowed = bResPredAllowed && ( rpcBestCU->getSlice()->getSPS()->getViewId () );612 bResPredAllowed = bResPredAllowed && ( rpcBestCU->getSlice()->getSPS()->getMultiviewResPredMode() );613 if( bResPredAllowed )614 {615 bResPredAvailable = rpcBestCU->getResidualSamples( 0, true , m_ppcResPredTmp[uiDepth] );616 }617 618 for( UInt uiResPrdId = 0; uiResPrdId < ( bResPredAvailable ? 2 : 1 ); uiResPrdId++ )619 #endif620 600 { 621 601 Bool bResPredFlag = ( uiResPrdId > 0 ); … … 648 628 } 649 629 } 650 #if LGE_ILLUCOMP_B0045 _ENCSIMP630 #if LGE_ILLUCOMP_B0045 651 631 if(bICFlag && rpcBestCU->getMergeFlag(0) && !rpcBestCU->getICFlag(0)) 652 632 { … … 661 641 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 662 642 #endif 663 #if FIX_LGE_ILLUCOMP_B0045643 #if LGE_ILLUCOMP_B0045 664 644 rpcTempCU->setICFlagSubParts(bICFlag, 0, 0, uiDepth); 665 645 #endif … … 684 664 } // != I_SLICE 685 665 686 #if LGE_ILLUCOMP_B0045 _ENCSIMP666 #if LGE_ILLUCOMP_B0045 687 667 bICEnabled = rpcBestCU->getICFlag(0); 688 668 #endif 689 669 690 #if OL_QTLIMIT_PREDCODING_B0068 691 692 #if HHI_QTLPC_RAU_OFF_C0160 670 #if H3D_QTL 671 693 672 if(depthMapDetect && !bIntraSliceDetect && !rapPic && sps->getUseQTLPC()) 694 #else695 if(depthMapDetect && !bIntraSliceDetect && sps->getUseQTLPC())696 #endif697 673 { 698 674 bTrySplitDQP = bTrySplit; … … 712 688 bTrySplitDQP = bTrySplit; 713 689 } 714 #if OL_QTLIMIT_PREDCODING_B0068690 #if H3D_QTL 715 691 } 716 692 #endif … … 739 715 { 740 716 #if H3D_IVRP 741 #if MTK_MDIVRP_C0138742 717 Bool bResPredAvailable = false; 743 718 UInt uiResPrdId = 0; 744 #else745 // check availability of residual prediction746 Bool bResPredAvailable = false;747 Bool bResPredAllowed = (!rpcBestCU->getSlice()->getSPS()->isDepth () );748 bResPredAllowed = bResPredAllowed && ( rpcBestCU->getSlice()->getSPS()->getViewId () );749 bResPredAllowed = bResPredAllowed && ( rpcBestCU->getSlice()->getSPS()->getMultiviewResPredMode() );750 if( bResPredAllowed )751 {752 bResPredAvailable = rpcBestCU->getResidualSamples( 0, true, m_ppcResPredTmp[uiDepth] );753 }754 755 for( UInt uiResPrdId = 0; uiResPrdId < ( bResPredAvailable ? 2 : 1 ); uiResPrdId++ )756 #endif757 719 { 758 720 Bool bResPredFlag = ( uiResPrdId > 0 ); … … 772 734 if( uiDepth == g_uiMaxCUDepth - g_uiAddCUDepth && doNotBlockPu) 773 735 { 774 #if OL_QTLIMIT_PREDCODING_B0068//try InterNxN736 #if H3D_QTL //try InterNxN 775 737 if(bTrySplit) 776 738 { … … 785 747 #endif 786 748 rpcTempCU->initEstData( uiDepth, iQP ); 787 #if OL_QTLIMIT_PREDCODING_B0068749 #if H3D_QTL 788 750 } 789 751 #endif … … 793 755 794 756 { // 2NxN, Nx2N 795 #if OL_QTLIMIT_PREDCODING_B0068//try Nx2N757 #if H3D_QTL //try Nx2N 796 758 if(bTryNx2N) 797 759 { … … 802 764 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 803 765 #endif 804 #if FIX_LGE_ILLUCOMP_B0045766 #if LGE_ILLUCOMP_B0045 805 767 rpcTempCU->setICFlagSubParts(bICFlag, 0, 0, uiDepth); 806 768 #endif … … 816 778 } 817 779 } 818 #if OL_QTLIMIT_PREDCODING_B0068780 #if H3D_QTL 819 781 } 820 782 #endif 821 783 822 #if OL_QTLIMIT_PREDCODING_B0068//try 2NxN784 #if H3D_QTL //try 2NxN 823 785 if(bTry2NxN) 824 786 { … … 829 791 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 830 792 #endif 831 #if FIX_LGE_ILLUCOMP_B0045793 #if LGE_ILLUCOMP_B0045 832 794 rpcTempCU->setICFlagSubParts(bICFlag, 0, 0, uiDepth); 833 795 #endif … … 843 805 } 844 806 } 845 #if OL_QTLIMIT_PREDCODING_B0068807 #if H3D_QTL 846 808 } 847 809 #endif … … 866 828 if ( bTestAMP_Hor ) 867 829 { 868 #if OL_QTLIMIT_PREDCODING_B0068//try 2NxnU & 2NxnD830 #if H3D_QTL //try 2NxnU & 2NxnD 869 831 if(bTry2NxN) 870 832 { … … 875 837 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 876 838 #endif 877 #if FIX_LGE_ILLUCOMP_B0045839 #if LGE_ILLUCOMP_B0045 878 840 rpcTempCU->setICFlagSubParts(bICFlag, 0, 0, uiDepth); 879 841 #endif … … 894 856 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 895 857 #endif 896 #if FIX_LGE_ILLUCOMP_B0045858 #if LGE_ILLUCOMP_B0045 897 859 rpcTempCU->setICFlagSubParts(bICFlag, 0, 0, uiDepth); 898 860 #endif … … 908 870 } 909 871 } 910 #if OL_QTLIMIT_PREDCODING_B0068872 #if H3D_QTL 911 873 } 912 874 #endif … … 915 877 else if ( bTestMergeAMP_Hor ) 916 878 { 917 #if OL_QTLIMIT_PREDCODING_B0068//try 2NxnU & 2NxnD Merge879 #if H3D_QTL //try 2NxnU & 2NxnD Merge 918 880 if(bTry2NxN) 919 881 { … … 924 886 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 925 887 #endif 926 #if FIX_LGE_ILLUCOMP_B0045888 #if LGE_ILLUCOMP_B0045 927 889 rpcTempCU->setICFlagSubParts(bICFlag, 0, 0, uiDepth); 928 890 #endif … … 943 905 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 944 906 #endif 945 #if FIX_LGE_ILLUCOMP_B0045907 #if LGE_ILLUCOMP_B0045 946 908 rpcTempCU->setICFlagSubParts(bICFlag, 0, 0, uiDepth); 947 909 #endif … … 957 919 } 958 920 } 959 #if OL_QTLIMIT_PREDCODING_B0068921 #if H3D_QTL 960 922 } 961 923 #endif … … 966 928 if ( bTestAMP_Ver ) 967 929 { 968 #if OL_QTLIMIT_PREDCODING_B0068//try nLx2N & nRx2N930 #if H3D_QTL //try nLx2N & nRx2N 969 931 if(bTryNx2N) 970 932 { … … 975 937 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 976 938 #endif 977 #if FIX_LGE_ILLUCOMP_B0045939 #if LGE_ILLUCOMP_B0045 978 940 rpcTempCU->setICFlagSubParts(bICFlag, 0, 0, uiDepth); 979 941 #endif … … 994 956 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 995 957 #endif 996 #if FIX_LGE_ILLUCOMP_B0045958 #if LGE_ILLUCOMP_B0045 997 959 rpcTempCU->setICFlagSubParts(bICFlag, 0, 0, uiDepth); 998 960 #endif … … 1004 966 rpcTempCU->initEstData( uiDepth, iQP ); 1005 967 } 1006 #if OL_QTLIMIT_PREDCODING_B0068968 #if H3D_QTL 1007 969 } 1008 970 #endif … … 1011 973 else if ( bTestMergeAMP_Ver ) 1012 974 { 1013 #if OL_QTLIMIT_PREDCODING_B0068//try nLx2N & nRx2N (Merge)975 #if H3D_QTL //try nLx2N & nRx2N (Merge) 1014 976 if(bTryNx2N) 1015 977 { … … 1020 982 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 1021 983 #endif 1022 #if FIX_LGE_ILLUCOMP_B0045984 #if LGE_ILLUCOMP_B0045 1023 985 rpcTempCU->setICFlagSubParts(bICFlag, 0, 0, uiDepth); 1024 986 #endif … … 1039 1001 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 1040 1002 #endif 1041 #if FIX_LGE_ILLUCOMP_B00451003 #if LGE_ILLUCOMP_B0045 1042 1004 rpcTempCU->setICFlagSubParts(bICFlag, 0, 0, uiDepth); 1043 1005 #endif … … 1049 1011 rpcTempCU->initEstData( uiDepth, iQP ); 1050 1012 } 1051 #if OL_QTLIMIT_PREDCODING_B00681013 #if H3D_QTL 1052 1014 } 1053 1015 #endif … … 1143 1105 if( uiDepth == g_uiMaxCUDepth - g_uiAddCUDepth ) 1144 1106 { 1145 #if OL_QTLIMIT_PREDCODING_B0068//Try IntraNxN1107 #if H3D_QTL //Try IntraNxN 1146 1108 if(bTrySplit) 1147 1109 { … … 1155 1117 rpcTempCU->initEstData( uiDepth, iQP ); 1156 1118 } 1157 #if OL_QTLIMIT_PREDCODING_B00681119 #if H3D_QTL 1158 1120 } 1159 1121 #endif … … 1805 1767 ); 1806 1768 #endif 1807 #if H3D_IVRP && !MTK_MDIVRP_C01381808 m_pcEntropyCoder->encodeResPredFlag( pcCU, uiAbsPartIdx, 0 );1809 #endif1810 1769 finishCU(pcCU,uiAbsPartIdx,uiDepth); 1811 1770 return; … … 1839 1798 #endif 1840 1799 ); 1841 #endif1842 #if H3D_IVRP && !MTK_MDIVRP_C01381843 if( !pcCU->isIntra( uiAbsPartIdx ) )1844 {1845 m_pcEntropyCoder->encodeResPredFlag( pcCU, uiAbsPartIdx, 0 );1846 }1847 1800 #endif 1848 1801 #if HHI_MPI … … 1880 1833 Int numValidMergeCand = 0; 1881 1834 1882 #if H3D_IVRP && !MTK_MDIVRP_C01381883 Bool bResPrdAvail = rpcTempCU->getResPredAvail( 0 );1884 Bool bResPrdFlag = rpcTempCU->getResPredFlag ( 0 );1885 #endif1886 1835 #if LGE_ILLUCOMP_B0045 1887 1836 Bool bICFlag = rpcTempCU->getICFlag(0); … … 1916 1865 rpcTempCU->getInterMergeCandidates( 0, 0, uhDepth, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand ); 1917 1866 #endif 1918 #if MTK_MDIVRP_C01381867 #if H3D_IVRP 1919 1868 Bool bResPredAvail = rpcTempCU->getResPredAvail(0); 1920 1869 #endif … … 1978 1927 1979 1928 #if H3D_IVRP 1980 #if MTK_MDIVRP_C01381981 1929 rpcTempCU->setResPredAvailSubParts(bResPredAvail, 0, 0, uhDepth); 1982 #else1983 rpcTempCU->setResPredAvailSubParts( bResPrdAvail, 0, 0, uhDepth );1984 rpcTempCU->setResPredFlagSubParts ( bResPrdFlag, 0, 0, uhDepth );1985 #endif1986 1930 #endif 1987 1931 #if LGE_ILLUCOMP_B0045 … … 2001 1945 m_pcPredSearch->motionCompensation ( rpcTempCU, m_ppcPredYuvTemp[uhDepth] ); 2002 1946 #endif 2003 #if MTK_MDIVRP_C01381947 #if H3D_IVRP 2004 1948 if (uiMergeCand == 0 && rpcTempCU->getResPredAvail(0)) 2005 1949 { … … 2020 1964 m_pcPredSearch->motionCompensation ( rpcTempCU, m_ppcPredYuvTemp[uhDepth] ); 2021 1965 #endif 2022 #if MTK_MDIVRP_C01381966 #if H3D_IVRP 2023 1967 if (uiMergeCand == 0 && rpcTempCU->getResPredAvail(0)) 2024 1968 { … … 2120 2064 #endif 2121 2065 rpcTempCU->setPredModeSubParts ( MODE_INTER, 0, uhDepth ); 2122 2123 #if H3D_IVRP2124 #if !LG_RESTRICTEDRESPRED_M247662125 if( rpcTempCU->getResPredFlag( 0 ) )2126 { // subtract residual prediction from original in motion search2127 m_ppcOrigYuv[uhDepth]->add( m_ppcResPredTmp [uhDepth], rpcTempCU->getWidth( 0 ), rpcTempCU->getHeight( 0 ), true );2128 }2129 #endif2130 #endif2131 2066 2132 2067 #if AMP_MRG 2133 2068 rpcTempCU->setMergeAMP (true); 2134 2069 #if HHI_INTERVIEW_SKIP 2135 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C01382136 m_pcPredSearch->predInterSearch ( rpcTempCU, m_ppcOrigYuv[uhDepth], m_ppcResPredTmp[uhDepth], m_ppcPredYuvTemp[uhDepth], m_ppcResiYuvTemp[uhDepth], m_ppcRecoYuvTemp[uhDepth], bSkipRes, bUseMRG);2137 #else2138 2070 m_pcPredSearch->predInterSearch ( rpcTempCU, m_ppcOrigYuv[uhDepth], m_ppcPredYuvTemp[uhDepth], m_ppcResiYuvTemp[uhDepth], m_ppcRecoYuvTemp[uhDepth], bSkipRes, bUseMRG ); 2139 #endif2140 2071 #else 2141 2072 m_pcPredSearch->predInterSearch ( rpcTempCU, m_ppcOrigYuv[uhDepth], m_ppcPredYuvTemp[uhDepth], m_ppcResiYuvTemp[uhDepth], m_ppcRecoYuvTemp[uhDepth], false, bUseMRG ); … … 2146 2077 #else 2147 2078 m_pcPredSearch->predInterSearch ( rpcTempCU, m_ppcOrigYuv[uhDepth], m_ppcPredYuvTemp[uhDepth], m_ppcResiYuvTemp[uhDepth], m_ppcRecoYuvTemp[uhDepth] ); 2148 #endif2149 #endif2150 2151 #if H3D_IVRP2152 #if !LG_RESTRICTEDRESPRED_M247662153 if( rpcTempCU->getResPredFlag( 0 ) )2154 { // add residual prediction to original again2155 m_ppcOrigYuv[uhDepth]->add( m_ppcResPredTmp [uhDepth], rpcTempCU->getWidth( 0 ), rpcTempCU->getHeight( 0 ) );2156 }2157 2079 #endif 2158 2080 #endif -
trunk/source/Lib/TLibEncoder/TEncEntropy.cpp
r296 r332 122 122 #endif 123 123 124 #if HHI_MPI || OL_QTLIMIT_PREDCODING_B0068124 #if HHI_MPI || H3D_QTL 125 125 Void TEncEntropy::encodeSPS( TComSPS* pcSPS, Bool bIsDepth ) 126 126 { … … 455 455 } 456 456 457 #if H3D_IVRP && !MTK_MDIVRP_C0138458 Void459 TEncEntropy::encodeResPredFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiPUIdx, Bool bRD )460 {461 if( bRD )462 {463 uiAbsPartIdx = 0;464 }465 466 // check whether flag is coded467 ROTVS( pcCU->getSlice()->getSPS()->isDepth () );468 ROFVS( pcCU->getSlice()->getSPS()->getViewId () );469 ROFVS( pcCU->getSlice()->getSPS()->getMultiviewResPredMode() );470 ROTVS( pcCU->isIntra ( uiAbsPartIdx ) );471 ROFVS( pcCU->getResPredAvail ( uiAbsPartIdx ) );472 #if LG_RESTRICTEDRESPRED_M24766473 Int iPUResiPredShift[4];474 pcCU->getPUResiPredShift(iPUResiPredShift, uiAbsPartIdx);475 if(iPUResiPredShift[0] >= 0 || iPUResiPredShift[1] >= 0 || iPUResiPredShift[2] >= 0 || iPUResiPredShift[3] >= 0 )476 #endif477 // encode flag478 m_pcEntropyCoderIf->codeResPredFlag( pcCU, uiAbsPartIdx );479 }480 #endif481 457 482 458 /** parse the fixed length code (smaller than one max value) in ALF -
trunk/source/Lib/TLibEncoder/TEncEntropy.h
r296 r332 80 80 #endif 81 81 82 #if HHI_MPI || OL_QTLIMIT_PREDCODING_B006882 #if HHI_MPI || H3D_QTL 83 83 virtual Void codeSPS ( TComSPS* pcSPS, Bool bIsDepth ) = 0; 84 84 #else … … 222 222 #endif 223 223 // SPS 224 #if HHI_MPI || OL_QTLIMIT_PREDCODING_B0068224 #if HHI_MPI || H3D_QTL 225 225 Void encodeSPS ( TComSPS* pcSPS, Bool bIsDepth ); 226 226 #else … … 250 250 Void encodeMergeFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiPUIdx ); 251 251 Void encodeMergeIndex ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiPUIdx, Bool bRD = false ); 252 #if H3D_IVRP && !MTK_MDIVRP_C0138253 Void encodeResPredFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiPUIdx, Bool bRD = false );254 #endif255 252 Void encodeAlfCtrlFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD = false ); 256 253 -
trunk/source/Lib/TLibEncoder/TEncGOP.cpp
r313 r332 887 887 m_pcEntropyCoder->setBitstream(&nalu.m_Bitstream); 888 888 pcSlice->getSPS()->setNumSubstreams( pcSlice->getPPS()->getNumSubstreams() ); 889 #if HHI_MPI || OL_QTLIMIT_PREDCODING_B0068889 #if HHI_MPI || H3D_QTL 890 890 m_pcEntropyCoder->encodeSPS(pcSlice->getSPS(), m_pcEncTop->getIsDepth()); 891 891 #else -
trunk/source/Lib/TLibEncoder/TEncSbac.cpp
r296 r332 376 376 #endif 377 377 378 #if HHI_MPI || OL_QTLIMIT_PREDCODING_B0068378 #if HHI_MPI || H3D_QTL 379 379 Void TEncSbac::codeSPS( TComSPS* pcSPS, Bool bIsDepth ) 380 380 #else … … 578 578 PartSize eSize = pcCU->getPartitionSize( uiAbsPartIdx ); 579 579 580 #if OL_QTLIMIT_PREDCODING_B0068580 #if H3D_QTL 581 581 TComSPS *sps = pcCU->getPic()->getSlice(0)->getSPS(); 582 582 TComPic *pcTexture = pcCU->getSlice()->getTexturePic(); … … 584 584 Bool bIntraSliceDetect = (pcCU->getSlice()->getSliceType() == I_SLICE); 585 585 586 #if HHI_QTLPC_RAU_OFF_C0160587 586 Bool rapPic = (pcCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR || pcCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA); 588 587 if(bDepthMapDetect && !bIntraSliceDetect && !rapPic && sps->getUseQTLPC() && pcCU->getPic()->getReduceBitsFlag()) 589 #else590 if(bDepthMapDetect && !bIntraSliceDetect && sps->getUseQTLPC() && pcCU->getPic()->getReduceBitsFlag())591 #endif592 588 { 593 589 TComDataCU *pcTextureCU = pcTexture->getCU(pcCU->getAddr()); … … 855 851 assert( uiCtx < 3 ); 856 852 857 #if OL_QTLIMIT_PREDCODING_B0068853 #if H3D_QTL 858 854 Bool bCodeSplitFlag = true; 859 855 … … 863 859 Bool bIntraSliceDetect = (pcCU->getSlice()->getSliceType() == I_SLICE); 864 860 865 #if HHI_QTLPC_RAU_OFF_C0160866 861 Bool rapPic = (pcCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR || pcCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA); 867 862 if(bDepthMapDetect && !bIntraSliceDetect && !rapPic && sps->getUseQTLPC() && pcCU->getPic()->getReduceBitsFlag()) 868 #else869 if(bDepthMapDetect && !bIntraSliceDetect && sps->getUseQTLPC() && pcCU->getPic()->getReduceBitsFlag())870 #endif871 863 { 872 864 TComDataCU *pcTextureCU = pcTexture->getCU(pcCU->getAddr()); -
trunk/source/Lib/TLibEncoder/TEncSbac.h
r296 r332 102 102 #endif 103 103 104 #if HHI_MPI || OL_QTLIMIT_PREDCODING_B0068104 #if HHI_MPI || H3D_QTL 105 105 Void codeSPS ( TComSPS* pcSPS, Bool bIsDepth ); 106 106 #else -
trunk/source/Lib/TLibEncoder/TEncSearch.cpp
r296 r332 2311 2311 for( UInt uiSDC=0; uiSDC<=uiUseSDC; uiSDC++ ) 2312 2312 { 2313 #if FIX_SDC_ENC_C01432314 2313 for( UInt uiRes = 0; uiRes<=uiSDC; uiRes++ ) 2315 #else2316 for( UInt uiRes = 0; uiRes<=uiUseSDC; uiRes++ )2317 #endif2318 2314 { 2319 2315 #endif … … 2909 2905 * \returns Void 2910 2906 */ 2907 2908 Void TEncSearch::xMergeEstimation( TComDataCU* pcCU, 2909 TComYuv* pcYuvOrg, 2910 Int iPUIdx, 2911 UInt& uiInterDir, 2912 TComMvField* pacMvField, 2913 UInt& uiMergeIndex, 2914 UInt& ruiCost 2911 2915 #if CU_BASED_MRG_CAND_LIST 2912 #if LG_RESTRICTEDRESPRED_M24766 2913 Void TEncSearch::xMergeEstimation( TComDataCU* pcCU, TComYuv* pcYuvOrg, TComYuv* rpcResiPredYuv, Int iPUIdx, UInt& uiInterDir, TComMvField* pacMvField, UInt& uiMergeIndex, UInt& ruiCost, TComMvField* cMvFieldNeighbours, UChar* uhInterDirNeighbours, Int& numValidMergeCand ) 2914 #else 2915 Void TEncSearch::xMergeEstimation( TComDataCU* pcCU, TComYuv* pcYuvOrg, Int iPUIdx, UInt& uiInterDir, TComMvField* pacMvField, UInt& uiMergeIndex, UInt& ruiCost, TComMvField* cMvFieldNeighbours, UChar* uhInterDirNeighbours, Int& numValidMergeCand ) 2916 #endif 2917 #else 2918 #if LG_RESTRICTEDRESPRED_M24766 2919 #if MERL_VSP_C0152 || MTK_MDIVRP_C0138 2920 #if !MTK_MDIVRP_C0138 2921 Void TEncSearch::xMergeEstimation( TComDataCU* pcCU, TComYuv* pcYuvOrg, TComYuv* rpcResiPredYuv, Int iPUIdx, UInt& uiInterDir, TComMvField* pacMvField, UInt& uiMergeIndex, UInt& ruiCost, Int* iVSPIndexTrue ) 2922 #endif 2923 #if !MERL_VSP_C0152 2924 Void TEncSearch::xMergeEstimation( TComDataCU* pcCU, TComYuv* pcYuvOrg, Int iPUIdx, UInt& uiInterDir, TComMvField* pacMvField, UInt& uiMergeIndex, UInt& ruiCost ) 2925 #endif 2926 #if MERL_VSP_C0152 && MTK_MDIVRP_C0138 2927 Void TEncSearch::xMergeEstimation( TComDataCU* pcCU, TComYuv* pcYuvOrg, Int iPUIdx, UInt& uiInterDir, TComMvField* pacMvField, UInt& uiMergeIndex, UInt& ruiCost, Int* iVSPIndexTrue ) 2928 #endif 2929 #else 2930 Void TEncSearch::xMergeEstimation( TComDataCU* pcCU, TComYuv* pcYuvOrg, TComYuv* rpcResiPredYuv, Int iPUIdx, UInt& uiInterDir, TComMvField* pacMvField, UInt& uiMergeIndex, UInt& ruiCost ) 2931 #endif 2932 #else 2933 Void TEncSearch::xMergeEstimation( TComDataCU* pcCU, TComYuv* pcYuvOrg, Int iPUIdx, UInt& uiInterDir, TComMvField* pacMvField, UInt& uiMergeIndex, UInt& ruiCost ) 2934 #endif 2935 #endif 2916 , TComMvField* cMvFieldNeighbours, 2917 UChar* uhInterDirNeighbours, 2918 Int& numValidMergeCand 2919 #endif 2920 #if MERL_VSP_C0152 2921 , Int* iVSPIndexTrue 2922 #endif 2923 ) 2936 2924 { 2937 2925 #if !CU_BASED_MRG_CAND_LIST … … 2985 2973 const int maxNumMergeCand = MRG_MAX_NUM_CANDS_SIGNALED + ( pcCU->getSlice()->getSPS()->getMultiviewMvPredMode() ? 1 : 0 ); 2986 2974 #endif 2987 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C01382988 Int iPUResiPredShift[4];2989 Int iLastAddResiShift = -1000;2990 #endif2991 2975 ruiCost = MAX_UINT; 2992 2976 for( UInt uiMergeCand = 0; uiMergeCand < numValidMergeCand; ++uiMergeCand ) … … 3014 2998 } 3015 2999 pcCU->setVSPIndexSubParts( iVSPIdx, uiAbsPartIdx, iPUIdx, pcCU->getDepth( uiAbsPartIdx ) ); 3016 }3017 #endif3018 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C01383019 Int iAddResiShift;3020 UInt uiPartAddr;3021 Int iRoiWidth, iRoiHeight;3022 3023 pcCU->getPartIndexAndSize( iPUIdx, uiPartAddr, iRoiWidth, iRoiHeight );3024 iAddResiShift = pcCU->getResiPredMode(uiPartAddr);3025 iAddResiShift = (pcCU->getSlice()->getPPS()->getUseWP() || pcCU->getInterDir(uiPartAddr) != 3) ? (iAddResiShift >= 0 ? 0 : -1) : (iAddResiShift >= 0 ? 1 - iAddResiShift : -1);3026 3027 if( pcCU->getResPredFlag( 0 ))3028 { // subtract residual prediction from original in motion search3029 if(iLastAddResiShift != iAddResiShift)3030 {3031 //add subtracted residual last time3032 if(iLastAddResiShift >= 0)3033 {3034 iPUResiPredShift[0] = iPUResiPredShift[1] = iPUResiPredShift[2] = iPUResiPredShift[3] = iLastAddResiShift;3035 pcYuvOrg->add(iPUResiPredShift, ePartSize, rpcResiPredYuv, pcCU->getWidth( 0 ), pcCU->getHeight( 0 ));3036 }3037 //subtract residual3038 if(iAddResiShift >= 0)3039 {3040 iPUResiPredShift[0] = iPUResiPredShift[1] = iPUResiPredShift[2] = iPUResiPredShift[3] = iAddResiShift;3041 pcYuvOrg->add(iPUResiPredShift, ePartSize, rpcResiPredYuv, pcCU->getWidth( 0 ), pcCU->getHeight( 0 ), true );3042 }3043 iLastAddResiShift = iAddResiShift;3044 }3045 3000 } 3046 3001 #endif … … 3066 3021 } 3067 3022 } 3068 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C01383069 if( pcCU->getResPredFlag( 0 ) && iLastAddResiShift >= 0)3070 {3071 iPUResiPredShift[0] = iPUResiPredShift[1] = iPUResiPredShift[2] = iPUResiPredShift[3] = iLastAddResiShift;3072 pcYuvOrg->add(iPUResiPredShift, pcCU->getPartitionSize(0), rpcResiPredYuv, pcCU->getWidth( 0 ), pcCU->getHeight( 0 ));3073 }3074 #endif3075 3023 } 3076 3024 … … 3085 3033 */ 3086 3034 #if AMP_MRG 3087 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C01383088 Void TEncSearch::predInterSearch( TComDataCU* pcCU, TComYuv* pcOrgYuv, TComYuv* rpcResiPredYuv, TComYuv*& rpcPredYuv, TComYuv*& rpcResiYuv, TComYuv*& rpcRecoYuv, Bool bUseRes, Bool bUseMRG )3089 #else3090 3035 Void TEncSearch::predInterSearch( TComDataCU* pcCU, TComYuv* pcOrgYuv, TComYuv*& rpcPredYuv, TComYuv*& rpcResiYuv, TComYuv*& rpcRecoYuv, Bool bUseRes, Bool bUseMRG) 3091 #endif3092 3036 #else 3093 3037 Void TEncSearch::predInterSearch( TComDataCU* pcCU, TComYuv* pcOrgYuv, TComYuv*& rpcPredYuv, TComYuv*& rpcResiYuv, TComYuv*& rpcRecoYuv, Bool bUseRes ) … … 3188 3132 for (Int iNumRef=0; iNumRef < MAX_NUM_REF; iNumRef++) uiCostTempL0[iNumRef] = MAX_UINT; 3189 3133 UInt uiBitsTempL0[MAX_NUM_REF]; 3190 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C01383191 Int iPUResiPredShift[4] = {0, 0, 0, 0};3192 #endif3193 3134 xGetBlkBits( ePartSize, pcCU->getSlice()->isInterP(), iPartIdx, uiLastMode, uiMbBits); 3194 3135 … … 3209 3150 { 3210 3151 #endif 3211 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C01383212 Bool bLastResiFlag = false;3213 #endif3214 3152 3215 3153 // Uni-directional prediction … … 3220 3158 for ( Int iRefIdxTemp = 0; iRefIdxTemp < pcCU->getSlice()->getNumRefIdx(eRefPicList); iRefIdxTemp++ ) 3221 3159 { 3222 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C01383223 if( pcCU->getResPredFlag( 0 ))3224 {3225 if(pcCU->getSlice()->getViewId() == pcCU->getSlice()->getRefViewId(eRefPicList, iRefIdxTemp))3226 { // subtract residual prediction from original in motion search3227 if(!bLastResiFlag)3228 pcOrgYuv->add(iPUResiPredShift, pcCU->getPartitionSize(0), rpcResiPredYuv, pcCU->getWidth( 0 ), pcCU->getHeight( 0 ), true );3229 bLastResiFlag = true;3230 }3231 else3232 {3233 if(bLastResiFlag)3234 pcOrgYuv->add(iPUResiPredShift, pcCU->getPartitionSize(0), rpcResiPredYuv, pcCU->getWidth( 0 ), pcCU->getHeight( 0 ));3235 bLastResiFlag = false;3236 }3237 }3238 #endif3239 3160 uiBitsTemp = uiMbBits[iRefList]; 3240 3161 if ( pcCU->getSlice()->getNumRefIdx(eRefPicList) > 1 ) … … 3394 3315 } 3395 3316 } 3396 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C01383397 if( pcCU->getResPredFlag( 0 ) && bLastResiFlag)3398 { // subtract residual prediction from original in motion search3399 pcOrgYuv->add(iPUResiPredShift, pcCU->getPartitionSize(0), rpcResiPredYuv, pcCU->getWidth( 0 ), pcCU->getHeight( 0 ));3400 }3401 #endif3402 3317 // Bi-directional prediction 3403 3318 if ( pcCU->getSlice()->isInterB() ) 3404 3319 { 3405 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C01383406 Int iLastAddResiShift = -1000;3407 #endif3408 3320 cMvBi[0] = cMv[0]; cMvBi[1] = cMv[1]; 3409 3321 iRefIdxBi[0] = iRefIdx[0]; iRefIdxBi[1] = iRefIdx[1]; … … 3499 3411 #else 3500 3412 uiBitsTemp += m_auiMVPIdxCost[aaiMvpIdxBi[iRefList][iRefIdxTemp]][AMVP_MAX_NUM_CANDS]; 3501 #endif3502 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C01383503 Int iAddResiShift = -1, iPredFrom = 0;3504 Int iBestRefIdx = pcCU->getCUMvField(eRefPicList == REF_PIC_LIST_0 ? REF_PIC_LIST_1 : REF_PIC_LIST_0)->getRefIdx(uiPartAddr);3505 3506 iPredFrom = iBestRefIdx >= 0 ? 3 : 1;3507 if(iBestRefIdx >= 0 && pcCU->getSlice()->getViewId() == pcCU->getSlice()->getRefViewId(eRefPicList == REF_PIC_LIST_0 ? REF_PIC_LIST_1 : REF_PIC_LIST_0, iBestRefIdx))3508 iAddResiShift++;3509 if(pcCU->getSlice()->getViewId() == pcCU->getSlice()->getRefViewId(eRefPicList, iRefIdxTemp))3510 iAddResiShift++;3511 iAddResiShift = (pcCU->getSlice()->getPPS()->getUseWP() || iPredFrom != 3) ? (iAddResiShift >= 0 ? 0 : -1) : (iAddResiShift >= 0 ? 1-iAddResiShift : -1);3512 3513 if( pcCU->getResPredFlag( 0 ) )3514 {3515 if(iLastAddResiShift != iAddResiShift)3516 {3517 //add substracted residual last time3518 if(iLastAddResiShift >= 0 )3519 {3520 iPUResiPredShift[0] = iPUResiPredShift[1] = iPUResiPredShift[2] = iPUResiPredShift[3] = iLastAddResiShift;3521 pcOrgYuv->add(iPUResiPredShift, pcCU->getPartitionSize(0), rpcResiPredYuv, pcCU->getWidth( 0 ), pcCU->getHeight( 0 ));3522 }3523 //substract residual3524 if(iAddResiShift >= 0)3525 {3526 iPUResiPredShift[0] = iPUResiPredShift[1] = iPUResiPredShift[2] = iPUResiPredShift[3] = iAddResiShift;3527 pcOrgYuv->add(iPUResiPredShift, pcCU->getPartitionSize(0), rpcResiPredYuv, pcCU->getWidth( 0 ), pcCU->getHeight( 0 ), true );3528 }3529 iLastAddResiShift = iAddResiShift;3530 }3531 }3532 3413 #endif 3533 3414 // call ME … … 3581 3462 } 3582 3463 } // for loop-iter 3583 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C01383584 if( pcCU->getResPredFlag( 0 ) && iLastAddResiShift >= 0)3585 {3586 iPUResiPredShift[0] = iPUResiPredShift[1] = iPUResiPredShift[2] = iPUResiPredShift[3] = iLastAddResiShift;3587 pcOrgYuv->add(iPUResiPredShift, pcCU->getPartitionSize(0), rpcResiPredYuv, pcCU->getWidth( 0 ), pcCU->getHeight( 0 ));3588 }3589 #endif3590 3464 } // if (B_SLICE) 3591 3465 #if ZERO_MVD_EST … … 3796 3670 if (bTestNormalMC) 3797 3671 { 3798 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C01383799 Int iAddResiShift = pcCU->getResiPredMode(uiPartAddr);3800 iPUResiPredShift[0] = iPUResiPredShift[1] = iPUResiPredShift[2] = iPUResiPredShift[3] = \3801 (pcCU->getSlice()->getPPS()->getUseWP() || pcCU->getInterDir(uiPartAddr) != 3)? (iAddResiShift >= 0 ? 0 : -1) : (iAddResiShift >= 0 ? 1-iAddResiShift : -1);3802 if(pcCU->getResPredFlag(0) && iAddResiShift >= 0)3803 {3804 pcOrgYuv->add(iPUResiPredShift, pcCU->getPartitionSize(0), rpcResiPredYuv, pcCU->getWidth( 0 ), pcCU->getHeight( 0 ), true);3805 }3806 #endif3807 3672 xGetInterPredictionError( pcCU, pcOrgYuv, iPartIdx, uiMEError, m_pcEncCfg->getUseHADME() ); 3808 3673 uiMECost = uiMEError + m_pcRdCost->getCost( uiMEBits ); 3809 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C01383810 if(pcCU->getResPredFlag(0) && iAddResiShift >= 0)3811 {3812 pcOrgYuv->add(iPUResiPredShift, pcCU->getPartitionSize(0), rpcResiPredYuv, pcCU->getWidth( 0 ), pcCU->getHeight( 0 ));3813 }3814 #endif3815 3674 } 3816 3675 #else … … 3827 3686 // find Merge result 3828 3687 UInt uiMRGCost = MAX_UINT; 3688 3689 3690 xMergeEstimation( pcCU, pcOrgYuv, iPartIdx, uiMRGInterDir, cMRGMvField, uiMRGIndex, uiMRGCost 3829 3691 #if CU_BASED_MRG_CAND_LIST 3830 #if LG_RESTRICTEDRESPRED_M24766 3831 xMergeEstimation( pcCU, pcOrgYuv, rpcResiPredYuv, iPartIdx, uiMRGInterDir, cMRGMvField, uiMRGIndex, uiMRGCost, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand); 3832 #else 3833 xMergeEstimation( pcCU, pcOrgYuv, iPartIdx, uiMRGInterDir, cMRGMvField, uiMRGIndex, uiMRGCost, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand); 3834 #endif 3835 #else 3836 #if LG_RESTRICTEDRESPRED_M24766 3837 #if MERL_VSP_C0152 || MTK_MDIVRP_C0138 3838 3839 #if !MTK_MDIVRP_C0138 3840 xMergeEstimation( pcCU, pcOrgYuv, rpcResiPredYuv, iPartIdx, uiMRGInterDir, cMRGMvField, uiMRGIndex, uiMRGCost, iVSPIndexTrue ); 3841 #endif 3842 3843 #if !MERL_VSP_C0152 3844 xMergeEstimation( pcCU, pcOrgYuv, iPartIdx, uiMRGInterDir, cMRGMvField, uiMRGIndex, uiMRGCost ); 3845 #endif 3846 3847 #if MERL_VSP_C0152 && MTK_MDIVRP_C0138 3848 xMergeEstimation( pcCU, pcOrgYuv, iPartIdx, uiMRGInterDir, cMRGMvField, uiMRGIndex, uiMRGCost, iVSPIndexTrue ); 3849 #endif 3850 3851 #else 3852 xMergeEstimation( pcCU, pcOrgYuv, rpcResiPredYuv, iPartIdx, uiMRGInterDir, cMRGMvField, uiMRGIndex, uiMRGCost ); 3853 #endif 3854 3855 3856 #else 3857 xMergeEstimation( pcCU, pcOrgYuv, iPartIdx, uiMRGInterDir, cMRGMvField, uiMRGIndex, uiMRGCost ); 3858 #endif 3859 #endif 3692 , cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, 3693 #endif 3694 #if MERL_VSP_C0152 3695 , iVSPIndexTrue 3696 #endif 3697 ); 3698 3860 3699 if ( uiMRGCost < uiMECost ) 3861 3700 { … … 4775 4614 UInt uiWidth = pcCU->getWidth ( 0 ); 4776 4615 UInt uiHeight = pcCU->getHeight( 0 ); 4777 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C01384778 Int iPUResiPredShift[4];4779 #endif4780 4616 // No residual coding : SKIP mode 4781 4617 if ( ePredMode == MODE_SKIP && bSkipRes ) … … 4785 4621 pcYuvPred->copyToPartYuv( rpcYuvRec, 0 ); 4786 4622 4787 #if MTK_MDIVRP_C01384623 #if H3D_IVRP 4788 4624 if (pcCU->getMergeFlag(0) && pcCU->getMergeIndex(0)==0 && pcCU->getResPredAvail(0)) 4789 4625 { 4790 4626 rpcYuvRec->clip( uiWidth, uiHeight ); 4791 4627 } 4792 #else4793 #if H3D_IVRP4794 // add residual prediction4795 if( pcCU->getResPredFlag( 0 ) )4796 {4797 #if LG_RESTRICTEDRESPRED_M247664798 pcCU->getPUResiPredShift(iPUResiPredShift, 0);4799 rpcYuvRec->add(iPUResiPredShift, pcCU->getPartitionSize(0), rpcYuvResPrd, uiWidth, uiHeight );4800 #else4801 rpcYuvRec->add( rpcYuvResPrd, uiWidth, uiHeight );4802 #endif4803 rpcYuvRec->clip( uiWidth, uiHeight );4804 }4805 #endif4806 4628 #endif 4807 4629 … … 4853 4675 ); 4854 4676 #endif 4855 #if H3D_IVRP && !MTK_MDIVRP_C01384856 m_pcEntropyCoder->encodeResPredFlag( pcCU, 0, 0, true );4857 #endif4858 4677 #if HHI_MPI 4859 4678 } … … 4922 4741 else 4923 4742 { 4924 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C01384925 iPUResiPredShift[0] = iPUResiPredShift[1] = iPUResiPredShift[2] = iPUResiPredShift[3] = 0;4926 rpcYuvResi->subtract(iPUResiPredShift, pcCU->getPartitionSize(0), pcYuvOrg, pcYuvPred, 0, uiWidth );4927 #else4928 4743 rpcYuvResi->subtract( pcYuvOrg, pcYuvPred, 0, uiWidth ); 4929 #endif4930 #if H3D_IVRP && !MTK_MDIVRP_C01384931 // subtract residual prediction4932 if( pcCU->getResPredFlag( 0 ) )4933 {4934 #if LG_RESTRICTEDRESPRED_M247664935 pcCU->getPUResiPredShift(iPUResiPredShift, 0);4936 rpcYuvResi->subtract(iPUResiPredShift, pcCU->getPartitionSize(0), rpcYuvResi, rpcYuvResPrd, 0, uiWidth );4937 #else4938 rpcYuvResi->subtract( rpcYuvResi, rpcYuvResPrd, 0, uiWidth );4939 #endif4940 }4941 #endif4942 4744 } 4943 4745 #else … … 5134 4936 #endif 5135 4937 } 5136 #if H3D_IVRP && !MTK_MDIVRP_C01385137 // add residual prediction5138 if( pcCU->getResPredFlag( 0 ) )5139 {5140 pcYuvPred->copyToPartYuv( rpcYuvRec, 0 );5141 #if LG_RESTRICTEDRESPRED_M247665142 pcCU->getPUResiPredShift(iPUResiPredShift, 0);5143 rpcYuvRec->add(iPUResiPredShift, pcCU->getPartitionSize(0), rpcYuvResPrd, uiWidth, uiHeight );5144 iPUResiPredShift[0] = iPUResiPredShift[1] = iPUResiPredShift[2] = iPUResiPredShift[3] = 0;5145 rpcYuvRec->add(iPUResiPredShift, pcCU->getPartitionSize(0), rpcYuvResiBest, uiWidth, uiHeight );5146 #else5147 rpcYuvRec->add( rpcYuvResPrd, uiWidth, uiHeight );5148 rpcYuvRec->add( rpcYuvResiBest, uiWidth, uiHeight );5149 #endif5150 rpcYuvRec->clip( uiWidth, uiHeight );5151 }5152 else5153 #endif5154 4938 rpcYuvRec->addClip ( pcYuvPred, rpcYuvResiBest, 0, uiWidth ); 5155 4939 … … 6170 5954 ); 6171 5955 #endif 6172 #if H3D_IVRP && !MTK_MDIVRP_C01386173 m_pcEntropyCoder->encodeResPredFlag( pcCU, 0, 0, true );6174 #endif6175 5956 ruiBits += m_pcEntropyCoder->getNumberOfWrittenBits(); 6176 5957 } … … 6196 5977 #endif 6197 5978 ); 6198 #endif6199 #if H3D_IVRP && !MTK_MDIVRP_C01386200 m_pcEntropyCoder->encodeResPredFlag( pcCU, 0, 0, true );6201 5979 #endif 6202 5980 #if HHI_MPI … … 6534 6312 Int iFullDeltaDC2 = riDeltaDC2; 6535 6313 6536 #if HHI_DMM_DELTADC_Q1_C00346537 #else6538 xDeltaDCQuantScaleDown( pcCU, iFullDeltaDC1 );6539 xDeltaDCQuantScaleDown( pcCU, iFullDeltaDC2 );6540 #endif6541 6542 6314 Dist uiBestDist = RDO_DIST_MAX; 6543 6315 UInt uiBestQStepDC1 = 0; … … 6551 6323 uiDeltaDC2Max += (uiDeltaDC2Max>>1); 6552 6324 6553 #if HHI_DMM_DELTADC_Q1_C00346554 6325 // limit search range to [0, IBDI_MAX] 6555 6326 if( iFullDeltaDC1 < 0 && uiDeltaDC1Max > abs(iPredDC1) ) { uiDeltaDC1Max = abs(iPredDC1); } … … 6698 6469 } 6699 6470 } 6700 #else 6701 for( UInt uiQStepDC1 = 1; uiQStepDC1 <= uiDeltaDC1Max; uiQStepDC1++ ) 6702 { 6703 Int iLevelDeltaDC1 = (Int)(uiQStepDC1) * (Int)(( iFullDeltaDC1 < 0 ) ? -1 : 1); 6704 xDeltaDCQuantScaleUp( pcCU, iLevelDeltaDC1 ); 6705 6706 Int iTestDC1 = Clip( iPredDC1 + iLevelDeltaDC1 ); 6707 for( UInt uiQStepDC2 = 1; uiQStepDC2 <= uiDeltaDC2Max; uiQStepDC2++ ) 6708 { 6709 Int iLevelDeltaDC2 = (Int)(uiQStepDC2) * (Int)(( iFullDeltaDC2 < 0 ) ? -1 : 1); 6710 xDeltaDCQuantScaleUp( pcCU, iLevelDeltaDC2 ); 6711 6712 Int iTestDC2 = Clip( iPredDC2 + iLevelDeltaDC2 ); 6713 6714 assignWedgeDCs2Pred( pcWedgelet, piPredic, uiStride, iTestDC1, iTestDC2 ); 6715 6716 Dist uiActDist = RDO_DIST_MAX; 6717 #if SAIT_VSO_EST_A0033 6718 if ( m_pcRdCost->getUseEstimatedVSD() ) 6719 { 6720 TComPicYuv* pcVirRec = m_pcRdCost->getVideoRecPicYuv(); 6721 TComPicYuv* pcVirOrg = m_pcRdCost->getDepthPicYuv(); 6722 uiActDist = m_pcRdCost->getDistPart( piPredic, uiStride, piOrig, uiStride, pcVirRec->getLumaAddr(pcCU->getAddr(),pcCU->getZorderIdxInCU()), pcVirOrg->getLumaAddr(pcCU->getAddr(),pcCU->getZorderIdxInCU()), pcVirRec->getStride(), uiWidth, uiHeight ); 6723 #if LGE_WVSO_A0119 6724 if ( m_pcRdCost->getUseWVSO() ) 6725 { 6726 Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight(); 6727 Int iVSDWeight = m_pcRdCost->getVSDWeight() * m_pcRdCost->getVSDWeight(); 6728 Dist iD = (Dist) m_pcRdCost->getDistPart( piPredic, uiStride, piOrig, uiStride, uiWidth, uiHeight, false, DF_SAD ); 6729 uiActDist = (iDWeight * iD + iVSDWeight * (Dist) uiActDist) / ( iDWeight + iVSDWeight); 6730 } 6731 #endif // LGE_WVSO_A0119 6732 } 6733 else 6734 #endif // SAIT_VSO_EST_A0033 6735 { 6736 uiActDist = m_pcRdCost->getDistVS( pcCU, 0, piPredic, uiStride, piOrig, uiStride, uiWidth, uiHeight, false, 0 ); 6737 #if LGE_WVSO_A0119 6738 if ( m_pcRdCost->getUseWVSO() ) 6739 { 6740 Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight(); 6741 Int iVSOWeight = m_pcRdCost->getVSOWeight() * m_pcRdCost->getVSOWeight(); 6742 Dist iD = (Dist) m_pcRdCost->getDistPart( piPredic, uiStride, piOrig, uiStride, uiWidth, uiHeight, false, DF_SAD ); 6743 uiActDist = (iDWeight * iD + iVSOWeight * (Dist) uiActDist) / ( iDWeight + iVSOWeight); 6744 } 6745 #endif // LGE_WVSO_A0119 6746 } 6747 6748 if( uiActDist < uiBestDist || uiBestDist == RDO_DIST_MAX ) 6749 { 6750 uiBestDist = uiActDist; 6751 uiBestQStepDC1 = uiQStepDC1; 6752 uiBestQStepDC2 = uiQStepDC2; 6753 } 6754 } 6755 } 6756 #endif 6471 6757 6472 iFullDeltaDC1 = (Int)(uiBestQStepDC1) * (Int)(( iFullDeltaDC1 < 0 ) ? -1 : 1); 6758 6473 iFullDeltaDC2 = (Int)(uiBestQStepDC2) * (Int)(( iFullDeltaDC2 < 0 ) ? -1 : 1); 6759 #if HHI_DMM_DELTADC_Q1_C0034 6760 #else 6761 xDeltaDCQuantScaleUp( pcCU, iFullDeltaDC1 ); 6762 xDeltaDCQuantScaleUp( pcCU, iFullDeltaDC2 ); 6763 #endif 6474 6764 6475 riDeltaDC1 = iFullDeltaDC1; 6765 6476 riDeltaDC2 = iFullDeltaDC2; … … 6767 6478 #endif 6768 6479 6769 #if HHI_DMM_DELTADC_Q1_C00346770 #else6771 xDeltaDCQuantScaleDown( pcCU, riDeltaDC1 );6772 xDeltaDCQuantScaleDown( pcCU, riDeltaDC2 );6773 #endif6774 6480 } 6775 6481 #endif -
trunk/source/Lib/TLibEncoder/TEncSearch.h
r296 r332 196 196 Void predInterSearch ( TComDataCU* pcCU, 197 197 TComYuv* pcOrgYuv, 198 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138199 TComYuv* rpcResiPredYuv,200 #endif201 198 TComYuv*& rpcPredYuv, 202 199 TComYuv*& rpcResiYuv, … … 501 498 Void xMergeEstimation ( TComDataCU* pcCU, 502 499 TComYuv* pcYuvOrg, 503 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138504 TComYuv* rpcResiPredYuv,505 #endif506 500 Int iPartIdx, 507 501 UInt& uiInterDir, -
trunk/source/Lib/TLibEncoder/TEncSlice.cpp
r313 r332 1193 1193 } 1194 1194 1195 #if OL_QTLIMIT_PREDCODING_B00681195 #if H3D_QTL 1196 1196 rpcPic->setReduceBitsFlag(true); 1197 1197 #endif … … 1235 1235 } 1236 1236 1237 #if OL_QTLIMIT_PREDCODING_B00681237 #if H3D_QTL 1238 1238 rpcPic->setReduceBitsFlag(false); 1239 1239 #endif -
trunk/source/Lib/TLibEncoder/TEncTop.cpp
r313 r332 703 703 #endif 704 704 705 #if OL_QTLIMIT_PREDCODING_B0068705 #if H3D_QTL 706 706 m_cSPS.setUseQTLPC( m_bUseQTLPC ); 707 707 #endif
Note: See TracChangeset for help on using the changeset viewer.