Changeset 998 in 3DVCSoftware for branches/HTM-11.2-dev1-Sharp
- Timestamp:
- 18 Jul 2014, 05:19:45 (10 years ago)
- Location:
- branches/HTM-11.2-dev1-Sharp
- Files:
-
- 3 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-11.2-dev1-Sharp/source/Lib/TLibCommon/TComPrediction.cpp
r976 r998 790 790 } 791 791 792 #if SHARP_DBBP_SIMPLE_FLTER_I0109 793 Void TComPrediction::combineSegmentsWithMask( TComYuv* pInYuv[2], TComYuv* pOutYuv, Bool* pMask, UInt uiWidth, UInt uiHeight, UInt uiPartAddr, UInt partSize ) 794 #else 792 795 Void TComPrediction::combineSegmentsWithMask( TComYuv* pInYuv[2], TComYuv* pOutYuv, Bool* pMask, UInt uiWidth, UInt uiHeight, UInt uiPartAddr ) 796 #endif 793 797 { 794 798 Pel* piSrc[2] = {pInYuv[0]->getLumaAddr(uiPartAddr), pInYuv[1]->getLumaAddr(uiPartAddr)}; … … 798 802 799 803 UInt uiMaskStride= MAX_CU_SIZE; 804 #if !SHARP_DBBP_SIMPLE_FLTER_I0109 800 805 Pel filSrc = 0; 806 #endif 801 807 Pel* tmpTar = 0; 802 808 tmpTar = (Pel *)xMalloc(Pel, uiWidth*uiHeight); … … 821 827 pMask += uiMaskStride; 822 828 } 823 829 830 #if SHARP_DBBP_SIMPLE_FLTER_I0109 831 if (partSize == SIZE_Nx2N) 832 { 833 for (Int y=0; y<uiHeight; y++) 834 { 835 for (Int x=0; x<uiWidth; x++) 836 { 837 Bool l = (x==0)?pMaskStart[y*uiMaskStride+x]:pMaskStart[y*uiMaskStride+x-1]; 838 Bool r = (x==uiWidth-1)?pMaskStart[y*uiMaskStride+x]:pMaskStart[y*uiMaskStride+x+1]; 839 840 Pel left, right; 841 left = (x==0) ? tmpTar[y*uiWidth+x] : tmpTar[y*uiWidth+x-1]; 842 right = (x==uiWidth-1) ? tmpTar[y*uiWidth+x] : tmpTar[y*uiWidth+x+1]; 843 844 piDst[x] = (l!=r) ? Clip3( Pel( 0 ), Pel( 255 ), Pel(( left + (tmpTar[y*uiWidth+x] << 1) + right ) >> 2 )) : tmpTar[y*uiWidth+x]; 845 } 846 piDst += uiDstStride; 847 } 848 } 849 else // SIZE_2NxN 850 { 851 for (Int y=0; y<uiHeight; y++) 852 { 853 for (Int x=0; x<uiWidth; x++) 854 { 855 Bool t = (y==0)?pMaskStart[y*uiMaskStride+x]:pMaskStart[(y-1)*uiMaskStride+x]; 856 Bool b = (y==uiHeight-1)?pMaskStart[y*uiMaskStride+x]:pMaskStart[(y+1)*uiMaskStride+x]; 857 858 Pel top, bottom; 859 top = (y==0) ? tmpTar[y*uiWidth+x] : tmpTar[(y-1)*uiWidth+x]; 860 bottom = (y==uiHeight-1) ? tmpTar[y*uiWidth+x] : tmpTar[(y+1)*uiWidth+x]; 861 862 piDst[x] = (t!=b) ? Clip3( Pel( 0 ), Pel( 255 ), Pel(( top + (tmpTar[y*uiWidth+x] << 1) + bottom ) >> 2 )) : tmpTar[y*uiWidth+x]; 863 } 864 piDst += uiDstStride; 865 } 866 } 867 #else 824 868 for (Int y=0; y<uiHeight; y++) 825 869 { … … 855 899 piDst += uiDstStride; 856 900 } 901 #endif 902 857 903 if ( tmpTar ) { xFree(tmpTar); tmpTar = NULL; } 858 904 … … 890 936 pMask += 2*uiMaskStride; 891 937 } 892 938 939 #if SHARP_DBBP_SIMPLE_FLTER_I0109 940 if (partSize == SIZE_Nx2N) 941 { 942 for (Int y=0; y<uiHeightC; y++) 943 { 944 for (Int x=0; x<uiWidthC; x++) 945 { 946 Bool l = (x==0)?pMaskStart[y*2*uiMaskStride+x*2]:pMaskStart[y*2*uiMaskStride+(x-1)*2]; 947 Bool r = (x==uiWidthC-1)?pMaskStart[y*2*uiMaskStride+x*2]:pMaskStart[y*2*uiMaskStride+(x+1)*2]; 948 949 Pel leftU, rightU; 950 leftU = (x==0) ? tmpTarU[y*uiWidthC+x] : tmpTarU[y*uiWidthC+x-1]; 951 rightU = (x==uiWidthC-1) ? tmpTarU[y*uiWidthC+x] : tmpTarU[y*uiWidthC+x+1]; 952 Pel leftV, rightV; 953 leftV = (x==0) ? tmpTarV[y*uiWidthC+x] : tmpTarV[y*uiWidthC+x-1]; 954 rightV = (x==uiWidthC-1) ? tmpTarV[y*uiWidthC+x] : tmpTarV[y*uiWidthC+x+1]; 955 956 if (l!=r) 957 { 958 filSrcU = Clip3( Pel( 0 ), Pel( 255 ), Pel(( leftU + (tmpTarU[y*uiWidthC+x] << 1) + rightU ) >> 2 )); 959 filSrcV = Clip3( Pel( 0 ), Pel( 255 ), Pel(( leftV + (tmpTarV[y*uiWidthC+x] << 1) + rightV ) >> 2 )); 960 } 961 else 962 { 963 filSrcU = tmpTarU[y*uiWidthC+x]; 964 filSrcV = tmpTarV[y*uiWidthC+x]; 965 } 966 piDstU[x] = filSrcU; 967 piDstV[x] = filSrcV; 968 } 969 piDstU += uiDstStrideC; 970 piDstV += uiDstStrideC; 971 } 972 } 973 else 974 { 975 for (Int y=0; y<uiHeightC; y++) 976 { 977 for (Int x=0; x<uiWidthC; x++) 978 { 979 Bool t = (y==0)?pMaskStart[y*2*uiMaskStride+x*2]:pMaskStart[(y-1)*2*uiMaskStride+x*2]; 980 Bool b = (y==uiHeightC-1)?pMaskStart[y*2*uiMaskStride+x*2]:pMaskStart[(y+1)*2*uiMaskStride+x*2]; 981 982 Pel topU, bottomU; 983 topU = (y==0) ? tmpTarU[y*uiWidthC+x] : tmpTarU[(y-1)*uiWidthC+x]; 984 bottomU = (y==uiHeightC-1) ? tmpTarU[y*uiWidthC+x] : tmpTarU[(y+1)*uiWidthC+x]; 985 Pel topV, bottomV; 986 topV = (y==0) ? tmpTarV[y*uiWidthC+x] : tmpTarV[(y-1)*uiWidthC+x]; 987 bottomV = (y==uiHeightC-1) ? tmpTarV[y*uiWidthC+x] : tmpTarV[(y+1)*uiWidthC+x]; 988 989 if (t!=b) 990 { 991 filSrcU = Clip3( Pel( 0 ), Pel( 255 ), Pel(( topU + (tmpTarU[y*uiWidthC+x] << 1) + bottomU ) >> 2 )); 992 filSrcV = Clip3( Pel( 0 ), Pel( 255 ), Pel(( topV + (tmpTarV[y*uiWidthC+x] << 1) + bottomV ) >> 2 )); 993 } 994 else 995 { 996 filSrcU = tmpTarU[y*uiWidthC+x]; 997 filSrcV = tmpTarV[y*uiWidthC+x]; 998 } 999 piDstU[x] = filSrcU; 1000 piDstV[x] = filSrcV; 1001 } 1002 piDstU += uiDstStrideC; 1003 piDstV += uiDstStrideC; 1004 } 1005 } 1006 #else 893 1007 for (Int y=0; y<uiHeightC; y++) 894 1008 { … … 936 1050 piDstV += uiDstStrideC; 937 1051 } 1052 #endif 938 1053 if ( tmpTarU ) { xFree(tmpTarU); tmpTarU = NULL; } 939 1054 if ( tmpTarV ) { xFree(tmpTarV); tmpTarV = NULL; } -
branches/HTM-11.2-dev1-Sharp/source/Lib/TLibCommon/TComPrediction.h
r884 r998 176 176 PartSize getPartitionSizeFromDepth(Pel* pDepthPels, UInt uiDepthStride, UInt uiSize); 177 177 Bool getSegmentMaskFromDepth( Pel* pDepthPels, UInt uiDepthStride, UInt uiWidth, UInt uiHeight, Bool* pMask ); 178 #if SHARP_DBBP_SIMPLE_FLTER_I0109 179 Void combineSegmentsWithMask( TComYuv* pInYuv[2], TComYuv* pOutYuv, Bool* pMask, UInt uiWidth, UInt uiHeight, UInt uiPartAddr, UInt partSize ); 180 #else 178 181 Void combineSegmentsWithMask( TComYuv* pInYuv[2], TComYuv* pOutYuv, Bool* pMask, UInt uiWidth, UInt uiHeight, UInt uiPartAddr = 0 ); 182 #endif 179 183 #endif 180 184 -
branches/HTM-11.2-dev1-Sharp/source/Lib/TLibCommon/TypeDef.h
r991 r998 237 237 #define SEC_DBBP_EXPLICIT_SIG_I0077 1 // Remove the partition derivation and signal dbbp_flag only when the partion mode is 2NxN/Nx2N, JCT3V-I0077 238 238 #define SEC_DBBP_DISALLOW_8x8_I0078 1 // Disallow DBBP in 8x8 CU, JCT3V-I0078 239 #define SHARP_DBBP_SIMPLE_FLTER_I0109 1 // Simple condition and one dimensional dilter for DBBP 239 240 240 241 #define H_3D_DDD 1 // Disparity derived depth coding -
branches/HTM-11.2-dev1-Sharp/source/Lib/TLibDecoder/TDecCu.cpp
r976 r998 832 832 833 833 // reconstruct final prediction signal by combining both segments 834 #if SHARP_DBBP_SIMPLE_FLTER_I0109 835 m_pcPrediction->combineSegmentsWithMask(apSegPredYuv, m_ppcYuvReco[uiDepth], pMask, pcCU->getWidth(0), pcCU->getHeight(0), 0, ePartSize); 836 #else 834 837 m_pcPrediction->combineSegmentsWithMask(apSegPredYuv, m_ppcYuvReco[uiDepth], pMask, pcCU->getWidth(0), pcCU->getHeight(0)); 838 #endif 835 839 836 840 // inter recon -
branches/HTM-11.2-dev1-Sharp/source/Lib/TLibEncoder/TEncCu.cpp
r991 r998 2445 2445 2446 2446 // reconstruct final prediction signal by combining both segments 2447 #if SHARP_DBBP_SIMPLE_FLTER_I0109 2448 m_pcPredSearch->combineSegmentsWithMask(apPredYuv, m_ppcPredYuvTemp[uhDepth], pMask, uiWidth, uiHeight, 0, eVirtualPartSize); 2449 #else 2447 2450 m_pcPredSearch->combineSegmentsWithMask(apPredYuv, m_ppcPredYuvTemp[uhDepth], pMask, uiWidth, uiHeight); 2451 #endif 2448 2452 2449 2453 m_pcPredSearch->encodeResAndCalcRdInterCU( rpcTempCU, m_ppcOrigYuv[uhDepth], m_ppcPredYuvTemp[uhDepth], m_ppcResiYuvTemp[uhDepth], m_ppcResiYuvBest[uhDepth], m_ppcRecoYuvTemp[uhDepth], false );
Note: See TracChangeset for help on using the changeset viewer.