Changeset 443 in 3DVCSoftware for trunk/source/Lib/TLibDecoder
- Timestamp:
- 26 May 2013, 15:41:34 (12 years ago)
- Location:
- trunk/source/Lib/TLibDecoder
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/Lib/TLibDecoder/TDecCAVLC.cpp
r332 r443 265 265 xParseDblParam( aps ); 266 266 } 267 #if !LGE_SAO_MIGRATION_D0091 267 268 READ_FLAG(uiCode, "aps_sao_interleaving_flag"); aps->setSaoInterleavingFlag( (uiCode==1)?true:false ); 268 269 if(!aps->getSaoInterleavingFlag()) … … 275 276 } 276 277 } 278 #endif 277 279 READ_FLAG(uiCode, "aps_adaptive_loop_filter_flag"); aps->setAlfEnabled( (uiCode==1)?true:false ); 278 280 if(aps->getAlfEnabled()) … … 307 309 } 308 310 } 311 #if !LGE_SAO_MIGRATION_D0091 309 312 /** parse SAO parameters 310 313 * \param pSaoParam … … 532 535 } 533 536 } 534 537 #endif 535 538 536 539 Void TDecCavlc::xParseAlfParam(AlfParamSet* pAlfParamSet, Bool bSentInAPS, Int firstLCUAddr, Bool acrossSlice, Int numLCUInWidth, Int numLCUInHeight) … … 1493 1496 #endif 1494 1497 #if H3D_IVRP 1495 pcSPS->setMultiviewResPredMode ( 0 ); 1496 #endif 1498 #if QC_ARP_D0177 1499 pcSPS->setUseAdvRP ( 0 ); 1500 pcSPS->setARPStepNum( 1 ); 1501 #else 1502 pcSPS->setMultiviewResPredMode ( 0 ); 1503 #endif 1504 #endif 1505 1497 1506 } 1498 1507 else … … 1544 1553 #endif 1545 1554 #if H3D_IVRP 1555 #if QC_ARP_D0177 1556 pcSPS->setUseAdvRP ( 0 ); 1557 pcSPS->setARPStepNum( 1 ); 1558 #else 1546 1559 pcSPS->setMultiviewResPredMode ( 0 ); 1547 1560 #endif 1561 #endif 1562 1548 1563 } 1549 1564 else … … 1573 1588 UInt uiMultiviewMvPredMode = 0; 1574 1589 #endif 1575 #if H3D_IVRP 1590 #if H3D_IVRP & !QC_ARP_D0177 1576 1591 UInt uiMultiviewResPredMode = 0; 1577 1592 #endif … … 1588 1603 READ_UVLC( uiMultiviewMvPredMode, "multi_view_mv_pred_mode" ); 1589 1604 #endif 1590 #if H3D_IVRP 1605 #if H3D_IVRP & !QC_ARP_D0177 1591 1606 READ_FLAG( uiMultiviewResPredMode, "multi_view_residual_pred_mode" ); 1592 1607 #endif … … 1599 1614 #endif 1600 1615 #if H3D_IVRP 1616 #if QC_ARP_D0177 1617 READ_FLAG( uiCode , "advanced_residual_pred_flag" ); pcSPS->setUseAdvRP( uiCode ); 1618 if( pcSPS->getUseAdvRP() ) 1619 pcSPS->setARPStepNum( QC_ARP_WFNR ); 1620 else 1621 pcSPS->setARPStepNum( 1 ); 1622 #else 1601 1623 pcSPS->setMultiviewResPredMode ( uiMultiviewResPredMode ); 1602 1624 #endif 1603 } 1625 #endif 1626 1627 } 1628 1629 #if MTK_D0156 1630 1631 pcSPS->setUseVSPCompensation( false ); 1632 pcSPS->setUseDVPRefine( false ); 1633 1634 //Comments: Currently, BVSP and DoNBDV are not used for depth coding 1635 #if MERL_VSP_COMPENSATION_C0152 1636 READ_FLAG( uiCode, "view_synthesis_pred_flag" );pcSPS->setUseVSPCompensation( uiCode ? true : false ); 1637 #endif 1638 READ_FLAG( uiCode, "dv_refine_flag" ); pcSPS->setUseDVPRefine( uiCode ? true : false ); 1639 #endif 1604 1640 } 1605 1641 READ_FLAG( uiCode, "sps_extension2_flag"); … … 1665 1701 } 1666 1702 rpcSlice->setApplyIC(uiCodeTmp); 1703 #if SHARP_ILLUCOMP_PARSE_D0060 1704 if (rpcSlice->getApplyIC()) 1705 { 1706 READ_FLAG (uiCodeTmp, "ic_skip_mergeidx0"); 1707 rpcSlice->setIcSkipParseFlag(uiCodeTmp); 1708 } 1709 #endif 1667 1710 } 1668 1711 #endif … … 1847 1890 if (sps->getUseSAO()) 1848 1891 { 1892 #if LGE_SAO_MIGRATION_D0091 1893 READ_FLAG(uiCode, "slice_sao_luma_flag"); rpcSlice->setSaoEnabledFlag((Bool)uiCode); 1894 READ_FLAG(uiCode, "slice_sao_chroma_flag"); rpcSlice->setSaoEnabledFlagChroma((Bool)uiCode); 1895 #else 1849 1896 READ_FLAG(uiCode, "slice_sao_interleaving_flag"); rpcSlice->setSaoInterleavingFlag(uiCode); 1850 1897 READ_FLAG(uiCode, "slice_sample_adaptive_offset_flag"); rpcSlice->setSaoEnabledFlag((Bool)uiCode); … … 1859 1906 rpcSlice->setSaoEnabledFlagCr(0); 1860 1907 } 1908 #endif 1861 1909 } 1862 1910 READ_UVLC ( uiCode, "aps_id" ); rpcSlice->setAPSId(uiCode); … … 2424 2472 } 2425 2473 #endif 2426 2474 #if QC_ARP_D0177 2475 Void TDecCavlc::parseARPW( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 2476 { 2477 assert( false ); 2478 } 2479 #endif 2427 2480 #if RWTH_SDC_DLT_B0036 2481 #if !PKU_QC_DEPTH_INTRA_UNI_D0195 2428 2482 Void TDecCavlc::parseSDCFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 2429 2483 { … … 2434 2488 assert(0); 2435 2489 } 2490 #endif 2436 2491 Void TDecCavlc::parseSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPart ) 2437 2492 { -
trunk/source/Lib/TLibDecoder/TDecCAVLC.h
r332 r443 144 144 Void parseResPredFlag ( TComDataCU* pcCU, Bool& rbResPredFlag, UInt uiAbsPartIdx, UInt uiDepth ); 145 145 #endif 146 #if QC_ARP_D0177 147 Void parseARPW( TComDataCU* pcCU, UInt uiAbsPartIdx,UInt uiDepth ); 148 #endif 146 149 Void parseSplitFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 147 150 Void parsePartSize ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); … … 171 174 Void parseDFSvlc ( Int& riVal, const Char *pSymbolName ); 172 175 #if RWTH_SDC_DLT_B0036 176 #if !PKU_QC_DEPTH_INTRA_UNI_D0195 173 177 Void parseSDCFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 174 178 Void parseSDCPredMode ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 179 #endif 175 180 Void parseSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPart ); 176 181 #endif 177 182 protected: 178 183 Void xParseDblParam ( TComAPS* aps ); 184 #if !LGE_SAO_MIGRATION_D0091 179 185 Void xParseSaoParam ( SAOParam* pSaoParam ); 180 186 Void xParseSaoOffset (SaoLcuParam* saoLcuParam); 181 187 Void xParseSaoUnit (Int rx, Int ry, Int compIdx, SAOParam* saoParam, Bool& repeatedRow ); 188 #endif 182 189 Void xParseAlfParam(AlfParamSet* pAlfParamSet, Bool bSentInAPS = true, Int firstLCUAddr = 0, Bool acrossSlice = true, Int numLCUInWidth= -1, Int numLCUInHeight= -1); 183 190 Void parseAlfParamSet(AlfParamSet* pAlfParamSet, Int firstLCUAddr, Bool alfAcrossSlice); -
trunk/source/Lib/TLibDecoder/TDecCu.cpp
r332 r443 54 54 m_ppcYuvResi = NULL; 55 55 m_ppcYuvReco = NULL; 56 #if H3D_IVRP 56 #if H3D_IVRP & !QC_ARP_D0177 57 57 m_ppcYuvResPred = NULL; 58 58 #endif … … 82 82 m_ppcYuvResi = new TComYuv*[m_uiMaxDepth-1]; 83 83 m_ppcYuvReco = new TComYuv*[m_uiMaxDepth-1]; 84 #if H3D_IVRP 84 #if H3D_IVRP & !QC_ARP_D0177 85 85 m_ppcYuvResPred = new TComYuv* [m_uiMaxDepth-1]; 86 86 #endif … … 96 96 m_ppcYuvResi[ui] = new TComYuv; m_ppcYuvResi[ui]->create( uiWidth, uiHeight ); 97 97 m_ppcYuvReco[ui] = new TComYuv; m_ppcYuvReco[ui]->create( uiWidth, uiHeight ); 98 #if H3D_IVRP 98 #if H3D_IVRP & !QC_ARP_D0177 99 99 m_ppcYuvResPred[ui] = new TComYuv; m_ppcYuvResPred[ui]->create( uiWidth, uiHeight ); 100 100 #endif … … 120 120 m_ppcYuvResi[ui]->destroy(); delete m_ppcYuvResi[ui]; m_ppcYuvResi[ui] = NULL; 121 121 m_ppcYuvReco[ui]->destroy(); delete m_ppcYuvReco[ui]; m_ppcYuvReco[ui] = NULL; 122 #if H3D_IVRP 122 #if H3D_IVRP & !QC_ARP_D0177 123 123 m_ppcYuvResPred[ui]->destroy(); delete m_ppcYuvResPred[ui]; m_ppcYuvResPred[ui] = NULL; 124 124 #endif … … 128 128 delete [] m_ppcYuvResi; m_ppcYuvResi = NULL; 129 129 delete [] m_ppcYuvReco; m_ppcYuvReco = NULL; 130 #if H3D_IVRP 130 #if H3D_IVRP & !QC_ARP_D0177 131 131 delete [] m_ppcYuvResPred; m_ppcYuvResPred = NULL; 132 132 #endif … … 312 312 pcCU->setQPSubParts( pcCU->getRefQP(uiAbsPartIdx), uiAbsPartIdx, uiDepth ); // set QP to default QP 313 313 } 314 314 #if QC_CU_NBDV_D0181 315 DisInfo DvInfo; 316 DvInfo.bDV = false; 317 if(!pcCU->getSlice()->isIntra()) 318 { 319 #if QC_ARP_D0177 320 if(( pcCU->getSlice()->getSPS()->getMultiviewMvPredMode() || pcCU->getSlice()->getSPS()->getUseAdvRP()) && pcCU->getSlice()->getViewId()) 321 #else 322 if(( pcCU->getSlice()->getSPS()->getMultiviewMvPredMode() || pcCU->getSlice()->getSPS()->getMultiviewResPredMode()) && pcCU->getSlice()->getViewId()) 323 #endif 324 { 325 m_ppcCU[uiDepth]->copyInterPredInfoFrom( pcCU, uiAbsPartIdx, REF_PIC_LIST_0, true ); 326 m_ppcCU[uiDepth]->copyDVInfoFrom( pcCU, uiAbsPartIdx); 327 PartSize ePartTemp = m_ppcCU[uiDepth]->getPartitionSize(0); 328 UChar cWidTemp = m_ppcCU[uiDepth]->getWidth(0); 329 UChar cHeightTemp = m_ppcCU[uiDepth]->getHeight(0); 330 m_ppcCU[uiDepth]->setWidth ( 0, pcCU->getSlice()->getSPS()->getMaxCUWidth ()/(1<<uiDepth) ); 331 m_ppcCU[uiDepth]->setHeight ( 0, pcCU->getSlice()->getSPS()->getMaxCUHeight()/(1<<uiDepth) ); 332 m_ppcCU[uiDepth]->setPartSizeSubParts( SIZE_2Nx2N, 0, uiDepth ); 333 #if MERL_VSP_C0152 334 DvInfo.bDV = m_ppcCU[uiDepth]->getDisMvpCandNBDV(0, 0, &DvInfo, false, true); 335 #else 336 DvInfo.bDV = m_ppcCU[uiDepth]->getDisMvpCandNBDV(0, 0, &DvInfo, false); 337 #endif 338 pcCU->setDvInfoSubParts(DvInfo, uiAbsPartIdx, uiDepth); 339 m_ppcCU[uiDepth]->setPartSizeSubParts( ePartTemp, 0, uiDepth ); 340 m_ppcCU[uiDepth]->setWidth ( 0, cWidTemp ); 341 m_ppcCU[uiDepth]->setHeight ( 0, cHeightTemp ); 342 } 343 if(DvInfo.bDV==false) 344 { 345 DvInfo.iN=1; 346 #if !SEC_DEFAULT_DV_D0112 347 DvInfo.m_acMvCand[0].setHor(0); 348 DvInfo.m_acMvCand[0].setVer(0); 349 DvInfo.m_aVIdxCan[0] = 0; 350 #endif 351 pcCU->setDvInfoSubParts(DvInfo, uiAbsPartIdx, uiDepth); 352 } 353 } 354 #endif 315 355 // decode CU mode and the partition size 316 356 if( !pcCU->getSlice()->isIntra() && pcCU->getNumSucIPCM() == 0 ) … … 353 393 const UChar uhNewDepth = max<UInt>( uiDepth, pcTextureCU->getDepth( uiAbsPartIdx + ui ) ); 354 394 #if MERL_VSP_C0152 355 Int vspIdx = pcTextureCU->getVSPIndex( uiAbsPartIdx + ui); 356 pcCU->setVSPIndex( uiAbsPartIdx + ui, vspIdx); 395 Int vspIdx = pcTextureCU->getVSPIndex( uiAbsPartIdx + ui ); 396 pcCU->setVSPIndex( uiAbsPartIdx + ui, vspIdx ); 397 #endif 398 #if MERL_VSP_NBDV_RefVId_Fix_D0166 399 Int vspDir = pcTextureCU->getVSPDir( uiAbsPartIdx + ui ); 400 pcCU->setVSPDir( uiAbsPartIdx + ui, vspDir ); 357 401 #endif 358 402 pcCU->setPredictionMode( uiAbsPartIdx + ui, MODE_SKIP ); … … 371 415 UInt uiMergeIndex = pcCU->getMergeIndex(uiAbsPartIdx); 372 416 #if MERL_VSP_C0152 417 #if LGE_VSP_INHERIT_D0092 418 Int iVSPIndexTrue[MRG_MAX_NUM_CANDS_MEM]; 419 for (Int i=0; i<MRG_MAX_NUM_CANDS_MEM; i++) 420 { 421 iVSPIndexTrue[i] = 0; 422 } 423 #else 373 424 Int iVSPIndexTrue[3] = {-1, -1, -1}; 425 #endif 426 #if MERL_VSP_NBDV_RefVId_Fix_D0166 427 Int iVSPDirTrue[3] = {-1, -1, -1}; 428 m_ppcCU[uiDepth]->getInterMergeCandidates( 0, 0, uiDepth, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, iVSPIndexTrue, iVSPDirTrue, uiMergeIndex ); 429 #else 374 430 m_ppcCU[uiDepth]->getInterMergeCandidates( 0, 0, uiDepth, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, iVSPIndexTrue, uiMergeIndex ); 431 #endif 432 #if MTK_D0156 433 if( !pcCU->getSlice()->getSPS()->getUseVSPCompensation() ) 434 { 435 pcCU->setVSPIndexSubParts( 0, uiAbsPartIdx, 0, uiDepth ); 436 } 437 else 438 #endif 375 439 { 376 440 Int iVSPIdx = 0; 441 #if LGE_VSP_INHERIT_D0092 442 if (iVSPIndexTrue[uiMergeIndex] == 1) 443 { 444 iVSPIdx = 1; 445 } 446 #else 377 447 Int numVspIdx; 378 448 numVspIdx = 3; … … 385 455 } 386 456 } 387 pcCU->setVSPIndexSubParts( iVSPIdx, uiAbsPartIdx, 0, uiDepth ); //Initialize the VSP, may change later in get InterMergeCandidates() 457 #endif 458 pcCU->setVSPIndexSubParts( iVSPIdx, uiAbsPartIdx, 0, uiDepth ); // Initialize 459 #if MERL_VSP_NBDV_RefVId_Fix_D0166 460 pcCU->setVSPDirSubParts( 0, uiAbsPartIdx, 0, uiDepth ); 461 #endif 462 #if QC_BVSP_CleanUP_D0191 && !LGE_VSP_INHERIT_D0092 463 if(iVSPIdx != 0) 464 { 465 Int iIVCIdx = pcCU->getSlice()->getRefPic(REF_PIC_LIST_0, 0)->getPOC()==pcCU->getSlice()->getPOC() ? 0: pcCU->getSlice()->getNewRefIdx(REF_PIC_LIST_0); 466 cMvFieldNeighbours[ 2*uiMergeIndex].setRefIdx(iIVCIdx); 467 } 468 #endif 388 469 } 389 470 #else … … 409 490 } 410 491 #endif 492 #if QC_ARP_D0177 493 if( pcCU->getSlice()->getSPS()->getUseAdvRP() ) 494 { 495 pcCU->setResPredAvailSubParts ( false, uiAbsPartIdx, 0, uiDepth ); 496 pcCU->setResPredFlagSubParts ( false, uiAbsPartIdx, 0, uiDepth ); 497 m_pcEntropyDecoder->decodeARPW( pcCU , uiAbsPartIdx , uiDepth, m_ppcCU[uiDepth], 0 ); 498 } 499 #endif 411 500 xFinishDecodeCU( pcCU, uiAbsPartIdx, uiDepth, ruiIsLast ); 412 501 return; … … 460 549 } 461 550 #endif 462 551 #if QC_ARP_D0177 552 if (pcCU->getSlice()->getSPS()->getUseAdvRP() && pcCU->isIntra( uiAbsPartIdx ) ) 553 { 554 pcCU->setResPredAvailSubParts ( 0, uiAbsPartIdx, 0, uiDepth ); 555 pcCU->setResPredFlagSubParts ( 0, uiAbsPartIdx, 0, uiDepth ); 556 } 557 #endif 463 558 #if HHI_MPI 464 559 if( pcCU->getTextureModeDepth( uiAbsPartIdx ) == uiDepth ) … … 476 571 Int vspIdx = pcTextureCU->getVSPIndex( uiAbsPartIdx + ui); 477 572 pcCU->setVSPIndex( uiAbsPartIdx + ui, vspIdx); 573 #endif 574 #if MERL_VSP_NBDV_RefVId_Fix_D0166 575 if (pcCU->getSlice()->getIsDepth()) { 576 pcCU->setVSPDir( uiAbsPartIdx + ui, 0); 577 } 578 else { 579 Int vspDir = pcTextureCU->getVSPDir( uiAbsPartIdx + ui); 580 pcCU->setVSPDir( uiAbsPartIdx + ui, vspDir); 581 } 478 582 #endif 479 583 pcCU->setPredictionMode( uiAbsPartIdx + ui, MODE_INTER ); … … 670 774 m_pcPrediction->motionCompensation( pcCU, m_ppcYuvReco[uiDepth] ); 671 775 #endif 672 #if H3D_IVRP 776 #if H3D_IVRP & !QC_ARP_D0177 673 777 if (pcCU->getMergeFlag(0) && pcCU->getMergeIndex(0)==0 && pcCU->getResPredAvail(0)) 674 778 { … … 1032 1136 // reconstruct residual based on mask + DC residuals 1033 1137 Pel apDCResiValues[2]; 1138 #if !MERL_General_Fix 1034 1139 Pel apDCRecoValues[2]; 1140 #endif 1035 1141 for( UInt ui = 0; ui < uiNumSegments; ui++ ) 1036 1142 { … … 1039 1145 Pel pRecoValue = GetIdx2DepthValue( pPredIdx + pResiIdx ); 1040 1146 1147 #if !MERL_General_Fix 1041 1148 apDCRecoValues[ui] = pRecoValue; 1149 #endif 1042 1150 apDCResiValues[ui] = pRecoValue - apDCPredValues[ui]; 1043 1151 } … … 1056 1164 UChar ucSegment = pMask?(UChar)pMask[uiX]:0; 1057 1165 assert( ucSegment < uiNumSegments ); 1166 #if MTK_SAMPLE_BASED_SDC_D0110 1167 Pel pResiDC = apDCResiValues[ucSegment]; 1058 1168 1169 pReco [ uiX ] = Clip( pPred[ uiX ] + pResiDC ); 1170 #else 1059 1171 Pel pPredVal= apDCPredValues[ucSegment]; 1060 1172 Pel pResiDC = apDCResiValues[ucSegment]; 1061 1173 1062 1174 pReco [ uiX ] = Clip( pPredVal + pResiDC ); 1175 #endif 1063 1176 pRecIPred[ uiX ] = pReco[ uiX ]; 1064 1177 } -
trunk/source/Lib/TLibDecoder/TDecCu.h
r296 r443 61 61 TComYuv** m_ppcYuvResi; ///< array of residual buffer 62 62 TComYuv** m_ppcYuvReco; ///< array of prediction & reconstruction buffer 63 #if H3D_IVRP 63 #if H3D_IVRP & !QC_ARP_D0177 64 64 TComYuv** m_ppcYuvResPred; ///< residual prediction buffer 65 65 #endif -
trunk/source/Lib/TLibDecoder/TDecEntropy.cpp
r332 r443 108 108 } 109 109 110 #if QC_ARP_D0177 111 Void TDecEntropy::decodeARPW( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, TComDataCU* pcSubCU, UInt uiPUIdx ) 112 { 113 if( pcCU->getSlice()->getViewId() == 0 || pcCU->getSlice()->getIsDepth() == true || !pcCU->getSlice()->getARPStepNum() ) 114 return; 115 assert( !pcCU->isIntra( uiAbsPartIdx ) ); 116 Bool bResPredAvailable = !pcCU->getSlice()->getARPStepNum() ? false: ((pcCU->getPartitionSize(uiAbsPartIdx)==SIZE_2Nx2N || pcCU->isSkipped(uiAbsPartIdx)) ? true: false); 117 if(!bResPredAvailable) 118 pcCU->setARPWSubParts( 0 , uiAbsPartIdx, uiDepth ); 119 else 120 m_pcEntropyDecoderIf->parseARPW( pcCU , uiAbsPartIdx , uiDepth ); 121 } 122 #endif 110 123 Void TDecEntropy::decodeSplitFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 111 124 { … … 117 130 m_pcEntropyDecoderIf->parsePredMode( pcCU, uiAbsPartIdx, uiDepth ); 118 131 132 #if !PKU_QC_DEPTH_INTRA_UNI_D0195 119 133 #if RWTH_SDC_DLT_B0036 120 134 // if B-Slice, code SDC flag later … … 125 139 } 126 140 #endif 141 #endif 127 142 } 128 143 129 144 Void TDecEntropy::decodePartSize( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 130 145 { 146 #if !PKU_QC_DEPTH_INTRA_UNI_D0195 131 147 #if RWTH_SDC_DLT_B0036 132 148 if( !pcCU->getSlice()->isInterB() && pcCU->isIntra(uiAbsPartIdx) && pcCU->getSDCFlag(uiAbsPartIdx) ) … … 137 153 } 138 154 #endif 155 #endif 139 156 140 157 m_pcEntropyDecoderIf->parsePartSize( pcCU, uiAbsPartIdx, uiDepth ); 141 158 159 #if !PKU_QC_DEPTH_INTRA_UNI_D0195 142 160 #if RWTH_SDC_DLT_B0036 143 161 if( pcCU->getSlice()->isInterB() && pcCU->getSlice()->getSPS()->isDepth() && pcCU->isIntra(uiAbsPartIdx) ) … … 154 172 } 155 173 #endif 174 #endif 156 175 } 157 176 158 177 Void TDecEntropy::decodePredInfo ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, TComDataCU* pcSubCU ) 159 178 { 179 #if !PKU_QC_DEPTH_INTRA_UNI_D0195 160 180 #if RWTH_SDC_DLT_B0036 161 181 if( pcCU->getSDCFlag(uiAbsPartIdx) ) … … 164 184 return; 165 185 } 186 #endif 166 187 #endif 167 188 … … 178 199 decodeIntraDirModeLuma( pcCU, uiAbsPartIdx + uiPartOffset*2, uiDepth+1 ); 179 200 decodeIntraDirModeLuma( pcCU, uiAbsPartIdx + uiPartOffset*3, uiDepth+1 ); 201 #if PKU_QC_DEPTH_INTRA_UNI_D0195 202 if(!pcCU->getSDCFlag(uiAbsPartIdx)) 203 #endif 180 204 decodeIntraDirModeChroma( pcCU, uiAbsPartIdx, uiDepth ); 181 205 } … … 183 207 { 184 208 decodeIntraDirModeLuma ( pcCU, uiAbsPartIdx, uiDepth ); 209 #if PKU_QC_DEPTH_INTRA_UNI_D0195 210 if(!pcCU->getSDCFlag(uiAbsPartIdx)) 211 #endif 185 212 decodeIntraDirModeChroma( pcCU, uiAbsPartIdx, uiDepth ); 186 213 } … … 189 216 { 190 217 decodePUWise( pcCU, uiAbsPartIdx, uiDepth, pcSubCU ); 218 #if QC_ARP_D0177 219 if( pcCU->getSlice()->getSPS()->getUseAdvRP() ) 220 { 221 decodeARPW( pcCU , uiAbsPartIdx , uiDepth, pcSubCU, 0 ); 222 } 223 #endif 191 224 } 192 225 } … … 301 334 UInt uiMergeIndex = pcCU->getMergeIndex(uiSubPartIdx); 302 335 #if MERL_VSP_C0152 336 #if LGE_VSP_INHERIT_D0092 337 Int iVSPIndexTrue[MRG_MAX_NUM_CANDS_MEM]; 338 for (Int i=0; i<MRG_MAX_NUM_CANDS_MEM; i++) 339 { 340 iVSPIndexTrue[i] = 0; 341 } 342 #else 303 343 Int iVSPIndexTrue[3] = {-1, -1, -1}; 344 #endif 345 #if MERL_VSP_NBDV_RefVId_Fix_D0166 346 Int iVSPDirTrue[3] = {-1, -1, -1}; 347 pcSubCU->getInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, uiDepth, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, iVSPIndexTrue, iVSPDirTrue, uiMergeIndex ); 348 #else 304 349 pcSubCU->getInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, uiDepth, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, iVSPIndexTrue, uiMergeIndex ); 305 350 #endif 306 351 #if HHI_MPI 307 352 if(pcCU->getTextureModeDepth( uiSubPartIdx ) == uiDepth)//MPI is used … … 311 356 for( UInt ui = 0; ui < uiCurrPartNumb; ui++ ) 312 357 { 313 Int vspIdx = pcTextureCU->getVSPIndex( uiAbsPartIdx + ui );358 Int vspIdx = pcTextureCU->getVSPIndex( uiAbsPartIdx + ui ); 314 359 pcCU->setVSPIndex( uiAbsPartIdx + ui, vspIdx); 360 #if MERL_VSP_NBDV_RefVId_Fix_D0166 361 Int vspDir = pcTextureCU->getVSPDir( uiAbsPartIdx + ui ); 362 pcCU->setVSPDir( uiAbsPartIdx + ui, vspDir); 363 #endif 315 364 } 316 365 } 317 366 else // MPI not used 318 367 #endif 368 #if MTK_D0156 369 if( !pcCU->getSlice()->getSPS()->getUseVSPCompensation() ) 370 { 371 pcCU->setVSPIndexSubParts( 0, uiSubPartIdx, uiPartIdx, uiDepth ); 372 } 373 else 374 #endif 319 375 { 320 376 Int iVSPIdx = 0; 377 #if LGE_VSP_INHERIT_D0092 378 if (iVSPIndexTrue[uiMergeIndex] == 1) 379 { 380 iVSPIdx = 1; 381 } 382 #else 321 383 Int numVspIdx; 322 384 numVspIdx = 3; … … 329 391 } 330 392 } 331 pcCU->setVSPIndexSubParts( iVSPIdx, uiSubPartIdx, uiPartIdx, uiDepth ); //Initialize the VSP, may change later in get InterMergeCandidates() 393 #endif 394 pcCU->setVSPIndexSubParts( iVSPIdx, uiSubPartIdx, uiPartIdx, uiDepth ); // Initialize 395 #if MERL_VSP_NBDV_RefVId_Fix_D0166 396 pcCU->setVSPDirSubParts( 0, uiSubPartIdx, uiPartIdx, uiDepth ); // Initialize 397 #endif 398 #if QC_BVSP_CleanUP_D0191 && !LGE_VSP_INHERIT_D0092 399 if(iVSPIdx != 0) 400 { 401 Int iIVCIdx = pcCU->getSlice()->getRefPic(REF_PIC_LIST_0, 0)->getPOC()==pcCU->getSlice()->getPOC() ? 0: pcCU->getSlice()->getNewRefIdx(REF_PIC_LIST_0); 402 cMvFieldNeighbours[ 2*uiMergeIndex].setRefIdx(iIVCIdx); 403 } 404 #endif 332 405 } 333 406 … … 479 552 { 480 553 #if H3D_IVMP 554 #if SEC_TWO_CANDIDATES_FOR_AMVP_D0122 555 const Int iNumAMVPCands = AMVP_MAX_NUM_CANDS; 556 #else 481 557 const Int iNumAMVPCands = AMVP_MAX_NUM_CANDS + ( pcSubCU->getSlice()->getSPS()->getMultiviewMvPredMode() ? 1 : 0 ); 558 #endif 482 559 m_pcEntropyDecoderIf->parseMVPIdx( iMVPIdx, iNumAMVPCands ); 483 560 #else … … 789 866 assert( pcCU->getCbf(uiAbsPartIdx, TEXT_CHROMA_U) == 1 ); 790 867 assert( pcCU->getCbf(uiAbsPartIdx, TEXT_CHROMA_V) == 1 ); 791 868 #if !PKU_QC_DEPTH_INTRA_UNI_D0195 792 869 decodeSDCResidualData(pcCU, uiAbsPartIdx, uiDepth); 870 #endif 793 871 return; 794 872 } … … 847 925 848 926 #if RWTH_SDC_DLT_B0036 927 #if !PKU_QC_DEPTH_INTRA_UNI_D0195 849 928 Void TDecEntropy::decodeSDCPredMode( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 850 929 { … … 861 940 m_pcEntropyDecoderIf->parseSDCFlag(pcCU, uiAbsPartIdx, uiDepth ); 862 941 } 863 942 #endif 864 943 Void TDecEntropy::decodeSDCResidualData( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 865 944 { -
trunk/source/Lib/TLibDecoder/TDecEntropy.h
r332 r443 106 106 virtual Void parseResPredFlag ( TComDataCU* pcCU, Bool& rbResPredFlag, UInt uiAbsPartIdx, UInt uiDepth ) = 0; 107 107 #endif 108 #if QC_ARP_D0177 109 virtual Void parseARPW ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0; 110 #endif 108 111 virtual Void parsePartSize ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0; 109 112 virtual Void parsePredMode ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0; … … 137 140 138 141 #if RWTH_SDC_DLT_B0036 142 #if !PKU_QC_DEPTH_INTRA_UNI_D0195 139 143 virtual Void parseSDCFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0; 140 144 virtual Void parseSDCPredMode ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0; 145 #endif 141 146 virtual Void parseSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPart ) = 0; 142 147 #endif … … 198 203 Void decodeMergeFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPUIdx ); 199 204 Void decodeMergeIndex ( TComDataCU* pcSubCU, UInt uiPartIdx, UInt uiPartAddr, PartSize eCUMode, UChar* puhInterDirNeighbours, TComMvField* pcMvFieldNeighbours, UInt uiDepth ); 205 #if QC_ARP_D0177 206 Void decodeARPW ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, TComDataCU* pcSubCU, UInt uiPUIdx ); 207 #endif 200 208 Void decodePredMode ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 201 209 Void decodePartSize ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); … … 225 233 Void setSliceGranularity (Int iSliceGranularity) {m_pcEntropyDecoderIf->setSliceGranularity(iSliceGranularity);} 226 234 235 #if !LGE_SAO_MIGRATION_D0091 227 236 Void decodeSaoParam (SAOParam* saoParam); 228 237 void decodeSaoLcu(Int rx, Int ry, Int compIdx, SAOParam* saoParam, Bool &repeatedRow ); 229 238 Void decodeSaoOneLcu(SaoLcuParam* saoLcuParam); 239 #endif 230 240 231 241 Void decodeFlush() { m_pcEntropyDecoderIf->decodeFlush(); } 232 242 233 243 #if RWTH_SDC_DLT_B0036 244 #if !PKU_QC_DEPTH_INTRA_UNI_D0195 234 245 Void decodeSDCPredMode( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 235 246 Void decodeSDCFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 247 #endif 236 248 Void decodeSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 237 249 #endif -
trunk/source/Lib/TLibDecoder/TDecGop.cpp
r296 r443 93 93 ,TComDepthMapGenerator* pcDepthMapGenerator 94 94 #endif 95 #if H3D_IVRP 95 #if H3D_IVRP & !QC_ARP_D0177 96 96 ,TComResidualGenerator* pcResidualGenerator 97 97 #endif … … 109 109 m_pcDepthMapGenerator = pcDepthMapGenerator; 110 110 #endif 111 #if H3D_IVRP 111 #if H3D_IVRP & !QC_ARP_D0177 112 112 m_pcResidualGenerator = pcResidualGenerator; 113 113 #endif … … 298 298 m_pcDepthMapGenerator->predictDepthMap ( rpcPic ); 299 299 #endif 300 #if H3D_IVRP 300 #if H3D_IVRP & !QC_ARP_D0177 301 301 m_pcResidualGenerator->initViewComponent( rpcPic ); 302 302 #endif … … 331 331 else 332 332 { 333 #if H3D_IVRP 333 #if H3D_IVRP & !QC_ARP_D0177 334 334 // set residual picture 335 335 m_pcResidualGenerator->setRecResidualPic( rpcPic ); … … 372 372 if( pcSlice->getSPS()->getUseSAO() ) 373 373 { 374 #if LGE_SAO_MIGRATION_D0091 375 if(pcSlice->getSaoEnabledFlag()||pcSlice->getSaoEnabledFlagChroma()) 376 { 377 SAOParam *saoParam = pcSlice->getAPS()->getSaoParam(); 378 saoParam->bSaoFlag[0] = pcSlice->getSaoEnabledFlag(); 379 saoParam->bSaoFlag[1] = pcSlice->getSaoEnabledFlagChroma(); 380 m_pcSAO->setSaoLcuBasedOptimization(1); 381 m_pcSAO->createPicSaoInfo(rpcPic, m_uiILSliceCount); 382 m_pcSAO->SAOProcess(rpcPic, saoParam); 383 m_pcSAO->PCMLFDisableProcess(rpcPic); 384 m_pcSAO->destroyPicSaoInfo(); 385 } 386 #else 374 387 if(pcSlice->getSaoEnabledFlag()) 375 388 { … … 388 401 m_pcSAO->destroyPicSaoInfo(); 389 402 } 403 #endif 390 404 } 391 405 -
trunk/source/Lib/TLibDecoder/TDecGop.h
r296 r443 90 90 TComDepthMapGenerator* m_pcDepthMapGenerator; 91 91 #endif 92 #if H3D_IVRP 92 #if H3D_IVRP & !QC_ARP_D0177 93 93 TComResidualGenerator* m_pcResidualGenerator; 94 94 #endif … … 118 118 ,TComDepthMapGenerator* pcDepthMapGenerator 119 119 #endif 120 #if H3D_IVRP 120 #if H3D_IVRP & !QC_ARP_D0177 121 121 ,TComResidualGenerator* pcResidualGenerator 122 122 #endif -
trunk/source/Lib/TLibDecoder/TDecSbac.cpp
r332 r443 38 38 #include "TDecSbac.h" 39 39 40 #if RWTH_SDC_DLT_B003641 #define GetNumDepthValues() (pcCU->getSlice()->getSPS()->getNumDepthValues())42 #define GetBitsPerDepthValue() (pcCU->getSlice()->getSPS()->getBitsPerDepthValue())43 #endif44 45 40 //! \ingroup TLibDecoder 46 41 //! \{ … … 64 59 #if H3D_IVRP 65 60 , m_cResPredFlagSCModel ( 1, 1, NUM_RES_PRED_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 61 #endif 62 #if QC_ARP_D0177 63 , m_cCUPUARPW ( 1, 1, NUM_ARPW_CTX , m_contextModels + m_numContextModels, m_numContextModels) 66 64 #endif 67 65 , m_cCUPartSizeSCModel ( 1, 1, NUM_PART_SIZE_CTX , m_contextModels + m_numContextModels, m_numContextModels) … … 88 86 , m_cALFSvlcSCModel ( 1, 1, NUM_ALF_SVLC_CTX , m_contextModels + m_numContextModels, m_numContextModels) 89 87 , m_cCUAMPSCModel ( 1, 1, NUM_CU_AMP_CTX , m_contextModels + m_numContextModels, m_numContextModels) 88 #if LGE_SAO_MIGRATION_D0091 89 , m_cSaoMergeSCModel ( 1, 1, NUM_SAO_MERGE_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 90 , m_cSaoTypeIdxSCModel ( 1, 1, NUM_SAO_TYPE_IDX_CTX , m_contextModels + m_numContextModels, m_numContextModels) 91 #else 90 92 , m_cSaoFlagSCModel ( 1, 1, NUM_SAO_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 91 93 , m_cSaoUvlcSCModel ( 1, 1, NUM_SAO_UVLC_CTX , m_contextModels + m_numContextModels, m_numContextModels) … … 94 96 , m_cSaoMergeUpSCModel ( 1, 1, NUM_SAO_MERGE_UP_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 95 97 , m_cSaoTypeIdxSCModel ( 1, 1, NUM_SAO_TYPE_IDX_CTX , m_contextModels + m_numContextModels, m_numContextModels) 98 #endif 96 99 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX 100 #if !PKU_QC_DEPTH_INTRA_UNI_D0195 97 101 , m_cDmmFlagSCModel ( 1, 1, NUM_DMM_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 98 102 , m_cDmmModeSCModel ( 1, 1, NUM_DMM_MODE_CTX , m_contextModels + m_numContextModels, m_numContextModels) 103 #endif 99 104 , m_cDmmDataSCModel ( 1, 1, NUM_DMM_DATA_CTX , m_contextModels + m_numContextModels, m_numContextModels) 100 105 #endif … … 106 111 #endif 107 112 #if RWTH_SDC_DLT_B0036 113 #if !PKU_QC_DEPTH_INTRA_UNI_D0195 108 114 , m_cSDCFlagSCModel ( 1, 1, SDC_NUM_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 115 #else 116 , m_cDepthModeModel ( 1, 1, DEPTH_MODE_NUM_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 117 , m_cDmmDeltaFlagModel ( 1, 1, DMM_DELTA_NUM_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 118 #endif 119 #if RWTH_SDC_CTX_SIMPL_D0032 120 , m_cSDCResidualFlagSCModel ( 1, 1, SDC_NUM_RESIDUAL_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 121 , m_cSDCResidualSCModel ( 1, 1, SDC_NUM_RESIDUAL_CTX , m_contextModels + m_numContextModels, m_numContextModels) 122 , m_cSDCPredModeSCModel ( 1, 3, SDC_NUM_PRED_MODE_CTX , m_contextModels + m_numContextModels, m_numContextModels) 123 #else 109 124 , m_cSDCResidualFlagSCModel ( 1, 2, SDC_NUM_RESIDUAL_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 110 125 , m_cSDCResidualSignFlagSCModel ( 1, 2, SDC_NUM_SIGN_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 111 126 , m_cSDCResidualSCModel ( 1, 2, SDC_NUM_RESIDUAL_CTX , m_contextModels + m_numContextModels, m_numContextModels) 112 127 , m_cSDCPredModeSCModel ( 1, 3, SDC_NUM_PRED_MODE_CTX , m_contextModels + m_numContextModels, m_numContextModels) 128 #endif 113 129 #endif 114 130 { … … 161 177 #if H3D_IVRP 162 178 m_cResPredFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_RES_PRED_FLAG ); 179 #endif 180 #if QC_ARP_D0177 181 m_cCUPUARPW.initBuffer ( sliceType, qp, (UChar*)INIT_ARPW ); 163 182 #endif 164 183 m_cCUAlfCtrlFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_ALF_CTRL_FLAG ); … … 184 203 m_cALFUvlcSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_ALF_UVLC ); 185 204 m_cALFSvlcSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_ALF_SVLC ); 205 #if LGE_SAO_MIGRATION_D0091 206 m_cSaoMergeSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_SAO_MERGE_FLAG ); 207 m_cSaoTypeIdxSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_SAO_TYPE_IDX ); 208 #else 186 209 m_cSaoFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_SAO_FLAG ); 187 210 m_cSaoUvlcSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_SAO_UVLC ); … … 190 213 m_cSaoMergeUpSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_SAO_MERGE_UP_FLAG ); 191 214 m_cSaoTypeIdxSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_SAO_TYPE_IDX ); 215 #endif 192 216 193 217 m_cCUTransSubdivFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_TRANS_SUBDIV_FLAG ); … … 200 224 m_uiLastDQpNonZero = 0; 201 225 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX 226 #if !PKU_QC_DEPTH_INTRA_UNI_D0195 202 227 m_cDmmFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_DMM_FLAG ); 203 228 m_cDmmModeSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_DMM_MODE ); 229 #endif 204 230 m_cDmmDataSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_DMM_DATA ); 205 231 #endif 206 232 #if RWTH_SDC_DLT_B0036 233 #if !PKU_QC_DEPTH_INTRA_UNI_D0195 207 234 m_cSDCFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_SDC_FLAG ); 235 #else 236 m_cDepthModeModel.initBuffer ( sliceType, qp, (UChar*)INIT_DEPTHMODE_FLAG ); 237 m_cDmmDeltaFlagModel.initBuffer ( sliceType, qp, (UChar*)INIT_DMMDELTA_FLAG ); 238 #endif 208 239 m_cSDCResidualFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_SDC_RESIDUAL_FLAG ); 209 240 m_cSDCResidualSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_SDC_RESIDUAL ); 241 #if !RWTH_SDC_CTX_SIMPL_D0032 210 242 m_cSDCResidualSignFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_SDC_SIGN_FLAG ); 243 #endif 211 244 m_cSDCPredModeSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_SDC_PRED_MODE ); 212 245 #endif … … 248 281 #if H3D_IVRP 249 282 m_cResPredFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_RES_PRED_FLAG ); 283 #endif 284 #if QC_ARP_D0177 285 m_cCUPUARPW.initBuffer ( eSliceType, iQp, (UChar*)INIT_ARPW ); 250 286 #endif 251 287 m_cCUAlfCtrlFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_ALF_CTRL_FLAG ); … … 271 307 m_cALFUvlcSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_ALF_UVLC ); 272 308 m_cALFSvlcSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_ALF_SVLC ); 309 #if LGE_SAO_MIGRATION_D0091 310 m_cSaoMergeSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SAO_MERGE_FLAG ); 311 m_cSaoTypeIdxSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SAO_TYPE_IDX ); 312 #else 273 313 m_cSaoFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SAO_FLAG ); 274 314 m_cSaoUvlcSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SAO_UVLC ); … … 277 317 m_cSaoMergeUpSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SAO_MERGE_UP_FLAG ); 278 318 m_cSaoTypeIdxSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SAO_TYPE_IDX ); 319 #endif 279 320 m_cCUTransSubdivFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_TRANS_SUBDIV_FLAG ); 280 321 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX 322 #if !PKU_QC_DEPTH_INTRA_UNI_D0195 281 323 m_cDmmFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DMM_FLAG ); 282 324 m_cDmmModeSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DMM_MODE ); 325 #endif 283 326 m_cDmmDataSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DMM_DATA ); 284 327 #endif 285 328 #if RWTH_SDC_DLT_B0036 329 #if !PKU_QC_DEPTH_INTRA_UNI_D0195 286 330 m_cSDCFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SDC_FLAG ); 331 #else 332 m_cDepthModeModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DEPTHMODE_FLAG ); 333 m_cDmmDeltaFlagModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DMMDELTA_FLAG ); 334 #endif 287 335 m_cSDCResidualFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SDC_RESIDUAL_FLAG ); 288 336 m_cSDCResidualSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SDC_RESIDUAL ); 337 #if !RWTH_SDC_CTX_SIMPL_D0032 289 338 m_cSDCResidualSignFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SDC_SIGN_FLAG ); 339 #endif 290 340 m_cSDCPredModeSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SDC_PRED_MODE ); 291 341 #endif … … 869 919 pcCU->setPredModeSubParts( (PredMode)iPredMode, uiAbsPartIdx, uiDepth ); 870 920 } 871 921 #if PKU_QC_DEPTH_INTRA_UNI_D0195 922 Void TDecSbac::parseDepthIntraMode ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 923 { 924 UInt uiPuIdx = ( pcCU->getWidth(uiAbsPartIdx) == 64 )? 2 : ( ( pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_NxN && pcCU->getWidth(uiAbsPartIdx) == 8 )? 0 : 1); 925 UInt uiDir = 0; 926 Bool bSDCFlag = 0; 927 UInt uiSymbol = 1; 928 UInt uiCode = 0 ; 929 UInt uiBinNum = 0; 930 UInt uiCtxDepthMode = 0; 931 if ( uiPuIdx ==2 ) 932 { 933 while(uiBinNum<2 && uiSymbol) 934 { 935 uiCtxDepthMode = uiPuIdx*3 + uiBinNum; 936 m_pcTDecBinIf->decodeBin(uiSymbol,m_cDepthModeModel.get(0,0,uiCtxDepthMode)); 937 uiCode = (uiCode<<1)+uiSymbol; 938 uiBinNum++; 939 } 940 if (uiCode == 0) { uiDir = PLANAR_IDX; bSDCFlag = 1;} 941 else if (uiCode == 2) { uiDir = 0; bSDCFlag = 0;} 942 else if (uiCode == 3) { uiDir = DC_IDX; bSDCFlag = 1;} 943 } 944 else if ( uiPuIdx ==0 ) 945 { 946 while(uiBinNum<3 && uiSymbol) 947 { 948 uiCtxDepthMode = uiPuIdx*3 + ( uiBinNum >= 2? 2 : uiBinNum ); 949 m_pcTDecBinIf->decodeBin(uiSymbol,m_cDepthModeModel.get(0,0,uiCtxDepthMode)); 950 uiCode = (uiCode<<1)+uiSymbol; 951 uiBinNum++; 952 } 953 if (uiCode == 0) { uiDir = 0; bSDCFlag = 0;} 954 else if (uiCode == 2) { uiDir = DMM_WEDGE_FULL_IDX; bSDCFlag = 0;} 955 else if (uiCode == 6) { uiDir = DMM_WEDGE_PREDTEX_IDX; bSDCFlag = 0;} 956 else if (uiCode == 7) { uiDir = EDGE_INTRA_IDX; bSDCFlag = 0;} 957 } 958 else 959 { 960 uiCtxDepthMode = uiPuIdx*3 ; 961 m_pcTDecBinIf->decodeBin(uiSymbol,m_cDepthModeModel.get(0,0,uiCtxDepthMode)); 962 uiCode = (uiCode<<1)+uiSymbol; 963 if (!uiSymbol) 964 { 965 uiCtxDepthMode = uiPuIdx*3 + 1; 966 m_pcTDecBinIf->decodeBin(uiSymbol,m_cDepthModeModel.get(0,0,uiCtxDepthMode)); 967 uiCode = (uiCode<<1)+uiSymbol; 968 if (uiSymbol) 969 { 970 uiCtxDepthMode = uiPuIdx*3 + 2; 971 m_pcTDecBinIf->decodeBin(uiSymbol,m_cDepthModeModel.get(0,0,uiCtxDepthMode)); 972 uiCode = (uiCode<<1)+uiSymbol; 973 } 974 } 975 else 976 { 977 uiCtxDepthMode = uiPuIdx*3 + 1; 978 m_pcTDecBinIf->decodeBin(uiSymbol,m_cDepthModeModel.get(0,0,uiCtxDepthMode)); 979 uiCode = (uiCode<<1)+uiSymbol; 980 if (!uiSymbol) 981 { 982 uiCtxDepthMode = uiPuIdx*3 + 2; 983 m_pcTDecBinIf->decodeBin(uiSymbol,m_cDepthModeModel.get(0,0,uiCtxDepthMode)); 984 uiCode = (uiCode<<1)+uiSymbol; 985 } 986 else 987 { 988 uiBinNum = 0; 989 while( uiSymbol && uiBinNum<3 ) 990 { 991 uiCtxDepthMode = uiPuIdx*3 + 2; 992 m_pcTDecBinIf->decodeBin(uiSymbol,m_cDepthModeModel.get(0,0,uiCtxDepthMode)); 993 uiCode = (uiCode<<1)+uiSymbol; 994 uiBinNum++; 995 } 996 } 997 } 998 if (uiCode == 0) { uiDir = PLANAR_IDX; bSDCFlag = 1;} 999 else if (uiCode == 2) { uiDir = 5; bSDCFlag = 0;} 1000 else if (uiCode == 3) { uiDir = DMM_WEDGE_FULL_IDX; bSDCFlag = 1;} 1001 else if (uiCode == 4) { uiDir = DMM_WEDGE_FULL_IDX; bSDCFlag = 0;} 1002 else if (uiCode == 5) { uiDir = DMM_CONTOUR_PREDTEX_IDX; bSDCFlag = 0;} 1003 else if (uiCode == 6) { uiDir = DMM_WEDGE_PREDTEX_IDX; bSDCFlag = 0;} 1004 else if (uiCode == 14) { uiDir = DC_IDX; bSDCFlag = 1;} 1005 else if (uiCode == 31) { uiDir = DMM_WEDGE_PREDDIR_IDX; bSDCFlag = 0;} 1006 else if (uiCode == 30) { uiDir = EDGE_INTRA_IDX; bSDCFlag = 0;} 1007 } 1008 pcCU->setLumaIntraDirSubParts( (UChar)uiDir, uiAbsPartIdx, uiDepth ); 1009 pcCU->setSDCFlagSubParts(bSDCFlag, uiAbsPartIdx, 0, uiDepth); 1010 } 1011 Void TDecSbac::parseDepthModelingTable ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 1012 { 1013 parseDepthIntraMode(pcCU,uiAbsPartIdx,uiDepth); 1014 1015 UInt uiDir = pcCU->getLumaIntraDir(uiAbsPartIdx); 1016 Bool bSdcFlag = pcCU->getSDCAvailable(uiAbsPartIdx) && pcCU->getSDCFlag(uiAbsPartIdx); 1017 Bool bDmmFlag = (uiDir >= NUM_INTRA_MODE && uiDir < EDGE_INTRA_IDX &&(!bSdcFlag))? 1:0; 1018 if (uiDir >= NUM_INTRA_MODE && uiDir < EDGE_INTRA_IDX)//DMM modes and SDC DMM1 1019 { 1020 if( uiDir == DMM_WEDGE_FULL_IDX ) { xParseWedgeFullInfo ( pcCU, uiAbsPartIdx, uiDepth ); } 1021 else if( uiDir == DMM_WEDGE_PREDTEX_IDX ) { xParseWedgePredTexInfo ( pcCU, uiAbsPartIdx, uiDepth ); } 1022 else if( uiDir == DMM_WEDGE_PREDDIR_IDX ) { xParseWedgePredDirInfo ( pcCU, uiAbsPartIdx, uiDepth ); } 1023 } 1024 else if(uiDir >= EDGE_INTRA_IDX)//CCM mode 1025 { 1026 xParseEdgeIntraInfo( pcCU, uiAbsPartIdx, uiDepth ); 1027 } 1028 1029 UInt uiSymbol; 1030 if (bDmmFlag) 1031 { 1032 if (bDmmFlag) 1033 { 1034 m_pcTDecBinIf->decodeBin( uiSymbol , m_cDmmDeltaFlagModel.get(0, 0, 0) ); 1035 uiDir += uiSymbol; 1036 } 1037 if (uiSymbol) 1038 { 1039 UInt uiDC; 1040 Int iDC = 0,iDC1 = 0,iDC2 = 0; 1041 for ( Int i = 0; i <2; i++ ) 1042 { 1043 xReadExGolombLevel( uiDC, m_cDmmDataSCModel.get(0, 0, 1) ); 1044 iDC = uiDC; 1045 if ( uiDC ) 1046 { 1047 UInt uiSign; 1048 m_pcTDecBinIf->decodeBinEP( uiSign ); 1049 if ( uiSign ) 1050 { 1051 iDC = -iDC; 1052 } 1053 } 1054 if ( i == 0 ) { iDC1 = iDC; } 1055 else { iDC2 = iDC; } 1056 } 1057 1058 if( uiDir == DMM_WEDGE_FULL_D_IDX ) 1059 { 1060 pcCU->setWedgeFullDeltaDC1SubParts( iDC1, uiAbsPartIdx, uiDepth ); 1061 pcCU->setWedgeFullDeltaDC2SubParts( iDC2, uiAbsPartIdx, uiDepth ); 1062 } 1063 else if( uiDir == DMM_WEDGE_PREDDIR_D_IDX ) 1064 { 1065 pcCU->setWedgePredDirDeltaDC1SubParts( iDC1, uiAbsPartIdx, uiDepth ); 1066 pcCU->setWedgePredDirDeltaDC2SubParts( iDC2, uiAbsPartIdx, uiDepth ); 1067 } 1068 else if( uiDir == DMM_WEDGE_PREDTEX_D_IDX) 1069 { 1070 pcCU->setWedgePredTexDeltaDC1SubParts( iDC1, uiAbsPartIdx, uiDepth ); 1071 pcCU->setWedgePredTexDeltaDC2SubParts( iDC2, uiAbsPartIdx, uiDepth ); 1072 } 1073 else if (uiDir== DMM_CONTOUR_PREDTEX_D_IDX ) 1074 { 1075 pcCU->setContourPredTexDeltaDC1SubParts( iDC1, uiAbsPartIdx, uiDepth ); 1076 pcCU->setContourPredTexDeltaDC2SubParts( iDC2, uiAbsPartIdx, uiDepth ); 1077 } 1078 } 1079 } 1080 else if (uiDir >= EDGE_INTRA_IDX) 1081 { 1082 m_pcTDecBinIf->decodeBin( uiSymbol, m_cEdgeIntraDeltaDCSCModel.get(0, 0, 0) ); 1083 if( uiSymbol ) 1084 { 1085 uiDir = EDGE_INTRA_DELTA_IDX; 1086 Int iDeltaDC = 0,iDeltaDC0 = 0,iDeltaDC1 = 0; 1087 for (Int i = 0; i<2; i++) 1088 { 1089 xReadExGolombLevel( (UInt &) iDeltaDC, m_cEdgeIntraDeltaDCSCModel.get(0, 0, 1) ); 1090 if( iDeltaDC != 0 ) 1091 { 1092 UInt uiSign; 1093 m_pcTDecBinIf->decodeBinEP( uiSign ); 1094 if ( uiSign ) 1095 { 1096 iDeltaDC = -iDeltaDC; 1097 } 1098 } 1099 if ( i == 0 ) { iDeltaDC0 = iDeltaDC; } 1100 else { iDeltaDC1 = iDeltaDC; } 1101 } 1102 1103 pcCU->setEdgeDeltaDC0( uiAbsPartIdx, iDeltaDC0 ); 1104 pcCU->setEdgeDeltaDC1( uiAbsPartIdx, iDeltaDC1 ); 1105 } 1106 } 1107 else if(bSdcFlag)//SDC mode 1108 { 1109 assert(pcCU->getPartitionSize(uiAbsPartIdx)!=SIZE_NxN); 1110 pcCU->setTrIdxSubParts(0, uiAbsPartIdx, uiDepth); 1111 pcCU->setCbfSubParts(1, 1, 1, uiAbsPartIdx, uiDepth); 1112 1113 UInt uiNumSegments = ( uiDir == DC_IDX || uiDir == PLANAR_IDX )? 1 : 2; 1114 for (int uiSeg=0; uiSeg<uiNumSegments; uiSeg++) 1115 { 1116 parseSDCResidualData(pcCU, uiAbsPartIdx, uiDepth, uiSeg); 1117 } 1118 } 1119 1120 pcCU->setLumaIntraDirSubParts( (UChar)uiDir, uiAbsPartIdx, uiDepth ); 1121 } 1122 #endif 872 1123 Void TDecSbac::parseIntraDirLumaAng ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 873 1124 { 874 1125 UInt uiSymbol; 875 1126 Int intraPredMode; 876 1127 #if PKU_QC_DEPTH_INTRA_UNI_D0195 1128 if (pcCU->getSlice()->getSPS()->isDepth()) 1129 { 1130 parseDepthModelingTable(pcCU, uiAbsPartIdx, uiDepth); 1131 } 1132 if (pcCU->getLumaIntraDir(uiAbsPartIdx)<NUM_INTRA_MODE && !pcCU->getSDCFlag(uiAbsPartIdx)) 1133 { 1134 #else 877 1135 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX 878 1136 UInt uiFlag = 0; … … 928 1186 } 929 1187 #endif 930 1188 #endif 931 1189 Int uiPreds[3] = {-1, -1, -1}; 932 1190 Int uiPredNum = pcCU->getIntraDirLumaPredictor(uiAbsPartIdx, uiPreds); 1191 #if !PKU_QC_DEPTH_INTRA_UNI_D0195 933 1192 #if LGE_EDGE_INTRA_A0070 934 1193 UInt uiCheckBit = 0; 935 1194 #endif 1195 #endif 936 1196 937 1197 m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUIntraPredSCModel.get( 0, 0, 0) ); … … 953 1213 954 1214 m_pcTDecBinIf->decodeBinsEP( uiSymbol, 5 ); 1215 #if !PKU_QC_DEPTH_INTRA_UNI_D0195 955 1216 #if LGE_EDGE_INTRA_A0070 956 1217 if (bCodeEdgeIntra) … … 963 1224 } 964 1225 } 1226 #endif 965 1227 #endif 966 1228 intraPredMode = uiSymbol; … … 979 1241 std::swap(uiPreds[1], uiPreds[2]); 980 1242 } 1243 #if !PKU_QC_DEPTH_INTRA_UNI_D0195 981 1244 #if LGE_EDGE_INTRA_A0070 982 1245 if ( intraPredMode != EDGE_INTRA_IDX) 983 1246 { 984 1247 #endif 1248 #endif 985 1249 for ( Int i = 0; i < uiPredNum; i++ ) 986 1250 { 987 1251 intraPredMode += ( intraPredMode >= uiPreds[i] ); 988 1252 } 1253 #if !PKU_QC_DEPTH_INTRA_UNI_D0195 989 1254 #if LGE_EDGE_INTRA_A0070 990 1255 } 991 1256 #endif 992 } 993 1257 #endif 1258 } 1259 1260 #if !PKU_QC_DEPTH_INTRA_UNI_D0195 994 1261 #if LGE_EDGE_INTRA_A0070 995 1262 if( intraPredMode == EDGE_INTRA_IDX ) … … 1035 1302 } 1036 1303 #endif 1037 1038 1304 pcCU->setLumaIntraDirSubParts( (UChar)intraPredMode, uiAbsPartIdx, uiDepth ); 1305 #else 1306 pcCU->setLumaIntraDirSubParts( (UChar)intraPredMode, uiAbsPartIdx, uiDepth ); 1307 } 1308 #endif 1039 1309 } 1040 1310 … … 1672 1942 } 1673 1943 1674 1944 #if LGE_SAO_MIGRATION_D0091 1945 Void TDecSbac::parseSaoMaxUvlc ( UInt& val, UInt maxSymbol ) 1946 { 1947 if (maxSymbol == 0) 1948 { 1949 val = 0; 1950 return; 1951 } 1952 1953 UInt code; 1954 Int i; 1955 m_pcTDecBinIf->decodeBinEP( code ); 1956 if ( code == 0 ) 1957 { 1958 val = 0; 1959 return; 1960 } 1961 1962 i=1; 1963 while (1) 1964 { 1965 m_pcTDecBinIf->decodeBinEP( code ); 1966 if ( code == 0 ) 1967 { 1968 break; 1969 } 1970 i++; 1971 if (i == maxSymbol) 1972 { 1973 break; 1974 } 1975 } 1976 1977 val = i; 1978 } 1979 1980 Void TDecSbac::parseSaoUflc (UInt uiLength, UInt& riVal) 1981 { 1982 m_pcTDecBinIf->decodeBinsEP ( riVal, uiLength ); 1983 } 1984 1985 Void TDecSbac::parseSaoMerge (UInt& ruiVal) 1986 { 1987 UInt uiCode; 1988 m_pcTDecBinIf->decodeBin( uiCode, m_cSaoMergeSCModel.get( 0, 0, 0 ) ); 1989 ruiVal = (Int)uiCode; 1990 } 1991 1992 Void TDecSbac::parseSaoTypeIdx (UInt& ruiVal) 1993 { 1994 UInt uiCode; 1995 m_pcTDecBinIf->decodeBin( uiCode, m_cSaoTypeIdxSCModel.get( 0, 0, 0 ) ); 1996 if (uiCode == 0) 1997 { 1998 ruiVal = 0; 1999 } 2000 else 2001 { 2002 m_pcTDecBinIf->decodeBinEP( uiCode ); 2003 if (uiCode == 0) 2004 { 2005 ruiVal = 5; 2006 } 2007 else 2008 { 2009 ruiVal = 1; 2010 } 2011 } 2012 } 2013 2014 inline Void copySaoOneLcuParam(SaoLcuParam* psDst, SaoLcuParam* psSrc) 2015 { 2016 Int i; 2017 psDst->partIdx = psSrc->partIdx; 2018 psDst->typeIdx = psSrc->typeIdx; 2019 if (psDst->typeIdx != -1) 2020 { 2021 psDst->subTypeIdx = psSrc->subTypeIdx ; 2022 psDst->length = psSrc->length; 2023 for (i=0;i<psDst->length;i++) 2024 { 2025 psDst->offset[i] = psSrc->offset[i]; 2026 } 2027 } 2028 else 2029 { 2030 psDst->length = 0; 2031 for (i=0;i<SAO_BO_LEN;i++) 2032 { 2033 psDst->offset[i] = 0; 2034 } 2035 } 2036 } 2037 2038 Void TDecSbac::parseSaoOffset(SaoLcuParam* psSaoLcuParam, UInt compIdx) 2039 { 2040 UInt uiSymbol; 2041 static Int iTypeLength[MAX_NUM_SAO_TYPE] = 2042 { 2043 SAO_EO_LEN, 2044 SAO_EO_LEN, 2045 SAO_EO_LEN, 2046 SAO_EO_LEN, 2047 SAO_BO_LEN 2048 }; 2049 2050 if (compIdx==2) 2051 { 2052 uiSymbol = (UInt)( psSaoLcuParam->typeIdx + 1); 2053 } 2054 else 2055 { 2056 parseSaoTypeIdx(uiSymbol); 2057 } 2058 psSaoLcuParam->typeIdx = (Int)uiSymbol - 1; 2059 2060 if (uiSymbol) 2061 { 2062 psSaoLcuParam->length = iTypeLength[psSaoLcuParam->typeIdx]; 2063 #if FULL_NBIT 2064 Int offsetTh = 1 << ( min((Int)(g_uiBitDepth + (g_uiBitDepth-8)-5),5) ); 2065 #else 2066 Int offsetTh = 1 << ( min((Int)(g_uiBitDepth + g_uiBitIncrement-5),5) ); 2067 #endif 2068 2069 if( psSaoLcuParam->typeIdx == SAO_BO ) 2070 { 2071 for(Int i=0; i< psSaoLcuParam->length; i++) 2072 { 2073 parseSaoMaxUvlc(uiSymbol, offsetTh -1 ); 2074 psSaoLcuParam->offset[i] = uiSymbol; 2075 } 2076 for(Int i=0; i< psSaoLcuParam->length; i++) 2077 { 2078 if (psSaoLcuParam->offset[i] != 0) 2079 { 2080 m_pcTDecBinIf->decodeBinEP ( uiSymbol); 2081 if (uiSymbol) 2082 { 2083 psSaoLcuParam->offset[i] = -psSaoLcuParam->offset[i] ; 2084 } 2085 } 2086 } 2087 parseSaoUflc(5, uiSymbol ); 2088 psSaoLcuParam->subTypeIdx = uiSymbol; 2089 } 2090 else if( psSaoLcuParam->typeIdx < 4 ) 2091 { 2092 parseSaoMaxUvlc(uiSymbol, offsetTh -1 ); psSaoLcuParam->offset[0] = uiSymbol; 2093 parseSaoMaxUvlc(uiSymbol, offsetTh -1 ); psSaoLcuParam->offset[1] = uiSymbol; 2094 parseSaoMaxUvlc(uiSymbol, offsetTh -1 ); psSaoLcuParam->offset[2] = -(Int)uiSymbol; 2095 parseSaoMaxUvlc(uiSymbol, offsetTh -1 ); psSaoLcuParam->offset[3] = -(Int)uiSymbol; 2096 if (compIdx != 2) 2097 { 2098 parseSaoUflc(2, uiSymbol ); 2099 psSaoLcuParam->subTypeIdx = uiSymbol; 2100 psSaoLcuParam->typeIdx += psSaoLcuParam->subTypeIdx; 2101 } 2102 } 2103 } 2104 else 2105 { 2106 psSaoLcuParam->length = 0; 2107 } 2108 } 2109 2110 Void TDecSbac::parseSaoOneLcuInterleaving(Int rx, Int ry, SAOParam* pSaoParam, TComDataCU* pcCU, Int iCUAddrInSlice, Int iCUAddrUpInSlice, Int allowMergeLeft, Int allowMergeUp) 2111 { 2112 Int iAddr = pcCU->getAddr(); 2113 UInt uiSymbol; 2114 2115 for (Int iCompIdx=0; iCompIdx<3; iCompIdx++) 2116 { 2117 pSaoParam->saoLcuParam[iCompIdx][iAddr].mergeUpFlag = 0; 2118 pSaoParam->saoLcuParam[iCompIdx][iAddr].mergeLeftFlag = 0; 2119 pSaoParam->saoLcuParam[iCompIdx][iAddr].subTypeIdx = 0; 2120 pSaoParam->saoLcuParam[iCompIdx][iAddr].typeIdx =-1; 2121 pSaoParam->saoLcuParam[iCompIdx][iAddr].offset[0] = 0; 2122 pSaoParam->saoLcuParam[iCompIdx][iAddr].offset[1] = 0; 2123 pSaoParam->saoLcuParam[iCompIdx][iAddr].offset[2] = 0; 2124 pSaoParam->saoLcuParam[iCompIdx][iAddr].offset[3] = 0; 2125 } 2126 if (pSaoParam->bSaoFlag[0] || pSaoParam->bSaoFlag[1] ) 2127 { 2128 if (rx>0 && iCUAddrInSlice!=0 && allowMergeLeft) 2129 { 2130 parseSaoMerge(uiSymbol); 2131 pSaoParam->saoLcuParam[0][iAddr].mergeLeftFlag = (Bool)uiSymbol; 2132 } 2133 if (pSaoParam->saoLcuParam[0][iAddr].mergeLeftFlag==0) 2134 { 2135 if ((ry > 0) && (iCUAddrUpInSlice>=0) && allowMergeUp) 2136 { 2137 parseSaoMerge(uiSymbol); 2138 pSaoParam->saoLcuParam[0][iAddr].mergeUpFlag = (Bool)uiSymbol; 2139 } 2140 } 2141 } 2142 2143 for (Int iCompIdx=0; iCompIdx<3; iCompIdx++) 2144 { 2145 if ((iCompIdx == 0 && pSaoParam->bSaoFlag[0]) || (iCompIdx > 0 && pSaoParam->bSaoFlag[1]) ) 2146 { 2147 if (rx>0 && iCUAddrInSlice!=0 && allowMergeLeft) 2148 { 2149 pSaoParam->saoLcuParam[iCompIdx][iAddr].mergeLeftFlag = pSaoParam->saoLcuParam[0][iAddr].mergeLeftFlag; 2150 } 2151 else 2152 { 2153 pSaoParam->saoLcuParam[iCompIdx][iAddr].mergeLeftFlag = 0; 2154 } 2155 2156 if (pSaoParam->saoLcuParam[iCompIdx][iAddr].mergeLeftFlag==0) 2157 { 2158 if ((ry > 0) && (iCUAddrUpInSlice>=0) && allowMergeUp) 2159 { 2160 pSaoParam->saoLcuParam[iCompIdx][iAddr].mergeUpFlag = pSaoParam->saoLcuParam[0][iAddr].mergeUpFlag; 2161 } 2162 else 2163 { 2164 pSaoParam->saoLcuParam[iCompIdx][iAddr].mergeUpFlag = 0; 2165 } 2166 2167 if (!pSaoParam->saoLcuParam[iCompIdx][iAddr].mergeUpFlag) 2168 { 2169 pSaoParam->saoLcuParam[2][iAddr].typeIdx = pSaoParam->saoLcuParam[1][iAddr].typeIdx; 2170 parseSaoOffset(&(pSaoParam->saoLcuParam[iCompIdx][iAddr]), iCompIdx); 2171 } 2172 else 2173 { 2174 copySaoOneLcuParam(&pSaoParam->saoLcuParam[iCompIdx][iAddr], &pSaoParam->saoLcuParam[iCompIdx][iAddr-pSaoParam->numCuInWidth]); 2175 } 2176 } 2177 else 2178 { 2179 copySaoOneLcuParam(&pSaoParam->saoLcuParam[iCompIdx][iAddr], &pSaoParam->saoLcuParam[iCompIdx][iAddr-1]); 2180 } 2181 } 2182 else 2183 { 2184 pSaoParam->saoLcuParam[iCompIdx][iAddr].typeIdx = -1; 2185 pSaoParam->saoLcuParam[iCompIdx][iAddr].subTypeIdx = 0; 2186 } 2187 } 2188 } 2189 #else 1675 2190 Void TDecSbac::parseSaoUvlc (UInt& ruiVal) 1676 2191 { … … 1909 2424 } 1910 2425 } 1911 2426 #endif 1912 2427 /** 1913 2428 - Initialize our contexts from the nominated source. … … 2235 2750 } 2236 2751 #endif 2237 2752 #if QC_ARP_D0177 2753 Void TDecSbac::parseARPW( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 2754 { 2755 UInt nMaxW = pcCU->getSlice()->getARPStepNum() - 1; 2756 #if !QC_ARP_WARNING_FIX 2757 assert (nMaxW >= 0); 2758 #endif 2759 UInt nW = 0; 2760 if( nMaxW > 0 ) 2761 { 2762 UInt nOffset = pcCU->getCTXARPWFlag(uiAbsPartIdx); 2763 #if !QC_ARP_WARNING_FIX 2764 assert( 0 <= nOffset && nOffset <= 2 ); 2765 #endif 2766 UInt uiCode = 0; 2767 m_pcTDecBinIf->decodeBin( uiCode , m_cCUPUARPW.get( 0, 0, 0 + nOffset ) ); 2768 nW = uiCode; 2769 if( nW == 1 ) 2770 { 2771 m_pcTDecBinIf->decodeBin( uiCode , m_cCUPUARPW.get( 0, 0, 3 ) ); 2772 nW += ( uiCode == 1 ); 2773 } 2774 } 2775 pcCU->setARPWSubParts( ( UChar )( nW ) , uiAbsPartIdx, uiDepth ); 2776 } 2777 #endif 2238 2778 #if LGE_EDGE_INTRA_A0070 2239 2779 Void TDecSbac::xParseEdgeIntraInfo( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) … … 2335 2875 2336 2876 #if RWTH_SDC_DLT_B0036 2877 #if !PKU_QC_DEPTH_INTRA_UNI_D0195 2337 2878 Void TDecSbac::parseSDCFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 2338 2879 { … … 2367 2908 { 2368 2909 UInt uiIsMostProb = 0; 2910 #if INTEL_SDC64_D0193 2911 if( !(pcCU->getWidth(uiAbsPartIdx) == 64 && i == 1)) 2912 #endif 2369 2913 m_pcTDecBinIf->decodeBin( uiIsMostProb, m_cSDCPredModeSCModel.get( 0, i, uiCtx ) ); 2370 2914 … … 2385 2929 pcCU->setLumaIntraDirSubParts((UChar)intraPredMode, uiAbsPartIdx, uiDepth); 2386 2930 } 2931 #endif 2387 2932 2388 2933 Void TDecSbac::parseSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiSegment ) … … 2398 2943 Int iIdx = 0; 2399 2944 2400 UInt uiMaxResidualBits = GetBitsPerDepthValue();2945 UInt uiMaxResidualBits = pcCU->getSlice()->getSPS()->getBitsPerDepthValue(); 2401 2946 assert( uiMaxResidualBits <= g_uiBitDepth ); 2402 2947 2948 #if RWTH_SDC_CTX_SIMPL_D0032 2949 m_pcTDecBinIf->decodeBin(uiResidual, m_cSDCResidualFlagSCModel.get( 0, 0, 0 ) ); 2950 #else 2403 2951 m_pcTDecBinIf->decodeBin(uiResidual, m_cSDCResidualFlagSCModel.get( 0, uiSegment, 0 ) ); 2952 #endif 2404 2953 2405 2954 if (uiResidual) 2406 2955 { 2407 2956 // decode residual sign bit 2957 #if RWTH_SDC_CTX_SIMPL_D0032 2958 m_pcTDecBinIf->decodeBinEP(uiSign); 2959 #else 2408 2960 m_pcTDecBinIf->decodeBin(uiSign, m_cSDCResidualSignFlagSCModel.get( 0, uiSegment, 0 ) ); 2961 #endif 2409 2962 2410 2963 // decode residual magnitude 2964 #if LGE_CONCATENATE_D0141 2965 //prefix part 2966 UInt uiCount = 0; 2967 UInt uiNumDepthValues = pcCU->getSlice()->getSPS()->getNumDepthValues(); 2968 UInt uiPrefixThreshold = ((uiNumDepthValues * 3) >> 2); 2969 for ( UInt ui = 0; ui < uiPrefixThreshold; ui++) 2970 { 2971 m_pcTDecBinIf->decodeBin( uiBit, m_cSDCResidualSCModel.get(0, 0, 0) ); 2972 if ( uiBit == 0 ) 2973 break; 2974 else 2975 uiCount++; 2976 } 2977 //suffix part 2978 if ( uiCount == uiPrefixThreshold ) 2979 { 2980 for ( UInt ui = 0; ui < ( (UInt)ceil( Log2(uiNumDepthValues - uiPrefixThreshold) ) ); ui++ ) 2981 { 2982 m_pcTDecBinIf->decodeBinEP( uiBit ); 2983 uiAbsIdx |= uiBit << ui; 2984 } 2985 uiAbsIdx += uiCount; 2986 } 2987 else 2988 uiAbsIdx = uiCount; 2989 #else 2411 2990 for (Int i=0; i<uiMaxResidualBits; i++) 2412 2991 { 2992 #if RWTH_SDC_CTX_SIMPL_D0032 2993 m_pcTDecBinIf->decodeBin(uiBit, m_cSDCResidualSCModel.get( 0, 0, i ) ); 2994 #else 2413 2995 m_pcTDecBinIf->decodeBin(uiBit, m_cSDCResidualSCModel.get( 0, uiSegment, i ) ); 2996 #endif 2414 2997 uiAbsIdx |= uiBit << i; 2415 2998 } 2999 #endif 2416 3000 2417 3001 uiAbsIdx += 1; -
trunk/source/Lib/TLibDecoder/TDecSbac.h
r332 r443 110 110 #endif 111 111 112 #if LGE_SAO_MIGRATION_D0091 113 Void parseSaoMaxUvlc ( UInt& val, UInt maxSymbol ); 114 Void parseSaoMerge ( UInt& ruiVal ); 115 Void parseSaoTypeIdx ( UInt& ruiVal ); 116 Void parseSaoUflc ( UInt uiLength, UInt& ruiVal ); 117 Void parseSaoOneLcuInterleaving(Int rx, Int ry, SAOParam* pSaoParam, TComDataCU* pcCU, Int iCUAddrInSlice, Int iCUAddrUpInSlice, Int allowMergeLeft, Int allowMergeUp); 118 Void parseSaoOffset (SaoLcuParam* psSaoLcuParam, UInt compIdx); 119 #else 112 120 Void parseSaoUvlc ( UInt& ruiVal ); 113 121 Void parseSaoSvlc ( Int& riVal ); … … 118 126 Void parseSaoOneLcuInterleaving(Int rx, Int ry, SAOParam* pSaoParam, TComDataCU* pcCU, Int iCUAddrInSlice, Int iCUAddrUpInSlice, Bool bLFCrossSliceBoundaryFlag); 119 127 Void parseSaoOffset (SaoLcuParam* psSaoLcuParam); 128 #endif 120 129 121 130 #if RWTH_SDC_DLT_B0036 131 #if !PKU_QC_DEPTH_INTRA_UNI_D0195 122 132 Void parseSDCFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 123 133 Void parseSDCPredMode ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 134 #endif 124 135 Void parseSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPart ); 125 136 #endif … … 176 187 Void parseResPredFlag ( TComDataCU* pcCU, Bool& rbResPredFlag, UInt uiAbsPartIdx, UInt uiDepth ); 177 188 #endif 189 #if QC_ARP_D0177 190 Void parseARPW ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 191 #endif 178 192 Void parsePartSize ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 179 193 Void parsePredMode ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 180 194 #if PKU_QC_DEPTH_INTRA_UNI_D0195 195 Void parseDepthIntraMode ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 196 Void parseDepthModelingTable( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 197 #endif 181 198 Void parseIntraDirLumaAng( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 182 199 … … 218 235 #if H3D_IVRP 219 236 ContextModel3DBuffer m_cResPredFlagSCModel; 237 #endif 238 #if QC_ARP_D0177 239 ContextModel3DBuffer m_cCUPUARPW; 220 240 #endif 221 241 ContextModel3DBuffer m_cCUPartSizeSCModel; … … 245 265 ContextModel3DBuffer m_cALFSvlcSCModel; 246 266 ContextModel3DBuffer m_cCUAMPSCModel; 267 #if LGE_SAO_MIGRATION_D0091 268 ContextModel3DBuffer m_cSaoMergeSCModel; 269 ContextModel3DBuffer m_cSaoTypeIdxSCModel; 270 #else 247 271 ContextModel3DBuffer m_cSaoFlagSCModel; 248 272 ContextModel3DBuffer m_cSaoUvlcSCModel; … … 251 275 ContextModel3DBuffer m_cSaoMergeUpSCModel; 252 276 ContextModel3DBuffer m_cSaoTypeIdxSCModel; 277 #endif 253 278 254 279 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX 280 #if !PKU_QC_DEPTH_INTRA_UNI_D0195 255 281 ContextModel3DBuffer m_cDmmFlagSCModel; 256 282 ContextModel3DBuffer m_cDmmModeSCModel; 283 #endif 257 284 ContextModel3DBuffer m_cDmmDataSCModel; 258 285 #endif … … 265 292 266 293 #if RWTH_SDC_DLT_B0036 294 #if !PKU_QC_DEPTH_INTRA_UNI_D0195 267 295 ContextModel3DBuffer m_cSDCFlagSCModel; 296 #else 297 ContextModel3DBuffer m_cDepthModeModel; 298 ContextModel3DBuffer m_cDmmDeltaFlagModel; 299 #endif 268 300 269 301 ContextModel3DBuffer m_cSDCResidualFlagSCModel; 302 #if !RWTH_SDC_CTX_SIMPL_D0032 270 303 ContextModel3DBuffer m_cSDCResidualSignFlagSCModel; 304 #endif 271 305 ContextModel3DBuffer m_cSDCResidualSCModel; 272 306 -
trunk/source/Lib/TLibDecoder/TDecSlice.cpp
r296 r443 286 286 g_bJustDoIt = g_bEncDecTraceEnable; 287 287 #endif 288 #if LGE_SAO_MIGRATION_D0091 289 if ( pcSlice->getSPS()->getUseSAO() && (pcSlice->getSaoEnabledFlag()||pcSlice->getSaoEnabledFlagChroma()) ) 290 { 291 SAOParam *saoParam = pcSlice->getAPS()->getSaoParam(); 292 saoParam->bSaoFlag[0] = pcSlice->getSaoEnabledFlag(); 293 if (iCUAddr == iStartCUAddr) 294 { 295 saoParam->bSaoFlag[1] = pcSlice->getSaoEnabledFlagChroma(); 296 } 297 Int numCuInWidth = saoParam->numCuInWidth; 298 Int cuAddrInSlice = iCUAddr - rpcPic->getPicSym()->getCUOrderMap(pcSlice->getSliceCurStartCUAddr()/rpcPic->getNumPartInCU()); 299 Int cuAddrUpInSlice = cuAddrInSlice - numCuInWidth; 300 Int rx = iCUAddr % numCuInWidth; 301 Int ry = iCUAddr / numCuInWidth; 302 Int allowMergeLeft = 1; 303 Int allowMergeUp = 1; 304 if (rx!=0) 305 { 306 if (rpcPic->getPicSym()->getTileIdxMap(iCUAddr-1) != rpcPic->getPicSym()->getTileIdxMap(iCUAddr)) 307 { 308 allowMergeLeft = 0; 309 } 310 } 311 if (ry!=0) 312 { 313 if (rpcPic->getPicSym()->getTileIdxMap(iCUAddr-numCuInWidth) != rpcPic->getPicSym()->getTileIdxMap(iCUAddr)) 314 { 315 allowMergeUp = 0; 316 } 317 } 318 pcSbacDecoder->parseSaoOneLcuInterleaving(rx, ry, saoParam,pcCU, cuAddrInSlice, cuAddrUpInSlice, allowMergeLeft, allowMergeUp); 319 } 320 #else 288 321 if ( pcSlice->getSPS()->getUseSAO() && pcSlice->getSaoInterleavingFlag() && pcSlice->getSaoEnabledFlag() ) 289 322 { … … 301 334 pcSbacDecoder->parseSaoOneLcuInterleaving(rx, ry, pcSlice->getAPS()->getSaoParam(),pcCU, cuAddrInSlice, cuAddrUpInSlice, pcSlice->getSPS()->getLFCrossSliceBoundaryFlag() ); 302 335 } 336 #endif 303 337 304 338 m_pcCuDecoder->decodeCU ( pcCU, uiIsLast ); -
trunk/source/Lib/TLibDecoder/TDecTop.cpp
r332 r443 403 403 m_cDepthMapGenerator.destroy(); 404 404 #endif 405 #if H3D_IVRP 405 #if H3D_IVRP & !QC_ARP_D0177 406 406 m_cResidualGenerator.destroy(); 407 407 #endif … … 420 420 , &m_cDepthMapGenerator 421 421 #endif 422 #if H3D_IVRP 422 #if H3D_IVRP & !QC_ARP_D0177 423 423 , &m_cResidualGenerator 424 424 #endif … … 434 434 #endif 435 435 #endif 436 #if H3D_IVRP 436 #if H3D_IVRP & !QC_ARP_D0177 437 437 m_cResidualGenerator.init( &m_cTrQuant, &m_cDepthMapGenerator ); 438 438 #endif … … 860 860 } 861 861 #endif 862 #if H3D_IVRP 862 #if H3D_IVRP & !QC_ARP_D0177 863 863 m_cResidualGenerator.create( true, m_apcSlicePilot->getSPS()->getPicWidthInLumaSamples(), m_apcSlicePilot->getSPS()->getPicHeightInLumaSamples(), g_uiMaxCUDepth, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiBitDepth + g_uiBitIncrement ); 864 864 #endif … … 1083 1083 std::vector<TComPic*> apcInterViewRefPics = m_tAppDecTop->getInterViewRefPics( m_viewId, pcSlice->getPOC(), m_isDepth, pcSlice->getSPS() ); 1084 1084 pcSlice->setRefPicListMvc( m_cListPic, apcInterViewRefPics ); 1085 1085 #if QC_ARP_D0177 1086 //pcSlice->setBaseViewRefPicList( m_tAppDecTop->getTDecTop( 0 , false )->getListPic() ); 1087 pcSlice->setARPStepNum(); 1088 if(pcSlice->getARPStepNum() > 1) 1089 { 1090 for(Int iViewIdx = 0; iViewIdx < pcSlice->getViewId(); iViewIdx ++ ) 1091 pcSlice->setBaseViewRefPicList( m_tAppDecTop->getTDecTop( iViewIdx, false )->getListPic(), iViewIdx ); 1092 } 1093 #endif 1086 1094 // For generalized B 1087 1095 // note: maybe not existed case (always L0 is copied to L1 if L1 is empty) … … 1214 1222 pcSlice->setRefPicBaseDepth(pcBaseDepthPic); 1215 1223 } 1224 #if !MERL_VSP_NBDV_RefVId_Fix_D0166 1216 1225 getTAppDecTop()->setBWVSPLUT( pcSlice, pcSlice->getViewId(), pcSlice->getPOC() ); // get the LUT for backward warping 1226 #else 1227 if (pcSlice->getViewId() != 0) 1228 { 1229 Bool isDepth = true; 1230 for(Int refviewId = 0; refviewId < (pcSlice->getViewId()); refviewId++) 1231 { 1232 if (m_tAppDecTop->getTDecTop( refviewId, isDepth )) 1233 { 1234 pcSlice->setListDepthPic(m_tAppDecTop->getTDecTop( refviewId, isDepth )->getListPic(), refviewId); // The list will store only the depth pictures 1235 } 1236 getTAppDecTop()->setBWVSPLUT( refviewId, pcSlice, pcSlice->getViewId(), pcSlice->getPOC() ); // get the LUT for backward warping 1237 } 1238 } 1239 #endif 1217 1240 #endif 1218 1241 -
trunk/source/Lib/TLibDecoder/TDecTop.h
r296 r443 213 213 TComDepthMapGenerator m_cDepthMapGenerator; 214 214 #endif 215 #if H3D_IVRP 215 #if H3D_IVRP & !QC_ARP_D0177 216 216 TComResidualGenerator m_cResidualGenerator; 217 217 #endif
Note: See TracChangeset for help on using the changeset viewer.