Changeset 382 in 3DVCSoftware
- Timestamp:
- 7 May 2013, 10:29:53 (12 years ago)
- Location:
- branches/HTM-6.2-dev3-Qualcomm
- Files:
-
- 2 added
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-6.2-dev3-Qualcomm/source/Lib/TLibCommon/ContextTables.h
r332 r382 128 128 129 129 #if RWTH_SDC_DLT_B0036 130 #if PKU_QC_DEPTH_INTRA_UNI_D0195 131 #define DEPTH_MODE_NUM_FLAG_CTX 8 132 #define DMM_DELTA_NUM_FLAG_CTX 1 133 #else 130 134 #define SDC_NUM_FLAG_CTX 3 135 #endif 131 136 #define SDC_NUM_RESIDUAL_FLAG_CTX 1 132 137 #define SDC_NUM_SIGN_FLAG_CTX 1 … … 523 528 524 529 #if RWTH_SDC_DLT_B0036 530 #if PKU_QC_DEPTH_INTRA_UNI_D0195 531 static const UChar INIT_DEPTHMODE_FLAG[3][DEPTH_MODE_NUM_FLAG_CTX]= 532 { 533 {0, 0, 64, 0, CNU, 0, CNU, 0}, 534 {0, 64, 0, CNU, 0, CNU, 0, 0}, 535 {64, 0, CNU, 0, CNU, 0, 0, 0} 536 }; 537 static const UChar INIT_DMMDELTA_FLAG[3][DMM_DELTA_NUM_FLAG_CTX]= 538 { 539 {0}, 540 {0}, 541 {64} 542 }; 543 #else 525 544 static const Short INIT_SDC_FLAG[3][SDC_NUM_FLAG_CTX][2] = 526 545 { … … 535 554 } 536 555 }; 556 #endif 537 557 538 558 static const Short INIT_SDC_RESIDUAL_FLAG[3][3*SDC_NUM_RESIDUAL_FLAG_CTX][2] = -
branches/HTM-6.2-dev3-Qualcomm/source/Lib/TLibCommon/TComDataCU.cpp
r332 r382 2907 2907 } 2908 2908 2909 #if !PKU_QC_DEPTH_INTRA_UNI_D0195 2909 2910 UInt TComDataCU::getCtxSDCFlag( UInt uiAbsPartIdx ) 2910 2911 { … … 2923 2924 return uiCtx; 2924 2925 } 2926 #endif 2925 2927 2926 2928 Bool TComDataCU::getSDCAvailable( UInt uiAbsPartIdx ) -
branches/HTM-6.2-dev3-Qualcomm/source/Lib/TLibCommon/TComDataCU.h
r332 r382 808 808 Void setSDCFlagSubParts ( Bool bSDCFlag, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth ); 809 809 810 UInt getCtxSDCFlag ( UInt uiAbsPartIdx ); 810 #if !PKU_QC_DEPTH_INTRA_UNI_D0195 811 UInt getCtxSDCFlag ( UInt uiAbsPartIdx ); 812 #endif 811 813 812 814 Bool getSDCAvailable ( UInt uiAbsPartIdx ); -
branches/HTM-6.2-dev3-Qualcomm/source/Lib/TLibCommon/TypeDef.h
r379 r382 76 76 #define FIX_SDC_ENC_RD_WVSO_D0163 1 // JCT3V-D0163: fix for SDC encoder rd-cost (VSO -> WVSO) 77 77 78 #define PKU_QC_DEPTH_INTRA_UNI_D0195 1 // JCT3V-D0195: unified syntax table for depth intra coding tools 78 79 ///// ***** TMVP/AMVP ********* 79 80 #define TMVP_DEPTH_SWITCH 1 // JCT3V-B0092 additional encoder option only -
branches/HTM-6.2-dev3-Qualcomm/source/Lib/TLibDecoder/TDecCAVLC.cpp
r332 r382 2426 2426 2427 2427 #if RWTH_SDC_DLT_B0036 2428 #if !PKU_QC_DEPTH_INTRA_UNI_D0195 2428 2429 Void TDecCavlc::parseSDCFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 2429 2430 { … … 2434 2435 assert(0); 2435 2436 } 2437 #endif 2436 2438 Void TDecCavlc::parseSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPart ) 2437 2439 { -
branches/HTM-6.2-dev3-Qualcomm/source/Lib/TLibDecoder/TDecCAVLC.h
r332 r382 171 171 Void parseDFSvlc ( Int& riVal, const Char *pSymbolName ); 172 172 #if RWTH_SDC_DLT_B0036 173 Void parseSDCFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 173 #if !PKU_QC_DEPTH_INTRA_UNI_D0195 174 Void parseSDCFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 174 175 Void parseSDCPredMode ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 176 #endif 175 177 Void parseSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPart ); 176 178 #endif -
branches/HTM-6.2-dev3-Qualcomm/source/Lib/TLibDecoder/TDecEntropy.cpp
r332 r382 117 117 m_pcEntropyDecoderIf->parsePredMode( pcCU, uiAbsPartIdx, uiDepth ); 118 118 119 #if !PKU_QC_DEPTH_INTRA_UNI_D0195 119 120 #if RWTH_SDC_DLT_B0036 120 121 // if B-Slice, code SDC flag later … … 125 126 } 126 127 #endif 128 #endif 127 129 } 128 130 129 131 Void TDecEntropy::decodePartSize( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 130 132 { 133 #if !PKU_QC_DEPTH_INTRA_UNI_D0195 131 134 #if RWTH_SDC_DLT_B0036 132 135 if( !pcCU->getSlice()->isInterB() && pcCU->isIntra(uiAbsPartIdx) && pcCU->getSDCFlag(uiAbsPartIdx) ) … … 137 140 } 138 141 #endif 142 #endif 139 143 140 144 m_pcEntropyDecoderIf->parsePartSize( pcCU, uiAbsPartIdx, uiDepth ); 141 145 146 #if !PKU_QC_DEPTH_INTRA_UNI_D0195 142 147 #if RWTH_SDC_DLT_B0036 143 148 if( pcCU->getSlice()->isInterB() && pcCU->getSlice()->getSPS()->isDepth() && pcCU->isIntra(uiAbsPartIdx) ) … … 154 159 } 155 160 #endif 161 #endif 156 162 } 157 163 158 164 Void TDecEntropy::decodePredInfo ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, TComDataCU* pcSubCU ) 159 165 { 166 #if !PKU_QC_DEPTH_INTRA_UNI_D0195 160 167 #if RWTH_SDC_DLT_B0036 161 168 if( pcCU->getSDCFlag(uiAbsPartIdx) ) … … 164 171 return; 165 172 } 173 #endif 166 174 #endif 167 175 … … 178 186 decodeIntraDirModeLuma( pcCU, uiAbsPartIdx + uiPartOffset*2, uiDepth+1 ); 179 187 decodeIntraDirModeLuma( pcCU, uiAbsPartIdx + uiPartOffset*3, uiDepth+1 ); 188 #if PKU_QC_DEPTH_INTRA_UNI_D0195 189 if(!pcCU->getSDCFlag(uiAbsPartIdx)) 190 #endif 180 191 decodeIntraDirModeChroma( pcCU, uiAbsPartIdx, uiDepth ); 181 192 } … … 183 194 { 184 195 decodeIntraDirModeLuma ( pcCU, uiAbsPartIdx, uiDepth ); 196 #if PKU_QC_DEPTH_INTRA_UNI_D0195 197 if(!pcCU->getSDCFlag(uiAbsPartIdx)) 198 #endif 185 199 decodeIntraDirModeChroma( pcCU, uiAbsPartIdx, uiDepth ); 186 200 } … … 789 803 assert( pcCU->getCbf(uiAbsPartIdx, TEXT_CHROMA_U) == 1 ); 790 804 assert( pcCU->getCbf(uiAbsPartIdx, TEXT_CHROMA_V) == 1 ); 791 805 #if !PKU_QC_DEPTH_INTRA_UNI_D0195 792 806 decodeSDCResidualData(pcCU, uiAbsPartIdx, uiDepth); 807 #endif 793 808 return; 794 809 } … … 847 862 848 863 #if RWTH_SDC_DLT_B0036 864 #if !PKU_QC_DEPTH_INTRA_UNI_D0195 849 865 Void TDecEntropy::decodeSDCPredMode( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 850 866 { … … 861 877 m_pcEntropyDecoderIf->parseSDCFlag(pcCU, uiAbsPartIdx, uiDepth ); 862 878 } 863 879 #endif 864 880 Void TDecEntropy::decodeSDCResidualData( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 865 881 { -
branches/HTM-6.2-dev3-Qualcomm/source/Lib/TLibDecoder/TDecEntropy.h
r332 r382 137 137 138 138 #if RWTH_SDC_DLT_B0036 139 virtual Void parseSDCFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0; 139 #if !PKU_QC_DEPTH_INTRA_UNI_D0195 140 virtual Void parseSDCFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0; 140 141 virtual Void parseSDCPredMode ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0; 142 #endif 141 143 virtual Void parseSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPart ) = 0; 142 144 #endif … … 232 234 233 235 #if RWTH_SDC_DLT_B0036 236 #if !PKU_QC_DEPTH_INTRA_UNI_D0195 234 237 Void decodeSDCPredMode( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 235 238 Void decodeSDCFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 239 #endif 236 240 Void decodeSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 237 241 #endif -
branches/HTM-6.2-dev3-Qualcomm/source/Lib/TLibDecoder/TDecSbac.cpp
r354 r382 95 95 , m_cSaoTypeIdxSCModel ( 1, 1, NUM_SAO_TYPE_IDX_CTX , m_contextModels + m_numContextModels, m_numContextModels) 96 96 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX 97 #if !PKU_QC_DEPTH_INTRA_UNI_D0195 97 98 , m_cDmmFlagSCModel ( 1, 1, NUM_DMM_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 98 99 , m_cDmmModeSCModel ( 1, 1, NUM_DMM_MODE_CTX , m_contextModels + m_numContextModels, m_numContextModels) 100 #endif 99 101 , m_cDmmDataSCModel ( 1, 1, NUM_DMM_DATA_CTX , m_contextModels + m_numContextModels, m_numContextModels) 100 102 #endif … … 106 108 #endif 107 109 #if RWTH_SDC_DLT_B0036 110 #if !PKU_QC_DEPTH_INTRA_UNI_D0195 108 111 , m_cSDCFlagSCModel ( 1, 1, SDC_NUM_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 112 #else 113 , m_cDepthModeModel ( 1, 1, DEPTH_MODE_NUM_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 114 , m_cDmmDeltaFlagModel ( 1, 1, DMM_DELTA_NUM_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 115 #endif 109 116 , m_cSDCResidualFlagSCModel ( 1, 2, SDC_NUM_RESIDUAL_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 110 117 , m_cSDCResidualSignFlagSCModel ( 1, 2, SDC_NUM_SIGN_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) … … 200 207 m_uiLastDQpNonZero = 0; 201 208 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX 209 #if !PKU_QC_DEPTH_INTRA_UNI_D0195 202 210 m_cDmmFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_DMM_FLAG ); 203 211 m_cDmmModeSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_DMM_MODE ); 212 #endif 204 213 m_cDmmDataSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_DMM_DATA ); 205 214 #endif 206 215 #if RWTH_SDC_DLT_B0036 216 #if !PKU_QC_DEPTH_INTRA_UNI_D0195 207 217 m_cSDCFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_SDC_FLAG ); 218 #else 219 m_cDepthModeModel.initBuffer ( sliceType, qp, (UChar*)INIT_DEPTHMODE_FLAG ); 220 m_cDmmDeltaFlagModel.initBuffer ( sliceType, qp, (UChar*)INIT_DMMDELTA_FLAG ); 221 #endif 208 222 m_cSDCResidualFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_SDC_RESIDUAL_FLAG ); 209 223 m_cSDCResidualSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_SDC_RESIDUAL ); … … 279 293 m_cCUTransSubdivFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_TRANS_SUBDIV_FLAG ); 280 294 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX 295 #if !PKU_QC_DEPTH_INTRA_UNI_D0195 281 296 m_cDmmFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DMM_FLAG ); 282 297 m_cDmmModeSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DMM_MODE ); 298 #endif 283 299 m_cDmmDataSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DMM_DATA ); 284 300 #endif 285 301 #if RWTH_SDC_DLT_B0036 302 #if !PKU_QC_DEPTH_INTRA_UNI_D0195 286 303 m_cSDCFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SDC_FLAG ); 304 #else 305 m_cDepthModeModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DEPTHMODE_FLAG ); 306 m_cDmmDeltaFlagModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DMMDELTA_FLAG ); 307 #endif 287 308 m_cSDCResidualFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SDC_RESIDUAL_FLAG ); 288 309 m_cSDCResidualSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SDC_RESIDUAL ); … … 869 890 pcCU->setPredModeSubParts( (PredMode)iPredMode, uiAbsPartIdx, uiDepth ); 870 891 } 871 892 #if PKU_QC_DEPTH_INTRA_UNI_D0195 893 Void TDecSbac::parseDepthIntraMode ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 894 { 895 UInt uiPuIdx = ( pcCU->getWidth(uiAbsPartIdx) == 64 )? 2 : ( ( pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_NxN && pcCU->getWidth(uiAbsPartIdx) == 8 )? 0 : 1); 896 UInt uiDir = 0; 897 Bool bSDCFlag = 0; 898 UInt uiSymbol = 1; 899 UInt uiCode = 0 ; 900 UInt uiBinNum = 0; 901 UInt uiCtxDepthMode = 0; 902 if ( uiPuIdx ==2 ) 903 { 904 while(uiBinNum<2 && uiSymbol) 905 { 906 uiCtxDepthMode = uiPuIdx*3 + uiBinNum; 907 m_pcTDecBinIf->decodeBin(uiSymbol,m_cDepthModeModel.get(0,0,uiCtxDepthMode)); 908 uiCode = (uiCode<<1)+uiSymbol; 909 uiBinNum++; 910 } 911 if (uiCode == 0) { uiDir = PLANAR_IDX; bSDCFlag = 1;} 912 else if (uiCode == 2) { uiDir = 0; bSDCFlag = 0;} 913 else if (uiCode == 3) { uiDir = DC_IDX; bSDCFlag = 1;} 914 } 915 else if ( uiPuIdx ==0 ) 916 { 917 while(uiBinNum<3 && uiSymbol) 918 { 919 uiCtxDepthMode = uiPuIdx*3 + ( uiBinNum >= 2? 2 : uiBinNum ); 920 m_pcTDecBinIf->decodeBin(uiSymbol,m_cDepthModeModel.get(0,0,uiCtxDepthMode)); 921 uiCode = (uiCode<<1)+uiSymbol; 922 uiBinNum++; 923 } 924 if (uiCode == 0) { uiDir = 0; bSDCFlag = 0;} 925 else if (uiCode == 2) { uiDir = DMM_WEDGE_FULL_IDX; bSDCFlag = 0;} 926 else if (uiCode == 6) { uiDir = DMM_WEDGE_PREDTEX_IDX; bSDCFlag = 0;} 927 else if (uiCode == 7) { uiDir = EDGE_INTRA_IDX; bSDCFlag = 0;} 928 } 929 else 930 { 931 uiCtxDepthMode = uiPuIdx*3 ; 932 m_pcTDecBinIf->decodeBin(uiSymbol,m_cDepthModeModel.get(0,0,uiCtxDepthMode)); 933 uiCode = (uiCode<<1)+uiSymbol; 934 if (!uiSymbol) 935 { 936 uiCtxDepthMode = uiPuIdx*3 + 1; 937 m_pcTDecBinIf->decodeBin(uiSymbol,m_cDepthModeModel.get(0,0,uiCtxDepthMode)); 938 uiCode = (uiCode<<1)+uiSymbol; 939 if (uiSymbol) 940 { 941 uiCtxDepthMode = uiPuIdx*3 + 2; 942 m_pcTDecBinIf->decodeBin(uiSymbol,m_cDepthModeModel.get(0,0,uiCtxDepthMode)); 943 uiCode = (uiCode<<1)+uiSymbol; 944 } 945 } 946 else 947 { 948 uiCtxDepthMode = uiPuIdx*3 + 1; 949 m_pcTDecBinIf->decodeBin(uiSymbol,m_cDepthModeModel.get(0,0,uiCtxDepthMode)); 950 uiCode = (uiCode<<1)+uiSymbol; 951 if (!uiSymbol) 952 { 953 uiCtxDepthMode = uiPuIdx*3 + 2; 954 m_pcTDecBinIf->decodeBin(uiSymbol,m_cDepthModeModel.get(0,0,uiCtxDepthMode)); 955 uiCode = (uiCode<<1)+uiSymbol; 956 } 957 else 958 { 959 uiBinNum = 0; 960 while( uiSymbol && uiBinNum<3 ) 961 { 962 uiCtxDepthMode = uiPuIdx*3 + 2; 963 m_pcTDecBinIf->decodeBin(uiSymbol,m_cDepthModeModel.get(0,0,uiCtxDepthMode)); 964 uiCode = (uiCode<<1)+uiSymbol; 965 uiBinNum++; 966 } 967 } 968 } 969 if (uiCode == 0) { uiDir = PLANAR_IDX; bSDCFlag = 1;} 970 else if (uiCode == 2) { uiDir = 5; bSDCFlag = 0;} 971 else if (uiCode == 3) { uiDir = DMM_WEDGE_FULL_IDX; bSDCFlag = 1;} 972 else if (uiCode == 4) { uiDir = DMM_WEDGE_FULL_IDX; bSDCFlag = 0;} 973 else if (uiCode == 5) { uiDir = DMM_CONTOUR_PREDTEX_IDX; bSDCFlag = 0;} 974 else if (uiCode == 6) { uiDir = DMM_WEDGE_PREDTEX_IDX; bSDCFlag = 0;} 975 else if (uiCode == 14) { uiDir = DC_IDX; bSDCFlag = 1;} 976 else if (uiCode == 31) { uiDir = DMM_WEDGE_PREDDIR_IDX; bSDCFlag = 0;} 977 else if (uiCode == 30) { uiDir = EDGE_INTRA_IDX; bSDCFlag = 0;} 978 } 979 pcCU->setLumaIntraDirSubParts( (UChar)uiDir, uiAbsPartIdx, uiDepth ); 980 pcCU->setSDCFlagSubParts(bSDCFlag, uiAbsPartIdx, 0, uiDepth); 981 } 982 Void TDecSbac::parseDepthModelingTable ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 983 { 984 parseDepthIntraMode(pcCU,uiAbsPartIdx,uiDepth); 985 986 UInt uiDir = pcCU->getLumaIntraDir(uiAbsPartIdx); 987 Bool bSdcFlag = pcCU->getSDCAvailable(uiAbsPartIdx) && pcCU->getSDCFlag(uiAbsPartIdx); 988 Bool bDmmFlag = (uiDir >= NUM_INTRA_MODE && uiDir < EDGE_INTRA_IDX &&(!bSdcFlag))? 1:0; 989 if (uiDir >= NUM_INTRA_MODE && uiDir < EDGE_INTRA_IDX)//DMM modes and SDC DMM1 990 { 991 if( uiDir == DMM_WEDGE_FULL_IDX ) { xParseWedgeFullInfo ( pcCU, uiAbsPartIdx, uiDepth ); } 992 else if( uiDir == DMM_WEDGE_PREDTEX_IDX ) { xParseWedgePredTexInfo ( pcCU, uiAbsPartIdx, uiDepth ); } 993 else if( uiDir == DMM_WEDGE_PREDDIR_IDX ) { xParseWedgePredDirInfo ( pcCU, uiAbsPartIdx, uiDepth ); } 994 } 995 else if(uiDir >= EDGE_INTRA_IDX)//CCM mode 996 { 997 xParseEdgeIntraInfo( pcCU, uiAbsPartIdx, uiDepth ); 998 } 999 1000 UInt uiSymbol; 1001 if (bDmmFlag) 1002 { 1003 if (bDmmFlag) 1004 { 1005 m_pcTDecBinIf->decodeBin( uiSymbol , m_cDmmDeltaFlagModel.get(0, 0, 0) ); 1006 uiDir += uiSymbol; 1007 } 1008 if (uiSymbol) 1009 { 1010 UInt uiDC; 1011 Int iDC = 0,iDC1 = 0,iDC2 = 0; 1012 for ( Int i = 0; i <2; i++ ) 1013 { 1014 xReadExGolombLevel( uiDC, m_cDmmDataSCModel.get(0, 0, 1) ); 1015 iDC = uiDC; 1016 if ( uiDC ) 1017 { 1018 UInt uiSign; 1019 m_pcTDecBinIf->decodeBinEP( uiSign ); 1020 if ( uiSign ) 1021 { 1022 iDC = -iDC; 1023 } 1024 } 1025 if ( i == 0 ) { iDC1 = iDC; } 1026 else { iDC2 = iDC; } 1027 } 1028 1029 if( uiDir == DMM_WEDGE_FULL_D_IDX ) 1030 { 1031 pcCU->setWedgeFullDeltaDC1SubParts( iDC1, uiAbsPartIdx, uiDepth ); 1032 pcCU->setWedgeFullDeltaDC2SubParts( iDC2, uiAbsPartIdx, uiDepth ); 1033 } 1034 else if( uiDir == DMM_WEDGE_PREDDIR_D_IDX ) 1035 { 1036 pcCU->setWedgePredDirDeltaDC1SubParts( iDC1, uiAbsPartIdx, uiDepth ); 1037 pcCU->setWedgePredDirDeltaDC2SubParts( iDC2, uiAbsPartIdx, uiDepth ); 1038 } 1039 else if( uiDir == DMM_WEDGE_PREDTEX_D_IDX) 1040 { 1041 pcCU->setWedgePredTexDeltaDC1SubParts( iDC1, uiAbsPartIdx, uiDepth ); 1042 pcCU->setWedgePredTexDeltaDC2SubParts( iDC2, uiAbsPartIdx, uiDepth ); 1043 } 1044 else if (uiDir== DMM_CONTOUR_PREDTEX_D_IDX ) 1045 { 1046 pcCU->setContourPredTexDeltaDC1SubParts( iDC1, uiAbsPartIdx, uiDepth ); 1047 pcCU->setContourPredTexDeltaDC2SubParts( iDC2, uiAbsPartIdx, uiDepth ); 1048 } 1049 } 1050 } 1051 else if (uiDir >= EDGE_INTRA_IDX) 1052 { 1053 m_pcTDecBinIf->decodeBin( uiSymbol, m_cEdgeIntraDeltaDCSCModel.get(0, 0, 0) ); 1054 if( uiSymbol ) 1055 { 1056 uiDir = EDGE_INTRA_DELTA_IDX; 1057 Int iDeltaDC = 0,iDeltaDC0 = 0,iDeltaDC1 = 0; 1058 for (Int i = 0; i<2; i++) 1059 { 1060 xReadExGolombLevel( (UInt &) iDeltaDC, m_cEdgeIntraDeltaDCSCModel.get(0, 0, 1) ); 1061 if( iDeltaDC != 0 ) 1062 { 1063 UInt uiSign; 1064 m_pcTDecBinIf->decodeBinEP( uiSign ); 1065 if ( uiSign ) 1066 { 1067 iDeltaDC = -iDeltaDC; 1068 } 1069 } 1070 if ( i == 0 ) { iDeltaDC0 = iDeltaDC; } 1071 else { iDeltaDC1 = iDeltaDC; } 1072 } 1073 1074 pcCU->setEdgeDeltaDC0( uiAbsPartIdx, iDeltaDC0 ); 1075 pcCU->setEdgeDeltaDC1( uiAbsPartIdx, iDeltaDC1 ); 1076 } 1077 } 1078 else if(bSdcFlag)//SDC mode 1079 { 1080 assert(pcCU->getPartitionSize(uiAbsPartIdx)!=SIZE_NxN); 1081 pcCU->setTrIdxSubParts(0, uiAbsPartIdx, uiDepth); 1082 pcCU->setCbfSubParts(1, 1, 1, uiAbsPartIdx, uiDepth); 1083 1084 UInt uiNumSegments = ( uiDir == DC_IDX || uiDir == PLANAR_IDX )? 1 : 2; 1085 for (int uiSeg=0; uiSeg<uiNumSegments; uiSeg++) 1086 { 1087 parseSDCResidualData(pcCU, uiAbsPartIdx, uiDepth, uiSeg); 1088 } 1089 } 1090 1091 pcCU->setLumaIntraDirSubParts( (UChar)uiDir, uiAbsPartIdx, uiDepth ); 1092 } 1093 #endif 872 1094 Void TDecSbac::parseIntraDirLumaAng ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 873 1095 { 874 1096 UInt uiSymbol; 875 1097 Int intraPredMode; 876 1098 #if PKU_QC_DEPTH_INTRA_UNI_D0195 1099 if (pcCU->getSlice()->getSPS()->isDepth()) 1100 { 1101 parseDepthModelingTable(pcCU, uiAbsPartIdx, uiDepth); 1102 } 1103 if (pcCU->getLumaIntraDir(uiAbsPartIdx)<NUM_INTRA_MODE && !pcCU->getSDCFlag(uiAbsPartIdx)) 1104 { 1105 #else 877 1106 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX 878 1107 UInt uiFlag = 0; … … 928 1157 } 929 1158 #endif 930 1159 #endif 931 1160 Int uiPreds[3] = {-1, -1, -1}; 932 1161 Int uiPredNum = pcCU->getIntraDirLumaPredictor(uiAbsPartIdx, uiPreds); 1162 #if !PKU_QC_DEPTH_INTRA_UNI_D0195 933 1163 #if LGE_EDGE_INTRA_A0070 934 1164 UInt uiCheckBit = 0; 935 1165 #endif 1166 #endif 936 1167 937 1168 m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUIntraPredSCModel.get( 0, 0, 0) ); … … 953 1184 954 1185 m_pcTDecBinIf->decodeBinsEP( uiSymbol, 5 ); 1186 #if !PKU_QC_DEPTH_INTRA_UNI_D0195 955 1187 #if LGE_EDGE_INTRA_A0070 956 1188 if (bCodeEdgeIntra) … … 964 1196 } 965 1197 #endif 1198 #endif 966 1199 intraPredMode = uiSymbol; 967 1200 … … 979 1212 std::swap(uiPreds[1], uiPreds[2]); 980 1213 } 1214 #if !PKU_QC_DEPTH_INTRA_UNI_D0195 981 1215 #if LGE_EDGE_INTRA_A0070 982 1216 if ( intraPredMode != EDGE_INTRA_IDX) 983 1217 { 1218 #endif 984 1219 #endif 985 1220 for ( Int i = 0; i < uiPredNum; i++ ) … … 987 1222 intraPredMode += ( intraPredMode >= uiPreds[i] ); 988 1223 } 1224 #if !PKU_QC_DEPTH_INTRA_UNI_D0195 989 1225 #if LGE_EDGE_INTRA_A0070 990 1226 } 991 1227 #endif 992 } 993 1228 #endif 1229 } 1230 1231 #if !PKU_QC_DEPTH_INTRA_UNI_D0195 994 1232 #if LGE_EDGE_INTRA_A0070 995 1233 if( intraPredMode == EDGE_INTRA_IDX ) … … 1035 1273 } 1036 1274 #endif 1037 1038 1275 pcCU->setLumaIntraDirSubParts( (UChar)intraPredMode, uiAbsPartIdx, uiDepth ); 1276 #else 1277 pcCU->setLumaIntraDirSubParts( (UChar)intraPredMode, uiAbsPartIdx, uiDepth ); 1278 } 1279 #endif 1039 1280 } 1040 1281 … … 2335 2576 2336 2577 #if RWTH_SDC_DLT_B0036 2578 #if !PKU_QC_DEPTH_INTRA_UNI_D0195 2337 2579 Void TDecSbac::parseSDCFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 2338 2580 { … … 2388 2630 pcCU->setLumaIntraDirSubParts((UChar)intraPredMode, uiAbsPartIdx, uiDepth); 2389 2631 } 2632 #endif 2390 2633 2391 2634 Void TDecSbac::parseSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiSegment ) -
branches/HTM-6.2-dev3-Qualcomm/source/Lib/TLibDecoder/TDecSbac.h
r332 r382 120 120 121 121 #if RWTH_SDC_DLT_B0036 122 #if !PKU_QC_DEPTH_INTRA_UNI_D0195 122 123 Void parseSDCFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 123 124 Void parseSDCPredMode ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 125 #endif 124 126 Void parseSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPart ); 125 127 #endif … … 178 180 Void parsePartSize ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 179 181 Void parsePredMode ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 180 182 #if PKU_QC_DEPTH_INTRA_UNI_D0195 183 Void parseDepthIntraMode ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 184 Void parseDepthModelingTable( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 185 #endif 181 186 Void parseIntraDirLumaAng( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 182 187 … … 253 258 254 259 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX 260 #if !PKU_QC_DEPTH_INTRA_UNI_D0195 255 261 ContextModel3DBuffer m_cDmmFlagSCModel; 256 262 ContextModel3DBuffer m_cDmmModeSCModel; 263 #endif 257 264 ContextModel3DBuffer m_cDmmDataSCModel; 258 265 #endif … … 265 272 266 273 #if RWTH_SDC_DLT_B0036 274 #if !PKU_QC_DEPTH_INTRA_UNI_D0195 267 275 ContextModel3DBuffer m_cSDCFlagSCModel; 276 #else 277 ContextModel3DBuffer m_cDepthModeModel; 278 ContextModel3DBuffer m_cDmmDeltaFlagModel; 279 #endif 268 280 269 281 ContextModel3DBuffer m_cSDCResidualFlagSCModel; -
branches/HTM-6.2-dev3-Qualcomm/source/Lib/TLibEncoder/TEncCavlc.cpp
r332 r382 1406 1406 } 1407 1407 1408 Void TEncCavlc::codeIntraDirLumaAng( TComDataCU* pcCU, UInt uiAbsPartIdx ) 1408 Void TEncCavlc::codeIntraDirLumaAng( TComDataCU* pcCU, UInt uiAbsPartIdx 1409 #if PKU_QC_DEPTH_INTRA_UNI_D0195 1410 , Bool bSdcRD 1411 #endif 1412 ) 1409 1413 { 1410 1414 assert(0); … … 1884 1888 1885 1889 #if RWTH_SDC_DLT_B0036 1890 #if !PKU_QC_DEPTH_INTRA_UNI_D0195 1886 1891 Void TEncCavlc::codeSDCFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx ) 1887 1892 { 1888 1893 assert(0); 1889 1894 } 1890 1895 #endif 1891 1896 Void TEncCavlc::codeSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiSegment ) 1892 1897 { 1893 1898 assert(0); 1894 1899 } 1895 1900 #if !PKU_QC_DEPTH_INTRA_UNI_D0195 1896 1901 Void TEncCavlc::codeSDCPredMode ( TComDataCU* pcCU, UInt uiAbsPartIdx ) 1897 1902 { … … 1899 1904 } 1900 1905 #endif 1906 #endif 1901 1907 //! \} -
branches/HTM-6.2-dev3-Qualcomm/source/Lib/TLibEncoder/TEncCavlc.h
r332 r382 183 183 Void codeQtRootCbf ( TComDataCU* pcCU, UInt uiAbsPartIdx ); 184 184 185 Void codeIntraDirLumaAng( TComDataCU* pcCU, UInt uiAbsPartIdx ); 185 Void codeIntraDirLumaAng( TComDataCU* pcCU, UInt uiAbsPartIdx 186 #if PKU_QC_DEPTH_INTRA_UNI_D0195 187 , Bool bSdcRD = false 188 #endif 189 ); 186 190 187 191 Void codeIntraDirChroma( TComDataCU* pcCU, UInt uiAbsPartIdx ); … … 209 213 210 214 #if RWTH_SDC_DLT_B0036 215 #if !PKU_QC_DEPTH_INTRA_UNI_D0195 211 216 Void codeSDCFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx ); 217 #endif 212 218 Void codeSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiSegment ); 219 #if !PKU_QC_DEPTH_INTRA_UNI_D0195 213 220 Void codeSDCPredMode ( TComDataCU* pcCU, UInt uiAbsPartIdx ); 214 221 #endif 222 #endif 215 223 216 224 }; -
branches/HTM-6.2-dev3-Qualcomm/source/Lib/TLibEncoder/TEncEntropy.cpp
r332 r382 828 828 m_pcEntropyCoderIf->codePredMode( pcCU, uiAbsPartIdx ); 829 829 830 #if !PKU_QC_DEPTH_INTRA_UNI_D0195 830 831 #if RWTH_SDC_DLT_B0036 831 832 // if B-Slice, code SDC flag later … … 835 836 encodeSDCFlag(pcCU, uiAbsPartIdx, bRD); 836 837 } 838 #endif 837 839 #endif 838 840 } … … 876 878 } 877 879 } 880 #if !PKU_QC_DEPTH_INTRA_UNI_D0195 878 881 #if RWTH_SDC_DLT_B0036 879 882 if( !pcCU->getSlice()->isInterB() && pcCU->isIntra(uiAbsPartIdx) && pcCU->getSDCFlag(uiAbsPartIdx) ) … … 883 886 } 884 887 #endif 888 #endif 885 889 886 890 m_pcEntropyCoderIf->codePartSize( pcCU, uiAbsPartIdx, uiDepth ); 887 891 892 #if !PKU_QC_DEPTH_INTRA_UNI_D0195 888 893 #if RWTH_SDC_DLT_B0036 889 894 // code SDC flag now! … … 899 904 } 900 905 } 906 #endif 901 907 #endif 902 908 } … … 1179 1185 1180 1186 // Intra direction for Luma 1181 Void TEncEntropy::encodeIntraDirModeLuma ( TComDataCU* pcCU, UInt uiAbsPartIdx ) 1182 { 1183 m_pcEntropyCoderIf->codeIntraDirLumaAng( pcCU, uiAbsPartIdx ); 1187 Void TEncEntropy::encodeIntraDirModeLuma ( TComDataCU* pcCU, UInt uiAbsPartIdx 1188 #if PKU_QC_DEPTH_INTRA_UNI_D0195 1189 ,Bool bSdcRD 1190 #endif 1191 ) 1192 { 1193 m_pcEntropyCoderIf->codeIntraDirLumaAng( pcCU, uiAbsPartIdx 1194 #if PKU_QC_DEPTH_INTRA_UNI_D0195 1195 ,bSdcRD 1196 #endif 1197 ); 1184 1198 } 1185 1199 … … 1195 1209 } 1196 1210 1197 Void TEncEntropy::encodePredInfo( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD ) 1211 Void TEncEntropy::encodePredInfo( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD 1212 #if PKU_QC_DEPTH_INTRA_UNI_D0195 1213 ,Bool bSdcRD 1214 #endif 1215 ) 1198 1216 { 1199 1217 if( bRD ) … … 1202 1220 } 1203 1221 1222 #if !PKU_QC_DEPTH_INTRA_UNI_D0195 1204 1223 #if RWTH_SDC_DLT_B0036 1205 1224 if( pcCU->getSDCFlag(uiAbsPartIdx) ) … … 1208 1227 return; 1209 1228 } 1229 #endif 1210 1230 #endif 1211 1231 … … 1222 1242 encodeIntraDirModeLuma( pcCU, uiAbsPartIdx + uiPartOffset*2 ); 1223 1243 encodeIntraDirModeLuma( pcCU, uiAbsPartIdx + uiPartOffset*3 ); 1224 encodeIntraDirModeChroma( pcCU, uiAbsPartIdx, bRD ); 1244 #if PKU_QC_DEPTH_INTRA_UNI_D0195 1245 if(!pcCU->getSDCFlag(uiAbsPartIdx)) 1246 #endif 1247 encodeIntraDirModeChroma( pcCU, uiAbsPartIdx, bRD ); 1225 1248 } 1226 1249 else // if it is not NxN size, encode 1 intra directions 1227 1250 { 1228 encodeIntraDirModeLuma ( pcCU, uiAbsPartIdx ); 1229 encodeIntraDirModeChroma( pcCU, uiAbsPartIdx, bRD ); 1251 encodeIntraDirModeLuma ( pcCU, uiAbsPartIdx 1252 #if PKU_QC_DEPTH_INTRA_UNI_D0195 1253 ,bSdcRD 1254 #endif 1255 ); 1256 #if PKU_QC_DEPTH_INTRA_UNI_D0195 1257 if(!pcCU->getSDCFlag(uiAbsPartIdx)) 1258 #endif 1259 encodeIntraDirModeChroma( pcCU, uiAbsPartIdx, bRD ); 1230 1260 } 1231 1261 } … … 1417 1447 assert( pcCU->getCbf(uiAbsPartIdx, TEXT_CHROMA_U) == 1 ); 1418 1448 assert( pcCU->getCbf(uiAbsPartIdx, TEXT_CHROMA_V) == 1 ); 1419 1449 #if !PKU_QC_DEPTH_INTRA_UNI_D0195 1420 1450 encodeSDCResidualData(pcCU, uiAbsPartIdx); 1451 #endif 1421 1452 return; 1422 1453 } … … 1715 1746 1716 1747 #if RWTH_SDC_DLT_B0036 1748 #if !PKU_QC_DEPTH_INTRA_UNI_D0195 1717 1749 Void TEncEntropy::encodeSDCPredMode( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD ) 1718 1750 { … … 1734 1766 m_pcEntropyCoderIf->codeSDCFlag(pcCU, uiAbsPartIdx); 1735 1767 } 1736 1768 #endif 1737 1769 Void TEncEntropy::encodeSDCResidualData( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD ) 1738 1770 { -
branches/HTM-6.2-dev3-Qualcomm/source/Lib/TLibEncoder/TEncEntropy.h
r332 r382 123 123 124 124 #if RWTH_SDC_DLT_B0036 125 #if !PKU_QC_DEPTH_INTRA_UNI_D0195 125 126 virtual Void codeSDCFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx ) = 0; 127 #endif 126 128 virtual Void codeSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiSegment ) = 0; 129 #if !PKU_QC_DEPTH_INTRA_UNI_D0195 127 130 virtual Void codeSDCPredMode ( TComDataCU* pcCU, UInt uiAbsPartIdx ) = 0; 131 #endif 128 132 #endif 129 133 … … 133 137 virtual Void codeQtCbf ( TComDataCU* pcCU, UInt uiAbsPartIdx, TextType eType, UInt uiTrDepth ) = 0; 134 138 virtual Void codeQtRootCbf ( TComDataCU* pcCU, UInt uiAbsPartIdx ) = 0; 135 virtual Void codeIntraDirLumaAng( TComDataCU* pcCU, UInt uiAbsPartIdx ) = 0; 139 virtual Void codeIntraDirLumaAng( TComDataCU* pcCU, UInt uiAbsPartIdx 140 #if PKU_QC_DEPTH_INTRA_UNI_D0195 141 , Bool bSdcRD = false 142 #endif 143 ) = 0; 136 144 137 145 virtual Void codeIntraDirChroma( TComDataCU* pcCU, UInt uiAbsPartIdx ) = 0; … … 265 273 Void encodePartSize ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, Bool bRD = false ); 266 274 Void encodeIPCMInfo ( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD = false ); 267 Void encodePredInfo ( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD = false ); 268 Void encodeIntraDirModeLuma ( TComDataCU* pcCU, UInt uiAbsPartIdx ); 275 Void encodePredInfo ( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD = false 276 #if PKU_QC_DEPTH_INTRA_UNI_D0195 277 ,Bool bSdcRD = false 278 #endif 279 ); 280 Void encodeIntraDirModeLuma ( TComDataCU* pcCU, UInt uiAbsPartIdx 281 #if PKU_QC_DEPTH_INTRA_UNI_D0195 282 ,Bool bSdcRD = false 283 #endif 284 ); 269 285 270 286 Void encodeIntraDirModeChroma( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD = false ); … … 284 300 285 301 #if RWTH_SDC_DLT_B0036 302 #if !PKU_QC_DEPTH_INTRA_UNI_D0195 286 303 Void encodeSDCFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD = false ); 304 #endif 287 305 Void encodeSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD = false ); 306 #if !PKU_QC_DEPTH_INTRA_UNI_D0195 288 307 Void encodeSDCPredMode ( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD = false ); 308 #endif 289 309 #endif 290 310 -
branches/HTM-6.2-dev3-Qualcomm/source/Lib/TLibEncoder/TEncSbac.cpp
r354 r382 103 103 , m_cSaoTypeIdxSCModel ( 1, 1, NUM_SAO_TYPE_IDX_CTX , m_contextModels + m_numContextModels, m_numContextModels) 104 104 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX 105 #if !PKU_QC_DEPTH_INTRA_UNI_D0195 105 106 , m_cDmmFlagSCModel ( 1, 1, NUM_DMM_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 106 107 , m_cDmmModeSCModel ( 1, 1, NUM_DMM_MODE_CTX , m_contextModels + m_numContextModels, m_numContextModels) 108 #endif 107 109 , m_cDmmDataSCModel ( 1, 1, NUM_DMM_DATA_CTX , m_contextModels + m_numContextModels, m_numContextModels) 108 110 #endif … … 114 116 #endif 115 117 #if RWTH_SDC_DLT_B0036 118 #if !PKU_QC_DEPTH_INTRA_UNI_D0195 116 119 , m_cSDCFlagSCModel ( 1, 1, SDC_NUM_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 120 #else 121 , m_cDepthModeModel ( 1, 1, DEPTH_MODE_NUM_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 122 , m_cDmmDeltaFlagModel ( 1, 1, DMM_DELTA_NUM_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 123 #endif 117 124 , m_cSDCResidualFlagSCModel ( 1, 2, SDC_NUM_RESIDUAL_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 118 125 , m_cSDCResidualSignFlagSCModel ( 1, 2, SDC_NUM_SIGN_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) … … 187 194 m_cSaoTypeIdxSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SAO_TYPE_IDX ); 188 195 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX 196 #if !PKU_QC_DEPTH_INTRA_UNI_D0195 189 197 m_cDmmFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DMM_FLAG ); 190 198 m_cDmmModeSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DMM_MODE ); 199 #endif 191 200 m_cDmmDataSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DMM_DATA ); 192 201 #endif … … 198 207 #endif 199 208 #if RWTH_SDC_DLT_B0036 209 #if !PKU_QC_DEPTH_INTRA_UNI_D0195 200 210 m_cSDCFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SDC_FLAG ); 211 #else 212 m_cDepthModeModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DEPTHMODE_FLAG ); 213 m_cDmmDeltaFlagModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DMMDELTA_FLAG ); 214 #endif 201 215 m_cSDCResidualFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SDC_RESIDUAL_FLAG ); 202 216 m_cSDCResidualSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SDC_RESIDUAL ); … … 340 354 m_cSaoTypeIdxSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SAO_TYPE_IDX ); 341 355 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX 356 #if !PKU_QC_DEPTH_INTRA_UNI_D0195 342 357 m_cDmmFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DMM_FLAG ); 343 358 m_cDmmModeSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DMM_MODE ); 359 #endif 344 360 m_cDmmDataSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DMM_DATA ); 345 361 #endif 346 362 #if RWTH_SDC_DLT_B0036 363 #if !PKU_QC_DEPTH_INTRA_UNI_D0195 347 364 m_cSDCFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SDC_FLAG ); 365 #else 366 m_cDepthModeModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DEPTHMODE_FLAG ); 367 m_cDmmDeltaFlagModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DMMDELTA_FLAG ); 368 #endif 348 369 m_cSDCResidualFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SDC_RESIDUAL_FLAG ); 349 370 m_cSDCResidualSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SDC_RESIDUAL ); … … 542 563 } 543 564 544 565 #if PKU_QC_DEPTH_INTRA_UNI_D0195 566 Void TEncSbac::loadDepthMode( TEncSbac* pSrc) 567 { 568 m_pcBinIf->copyState( pSrc->m_pcBinIf ); 569 570 this->m_cDepthModeModel .copyFrom( &pSrc->m_cDepthModeModel ); 571 this->m_cDmmDeltaFlagModel .copyFrom( &pSrc->m_cDmmDeltaFlagModel ); 572 } 573 #endif 545 574 Void TEncSbac::store( TEncSbac* pDest) 546 575 { … … 966 995 } 967 996 #endif 968 969 Void TEncSbac::codeIntraDirLumaAng( TComDataCU* pcCU, UInt uiAbsPartIdx ) 997 #if PKU_QC_DEPTH_INTRA_UNI_D0195 998 Void TEncSbac::codeDepthIntraMode( TComDataCU* pcCU, UInt uiAbsPartIdx ) 999 { 1000 UInt uiCodeWordTable[3][9] = {{0, 0, 0, 2, 0,6, 0, 0, 7},{0, 2, 3, 4, 5, 6, 14, 31, 30},{0, 2, 0, 0, 0, 0, 3, 0, 0}}; 1001 UInt uiCodeWordLenTable[3][9] = {{0, 1, 0, 2, 0,3, 0, 0, 3},{2, 3, 3, 3, 3, 3, 4, 5, 5},{1, 2, 0, 0, 0, 0, 2, 0, 0}}; 1002 UInt uiDir = pcCU->getLumaIntraDir(uiAbsPartIdx); 1003 Bool bSdcFlag = pcCU->getSDCFlag(uiAbsPartIdx); 1004 UInt uiPuIdx = ( pcCU->getWidth(uiAbsPartIdx) == 64 )? 2 : ( ( pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_NxN && pcCU->getWidth(uiAbsPartIdx) == 8 ) ? 0 : 1 ); 1005 UInt uiCodeIdx = 0; 1006 if ( bSdcFlag ) 1007 { 1008 switch(uiDir) 1009 { 1010 case PLANAR_IDX: uiCodeIdx = 0; break; 1011 case DC_IDX: uiCodeIdx = 6; break; 1012 default: uiCodeIdx = 2; 1013 } 1014 } 1015 else if ( uiDir>=EDGE_INTRA_IDX ) 1016 { 1017 uiCodeIdx = 8; 1018 } 1019 else if ( uiDir<NUM_INTRA_MODE ) 1020 { 1021 uiCodeIdx = 1; 1022 } 1023 else 1024 { 1025 if (uiDir== DMM_WEDGE_FULL_IDX || uiDir==DMM_WEDGE_FULL_D_IDX ) {uiCodeIdx = 3;} 1026 if (uiDir== DMM_CONTOUR_PREDTEX_IDX|| uiDir==DMM_CONTOUR_PREDTEX_D_IDX) {uiCodeIdx = 4;} 1027 if (uiDir== DMM_WEDGE_PREDTEX_IDX || uiDir==DMM_WEDGE_PREDTEX_D_IDX ) {uiCodeIdx = 5;} 1028 if (uiDir== DMM_WEDGE_PREDDIR_IDX || uiDir==DMM_WEDGE_PREDDIR_D_IDX ) {uiCodeIdx = 7;} 1029 } 1030 //mode coding 1031 for (UInt i=0; i<uiCodeWordLenTable[uiPuIdx][uiCodeIdx]; i++) 1032 { 1033 UInt uiBit = uiCodeWordTable[uiPuIdx][uiCodeIdx] & ( 1<<(uiCodeWordLenTable[uiPuIdx][uiCodeIdx]-i-1) ); 1034 UInt uiCtxDepthMode = uiPuIdx*3 + ( i >= 2? 2 : i ); 1035 m_pcBinIf->encodeBin( uiBit!=0 , m_cDepthModeModel.get(0, 0, uiCtxDepthMode) ); 1036 } 1037 } 1038 Void TEncSbac::codeDepthModelingTable( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bSdcRD) 1039 { 1040 UInt uiDir = pcCU->getLumaIntraDir( uiAbsPartIdx ); 1041 Bool bSdcFlag = pcCU->getSDCFlag(uiAbsPartIdx); 1042 Bool bDmmFlag = (uiDir >= NUM_INTRA_MODE && uiDir < EDGE_INTRA_IDX &&(!bSdcFlag))? 1:0; 1043 1044 codeDepthIntraMode(pcCU,uiAbsPartIdx); 1045 1046 if (uiDir >= NUM_INTRA_MODE && uiDir < EDGE_INTRA_IDX )//DMM modes or SDC DMM1 1047 { 1048 assert(pcCU->getWidth(uiAbsPartIdx)<64); 1049 assert(pcCU->getWidth(uiAbsPartIdx)<64); 1050 if( uiDir == DMM_WEDGE_FULL_IDX || uiDir == DMM_WEDGE_FULL_D_IDX) { xCodeWedgeFullInfo ( pcCU, uiAbsPartIdx ); } 1051 else if( uiDir == DMM_WEDGE_PREDTEX_IDX || uiDir == DMM_WEDGE_PREDTEX_D_IDX ) { xCodeWedgePredTexInfo ( pcCU, uiAbsPartIdx ); } 1052 else if( uiDir == DMM_WEDGE_PREDDIR_IDX || uiDir == DMM_WEDGE_PREDDIR_D_IDX) { xCodeWedgePredDirInfo ( pcCU, uiAbsPartIdx ); } 1053 } 1054 else if(uiDir >= EDGE_INTRA_IDX)//CCM mode 1055 { 1056 assert(pcCU->getWidth(uiAbsPartIdx)<64); 1057 xCodeEdgeIntraInfo( pcCU, uiAbsPartIdx ); 1058 } 1059 1060 if (bDmmFlag) 1061 { 1062 m_pcBinIf->encodeBin( (uiDir&1) , m_cDmmDeltaFlagModel.get(0, 0, 0) ); 1063 if (uiDir&1) 1064 { 1065 Int iDeltaDC1 = 0,iDeltaDC2 = 0; 1066 if ( uiDir == DMM_WEDGE_FULL_D_IDX ) 1067 { 1068 iDeltaDC1 = pcCU->getWedgeFullDeltaDC1( uiAbsPartIdx ); 1069 iDeltaDC2 = pcCU->getWedgeFullDeltaDC2( uiAbsPartIdx ); 1070 } 1071 else if ( uiDir == DMM_WEDGE_PREDTEX_D_IDX ) 1072 { 1073 iDeltaDC1 = pcCU->getWedgePredTexDeltaDC1( uiAbsPartIdx ); 1074 iDeltaDC2 = pcCU->getWedgePredTexDeltaDC2( uiAbsPartIdx ); 1075 } 1076 else if ( uiDir == DMM_WEDGE_PREDDIR_D_IDX ) 1077 { 1078 iDeltaDC1 = pcCU->getWedgePredDirDeltaDC1( uiAbsPartIdx ); 1079 iDeltaDC2 = pcCU->getWedgePredDirDeltaDC2( uiAbsPartIdx ); 1080 } 1081 else if ( uiDir == DMM_CONTOUR_PREDTEX_D_IDX ) 1082 { 1083 iDeltaDC1 = pcCU->getContourPredTexDeltaDC1( uiAbsPartIdx ); 1084 iDeltaDC2 = pcCU->getContourPredTexDeltaDC2( uiAbsPartIdx ); 1085 1086 } 1087 1088 for ( Int i = 0; i < 2; i++ ) 1089 { 1090 Int iDeltaDC = (i==0)? iDeltaDC1 : iDeltaDC2; 1091 xWriteExGolombLevel( UInt( abs( iDeltaDC ) ), m_cDmmDataSCModel.get(0, 0, 1) ); 1092 if ( iDeltaDC != 0 ) 1093 { 1094 UInt uiSign = iDeltaDC > 0 ? 0 : 1; 1095 m_pcBinIf->encodeBinEP( uiSign ); 1096 } 1097 } 1098 } 1099 } 1100 else if (uiDir>=EDGE_INTRA_IDX) 1101 { 1102 m_pcBinIf->encodeBin( (uiDir == EDGE_INTRA_DELTA_IDX), m_cEdgeIntraDeltaDCSCModel.get(0, 0, 0) ); 1103 if( uiDir == EDGE_INTRA_DELTA_IDX ) 1104 { 1105 Int iDeltaDC0 = pcCU->getEdgeDeltaDC0( uiAbsPartIdx ); 1106 Int iDeltaDC1 = pcCU->getEdgeDeltaDC1( uiAbsPartIdx ); 1107 1108 for ( Int i = 0; i < 2; i++ ) 1109 { 1110 Int iDeltaDC = (i==0)? iDeltaDC0 : iDeltaDC1; 1111 xWriteExGolombLevel( UInt( abs( iDeltaDC ) ), m_cEdgeIntraDeltaDCSCModel.get(0, 0, 1) ); 1112 if ( iDeltaDC != 0 ) 1113 { 1114 UInt uiSign = iDeltaDC > 0 ? 0 : 1; 1115 m_pcBinIf->encodeBinEP( uiSign ); 1116 } 1117 } 1118 } 1119 } 1120 if (pcCU->getSDCFlag(uiAbsPartIdx))//SDC mode 1121 { 1122 assert(pcCU->getPartitionSize(uiAbsPartIdx)==SIZE_2Nx2N); 1123 UInt uiNumSegments = ( uiDir == DC_IDX || uiDir == PLANAR_IDX )? 1 : 2; 1124 if(!bSdcRD) 1125 { 1126 for (int uiSeg=0; uiSeg<uiNumSegments; uiSeg++) 1127 { 1128 codeSDCResidualData(pcCU, uiAbsPartIdx, uiSeg); 1129 } 1130 } 1131 } 1132 } 1133 #endif 1134 Void TEncSbac::codeIntraDirLumaAng( TComDataCU* pcCU, UInt uiAbsPartIdx 1135 #if PKU_QC_DEPTH_INTRA_UNI_D0195 1136 , Bool bSdcRD 1137 #endif 1138 ) 970 1139 { 971 1140 UInt uiDir = pcCU->getLumaIntraDir( uiAbsPartIdx ); 972 1141 1142 #if !PKU_QC_DEPTH_INTRA_UNI_D0195 973 1143 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX 974 1144 if( pcCU->getSlice()->getSPS()->getUseDMM() && pcCU->getWidth( uiAbsPartIdx ) <= DMM_WEDGEMODEL_MAX_SIZE ) … … 1070 1240 } 1071 1241 #endif 1072 1242 #else 1243 if (pcCU->getSlice()->getSPS()->isDepth()) 1244 { 1245 codeDepthModelingTable(pcCU, uiAbsPartIdx, bSdcRD); 1246 } 1247 if (pcCU->getLumaIntraDir(uiAbsPartIdx)<NUM_INTRA_MODE && !pcCU->getSDCFlag(uiAbsPartIdx)) 1248 { 1249 #endif 1073 1250 Int uiPreds[3] = {-1, -1, -1}; 1074 1251 Int uiPredNum = pcCU->getIntraDirLumaPredictor(uiAbsPartIdx, uiPreds); … … 1116 1293 1117 1294 m_pcBinIf->encodeBinsEP( uiDir, 5 ); 1295 #if !PKU_QC_DEPTH_INTRA_UNI_D0195 1118 1296 #if LGE_EDGE_INTRA_A0070 1119 1297 if (bCodeEdgeIntra) 1120 1298 if (uiDir == 31) m_pcBinIf->encodeBinsEP(0,1); 1121 1299 #endif 1300 #endif 1122 1301 } 1302 #if PKU_QC_DEPTH_INTRA_UNI_D0195 1303 } 1304 #else 1123 1305 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX 1124 1306 } 1125 1307 #endif 1308 #endif 1309 1126 1310 return; 1127 1311 } … … 2397 2581 2398 2582 #if RWTH_SDC_DLT_B0036 2583 #if !PKU_QC_DEPTH_INTRA_UNI_D0195 2399 2584 Void TEncSbac::codeSDCPredMode( TComDataCU* pcCU, UInt uiAbsPartIdx ) 2400 2585 { … … 2440 2625 2441 2626 } 2627 #endif 2442 2628 2443 2629 Void TEncSbac::codeSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiSegment ) -
branches/HTM-6.2-dev3-Qualcomm/source/Lib/TLibEncoder/TEncSbac.h
r332 r382 92 92 Void load ( TEncSbac* pScr ); 93 93 Void loadIntraDirModeLuma ( TEncSbac* pScr ); 94 #if PKU_QC_DEPTH_INTRA_UNI_D0195 95 Void loadDepthMode ( TEncSbac* pSrc ); 96 #endif 94 97 Void store ( TEncSbac* pDest ); 95 98 Void loadContexts ( TEncSbac* pScr ); … … 137 140 138 141 #if RWTH_SDC_DLT_B0036 142 #if !PKU_QC_DEPTH_INTRA_UNI_D0195 139 143 Void codeSDCFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx ); 144 #endif 140 145 Void codeSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiSegment ); 146 #if !PKU_QC_DEPTH_INTRA_UNI_D0195 141 147 Void codeSDCPredMode ( TComDataCU* pcCU, UInt uiAbsPartIdx ); 148 #endif 142 149 #endif 143 150 … … 222 229 Void codeQtCbf ( TComDataCU* pcCU, UInt uiAbsPartIdx, TextType eType, UInt uiTrDepth ); 223 230 Void codeQtRootCbf ( TComDataCU* pcCU, UInt uiAbsPartIdx ); 224 225 Void codeIntraDirLumaAng ( TComDataCU* pcCU, UInt uiAbsPartIdx ); 231 #if PKU_QC_DEPTH_INTRA_UNI_D0195 232 Void codeDepthIntraMode ( TComDataCU* pcCU, UInt uiAbsPartIdx ); 233 Void codeDepthModelingTable ( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bSdcRD = false ); 234 #endif 235 Void codeIntraDirLumaAng ( TComDataCU* pcCU, UInt uiAbsPartIdx 236 #if PKU_QC_DEPTH_INTRA_UNI_D0195 237 , Bool bSdcRD = false 238 #endif 239 ); 226 240 227 241 Void codeIntraDirChroma ( TComDataCU* pcCU, UInt uiAbsPartIdx ); … … 300 314 301 315 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX 316 #if !PKU_QC_DEPTH_INTRA_UNI_D0195 302 317 ContextModel3DBuffer m_cDmmFlagSCModel; 303 318 ContextModel3DBuffer m_cDmmModeSCModel; 319 #endif 304 320 ContextModel3DBuffer m_cDmmDataSCModel; 305 321 #endif … … 312 328 313 329 #if RWTH_SDC_DLT_B0036 330 #if !PKU_QC_DEPTH_INTRA_UNI_D0195 314 331 ContextModel3DBuffer m_cSDCFlagSCModel; 332 #else 333 ContextModel3DBuffer m_cDepthModeModel; 334 ContextModel3DBuffer m_cDmmDeltaFlagModel; 335 #endif 315 336 316 337 ContextModel3DBuffer m_cSDCResidualFlagSCModel; -
branches/HTM-6.2-dev3-Qualcomm/source/Lib/TLibEncoder/TEncSearch.cpp
r379 r382 908 908 if( uiAbsPartIdx == 0 ) 909 909 { 910 m_pcEntropyCoder->encodeIntraDirModeLuma ( pcCU, 0 ); 910 m_pcEntropyCoder->encodeIntraDirModeLuma ( pcCU, 0 911 #if PKU_QC_DEPTH_INTRA_UNI_D0195 912 ,true 913 #endif 914 ); 911 915 } 912 916 } … … 1762 1766 1763 1767 // encode pred direction + residual data 1764 m_pcEntropyCoder->encodePredInfo( pcCU, 0, true ); 1765 1768 m_pcEntropyCoder->encodePredInfo( pcCU, 0, true 1769 #if PKU_QC_DEPTH_INTRA_UNI_D0195 1770 ,true 1771 #endif 1772 ); 1766 1773 UInt uiBits = m_pcEntropyCoder->getNumberOfWrittenBits(); 1767 1774 … … 5903 5910 // Reload only contexts required for coding intra mode information 5904 5911 m_pcRDGoOnSbacCoder->loadIntraDirModeLuma( m_pppcRDSbacCoder[uiDepth][CI_CURR_BEST] ); 5912 #if PKU_QC_DEPTH_INTRA_UNI_D0195 5913 m_pcRDGoOnSbacCoder->loadDepthMode( m_pppcRDSbacCoder[uiDepth][CI_CURR_BEST] ); 5914 #endif 5905 5915 } 5906 5916 … … 5908 5918 5909 5919 m_pcEntropyCoder->resetBits(); 5910 m_pcEntropyCoder->encodeIntraDirModeLuma ( pcCU, uiPartOffset); 5920 m_pcEntropyCoder->encodeIntraDirModeLuma ( pcCU, uiPartOffset 5921 #if PKU_QC_DEPTH_INTRA_UNI_D0195 5922 ,true 5923 #endif 5924 ); 5911 5925 5912 5926 return m_pcEntropyCoder->getNumberOfWrittenBits();
Note: See TracChangeset for help on using the changeset viewer.