Changeset 1029 in 3DVCSoftware
- Timestamp:
- 30 Jul 2014, 18:43:21 (10 years ago)
- Location:
- branches/HTM-11.2-dev0/source/Lib
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-11.2-dev0/source/Lib/TLibCommon/ContextTables.h
r983 r1029 450 450 static const UChar INIT_DBBP_FLAG[3][DBBP_NUM_FLAG_CTX] = 451 451 { 452 #if SEC_DBBP_EXPLICIT_SIG_I0077 453 { CNU }, 454 { CNU }, 455 { CNU }, 456 #else 452 457 { 161 }, 453 458 { 161 }, 454 459 { 161 }, 455 }; 456 #endif 457 458 #endif 460 #endif 461 }; 462 #endif 463 464 #endif -
branches/HTM-11.2-dev0/source/Lib/TLibCommon/TComDataCU.cpp
r994 r1029 3373 3373 for(Int iLoop = 0; iLoop < 2; iLoop ++ ) 3374 3374 { 3375 #if !SEC_SIMP_SHIFTED_DV_I0086 3375 3376 // IvDcShift (Derived from spatial Iv neighboring blocks) 3376 3377 if( iLoop == 1 ) … … 3406 3407 } 3407 3408 } 3409 #endif 3408 3410 3409 3411 /// iLoop = 0 --> IvMCShift … … 3453 3455 } 3454 3456 3457 #if !SEC_SIMP_SHIFTED_DV_I0086 3455 3458 inline Bool TComDataCU::xGetPosFirstAvailDmvCand(Int iCount, Int& posFirstAvailDmvCand ) 3456 3459 { … … 3469 3472 return false; 3470 3473 } 3474 #endif 3471 3475 3472 3476 #endif … … 6146 6150 6147 6151 TComMv cMv; 6152 #if MTK_I0093 6153 Int iDisp = getSlice()->getDepthToDisparityB( 0 )[ 1 << ( getSlice()->getSPS()->getBitDepthY() - 1 ) ]; 6154 #else 6148 6155 Int iDisp = getSlice()->getDepthToDisparityB( 0 )[ 128 ]; 6156 #endif 6149 6157 cMv.setHor(iDisp); 6150 6158 cMv.setVer(0); -
branches/HTM-11.2-dev0/source/Lib/TLibCommon/TComDataCU.h
r1001 r1029 250 250 #if H_3D_IV_MERGE 251 251 Bool xAddIvMRGCand( Int mrgCandIdx, Int& iCount, Int* ivCandDir, TComMv* ivCandMv, Int* ivCandRefIdx ); 252 #if! SEC_SIMP_SHIFTED_DV_I0086 252 253 Bool xGetPosFirstAvailDmvCand( Int iCount, Int& iFirDispCand ); 254 #endif 253 255 #endif 254 256 -
branches/HTM-11.2-dev0/source/Lib/TLibCommon/TComPrediction.cpp
r1013 r1029 836 836 } 837 837 838 #if SHARP_DBBP_SIMPLE_FLTER_I0109 839 Void TComPrediction::combineSegmentsWithMask( TComYuv* pInYuv[2], TComYuv* pOutYuv, Bool* pMask, UInt uiWidth, UInt uiHeight, UInt uiPartAddr, UInt partSize ) 840 #else 838 841 Void TComPrediction::combineSegmentsWithMask( TComYuv* pInYuv[2], TComYuv* pOutYuv, Bool* pMask, UInt uiWidth, UInt uiHeight, UInt uiPartAddr ) 842 #endif 839 843 { 840 844 Pel* piSrc[2] = {pInYuv[0]->getLumaAddr(uiPartAddr), pInYuv[1]->getLumaAddr(uiPartAddr)}; … … 844 848 845 849 UInt uiMaskStride= MAX_CU_SIZE; 850 #if !SHARP_DBBP_SIMPLE_FLTER_I0109 846 851 Pel filSrc = 0; 852 #endif 847 853 Pel* tmpTar = 0; 848 854 tmpTar = (Pel *)xMalloc(Pel, uiWidth*uiHeight); … … 868 874 } 869 875 876 #if SHARP_DBBP_SIMPLE_FLTER_I0109 877 if (partSize == SIZE_Nx2N) 878 { 879 for (Int y=0; y<uiHeight; y++) 880 { 881 for (Int x=0; x<uiWidth; x++) 882 { 883 Bool l = (x==0)?pMaskStart[y*uiMaskStride+x]:pMaskStart[y*uiMaskStride+x-1]; 884 Bool r = (x==uiWidth-1)?pMaskStart[y*uiMaskStride+x]:pMaskStart[y*uiMaskStride+x+1]; 885 886 Pel left, right; 887 left = (x==0) ? tmpTar[y*uiWidth+x] : tmpTar[y*uiWidth+x-1]; 888 right = (x==uiWidth-1) ? tmpTar[y*uiWidth+x] : tmpTar[y*uiWidth+x+1]; 889 890 piDst[x] = (l!=r) ? ClipY( Pel(( left + (tmpTar[y*uiWidth+x] << 1) + right ) >> 2 )) : tmpTar[y*uiWidth+x]; 891 } 892 piDst += uiDstStride; 893 } 894 } 895 else // SIZE_2NxN 896 { 897 for (Int y=0; y<uiHeight; y++) 898 { 899 for (Int x=0; x<uiWidth; x++) 900 { 901 Bool t = (y==0)?pMaskStart[y*uiMaskStride+x]:pMaskStart[(y-1)*uiMaskStride+x]; 902 Bool b = (y==uiHeight-1)?pMaskStart[y*uiMaskStride+x]:pMaskStart[(y+1)*uiMaskStride+x]; 903 904 Pel top, bottom; 905 top = (y==0) ? tmpTar[y*uiWidth+x] : tmpTar[(y-1)*uiWidth+x]; 906 bottom = (y==uiHeight-1) ? tmpTar[y*uiWidth+x] : tmpTar[(y+1)*uiWidth+x]; 907 908 piDst[x] = (t!=b) ? ClipY( Pel(( top + (tmpTar[y*uiWidth+x] << 1) + bottom ) >> 2 )) : tmpTar[y*uiWidth+x]; 909 } 910 piDst += uiDstStride; 911 } 912 } 913 #else 870 914 for (Int y=0; y<uiHeight; y++) 871 915 { … … 901 945 piDst += uiDstStride; 902 946 } 947 #endif 948 903 949 if ( tmpTar ) { xFree(tmpTar); tmpTar = NULL; } 904 950 … … 937 983 } 938 984 985 #if SHARP_DBBP_SIMPLE_FLTER_I0109 986 if (partSize == SIZE_Nx2N) 987 { 988 for (Int y=0; y<uiHeightC; y++) 989 { 990 for (Int x=0; x<uiWidthC; x++) 991 { 992 Bool l = (x==0)?pMaskStart[y*2*uiMaskStride+x*2]:pMaskStart[y*2*uiMaskStride+(x-1)*2]; 993 Bool r = (x==uiWidthC-1)?pMaskStart[y*2*uiMaskStride+x*2]:pMaskStart[y*2*uiMaskStride+(x+1)*2]; 994 995 Pel leftU, rightU; 996 leftU = (x==0) ? tmpTarU[y*uiWidthC+x] : tmpTarU[y*uiWidthC+x-1]; 997 rightU = (x==uiWidthC-1) ? tmpTarU[y*uiWidthC+x] : tmpTarU[y*uiWidthC+x+1]; 998 Pel leftV, rightV; 999 leftV = (x==0) ? tmpTarV[y*uiWidthC+x] : tmpTarV[y*uiWidthC+x-1]; 1000 rightV = (x==uiWidthC-1) ? tmpTarV[y*uiWidthC+x] : tmpTarV[y*uiWidthC+x+1]; 1001 1002 if (l!=r) 1003 { 1004 filSrcU = ClipC( Pel(( leftU + (tmpTarU[y*uiWidthC+x] << 1) + rightU ) >> 2 )); 1005 filSrcV = ClipC( Pel(( leftV + (tmpTarV[y*uiWidthC+x] << 1) + rightV ) >> 2 )); 1006 } 1007 else 1008 { 1009 filSrcU = tmpTarU[y*uiWidthC+x]; 1010 filSrcV = tmpTarV[y*uiWidthC+x]; 1011 } 1012 piDstU[x] = filSrcU; 1013 piDstV[x] = filSrcV; 1014 } 1015 piDstU += uiDstStrideC; 1016 piDstV += uiDstStrideC; 1017 } 1018 } 1019 else 1020 { 1021 for (Int y=0; y<uiHeightC; y++) 1022 { 1023 for (Int x=0; x<uiWidthC; x++) 1024 { 1025 Bool t = (y==0)?pMaskStart[y*2*uiMaskStride+x*2]:pMaskStart[(y-1)*2*uiMaskStride+x*2]; 1026 Bool b = (y==uiHeightC-1)?pMaskStart[y*2*uiMaskStride+x*2]:pMaskStart[(y+1)*2*uiMaskStride+x*2]; 1027 1028 Pel topU, bottomU; 1029 topU = (y==0) ? tmpTarU[y*uiWidthC+x] : tmpTarU[(y-1)*uiWidthC+x]; 1030 bottomU = (y==uiHeightC-1) ? tmpTarU[y*uiWidthC+x] : tmpTarU[(y+1)*uiWidthC+x]; 1031 Pel topV, bottomV; 1032 topV = (y==0) ? tmpTarV[y*uiWidthC+x] : tmpTarV[(y-1)*uiWidthC+x]; 1033 bottomV = (y==uiHeightC-1) ? tmpTarV[y*uiWidthC+x] : tmpTarV[(y+1)*uiWidthC+x]; 1034 1035 if (t!=b) 1036 { 1037 filSrcU = ClipC( Pel(( topU + (tmpTarU[y*uiWidthC+x] << 1) + bottomU ) >> 2 )); 1038 filSrcV = ClipC( Pel(( topV + (tmpTarV[y*uiWidthC+x] << 1) + bottomV ) >> 2 )); 1039 } 1040 else 1041 { 1042 filSrcU = tmpTarU[y*uiWidthC+x]; 1043 filSrcV = tmpTarV[y*uiWidthC+x]; 1044 } 1045 piDstU[x] = filSrcU; 1046 piDstV[x] = filSrcV; 1047 } 1048 piDstU += uiDstStrideC; 1049 piDstV += uiDstStrideC; 1050 } 1051 } 1052 #else 939 1053 for (Int y=0; y<uiHeightC; y++) 940 1054 { … … 982 1096 piDstV += uiDstStrideC; 983 1097 } 1098 #endif 984 1099 if ( tmpTarU ) { xFree(tmpTarU); tmpTarU = NULL; } 985 1100 if ( tmpTarV ) { xFree(tmpTarV); tmpTarV = NULL; } -
branches/HTM-11.2-dev0/source/Lib/TLibCommon/TComPrediction.h
r884 r1029 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-dev0/source/Lib/TLibCommon/TypeDef.h
r1023 r1029 68 68 #define BUG_FIX_TK65 1 69 69 70 #define MTK_I0093 1 70 71 ///////////////////////////////////////////////////////////////////////////////////////// 71 72 /////////////////////////////////// MAJOR DEFINES /////////////////////////////////// … … 172 173 // MTK_DIS_SPBIP8X4_H0205 Disable bi-prediction for 8x4 and 4x8 sub PU and remove the SPIVMP 2Nx2N restriction 173 174 // SEC_ADAPT_DISABLE_IVMP Disalbing IVMP merge candidates when IC is enabled, JCT3V-H0070 175 176 #define SEC_SIMP_SHIFTED_DV_I0086 1 // Simplification of Shifted DV candidate, JCT3V-I0086 174 177 175 178 #define H_3D_TMVP 1 // QC_TMVP_C0047 … … 237 240 // H_3D_FIX_DBBP_IVMP Fix . Enable IVMP is always disabled, when DBBP is enabled. The original intention is to disable Sub-PU IVMP when DBBP is enabled, not to disable IVMP itself. 238 241 242 #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 243 #define SEC_DBBP_DISALLOW_8x8_I0078 1 // Disallow DBBP in 8x8 CU, JCT3V-I0078 244 #define SHARP_DBBP_SIMPLE_FLTER_I0109 1 // Simple condition and one dimensional dilter for DBBP 239 245 #define SEC_DBBP_DMM4_THRESHOLD_I0076 1 // Simplification of threshold derivation for DBBP and DMM4, JCT3V-I0076 240 246 -
branches/HTM-11.2-dev0/source/Lib/TLibDecoder/TDecCu.cpp
r1001 r1029 924 924 925 925 // reconstruct final prediction signal by combining both segments 926 #if SHARP_DBBP_SIMPLE_FLTER_I0109 927 m_pcPrediction->combineSegmentsWithMask(apSegPredYuv, m_ppcYuvReco[uiDepth], pMask, pcCU->getWidth(0), pcCU->getHeight(0), 0, ePartSize); 928 #else 926 929 m_pcPrediction->combineSegmentsWithMask(apSegPredYuv, m_ppcYuvReco[uiDepth], pMask, pcCU->getWidth(0), pcCU->getHeight(0)); 930 #endif 927 931 928 932 // inter recon -
branches/HTM-11.2-dev0/source/Lib/TLibDecoder/TDecEntropy.cpp
r983 r1029 153 153 #if H_3D_DBBP 154 154 155 #if SEC_DBBP_EXPLICIT_SIG_I0077 156 #if SEC_DBBP_DISALLOW_8x8_I0078 157 if( pcCU->getSlice()->getVPS()->getUseDBBP(pcCU->getSlice()->getLayerIdInVps()) && (pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2NxN || pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_Nx2N) && pcCU->getWidth(uiAbsPartIdx) > 8 ) 158 #else 159 if( pcCU->getSlice()->getVPS()->getUseDBBP(pcCU->getSlice()->getLayerIdInVps()) && (pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2NxN || pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_Nx2N) ) 160 #endif 161 #else 162 #if SEC_DBBP_DISALLOW_8x8_I0078 163 if( pcCU->getSlice()->getVPS()->getUseDBBP(pcCU->getSlice()->getLayerIdInVps()) && pcCU->getWidth(uiAbsPartIdx) > 8 ) 164 #else 155 165 if( pcCU->getSlice()->getVPS()->getUseDBBP(pcCU->getSlice()->getLayerIdInVps()) ) 166 #endif 167 #endif 156 168 { 157 169 decodeDBBPFlag(pcCU, uiAbsPartIdx, uiDepth); 158 170 #if !SEC_DBBP_EXPLICIT_SIG_I0077 159 171 if( pcCU->getDBBPFlag(uiAbsPartIdx) ) 160 172 { … … 180 192 pcCU->setDBBPFlagSubParts(true, uiAbsPartIdx+uiPUOffset, 1, uiDepth); 181 193 } 194 #endif 182 195 } 183 196 #endif -
branches/HTM-11.2-dev0/source/Lib/TLibDecoder/TDecSbac.cpp
r1015 r1029 2262 2262 m_pcTDecBinIf->decodeBin( uiSymbol, m_cDBBPFlagSCModel.get( 0, 0, 0 ) ); 2263 2263 2264 #if SEC_DBBP_EXPLICIT_SIG_I0077 2265 PartSize ePartSize = pcCU->getPartitionSize( uiAbsPartIdx ); 2266 AOF( ePartSize == SIZE_2NxN || ePartSize == SIZE_Nx2N ); 2267 UInt uiPUOffset = ( g_auiPUOffset[UInt( ePartSize )] << ( ( pcCU->getSlice()->getSPS()->getMaxCUDepth() - uiDepth ) << 1 ) ) >> 4; 2268 pcCU->setDBBPFlagSubParts(uiSymbol, uiAbsPartIdx, 0, uiDepth); 2269 pcCU->setDBBPFlagSubParts(uiSymbol, uiAbsPartIdx+uiPUOffset, 1, uiDepth); 2270 #else 2264 2271 if( uiSymbol ) 2265 2272 { … … 2268 2275 pcCU->setDBBPFlagSubParts(true, uiAbsPartIdx + 2*uiCurrPartNumQ, 1, uiDepth); 2269 2276 } 2277 #endif 2270 2278 } 2271 2279 #endif -
branches/HTM-11.2-dev0/source/Lib/TLibEncoder/TEncCu.cpp
r1019 r1029 2545 2545 AOF( uiWidth == uiHeight ); 2546 2546 2547 #if SEC_DBBP_DISALLOW_8x8_I0078 2548 if(uiWidth <= 8) 2549 { 2550 return; 2551 } 2552 #endif 2553 2547 2554 rpcTempCU->setPartSizeSubParts( SIZE_2Nx2N, 0, uhDepth ); 2548 2555 … … 2641 2648 2642 2649 // reconstruct final prediction signal by combining both segments 2650 #if SHARP_DBBP_SIMPLE_FLTER_I0109 2651 m_pcPredSearch->combineSegmentsWithMask(apPredYuv, m_ppcPredYuvTemp[uhDepth], pMask, uiWidth, uiHeight, 0, eVirtualPartSize); 2652 #else 2643 2653 m_pcPredSearch->combineSegmentsWithMask(apPredYuv, m_ppcPredYuvTemp[uhDepth], pMask, uiWidth, uiHeight); 2654 #endif 2644 2655 2645 2656 m_pcPredSearch->encodeResAndCalcRdInterCU( rpcTempCU, m_ppcOrigYuv[uhDepth], m_ppcPredYuvTemp[uhDepth], m_ppcResiYuvTemp[uhDepth], m_ppcResiYuvBest[uhDepth], m_ppcRecoYuvTemp[uhDepth], false ); -
branches/HTM-11.2-dev0/source/Lib/TLibEncoder/TEncEntropy.cpp
r983 r1029 262 262 263 263 #if H_3D_DBBP 264 #if! SEC_DBBP_EXPLICIT_SIG_I0077 264 265 PartSize eVirtualPartSize = pcCU->getPartitionSize(uiAbsPartIdx); 265 266 if( pcCU->getDBBPFlag(uiAbsPartIdx) ) … … 271 272 } 272 273 #endif 274 #endif 273 275 274 276 m_pcEntropyCoderIf->codePartSize( pcCU, uiAbsPartIdx, uiDepth ); 275 277 276 278 #if H_3D_DBBP 279 #if SEC_DBBP_EXPLICIT_SIG_I0077 280 #if SEC_DBBP_DISALLOW_8x8_I0078 281 if( pcCU->getSlice()->getVPS()->getUseDBBP(pcCU->getSlice()->getLayerIdInVps()) && (pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2NxN || pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_Nx2N) && pcCU->getWidth(uiAbsPartIdx) > 8 ) 282 #else 283 if( pcCU->getSlice()->getVPS()->getUseDBBP(pcCU->getSlice()->getLayerIdInVps()) && (pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2NxN || pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_Nx2N) ) 284 #endif 285 #else 286 #if SEC_DBBP_DISALLOW_8x8_I0078 287 if( pcCU->getSlice()->getVPS()->getUseDBBP(pcCU->getSlice()->getLayerIdInVps()) && pcCU->getWidth(uiAbsPartIdx) > 8 ) 288 #else 277 289 if( pcCU->getSlice()->getVPS()->getUseDBBP(pcCU->getSlice()->getLayerIdInVps()) ) 290 #endif 291 #endif 278 292 { 279 293 encodeDBBPFlag(pcCU, uiAbsPartIdx, bRD); 280 294 #if !SEC_DBBP_EXPLICIT_SIG_I0077 281 295 if( pcCU->getDBBPFlag(uiAbsPartIdx) ) 282 296 { … … 284 298 pcCU->setPartSizeSubParts(eVirtualPartSize, uiAbsPartIdx, uiDepth); 285 299 } 300 #endif 286 301 } 287 302 #endif -
branches/HTM-11.2-dev0/source/Lib/TLibEncoder/TEncSbac.cpp
r1015 r1029 2418 2418 Void TEncSbac::codeDBBPFlag( TComDataCU* pcCU, UInt uiAbsPartIdx ) 2419 2419 { 2420 #if SEC_DBBP_EXPLICIT_SIG_I0077 2421 PartSize ePartSize = pcCU->getPartitionSize( uiAbsPartIdx ); 2422 AOF( ePartSize == SIZE_2NxN || ePartSize == SIZE_Nx2N ); 2423 #endif 2420 2424 AOF( pcCU->getSlice()->getVPS()->getUseDBBP(pcCU->getSlice()->getLayerIdInVps()) ); 2421 2425 AOF( !pcCU->getSlice()->getIsDepth() );
Note: See TracChangeset for help on using the changeset viewer.