Changeset 666 in 3DVCSoftware for branches/HTM-8.2-dev1-Qualcomm
- Timestamp:
- 4 Nov 2013, 16:21:28 (11 years ago)
- Location:
- branches/HTM-8.2-dev1-Qualcomm
- Files:
-
- 2 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-8.2-dev1-Qualcomm/source/Lib/TLibCommon/TComPrediction.cpp
r655 r666 664 664 pcCU->clipMv(cMv); 665 665 #if H_3D_ARP 666 #if QC_MTK_INTERVIEW_ARP_F0123_F0108 667 if(pcCU->getARPW( uiPartAddr ) > 0 && pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPOC()== pcCU->getSlice()->getPOC()) 668 { 669 xPredInterUniARPviewRef( pcCU , uiPartAddr , iWidth , iHeight , eRefPicList , rpcYuvPred , bi ); 670 } 671 else 672 #endif 666 673 if( pcCU->getARPW( uiPartAddr ) > 0 667 674 && pcCU->getPartitionSize(uiPartAddr)==SIZE_2Nx2N … … 841 848 } 842 849 } 850 #if QC_MTK_INTERVIEW_ARP_F0123_F0108 851 Void TComPrediction::xPredInterUniARPviewRef( TComDataCU* pcCU, UInt uiPartAddr, Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Bool bi, TComMvField * pNewMvFiled ) 852 { 853 Int iRefIdx = pcCU->getCUMvField( eRefPicList )->getRefIdx( uiPartAddr ); 854 TComMv cDMv = pcCU->getCUMvField( eRefPicList )->getMv( uiPartAddr ); 855 TComMv cTempDMv = cDMv; 856 UChar dW = pcCU->getARPW ( uiPartAddr ); 857 858 TComPic* pcPicYuvBaseTRef = NULL; 859 TComPic* pcPicYuvCurrTRef = NULL; 860 TComPic* pcPicYuvBaseCol = pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx ); 861 TComPicYuv* pcYuvBaseCol = pcPicYuvBaseCol->getPicYuvRec(); 862 Bool bTMVAvai = false; 863 TComMv cBaseTMV; 864 if( pNewMvFiled ) 865 { 866 iRefIdx = pNewMvFiled->getRefIdx(); 867 cDMv = pNewMvFiled->getMv(); 868 } 869 pcCU->clipMv(cTempDMv); 870 871 assert(dW > 0); 872 Int uiLCUAddr,uiAbsPartAddr; 873 Int irefPUX = pcCU->getCUPelX() + g_auiRasterToPelX[g_auiZscanToRaster[uiPartAddr]] + iWidth/2 + ((cDMv.getHor() + 2)>>2); 874 Int irefPUY = pcCU->getCUPelY() + g_auiRasterToPelY[g_auiZscanToRaster[uiPartAddr]] + iHeight/2 + ((cDMv.getVer() + 2)>>2); 875 876 irefPUX = (Int)Clip3<Int>(0, pcCU->getSlice()->getSPS()-> getPicWidthInLumaSamples()-1, irefPUX); 877 irefPUY = (Int)Clip3<Int>(0, pcCU->getSlice()->getSPS()->getPicHeightInLumaSamples()-1, irefPUY); 878 pcYuvBaseCol->getCUAddrAndPartIdx( irefPUX, irefPUY, uiLCUAddr, uiAbsPartAddr); 879 TComDataCU *pColCU = pcPicYuvBaseCol->getCU( uiLCUAddr ); 880 881 if(!pColCU->isIntra(uiAbsPartAddr)) 882 { 883 TComMvField puMVField; 884 for(Int iList = 0; iList < (pColCU->getSlice()->isInterB() ? 2: 1) && !bTMVAvai; iList ++) 885 { 886 RefPicList eRefPicListCurr = RefPicList(iList); 887 Int iRef = pColCU->getCUMvField(eRefPicListCurr)->getRefIdx(uiAbsPartAddr); 888 if( iRef != -1) 889 { 890 pcPicYuvBaseTRef = pColCU->getSlice()->getRefPic(eRefPicListCurr, iRef); 891 Int iCurrPOC = pColCU->getSlice()->getPOC(); 892 Int iCurrRefPOC = pcPicYuvBaseTRef->getPOC(); 893 Int iCurrRef = pcCU->getSlice()->getFirstTRefIdx(eRefPicListCurr); 894 if( iCurrRef >= 0) 895 { 896 pcPicYuvCurrTRef = pcCU->getSlice()->getRefPic(eRefPicListCurr,iCurrRef); 897 Int iTargetPOC = pcPicYuvCurrTRef->getPOC(); 898 { 899 pcPicYuvBaseTRef = pcCU->getSlice()->getBaseViewRefPic(iTargetPOC, pcPicYuvBaseCol->getViewIndex() ); 900 if(pcPicYuvBaseTRef) 901 { 902 cBaseTMV = pColCU->getCUMvField(eRefPicListCurr)->getMv(uiAbsPartAddr); 903 Int iScale = pcCU-> xGetDistScaleFactor(iCurrPOC, iTargetPOC, iCurrPOC, iCurrRefPOC); 904 if ( iScale != 4096 ) 905 cBaseTMV = cBaseTMV.scaleMv( iScale ); 906 bTMVAvai = true; 907 break; 908 } 909 } 910 } 911 } 912 } 913 } 914 if (bTMVAvai == false) 915 { 916 bTMVAvai = true; 917 cBaseTMV.set(0, 0); 918 pcPicYuvBaseTRef = pColCU->getSlice()->getRefPic(eRefPicList, pcCU->getSlice()->getFirstTRefIdx(eRefPicList)); 919 pcPicYuvCurrTRef = pcCU->getSlice()->getRefPic (eRefPicList, pcCU->getSlice()->getFirstTRefIdx(eRefPicList)); 920 } 921 922 xPredInterLumaBlk ( pcCU, pcYuvBaseCol, uiPartAddr, &cTempDMv, iWidth, iHeight, rpcYuvPred, bi, bTMVAvai); 923 xPredInterChromaBlk( pcCU, pcYuvBaseCol, uiPartAddr, &cTempDMv, iWidth, iHeight, rpcYuvPred, bi, bTMVAvai); 924 925 if( dW > 0 && bTMVAvai ) 926 { 927 TComYuv* pYuvCurrTRef = &m_acYuvPredBase[0]; 928 TComYuv* pYuvBaseTRef = &m_acYuvPredBase[1]; 929 TComPicYuv* pcYuvCurrTref = pcPicYuvCurrTRef->getPicYuvRec(); 930 TComPicYuv* pcYuvBaseTref = pcPicYuvBaseTRef->getPicYuvRec(); 931 TComMv cTempMv = cDMv + cBaseTMV; 932 933 pcCU->clipMv(cBaseTMV); 934 pcCU->clipMv(cTempMv); 935 936 xPredInterLumaBlk ( pcCU, pcYuvCurrTref, uiPartAddr, &cBaseTMV, iWidth, iHeight, pYuvCurrTRef, bi, true); 937 xPredInterChromaBlk( pcCU, pcYuvCurrTref, uiPartAddr, &cBaseTMV, iWidth, iHeight, pYuvCurrTRef, bi, true); 938 xPredInterLumaBlk ( pcCU, pcYuvBaseTref, uiPartAddr, &cTempMv, iWidth, iHeight, pYuvBaseTRef, bi, true); 939 xPredInterChromaBlk( pcCU, pcYuvBaseTref, uiPartAddr, &cTempMv, iWidth, iHeight, pYuvBaseTRef, bi, true); 940 941 pYuvCurrTRef->subtractARP( pYuvCurrTRef , pYuvBaseTRef , uiPartAddr , iWidth , iHeight ); 942 if(dW == 2) 943 { 944 pYuvCurrTRef->multiplyARP( uiPartAddr , iWidth , iHeight , dW ); 945 } 946 rpcYuvPred->addARP( rpcYuvPred , pYuvCurrTRef , uiPartAddr , iWidth , iHeight , !bi ); 947 } 948 } 949 #endif 950 843 951 #endif 844 952 -
branches/HTM-8.2-dev1-Qualcomm/source/Lib/TLibCommon/TComPrediction.h
r655 r666 93 93 #if H_3D_ARP 94 94 Void xPredInterUniARP ( TComDataCU* pcCU, UInt uiPartAddr, Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Bool bi=false, TComMvField * pNewMvFiled = NULL ); 95 #if QC_MTK_INTERVIEW_ARP_F0123_F0108 96 Void xPredInterUniARPviewRef( TComDataCU* pcCU, UInt uiPartAddr, Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Bool bi, TComMvField * pNewMvFiled = NULL ); 97 #endif 95 98 #endif 96 99 Void xPredInterUni ( TComDataCU* pcCU, UInt uiPartAddr, Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Bool bi=false ); -
branches/HTM-8.2-dev1-Qualcomm/source/Lib/TLibCommon/TComSlice.cpp
r655 r666 751 751 if ( this->getNumRefIdx( RefPicList( uiRefListIdx ) ) == 0) 752 752 continue; 753 753 #if QC_MTK_INTERVIEW_ARP_F0123_F0108 754 for(Int i = 0; i < this->getNumRefIdx(RefPicList(uiRefListIdx)); i++ ) 755 { 756 if ( this->getRefPic(RefPicList(uiRefListIdx), i)->getPOC() != getPOC() ) 757 { 758 this->setFirstTRefIdx (RefPicList(uiRefListIdx), i); 759 break; 760 } 761 } 762 #endif 754 763 Bool bZeroIdxLtFlag = this->getRefPic(RefPicList(uiRefListIdx), 0)->getIsLongTerm(); 755 764 for(Int i = 1; i < this->getNumRefIdx(RefPicList(uiRefListIdx)); i++ ) … … 2834 2843 { 2835 2844 Bool bAllIvRef = true; 2836 2845 #if QC_MTK_INTERVIEW_ARP_F0123_F0108 2846 if(!getVPS()->getUseAdvRP(getLayerId()) || this->isIRAP()) 2847 #else 2837 2848 if(!getVPS()->getUseAdvRP(getLayerId())) 2849 #endif 2838 2850 { 2839 2851 m_nARPStepNum = 0; -
branches/HTM-8.2-dev1-Qualcomm/source/Lib/TLibCommon/TComSlice.h
r655 r666 1732 1732 TComList<TComPic*> * m_pBaseViewRefPicList[MAX_NUM_LAYERS]; 1733 1733 UInt m_nARPStepNum; 1734 #if QC_MTK_INTERVIEW_ARP_F0123_F0108 1735 Int m_aiFirstTRefIdx [2]; 1736 #endif 1734 1737 #endif 1735 1738 #if H_3D_IC … … 2019 2022 Int getAlterRefIdx ( RefPicList e ) { return m_aiAlterRefIdx[e]; } 2020 2023 #endif 2024 #if QC_MTK_INTERVIEW_ARP_F0123_F0108 2025 Int getFirstTRefIdx ( RefPicList e ) { return m_aiFirstTRefIdx[e]; } 2026 Void setFirstTRefIdx ( RefPicList e, Int i ) { m_aiFirstTRefIdx[e] = i; } 2027 #endif 2021 2028 Void setIsDepth ( Bool isDepth ) { m_isDepth = isDepth; } 2022 2029 Bool getIsDepth () { return m_isDepth; } -
branches/HTM-8.2-dev1-Qualcomm/source/Lib/TLibCommon/TypeDef.h
r655 r666 207 207 #if H_3D_ARP 208 208 #define H_3D_ARP_WFNR 3 209 #define QC_MTK_INTERVIEW_ARP_F0123_F0108 1 //JCT3V-F0123; JCT3V-F0108 210 #define QC_MTK_INTERVIEW_ARP_F0123_F0108 1 //JCT3V-F0123; JCT3V-F0108 209 211 #endif 210 212 -
branches/HTM-8.2-dev1-Qualcomm/source/Lib/TLibEncoder/TEncCu.cpp
r655 r666 1845 1845 rpcTempCU->getCUMvField( REF_PIC_LIST_1 )->setAllMvField( cMvFieldNeighbours[1 + 2*uiMergeCand], SIZE_2Nx2N, 0, 0 ); // interprets depth relative to rpcTempCU level 1846 1846 1847 #if H_3D_ARP 1847 #if H_3D_ARP && !QC_MTK_INTERVIEW_ARP_F0123_F0108 1848 1848 if( nARPW ) 1849 1849 { … … 2050 2050 2051 2051 m_pcPredSearch->motionCompensation( rpcTempCU , m_ppcPredYuvTemp[uhDepth] ); 2052 2052 #if !QC_MTK_INTERVIEW_ARP_F0123_F0108 2053 2053 if(rpcTempCU->getPartitionSize(0)==SIZE_2Nx2N) 2054 2054 { … … 2068 2068 } 2069 2069 } 2070 #endif 2070 2071 } 2071 2072 else … … 2087 2088 { 2088 2089 m_ppcWeightedTempCU[uhDepth]->copyPartFrom( rpcTempCU , 0 , uhDepth ); 2089 2090 #if !QC_MTK_INTERVIEW_ARP_F0123_F0108 2090 2091 Bool bSignalflag[2] = { true, true }; 2091 2092 for(UInt uiRefListIdx = 0; uiRefListIdx < 2; uiRefListIdx ++ ) … … 2102 2103 rpcTempCU->setARPWSubParts( 0 , 0 , uhDepth ); 2103 2104 } 2105 #endif 2104 2106 } 2105 2107 }
Note: See TracChangeset for help on using the changeset viewer.