Changeset 382 in 3DVCSoftware for branches/HTM-6.2-dev3-Qualcomm/source/Lib/TLibEncoder
- Timestamp:
- 7 May 2013, 10:29:53 (12 years ago)
- Location:
- branches/HTM-6.2-dev3-Qualcomm/source/Lib/TLibEncoder
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
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.