Changeset 177 in 3DVCSoftware for branches/HTM-4.1-dev2-RWTH/source/Lib/TLibCommon/TComDataCU.cpp
- Timestamp:
- 10 Nov 2012, 19:05:41 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-4.1-dev2-RWTH/source/Lib/TLibCommon/TComDataCU.cpp
r161 r177 158 158 #endif 159 159 #endif 160 #if RWTH_SDC_DLT_B0036 161 m_pbSDCFlag = NULL; 162 m_apSegmentDCOffset[0] = NULL; 163 m_apSegmentDCOffset[1] = NULL; 164 #endif 160 165 #if OL_DEPTHLIMIT_A0044 161 166 //add a variable to store the partition information … … 208 213 memset( m_pePartSize, SIZE_NONE,uiNumPartition * sizeof( *m_pePartSize ) ); 209 214 m_pePredMode = new Char[ uiNumPartition ]; 215 216 #if RWTH_SDC_DLT_B0036 217 m_pbSDCFlag = (Bool* )xMalloc(Bool, uiNumPartition); 218 m_apSegmentDCOffset[0] = (Pel*)xMalloc(Pel, uiNumPartition); 219 m_apSegmentDCOffset[1] = (Pel*)xMalloc(Pel, uiNumPartition); 220 #endif 210 221 211 222 m_puiAlfCtrlFlag = new Bool[ uiNumPartition ]; … … 355 366 #endif 356 367 if ( m_pePredMode ) { delete[] m_pePredMode; m_pePredMode = NULL; } 368 #if RWTH_SDC_DLT_B0036 369 if ( m_pbSDCFlag ) { xFree(m_pbSDCFlag); m_pbSDCFlag = NULL; } 370 if ( m_apSegmentDCOffset[0] ) { xFree(m_apSegmentDCOffset[0]); m_apSegmentDCOffset[0] = NULL; } 371 if ( m_apSegmentDCOffset[1] ) { xFree(m_apSegmentDCOffset[1]); m_apSegmentDCOffset[1] = NULL; } 372 #endif 357 373 if ( m_puhCbf[0] ) { xFree(m_puhCbf[0]); m_puhCbf[0] = NULL; } 358 374 if ( m_puhCbf[1] ) { xFree(m_puhCbf[1]); m_puhCbf[1] = NULL; } … … 546 562 m_piTextureModeDepth[ui] = pcFrom->getTextureModeDepth(ui); 547 563 #endif 564 #if RWTH_SDC_DLT_B0036 565 m_pbSDCFlag[ui] = pcFrom->getSDCFlag(ui); 566 #endif 548 567 m_puhWidth [ui] = pcFrom->getWidth(ui); 549 568 m_puhHeight [ui] = pcFrom->getHeight(ui); … … 581 600 memset( m_piTextureModeDepth+ firstElement,-1, numElements * sizeof( *m_piTextureModeDepth ) ); 582 601 #endif 602 #if RWTH_SDC_DLT_B0036 603 memset( m_pbSDCFlag + firstElement, 0, numElements * sizeof( *m_pbSDCFlag ) ); 604 memset( m_apSegmentDCOffset[0] + firstElement, 0, numElements * sizeof( *m_apSegmentDCOffset[0] ) ); 605 memset( m_apSegmentDCOffset[1] + firstElement, 0, numElements * sizeof( *m_apSegmentDCOffset[1] ) ); 606 #endif 583 607 memset( m_puhTrIdx + firstElement, 0, numElements * sizeof( *m_puhTrIdx ) ); 584 608 memset( m_nsqtPartIdx + firstElement, 0, numElements * sizeof( *m_nsqtPartIdx) ); … … 810 834 m_piContourPredTexDeltaDC2[ui] = 0; 811 835 #endif 836 #if RWTH_SDC_DLT_B0036 837 m_pbSDCFlag[ui] = false; 838 m_apSegmentDCOffset[0][ui] = 0; 839 m_apSegmentDCOffset[1][ui] = 0; 840 #endif 812 841 } 813 842 } … … 922 951 memset( m_piContourPredTexDeltaDC1, 0, sizeof( Int ) * m_uiNumPartition ); 923 952 memset( m_piContourPredTexDeltaDC2, 0, sizeof( Int ) * m_uiNumPartition ); 924 #endif 953 #endif 954 #if RWTH_SDC_DLT_B0036 955 memset( m_pbSDCFlag, 0, sizeof(Bool) * m_uiNumPartition ); 956 memset( m_apSegmentDCOffset[0], 0, sizeof(Pel) * m_uiNumPartition); 957 memset( m_apSegmentDCOffset[1], 0, sizeof(Pel) * m_uiNumPartition); 958 #endif 925 959 926 960 UChar uhWidth = g_uiMaxCUWidth >> uiDepth; … … 993 1027 m_pbResPredFlag [ui] = pcCU->m_pbResPredFlag [ uiPartOffset + ui ]; 994 1028 #endif 1029 #if RWTH_SDC_DLT_B0036 1030 m_pbSDCFlag [ui] = pcCU->m_pbSDCFlag [ uiPartOffset + ui ]; 1031 m_apSegmentDCOffset[0][ui] = pcCU->m_apSegmentDCOffset[0][ uiPartOffset + ui ]; 1032 m_apSegmentDCOffset[1][ui] = pcCU->m_apSegmentDCOffset[1][ uiPartOffset + ui ]; 1033 #endif 995 1034 } 996 1035 } … … 1202 1241 } 1203 1242 #endif 1243 #if RWTH_SDC_DLT_B0036 1244 m_pbSDCFlag = pcCU->getSDCFlag() + uiPart; 1245 m_apSegmentDCOffset[0] = pcCU->getSDCSegmentDCOffset(0) + uiPart; 1246 m_apSegmentDCOffset[1] = pcCU->getSDCSegmentDCOffset(1) + uiPart; 1247 #endif 1204 1248 } 1205 1249 … … 1384 1428 memcpy( m_piTextureModeDepth + uiOffset, pcCU->getTextureModeDepth(), sizeof( Int ) * uiNumPartition ); 1385 1429 #endif 1430 #if RWTH_SDC_DLT_B0036 1431 memcpy( m_pbSDCFlag + uiOffset, pcCU->getSDCFlag(), iSizeInBool ); 1432 memcpy( m_apSegmentDCOffset[0] + uiOffset, pcCU->getSDCSegmentDCOffset(0), sizeof( Pel ) * uiNumPartition); 1433 memcpy( m_apSegmentDCOffset[1] + uiOffset, pcCU->getSDCSegmentDCOffset(1), sizeof( Pel ) * uiNumPartition); 1434 #endif 1386 1435 } 1387 1436 … … 1505 1554 memcpy( rpcCU->getTextureModeDepth() + m_uiAbsIdxInLCU, m_piTextureModeDepth, sizeof( Int ) * m_uiNumPartition ); 1506 1555 #endif 1556 #if RWTH_SDC_DLT_B0036 1557 memcpy( rpcCU->getSDCFlag() + m_uiAbsIdxInLCU, m_pbSDCFlag, iSizeInBool ); 1558 memcpy( rpcCU->getSDCSegmentDCOffset(0) + m_uiAbsIdxInLCU, m_apSegmentDCOffset[0], sizeof( Pel ) * m_uiNumPartition); 1559 memcpy( rpcCU->getSDCSegmentDCOffset(1) + m_uiAbsIdxInLCU, m_apSegmentDCOffset[1], sizeof( Pel ) * m_uiNumPartition); 1560 #endif 1507 1561 } 1508 1562 … … 1626 1680 #if HHI_MPI 1627 1681 memcpy( rpcCU->getTextureModeDepth() + uiPartOffset, m_piTextureModeDepth, sizeof( Int ) * uiQNumPart ); 1682 #endif 1683 #if RWTH_SDC_DLT_B0036 1684 memcpy( rpcCU->getSDCFlag() + uiPartOffset, m_pbSDCFlag, iSizeInBool ); 1685 memcpy( rpcCU->getSDCSegmentDCOffset(0) + uiPartOffset, m_apSegmentDCOffset[0], sizeof( Pel ) * uiQNumPart); 1686 memcpy( rpcCU->getSDCSegmentDCOffset(1) + uiPartOffset, m_apSegmentDCOffset[1], sizeof( Pel ) * uiQNumPart); 1628 1687 #endif 1629 1688 } … … 2955 3014 setSubPart( bMergeFlag, m_pbMergeFlag, uiAbsPartIdx, uiDepth, uiPartIdx ); 2956 3015 } 3016 3017 #if RWTH_SDC_DLT_B0036 3018 Void TComDataCU::setSDCFlagSubParts ( Bool bSDCFlag, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth ) 3019 { 3020 setSubPart( bSDCFlag, m_pbSDCFlag, uiAbsPartIdx, uiDepth, uiPartIdx ); 3021 } 3022 3023 UInt TComDataCU::getCtxSDCFlag( UInt uiAbsPartIdx ) 3024 { 3025 TComDataCU* pcTempCU; 3026 UInt uiTempPartIdx; 3027 UInt uiCtx = 0; 3028 3029 // left PU 3030 pcTempCU = getPULeft( uiTempPartIdx, m_uiAbsIdxInLCU + uiAbsPartIdx, true, false ); 3031 uiCtx = ( pcTempCU ) ? pcTempCU->getSDCFlag( uiTempPartIdx ) : 0; 3032 3033 // above PU 3034 pcTempCU = getPUAbove( uiTempPartIdx, m_uiAbsIdxInLCU + uiAbsPartIdx, true, false ); 3035 uiCtx += ( pcTempCU ) ? pcTempCU->getSDCFlag( uiTempPartIdx ) : 0; 3036 3037 return uiCtx; 3038 } 3039 3040 Bool TComDataCU::getSDCAvailable( UInt uiAbsPartIdx ) 3041 { 3042 if( !getSlice()->getSPS()->isDepth() || getPartitionSize(uiAbsPartIdx) != SIZE_2Nx2N ) 3043 return false; 3044 3045 UInt uiLumaPredMode = getLumaIntraDir( uiAbsPartIdx ); 3046 3047 if(!isIntra(uiAbsPartIdx)) 3048 return false; 3049 3050 for(UInt ui=0; ui<RWTH_SDC_NUM_PRED_MODES; ui++) 3051 { 3052 if( g_auiSDCPredModes[ui] == uiLumaPredMode ) 3053 return true; 3054 } 3055 // else 3056 return false; 3057 } 3058 #endif 2957 3059 2958 3060 Void TComDataCU::setMergeIndexSubParts ( UInt uiMergeIndex, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth )
Note: See TracChangeset for help on using the changeset viewer.