Changeset 667 in 3DVCSoftware for branches/HTM-8.2-dev3-Qualcomm
- Timestamp:
- 4 Nov 2013, 16:32:06 (11 years ago)
- Location:
- branches/HTM-8.2-dev3-Qualcomm
- Files:
-
- 2 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-8.2-dev3-Qualcomm/source/Lib/TLibCommon/ContextTables.h
r655 r667 109 109 #define NUM_DEPTH_INTRA_MODE_CTX 8 ///< number of context models for depth intra modes 110 110 #define NUM_DDC_FLAG_CTX 2 ///< number of context models for deltaDC flag (DMM or RBC) 111 #if QC_DIM_DELTADC_UNIFY_F0132 112 #define NUM_DDC_DATA_CTX 1 ///< number of context models for deltaDC data (DMM or RBC) 113 #else 111 114 #define NUM_DDC_DATA_CTX 2 ///< number of context models for deltaDC data (DMM or RBC) 115 #endif 112 116 #if H_3D_DIM_DMM 113 117 #define NUM_DMM1_DATA_CTX 1 ///< number of context models for DMM1 data … … 405 409 INIT_DDC_DATA[3][NUM_DDC_DATA_CTX] = 406 410 { 411 #if QC_DIM_DELTADC_UNIFY_F0132 412 { 154 }, 413 { 154 }, 414 { 154 }, 415 #else 407 416 { CNU, CNU }, 408 417 { CNU, CNU }, 409 418 { CNU, CNU }, 419 #endif 410 420 }; 411 421 #if H_3D_DIM_DMM -
branches/HTM-8.2-dev3-Qualcomm/source/Lib/TLibCommon/TComPrediction.cpp
r655 r667 475 475 assert( biSegPattern ); 476 476 Int* piMask = NULL; 477 #if QC_DIM_DELTADC_UNIFY_F0132 || HHI_DIM_PREDSAMP_FIX_F0171 478 piMask = pcCU->getPattern()->getAdiOrgBuf( iWidth, iHeight, m_piYuvExt ); // no filtering 479 #else 477 480 if( isDmmMode ) piMask = pcCU->getPattern()->getAdiOrgBuf( iWidth, iHeight, m_piYuvExt ); // no filtering for DMM 478 481 else piMask = pcCU->getPattern()->getPredictorPtr( 0, g_aucConvertToBit[ iWidth ] + 2, m_piYuvExt ); 482 #endif 479 483 assert( piMask ); 480 484 Int maskStride = 2*iWidth + 1; … … 491 495 Pel deltaDC2 = pcCU->getDimDeltaDC( dimType, 1, uiAbsPartIdx ); 492 496 #if H_3D_DIM_DMM 497 #if QC_DIM_DELTADC_UNIFY_F0132 498 if( isDmmMode || isRbcMode) 499 #else 493 500 if( isDmmMode ) 501 #endif 494 502 { 495 503 #if H_3D_DIM_DLT … … 502 510 } 503 511 #endif 504 #if H_3D_DIM_RBC 512 #if H_3D_DIM_RBC && !QC_DIM_DELTADC_UNIFY_F0132 505 513 if( isRbcMode ) 506 514 { -
branches/HTM-8.2-dev3-Qualcomm/source/Lib/TLibCommon/TypeDef.h
r655 r667 218 218 // HHI_DEPTH_INTRA_SEARCH_RAU_C0160 219 219 // LG_ZEROINTRADEPTHRESI_A0087 220 #define QC_DIM_DELTADC_UNIFY_F0132 1 // Unify delta DC coding in depth intra modes 221 #define HHI_DIM_PREDSAMP_FIX_F0171 1 220 222 #endif 221 223 ///// ***** VIEW SYNTHESIS PREDICTION ********* -
branches/HTM-8.2-dev3-Qualcomm/source/Lib/TLibDecoder/TDecSbac.cpp
r655 r667 408 408 } 409 409 410 #if QC_DIM_DELTADC_UNIFY_F0132 411 Void TDecSbac::xParseDimDeltaDC( Pel& rValDeltaDC, UInt uiNumSeg ) 412 { 413 UInt absValDeltaDC = 0; 414 xReadExGolombLevel( absValDeltaDC, m_cDdcDataSCModel.get(0, 0, 0) ); 415 rValDeltaDC = (Pel)absValDeltaDC + ( uiNumSeg > 1 ? 0 : 1 ); 416 417 if( rValDeltaDC != 0 ) 418 { 419 UInt uiSign; 420 m_pcTDecBinIf->decodeBinEP( uiSign ); 421 if ( uiSign ) 422 { 423 rValDeltaDC = -rValDeltaDC; 424 } 425 } 426 } 427 #else 410 428 Void TDecSbac::xParseDimDeltaDC( Pel& rValDeltaDC, UInt dimType ) 411 429 { … … 424 442 } 425 443 } 444 #endif 445 426 446 #if H_3D_DIM_DMM 427 447 Void TDecSbac::xParseDmm1WedgeIdx( UInt& ruiTabIdx, Int iNumBit ) … … 1157 1177 } 1158 1178 1159 #if H_3D_DIM_SDC 1179 #if H_3D_DIM_SDC && !QC_DIM_DELTADC_UNIFY_F0132 1160 1180 if( pcCU->getSDCFlag(absPartIdx) ) 1161 1181 { … … 1173 1193 { 1174 1194 #endif 1195 #if QC_DIM_DELTADC_UNIFY_F0132 1196 if( dimType < DIM_NUM_TYPE || pcCU->getSDCFlag( absPartIdx ) ) 1197 #else 1175 1198 if( dimType < DIM_NUM_TYPE ) 1199 #endif 1176 1200 { 1177 1201 UInt symbol; 1202 #if QC_DIM_DELTADC_UNIFY_F0132 1203 UInt uiNumSegments = ( dir == PLANAR_IDX ) ? 1 : 2; 1204 1205 if( pcCU->getSDCFlag( absPartIdx ) ) 1206 { 1207 assert(pcCU->getPartitionSize(absPartIdx)==SIZE_2Nx2N); 1208 pcCU->setTrIdxSubParts(0, absPartIdx, depth); 1209 pcCU->setCbfSubParts(1, 1, 1, absPartIdx, depth); 1210 } 1211 1212 m_pcTDecBinIf->decodeBin( symbol, m_cDdcFlagSCModel.get(0, 0, uiNumSegments-1) ); 1213 1214 if( symbol ) 1215 { 1216 if( !pcCU->getSDCFlag( absPartIdx ) ) 1217 { 1218 dir += symbol; 1219 } 1220 } 1221 for( UInt segment = 0; segment < uiNumSegments; segment++ ) 1222 { 1223 Pel valDeltaDC = 0; 1224 if( symbol ) 1225 { 1226 xParseDimDeltaDC( valDeltaDC, uiNumSegments ); 1227 } 1228 1229 if( pcCU->getSDCFlag( absPartIdx ) ) 1230 { 1231 pcCU->setSDCSegmentDCOffset( valDeltaDC, segment, absPartIdx ); 1232 } 1233 else 1234 { 1235 pcCU->setDimDeltaDC( dimType, segment, absPartIdx, valDeltaDC ); 1236 } 1237 } 1238 #else 1178 1239 m_pcTDecBinIf->decodeBin( symbol, m_cDdcFlagSCModel.get(0, 0, (RBC_IDX == dimType) ? 1 : 0) ); 1179 1240 if( symbol ) … … 1187 1248 } 1188 1249 } 1189 } 1190 #if H_3D_DIM_SDC 1250 #endif 1251 } 1252 #if H_3D_DIM_SDC && !QC_DIM_DELTADC_UNIFY_F0132 1191 1253 } 1192 1254 #endif -
branches/HTM-8.2-dev3-Qualcomm/source/Lib/TLibDecoder/TDecSbac.h
r655 r667 99 99 #if H_3D_DIM 100 100 Void xReadExGolombLevel ( UInt& ruiSymbol, ContextModel& rcSCModel ); 101 #if QC_DIM_DELTADC_UNIFY_F0132 102 Void xParseDimDeltaDC ( Pel& rValDeltaDC, UInt uiNumSeg ); 103 #else 101 104 Void xParseDimDeltaDC ( Pel& rValDeltaDC, UInt dimType ); 105 #endif 102 106 #if H_3D_DIM_DMM 103 107 Void xParseDmm1WedgeIdx ( UInt& ruiTabIdx, Int iNumBit ); -
branches/HTM-8.2-dev3-Qualcomm/source/Lib/TLibEncoder/TEncSbac.cpp
r655 r667 518 518 } 519 519 520 #if QC_DIM_DELTADC_UNIFY_F0132 521 Void TEncSbac::xCodeDimDeltaDC( Pel valDeltaDC, UInt uiNumSeg ) 522 { 523 xWriteExGolombLevel( UInt( abs( valDeltaDC ) - ( uiNumSeg > 1 ? 0 : 1 ) ), m_cDdcDataSCModel.get(0, 0, 0) ); 524 if( valDeltaDC != 0 ) 525 { 526 UInt uiSign = valDeltaDC > 0 ? 0 : 1; 527 m_pcBinIf->encodeBinEP( uiSign ); 528 } 529 } 530 #else 520 531 Void TEncSbac::xCodeDimDeltaDC( Pel valDeltaDC, UInt dimType ) 521 532 { … … 527 538 } 528 539 } 540 #endif 529 541 530 542 #if H_3D_DIM_DMM … … 1225 1237 } 1226 1238 1227 #if H_3D_DIM_SDC 1239 #if H_3D_DIM_SDC && !QC_DIM_DELTADC_UNIFY_F0132 1228 1240 if( pcCU->getSDCFlag( absPartIdx ) ) 1229 1241 { … … 1238 1250 { 1239 1251 #endif 1252 #if QC_DIM_DELTADC_UNIFY_F0132 1253 if( dimType < DIM_NUM_TYPE || pcCU->getSDCFlag( absPartIdx ) ) 1254 #else 1240 1255 if( dimType < DIM_NUM_TYPE ) 1241 { 1256 #endif 1257 { 1258 #if QC_DIM_DELTADC_UNIFY_F0132 1259 UInt dimDeltaDC; 1260 Pel deltaDC; 1261 UInt uiNumSegments = ( dir == PLANAR_IDX ) ? 1 : 2; 1262 if( pcCU->getSDCFlag( absPartIdx ) ) 1263 { 1264 if( uiNumSegments==1 ) 1265 { 1266 dimDeltaDC = pcCU->getSDCSegmentDCOffset(0, absPartIdx) ? 1 : 0; 1267 } 1268 else 1269 { 1270 dimDeltaDC = ( pcCU->getSDCSegmentDCOffset(0, absPartIdx) || pcCU->getSDCSegmentDCOffset(1, absPartIdx) ) ? 1 : 0; 1271 } 1272 } 1273 else 1274 { 1275 dimDeltaDC = isDimDeltaDC( dir ); 1276 } 1277 1278 m_pcBinIf->encodeBin( dimDeltaDC, m_cDdcFlagSCModel.get(0, 0, uiNumSegments-1) ); 1279 1280 if( dimDeltaDC ) 1281 { 1282 for( UInt segment = 0; segment < uiNumSegments; segment++ ) 1283 { 1284 deltaDC = pcCU->getSDCFlag( absPartIdx ) ? pcCU->getSDCSegmentDCOffset(segment, absPartIdx) : pcCU->getDimDeltaDC( dimType, segment, absPartIdx ); 1285 xCodeDimDeltaDC( deltaDC, uiNumSegments ); 1286 } 1287 } 1288 #else 1242 1289 UInt dimDeltaDC = isDimDeltaDC( dir ); 1243 1290 m_pcBinIf->encodeBin( dimDeltaDC, m_cDdcFlagSCModel.get(0, 0, (RBC_IDX == dimType) ? 1 : 0) ); … … 1249 1296 } 1250 1297 } 1251 } 1252 #if H_3D_DIM_SDC 1298 #endif 1299 } 1300 #if H_3D_DIM_SDC && !QC_DIM_DELTADC_UNIFY_F0132 1253 1301 } 1254 1302 #endif -
branches/HTM-8.2-dev3-Qualcomm/source/Lib/TLibEncoder/TEncSbac.h
r655 r667 118 118 #if H_3D_DIM 119 119 Void xWriteExGolombLevel ( UInt uiSymbol, ContextModel& rcSCModel ); 120 #if QC_DIM_DELTADC_UNIFY_F0132 121 Void xCodeDimDeltaDC ( Pel valDeltaDC, UInt uiNumSeg ); 122 #else 120 123 Void xCodeDimDeltaDC ( Pel valDeltaDC, UInt dimType ); 124 #endif 121 125 #if H_3D_DIM_DMM 122 126 Void xCodeDmm1WedgeIdx ( UInt uiTabIdx, Int iNumBit ); -
branches/HTM-8.2-dev3-Qualcomm/source/Lib/TLibEncoder/TEncSearch.cpp
r655 r667 2928 2928 { 2929 2929 Pel deltaDC1 = 0; Pel deltaDC2 = 0; 2930 #if QC_DIM_DELTADC_UNIFY_F0132 2931 xSearchDmmDeltaDCs( pcCU, uiPartOffset, piOrg, piPred, uiStride, pcCU->getEdgePartition( uiPartOffset ), uiWidth, uiWidth, uiHeight, deltaDC1, deltaDC2 ); 2932 #else 2930 2933 xSearchRbcDeltaDCs( pcCU, uiPartOffset, piOrg, piPred, uiStride, pcCU->getEdgePartition( uiPartOffset ), uiWidth, uiWidth, uiHeight, deltaDC1, deltaDC2 ); 2934 #endif 2931 2935 pcCU->setDimDeltaDC( RBC_IDX, 0, uiPartOffset, deltaDC1 ); 2932 2936 pcCU->setDimDeltaDC( RBC_IDX, 1, uiPartOffset, deltaDC2 );
Note: See TracChangeset for help on using the changeset viewer.