Changeset 712 in 3DVCSoftware for branches/HTM-8.2-dev0/source/Lib/TLibEncoder/TEncSbac.cpp
- Timestamp:
- 21 Nov 2013, 13:28:24 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-8.2-dev0/source/Lib/TLibEncoder/TEncSbac.cpp
r655 r712 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_DMM3_RBC_F0147 97 98 , m_cDmm3DataSCModel ( 1, 1, NUM_DMM3_DATA_CTX , m_contextModels + m_numContextModels, m_numContextModels) 99 #endif 98 100 #endif 99 101 #if H_3D_DIM_RBC … … 174 176 #if H_3D_DIM_DMM 175 177 m_cDmm1DataSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DMM1_DATA ); 178 #if !SEC_DMM3_RBC_F0147 176 179 m_cDmm3DataSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DMM3_DATA ); 180 #endif 177 181 #endif 178 182 #if H_3D_DIM_RBC … … 262 266 #if H_3D_DIM_DMM 263 267 curCost += m_cDmm1DataSCModel.calcCost ( curSliceType, qp, (UChar*)INIT_DMM1_DATA ); 268 #if !SEC_DMM3_RBC_F0147 264 269 curCost += m_cDmm3DataSCModel.calcCost ( curSliceType, qp, (UChar*)INIT_DMM3_DATA ); 270 #endif 265 271 #endif 266 272 #if H_3D_DIM_RBC … … 331 337 #if H_3D_DIM_DMM 332 338 m_cDmm1DataSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DMM1_DATA ); 339 #if !SEC_DMM3_RBC_F0147 333 340 m_cDmm3DataSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DMM3_DATA ); 341 #endif 334 342 #endif 335 343 #if H_3D_DIM_RBC … … 518 526 } 519 527 528 #if QC_DIM_DELTADC_UNIFY_F0132 529 Void TEncSbac::xCodeDimDeltaDC( Pel valDeltaDC, UInt uiNumSeg ) 530 { 531 xWriteExGolombLevel( UInt( abs( valDeltaDC ) - ( uiNumSeg > 1 ? 0 : 1 ) ), m_cDdcDataSCModel.get(0, 0, 0) ); 532 if( valDeltaDC != 0 ) 533 { 534 UInt uiSign = valDeltaDC > 0 ? 0 : 1; 535 m_pcBinIf->encodeBinEP( uiSign ); 536 } 537 } 538 #else 520 539 Void TEncSbac::xCodeDimDeltaDC( Pel valDeltaDC, UInt dimType ) 521 540 { … … 527 546 } 528 547 } 548 #endif 529 549 530 550 #if H_3D_DIM_DMM … … 537 557 } 538 558 559 #if !SEC_DMM3_RBC_F0147 539 560 Void TEncSbac::xCodeDmm3WedgeIdx( UInt uiIntraIdx, Int iNumBit ) 540 561 { … … 544 565 } 545 566 } 567 #endif 546 568 #endif 547 569 #if H_3D_DIM_RBC … … 1209 1231 xCodeDmm1WedgeIdx( pcCU->getDmmWedgeTabIdx( dimType, absPartIdx ), g_dmm1TabIdxBits[pcCU->getIntraSizeIdx(absPartIdx)] ); 1210 1232 } break; 1233 #if !SEC_DMM3_RBC_F0147 1211 1234 case( DMM3_IDX ): 1212 1235 { 1213 1236 xCodeDmm3WedgeIdx( pcCU->getDmm3IntraTabIdx( absPartIdx ), g_dmm3IntraTabIdxBits[pcCU->getIntraSizeIdx(absPartIdx)] ); 1214 1237 } break; 1238 #endif 1215 1239 case( DMM4_IDX ): break; 1216 1240 #endif … … 1225 1249 } 1226 1250 1227 #if H_3D_DIM_SDC 1251 #if H_3D_DIM_SDC && !QC_DIM_DELTADC_UNIFY_F0132 1228 1252 if( pcCU->getSDCFlag( absPartIdx ) ) 1229 1253 { … … 1238 1262 { 1239 1263 #endif 1264 #if QC_DIM_DELTADC_UNIFY_F0132 1265 if( dimType < DIM_NUM_TYPE || pcCU->getSDCFlag( absPartIdx ) ) 1266 #else 1240 1267 if( dimType < DIM_NUM_TYPE ) 1241 { 1268 #endif 1269 { 1270 #if QC_DIM_DELTADC_UNIFY_F0132 1271 UInt dimDeltaDC; 1272 Pel deltaDC; 1273 UInt uiNumSegments = ( dir == PLANAR_IDX ) ? 1 : 2; 1274 if( pcCU->getSDCFlag( absPartIdx ) ) 1275 { 1276 if( uiNumSegments==1 ) 1277 { 1278 dimDeltaDC = pcCU->getSDCSegmentDCOffset(0, absPartIdx) ? 1 : 0; 1279 } 1280 else 1281 { 1282 dimDeltaDC = ( pcCU->getSDCSegmentDCOffset(0, absPartIdx) || pcCU->getSDCSegmentDCOffset(1, absPartIdx) ) ? 1 : 0; 1283 } 1284 } 1285 else 1286 { 1287 dimDeltaDC = isDimDeltaDC( dir ); 1288 } 1289 1290 m_pcBinIf->encodeBin( dimDeltaDC, m_cDdcFlagSCModel.get(0, 0, uiNumSegments-1) ); 1291 1292 if( dimDeltaDC ) 1293 { 1294 for( UInt segment = 0; segment < uiNumSegments; segment++ ) 1295 { 1296 deltaDC = pcCU->getSDCFlag( absPartIdx ) ? pcCU->getSDCSegmentDCOffset(segment, absPartIdx) : pcCU->getDimDeltaDC( dimType, segment, absPartIdx ); 1297 xCodeDimDeltaDC( deltaDC, uiNumSegments ); 1298 } 1299 } 1300 #else 1242 1301 UInt dimDeltaDC = isDimDeltaDC( dir ); 1243 1302 m_pcBinIf->encodeBin( dimDeltaDC, m_cDdcFlagSCModel.get(0, 0, (RBC_IDX == dimType) ? 1 : 0) ); … … 1249 1308 } 1250 1309 } 1251 } 1252 #if H_3D_DIM_SDC 1310 #endif 1311 } 1312 #if H_3D_DIM_SDC && !QC_DIM_DELTADC_UNIFY_F0132 1253 1313 } 1254 1314 #endif … … 1257 1317 Void TEncSbac::codeIntraDepthMode( TComDataCU* pcCU, UInt absPartIdx ) 1258 1318 { 1319 #if SEC_DMM3_RBC_F0147 1320 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}}; 1321 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}}; 1322 #else 1259 1323 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}}; 1260 1324 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}}; 1325 #endif 1261 1326 UInt dir = pcCU->getLumaIntraDir( absPartIdx ); 1262 1327 UInt puIdx = (pcCU->getWidth(absPartIdx) == 64) ? 2 : ( (pcCU->getPartitionSize(absPartIdx) == SIZE_NxN && pcCU->getWidth(absPartIdx) == 8) ? 0 : 1 ); … … 1273 1338 case DMM1_IDX: codeIdx = 3; break; 1274 1339 case DMM4_IDX: codeIdx = 4; break; 1340 #if !SEC_DMM3_RBC_F0147 1275 1341 case DMM3_IDX: codeIdx = 5; break; 1276 1342 case RBC_IDX: codeIdx = 6; break; 1343 #endif 1277 1344 default: break; 1278 1345 } … … 1289 1356 } 1290 1357 #endif 1358 #if !SEC_DMM3_RBC_F0147 1291 1359 if( puIdx==1 ) 1292 1360 { … … 1300 1368 } 1301 1369 } 1370 #endif 1302 1371 //mode coding 1303 1372 for( UInt i = 0; i < codeWordLenTable[puIdx][codeIdx]; i++ )
Note: See TracChangeset for help on using the changeset viewer.