Changeset 1179 in 3DVCSoftware for trunk/source/Lib/TLibDecoder/TDecSbac.cpp
- Timestamp:
- 7 Apr 2015, 17:05:30 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/Lib/TLibDecoder/TDecSbac.cpp
r1133 r1179 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 4, ITU/ISO/IEC6 * Copyright (c) 2010-2015, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * … … 52 52 , m_cCUSplitFlagSCModel ( 1, 1, NUM_SPLIT_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels ) 53 53 , m_cCUSkipFlagSCModel ( 1, 1, NUM_SKIP_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 54 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 55 , m_cCUDISFlagSCModel ( 1, 1, NUM_DIS_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 56 , m_cCUDISTypeSCModel ( 1, 1, NUM_DIS_TYPE_CTX , m_contextModels + m_numContextModels, m_numContextModels) 57 #else 54 58 #if H_3D_SINGLE_DEPTH 55 59 , m_cCUSingleDepthFlagSCModel ( 1, 1, NUM_SINGLEDEPTH_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 56 60 , m_cSingleDepthValueSCModel ( 1, 1, NUM_SINGLE_DEPTH_VALUE_DATA_CTX , m_contextModels + m_numContextModels, m_numContextModels) 61 #endif 57 62 #endif 58 63 , m_cCUMergeFlagExtSCModel ( 1, 1, NUM_MERGE_FLAG_EXT_CTX , m_contextModels + m_numContextModels, m_numContextModels) … … 136 141 m_cCUSplitFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_SPLIT_FLAG ); 137 142 m_cCUSkipFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_SKIP_FLAG ); 143 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 144 m_cCUDISFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_DIS_FLAG ); 145 m_cCUDISTypeSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_DIS_TYPE ); 146 #else 138 147 #if H_3D_SINGLE_DEPTH 139 148 m_cCUSingleDepthFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_SINGLEDEPTH_FLAG ); 140 149 m_cSingleDepthValueSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_SINGLE_DEPTH_VALUE_DATA ); 150 #endif 141 151 #endif 142 152 m_cCUMergeFlagExtSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_MERGE_FLAG_EXT ); … … 207 217 m_cCUSplitFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SPLIT_FLAG ); 208 218 m_cCUSkipFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SKIP_FLAG ); 219 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 220 m_cCUDISFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DIS_FLAG ); 221 m_cCUDISTypeSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DIS_TYPE ); 222 #else 209 223 #if H_3D_SINGLE_DEPTH 210 224 m_cCUSingleDepthFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SINGLEDEPTH_FLAG ); 211 225 m_cSingleDepthValueSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SINGLE_DEPTH_VALUE_DATA ); 226 #endif 212 227 #endif 213 228 m_cCUMergeFlagExtSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_MERGE_FLAG_EXT ); … … 486 501 } 487 502 503 504 #if H_3D_DISABLE_CHROMA 505 if( pcCU->getSlice()->getSPS()->getChromaFormatIdc() != 0 ) 506 { 507 #endif 488 508 piPCMSample = pcCU->getPCMSampleCb() + uiChromaOffset; 489 509 uiWidth = pcCU->getWidth(uiAbsPartIdx)/2; … … 517 537 piPCMSample += uiWidth; 518 538 } 539 #if H_3D_DISABLE_CHROMA 540 } 541 #endif 542 519 543 520 544 m_pcTDecBinIf->start(); … … 570 594 #endif 571 595 } 596 597 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 598 Void TDecSbac::parseDIS( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 599 { 600 pcCU->setDISFlagSubParts( false, uiAbsPartIdx, uiDepth ); 601 UInt uiSymbol = 0; 602 m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUDISFlagSCModel.get( 0, 0, 0 ) ); 603 if( uiSymbol ) 604 { 605 pcCU->setDISFlagSubParts( true, uiAbsPartIdx, uiDepth ); 606 pcCU->setSkipFlagSubParts( false, uiAbsPartIdx, uiDepth ); 607 pcCU->setSDCFlagSubParts( false, uiAbsPartIdx, uiDepth ); 608 pcCU->setPredModeSubParts( MODE_INTRA, uiAbsPartIdx, uiDepth ); 609 pcCU->setPartSizeSubParts( SIZE_2Nx2N, uiAbsPartIdx, uiDepth ); 610 pcCU->setLumaIntraDirSubParts (DC_IDX, uiAbsPartIdx, uiDepth ); 611 pcCU->setSizeSubParts( g_uiMaxCUWidth>>uiDepth, g_uiMaxCUHeight>>uiDepth, uiAbsPartIdx, uiDepth ); 612 pcCU->setMergeFlagSubParts( false , uiAbsPartIdx, 0, uiDepth ); 613 pcCU->setTrIdxSubParts(0, uiAbsPartIdx, uiDepth); 614 pcCU->setCbfSubParts(0, 1, 1, uiAbsPartIdx, uiDepth); 615 616 UInt uiUnaryIdx = 0; 617 UInt uiNumCand = 4; 618 619 if ( uiNumCand > 1 ) 620 { 621 for( ; uiUnaryIdx < uiNumCand - 1; ++uiUnaryIdx ) 622 { 623 UInt uiSymbol2 = 0; 624 if ( uiUnaryIdx==0 ) 625 { 626 m_pcTDecBinIf->decodeBin( uiSymbol2, m_cCUDISTypeSCModel.get( 0, 0, 0 ) ); 627 } 628 else 629 { 630 m_pcTDecBinIf->decodeBinEP( uiSymbol2); 631 } 632 if( uiSymbol2 == 0 ) 633 { 634 break; 635 } 636 } 637 } 638 pcCU->setDISTypeSubParts(uiUnaryIdx, uiAbsPartIdx, 0, uiDepth); 639 } 640 } 641 #else 572 642 #if H_3D_SINGLE_DEPTH 573 643 Void TDecSbac::parseSingleDepthMode( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) … … 616 686 } 617 687 } 618 619 #endif 688 #endif 689 #endif 690 620 691 /** parse merge flag 621 692 * \param pcCU … … 1304 1375 DTRACE_CABAC_V( uiLog2TransformBlockSize ) 1305 1376 DTRACE_CABAC_T( "\n" ) 1377 #else 1378 DTRACE_TU("split_transform_flag", ruiSubdivFlag ) 1306 1379 #endif 1307 1380 } … … 1382 1455 DTRACE_CABAC_V( uiAbsPartIdx ) 1383 1456 DTRACE_CABAC_T( "\n" ) 1457 #else 1458 if ( eType == TEXT_CHROMA_U ) 1459 { 1460 DTRACE_TU("cbf_cb", uiSymbol ) 1461 } 1462 else if ( eType == TEXT_CHROMA_V ) 1463 { 1464 DTRACE_TU("cbf_cr", uiSymbol ) 1465 } 1466 else 1467 { 1468 DTRACE_TU("cbf_luma", uiSymbol ) 1469 } 1384 1470 #endif 1385 1471 … … 2105 2191 2106 2192 m_pcTDecBinIf->decodeBin( uiSymbol, m_cSDCFlagSCModel.get( 0, 0, uiCtxSDCFlag ) ); 2107 2193 DTRACE_CU("dc_only_flag", uiSymbol) 2108 2194 if( uiSymbol ) 2109 2195 { … … 2129 2215 2130 2216 m_pcTDecBinIf->decodeBin( uiSymbol, m_cDBBPFlagSCModel.get( 0, 0, 0 ) ); 2131 2217 DTRACE_CU("dbbp_flag", uiSymbol) 2132 2218 PartSize ePartSize = pcCU->getPartitionSize( uiAbsPartIdx ); 2133 2219 AOF( ePartSize == SIZE_2NxN || ePartSize == SIZE_Nx2N );
Note: See TracChangeset for help on using the changeset viewer.