Changeset 213 in 3DVCSoftware for branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibDecoder/TDecSbac.cpp
- Timestamp:
- 31 Dec 2012, 18:33:14 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibDecoder/TDecSbac.cpp
r193 r213 38 38 #include "TDecSbac.h" 39 39 40 #if RWTH_SDC_DLT_B0036 41 #define GetNumDepthValues() (pcCU->getSlice()->getSPS()->getNumDepthValues()) 42 #define GetBitsPerDepthValue() (pcCU->getSlice()->getSPS()->getBitsPerDepthValue()) 43 #endif 44 40 45 //! \ingroup TLibDecoder 41 46 //! \{ … … 52 57 , m_cCUSplitFlagSCModel ( 1, 1, NUM_SPLIT_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels ) 53 58 , m_cCUSkipFlagSCModel ( 1, 1, NUM_SKIP_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 59 #if LGE_ILLUCOMP_B0045 60 , m_cCUICFlagSCModel ( 1, 1, NUM_IC_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 61 #endif 54 62 , m_cCUMergeFlagExtSCModel ( 1, 1, NUM_MERGE_FLAG_EXT_CTX , m_contextModels + m_numContextModels, m_numContextModels) 55 63 , m_cCUMergeIdxExtSCModel ( 1, 1, NUM_MERGE_IDX_EXT_CTX , m_contextModels + m_numContextModels, m_numContextModels) … … 98 106 , m_cDmmDataSCModel ( 1, 1, NUM_DMM_DATA_CTX , m_contextModels + m_numContextModels, m_numContextModels) 99 107 #endif 100 #if LGE_EDGE_INTRA 108 #if LGE_EDGE_INTRA_A0070 101 109 , m_cEdgeIntraSCModel ( 1, 1, NUM_EDGE_INTRA_CTX , m_contextModels + m_numContextModels, m_numContextModels) 102 110 #if LGE_EDGE_INTRA_DELTA_DC 103 111 , m_cEdgeIntraDeltaDCSCModel ( 1, 1, NUM_EDGE_INTRA_DELTA_DC_CTX , m_contextModels + m_numContextModels, m_numContextModels) 104 112 #endif 113 #endif 114 #if RWTH_SDC_DLT_B0036 115 , m_cSDCFlagSCModel ( 1, 1, SDC_NUM_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 116 , m_cSDCResidualFlagSCModel ( 1, 2, SDC_NUM_RESIDUAL_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 117 , m_cSDCResidualSignFlagSCModel ( 1, 2, SDC_NUM_SIGN_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 118 , m_cSDCResidualSCModel ( 1, 2, SDC_NUM_RESIDUAL_CTX , m_contextModels + m_numContextModels, m_numContextModels) 119 , m_cSDCPredModeSCModel ( 1, 3, SDC_NUM_PRED_MODE_CTX , m_contextModels + m_numContextModels, m_numContextModels) 105 120 #endif 106 121 { … … 146 161 m_cCUSplitFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_SPLIT_FLAG ); 147 162 m_cCUSkipFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_SKIP_FLAG ); 163 #if LGE_ILLUCOMP_B0045 164 m_cCUICFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_IC_FLAG ); 165 #endif 148 166 m_cCUMergeFlagExtSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_MERGE_FLAG_EXT ); 149 167 m_cCUMergeIdxExtSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_MERGE_IDX_EXT ); … … 188 206 189 207 m_cCUTransSubdivFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_TRANS_SUBDIV_FLAG ); 190 #if LGE_EDGE_INTRA 208 #if LGE_EDGE_INTRA_A0070 191 209 m_cEdgeIntraSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_EDGE_INTRA ); 192 210 #if LGE_EDGE_INTRA_DELTA_DC … … 199 217 m_cDmmModeSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_DMM_MODE ); 200 218 m_cDmmDataSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_DMM_DATA ); 219 #endif 220 #if RWTH_SDC_DLT_B0036 221 m_cSDCFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_SDC_FLAG ); 222 m_cSDCResidualFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_SDC_RESIDUAL_FLAG ); 223 m_cSDCResidualSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_SDC_RESIDUAL ); 224 m_cSDCResidualSignFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_SDC_SIGN_FLAG ); 225 m_cSDCPredModeSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_SDC_PRED_MODE ); 201 226 #endif 202 227 … … 230 255 m_cCUSplitFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SPLIT_FLAG ); 231 256 m_cCUSkipFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SKIP_FLAG ); 257 #if LGE_ILLUCOMP_B0045 258 m_cCUICFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_IC_FLAG ); 259 #endif 232 260 m_cCUMergeFlagExtSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_MERGE_FLAG_EXT ); 233 261 m_cCUMergeIdxExtSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_MERGE_IDX_EXT ); … … 276 304 m_cDmmDataSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DMM_DATA ); 277 305 #endif 306 #if RWTH_SDC_DLT_B0036 307 m_cSDCFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SDC_FLAG ); 308 m_cSDCResidualFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SDC_RESIDUAL_FLAG ); 309 m_cSDCResidualSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SDC_RESIDUAL ); 310 m_cSDCResidualSignFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SDC_SIGN_FLAG ); 311 m_cSDCPredModeSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SDC_PRED_MODE ); 312 #endif 278 313 279 314 m_pcTDecBinIf->start(); … … 578 613 } 579 614 615 #if LGE_ILLUCOMP_B0045 616 /** parse illumination compensation flag 617 * \param pcCU 618 * \param uiAbsPartIdx 619 * \param uiDepth 620 * \returns Void 621 */ 622 Void TDecSbac::parseICFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 623 { 624 UInt uiSymbol = 0; 625 UInt uiCtxIC = pcCU->getCtxICFlag( uiAbsPartIdx ); 626 m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUICFlagSCModel.get( 0, 0, uiCtxIC ) ); 627 DTRACE_CABAC_VL( g_nSymbolCounter++ ); 628 DTRACE_CABAC_T( "\tICFlag" ); 629 DTRACE_CABAC_T( "\tuiCtxIC: "); 630 DTRACE_CABAC_V( uiCtxIC ); 631 DTRACE_CABAC_T( "\tuiSymbol: "); 632 DTRACE_CABAC_V( uiSymbol ); 633 DTRACE_CABAC_T( "\n"); 634 635 pcCU->setICFlagSubParts( uiSymbol ? true : false , uiAbsPartIdx, 0, uiDepth ); 636 } 637 #endif 638 580 639 #if FORCE_REF_VSP==1 581 640 Void TDecSbac::parseVspFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) … … 636 695 uiNumCand = pcCU->getSlice()->getMaxNumMergeCand(); 637 696 #if HHI_MPI 638 #if VSP_N 697 #if VSP_N & !MTK_UNCONSTRAINED_MVI_B0083 639 698 TComDataCU* pcTextCU = pcCU->getSlice()->getSPS()->getUseMVI() ? pcCU->getSlice()->getTexturePic()->getCU( pcCU->getAddr() ) : NULL; 640 699 Int aiRefIdxVsp[2] = { pcTextCU ? pcTextCU->getCUMvField( RefPicList(0) )->getRefIdx( uiAbsPartIdx ) : -1, … … 652 711 : pcCU->getSlice()->getSPS()->getUseMVI() && pcCU->getSlice()->getSliceType() != I_SLICE; 653 712 #endif 713 #else 714 const Bool bMVIAvailable = pcCU->getSlice()->getSPS()->getUseMVI() && pcCU->getSlice()->getSliceType() != I_SLICE; 654 715 #endif 655 716 const UInt uiMviMergePos = bMVIAvailable ? HHI_MPI_MERGE_POS : uiNumCand; … … 735 796 736 797 UInt uiSymbol; 737 m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUSplitFlagSCModel.get( 0, 0, pcCU->getCtxSplitFlag( uiAbsPartIdx, uiDepth ) ) ); 738 DTRACE_CABAC_VL( g_nSymbolCounter++ ) 739 DTRACE_CABAC_T( "\tSplitFlag\n" ) 798 799 #if OL_QTLIMIT_PREDCODING_B0068 800 Bool bParseSplitFlag = true; 801 802 TComSPS *sps = pcCU->getPic()->getSlice(0)->getSPS(); 803 TComPic *pcTexture = pcCU->getSlice()->getTexturePic(); 804 Bool bDepthMapDetect = (pcTexture != NULL); 805 Bool bIntraSliceDetect = (pcCU->getSlice()->getSliceType() == I_SLICE); 806 807 if(bDepthMapDetect && !bIntraSliceDetect && sps->getUseQTLPC()) 808 { 809 TComDataCU *pcTextureCU = pcTexture->getCU(pcCU->getAddr()); 810 assert(pcTextureCU->getDepth(uiAbsPartIdx) >= uiDepth); 811 bParseSplitFlag = (pcTextureCU->getDepth(uiAbsPartIdx) > uiDepth); 812 } 813 814 if(bParseSplitFlag) 815 { 816 #endif 817 m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUSplitFlagSCModel.get( 0, 0, pcCU->getCtxSplitFlag( uiAbsPartIdx, uiDepth ) ) ); 818 DTRACE_CABAC_VL( g_nSymbolCounter++ ) 819 DTRACE_CABAC_T( "\tSplitFlag\n" ) 820 #if OL_QTLIMIT_PREDCODING_B0068 821 } 822 else 823 uiSymbol = 0; 824 #endif 825 740 826 pcCU->setDepthSubParts( uiDepth + uiSymbol, uiAbsPartIdx ); 741 827 … … 753 839 UInt uiSymbol, uiMode = 0; 754 840 PartSize eMode; 841 842 #if OL_QTLIMIT_PREDCODING_B0068 843 Bool bParsePartSize = true; 844 TComSPS *sps = pcCU->getPic()->getSlice(0)->getSPS(); 845 TComPic *pcTexture = pcCU->getSlice()->getTexturePic(); 846 Bool bDepthMapDetect = (pcTexture != NULL); 847 Bool bIntraSliceDetect = (pcCU->getSlice()->getSliceType() == I_SLICE); 848 849 if(bDepthMapDetect && !bIntraSliceDetect && sps->getUseQTLPC()) 850 { 851 TComDataCU *pcTextureCU = pcTexture->getCU(pcCU->getAddr()); 852 assert(pcTextureCU->getDepth(uiAbsPartIdx) >= uiDepth); 853 if (pcTextureCU->getDepth(uiAbsPartIdx) == uiDepth && pcTextureCU->getPartitionSize( uiAbsPartIdx ) != SIZE_NxN) 854 { 855 bParsePartSize = false; 856 eMode = SIZE_2Nx2N; 857 } 858 } 859 #endif 755 860 756 861 if ( pcCU->isIntra( uiAbsPartIdx ) ) 757 862 { 758 uiSymbol = 1; 759 if( uiDepth == g_uiMaxCUDepth - g_uiAddCUDepth ) 760 { 761 m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUPartSizeSCModel.get( 0, 0, 0) ); 762 } 763 eMode = uiSymbol ? SIZE_2Nx2N : SIZE_NxN; 863 #if OL_QTLIMIT_PREDCODING_B0068 864 if(bParsePartSize) 865 { 866 #endif 867 uiSymbol = 1; 868 if( uiDepth == g_uiMaxCUDepth - g_uiAddCUDepth ) 869 { 870 m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUPartSizeSCModel.get( 0, 0, 0) ); 871 } 872 eMode = uiSymbol ? SIZE_2Nx2N : SIZE_NxN; 873 #if OL_QTLIMIT_PREDCODING_B0068 874 } 875 #endif 764 876 UInt uiTrLevel = 0; 765 877 UInt uiWidthInBit = g_aucConvertToBit[pcCU->getWidth(uiAbsPartIdx)]+2; … … 777 889 else 778 890 { 779 UInt uiMaxNumBits = 2; 780 if( uiDepth == g_uiMaxCUDepth - g_uiAddCUDepth && !( pcCU->getSlice()->getSPS()->getDisInter4x4() && (g_uiMaxCUWidth>>uiDepth) == 8 && (g_uiMaxCUHeight>>uiDepth) == 8 ) ) 781 { 782 uiMaxNumBits ++; 783 } 784 for ( UInt ui = 0; ui < uiMaxNumBits; ui++ ) 785 { 786 m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUPartSizeSCModel.get( 0, 0, ui) ); 787 if ( uiSymbol ) 788 { 789 break; 790 } 791 uiMode++; 792 } 793 eMode = (PartSize) uiMode; 794 if ( pcCU->getSlice()->getSPS()->getAMPAcc( uiDepth ) ) 795 { 796 if (eMode == SIZE_2NxN) 797 { 891 #if OL_QTLIMIT_PREDCODING_B0068 892 if(bParsePartSize) 893 { 894 #endif 895 UInt uiMaxNumBits = 2; 896 if( uiDepth == g_uiMaxCUDepth - g_uiAddCUDepth && !( pcCU->getSlice()->getSPS()->getDisInter4x4() && (g_uiMaxCUWidth>>uiDepth) == 8 && (g_uiMaxCUHeight>>uiDepth) == 8 ) ) 897 { 898 uiMaxNumBits ++; 899 } 900 for ( UInt ui = 0; ui < uiMaxNumBits; ui++ ) 901 { 902 m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUPartSizeSCModel.get( 0, 0, ui) ); 903 if ( uiSymbol ) 904 { 905 break; 906 } 907 uiMode++; 908 } 909 eMode = (PartSize) uiMode; 910 if ( pcCU->getSlice()->getSPS()->getAMPAcc( uiDepth ) ) 911 { 912 if (eMode == SIZE_2NxN) 913 { 914 #if AMP_CTX 915 m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUAMPSCModel.get( 0, 0, 0 )); 916 #else 917 m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUYPosiSCModel.get( 0, 0, 0 )); 918 #endif 919 if (uiSymbol == 0) 920 { 921 #if AMP_CTX 922 m_pcTDecBinIf->decodeBinEP(uiSymbol); 923 #else 924 m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUYPosiSCModel.get( 0, 0, 1 )); 925 #endif 926 eMode = (uiSymbol == 0? SIZE_2NxnU : SIZE_2NxnD); 927 } 928 } 929 else if (eMode == SIZE_Nx2N) 930 { 798 931 #if AMP_CTX 799 932 m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUAMPSCModel.get( 0, 0, 0 )); 800 933 #else 801 m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUYPosiSCModel.get( 0, 0, 0 ));802 #endif 803 if (uiSymbol == 0)804 {934 m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUXPosiSCModel.get( 0, 0, 0 )); 935 #endif 936 if (uiSymbol == 0) 937 { 805 938 #if AMP_CTX 806 m_pcTDecBinIf->decodeBinEP(uiSymbol); 807 #else 808 m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUYPosiSCModel.get( 0, 0, 1 )); 809 #endif 810 eMode = (uiSymbol == 0? SIZE_2NxnU : SIZE_2NxnD); 939 m_pcTDecBinIf->decodeBinEP(uiSymbol); 940 #else 941 m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUXPosiSCModel.get( 0, 0, 1 )); 942 #endif 943 eMode = (uiSymbol == 0? SIZE_nLx2N : SIZE_nRx2N); 944 } 811 945 } 812 946 } 813 else if (eMode == SIZE_Nx2N) 814 { 815 #if AMP_CTX 816 m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUAMPSCModel.get( 0, 0, 0 )); 817 #else 818 m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUXPosiSCModel.get( 0, 0, 0 )); 819 #endif 820 if (uiSymbol == 0) 821 { 822 #if AMP_CTX 823 m_pcTDecBinIf->decodeBinEP(uiSymbol); 824 #else 825 m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUXPosiSCModel.get( 0, 0, 1 )); 826 #endif 827 eMode = (uiSymbol == 0? SIZE_nLx2N : SIZE_nRx2N); 828 } 829 } 830 } 947 #if OL_QTLIMIT_PREDCODING_B0068 948 } 949 #endif 831 950 } 832 951 pcCU->setPartSizeSubParts( eMode, uiAbsPartIdx, uiDepth ); … … 904 1023 #endif 905 1024 906 #if LGE_EDGE_INTRA 1025 #if LGE_EDGE_INTRA_A0070 907 1026 Bool bCodeEdgeIntra = false; 908 1027 if( pcCU->getSlice()->getSPS()->isDepth() ) … … 920 1039 #endif 921 1040 Int uiPredNum = pcCU->getIntraDirLumaPredictor(uiAbsPartIdx, uiPreds); 922 #if LGE_EDGE_INTRA 1041 #if LGE_EDGE_INTRA_A0070 923 1042 UInt uiCheckBit = 0; 924 1043 #endif … … 945 1064 946 1065 m_pcTDecBinIf->decodeBinsEP( uiSymbol, 5 ); 947 #if LGE_EDGE_INTRA 1066 #if LGE_EDGE_INTRA_A0070 948 1067 if (bCodeEdgeIntra) 949 1068 { … … 981 1100 } 982 1101 #endif 983 #if LGE_EDGE_INTRA 1102 #if LGE_EDGE_INTRA_A0070 984 1103 if ( intraPredMode != EDGE_INTRA_IDX) 985 1104 { … … 989 1108 intraPredMode += ( intraPredMode >= uiPreds[i] ); 990 1109 } 991 #if LGE_EDGE_INTRA 992 } 993 #endif 994 } 995 996 #if LGE_EDGE_INTRA 1110 #if LGE_EDGE_INTRA_A0070 1111 } 1112 #endif 1113 } 1114 1115 #if LGE_EDGE_INTRA_A0070 997 1116 if( intraPredMode == EDGE_INTRA_IDX ) 998 1117 { … … 2138 2257 #endif 2139 2258 2140 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX || (LGE_EDGE_INTRA && LGE_EDGE_INTRA_DELTA_DC)2259 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX || (LGE_EDGE_INTRA_A0070 && LGE_EDGE_INTRA_DELTA_DC) 2141 2260 Void TDecSbac::xReadExGolombLevel( UInt& ruiSymbol, ContextModel& rcSCModel ) 2142 2261 { … … 2397 2516 #endif 2398 2517 2399 #if LGE_EDGE_INTRA 2518 #if LGE_EDGE_INTRA_A0070 2400 2519 Void TDecSbac::xParseEdgeIntraInfo( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 2401 2520 { … … 2494 2613 } 2495 2614 #endif 2615 2616 #if RWTH_SDC_DLT_B0036 2617 Void TDecSbac::parseSDCFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 2618 { 2619 assert( pcCU->getSlice()->getSPS()->isDepth() ); 2620 2621 UInt uiSymbol = 0; 2622 UInt uiCtxSDCFlag = pcCU->getCtxSDCFlag( uiAbsPartIdx ); 2623 m_pcTDecBinIf->decodeBin( uiSymbol, m_cSDCFlagSCModel.get( 0, 0, uiCtxSDCFlag ) ); 2624 2625 if( uiSymbol == 1 ) 2626 { 2627 pcCU->setPartSizeSubParts(SIZE_2Nx2N, uiAbsPartIdx, uiDepth); 2628 2629 pcCU->setSDCFlagSubParts( true, uiAbsPartIdx, 0, uiDepth); 2630 pcCU->setTrIdxSubParts(0, uiAbsPartIdx, uiDepth); 2631 pcCU->setCbfSubParts(1, 1, 1, uiAbsPartIdx, uiDepth); 2632 } 2633 } 2634 2635 Void TDecSbac::parseSDCPredMode( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 2636 { 2637 assert( pcCU->getSlice()->getSPS()->isDepth() ); 2638 assert( pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2Nx2N ); 2639 2640 assert( pcCU->getSDCFlag(uiAbsPartIdx) ); 2641 2642 UInt uiCtx = 0; 2643 2644 UInt uiMPModeIdx = 0; 2645 2646 for(Int i=0; i<RWTH_SDC_NUM_PRED_MODES-1; i++) 2647 { 2648 UInt uiIsMostProb = 0; 2649 m_pcTDecBinIf->decodeBin( uiIsMostProb, m_cSDCPredModeSCModel.get( 0, i, uiCtx ) ); 2650 2651 if ( uiIsMostProb == 1 ) 2652 break; 2653 2654 // else: get next most probable pred mode 2655 uiMPModeIdx = (uiMPModeIdx+1)%RWTH_SDC_NUM_PRED_MODES; 2656 } 2657 2658 Int intraPredMode = g_auiSDCPredModes[uiMPModeIdx]; 2659 2660 #if HHI_DMM_WEDGE_INTRA 2661 if( intraPredMode == DMM_WEDGE_FULL_IDX ) { xParseWedgeFullInfo ( pcCU, uiAbsPartIdx, uiDepth ); } 2662 if( intraPredMode == DMM_WEDGE_PREDDIR_IDX ) { xParseWedgePredDirInfo ( pcCU, uiAbsPartIdx, uiDepth ); } 2663 #endif 2664 2665 pcCU->setLumaIntraDirSubParts((UChar)intraPredMode, uiAbsPartIdx, uiDepth); 2666 } 2667 2668 Void TDecSbac::parseSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiSegment ) 2669 { 2670 assert( pcCU->getSlice()->getSPS()->isDepth() ); 2671 assert( pcCU->getSDCFlag(uiAbsPartIdx) ); 2672 assert( uiSegment < 2 ); 2673 2674 UInt uiResidual = 0; 2675 UInt uiBit = 0; 2676 UInt uiAbsIdx = 0; 2677 UInt uiSign = 0; 2678 Int iIdx = 0; 2679 2680 UInt uiMaxResidualBits = GetBitsPerDepthValue(); 2681 assert( uiMaxResidualBits <= g_uiBitDepth ); 2682 2683 m_pcTDecBinIf->decodeBin(uiResidual, m_cSDCResidualFlagSCModel.get( 0, uiSegment, 0 ) ); 2684 2685 if (uiResidual) 2686 { 2687 // decode residual sign bit 2688 m_pcTDecBinIf->decodeBin(uiSign, m_cSDCResidualSignFlagSCModel.get( 0, uiSegment, 0 ) ); 2689 2690 // decode residual magnitude 2691 for (Int i=0; i<uiMaxResidualBits; i++) 2692 { 2693 m_pcTDecBinIf->decodeBin(uiBit, m_cSDCResidualSCModel.get( 0, uiSegment, i ) ); 2694 uiAbsIdx |= uiBit << i; 2695 } 2696 2697 uiAbsIdx += 1; 2698 iIdx =(Int)(uiSign ? -1 : 1)*uiAbsIdx; 2699 } 2700 2701 pcCU->setSDCSegmentDCOffset(iIdx, uiSegment, uiAbsPartIdx); 2702 } 2703 #endif 2496 2704 2497 2705 //! \}
Note: See TracChangeset for help on using the changeset viewer.