Changeset 601 in 3DVCSoftware
- Timestamp:
- 29 Aug 2013, 15:10:30 (11 years ago)
- Location:
- branches/HTM-DEV-2.0-dev0/source/Lib
- Files:
-
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-DEV-2.0-dev0/source/Lib/TLibCommon/ContextTables.h
r598 r601 112 112 #if H_3D_DIM_DMM 113 113 #define NUM_DMM1_DATA_CTX 1 ///< number of context models for DMM1 data 114 #if !SEC_DMM2_E0146 114 115 #define NUM_DMM2_DATA_CTX 1 ///< number of context models for DMM2 data 116 #endif 115 117 #define NUM_DMM3_DATA_CTX 1 ///< number of context models for DMM3 data 116 118 #endif … … 388 390 #endif 389 391 #if H_3D_DIM 392 #if ZJU_DEPTH_INTRA_MODE_E0204 393 static const UChar 394 INIT_DEPTH_INTRA_MODE[3][NUM_DEPTH_INTRA_MODE_CTX] = 395 { 396 {0, 0, 64, 168, 168, 124, CNU, 0}, 397 {0, 64, 0, 183, CNU, 108, 0, 0}, 398 {64, 0, CNU, CNU, 168, 109, 0, 0} 399 }; 400 #else 390 401 static const UChar 391 402 INIT_DEPTH_INTRA_MODE[3][NUM_DEPTH_INTRA_MODE_CTX] = … … 395 406 {64, 0, CNU, 0, CNU, 0, 0, 0} 396 407 }; 408 #endif 397 409 static const UChar 398 410 INIT_DDC_FLAG[3][NUM_DDC_FLAG_CTX] = … … 417 429 { CNU }, 418 430 }; 431 #if !SEC_DMM2_E0146 419 432 static const UChar 420 433 INIT_DMM2_DATA[3][NUM_DMM2_DATA_CTX] = … … 424 437 { CNU }, 425 438 }; 439 #endif 426 440 static const UChar 427 441 INIT_DMM3_DATA[3][NUM_DMM3_DATA_CTX] = -
branches/HTM-DEV-2.0-dev0/source/Lib/TLibCommon/TComDataCU.cpp
r600 r601 120 120 m_dmmWedgeTabIdx[i] = NULL; 121 121 } 122 #if !SEC_DMM2_E0146 122 123 m_dmm2DeltaEnd = NULL; 124 #endif 123 125 m_dmm3IntraTabIdx = NULL; 124 126 #endif … … 278 280 m_dmmWedgeTabIdx[i] = (UInt*)xMalloc(UInt, uiNumPartition); 279 281 } 282 #if !SEC_DMM2_E0146 280 283 m_dmm2DeltaEnd = (Int* )xMalloc(Int, uiNumPartition); 284 #endif 281 285 m_dmm3IntraTabIdx = (UInt*)xMalloc(UInt, uiNumPartition); 282 286 #endif … … 415 419 if ( m_dmmWedgeTabIdx[i] ) { xFree( m_dmmWedgeTabIdx[i] ); m_dmmWedgeTabIdx[i] = NULL; } 416 420 } 421 #if !SEC_DMM2_E0146 417 422 if ( m_dmm2DeltaEnd ) { xFree( m_dmm2DeltaEnd ); m_dmm2DeltaEnd = NULL; } 423 #endif 418 424 if ( m_dmm3IntraTabIdx ) { xFree( m_dmm3IntraTabIdx ); m_dmm3IntraTabIdx = NULL; } 419 425 #endif … … 640 646 memset( m_dmmWedgeTabIdx[i] + firstElement, 0, numElements * sizeof( *m_dmmWedgeTabIdx[i] ) ); 641 647 } 648 #if !SEC_DMM2_E0146 642 649 memset( m_dmm2DeltaEnd + firstElement, 0, numElements * sizeof( *m_dmm2DeltaEnd ) ); 650 #endif 643 651 memset( m_dmm3IntraTabIdx + firstElement, 0, numElements * sizeof( *m_dmm3IntraTabIdx ) ); 644 652 #endif … … 821 829 m_dmmWedgeTabIdx[i] [ui] = 0; 822 830 } 831 #if !SEC_DMM2_E0146 823 832 m_dmm2DeltaEnd [ui] = 0; 833 #endif 824 834 m_dmm3IntraTabIdx [ui] = 0; 825 835 #endif … … 936 946 memset( m_dmmWedgeTabIdx[i], 0, sizeof(UInt) * m_uiNumPartition ); 937 947 } 948 #if !SEC_DMM2_E0146 938 949 memset( m_dmm2DeltaEnd , 0, sizeof(Int ) * m_uiNumPartition ); 950 #endif 939 951 memset( m_dmm3IntraTabIdx, 0, sizeof(UInt) * m_uiNumPartition ); 940 952 #endif … … 1024 1036 m_dmmWedgeTabIdx[i] [ui] = pcCU->m_dmmWedgeTabIdx[i] [uiPartOffset+ui]; 1025 1037 } 1038 #if !SEC_DMM2_E0146 1026 1039 m_dmm2DeltaEnd [ui] = pcCU->m_dmm2DeltaEnd [uiPartOffset+ui]; 1040 #endif 1027 1041 m_dmm3IntraTabIdx [ui] = pcCU->m_dmm3IntraTabIdx[uiPartOffset+ui]; 1028 1042 #endif … … 1182 1196 m_dmmWedgeTabIdx[i] = pcCU->getDmmWedgeTabIdx( i ) + uiPart; 1183 1197 } 1198 #if !SEC_DMM2_E0146 1184 1199 m_dmm2DeltaEnd = pcCU->getDmm2DeltaEnd() + uiPart; 1200 #endif 1185 1201 m_dmm3IntraTabIdx = pcCU->getDmm3IntraTabIdx() + uiPart; 1186 1202 #endif … … 1388 1404 memcpy( m_dmmWedgeTabIdx[i] + uiOffset, pcCU->getDmmWedgeTabIdx( i ), sizeof(UInt) * uiNumPartition ); 1389 1405 } 1406 #if !SEC_DMM2_E0146 1390 1407 memcpy( m_dmm2DeltaEnd + uiOffset, pcCU->getDmm2DeltaEnd() , sizeof(Int ) * uiNumPartition ); 1408 #endif 1391 1409 memcpy( m_dmm3IntraTabIdx + uiOffset, pcCU->getDmm3IntraTabIdx(), sizeof(UInt) * uiNumPartition ); 1392 1410 #endif … … 1521 1539 memcpy( rpcCU->getDmmWedgeTabIdx( i ) + m_uiAbsIdxInLCU, m_dmmWedgeTabIdx[i], sizeof(UInt) * m_uiNumPartition ); 1522 1540 } 1541 #if !SEC_DMM2_E0146 1523 1542 memcpy( rpcCU->getDmm2DeltaEnd() + m_uiAbsIdxInLCU, m_dmm2DeltaEnd , sizeof(Int ) * m_uiNumPartition ); 1543 #endif 1524 1544 memcpy( rpcCU->getDmm3IntraTabIdx() + m_uiAbsIdxInLCU, m_dmm3IntraTabIdx, sizeof(UInt) * m_uiNumPartition ); 1525 1545 #endif … … 1638 1658 memcpy( rpcCU->getDmmWedgeTabIdx( i ) + uiPartOffset, m_dmmWedgeTabIdx[i], sizeof(UInt) * uiQNumPart ); 1639 1659 } 1660 #if !SEC_DMM2_E0146 1640 1661 memcpy( rpcCU->getDmm2DeltaEnd() + uiPartOffset, m_dmm2DeltaEnd , sizeof(Int ) * uiQNumPart ); 1662 #endif 1641 1663 memcpy( rpcCU->getDmm3IntraTabIdx() + uiPartOffset, m_dmm3IntraTabIdx, sizeof(UInt) * uiQNumPart ); 1642 1664 #endif … … 2713 2735 // check prediction mode 2714 2736 UInt uiLumaPredMode = getLumaIntraDir( uiAbsPartIdx ); 2737 #if LGE_SDC_REMOVE_DC_E0158 2738 if( uiLumaPredMode == PLANAR_IDX || ( getDimType( uiLumaPredMode ) == DMM1_IDX && !isDimDeltaDC( uiLumaPredMode ) ) ) 2739 #else 2715 2740 if( uiLumaPredMode == DC_IDX || uiLumaPredMode == PLANAR_IDX || ( getDimType( uiLumaPredMode ) == DMM1_IDX && !isDimDeltaDC( uiLumaPredMode ) ) ) 2741 #endif 2716 2742 return true; 2717 2743 … … 6380 6406 for( UInt ui = 0; ui < uiCurrPartNumb; ui++ ) { m_dmmWedgeTabIdx[dmmType][uiAbsPartIdx+ui] = tabIdx; } 6381 6407 } 6408 #if !SEC_DMM2_E0146 6382 6409 Void TComDataCU::setDmm2DeltaEndSubParts( Int iDelta, UInt uiAbsPartIdx, UInt uiDepth ) 6383 6410 { … … 6385 6412 for( UInt ui = 0; ui < uiCurrPartNumb; ui++ ) { m_dmm2DeltaEnd[uiAbsPartIdx+ui] = iDelta; } 6386 6413 } 6414 #endif 6387 6415 Void TComDataCU::setDmm3IntraTabIdxSubParts( UInt uiTIdx, UInt uiAbsPartIdx, UInt uiDepth ) 6388 6416 { -
branches/HTM-DEV-2.0-dev0/source/Lib/TLibCommon/TComDataCU.h
r598 r601 211 211 #if H_3D_DIM_DMM 212 212 UInt* m_dmmWedgeTabIdx[DMM_NUM_TYPE]; 213 #if !SEC_DMM2_E0146 213 214 Int* m_dmm2DeltaEnd; 215 #endif 214 216 UInt* m_dmm3IntraTabIdx; 215 217 #endif … … 553 555 Void setDmmWedgeTabIdxSubParts ( UInt tabIdx, UInt dmmType, UInt uiAbsPartIdx, UInt uiDepth ); 554 556 557 #if !SEC_DMM2_E0146 555 558 Int* getDmm2DeltaEnd () { return m_dmm2DeltaEnd; } 556 559 Int getDmm2DeltaEnd ( UInt uiIdx ) { return m_dmm2DeltaEnd[uiIdx]; } 557 560 Void setDmm2DeltaEnd ( UInt uiIdx, Int iD ) { m_dmm2DeltaEnd[uiIdx] = iD; } 558 561 Void setDmm2DeltaEndSubParts ( Int iDelta, UInt uiAbsPartIdx, UInt uiDepth ); 562 #endif 559 563 560 564 UInt* getDmm3IntraTabIdx () { return m_dmm3IntraTabIdx; } -
branches/HTM-DEV-2.0-dev0/source/Lib/TLibCommon/TComPrediction.cpp
r598 r601 456 456 dmmSegmentation = &(g_dmmWedgeLists[ g_aucConvertToBit[iWidth] ][ pcCU->getDmmWedgeTabIdx( dimType, uiAbsPartIdx ) ]); 457 457 } break; 458 #if !SEC_DMM2_E0146 458 459 case( DMM2_IDX ): 459 460 { … … 467 468 dmmSegmentation = &(g_dmmWedgeLists[ g_aucConvertToBit[iWidth] ][ uiTabIdx ]); 468 469 } break; 470 #endif 469 471 case( DMM3_IDX ): 470 472 { … … 2782 2784 { 2783 2785 UInt dimType = getDimType( pcTempCU->getLumaIntraDir( uiTempPartIdx ) ); 2786 #if SEC_DMM2_E0146 2787 if( DMM1_IDX == dimType || DMM3_IDX == dimType ) 2788 #else 2784 2789 if( DMM1_IDX == dimType || DMM2_IDX == dimType || DMM3_IDX == dimType ) 2790 #endif 2785 2791 { 2786 2792 // get offset between current and reference block … … 2807 2813 { 2808 2814 UInt dimType = getDimType( pcTempCU->getLumaIntraDir( uiTempPartIdx ) ); 2815 #if SEC_DMM2_E0146 2816 if( DMM1_IDX == dimType || DMM3_IDX == dimType ) 2817 #else 2809 2818 if( DMM1_IDX == dimType || DMM2_IDX == dimType || DMM3_IDX == dimType ) 2819 #endif 2810 2820 { 2811 2821 // get offset between current and reference block … … 2870 2880 iDC += piRefBlkY[k]; 2871 2881 } 2882 2883 #if SCU_HS_DMM4_REMOVE_DIV_E0242 2884 Int cuMaxLog2Size = g_aucConvertToBit[g_uiMaxCUWidth]+2; 2885 iDC = iDC >> (cuMaxLog2Size - pcCU->getDepth(0))*2; 2886 #else 2872 2887 iDC /= (uiWidth*uiHeight); 2888 #endif 2873 2889 piRefBlkY = cTempYuv.getLumaAddr(); 2874 2890 … … 3314 3330 #endif 3315 3331 #if H_3D_DIM_SDC 3316 Void TComPrediction::analyzeSegmentsSDC( Pel* pOrig, UInt uiStride, UInt uiSize, Pel* rpSegMeans, UInt uiNumSegments, Bool* pMask, UInt uiMaskStride ) 3332 Void TComPrediction::analyzeSegmentsSDC( Pel* pOrig, UInt uiStride, UInt uiSize, Pel* rpSegMeans, UInt uiNumSegments, Bool* pMask, UInt uiMaskStride 3333 #if KWU_SDC_SIMPLE_DC_E0117 3334 ,UInt uiIntraMode 3335 ,Bool orgDC 3336 #endif 3337 ) 3317 3338 { 3318 3339 Int iSumDepth[2]; … … 3321 3342 memset(iSumPix, 0, sizeof(Int)*2); 3322 3343 3344 #if KWU_SDC_SIMPLE_DC_E0117 3345 if (orgDC == false) 3346 { 3347 if ( getDimType(uiIntraMode) == DMM1_IDX ) 3348 { 3349 UChar ucSegmentLT = pMask[0]; 3350 UChar ucSegmentRT = pMask[uiSize-1]; 3351 UChar ucSegmentLB = pMask[uiMaskStride * (uiSize-1)]; 3352 UChar ucSegmentRB = pMask[uiMaskStride * (uiSize-1) + (uiSize-1)]; 3353 3354 rpSegMeans[ucSegmentLT] = pOrig[0]; 3355 rpSegMeans[ucSegmentRT] = pOrig[uiSize-1]; 3356 rpSegMeans[ucSegmentLB] = pOrig[uiStride * (uiSize-1) ]; 3357 rpSegMeans[ucSegmentRB] = pOrig[uiStride * (uiSize-1) + (uiSize-1) ]; 3358 } 3359 else if (uiIntraMode == PLANAR_IDX) 3360 { 3361 Pel* pLeftTop = pOrig; 3362 Pel* pRightTop = pOrig + (uiSize-1); 3363 Pel* pLeftBottom = (pOrig+ (uiStride*(uiSize-1))); 3364 Pel* pRightBottom = (pOrig+ (uiStride*(uiSize-1)) + (uiSize-1)); 3365 3366 rpSegMeans[0] = (*pLeftTop + *pRightTop + *pLeftBottom + *pRightBottom + 2)>>2; 3367 } 3368 return; 3369 } 3370 #endif 3371 3323 3372 Int subSamplePix; 3324 3373 if ( uiSize == 64 || uiSize == 32 ) -
branches/HTM-DEV-2.0-dev0/source/Lib/TLibCommon/TComPrediction.h
r598 r601 191 191 Void predIntraLumaDepth ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiIntraMode, Pel* piPred, UInt uiStride, Int iWidth, Int iHeight, Bool bFastEnc = false ); 192 192 #if H_3D_DIM_SDC 193 Void analyzeSegmentsSDC ( Pel* pOrig, UInt uiStride, UInt uiSize, Pel* rpSegMeans, UInt uiNumSegments, Bool* pMask, UInt uiMaskStride ); 193 Void analyzeSegmentsSDC ( Pel* pOrig, UInt uiStride, UInt uiSize, Pel* rpSegMeans, UInt uiNumSegments, Bool* pMask, UInt uiMaskStride 194 #if KWU_SDC_SIMPLE_DC_E0117 195 ,UInt uiIntraMode 196 ,Bool orgDC=false 197 #endif 198 ); 194 199 #endif 195 200 #endif -
branches/HTM-DEV-2.0-dev0/source/Lib/TLibCommon/TComRdCost.cpp
r598 r601 483 483 484 484 } 485 486 #if SCU_HS_FAST_DEPTH_INTRA_E0238 487 488 UInt TComRdCost::calcVAR (Pel* pi0, Int stride, Int width, Int height, Int cuDepth) 489 { 490 Int temp = 0; 491 492 for (Int y = 0; y < height; y++) 493 { 494 for (Int x = 0; x < width; x++) 495 { 496 temp += pi0[ y * stride + x ]; 497 } 498 } 499 500 Int cuMaxLog2Size = g_aucConvertToBit[g_uiMaxCUWidth]+2; 501 502 if ( width == 4 ) 503 { 504 cuDepth = cuMaxLog2Size - 2; 505 } 506 507 temp = temp >> (cuMaxLog2Size-cuDepth) * 2; 508 509 UInt sum = 0; 510 for (Int y = 0; y < height; y++) 511 { 512 for (Int x = 0; x < width; x++) 513 { 514 sum += (pi0[ y * stride + x ] - temp ) * (pi0[ y * stride + x ] - temp ); 515 } 516 } 517 return (sum >> (cuMaxLog2Size-cuDepth)*2); 518 519 } 520 #endif 521 485 522 486 523 #if WEIGHTED_CHROMA_DISTORTION -
branches/HTM-DEV-2.0-dev0/source/Lib/TLibCommon/TComRdCost.h
r598 r601 235 235 UInt calcHAD(Int bitDepth, Pel* pi0, Int iStride0, Pel* pi1, Int iStride1, Int iWidth, Int iHeight ); 236 236 237 #if SCU_HS_FAST_DEPTH_INTRA_E0238 238 UInt calcVAR(Pel* pi0, Int stride, Int width, Int height, Int cuDepth); 239 #endif 237 240 // for motion cost 238 241 #if !FIX203 -
branches/HTM-DEV-2.0-dev0/source/Lib/TLibCommon/TComRom.cpp
r531 r601 347 347 { //2x2 4x4 8x8 16x16 32x32 64x64 348 348 0, 7, 10, 11, 11, 13 }; 349 #if LGE_PKU_DMM3_OVERLAP_E0159 350 const UChar g_dmm3IntraTabIdxBits[6] = 351 { //2x2 4x4 8x8 16x16 32x32 64x64 352 0, 4, 7, 8, 8, 0 }; 353 #else 349 354 const UChar g_dmm3IntraTabIdxBits[6] = 350 355 { //2x2 4x4 8x8 16x16 32x32 64x64 351 356 0, 6, 9, 9, 9, 0 }; 357 #endif 352 358 353 359 extern std::vector< std::vector<TComWedgelet> > g_dmmWedgeLists; -
branches/HTM-DEV-2.0-dev0/source/Lib/TLibCommon/TComWedgelet.h
r531 r601 50 50 enum DIM_IDX 51 51 { 52 #if SEC_DMM2_E0146 53 DMM1_IDX = 0, 54 DMM3_IDX = 1, 55 DMM4_IDX = 2, 56 RBC_IDX = 3 57 #else 52 58 DMM1_IDX = 0, 53 59 DMM2_IDX = 3, … … 55 61 DMM4_IDX = 2, 56 62 RBC_IDX = 4 63 #endif 57 64 }; 65 #if SEC_DMM2_E0146 66 #define DMM_NUM_TYPE 3 67 #else 58 68 #define DMM_NUM_TYPE 4 69 #endif 59 70 #define RBC_NUM_TYPE 1 60 71 #define DIM_NUM_TYPE (DMM_NUM_TYPE+RBC_NUM_TYPE) … … 75 86 #define DMM_NO_WEDGEINDEX MAX_UINT 76 87 #define DMM_NUM_WEDGE_REFINES 8 88 #if !SEC_DMM2_E0146 77 89 #define DMM2_DELTAEND_MAX 4 90 #endif 78 91 #define DMM3_SIMPLIFY_TR 1 79 92 -
branches/HTM-DEV-2.0-dev0/source/Lib/TLibCommon/TypeDef.h
r600 r601 214 214 #if H_3D_DIM 215 215 #define H_3D_DIM_DMM 1 // Depth Modeling Modes 216 #if H_3D_DIM 217 #define SEC_DMM2_E0146 1 // Removal of DMM2 from DMMs 218 #define ZJU_DEPTH_INTRA_MODE_E0204 1 // Simplified Binarization for depth_intra_mode 219 #endif 216 220 #define H_3D_DIM_RBC 1 // Region Boundary Chain mode 217 221 #define H_3D_DIM_SDC 1 // Simplified Depth Coding method … … 220 224 // HHI_DEPTH_INTRA_SEARCH_RAU_C0160 221 225 // LG_ZEROINTRADEPTHRESI_A0087 226 #define KWU_SDC_SIMPLE_DC_E0117 1 // Simplified DC calculation for SDC 227 #define SCU_HS_DMM4_REMOVE_DIV_E0242 1 // DMM4 Division Removal 228 #define SCU_HS_FAST_DEPTH_INTRA_E0238 1 // Fast DMM and RBC Mode Selection 229 #if H_3D_DIM_SDC 230 #define LGE_SDC_REMOVE_DC_E0158 1 // Removal of DC mode from SDC 231 #endif 232 #if H_3D_DIM_DMM 233 #define LGE_PKU_DMM3_OVERLAP_E0159 1 // Removal of overlap between DMM3 and DMM1 234 #endif 222 235 #endif 223 236 -
branches/HTM-DEV-2.0-dev0/source/Lib/TLibDecoder/TDecCu.cpp
r598 r601 874 874 // get DC prediction for each segment 875 875 Pel apDCPredValues[2]; 876 #if KWU_SDC_SIMPLE_DC_E0117 877 m_pcPrediction->analyzeSegmentsSDC(piPred, uiStride, uiWidth, apDCPredValues, uiNumSegments, pbMask, uiMaskStride, uiLumaPredMode); 878 #else 876 879 m_pcPrediction->analyzeSegmentsSDC(piPred, uiStride, uiWidth, apDCPredValues, uiNumSegments, pbMask, uiMaskStride); 880 #endif 877 881 878 882 // reconstruct residual based on mask + DC residuals -
branches/HTM-DEV-2.0-dev0/source/Lib/TLibDecoder/TDecSbac.cpp
r598 r601 89 89 #if H_3D_DIM_DMM 90 90 , m_cDmm1DataSCModel ( 1, 1, NUM_DMM1_DATA_CTX , m_contextModels + m_numContextModels, m_numContextModels) 91 #if !SEC_DMM2_E0146 91 92 , m_cDmm2DataSCModel ( 1, 1, NUM_DMM2_DATA_CTX , m_contextModels + m_numContextModels, m_numContextModels) 93 #endif 92 94 , m_cDmm3DataSCModel ( 1, 1, NUM_DMM3_DATA_CTX , m_contextModels + m_numContextModels, m_numContextModels) 93 95 #endif … … 177 179 #if H_3D_DIM_DMM 178 180 m_cDmm1DataSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_DMM1_DATA ); 181 #if !SEC_DMM2_E0146 179 182 m_cDmm2DataSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_DMM2_DATA ); 183 #endif 180 184 m_cDmm3DataSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_DMM3_DATA ); 181 185 #endif … … 251 255 #if H_3D_DIM_DMM 252 256 m_cDmm1DataSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DMM1_DATA ); 257 #if !SEC_DMM2_E0146 253 258 m_cDmm2DataSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DMM2_DATA ); 259 #endif 254 260 m_cDmm3DataSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DMM3_DATA ); 255 261 #endif … … 438 444 ruiTabIdx = uiIdx; 439 445 } 446 #if !SEC_DMM2_E0146 440 447 Void TDecSbac::xParseDmm2Offset( Int& riOffset ) 441 448 { … … 463 470 riOffset = iDeltaEnd; 464 471 } 472 #endif 465 473 Void TDecSbac::xParseDmm3WedgeIdx( UInt& ruiIntraIdx, Int iNumBit ) 466 474 { … … 1154 1162 pcCU->setDmmWedgeTabIdxSubParts( uiTabIdx, dimType, absPartIdx, depth ); 1155 1163 } break; 1164 #if !SEC_DMM2_E0146 1156 1165 case( DMM2_IDX ): 1157 1166 { … … 1160 1169 pcCU->setDmm2DeltaEndSubParts( iOffset, absPartIdx, depth ); 1161 1170 } break; 1171 #endif 1162 1172 case( DMM3_IDX ): 1163 1173 { … … 1227 1237 if( puIdx == 2 ) 1228 1238 { 1239 #if !LGE_SDC_REMOVE_DC_E0158 1229 1240 while( binNum < 2 && symbol ) 1241 #endif 1230 1242 { 1231 1243 ctxDepthMode = puIdx*3 + binNum; … … 1235 1247 } 1236 1248 if( modeCode == 0 ) { dir = PLANAR_IDX; sdcFlag = 1;} 1249 #if LGE_SDC_REMOVE_DC_E0158 1250 else if( modeCode == 1 ) { dir = 0; sdcFlag = 0;} 1251 #else 1237 1252 else if( modeCode == 2 ) { dir = 0; sdcFlag = 0;} 1238 1253 else if( modeCode == 3 ) { dir = DC_IDX; sdcFlag = 1;} 1254 #endif 1239 1255 } 1240 1256 else if( puIdx == 0 ) … … 1254 1270 else 1255 1271 { 1272 #if ZJU_DEPTH_INTRA_MODE_E0204 1273 UInt maxBinNum = 0; 1274 m_pcTDecBinIf->decodeBinEP(symbol); 1275 if( symbol == 1 ) 1276 { 1277 maxBinNum = 3; 1278 } 1279 else 1280 { 1281 maxBinNum = 2; 1282 symbol = 1; 1283 } 1284 while( binNum<maxBinNum && symbol ) 1285 { 1286 ctxDepthMode = puIdx*3 + ( binNum >= 2 ? 2 : binNum ); 1287 m_pcTDecBinIf->decodeBin(symbol,m_cDepthIntraModeSCModel.get(0,0,ctxDepthMode)); 1288 modeCode = (modeCode<<1)+symbol; 1289 binNum++; 1290 } 1291 if( maxBinNum == 3 ) 1292 { 1293 if ( modeCode == 0 ) { dir = PLANAR_IDX; sdcFlag = 1;} 1294 else if ( modeCode == 2 ) { dir = (2* RBC_IDX+DIM_OFFSET); sdcFlag = 0;} 1295 else if ( modeCode == 6 ) { dir = (2*DMM3_IDX+DIM_OFFSET); sdcFlag = 0;} 1296 else if ( modeCode == 7 ) { dir = (2*DMM1_IDX+DIM_OFFSET); sdcFlag = 0;} 1297 } 1298 else 1299 { 1300 if ( modeCode == 0 ) { dir = 5; sdcFlag = 0;} 1301 else if ( modeCode == 2 ) { dir = (2*DMM1_IDX+DIM_OFFSET); sdcFlag = 1;} 1302 else if ( modeCode == 3 ) { dir = (2*DMM4_IDX+DIM_OFFSET); sdcFlag = 0;} 1303 } 1304 #else 1256 1305 ctxDepthMode = puIdx*3 ; 1257 1306 m_pcTDecBinIf->decodeBin( symbol, m_cDepthIntraModeSCModel.get(0,0,ctxDepthMode) ); … … 1283 1332 { 1284 1333 binNum = 0; 1334 #if LGE_SDC_REMOVE_DC_E0158 1335 #if !SEC_DMM2_E0146 1336 while( symbol && binNum < 2 ) 1337 #endif 1338 #else 1339 #if SEC_DMM2_E0146 1340 while( symbol && binNum < 2 ) 1341 #else 1285 1342 while( symbol && binNum < 3 ) 1343 #endif 1344 #endif 1286 1345 { 1287 1346 ctxDepthMode = puIdx*3 + 2; … … 1298 1357 else if( modeCode == 5 ) { dir = (2*DMM4_IDX+DIM_OFFSET); sdcFlag = 0;} 1299 1358 else if( modeCode == 6 ) { dir = (2*DMM3_IDX+DIM_OFFSET); sdcFlag = 0;} 1359 #if LGE_SDC_REMOVE_DC_E0158 1360 #if SEC_DMM2_E0146 1361 else if( modeCode == 7 ) { dir = (2* RBC_IDX+DIM_OFFSET); sdcFlag = 0;} 1362 #else 1363 else if( modeCode == 14 ) { dir = (2* RBC_IDX+DIM_OFFSET); sdcFlag = 0;} 1364 else if( modeCode == 15 ) { dir = (2*DMM2_IDX+DIM_OFFSET); sdcFlag = 0;} 1365 #endif 1366 #else 1300 1367 else if( modeCode == 14 ) { dir = DC_IDX; sdcFlag = 1;} 1368 #if SEC_DMM2_E0146 1369 else if( modeCode == 15 ) { dir = (2* RBC_IDX+DIM_OFFSET); sdcFlag = 0;} 1370 #else 1301 1371 else if( modeCode == 30 ) { dir = (2* RBC_IDX+DIM_OFFSET); sdcFlag = 0;} 1302 1372 else if( modeCode == 31 ) { dir = (2*DMM2_IDX+DIM_OFFSET); sdcFlag = 0;} 1373 #endif 1374 #endif 1375 #endif 1303 1376 } 1304 1377 pcCU->setLumaIntraDirSubParts( (UChar)dir, absPartIdx, depth ); -
branches/HTM-DEV-2.0-dev0/source/Lib/TLibDecoder/TDecSbac.h
r598 r601 102 102 #if H_3D_DIM_DMM 103 103 Void xParseDmm1WedgeIdx ( UInt& ruiTabIdx, Int iNumBit ); 104 #if !SEC_DMM2_E0146 104 105 Void xParseDmm2Offset ( Int& riOffset ); 106 #endif 105 107 Void xParseDmm3WedgeIdx ( UInt& ruiIntraIdx, Int iNumBit ); 106 108 #endif … … 214 216 #if H_3D_DIM_DMM 215 217 ContextModel3DBuffer m_cDmm1DataSCModel; 218 #if !SEC_DMM2_E0146 216 219 ContextModel3DBuffer m_cDmm2DataSCModel; 220 #endif 217 221 ContextModel3DBuffer m_cDmm3DataSCModel; 218 222 #endif -
branches/HTM-DEV-2.0-dev0/source/Lib/TLibEncoder/TEncSbac.cpp
r598 r601 95 95 #if H_3D_DIM_DMM 96 96 , m_cDmm1DataSCModel ( 1, 1, NUM_DMM1_DATA_CTX , m_contextModels + m_numContextModels, m_numContextModels) 97 #if !SEC_DMM2_E0146 97 98 , m_cDmm2DataSCModel ( 1, 1, NUM_DMM2_DATA_CTX , m_contextModels + m_numContextModels, m_numContextModels) 99 #endif 98 100 , m_cDmm3DataSCModel ( 1, 1, NUM_DMM3_DATA_CTX , m_contextModels + m_numContextModels, m_numContextModels) 99 101 #endif … … 175 177 #if H_3D_DIM_DMM 176 178 m_cDmm1DataSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DMM1_DATA ); 179 #if !SEC_DMM2_E0146 177 180 m_cDmm2DataSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DMM2_DATA ); 181 #endif 178 182 m_cDmm3DataSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DMM3_DATA ); 179 183 #endif … … 264 268 #if H_3D_DIM_DMM 265 269 curCost += m_cDmm1DataSCModel.calcCost ( curSliceType, qp, (UChar*)INIT_DMM1_DATA ); 270 #if !SEC_DMM2_E0146 266 271 curCost += m_cDmm2DataSCModel.calcCost ( curSliceType, qp, (UChar*)INIT_DMM2_DATA ); 272 #endif 267 273 curCost += m_cDmm3DataSCModel.calcCost ( curSliceType, qp, (UChar*)INIT_DMM3_DATA ); 268 274 #endif … … 334 340 #if H_3D_DIM_DMM 335 341 m_cDmm1DataSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DMM1_DATA ); 342 #if !SEC_DMM2_E0146 336 343 m_cDmm2DataSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DMM2_DATA ); 344 #endif 337 345 m_cDmm3DataSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DMM3_DATA ); 338 346 #endif … … 541 549 } 542 550 551 #if !SEC_DMM2_E0146 543 552 Void TEncSbac::xCodeDmm2Offset( Int iOffset ) 544 553 { … … 557 566 } 558 567 } 568 #endif 559 569 560 570 Void TEncSbac::xCodeDmm3WedgeIdx( UInt uiIntraIdx, Int iNumBit ) … … 1216 1226 xCodeDmm1WedgeIdx( pcCU->getDmmWedgeTabIdx( dimType, absPartIdx ), g_dmm1TabIdxBits[pcCU->getIntraSizeIdx(absPartIdx)] ); 1217 1227 } break; 1228 #if !SEC_DMM2_E0146 1218 1229 case( DMM2_IDX ): 1219 1230 { 1220 1231 xCodeDmm2Offset( pcCU->getDmm2DeltaEnd( absPartIdx ) ); 1221 1232 } break; 1233 #endif 1222 1234 case( DMM3_IDX ): 1223 1235 { … … 1268 1280 Void TEncSbac::codeIntraDepthMode( TComDataCU* pcCU, UInt absPartIdx ) 1269 1281 { 1282 #if ZJU_DEPTH_INTRA_MODE_E0204 1283 UInt codeWordTable[3][7] = {{0, 0, 0, 2, 0,6, 7},{0, 0, 2, 7, 3, 6, 2},{0, 1, 0, 0, 0, 0, 0}}; 1284 UInt codeWordLenTable[3][7] = {{0, 1, 0, 2, 0,3, 3},{1, 1, 2, 3, 2, 3, 2},{1, 1, 0, 0, 0, 0, 0}}; 1285 #else 1286 #if LGE_SDC_REMOVE_DC_E0158 1287 #if SEC_DMM2_E0146 1288 UInt codeWordTable[3][7] = {{0, 0, 0, 2, 0,6, 7},{0, 2, 3, 4, 5, 6, 7},{0, 1, 0, 0, 0, 0, 0}}; 1289 UInt codeWordLenTable[3][7] = {{0, 1, 0, 2, 0,3, 3},{2, 3, 3, 3, 3, 3, 3},{1, 1, 0, 0, 0, 0, 0}}; 1290 #else 1291 UInt codeWordTable[3][8] = { { 0, 0, 0, 2, 0, 6, 0, 7 }, { 0, 2, 3, 4, 5, 6, 15, 14 }, { 0, 1, 0, 0, 0, 0, 0, 0 } }; 1292 UInt codeWordLenTable[3][8] = { { 0, 1, 0, 2, 0, 3, 0, 3 }, { 2, 3, 3, 3, 3, 3, 4, 4 }, { 1, 1, 0, 0, 0, 0, 0, 0 } }; 1293 #endif 1294 #else 1295 #if SEC_DMM2_E0146 1296 UInt codeWordTable[3][8] = {{0, 0, 0, 2, 0,6, 0, 7},{0, 2, 3, 4, 5, 6, 14, 15},{0, 2, 0, 0, 0, 0, 3, 0}}; 1297 UInt codeWordLenTable[3][8] = {{0, 1, 0, 2, 0,3, 0, 3},{2, 3, 3, 3, 3, 3, 4, 4},{1, 2, 0, 0, 0, 0, 2, 0}}; 1298 #else 1270 1299 UInt codeWordTable[3][9] = {{0, 0, 0, 2, 0,6, 0, 0, 7},{0, 2, 3, 4, 5, 6, 14, 31, 30},{0, 2, 0, 0, 0, 0, 3, 0, 0}}; 1271 1300 UInt codeWordLenTable[3][9] = {{0, 1, 0, 2, 0,3, 0, 0, 3},{2, 3, 3, 3, 3, 3, 4, 5, 5},{1, 2, 0, 0, 0, 0, 2, 0, 0}}; 1301 #endif 1302 #endif 1303 #endif 1272 1304 UInt dir = pcCU->getLumaIntraDir( absPartIdx ); 1273 1305 UInt puIdx = (pcCU->getWidth(absPartIdx) == 64) ? 2 : ( (pcCU->getPartitionSize(absPartIdx) == SIZE_NxN && pcCU->getWidth(absPartIdx) == 8) ? 0 : 1 ); … … 1285 1317 case DMM4_IDX: codeIdx = 4; break; 1286 1318 case DMM3_IDX: codeIdx = 5; break; 1319 #if LGE_SDC_REMOVE_DC_E0158 1320 #if SEC_DMM2_E0146 1321 case RBC_IDX: codeIdx = 6; break; 1322 #else 1323 case DMM2_IDX: codeIdx = 6; break; 1324 case RBC_IDX: codeIdx = 7; break; 1325 #endif 1326 #else 1327 #if SEC_DMM2_E0146 1328 case RBC_IDX: codeIdx = 7; break; 1329 #else 1287 1330 case DMM2_IDX: codeIdx = 7; break; 1288 1331 case RBC_IDX: codeIdx = 8; break; 1332 #endif 1333 #endif 1289 1334 default: break; 1290 1335 } … … 1297 1342 { 1298 1343 case PLANAR_IDX: codeIdx = 0; break; 1344 #if !LGE_SDC_REMOVE_DC_E0158 1299 1345 case DC_IDX: codeIdx = 6; break; 1346 #endif 1300 1347 default: codeIdx = 2; break; 1301 1348 } 1349 } 1350 #endif 1351 #if ZJU_DEPTH_INTRA_MODE_E0204 1352 if( puIdx==1 ) 1353 { 1354 if( codeIdx==1 || codeIdx==2 || codeIdx==4 ) 1355 { 1356 m_pcBinIf->encodeBinEP( 0 ); 1357 } 1358 else 1359 { 1360 m_pcBinIf->encodeBinEP( 1 ); 1361 } 1302 1362 } 1303 1363 #endif -
branches/HTM-DEV-2.0-dev0/source/Lib/TLibEncoder/TEncSbac.h
r598 r601 121 121 #if H_3D_DIM_DMM 122 122 Void xCodeDmm1WedgeIdx ( UInt uiTabIdx, Int iNumBit ); 123 #if !SEC_DMM2_E0146 123 124 Void xCodeDmm2Offset ( Int iOffset ); 125 #endif 124 126 Void xCodeDmm3WedgeIdx ( UInt uiIntraIdx, Int iNumBit ); 125 127 #endif … … 254 256 #if H_3D_DIM_DMM 255 257 ContextModel3DBuffer m_cDmm1DataSCModel; 258 #if !SEC_DMM2_E0146 256 259 ContextModel3DBuffer m_cDmm2DataSCModel; 260 #endif 257 261 ContextModel3DBuffer m_cDmm3DataSCModel; 258 262 #endif -
branches/HTM-DEV-2.0-dev0/source/Lib/TLibEncoder/TEncSearch.cpp
r598 r601 1900 1900 // get DC prediction for each segment 1901 1901 Pel apDCPredValues[2]; 1902 #if KWU_SDC_SIMPLE_DC_E0117 1903 analyzeSegmentsSDC(piPred, uiStride, uiWidth, apDCPredValues, uiNumSegments, pbMask, uiMaskStride, uiLumaPredMode ); 1904 #else 1902 1905 analyzeSegmentsSDC(piPred, uiStride, uiWidth, apDCPredValues, uiNumSegments, pbMask, uiMaskStride ); 1906 #endif 1903 1907 1904 1908 // get original DC for each segment 1905 1909 Pel apDCOrigValues[2]; 1910 #if KWU_SDC_SIMPLE_DC_E0117 1911 analyzeSegmentsSDC(piOrg, uiStride, uiWidth, apDCOrigValues, uiNumSegments, pbMask, uiMaskStride, uiLumaPredMode, true ); 1912 #else 1906 1913 analyzeSegmentsSDC(piOrg, uiStride, uiWidth, apDCOrigValues, uiNumSegments, pbMask, uiMaskStride ); 1914 #endif 1907 1915 1908 1916 for( UInt uiSegment = 0; uiSegment < uiNumSegments; uiSegment++ ) … … 2842 2850 if( m_pcEncCfg->getIsDepth() && uiWidth >= DIM_MIN_SIZE && uiWidth <= DIM_MAX_SIZE && uiWidth == uiHeight ) 2843 2851 { 2852 2853 #if SCU_HS_FAST_DEPTH_INTRA_E0238 2854 Int threshold = max(((pcCU->getQP(0))>>3)-1,3); 2855 Int varThreshold = (Int)( threshold * threshold - 8 ); 2856 UInt varCU = m_pcRdCost->calcVAR(piOrg, uiStride, uiWidth,uiHeight,pcCU->getDepth(0)); 2857 #endif 2858 2859 2844 2860 #if H_3D_DIM_DMM 2845 if( m_pcEncCfg->getUseDMM() ) 2861 if( m_pcEncCfg->getUseDMM() 2862 #if SCU_HS_FAST_DEPTH_INTRA_E0238 2863 && (uiRdModeList[0] != 0 || varCU >= varThreshold) 2864 #endif 2865 ) 2846 2866 { 2847 2867 for( UInt dmmType = 0; dmmType < DMM_NUM_TYPE; dmmType++ ) … … 2858 2878 biSegmentation = &(g_dmmWedgeLists[(g_aucConvertToBit[uiWidth])][uiTabIdx]); 2859 2879 } break; 2880 #if !SEC_DMM2_E0146 2860 2881 case( DMM2_IDX ): 2861 2882 { … … 2869 2890 } 2870 2891 } break; 2892 #endif 2871 2893 case( DMM3_IDX ): 2872 2894 { 2895 #if LGE_PKU_DMM3_OVERLAP_E0159 2896 TComPic* pcPicTex = pcCU->getSlice()->getTexturePic(); 2897 TComDataCU* pcColTexCU = pcPicTex->getCU( pcCU->getAddr() ); 2898 UInt uiTexPartIdx = pcCU->getZorderIdxInCU() + uiPartOffset; 2899 Int uiColTexIntraDir = pcColTexCU->isIntra( uiTexPartIdx ) ? pcColTexCU->getLumaIntraDir( uiTexPartIdx ) : 255; 2900 2901 if( uiColTexIntraDir > DC_IDX && uiColTexIntraDir < 35 ) 2902 { 2903 #endif 2873 2904 UInt uiIntraTabIdx = 0; 2874 2905 xSearchDmm3Wedge( pcCU, uiPartOffset, piOrg, uiStride, uiWidth, uiHeight, uiTabIdx, uiIntraTabIdx ); … … 2876 2907 pcCU->setDmm3IntraTabIdxSubParts( uiIntraTabIdx, uiPartOffset, uiDepth + uiInitTrDepth ); 2877 2908 biSegmentation = &(g_dmmWedgeLists[(g_aucConvertToBit[uiWidth])][uiTabIdx]); 2909 #if LGE_PKU_DMM3_OVERLAP_E0159 2910 } 2911 #endif 2878 2912 } break; 2879 2913 case( DMM4_IDX ): … … 2903 2937 #endif 2904 2938 #if H_3D_DIM_RBC 2905 if( m_pcEncCfg->getUseRBC() ) 2939 if( m_pcEncCfg->getUseRBC() 2940 #if SCU_HS_FAST_DEPTH_INTRA_E0238 2941 && (uiRdModeList[0] != 0 || varCU >= varThreshold) 2942 #endif 2943 ) 2906 2944 { 2907 2945 if( xSearchRbcEdge( pcCU, uiPartOffset, piOrg, uiStride, uiWidth, uiHeight ) ) … … 7323 7361 } 7324 7362 7363 #if !SEC_DMM2_E0146 7325 7364 Void TEncSearch::xSearchDmm2Wedge( TComDataCU* pcCU, UInt uiAbsPtIdx, Pel* piRef, UInt uiRefStride, UInt uiWidth, UInt uiHeight, UInt& ruiTabIdx, Int& riWedgeDeltaEnd ) 7326 7365 { … … 7388 7427 return; 7389 7428 } 7429 #endif 7390 7430 7391 7431 Void TEncSearch::xSearchDmm3Wedge( TComDataCU* pcCU, UInt uiAbsPtIdx, Pel* piRef, UInt uiRefStride, UInt uiWidth, UInt uiHeight, UInt& ruiTabIdx, UInt& ruiIntraTabIdx ) -
branches/HTM-DEV-2.0-dev0/source/Lib/TLibEncoder/TEncSearch.h
r598 r601 352 352 Void xSearchDmmDeltaDCs ( TComDataCU* pcCU, UInt uiAbsPtIdx, Pel* piOrig, Pel* piPredic, UInt uiStride, Bool* biSegPattern, Int patternStride, UInt uiWidth, UInt uiHeight, Pel& rDeltaDC1, Pel& rDeltaDC2 ); 353 353 Void xSearchDmm1Wedge ( TComDataCU* pcCU, UInt uiAbsPtIdx, Pel* piRef, UInt uiRefStride, UInt uiWidth, UInt uiHeight, UInt& ruiTabIdx ); 354 #if !SEC_DMM2_E0146 354 355 Void xSearchDmm2Wedge ( TComDataCU* pcCU, UInt uiAbsPtIdx, Pel* piRef, UInt uiRefStride, UInt uiWidth, UInt uiHeight, UInt& ruiTabIdx, Int& riWedgeDeltaEnd ); 356 #endif 355 357 Void xSearchDmm3Wedge ( TComDataCU* pcCU, UInt uiAbsPtIdx, Pel* piRef, UInt uiRefStride, UInt uiWidth, UInt uiHeight, UInt& ruiTabIdx, UInt& ruiIntraTabIdx ); 356 358 #endif
Note: See TracChangeset for help on using the changeset viewer.