Changeset 559 in 3DVCSoftware
- Timestamp:
- 9 Aug 2013, 07:59:16 (11 years ago)
- Location:
- branches/HTM-DEV-2.0-dev2-MediaTek
- Files:
-
- 2 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-DEV-2.0-dev2-MediaTek/source/Lib/TLibCommon/TComDataCU.cpp
r542 r559 5256 5256 } 5257 5257 #endif 5258 #if MTK_FAST_TEXTURE_ENCODING_E0173 5259 Void 5260 TComDataCU::getIVNStatus ( UInt uiPartIdx, DisInfo* pDInfo, Bool& bIVFMerge, Int& iIVFMaxD) 5261 { 5262 TComSlice* pcSlice = getSlice (); 5263 Int iViewIndex = pDInfo->m_aVIdxCan; 5264 //--- get base CU/PU and check prediction mode --- 5265 TComPic* pcBasePic = pcSlice->getIvPic( false, iViewIndex ); 5266 TComPicYuv* pcBaseRec = pcBasePic->getPicYuvRec (); 5267 5268 UInt uiPartAddr; 5269 Int iWidth; 5270 Int iHeight; 5271 getPartIndexAndSize( uiPartIdx, uiPartAddr, iWidth, iHeight ); 5272 5273 Int iCurrPosX, iCurrPosY; 5274 pcBaseRec->getTopLeftSamplePos( getAddr(), getZorderIdxInCU() + uiPartAddr, iCurrPosX, iCurrPosY ); 5275 5276 iCurrPosX += ( ( iWidth - 1 ) >> 1 ); 5277 iCurrPosY += ( ( iHeight - 1 ) >> 1 ); 5278 5279 Bool depthRefineFlag = false; 5280 #if H_3D_NBDV_REF 5281 depthRefineFlag = m_pcSlice->getVPS()->getDepthRefinementFlag( m_pcSlice->getLayerIdInVps() ); 5282 #endif // H_3D_NBDV_REF 5283 5284 TComMv cDv = depthRefineFlag ? pDInfo->m_acDoNBDV : pDInfo->m_acNBDV; 5285 5286 Int iBasePosX = Clip3( 0, pcBaseRec->getWidth () - 1, iCurrPosX + ( (cDv.getHor() + 2 ) >> 2 ) ); 5287 Int iBasePosY = Clip3( 0, pcBaseRec->getHeight() - 1, iCurrPosY + ( (cDv.getVer() + 2 ) >> 2 )); 5288 Int iBaseLPosX = Clip3( 0, pcBaseRec->getWidth () - 1, iCurrPosX - (iWidth >> 1) + ( (cDv.getHor() + 2 ) >> 2 ) ); 5289 Int iBaseLPosY = Clip3( 0, pcBaseRec->getHeight() - 1, iCurrPosY + ( (cDv.getVer() + 2 ) >> 2 )); 5290 Int iBaseRPosX = Clip3( 0, pcBaseRec->getWidth () - 1, iCurrPosX + (iWidth >> 1) + 1 + ( (cDv.getHor() + 2 ) >> 2 ) ); 5291 Int iBaseRPosY = Clip3( 0, pcBaseRec->getHeight() - 1, iCurrPosY + ( (cDv.getVer() + 2 ) >> 2 )); 5292 Int iBaseUPosX = Clip3( 0, pcBaseRec->getWidth () - 1, iCurrPosX + ( (cDv.getHor() + 2 ) >> 2 ) ); 5293 Int iBaseUPosY = Clip3( 0, pcBaseRec->getHeight() - 1, iCurrPosY - (iHeight >> 1) + ( (cDv.getVer() + 2 ) >> 2 )); 5294 Int iBaseDPosX = Clip3( 0, pcBaseRec->getWidth () - 1, iCurrPosX + ( (cDv.getHor() + 2 ) >> 2 ) ); 5295 Int iBaseDPosY = Clip3( 0, pcBaseRec->getHeight() - 1, iCurrPosY + (iHeight >> 1) + 1 + ( (cDv.getVer() + 2 ) >> 2 )); 5296 5297 Int iBaseCUAddr; 5298 Int iBaseAbsPartIdx; 5299 Int iBaseLCUAddr; 5300 Int iBaseLAbsPartIdx; 5301 Int iBaseRCUAddr; 5302 Int iBaseRAbsPartIdx; 5303 Int iBaseUCUAddr; 5304 Int iBaseUAbsPartIdx; 5305 Int iBaseDCUAddr; 5306 Int iBaseDAbsPartIdx; 5307 pcBaseRec->getCUAddrAndPartIdx( iBasePosX , iBasePosY , iBaseCUAddr, iBaseAbsPartIdx ); 5308 pcBaseRec->getCUAddrAndPartIdx( iBaseLPosX , iBaseLPosY , iBaseLCUAddr, iBaseLAbsPartIdx ); 5309 pcBaseRec->getCUAddrAndPartIdx( iBaseRPosX , iBaseRPosY , iBaseRCUAddr, iBaseRAbsPartIdx ); 5310 pcBaseRec->getCUAddrAndPartIdx( iBaseUPosX , iBaseUPosY , iBaseUCUAddr, iBaseUAbsPartIdx ); 5311 pcBaseRec->getCUAddrAndPartIdx( iBaseDPosX , iBaseDPosY , iBaseDCUAddr, iBaseDAbsPartIdx ); 5312 TComDataCU* pcBaseCU = pcBasePic->getCU( iBaseCUAddr ); 5313 TComDataCU* pcBaseLCU = pcBasePic->getCU( iBaseLCUAddr ); 5314 TComDataCU* pcBaseRCU = pcBasePic->getCU( iBaseRCUAddr ); 5315 TComDataCU* pcBaseUCU = pcBasePic->getCU( iBaseUCUAddr ); 5316 TComDataCU* pcBaseDCU = pcBasePic->getCU( iBaseDCUAddr ); 5317 bIVFMerge = pcBaseLCU->getMergeFlag( iBaseLAbsPartIdx ) && pcBaseCU->getMergeFlag( iBaseAbsPartIdx ) && pcBaseRCU->getMergeFlag( iBaseRAbsPartIdx ) && pcBaseUCU->getMergeFlag( iBaseUAbsPartIdx ) && pcBaseDCU->getMergeFlag( iBaseDAbsPartIdx ); 5318 Int aiDepthL[5]; //depth level 5319 aiDepthL[0] = pcBaseCU->getDepth(iBaseAbsPartIdx); 5320 aiDepthL[1] = pcBaseLCU->getDepth(iBaseLAbsPartIdx); 5321 aiDepthL[2] = pcBaseRCU->getDepth(iBaseRAbsPartIdx); 5322 aiDepthL[3] = pcBaseUCU->getDepth(iBaseUAbsPartIdx); 5323 aiDepthL[4] = pcBaseDCU->getDepth(iBaseDAbsPartIdx); 5324 for (Int i = 0; i < 5; i++) 5325 { 5326 if (iIVFMaxD < aiDepthL[i]) 5327 iIVFMaxD = aiDepthL[i]; 5328 } 5329 } 5330 #endif 5258 5331 #if H_3D_IV_MERGE 5259 5332 Bool -
branches/HTM-DEV-2.0-dev2-MediaTek/source/Lib/TLibCommon/TComDataCU.h
r531 r559 485 485 #endif //H_3D_NBDV_REF 486 486 #endif 487 #if MTK_FAST_TEXTURE_ENCODING_E0173 488 Void getIVNStatus ( UInt uiPartIdx, DisInfo* pDInfo, Bool& bIVFMerge, Int& iIVFMaxD); 489 #endif 487 490 #if H_3D_IV_MERGE 488 491 Bool getInterViewMergeCands ( UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo, Int* availableMcDc ); -
branches/HTM-DEV-2.0-dev2-MediaTek/source/Lib/TLibCommon/TypeDef.h
r552 r559 97 97 // Full Pel Interpolation for Depth, HHI_FULL_PEL_DEPTH_MAP_MV_ACC 98 98 #define SHARP_ILLUCOMP_REFINE_E0046 1 99 99 #define MTK_FAST_TEXTURE_ENCODING_E0173 1 // Fast merge mode decision and early CU determination for texture component of dependent view, JCT3V-E0173 100 100 101 101 #if H_3D_NBDV -
branches/HTM-DEV-2.0-dev2-MediaTek/source/Lib/TLibEncoder/TEncCu.cpp
r541 r559 481 481 if(!bSliceEnd && !bSliceStart && bInsidePicture ) 482 482 { 483 #if MTK_FAST_TEXTURE_ENCODING_E0173 484 Bool bIVFMerge = false; 485 Int iIVFMaxD = 0; 486 Bool bFMD = false; 487 #endif 483 488 for (Int iQP=iMinQP; iQP<=iMaxQP; iQP++) 484 489 { … … 555 560 } 556 561 } 562 #if MTK_FAST_TEXTURE_ENCODING_E0173 563 if(rpcTempCU->getSlice()->getViewIndex() && !rpcTempCU->getSlice()->getIsDepth()) 564 { 565 PartSize ePartTemp = rpcTempCU->getPartitionSize(0); 566 rpcTempCU->setPartSizeSubParts( SIZE_2Nx2N, 0, uiDepth ); 567 rpcTempCU->getIVNStatus( 0, &DvInfo, bIVFMerge, iIVFMaxD); 568 rpcTempCU->setPartSizeSubParts( ePartTemp, 0, uiDepth ); 569 } 570 #endif 557 571 #endif 558 572 // do inter modes, SKIP and 2Nx2N … … 570 584 rpcTempCU->setICFlagSubParts(bICFlag, 0, 0, uiDepth); 571 585 #endif 586 #if MTK_FAST_TEXTURE_ENCODING_E0173 587 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2Nx2N, bFMD ); rpcTempCU->initEstData( uiDepth, iQP );//by Competition for inter_2Nx2N 588 #else 572 589 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2Nx2N ); rpcTempCU->initEstData( uiDepth, iQP );//by Competition for inter_2Nx2N 590 #endif 573 591 } 574 592 // SKIP … … 577 595 #endif 578 596 xCheckRDCostMerge2Nx2N( rpcBestCU, rpcTempCU, &earlyDetectionSkipMode );//by Merge for inter_2Nx2N 597 #if MTK_FAST_TEXTURE_ENCODING_E0173 598 bFMD = bIVFMerge && rpcBestCU->isSkipped(0); 599 #endif 579 600 rpcTempCU->initEstData( uiDepth, iQP ); 580 601 … … 598 619 rpcTempCU->setICFlagSubParts(bICFlag, 0, 0, uiDepth); 599 620 #endif 621 #if MTK_FAST_TEXTURE_ENCODING_E0173 622 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2Nx2N, bFMD ); rpcTempCU->initEstData( uiDepth, iQP ); 623 #else 600 624 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2Nx2N ); rpcTempCU->initEstData( uiDepth, iQP ); 625 #endif 601 626 if(m_pcEncCfg->getUseCbfFastMode()) 602 627 { … … 677 702 ) 678 703 { 704 #if MTK_FAST_TEXTURE_ENCODING_E0173 705 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_NxN, bFMD ); 706 #else 679 707 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_NxN ); 708 #endif 680 709 rpcTempCU->initEstData( uiDepth, iQP ); 681 710 } … … 690 719 ) 691 720 { 721 #if MTK_FAST_TEXTURE_ENCODING_E0173 722 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_Nx2N, bFMD ); 723 #else 692 724 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_Nx2N ); 725 #endif 693 726 rpcTempCU->initEstData( uiDepth, iQP ); 694 727 if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_Nx2N ) … … 703 736 ) 704 737 { 738 #if MTK_FAST_TEXTURE_ENCODING_E0173 739 xCheckRDCostInter ( rpcBestCU, rpcTempCU, SIZE_2NxN, bFMD ); 740 #else 705 741 xCheckRDCostInter ( rpcBestCU, rpcTempCU, SIZE_2NxN ); 742 #endif 706 743 rpcTempCU->initEstData( uiDepth, iQP ); 707 744 if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_2NxN) … … 735 772 ) 736 773 { 774 #if MTK_FAST_TEXTURE_ENCODING_E0173 775 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnU, bFMD ); 776 #else 737 777 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnU ); 778 #endif 738 779 rpcTempCU->initEstData( uiDepth, iQP ); 739 780 if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_2NxnU ) … … 748 789 ) 749 790 { 791 #if MTK_FAST_TEXTURE_ENCODING_E0173 792 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnD, bFMD ); 793 #else 750 794 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnD ); 795 #endif 751 796 rpcTempCU->initEstData( uiDepth, iQP ); 752 797 if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_2NxnD ) … … 765 810 ) 766 811 { 812 #if MTK_FAST_TEXTURE_ENCODING_E0173 813 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnU, bFMD, true ); 814 #else 767 815 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnU, true ); 816 #endif 768 817 rpcTempCU->initEstData( uiDepth, iQP ); 769 818 if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_2NxnU ) … … 778 827 ) 779 828 { 829 #if MTK_FAST_TEXTURE_ENCODING_E0173 830 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnD, bFMD, true ); 831 #else 780 832 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnD, true ); 833 #endif 781 834 rpcTempCU->initEstData( uiDepth, iQP ); 782 835 if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_2NxnD ) … … 797 850 ) 798 851 { 852 #if MTK_FAST_TEXTURE_ENCODING_E0173 853 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nLx2N, bFMD ); 854 #else 799 855 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nLx2N ); 856 #endif 800 857 rpcTempCU->initEstData( uiDepth, iQP ); 801 858 if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_nLx2N ) … … 810 867 ) 811 868 { 869 #if MTK_FAST_TEXTURE_ENCODING_E0173 870 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nRx2N, bFMD ); 871 #else 812 872 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nRx2N ); 873 #endif 813 874 rpcTempCU->initEstData( uiDepth, iQP ); 814 875 } … … 823 884 ) 824 885 { 886 #if MTK_FAST_TEXTURE_ENCODING_E0173 887 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nLx2N, bFMD, true ); 888 #else 825 889 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nLx2N, true ); 890 #endif 826 891 rpcTempCU->initEstData( uiDepth, iQP ); 827 892 if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_nLx2N ) … … 836 901 ) 837 902 { 903 #if MTK_FAST_TEXTURE_ENCODING_E0173 904 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nRx2N, bFMD, true ); 905 #else 838 906 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nRx2N, true ); 907 #endif 839 908 rpcTempCU->initEstData( uiDepth, iQP ); 840 909 } … … 868 937 #endif 869 938 } 870 939 #if MTK_FAST_TEXTURE_ENCODING_E0173 940 if(!bFMD) 941 { 942 #endif 871 943 // do normal intra modes 872 944 #if H_3D_DIM_ENC … … 924 996 } 925 997 } 998 #if MTK_FAST_TEXTURE_ENCODING_E0173 999 } 1000 #endif 926 1001 if (isAddLowestQP && (iQP == lowestQP)) 927 1002 { … … 966 1041 bSubBranch = true; 967 1042 } 1043 #if MTK_FAST_TEXTURE_ENCODING_E0173 1044 if(rpcBestCU->getSlice()->getViewIndex() && !rpcBestCU->getSlice()->getIsDepth() && (uiDepth >=iIVFMaxD) && rpcBestCU->isSkipped(0)) 1045 { 1046 bSubBranch = false; 1047 } 1048 #endif 968 1049 } 969 1050 else if(!(bSliceEnd && bInsidePicture)) … … 1786 1867 1787 1868 #if AMP_MRG 1869 #if MTK_FAST_TEXTURE_ENCODING_E0173 1870 Void TEncCu::xCheckRDCostInter( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, PartSize ePartSize, Bool bFMD, Bool bUseMRG) 1871 #else 1788 1872 Void TEncCu::xCheckRDCostInter( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, PartSize ePartSize, Bool bUseMRG) 1873 #endif 1789 1874 #else 1790 1875 Void TEncCu::xCheckRDCostInter( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, PartSize ePartSize ) 1791 1876 #endif 1792 1877 { 1878 #if MTK_FAST_TEXTURE_ENCODING_E0173 1879 if(!(bFMD && (ePartSize == SIZE_2Nx2N))) //have motion estimation or merge check 1880 { 1881 #endif 1793 1882 UChar uhDepth = rpcTempCU->getDepth( 0 ); 1794 1883 #if H_3D_ARP … … 1864 1953 #if AMP_MRG 1865 1954 rpcTempCU->setMergeAMP (true); 1955 #if MTK_FAST_TEXTURE_ENCODING_E0173 1956 m_pcPredSearch->predInterSearch ( rpcTempCU, m_ppcOrigYuv[uhDepth], m_ppcPredYuvTemp[uhDepth], m_ppcResiYuvTemp[uhDepth], m_ppcRecoYuvTemp[uhDepth], bFMD, false, bUseMRG ); 1957 #else 1866 1958 m_pcPredSearch->predInterSearch ( rpcTempCU, m_ppcOrigYuv[uhDepth], m_ppcPredYuvTemp[uhDepth], m_ppcResiYuvTemp[uhDepth], m_ppcRecoYuvTemp[uhDepth], false, bUseMRG ); 1959 #endif 1867 1960 #else 1868 1961 m_pcPredSearch->predInterSearch ( rpcTempCU, m_ppcOrigYuv[uhDepth], m_ppcPredYuvTemp[uhDepth], m_ppcResiYuvTemp[uhDepth], m_ppcRecoYuvTemp[uhDepth] ); … … 1930 2023 } 1931 2024 #endif 2025 #if MTK_FAST_TEXTURE_ENCODING_E0173 2026 } 2027 #endif 1932 2028 } 1933 2029 -
branches/HTM-DEV-2.0-dev2-MediaTek/source/Lib/TLibEncoder/TEncCu.h
r537 r559 145 145 146 146 #if AMP_MRG 147 #if MTK_FAST_TEXTURE_ENCODING_E0173 148 Void xCheckRDCostInter ( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, PartSize ePartSize, Bool bFMD, Bool bUseMRG = false ) ; 149 #else 147 150 Void xCheckRDCostInter ( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, PartSize ePartSize, Bool bUseMRG = false ); 151 #endif 148 152 #else 149 153 Void xCheckRDCostInter ( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, PartSize ePartSize ); -
branches/HTM-DEV-2.0-dev2-MediaTek/source/Lib/TLibEncoder/TEncSearch.cpp
r537 r559 3654 3654 */ 3655 3655 #if AMP_MRG 3656 #if MTK_FAST_TEXTURE_ENCODING_E0173 3657 Void TEncSearch::predInterSearch( TComDataCU* pcCU, TComYuv* pcOrgYuv, TComYuv*& rpcPredYuv, TComYuv*& rpcResiYuv, TComYuv*& rpcRecoYuv, Bool bFMD, Bool bUseRes, Bool bUseMRG ) 3658 #else 3656 3659 Void TEncSearch::predInterSearch( TComDataCU* pcCU, TComYuv* pcOrgYuv, TComYuv*& rpcPredYuv, TComYuv*& rpcResiYuv, TComYuv*& rpcRecoYuv, Bool bUseRes, Bool bUseMRG ) 3660 #endif 3657 3661 #else 3658 3662 Void TEncSearch::predInterSearch( TComDataCU* pcCU, TComYuv* pcOrgYuv, TComYuv*& rpcPredYuv, TComYuv*& rpcResiYuv, TComYuv*& rpcRecoYuv, Bool bUseRes ) … … 3762 3766 #if AMP_MRG 3763 3767 Bool bTestNormalMC = true; 3764 3768 #if MTK_FAST_TEXTURE_ENCODING_E0173 3769 if (bFMD||( bUseMRG && pcCU->getWidth( 0 ) > 8 && iNumPart == 2 )) 3770 #else 3765 3771 if ( bUseMRG && pcCU->getWidth( 0 ) > 8 && iNumPart == 2 ) 3772 #endif 3766 3773 { 3767 3774 bTestNormalMC = false; -
branches/HTM-DEV-2.0-dev2-MediaTek/source/Lib/TLibEncoder/TEncSearch.h
r531 r559 196 196 TComYuv*& rpcResiYuv, 197 197 TComYuv*& rpcRecoYuv, 198 #if MTK_FAST_TEXTURE_ENCODING_E0173 199 Bool bFMD, 200 #endif 198 201 Bool bUseRes = false 199 202 #if AMP_MRG
Note: See TracChangeset for help on using the changeset viewer.