Changeset 539 in 3DVCSoftware for branches/HTM-DEV-0.3-dev2/source/Lib/TLibDecoder
- Timestamp:
- 19 Jul 2013, 17:02:35 (11 years ago)
- Location:
- branches/HTM-DEV-0.3-dev2/source/Lib/TLibDecoder
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-DEV-0.3-dev2/source/Lib/TLibDecoder/TDecCAVLC.cpp
r537 r539 734 734 } 735 735 } 736 } 736 } 737 738 #if H_3D_QTLPC 739 if( depthFlag ) 740 { 741 READ_FLAG( uiCode, "use_qtl_flag" ); 742 pcSPS->setUseQTL( uiCode ); 743 READ_FLAG( uiCode, "use_pc_flag" ); 744 pcSPS->setUsePC( uiCode ); 745 } 746 #endif 737 747 738 748 //// sps_extension_vui_parameters( ) END -
branches/HTM-DEV-0.3-dev2/source/Lib/TLibDecoder/TDecSbac.cpp
r537 r539 821 821 return; 822 822 } 823 823 824 824 UInt uiSymbol; 825 m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUSplitFlagSCModel.get( 0, 0, pcCU->getCtxSplitFlag( uiAbsPartIdx, uiDepth ) ) ); 825 826 #if H_3D_QTLPC 827 Bool bParseSplitFlag = true; 828 829 TComSPS *sps = pcCU->getPic()->getSlice(0)->getSPS(); 830 TComPic *pcTexture = pcCU->getSlice()->getTexturePic(); 831 Bool bDepthMapDetect = (pcTexture != NULL); 832 Bool bIntraSliceDetect = (pcCU->getSlice()->getSliceType() == I_SLICE); 833 834 Bool rapPic = (pcCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_W_RADL || pcCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_N_LP || pcCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA); 835 836 if(bDepthMapDetect && !bIntraSliceDetect && !rapPic && sps->getUseQTL() && sps->getUsePC()) 837 { 838 TComDataCU *pcTextureCU = pcTexture->getCU(pcCU->getAddr()); 839 assert(pcTextureCU->getDepth(uiAbsPartIdx) >= uiDepth); 840 bParseSplitFlag = (pcTextureCU->getDepth(uiAbsPartIdx) > uiDepth); 841 } 842 843 if(bParseSplitFlag) 844 { 845 #endif 846 m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUSplitFlagSCModel.get( 0, 0, pcCU->getCtxSplitFlag( uiAbsPartIdx, uiDepth ) ) ); 826 847 #if H_MV_ENC_DEC_TRAC 827 DTRACE_CU("split_cu_flag", uiSymbol);848 DTRACE_CU("split_cu_flag", uiSymbol); 828 849 #else 829 DTRACE_CABAC_VL( g_nSymbolCounter++ ) 830 DTRACE_CABAC_T( "\tSplitFlag\n" ) 850 DTRACE_CABAC_VL( g_nSymbolCounter++ ) 851 DTRACE_CABAC_T( "\tSplitFlag\n" ) 852 #endif 853 #if H_3D_QTLPC 854 } 855 else 856 { 857 uiSymbol = 0; 858 } 831 859 #endif 832 860 pcCU->setDepthSubParts( uiDepth + uiSymbol, uiAbsPartIdx ); … … 845 873 UInt uiSymbol, uiMode = 0; 846 874 PartSize eMode; 875 876 #if H_3D_QTLPC 877 Bool bParsePartSize = true; 878 TComSPS *sps = pcCU->getPic()->getSlice(0)->getSPS(); 879 TComPic *pcTexture = pcCU->getSlice()->getTexturePic(); 880 Bool bDepthMapDetect = (pcTexture != NULL); 881 Bool bIntraSliceDetect = (pcCU->getSlice()->getSliceType() == I_SLICE); 882 883 Bool rapPic = (pcCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_W_RADL || pcCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_N_LP || pcCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA); 884 885 if(bDepthMapDetect && !bIntraSliceDetect && !rapPic && sps->getUseQTL() && sps->getUsePC()) 886 { 887 TComDataCU *pcTextureCU = pcTexture->getCU(pcCU->getAddr()); 888 assert(pcTextureCU->getDepth(uiAbsPartIdx) >= uiDepth); 889 if (pcTextureCU->getDepth(uiAbsPartIdx) == uiDepth && pcTextureCU->getPartitionSize( uiAbsPartIdx ) != SIZE_NxN) 890 { 891 bParsePartSize = false; 892 eMode = SIZE_2Nx2N; 893 } 894 } 895 #endif 896 847 897 848 898 if ( pcCU->isIntra( uiAbsPartIdx ) ) 849 899 { 850 uiSymbol = 1; 851 if( uiDepth == g_uiMaxCUDepth - g_uiAddCUDepth ) 852 { 853 m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUPartSizeSCModel.get( 0, 0, 0) ); 900 #if H_3D_QTLPC 901 if(bParsePartSize) 902 { 903 #endif 904 uiSymbol = 1; 905 if( uiDepth == g_uiMaxCUDepth - g_uiAddCUDepth ) 906 { 907 m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUPartSizeSCModel.get( 0, 0, 0) ); 854 908 #if H_MV_ENC_DEC_TRAC 855 DTRACE_CU("part_mode", uiSymbol)909 DTRACE_CU("part_mode", uiSymbol) 856 910 #endif 857 } 858 eMode = uiSymbol ? SIZE_2Nx2N : SIZE_NxN; 911 } 912 eMode = uiSymbol ? SIZE_2Nx2N : SIZE_NxN; 913 #if H_3D_QTLPC 914 } 915 #endif 859 916 UInt uiTrLevel = 0; 860 917 UInt uiWidthInBit = g_aucConvertToBit[pcCU->getWidth(uiAbsPartIdx)]+2; … … 872 929 else 873 930 { 874 UInt uiMaxNumBits = 2; 875 if( uiDepth == g_uiMaxCUDepth - g_uiAddCUDepth && !( (g_uiMaxCUWidth>>uiDepth) == 8 && (g_uiMaxCUHeight>>uiDepth) == 8 ) ) 876 { 877 uiMaxNumBits ++; 878 } 879 for ( UInt ui = 0; ui < uiMaxNumBits; ui++ ) 880 { 881 m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUPartSizeSCModel.get( 0, 0, ui) ); 882 if ( uiSymbol ) 883 { 884 break; 885 } 886 uiMode++; 887 } 888 eMode = (PartSize) uiMode; 889 if ( pcCU->getSlice()->getSPS()->getAMPAcc( uiDepth ) ) 890 { 891 if (eMode == SIZE_2NxN) 892 { 893 m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUAMPSCModel.get( 0, 0, 0 )); 894 if (uiSymbol == 0) 931 #if H_3D_QTLPC 932 if(bParsePartSize) 933 { 934 #endif 935 UInt uiMaxNumBits = 2; 936 if( uiDepth == g_uiMaxCUDepth - g_uiAddCUDepth && !( (g_uiMaxCUWidth>>uiDepth) == 8 && (g_uiMaxCUHeight>>uiDepth) == 8 ) ) 937 { 938 uiMaxNumBits ++; 939 } 940 for ( UInt ui = 0; ui < uiMaxNumBits; ui++ ) 941 { 942 m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUPartSizeSCModel.get( 0, 0, ui) ); 943 if ( uiSymbol ) 895 944 { 896 m_pcTDecBinIf->decodeBinEP(uiSymbol); 897 eMode = (uiSymbol == 0? SIZE_2NxnU : SIZE_2NxnD); 945 break; 898 946 } 899 } 900 else if (eMode == SIZE_Nx2N) 901 { 902 m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUAMPSCModel.get( 0, 0, 0 )); 903 if (uiSymbol == 0) 947 uiMode++; 948 } 949 eMode = (PartSize) uiMode; 950 if ( pcCU->getSlice()->getSPS()->getAMPAcc( uiDepth ) ) 951 { 952 if (eMode == SIZE_2NxN) 904 953 { 905 m_pcTDecBinIf->decodeBinEP(uiSymbol); 906 eMode = (uiSymbol == 0? SIZE_nLx2N : SIZE_nRx2N); 954 m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUAMPSCModel.get( 0, 0, 0 )); 955 if (uiSymbol == 0) 956 { 957 m_pcTDecBinIf->decodeBinEP(uiSymbol); 958 eMode = (uiSymbol == 0? SIZE_2NxnU : SIZE_2NxnD); 959 } 907 960 } 908 } 909 } 961 else if (eMode == SIZE_Nx2N) 962 { 963 m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUAMPSCModel.get( 0, 0, 0 )); 964 if (uiSymbol == 0) 965 { 966 m_pcTDecBinIf->decodeBinEP(uiSymbol); 967 eMode = (uiSymbol == 0? SIZE_nLx2N : SIZE_nRx2N); 968 } 969 } 970 } 910 971 #if H_MV_ENC_DEC_TRAC 911 DTRACE_CU("part_mode", eMode ) 912 #endif 972 DTRACE_CU("part_mode", eMode ) 973 #endif 974 #if H_3D_QTLPC 975 } 976 #endif 913 977 } 914 978 pcCU->setPartSizeSubParts( eMode, uiAbsPartIdx, uiDepth );
Note: See TracChangeset for help on using the changeset viewer.