Changeset 655 in 3DVCSoftware for trunk/source/Lib/TLibDecoder/TDecSbac.cpp
- Timestamp:
- 23 Oct 2013, 23:01:30 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/Lib/TLibDecoder/TDecSbac.cpp
r622 r655 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_HHIFIX92 , m_cDmm2DataSCModel ( 1, 1, NUM_DMM2_DATA_CTX , m_contextModels + m_numContextModels, m_numContextModels)93 #endif94 91 , m_cDmm3DataSCModel ( 1, 1, NUM_DMM3_DATA_CTX , m_contextModels + m_numContextModels, m_numContextModels) 95 92 #endif … … 102 99 #endif 103 100 #endif 104 #if LGE_INTER_SDC_E0156101 #if H_3D_INTER_SDC 105 102 , m_cInterSDCFlagSCModel ( 1, 1, NUM_INTER_SDC_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 106 103 , m_cInterSDCResidualSCModel ( 1, 1, NUM_INTER_SDC_RESIDUAL_CTX , m_contextModels + m_numContextModels, m_numContextModels) … … 179 176 #if H_3D_DIM_DMM 180 177 m_cDmm1DataSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_DMM1_DATA ); 181 #if !SEC_DMM2_E0146_HHIFIX182 m_cDmm2DataSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_DMM2_DATA );183 #endif184 178 m_cDmm3DataSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_DMM3_DATA ); 185 179 #endif … … 192 186 #endif 193 187 #endif 194 #if LGE_INTER_SDC_E0156188 #if H_3D_INTER_SDC 195 189 m_cInterSDCFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_INTER_SDC_FLAG ); 196 190 m_cInterSDCResidualSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_INTER_SDC_RESIDUAL ); … … 255 249 #if H_3D_DIM_DMM 256 250 m_cDmm1DataSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DMM1_DATA ); 257 #if !SEC_DMM2_E0146_HHIFIX258 m_cDmm2DataSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DMM2_DATA );259 #endif260 251 m_cDmm3DataSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DMM3_DATA ); 261 252 #endif … … 268 259 #endif 269 260 #endif 270 #if LGE_INTER_SDC_E0156261 #if H_3D_INTER_SDC 271 262 m_cInterSDCFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_INTER_SDC_FLAG ); 272 263 m_cInterSDCResidualSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_INTER_SDC_RESIDUAL ); … … 444 435 ruiTabIdx = uiIdx; 445 436 } 446 #if !SEC_DMM2_E0146_HHIFIX 447 Void TDecSbac::xParseDmm2Offset( Int& riOffset ) 448 { 449 Int iDeltaEnd = 0; 450 if( DMM2_DELTAEND_MAX > 0 ) 451 { 452 UInt uiFlag = 0; 453 m_pcTDecBinIf->decodeBin( uiFlag, m_cDmm2DataSCModel.get(0, 0, 0) ); 454 455 if( uiFlag ) 456 { 457 UInt uiAbsValMinus1; 458 UInt uiSymbol; 459 m_pcTDecBinIf->decodeBin( uiSymbol, m_cDmm2DataSCModel.get(0, 0, 0) ); uiAbsValMinus1 = uiSymbol; 460 m_pcTDecBinIf->decodeBin( uiSymbol, m_cDmm2DataSCModel.get(0, 0, 0) ); uiAbsValMinus1 |= uiSymbol << 1; 461 iDeltaEnd = uiAbsValMinus1 + 1; 462 UInt uiSign; 463 m_pcTDecBinIf->decodeBinEP( uiSign ); 464 if( uiSign ) 465 { 466 iDeltaEnd = -iDeltaEnd; 467 } 468 } 469 } 470 riOffset = iDeltaEnd; 471 } 472 #endif 437 473 438 Void TDecSbac::xParseDmm3WedgeIdx( UInt& ruiIntraIdx, Int iNumBit ) 474 439 { … … 1175 1140 pcCU->setDmmWedgeTabIdxSubParts( uiTabIdx, dimType, absPartIdx, depth ); 1176 1141 } break; 1177 #if !SEC_DMM2_E0146_HHIFIX1178 case( DMM2_IDX ):1179 {1180 Int iOffset = 0;1181 xParseDmm2Offset( iOffset );1182 pcCU->setDmm2DeltaEndSubParts( iOffset, absPartIdx, depth );1183 } break;1184 #endif1185 1142 case( DMM3_IDX ): 1186 1143 { … … 1250 1207 if( puIdx == 2 ) 1251 1208 { 1252 #if !LGE_SDC_REMOVE_DC_E01581253 while( binNum < 2 && symbol )1254 #endif1255 1209 { 1256 1210 ctxDepthMode = puIdx*3 + binNum; … … 1260 1214 } 1261 1215 if( modeCode == 0 ) { dir = PLANAR_IDX; sdcFlag = 1;} 1262 #if LGE_SDC_REMOVE_DC_E01581263 1216 else if( modeCode == 1 ) { dir = 0; sdcFlag = 0;} 1264 #else1265 else if( modeCode == 2 ) { dir = 0; sdcFlag = 0;}1266 else if( modeCode == 3 ) { dir = DC_IDX; sdcFlag = 1;}1267 #endif1268 1217 } 1269 1218 else if( puIdx == 0 ) … … 1283 1232 else 1284 1233 { 1285 #if ZJU_DEPTH_INTRA_MODE_E0204 1286 UInt maxBinNum = 0; 1287 m_pcTDecBinIf->decodeBinEP(symbol); 1288 if( symbol == 1 ) 1289 { 1290 maxBinNum = 3; 1291 } 1292 else 1293 { 1294 maxBinNum = 2; 1295 symbol = 1; 1296 } 1297 while( binNum<maxBinNum && symbol ) 1298 { 1299 ctxDepthMode = puIdx*3 + ( binNum >= 2 ? 2 : binNum ); 1300 m_pcTDecBinIf->decodeBin(symbol,m_cDepthIntraModeSCModel.get(0,0,ctxDepthMode)); 1301 modeCode = (modeCode<<1)+symbol; 1302 binNum++; 1303 } 1304 if( maxBinNum == 3 ) 1305 { 1306 if ( modeCode == 0 ) { dir = PLANAR_IDX; sdcFlag = 1;} 1307 else if ( modeCode == 2 ) { dir = (2* RBC_IDX+DIM_OFFSET); sdcFlag = 0;} 1308 else if ( modeCode == 6 ) { dir = (2*DMM3_IDX+DIM_OFFSET); sdcFlag = 0;} 1309 else if ( modeCode == 7 ) { dir = (2*DMM1_IDX+DIM_OFFSET); sdcFlag = 0;} 1310 } 1311 else 1312 { 1313 if ( modeCode == 0 ) { dir = 5; sdcFlag = 0;} 1314 else if ( modeCode == 2 ) { dir = (2*DMM1_IDX+DIM_OFFSET); sdcFlag = 1;} 1315 else if ( modeCode == 3 ) { dir = (2*DMM4_IDX+DIM_OFFSET); sdcFlag = 0;} 1316 } 1317 #else 1318 ctxDepthMode = puIdx*3 ; 1319 m_pcTDecBinIf->decodeBin( symbol, m_cDepthIntraModeSCModel.get(0,0,ctxDepthMode) ); 1320 modeCode = (modeCode<<1) + symbol; 1321 if( !symbol ) 1322 { 1323 ctxDepthMode = puIdx*3 + 1; 1324 m_pcTDecBinIf->decodeBin( symbol, m_cDepthIntraModeSCModel.get(0,0,ctxDepthMode) ); 1325 modeCode = (modeCode<<1) + symbol; 1326 if( symbol ) 1327 { 1328 ctxDepthMode = puIdx*3 + 2; 1329 m_pcTDecBinIf->decodeBin( symbol, m_cDepthIntraModeSCModel.get(0,0,ctxDepthMode) ); 1330 modeCode = (modeCode<<1) + symbol; 1331 } 1234 UInt maxBinNum = 0; 1235 m_pcTDecBinIf->decodeBinEP(symbol); 1236 if( symbol == 1 ) 1237 { 1238 maxBinNum = 3; 1332 1239 } 1333 1240 else 1334 1241 { 1335 ctxDepthMode = puIdx*3 + 1; 1336 m_pcTDecBinIf->decodeBin( symbol, m_cDepthIntraModeSCModel.get(0,0,ctxDepthMode) ); 1337 modeCode = (modeCode<<1) + symbol; 1338 if( !symbol ) 1339 { 1340 ctxDepthMode = puIdx*3 + 2; 1341 m_pcTDecBinIf->decodeBin( symbol, m_cDepthIntraModeSCModel.get(0,0,ctxDepthMode) ); 1342 modeCode = (modeCode<<1) + symbol; 1343 } 1344 else 1345 { 1346 binNum = 0; 1347 #if LGE_SDC_REMOVE_DC_E0158 1348 #if !SEC_DMM2_E0146_HHIFIX 1349 while( symbol && binNum < 2 ) 1350 #endif 1351 #else 1352 #if SEC_DMM2_E0146_HHIFIX 1353 while( symbol && binNum < 2 ) 1354 #else 1355 while( symbol && binNum < 3 ) 1356 #endif 1357 #endif 1358 { 1359 ctxDepthMode = puIdx*3 + 2; 1360 m_pcTDecBinIf->decodeBin( symbol, m_cDepthIntraModeSCModel.get(0,0,ctxDepthMode) ); 1361 modeCode = (modeCode<<1) + symbol; 1362 binNum++; 1363 } 1364 } 1365 } 1366 if( modeCode == 0 ) { dir = PLANAR_IDX; sdcFlag = 1;} 1367 else if( modeCode == 2 ) { dir = 5; sdcFlag = 0;} 1368 else if( modeCode == 3 ) { dir = (2*DMM1_IDX+DIM_OFFSET); sdcFlag = 1;} 1369 else if( modeCode == 4 ) { dir = (2*DMM1_IDX+DIM_OFFSET); sdcFlag = 0;} 1370 else if( modeCode == 5 ) { dir = (2*DMM4_IDX+DIM_OFFSET); sdcFlag = 0;} 1371 else if( modeCode == 6 ) { dir = (2*DMM3_IDX+DIM_OFFSET); sdcFlag = 0;} 1372 #if LGE_SDC_REMOVE_DC_E0158 1373 #if SEC_DMM2_E0146_HHIFIX 1374 else if( modeCode == 7 ) { dir = (2* RBC_IDX+DIM_OFFSET); sdcFlag = 0;} 1375 #else 1376 else if( modeCode == 14 ) { dir = (2* RBC_IDX+DIM_OFFSET); sdcFlag = 0;} 1377 else if( modeCode == 15 ) { dir = (2*DMM2_IDX+DIM_OFFSET); sdcFlag = 0;} 1378 #endif 1379 #else 1380 else if( modeCode == 14 ) { dir = DC_IDX; sdcFlag = 1;} 1381 #if SEC_DMM2_E0146_HHIFIX 1382 else if( modeCode == 15 ) { dir = (2* RBC_IDX+DIM_OFFSET); sdcFlag = 0;} 1383 #else 1384 else if( modeCode == 30 ) { dir = (2* RBC_IDX+DIM_OFFSET); sdcFlag = 0;} 1385 else if( modeCode == 31 ) { dir = (2*DMM2_IDX+DIM_OFFSET); sdcFlag = 0;} 1386 #endif 1387 #endif 1388 #endif 1242 maxBinNum = 2; 1243 symbol = 1; 1244 } 1245 while( binNum<maxBinNum && symbol ) 1246 { 1247 ctxDepthMode = puIdx*3 + ( binNum >= 2 ? 2 : binNum ); 1248 m_pcTDecBinIf->decodeBin(symbol,m_cDepthIntraModeSCModel.get(0,0,ctxDepthMode)); 1249 modeCode = (modeCode<<1)+symbol; 1250 binNum++; 1251 } 1252 if( maxBinNum == 3 ) 1253 { 1254 if ( modeCode == 0 ) { dir = PLANAR_IDX; sdcFlag = 1;} 1255 else if ( modeCode == 2 ) { dir = (2* RBC_IDX+DIM_OFFSET); sdcFlag = 0;} 1256 else if ( modeCode == 6 ) { dir = (2*DMM3_IDX+DIM_OFFSET); sdcFlag = 0;} 1257 else if ( modeCode == 7 ) { dir = (2*DMM1_IDX+DIM_OFFSET); sdcFlag = 0;} 1258 } 1259 else 1260 { 1261 if ( modeCode == 0 ) { dir = 5; sdcFlag = 0;} 1262 else if ( modeCode == 2 ) { dir = (2*DMM1_IDX+DIM_OFFSET); sdcFlag = 1;} 1263 else if ( modeCode == 3 ) { dir = (2*DMM4_IDX+DIM_OFFSET); sdcFlag = 0;} 1264 } 1389 1265 } 1390 1266 pcCU->setLumaIntraDirSubParts( (UChar)dir, absPartIdx, depth ); … … 2338 2214 #endif 2339 2215 2340 #if LGE_INTER_SDC_E01562216 #if H_3D_INTER_SDC 2341 2217 Void TDecSbac::parseInterSDCFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 2342 2218 {
Note: See TracChangeset for help on using the changeset viewer.