Changeset 1279 in 3DVCSoftware for branches/HTM-14.1-update-dev1/source/Lib/TLibDecoder/TDecSbac.cpp
- Timestamp:
- 15 Jul 2015, 14:57:32 (9 years ago)
- Location:
- branches/HTM-14.1-update-dev1
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-14.1-update-dev1
-
branches/HTM-14.1-update-dev1/source/Lib/TLibDecoder/TDecSbac.cpp
r1258 r1279 73 73 , m_cCUMergeFlagExtSCModel ( 1, 1, NUM_MERGE_FLAG_EXT_CTX , m_contextModels + m_numContextModels, m_numContextModels) 74 74 , m_cCUMergeIdxExtSCModel ( 1, 1, NUM_MERGE_IDX_EXT_CTX , m_contextModels + m_numContextModels, m_numContextModels) 75 #if H_3D_ARP75 #if NH_3D_ARP 76 76 , m_cCUPUARPWSCModel ( 1, 1, NUM_ARPW_CTX , m_contextModels + m_numContextModels, m_numContextModels) 77 77 #endif 78 #if H_3D_IC78 #if NH_3D_IC 79 79 , m_cCUICFlagSCModel ( 1, 1, NUM_IC_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 80 80 #endif … … 120 120 , m_cDdcFlagSCModel ( 1, 1, NUM_DDC_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 121 121 #endif 122 #if H_3D_DBBP122 #if NH_3D_DBBP 123 123 , m_cDBBPFlagSCModel ( 1, 1, DBBP_NUM_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 124 124 #endif … … 165 165 m_cCUMergeFlagExtSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_MERGE_FLAG_EXT ); 166 166 m_cCUMergeIdxExtSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_MERGE_IDX_EXT ); 167 #if H_3D_ARP167 #if NH_3D_ARP 168 168 m_cCUPUARPWSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_ARPW ); 169 169 #endif 170 #if H_3D_IC170 #if NH_3D_IC 171 171 m_cCUICFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_IC_FLAG ); 172 172 #endif … … 211 211 m_cDdcFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_DDC_FLAG ); 212 212 #endif 213 #if H_3D_DBBP213 #if NH_3D_DBBP 214 214 m_cDBBPFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_DBBP_FLAG ); 215 215 #endif … … 238 238 } 239 239 240 #if H_3D_ARP241 m_cCUPUARPWSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_ARPW );242 #endif243 #if H_3D_IC244 m_cCUICFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_IC_FLAG );245 #endif246 #if H_3D_DBBP247 m_cDBBPFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DBBP_FLAG );248 #endif249 240 250 241 … … 651 642 652 643 UInt uiSymbol; 653 #if H_3D_QTLPC644 #if NH_3D_QTLPC 654 645 Bool bParseSplitFlag = true; 655 646 Bool bLimQtPredFlag = pcCU->getPic()->getSlice(0)->getQtPredFlag(); … … 666 657 #endif 667 658 { 668 TComDataCU *pcTextureCU = pcTexture->getC U(pcCU->getAddr());659 TComDataCU *pcTextureCU = pcTexture->getCtu(pcCU->getCtuRsAddr()); 669 660 assert(pcTextureCU->getDepth(uiAbsPartIdx) >= uiDepth); 670 661 bParseSplitFlag = (pcTextureCU->getDepth(uiAbsPartIdx) > uiDepth); … … 681 672 DTRACE_CABAC_T( "\tSplitFlag\n" ) 682 673 #endif 683 #if H_3D_QTLPC674 #if NH_3D_QTLPC 684 675 } 685 676 else … … 713 704 assert ( pcCU->getSlice()->getSPS()->getLog2DiffMaxMinCodingBlockSize() == log2DiffMaxMinCodingBlockSize); 714 705 715 #if H_3D_QTLPC706 #if NH_3D_QTLPC 716 707 Bool bParsePartSize = true; 717 708 … … 732 723 #endif 733 724 { 734 TComDataCU *pcTextureCU = pcTexture->getC U(pcCU->getAddr());725 TComDataCU *pcTextureCU = pcTexture->getCtu(pcCU->getCtuRsAddr()); 735 726 assert(pcTextureCU->getDepth(uiAbsPartIdx) >= uiDepth); 736 727 if(pcTextureCU->getDepth(uiAbsPartIdx) == uiDepth ) … … 749 740 if ( pcCU->isIntra( uiAbsPartIdx ) ) 750 741 { 751 #if H_3D_QTLPC742 #if NH_3D_QTLPC 752 743 if(bParsePartSize) 753 744 { … … 762 753 } 763 754 eMode = uiSymbol ? SIZE_2Nx2N : SIZE_NxN; 764 #if H_3D_QTLPC755 #if NH_3D_QTLPC 765 756 } 766 757 #endif … … 780 771 else 781 772 { 782 #if H_3D_QTLPC773 #if NH_3D_QTLPC 783 774 if(bParsePartSize) 784 775 { … … 824 815 } 825 816 } 826 #if H_3D_QTLPC817 #if NH_3D_QTLPC 827 818 } 828 819 else if(uiTexturePart == SIZE_2NxN || uiTexturePart == SIZE_2NxnU || uiTexturePart == SIZE_2NxnD) 829 820 { 830 821 UInt uiMaxNumBits = 1; 831 if ( pcCU->getSlice()->getSPS()->getAMPAcc( uiDepth ))822 if ( ( pcCU->getSlice()->getSPS()->getUseAMP() && uiDepth < log2DiffMaxMinCodingBlockSize ) && uiDepth < log2DiffMaxMinCodingBlockSize ) 832 823 { 833 824 uiMaxNumBits ++; … … 835 826 for ( UInt ui = 0; ui < uiMaxNumBits; ui++ ) 836 827 { 837 m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUPartSizeSCModel.get( 0, 0, ui) );828 m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUPartSizeSCModel.get( 0, 0, ui) RExt__DECODER_DEBUG_BIT_STATISTICS_PASS_OPT_ARG(ctype) ); 838 829 if ( uiSymbol ) 839 830 { … … 843 834 } 844 835 eMode = (PartSize) uiMode; 845 if(uiMode && pcCU->getSlice()->getSPS()->getAMPAcc( uiDepth) && uiSymbol==1 )836 if(uiMode && ( ( pcCU->getSlice()->getSPS()->getUseAMP() && uiDepth < log2DiffMaxMinCodingBlockSize ) && uiDepth < log2DiffMaxMinCodingBlockSize ) && uiSymbol==1 ) 846 837 { 847 838 eMode = SIZE_2NxN; 848 839 } 849 else if (uiMode && pcCU->getSlice()->getSPS()->getAMPAcc( uiDepth )==0&& uiSymbol==0)840 else if (uiMode && (( ( pcCU->getSlice()->getSPS()->getUseAMP() && uiDepth < log2DiffMaxMinCodingBlockSize ) && uiDepth < log2DiffMaxMinCodingBlockSize )==0) && uiSymbol==0) 850 841 { 851 842 eMode = SIZE_2NxN; 852 843 } 853 else if (uiMode && pcCU->getSlice()->getSPS()->getAMPAcc( uiDepth) && uiSymbol==0)854 { 855 m_pcTDecBinIf->decodeBinEP(uiSymbol );844 else if (uiMode && ( ( pcCU->getSlice()->getSPS()->getUseAMP() && uiDepth < log2DiffMaxMinCodingBlockSize ) && uiDepth < log2DiffMaxMinCodingBlockSize ) && uiSymbol==0) 845 { 846 m_pcTDecBinIf->decodeBinEP(uiSymbol RExt__DECODER_DEBUG_BIT_STATISTICS_PASS_OPT_ARG(ctype)); 856 847 eMode = (uiSymbol == 0? SIZE_2NxnU : SIZE_2NxnD); 857 848 } … … 860 851 { 861 852 UInt uiMaxNumBits = 1; 862 if ( pcCU->getSlice()->getSPS()->getAMPAcc( uiDepth ) )853 if ( ( pcCU->getSlice()->getSPS()->getUseAMP() && uiDepth < log2DiffMaxMinCodingBlockSize ) && uiDepth < log2DiffMaxMinCodingBlockSize ) 863 854 { 864 855 uiMaxNumBits ++; … … 866 857 for ( UInt ui = 0; ui < uiMaxNumBits; ui++ ) 867 858 { 868 m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUPartSizeSCModel.get( 0, 0, ui) );859 m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUPartSizeSCModel.get( 0, 0, ui) RExt__DECODER_DEBUG_BIT_STATISTICS_PASS_OPT_ARG(ctype)); 869 860 if ( uiSymbol ) 870 861 { … … 874 865 } 875 866 eMode = (PartSize) uiMode; 876 if(uiMode && pcCU->getSlice()->getSPS()->getAMPAcc( uiDepth) && uiSymbol==1 )867 if(uiMode && ( ( pcCU->getSlice()->getSPS()->getUseAMP() && uiDepth < log2DiffMaxMinCodingBlockSize ) && uiDepth < log2DiffMaxMinCodingBlockSize ) && uiSymbol==1 ) 877 868 { 878 869 eMode = SIZE_Nx2N; 879 870 } 880 else if (uiMode && pcCU->getSlice()->getSPS()->getAMPAcc( uiDepth )==0&& uiSymbol==0)871 else if (uiMode && (( ( pcCU->getSlice()->getSPS()->getUseAMP() && uiDepth < log2DiffMaxMinCodingBlockSize ) && uiDepth < log2DiffMaxMinCodingBlockSize )==0) && uiSymbol==0) 881 872 { 882 873 eMode = SIZE_Nx2N; 883 874 } 884 else if (uiMode && pcCU->getSlice()->getSPS()->getAMPAcc( uiDepth) && uiSymbol==0)885 { 886 m_pcTDecBinIf->decodeBinEP(uiSymbol );875 else if (uiMode && ( ( pcCU->getSlice()->getSPS()->getUseAMP() && uiDepth < log2DiffMaxMinCodingBlockSize ) && uiDepth < log2DiffMaxMinCodingBlockSize ) && uiSymbol==0) 876 { 877 m_pcTDecBinIf->decodeBinEP(uiSymbol RExt__DECODER_DEBUG_BIT_STATISTICS_PASS_OPT_ARG(ctype)); 887 878 eMode = (uiSymbol == 0? SIZE_nLx2N : SIZE_nRx2N); 888 879 } … … 896 887 DTRACE_CU("part_mode", eMode ) 897 888 #endif 898 #if H_3D_QTLPC889 #if NH_3D_QTLPC 899 890 } 900 891 #endif … … 2278 2269 } 2279 2270 2280 #if H_3D_ARP2271 #if NH_3D_ARP 2281 2272 Void TDecSbac::parseARPW( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 2282 2273 { 2283 UInt uiMaxW = pcCU->getSlice()->getARPStepNum() - 1;2284 2274 UInt uiW = 0; 2285 2275 UInt uiOffset = pcCU->getCTXARPWFlag(uiAbsPartIdx); 2286 2276 UInt uiCode = 0; 2287 2277 2288 assert ( uiMaxW > 0 ); 2289 2290 m_pcTDecBinIf->decodeBin( uiCode , m_cCUPUARPWSCModel.get( 0, 0, 0 + uiOffset ) ); 2278 m_pcTDecBinIf->decodeBin( uiCode , m_cCUPUARPWSCModel.get( 0, 0, 0 + uiOffset ) RExt__DECODER_DEBUG_BIT_STATISTICS_PASS_OPT_ARG(STATS__CABAC_BITS__ARP_FLAG)); 2291 2279 2292 2280 uiW = uiCode; 2293 2281 if( 1 == uiW ) 2294 2282 { 2295 m_pcTDecBinIf->decodeBin( uiCode , m_cCUPUARPWSCModel.get( 0, 0, 2 ) );2283 m_pcTDecBinIf->decodeBin( uiCode , m_cCUPUARPWSCModel.get( 0, 0, 2 ) RExt__DECODER_DEBUG_BIT_STATISTICS_PASS_OPT_ARG(STATS__CABAC_BITS__ARP_FLAG)); 2296 2284 uiW += ( 1 == uiCode ? 1 : 0 ); 2297 2285 } … … 2303 2291 #endif 2304 2292 2305 #if H_3D_IC2293 #if NH_3D_IC 2306 2294 /** parse illumination compensation flag 2307 2295 * \param pcCU … … 2313 2301 { 2314 2302 UInt uiSymbol = 0; 2315 m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUICFlagSCModel.get( 0, 0, 0 ) ); 2303 m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUICFlagSCModel.get( 0, 0, 0 ) RExt__DECODER_DEBUG_BIT_STATISTICS_PASS_OPT_ARG(STATS__CABAC_BITS__3D_IC) ); 2304 2316 2305 #if !H_MV_ENC_DEC_TRAC 2317 2306 DTRACE_CABAC_VL( g_nSymbolCounter++ ); … … 2523 2512 #endif 2524 2513 2525 #if H_3D_DBBP2514 #if NH_3D_DBBP 2526 2515 Void TDecSbac::parseDBBPFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 2527 2516 { … … 2531 2520 UInt uiSymbol = 0; 2532 2521 2533 m_pcTDecBinIf->decodeBin( uiSymbol, m_cDBBPFlagSCModel.get( 0, 0, 0 ) );2522 m_pcTDecBinIf->decodeBin( uiSymbol, m_cDBBPFlagSCModel.get( 0, 0, 0 ) RExt__DECODER_DEBUG_BIT_STATISTICS_PASS_OPT_ARG(STATS__CABAC_BITS__DBBP_FLAG) ); 2534 2523 DTRACE_CU("dbbp_flag", uiSymbol) 2535 2524 PartSize ePartSize = pcCU->getPartitionSize( uiAbsPartIdx ); 2536 2525 AOF( ePartSize == SIZE_2NxN || ePartSize == SIZE_Nx2N ); 2537 UInt uiPUOffset = ( g_auiPUOffset[UInt( ePartSize )] << ( ( pcCU->getSlice()->getSPS()->getMax CUDepth() - uiDepth ) << 1 ) ) >> 4;2526 UInt uiPUOffset = ( g_auiPUOffset[UInt( ePartSize )] << ( ( pcCU->getSlice()->getSPS()->getMaxTotalCUDepth() - uiDepth ) << 1 ) ) >> 4; 2538 2527 pcCU->setDBBPFlagSubParts(uiSymbol, uiAbsPartIdx, 0, uiDepth); 2539 2528 pcCU->setDBBPFlagSubParts(uiSymbol, uiAbsPartIdx+uiPUOffset, 1, uiDepth);
Note: See TracChangeset for help on using the changeset viewer.