Changeset 781 in 3DVCSoftware for branches/HTM-9.3-dev3-Qualcomm/source/Lib/TLibCommon
- Timestamp:
- 20 Jan 2014, 04:34:18 (11 years ago)
- Location:
- branches/HTM-9.3-dev3-Qualcomm/source/Lib/TLibCommon
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-9.3-dev3-Qualcomm/source/Lib/TLibCommon/ContextTables.h
r773 r781 107 107 108 108 #if H_3D_DIM 109 #if QC_GENERIC_SDC_G0122 110 #define NUM_DEPTH_INTRA_MODE_CTX 1 ///< number of context models for depth intra modes 111 #else 109 112 #define NUM_DEPTH_INTRA_MODE_CTX 8 ///< number of context models for depth intra modes 113 #endif 110 114 #define NUM_DDC_FLAG_CTX 2 ///< number of context models for deltaDC flag (DMM or RBC) 111 115 #define NUM_DDC_DATA_CTX 1 ///< number of context models for deltaDC data (DMM or RBC) 112 116 #if H_3D_DIM_DMM 113 117 #define NUM_DMM1_DATA_CTX 1 ///< number of context models for DMM1 data 118 #endif 119 #if QC_GENERIC_SDC_G0122 120 #define NUM_ANGLE_FLAG_CTX 3 121 #define NUM_INTRASDC_FLAG_CTX 3 114 122 #endif 115 123 #endif … … 383 391 #endif 384 392 #if H_3D_DIM 393 #if QC_GENERIC_SDC_G0122 394 static const UChar 395 INIT_DEPTH_INTRA_MODE[3][NUM_DEPTH_INTRA_MODE_CTX] = 396 { 397 { 154, }, 398 { 154, }, 399 { 154, } 400 }; 401 #else 385 402 static const UChar 386 403 INIT_DEPTH_INTRA_MODE[3][NUM_DEPTH_INTRA_MODE_CTX] = … … 390 407 {64, 0, CNU, CNU, 168, 109, 0, 0} 391 408 }; 409 #endif 410 411 #if QC_GENERIC_SDC_G0122 412 static const UChar 413 INIT_ANGLE_FLAG[3][NUM_ANGLE_FLAG_CTX] = 414 { 415 { 154, 155, 156 }, 416 { 141, 185, 214 }, 417 { 155, 170, 157 }, 418 }; 419 static const UChar 420 INIT_INTRASDC_FLAG[3][NUM_INTRASDC_FLAG_CTX] = 421 { 422 { 214, 229, 230 }, 423 { 215, 202, 174 }, 424 { 213, 201, 246 }, 425 }; 426 #endif 392 427 393 428 static const UChar -
branches/HTM-9.3-dev3-Qualcomm/source/Lib/TLibCommon/TComDataCU.cpp
r773 r781 2401 2401 #endif 2402 2402 2403 #if QC_GENERIC_SDC_G0122 2404 UInt TComDataCU::getCtxSDCFlag( UInt uiAbsPartIdx ) 2405 { 2406 TComDataCU* pcTempCU; 2407 UInt uiTempPartIdx; 2408 UInt uiCtx = 0; 2409 2410 // Get BCBP of left PU 2411 pcTempCU = getPULeft( uiTempPartIdx, m_uiAbsIdxInLCU + uiAbsPartIdx ); 2412 uiCtx = ( pcTempCU && pcTempCU->isIntra( uiTempPartIdx ) ) ? pcTempCU->getSDCFlag( uiTempPartIdx ) : 0; 2413 2414 // Get BCBP of above PU 2415 pcTempCU = getPUAbove( uiTempPartIdx, m_uiAbsIdxInLCU + uiAbsPartIdx ); 2416 uiCtx += ( pcTempCU && pcTempCU->isIntra( uiTempPartIdx ) ) ? pcTempCU->getSDCFlag( uiTempPartIdx ) : 0; 2417 2418 return uiCtx; 2419 } 2420 2421 UInt TComDataCU::getCtxAngleFlag( UInt uiAbsPartIdx ) 2422 { 2423 TComDataCU* pcTempCU; 2424 UInt uiTempPartIdx; 2425 UInt uiCtx = 0; 2426 2427 // Get BCBP of left PU 2428 pcTempCU = getPULeft( uiTempPartIdx, m_uiAbsIdxInLCU + uiAbsPartIdx ); 2429 uiCtx = ( pcTempCU && pcTempCU->isIntra( uiTempPartIdx ) ) ? ( pcTempCU->getLumaIntraDir( uiTempPartIdx ) < NUM_INTRA_MODE ? 1 : 0 ) : 0; 2430 2431 // Get BCBP of above PU 2432 pcTempCU = getPUAbove( uiTempPartIdx, m_uiAbsIdxInLCU + uiAbsPartIdx ); 2433 uiCtx += ( pcTempCU && pcTempCU->isIntra( uiTempPartIdx ) ) ? ( pcTempCU->getLumaIntraDir( uiTempPartIdx ) < NUM_INTRA_MODE ? 1 : 0 ) : 0; 2434 2435 return uiCtx; 2436 } 2437 #endif 2438 2403 2439 UInt TComDataCU::getCtxInterDir( UInt uiAbsPartIdx ) 2404 2440 { … … 2627 2663 if( !getSlice()->getIsDepth() || !isIntra(uiAbsPartIdx) || getPartitionSize(uiAbsPartIdx) != SIZE_2Nx2N ) 2628 2664 return false; 2629 2665 #if QC_GENERIC_SDC_G0122 2666 if( isDimMode( getLumaIntraDir( uiAbsPartIdx ) ) && !isDimDeltaDC( getLumaIntraDir( uiAbsPartIdx ) ) ) 2667 { 2668 return true; 2669 } 2670 2671 if( getLumaIntraDir( uiAbsPartIdx ) < NUM_INTRA_MODE ) 2672 { 2673 return true; 2674 } 2675 2676 return false; 2677 #endif 2630 2678 // check prediction mode 2631 2679 UInt uiLumaPredMode = getLumaIntraDir( uiAbsPartIdx ); -
branches/HTM-9.3-dev3-Qualcomm/source/Lib/TLibCommon/TComDataCU.h
r773 r781 571 571 Pel getSDCSegmentDCOffset( UInt uiSeg, UInt uiPartIdx ) { return m_apSegmentDCOffset[uiSeg][uiPartIdx]; } 572 572 Void setSDCSegmentDCOffset( Pel pOffset, UInt uiSeg, UInt uiPartIdx) { m_apSegmentDCOffset[uiSeg][uiPartIdx] = pOffset; } 573 #if QC_GENERIC_SDC_G0122 574 UInt getCtxSDCFlag ( UInt uiAbsPartIdx ); 575 UInt getCtxAngleFlag ( UInt uiAbsPartIdx ); 576 #endif 573 577 #endif 574 578 #endif -
branches/HTM-9.3-dev3-Qualcomm/source/Lib/TLibCommon/TComPrediction.cpp
r773 r781 416 416 417 417 #if H_3D_DIM 418 Void TComPrediction::predIntraLumaDepth( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiIntraMode, Pel* piPred, UInt uiStride, Int iWidth, Int iHeight, Bool bFastEnc ) 418 Void TComPrediction::predIntraLumaDepth( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiIntraMode, Pel* piPred, UInt uiStride, Int iWidth, Int iHeight, Bool bFastEnc 419 #if QC_GENERIC_SDC_G0122 420 , TComWedgelet* dmm4Segmentation 421 #endif 422 ) 419 423 { 420 424 assert( iWidth == iHeight ); … … 442 446 case( DMM4_IDX ): 443 447 { 448 #if QC_GENERIC_SDC_G0122 449 if( dmm4Segmentation == NULL ) 450 { 451 dmmSegmentation = new TComWedgelet( iWidth, iHeight ); 452 xPredContourFromTex( pcCU, uiAbsPartIdx, iWidth, iHeight, dmmSegmentation ); 453 } 454 else 455 { 456 xPredContourFromTex( pcCU, uiAbsPartIdx, iWidth, iHeight, dmm4Segmentation ); 457 dmmSegmentation = dmm4Segmentation; 458 } 459 #else 444 460 dmmSegmentation = new TComWedgelet( iWidth, iHeight ); 445 461 xPredContourFromTex( pcCU, uiAbsPartIdx, iWidth, iHeight, dmmSegmentation ); 462 #endif 446 463 } break; 447 464 default: assert(0); … … 494 511 495 512 #if H_3D_DIM_DMM 513 #if QC_GENERIC_SDC_G0122 514 if( dimType == DMM4_IDX && dmm4Segmentation == NULL ) { dmmSegmentation->destroy(); delete dmmSegmentation; } 515 #else 496 516 if( dimType == DMM4_IDX ) { dmmSegmentation->destroy(); delete dmmSegmentation; } 517 #endif 497 518 #endif 498 519 } … … 2184 2205 Int iSumPix[2]; 2185 2206 memset(iSumPix, 0, sizeof(Int)*2); 2186 2207 #if QC_GENERIC_SDC_G0122 2208 for( Int i = 0; i < uiNumSegments; i++ ) 2209 { 2210 rpSegMeans[i] = 0; 2211 } 2212 #endif 2187 2213 if (orgDC == false) 2188 2214 { … … 2199 2225 rpSegMeans[ucSegmentRB] = pOrig[uiStride * (uiSize-1) + (uiSize-1) ]; 2200 2226 } 2227 #if QC_GENERIC_SDC_G0122 2228 else if( getDimType( uiIntraMode ) == DMM4_IDX ) 2229 { 2230 Pel *ptmpOrig = pOrig; 2231 Bool *ptmpMask = pMask, bBreak = false; 2232 UChar ucSegment = ptmpMask? (UChar) ptmpMask[0] : 0; 2233 UChar bFirstSeg = ucSegment; 2234 2235 rpSegMeans[ucSegment] = ptmpOrig[0]; 2236 for ( Int y = 0; y < uiSize; y++ ) 2237 { 2238 for ( Int x = 0; x < uiSize; x++ ) 2239 { 2240 ucSegment = ptmpMask[x]; 2241 assert( ucSegment < uiNumSegments ); 2242 2243 if( bFirstSeg != ucSegment ) 2244 { 2245 rpSegMeans[ucSegment] = ptmpOrig[x]; 2246 bBreak = true; 2247 break; 2248 } 2249 } 2250 2251 if( bBreak ) 2252 { 2253 break; 2254 } 2255 2256 ptmpOrig += uiStride; 2257 ptmpMask += uiMaskStride; 2258 } 2259 } 2260 else 2261 #else 2201 2262 else if (uiIntraMode == PLANAR_IDX) 2263 #endif 2202 2264 { 2203 2265 Pel* pLeftTop = pOrig; -
branches/HTM-9.3-dev3-Qualcomm/source/Lib/TLibCommon/TComPrediction.h
r773 r781 167 167 #if H_3D_DIM 168 168 // Depth intra 169 Void predIntraLumaDepth ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiIntraMode, Pel* piPred, UInt uiStride, Int iWidth, Int iHeight, Bool bFastEnc = false ); 169 Void predIntraLumaDepth ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiIntraMode, Pel* piPred, UInt uiStride, Int iWidth, Int iHeight, Bool bFastEnc = false 170 #if QC_GENERIC_SDC_G0122 171 , TComWedgelet* dmm4Segmentation = NULL 172 #endif 173 ); 170 174 #if H_3D_DIM_SDC 171 175 Void analyzeSegmentsSDC ( Pel* pOrig, UInt uiStride, UInt uiSize, Pel* rpSegMeans, UInt uiNumSegments, Bool* pMask, UInt uiMaskStride -
branches/HTM-9.3-dev3-Qualcomm/source/Lib/TLibCommon/TypeDef.h
r773 r781 235 235 #define H_3D_DELTA_DLT 1 236 236 #endif 237 #define QC_GENERIC_SDC_G0122 1 // Generalize SDC to all depth intra modes 237 238 238 239 #define H_3D_DIM_ENC 1 // Depth Intra encoder optimizations, includes:
Note: See TracChangeset for help on using the changeset viewer.