Changeset 878 in 3DVCSoftware
- Timestamp:
- 27 Mar 2014, 19:51:52 (11 years ago)
- Location:
- branches/HTM-10.1-dev0/source/Lib
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-10.1-dev0/source/Lib/TLibCommon/ContextTables.h
r877 r878 104 104 105 105 #if H_3D_DIM 106 #if QC_GENERIC_SDC_G0122107 106 #define NUM_DEPTH_INTRA_MODE_CTX 1 ///< number of context models for depth intra modes 108 #else109 #define NUM_DEPTH_INTRA_MODE_CTX 8 ///< number of context models for depth intra modes110 #endif111 107 #define NUM_DDC_FLAG_CTX 2 ///< number of context models for deltaDC flag (DMM or RBC) 112 108 #define NUM_DDC_DATA_CTX 1 ///< number of context models for deltaDC data (DMM or RBC) … … 114 110 #define NUM_DMM1_DATA_CTX 1 ///< number of context models for DMM1 data 115 111 #endif 116 #if QC_GENERIC_SDC_G0122117 112 #define NUM_ANGLE_FLAG_CTX 3 118 #endif119 113 #endif 120 114 … … 366 360 #endif 367 361 #if H_3D_DIM 368 #if QC_GENERIC_SDC_G0122369 362 static const UChar 370 363 INIT_DEPTH_INTRA_MODE[3][NUM_DEPTH_INTRA_MODE_CTX] = … … 374 367 { 154, } 375 368 }; 376 #else 377 static const UChar 378 INIT_DEPTH_INTRA_MODE[3][NUM_DEPTH_INTRA_MODE_CTX] = 379 { 380 {0, 0, 64, 168, 168, 124, CNU, 0}, 381 {0, 64, 0, 183, CNU, 108, 0, 0}, 382 {64, 0, CNU, CNU, 168, 109, 0, 0} 383 }; 384 #endif 385 386 #if QC_GENERIC_SDC_G0122 369 387 370 static const UChar 388 371 INIT_ANGLE_FLAG[3][NUM_ANGLE_FLAG_CTX] = … … 392 375 { 155, 170, 157 }, 393 376 }; 394 #endif395 377 396 378 static const UChar -
branches/HTM-10.1-dev0/source/Lib/TLibCommon/TComDataCU.cpp
r877 r878 2375 2375 #endif 2376 2376 2377 #if QC_GENERIC_SDC_G01222377 #if H_3D_DIM_SDC 2378 2378 UInt TComDataCU::getCtxSDCFlag( UInt uiAbsPartIdx ) 2379 2379 { … … 2624 2624 // check general CU information 2625 2625 if( !getSlice()->getIsDepth() || !isIntra(uiAbsPartIdx) || getPartitionSize(uiAbsPartIdx) != SIZE_2Nx2N ) 2626 { 2626 2627 return false; 2627 #if QC_GENERIC_SDC_G0122 2628 } 2629 2628 2630 if( isDimMode( getLumaIntraDir( uiAbsPartIdx ) ) && !isDimDeltaDC( getLumaIntraDir( uiAbsPartIdx ) ) ) 2629 2631 { … … 2637 2639 2638 2640 return false; 2639 #endif2640 2641 // check prediction mode 2641 2642 UInt uiLumaPredMode = getLumaIntraDir( uiAbsPartIdx ); -
branches/HTM-10.1-dev0/source/Lib/TLibCommon/TComDataCU.h
r877 r878 556 556 Pel getSDCSegmentDCOffset( UInt uiSeg, UInt uiPartIdx ) { return m_apSegmentDCOffset[uiSeg][uiPartIdx]; } 557 557 Void setSDCSegmentDCOffset( Pel pOffset, UInt uiSeg, UInt uiPartIdx) { m_apSegmentDCOffset[uiSeg][uiPartIdx] = pOffset; } 558 #if QC_GENERIC_SDC_G0122559 558 UInt getCtxSDCFlag ( UInt uiAbsPartIdx ); 560 559 UInt getCtxAngleFlag ( UInt uiAbsPartIdx ); 561 #endif562 560 #endif 563 561 #endif -
branches/HTM-10.1-dev0/source/Lib/TLibCommon/TComPrediction.cpp
r872 r878 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 419 #if QC_GENERIC_SDC_G0122 420 , TComWedgelet* dmm4Segmentation 421 #endif 422 ) 418 Void TComPrediction::predIntraLumaDepth( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiIntraMode, Pel* piPred, UInt uiStride, Int iWidth, Int iHeight, Bool bFastEnc, TComWedgelet* dmm4Segmentation ) 423 419 { 424 420 assert( iWidth == iHeight ); … … 446 442 case( DMM4_IDX ): 447 443 { 448 #if QC_GENERIC_SDC_G0122449 444 if( dmm4Segmentation == NULL ) 450 445 { … … 457 452 dmmSegmentation = dmm4Segmentation; 458 453 } 459 #else460 dmmSegmentation = new TComWedgelet( iWidth, iHeight );461 xPredContourFromTex( pcCU, uiAbsPartIdx, iWidth, iHeight, dmmSegmentation );462 #endif463 454 } break; 464 455 default: assert(0); … … 511 502 512 503 #if H_3D_DIM_DMM 513 #if QC_GENERIC_SDC_G0122514 504 if( dimType == DMM4_IDX && dmm4Segmentation == NULL ) { dmmSegmentation->destroy(); delete dmmSegmentation; } 515 #else516 if( dimType == DMM4_IDX ) { dmmSegmentation->destroy(); delete dmmSegmentation; }517 #endif518 505 #endif 519 506 } … … 2593 2580 Int iSumPix[2]; 2594 2581 memset(iSumPix, 0, sizeof(Int)*2); 2595 #if QC_GENERIC_SDC_G01222596 2582 for( Int i = 0; i < uiNumSegments; i++ ) 2597 2583 { 2598 2584 rpSegMeans[i] = 0; 2599 2585 } 2600 #endif2601 2586 if (orgDC == false) 2602 2587 { … … 2613 2598 rpSegMeans[ucSegmentRB] = pOrig[uiStride * (uiSize-1) + (uiSize-1) ]; 2614 2599 } 2615 #if QC_GENERIC_SDC_G01222616 2600 else if( getDimType( uiIntraMode ) == DMM4_IDX ) 2617 2601 { … … 2647 2631 } 2648 2632 else 2649 #else2650 else if (uiIntraMode == PLANAR_IDX)2651 #endif2652 2633 { 2653 2634 Pel* pLeftTop = pOrig; -
branches/HTM-10.1-dev0/source/Lib/TLibCommon/TComPrediction.h
r872 r878 172 172 // Depth intra 173 173 Void predIntraLumaDepth ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiIntraMode, Pel* piPred, UInt uiStride, Int iWidth, Int iHeight, Bool bFastEnc = false 174 #if QC_GENERIC_SDC_G0122175 174 , TComWedgelet* dmm4Segmentation = NULL 176 #endif177 175 ); 178 176 #if H_3D_DIM_SDC -
branches/HTM-10.1-dev0/source/Lib/TLibCommon/TypeDef.h
r877 r878 184 184 // QC_DIM_DELTADC_UNIFY_F0132 Unify delta DC coding in depth intra modes 185 185 // Unify intra SDC and inter SDC 186 // QC_GENERIC_SDC_G0122 Generalize SDC to all depth intra modes 186 187 187 188 … … 317 318 #endif 318 319 #define SCU_HS_DEPTH_DC_PRED_G0143 1 319 #define QC_GENERIC_SDC_G0122 1 // Generalize SDC to all depth intra modes 320 320 321 #endif 321 322 -
branches/HTM-10.1-dev0/source/Lib/TLibDecoder/TDecCu.cpp
r877 r878 1119 1119 #if QC_PKU_SDC_SPLIT_G0123 1120 1120 #if HS_TSINGHUA_SDC_SPLIT_G0111 1121 #if QC_GENERIC_SDC_G01221122 1121 TComWedgelet* dmm4SegmentationOrg = new TComWedgelet( uiWidth, uiHeight ); 1123 #endif1124 1122 #else 1125 #if QC_GENERIC_SDC_G01221126 1123 TComWedgelet* dmm4Segmentation = new TComWedgelet( uiWidth, uiHeight ); 1127 #endif1128 1124 #endif 1129 1125 #endif … … 1210 1206 #endif 1211 1207 #if !QC_PKU_SDC_SPLIT_G0123 1212 #if QC_GENERIC_SDC_G01221213 1208 TComWedgelet* dmm4Segmentation = new TComWedgelet( uiWidth, uiHeight ); 1214 #endif1215 1209 #endif 1216 1210 #if HS_TSINGHUA_SDC_SPLIT_G0111 … … 1222 1216 { 1223 1217 m_pcPrediction->predIntraLumaDepth( pcCU, uiAbsPartIdx, uiLumaPredMode, piPred, uiStride, uiWidth, uiHeight 1224 #if QC_GENERIC_SDC_G01221225 1218 , false, dmm4Segmentation 1226 #endif1227 1219 ); 1228 1220 #if HS_TSINGHUA_SDC_SPLIT_G0111 … … 1292 1284 uiMaskStride = pcWedgelet->getStride(); 1293 1285 } 1294 #if QC_GENERIC_SDC_G01221295 1286 if( getDimType( uiLumaPredMode ) == DMM4_IDX ) 1296 1287 { … … 1304 1295 #endif 1305 1296 } 1306 #endif1307 1297 // get DC prediction for each segment 1308 1298 Pel apDCPredValues[2]; … … 1366 1356 pRecCr += uiStrideC; 1367 1357 } 1368 #if QC_GENERIC_SDC_G01221369 1358 #if HS_TSINGHUA_SDC_SPLIT_G0111 1370 1359 dmm4SegmentationOrg->destroy(); delete dmm4SegmentationOrg; 1371 1360 #else 1372 1361 dmm4Segmentation->destroy(); delete dmm4Segmentation; 1373 #endif1374 1362 #endif 1375 1363 } -
branches/HTM-10.1-dev0/source/Lib/TLibDecoder/TDecSbac.cpp
r877 r878 86 86 , m_cDdcFlagSCModel ( 1, 1, NUM_DDC_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 87 87 , m_cDdcDataSCModel ( 1, 1, NUM_DDC_DATA_CTX , m_contextModels + m_numContextModels, m_numContextModels) 88 #if QC_GENERIC_SDC_G012289 88 , m_cAngleFlagSCModel ( 1, 1, NUM_ANGLE_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 90 #endif91 89 #if H_3D_DIM_DMM 92 90 , m_cDmm1DataSCModel ( 1, 1, NUM_DMM1_DATA_CTX , m_contextModels + m_numContextModels, m_numContextModels) … … 172 170 m_cDdcFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_DDC_FLAG ); 173 171 m_cDdcDataSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_DDC_DATA ); 174 #if QC_GENERIC_SDC_G0122175 172 m_cAngleFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_ANGLE_FLAG ); 176 #endif177 173 #if H_3D_DIM_DMM 178 174 m_cDmm1DataSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_DMM1_DATA ); … … 244 240 m_cDdcFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DDC_FLAG ); 245 241 m_cDdcDataSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DDC_DATA ); 246 #if QC_GENERIC_SDC_G0122247 242 m_cAngleFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_ANGLE_FLAG ); 248 #endif249 243 #if H_3D_DIM_DMM 250 244 m_cDmm1DataSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DMM1_DATA ); … … 1017 1011 } 1018 1012 if( pcCU->getLumaIntraDir( absPartIdx+partOffset*j ) < NUM_INTRA_MODE ) 1019 #if H_3D_DIM_SDC1020 #if QC_GENERIC_SDC_G01221021 if( 1 ) // This should be cleaned up.1022 #else1023 if( !pcCU->getSDCFlag( absPartIdx+partOffset*j ) )1024 #endif1025 #endif1026 1013 { 1027 1014 #endif … … 1039 1026 #if H_3D_DIM 1040 1027 if( pcCU->getLumaIntraDir( absPartIdx+partOffset*j ) < NUM_INTRA_MODE ) 1041 #if H_3D_DIM_SDC1042 #if QC_GENERIC_SDC_G01221043 if( 1 ) // This should be cleaned up.1044 #else1045 if( !pcCU->getSDCFlag( absPartIdx+partOffset*j ) )1046 #endif1047 #endif1048 1028 { 1049 1029 #endif … … 1150 1130 } 1151 1131 1152 #if QC_GENERIC_SDC_G01221153 1132 Void TDecSbac::parseIntraDepthMode( TComDataCU* pcCU, UInt absPartIdx, UInt depth ) 1154 1133 { … … 1180 1159 } 1181 1160 } 1182 #else1183 Void TDecSbac::parseIntraDepthMode( TComDataCU* pcCU, UInt absPartIdx, UInt depth )1184 {1185 UInt puIdx = (pcCU->getWidth(absPartIdx) == 64) ? 2 : ( (pcCU->getPartitionSize(absPartIdx) == SIZE_NxN && pcCU->getWidth(absPartIdx) == 8) ? 0 : 1 );1186 UInt dir = 0;1187 Bool sdcFlag = 0;1188 UInt symbol = 1;1189 UInt modeCode = 0 ;1190 UInt binNum = 0;1191 UInt ctxDepthMode = 0;1192 1193 if( puIdx == 2 )1194 {1195 {1196 ctxDepthMode = puIdx*3 + binNum;1197 m_pcTDecBinIf->decodeBin( symbol, m_cDepthIntraModeSCModel.get(0,0,ctxDepthMode) );1198 modeCode = (modeCode<<1) + symbol;1199 binNum++;1200 }1201 if( modeCode == 0 ) { dir = PLANAR_IDX; sdcFlag = 1;}1202 else if( modeCode == 1 ) { dir = 0; sdcFlag = 0;}1203 }1204 else if( puIdx == 0 )1205 {1206 while( binNum < 1 && symbol )1207 {1208 ctxDepthMode = puIdx*3 + ((binNum >= 2) ? 2 : binNum);1209 m_pcTDecBinIf->decodeBin( symbol, m_cDepthIntraModeSCModel.get(0,0,ctxDepthMode) );1210 modeCode = (modeCode<<1) + symbol;1211 binNum++;1212 }1213 if( modeCode == 0 )1214 {1215 dir = 0;1216 sdcFlag = 0;1217 }1218 else if ( modeCode == 1 )1219 {1220 dir = (2*DMM1_IDX+DIM_OFFSET);1221 sdcFlag = 0;1222 }1223 }1224 else1225 {1226 while( binNum < 4 && symbol )1227 {1228 ctxDepthMode = puIdx*3 + ((binNum >= 2) ? 2 : binNum);1229 m_pcTDecBinIf->decodeBin( symbol, m_cDepthIntraModeSCModel.get(0,0,ctxDepthMode) );1230 modeCode = (modeCode<<1) + symbol;1231 binNum++;1232 }1233 if ( modeCode == 0 ) { dir = PLANAR_IDX; sdcFlag = 1;}1234 else if ( modeCode == 2 ) { dir = 5; sdcFlag = 0;}1235 else if ( modeCode == 6 ) { dir = (2*DMM1_IDX+DIM_OFFSET); sdcFlag = 1;}1236 else if ( modeCode == 14 ) { dir = (2*DMM1_IDX+DIM_OFFSET); sdcFlag = 0;}1237 else if ( modeCode == 15 ) { dir = (2*DMM4_IDX+DIM_OFFSET); sdcFlag = 0;}1238 1239 }1240 pcCU->setLumaIntraDirSubParts( (UChar)dir, absPartIdx, depth );1241 #if H_3D_DIM_SDC1242 pcCU->setSDCFlagSubParts( sdcFlag, absPartIdx, depth );1243 #endif1244 }1245 #endif1246 1161 #endif 1247 1162 -
branches/HTM-10.1-dev0/source/Lib/TLibDecoder/TDecSbac.h
r877 r878 213 213 ContextModel3DBuffer m_cDdcFlagSCModel; 214 214 ContextModel3DBuffer m_cDdcDataSCModel; 215 #if QC_GENERIC_SDC_G0122216 215 ContextModel3DBuffer m_cAngleFlagSCModel; 217 #endif218 216 #if H_3D_DIM_DMM 219 217 ContextModel3DBuffer m_cDmm1DataSCModel; -
branches/HTM-10.1-dev0/source/Lib/TLibEncoder/TEncSbac.cpp
r877 r878 92 92 , m_cDdcFlagSCModel ( 1, 1, NUM_DDC_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 93 93 , m_cDdcDataSCModel ( 1, 1, NUM_DDC_DATA_CTX , m_contextModels + m_numContextModels, m_numContextModels) 94 #if QC_GENERIC_SDC_G012295 94 , m_cAngleFlagSCModel ( 1, 1, NUM_ANGLE_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 96 #endif97 95 #if H_3D_DIM_DMM 98 96 , m_cDmm1DataSCModel ( 1, 1, NUM_DMM1_DATA_CTX , m_contextModels + m_numContextModels, m_numContextModels) … … 170 168 m_cDdcFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DDC_FLAG ); 171 169 m_cDdcDataSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DDC_DATA ); 172 #if QC_GENERIC_SDC_G0122173 170 m_cAngleFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_ANGLE_FLAG ); 174 #endif175 171 #if H_3D_DIM_DMM 176 172 m_cDmm1DataSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DMM1_DATA ); … … 258 254 curCost += m_cDdcFlagSCModel.calcCost ( curSliceType, qp, (UChar*)INIT_DDC_FLAG ); 259 255 curCost += m_cDdcDataSCModel.calcCost ( curSliceType, qp, (UChar*)INIT_DDC_DATA ); 260 #if QC_GENERIC_SDC_G0122261 256 curCost += m_cAngleFlagSCModel.calcCost ( curSliceType, qp, (UChar*)INIT_ANGLE_FLAG ); 262 #endif263 257 #if H_3D_DIM_DMM 264 258 curCost += m_cDmm1DataSCModel.calcCost ( curSliceType, qp, (UChar*)INIT_DMM1_DATA ); … … 324 318 m_cDdcFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DDC_FLAG ); 325 319 m_cDdcDataSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DDC_DATA ); 326 #if QC_GENERIC_SDC_G0122327 320 m_cAngleFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_ANGLE_FLAG ); 328 #endif329 321 #if H_3D_DIM_DMM 330 322 m_cDmm1DataSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DMM1_DATA ); … … 640 632 this->m_cDepthIntraModeSCModel .copyFrom( &pSrc->m_cDepthIntraModeSCModel ); 641 633 this->m_cDdcFlagSCModel .copyFrom( &pSrc->m_cDdcFlagSCModel ); 642 #if QC_GENERIC_SDC_G0122643 634 this->m_cAngleFlagSCModel .copyFrom( &pSrc->m_cAngleFlagSCModel ); 644 #endif645 635 } 646 636 #endif … … 1121 1111 } 1122 1112 if( pcCU->getLumaIntraDir( absPartIdx+partOffset*j ) < NUM_INTRA_MODE ) 1123 #if H_3D_DIM_SDC 1124 #if QC_GENERIC_SDC_G0122 1125 if( 1 ) 1126 #else 1127 if( !pcCU->getSDCFlag( absPartIdx+partOffset*j ) ) 1128 #endif 1129 #endif 1130 { 1131 #endif 1132 predNum[j] = pcCU->getIntraDirLumaPredictor(absPartIdx+partOffset*j, preds[j]); 1133 for(UInt i = 0; i < predNum[j]; i++) 1134 { 1135 if(dir[j] == preds[j][i]) 1136 { 1137 predIdx[j] = i; 1138 } 1139 } 1140 m_pcBinIf->encodeBin((predIdx[j] != -1)? 1 : 0, m_cCUIntraPredSCModel.get( 0, 0, 0 ) ); 1113 { 1114 #endif 1115 predNum[j] = pcCU->getIntraDirLumaPredictor(absPartIdx+partOffset*j, preds[j]); 1116 for(UInt i = 0; i < predNum[j]; i++) 1117 { 1118 if(dir[j] == preds[j][i]) 1119 { 1120 predIdx[j] = i; 1121 } 1122 } 1123 m_pcBinIf->encodeBin((predIdx[j] != -1)? 1 : 0, m_cCUIntraPredSCModel.get( 0, 0, 0 ) ); 1141 1124 #if H_MV_ENC_DEC_TRAC 1142 DTRACE_CU("prev_intra_luma_pred_flag", (predIdx[j] != -1)? 1 : 0);1125 DTRACE_CU("prev_intra_luma_pred_flag", (predIdx[j] != -1)? 1 : 0); 1143 1126 #endif 1144 1127 #if H_3D_DIM … … 1151 1134 #if H_3D_DIM 1152 1135 if( pcCU->getLumaIntraDir( absPartIdx+partOffset*j ) < NUM_INTRA_MODE ) 1153 #if H_3D_DIM_SDC1154 #if QC_GENERIC_SDC_G01221155 if( 1 )1156 #else1157 if( !pcCU->getSDCFlag( absPartIdx+partOffset*j ) )1158 #endif1159 #endif1160 1136 { 1161 1137 #endif … … 1257 1233 } 1258 1234 1259 #if QC_GENERIC_SDC_G01221260 1235 Void TEncSbac::codeIntraDepthMode( TComDataCU* pcCU, UInt absPartIdx ) 1261 1236 { … … 1280 1255 } 1281 1256 } 1282 #else1283 Void TEncSbac::codeIntraDepthMode( TComDataCU* pcCU, UInt absPartIdx )1284 {1285 UInt codeWordTable[3][7] = {{0, 0, 0, 1, 0, 0, 0},{0, 2, 6, 14, 15, 0, 0},{0, 1, 0, 0, 0, 0, 0}};1286 UInt codeWordLenTable[3][7] = {{0, 1, 0, 1, 0, 0, 0},{1, 2, 3, 4, 4, 0, 0},{1, 1, 0, 0, 0, 0, 0}};1287 UInt dir = pcCU->getLumaIntraDir( absPartIdx );1288 UInt puIdx = (pcCU->getWidth(absPartIdx) == 64) ? 2 : ( (pcCU->getPartitionSize(absPartIdx) == SIZE_NxN && pcCU->getWidth(absPartIdx) == 8) ? 0 : 1 );1289 UInt codeIdx = 0;1290 1291 if( dir < NUM_INTRA_MODE )1292 {1293 codeIdx = 1;1294 }1295 if( isDimMode( dir ) )1296 {1297 switch( getDimType( dir ) )1298 {1299 case DMM1_IDX: codeIdx = 3; break;1300 case DMM4_IDX: codeIdx = 4; break;1301 default: break;1302 }1303 }1304 1305 #if H_3D_DIM_SDC1306 if( pcCU->getSDCFlag( absPartIdx ) )1307 {1308 switch( dir )1309 {1310 case PLANAR_IDX: codeIdx = 0; break;1311 default: codeIdx = 2; break;1312 }1313 }1314 #endif1315 //mode coding1316 for( UInt i = 0; i < codeWordLenTable[puIdx][codeIdx]; i++ )1317 {1318 UInt bit = codeWordTable[puIdx][codeIdx] & ( 1<<(codeWordLenTable[puIdx][codeIdx] - i - 1) );1319 UInt ctxDepthMode = puIdx*3 + ( (i >= 2) ? 2 : i );1320 m_pcBinIf->encodeBin( bit!=0 , m_cDepthIntraModeSCModel.get(0, 0, ctxDepthMode) );1321 }1322 }1323 #endif1324 1257 #endif 1325 1258 -
branches/HTM-10.1-dev0/source/Lib/TLibEncoder/TEncSbac.h
r877 r878 257 257 ContextModel3DBuffer m_cDdcFlagSCModel; 258 258 ContextModel3DBuffer m_cDdcDataSCModel; 259 #if QC_GENERIC_SDC_G0122260 259 ContextModel3DBuffer m_cAngleFlagSCModel; 261 #endif262 260 #if H_3D_DIM_DMM 263 261 ContextModel3DBuffer m_cDmm1DataSCModel; -
branches/HTM-10.1-dev0/source/Lib/TLibEncoder/TEncSearch.cpp
r877 r878 1862 1862 #if H_3D_DIM_SDC 1863 1863 Void TEncSearch::xIntraCodingSDC( TComDataCU* pcCU, UInt uiAbsPartIdx, TComYuv* pcOrgYuv, TComYuv* pcPredYuv, Dist& ruiDist, Double& dRDCost, 1864 #if QC_GENERIC_SDC_G01221865 1864 Bool bZeroResidual, Int iSDCDeltaResi 1866 #else1867 Bool bResidual1868 #endif1869 1865 ) 1870 1866 { … … 1874 1870 #if QC_PKU_SDC_SPLIT_G0123 1875 1871 #if HS_TSINGHUA_SDC_SPLIT_G0111 1876 #if QC_GENERIC_SDC_G01221877 1872 TComWedgelet* dmm4SegmentationOrg = new TComWedgelet( uiWidth, uiHeight ); 1878 #endif1879 1873 #else 1880 #if QC_GENERIC_SDC_G01221881 TComWedgelet* dmm4Segmentation = new TComWedgelet( uiWidth, uiHeight );1882 #endif1883 1874 #endif 1884 1875 #endif … … 1938 1929 AOF( pcCU->getSDCAvailable(uiAbsPartIdx) ); 1939 1930 AOF( pcCU->getSDCFlag(uiAbsPartIdx) ); 1940 #endif1941 #if !QC_GENERIC_SDC_G01221942 AOF( uiLumaPredMode == DC_IDX || uiLumaPredMode == PLANAR_IDX || ( getDimType( uiLumaPredMode ) == DMM1_IDX && !isDimDeltaDC( uiLumaPredMode ) ) );1943 AOF( uiLumaPredMode == DC_IDX || uiLumaPredMode == PLANAR_IDX || uiWidth < 64 );1944 1931 #endif 1945 1932 … … 1956 1943 #endif 1957 1944 #if !QC_PKU_SDC_SPLIT_G0123 1958 #if QC_GENERIC_SDC_G01221959 1945 TComWedgelet* dmm4Segmentation = new TComWedgelet( uiWidth, uiHeight ); 1960 1946 #endif 1961 #endif1962 1947 #if HS_TSINGHUA_SDC_SPLIT_G0111 1963 #if QC_GENERIC_SDC_G01221964 1948 TComWedgelet* dmm4Segmentation = new TComWedgelet( uiWidth, uiHeight ); 1965 #endif1966 1949 #endif 1967 1950 //===== get prediction signal ===== … … 1982 1965 #endif 1983 1966 predIntraLumaDepth( pcCU, uiAbsPartIdx, uiLumaPredMode, piPred, uiStride, uiWidth, uiHeight, true 1984 #if QC_GENERIC_SDC_G01221985 1967 , dmm4Segmentation 1986 #endif1987 1968 ); 1988 1969 #if HS_TSINGHUA_SDC_SPLIT_G0111 … … 2053 2034 uiMaskStride = pcWedgelet->getStride(); 2054 2035 } 2055 #if QC_GENERIC_SDC_G01222056 2036 if( getDimType( uiLumaPredMode ) == DMM4_IDX ) 2057 2037 { … … 2065 2045 #endif 2066 2046 } 2067 #endif2068 2047 2069 2048 // get DC prediction for each segment … … 2078 2057 { 2079 2058 // remap reconstructed value to valid depth values 2080 #if QC_GENERIC_SDC_G01222081 2059 Pel pDCRec = ( !bZeroResidual ) ? apDCOrigValues[uiSegment] : apDCPredValues[uiSegment]; 2082 #else2083 Pel pDCRec = bResidual?apDCOrigValues[uiSegment]:apDCPredValues[uiSegment];2084 #endif2085 2060 // get residual (idx) 2086 2061 #if H_3D_DIM_DLT … … 2089 2064 Pel pResidualIdx = pDCRec - apDCPredValues[uiSegment]; 2090 2065 #endif 2091 #if QC_GENERIC_SDC_G01222092 2066 if( !bZeroResidual ) 2093 2067 { … … 2099 2073 } 2100 2074 } 2101 #endif2102 2075 // save SDC DC offset 2103 2076 pcCU->setSDCSegmentDCOffset(pResidualIdx, uiSegment, uiAbsPartIdx); … … 2203 2176 #endif 2204 2177 dRDCost = m_pcRdCost->calcRdCost( uiBits, ruiDist ); 2205 #if QC_GENERIC_SDC_G01222206 2178 #if HS_TSINGHUA_SDC_SPLIT_G0111 2207 2179 dmm4SegmentationOrg->destroy(); delete dmm4SegmentationOrg; 2208 2180 #else 2209 2181 dmm4Segmentation->destroy(); delete dmm4Segmentation; 2210 #endif2211 2182 #endif 2212 2183 } … … 3075 3046 case( DMM4_IDX ): 3076 3047 { 3077 #if !QC_GENERIC_SDC_G01223078 if( uiWidth > 4 )3079 #endif3080 3048 { 3081 3049 biSegmentation = new TComWedgelet( uiWidth, uiHeight ); … … 3133 3101 { 3134 3102 pcCU->setSDCFlagSubParts( (uiSDC != 0), uiPartOffset, uiDepth + uiInitTrDepth ); 3135 #if QC_GENERIC_SDC_G01223136 3103 for( Int iSDCDeltaResi = -2; iSDCDeltaResi <= 2; iSDCDeltaResi++ ) 3137 3104 { … … 3140 3107 continue; 3141 3108 } 3142 #endif3143 3109 #endif 3144 3110 … … 3151 3117 bTestZeroResi |= pcCU->getSDCFlag(uiPartOffset); 3152 3118 #endif 3153 #if QC_GENERIC_SDC_G01223154 3119 if( uiSDC != 0 && iSDCDeltaResi != 0 ) 3155 3120 { 3156 3121 bTestZeroResi = false; 3157 3122 } 3158 #endif3159 3123 #endif 3160 3124 … … 3187 3151 3188 3152 // start encoding with SDC 3189 #if QC_GENERIC_SDC_G01223190 3153 xIntraCodingSDC(pcCU, uiPartOffset, pcOrgYuv, pcPredYuv, uiPUDistY, dPUCost, ( testZeroResi != 0 ), iSDCDeltaResi ); 3191 #else3192 xIntraCodingSDC(pcCU, uiPartOffset, pcOrgYuv, pcPredYuv, uiPUDistY, dPUCost, (testZeroResi!=0));3193 #endif3194 3154 } 3195 3155 else … … 3264 3224 #if H_3D_DIM_ENC || H_3D_DIM_SDC 3265 3225 } 3266 #endif3267 #if QC_GENERIC_SDC_G01223268 3226 } // SDC residual loop 3269 3227 #endif -
branches/HTM-10.1-dev0/source/Lib/TLibEncoder/TEncSearch.h
r877 r878 353 353 #endif 354 354 #if H_3D_DIM_SDC 355 Void xIntraCodingSDC ( TComDataCU* pcCU, UInt uiAbsPartIdx, TComYuv* pcOrgYuv, TComYuv* pcPredYuv, Dist& ruiDist, Double& dRDCost, 356 #if QC_GENERIC_SDC_G0122 357 Bool bZeroResidual, Int iSDCDeltaResi 358 #else 359 Bool bResidual 360 #endif 361 ); 355 Void xIntraCodingSDC ( TComDataCU* pcCU, UInt uiAbsPartIdx, TComYuv* pcOrgYuv, TComYuv* pcPredYuv, Dist& ruiDist, Double& dRDCost, Bool bZeroResidual, Int iSDCDeltaResi ); 362 356 #endif 363 357 #endif
Note: See TracChangeset for help on using the changeset viewer.