Changeset 833 in 3DVCSoftware for trunk/source/Lib/TLibDecoder
- Timestamp:
- 7 Feb 2014, 20:31:12 (11 years ago)
- Location:
- trunk/source/Lib/TLibDecoder
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/Lib/TLibDecoder/TDecCAVLC.cpp
r773 r833 1697 1697 READ_FLAG( uiCode, "iv_mv_pred_flag[i]"); pcVPS->setIvMvPredFlag ( i, uiCode == 1 ? true : false ); 1698 1698 #if H_3D_SPIVMP 1699 #if SEC_SPIVMP_MCP_SIZE_G0077 1700 READ_UVLC (uiCode, "log2_sub_PU_size_minus3"); pcVPS->setSubPULog2Size(i, uiCode+3); 1701 #else 1699 1702 READ_UVLC (uiCode, "log2_sub_PU_size_minus2"); pcVPS->setSubPULog2Size(i, uiCode+2); 1703 #endif 1700 1704 #endif 1701 1705 #endif … … 1710 1714 READ_FLAG( uiCode, "view_synthesis_pred_flag[i]"); pcVPS->setViewSynthesisPredFlag( i, uiCode == 1 ? true : false ); 1711 1715 #endif 1716 #if H_3D_DBBP 1717 READ_FLAG( uiCode, "use_dbbp_flag[i]" ); pcVPS->setUseDBBP( i, uiCode == 1 ? true : false ); 1718 #endif 1712 1719 } 1713 1720 else … … 1722 1729 if (i!=1) 1723 1730 { 1731 #if SEC_SPIVMP_MCP_SIZE_G0077 1732 READ_UVLC (uiCode, "log2_sub_PU_size_minus3[i]"); pcVPS->setSubPULog2Size(i, uiCode+3); 1733 #else 1724 1734 READ_UVLC (uiCode, "log2_sub_PU_size_minus2[i]"); pcVPS->setSubPULog2Size(i, uiCode+2); 1735 #endif 1725 1736 } 1726 1737 #endif … … 1762 1773 } 1763 1774 } 1764 1775 #if QC_SPIVMP_MPI_G0119 1776 READ_UVLC (uiCode, "log2_sub_PU_MPI_size_minus3"); pcVPS->setSubPUMPILog2Size( uiCode + 3 ); 1777 #endif 1765 1778 READ_FLAG( uiCode, "iv_mv_scaling_flag"); pcVPS->setIvMvScalingFlag( uiCode == 1 ? true : false ); 1766 1779 } … … 2774 2787 #endif 2775 2788 #if H_3D_INTER_SDC 2789 #if QC_SDC_UNIFY_G0130 2790 Void TDecCavlc::parseDeltaDC( TComDataCU* /*pcCU*/, UInt /*uiAbsPartIdx*/, UInt /*uiDepth*/ ) 2791 { 2792 assert(0); 2793 } 2794 2795 Void TDecCavlc::parseSDCFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 2796 { 2797 assert(0); 2798 } 2799 #else 2776 2800 Void TDecCavlc::parseInterSDCFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 2777 2801 { … … 2783 2807 assert(0); 2784 2808 } 2809 #endif 2810 #endif 2811 #if H_3D_DBBP 2812 Void TDecCavlc::parseDBBPFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 2813 { 2814 assert(0); 2815 } 2785 2816 #endif 2786 2817 // ==================================================================================================================== -
trunk/source/Lib/TLibDecoder/TDecCAVLC.h
r773 r833 124 124 #endif 125 125 #if H_3D_INTER_SDC 126 #if QC_SDC_UNIFY_G0130 127 Void parseDeltaDC ( TComDataCU* pcCU, UInt absPartIdx, UInt depth ); 128 Void parseSDCFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 129 #else 126 130 Void parseInterSDCFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 127 131 Void parseInterSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPart ); 132 #endif 133 #endif 134 #if H_3D_DBBP 135 Void parseDBBPFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 128 136 #endif 129 137 Void parseSplitFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); -
trunk/source/Lib/TLibDecoder/TDecCu.cpp
r773 r833 50 50 m_ppcYuvReco = NULL; 51 51 m_ppcCU = NULL; 52 #if H_3D_DBBP 53 m_ppcYuvRecoDBBP = NULL; 54 #endif 52 55 } 53 56 … … 75 78 m_ppcYuvReco = new TComYuv*[m_uiMaxDepth-1]; 76 79 m_ppcCU = new TComDataCU*[m_uiMaxDepth-1]; 80 #if H_3D_DBBP 81 m_ppcYuvRecoDBBP = new TComYuv*[m_uiMaxDepth-1]; 82 #endif 77 83 78 84 UInt uiNumPartitions; … … 86 92 m_ppcYuvReco[ui] = new TComYuv; m_ppcYuvReco[ui]->create( uiWidth, uiHeight ); 87 93 m_ppcCU [ui] = new TComDataCU; m_ppcCU [ui]->create( uiNumPartitions, uiWidth, uiHeight, true, uiMaxWidth >> (m_uiMaxDepth - 1) ); 94 #if H_3D_DBBP 95 m_ppcYuvRecoDBBP[ui] = new TComYuv; m_ppcYuvRecoDBBP[ui]->create( uiWidth, uiHeight ); 96 #endif 88 97 } 89 98 … … 106 115 m_ppcYuvReco[ui]->destroy(); delete m_ppcYuvReco[ui]; m_ppcYuvReco[ui] = NULL; 107 116 m_ppcCU [ui]->destroy(); delete m_ppcCU [ui]; m_ppcCU [ui] = NULL; 117 #if H_3D_DBBP 118 m_ppcYuvRecoDBBP[ui]->destroy(); delete m_ppcYuvRecoDBBP[ui]; m_ppcYuvRecoDBBP[ui] = NULL; 119 #endif 108 120 } 109 121 … … 111 123 delete [] m_ppcYuvReco; m_ppcYuvReco = NULL; 112 124 delete [] m_ppcCU ; m_ppcCU = NULL; 125 #if H_3D_DBBP 126 delete [] m_ppcYuvRecoDBBP; m_ppcYuvRecoDBBP = NULL; 127 #endif 113 128 } 114 129 … … 213 228 DTRACE_CU("cqtDepth" , uiDepth) 214 229 #endif 230 215 231 TComSlice * pcSlice = pcCU->getPic()->getSlice(pcCU->getPic()->getCurrSliceIdx()); 216 232 Bool bStartInCU = pcCU->getSCUAddr()+uiAbsPartIdx+uiCurNumParts>pcSlice->getSliceSegmentCurStartCUAddr()&&pcCU->getSCUAddr()+uiAbsPartIdx<pcSlice->getSliceSegmentCurStartCUAddr(); … … 276 292 #endif 277 293 294 295 #if MTK_DDD_G0063 296 pcCU->setUseDDD( false, uiAbsPartIdx, uiDepth ); 297 #endif 298 278 299 if( (g_uiMaxCUWidth>>uiDepth) >= pcCU->getSlice()->getPPS()->getMinCuDQPSize() && pcCU->getSlice()->getPPS()->getUseDQP()) 279 300 { … … 318 339 if( pcCU->getSlice()->getIsDepth()) 319 340 { 341 #if SEC_DEPTH_DV_DERIVAITON_G0074 342 DvInfo.bDV = m_ppcCU[uiDepth]->getDispforDepth(0, 0, &DvInfo); 343 #else 320 344 DvInfo.bDV = m_ppcCU[uiDepth]->getDispNeighBlocks(0, 0, &DvInfo); 345 #endif 321 346 } 322 347 else … … 390 415 UInt uiMergeIndex = pcCU->getMergeIndex(uiAbsPartIdx); 391 416 417 #if !SEC_IC_ARP_SIG_G0072 392 418 #if H_3D_IC 393 419 m_pcEntropyDecoder->decodeICFlag( pcCU, uiAbsPartIdx, uiDepth ); 394 420 #endif 421 #endif 395 422 #if H_3D_ARP 396 423 m_pcEntropyDecoder->decodeARPW( pcCU , uiAbsPartIdx , uiDepth ); 424 #endif 425 #if SEC_IC_ARP_SIG_G0072 426 #if H_3D_IC 427 m_pcEntropyDecoder->decodeICFlag( pcCU, uiAbsPartIdx, uiDepth ); 428 #endif 397 429 #endif 398 430 … … 434 466 pcCU->setInterDirSubParts( uhInterDirNeighbours[uiMergeIndex], uiAbsPartIdx, 0, uiDepth ); 435 467 468 #if MTK_DDD_G0063 469 if( uiMergeIndex == m_ppcCU[uiDepth]->getUseDDDCandIdx() ) 470 { 471 assert( pcCU->getSlice()->getViewIndex() != 0 ); 472 pcCU->setUseDDD( true, uiAbsPartIdx, 0, uiDepth ); 473 pcCU->setDDDepthSubParts( m_ppcCU[uiDepth]->getDDTmpDepth(),uiAbsPartIdx, 0, uiDepth ); 474 } 475 #endif 476 436 477 TComMv cTmpMv( 0, 0 ); 437 478 for ( UInt uiRefListIdx = 0; uiRefListIdx < 2; uiRefListIdx++ ) … … 443 484 pcCU->getCUMvField( RefPicList( uiRefListIdx ) )->setAllMvd( cTmpMv, SIZE_2Nx2N, uiAbsPartIdx, uiDepth ); 444 485 pcCU->getCUMvField( RefPicList( uiRefListIdx ) )->setAllMvField( cMvFieldNeighbours[ 2*uiMergeIndex + uiRefListIdx ], SIZE_2Nx2N, uiAbsPartIdx, uiDepth ); 486 #if NTT_STORE_SPDV_VSP_G0148 487 if( pcCU->getVSPFlag( uiAbsPartIdx ) != 0 ) 488 { 489 if ( uhInterDirNeighbours[ uiMergeIndex ] & (1<<uiRefListIdx) ) 490 { 491 UInt dummy; 492 Int vspSize; 493 Int width, height; 494 m_ppcCU[uiDepth]->getPartIndexAndSize( uiAbsPartIdx, dummy, width, height ); 495 m_ppcCU[uiDepth]->setMvFieldPUForVSP( pcCU, uiAbsPartIdx, width, height, RefPicList( uiRefListIdx ), cMvFieldNeighbours[ 2*uiMergeIndex + uiRefListIdx ].getRefIdx(), vspSize ); 496 pcCU->setVSPFlag( uiAbsPartIdx, vspSize ); 497 } 498 } 499 #endif 445 500 #if ENC_DEC_TRACE && H_MV_ENC_DEC_TRAC 446 501 if ( g_decTraceMvFromMerge ) … … 496 551 m_pcEntropyDecoder->decodePartSize( pcCU, uiAbsPartIdx, uiDepth ); 497 552 553 #if QC_SDC_UNIFY_G0130 554 m_pcEntropyDecoder->decodeSDCFlag( pcCU, uiAbsPartIdx, uiDepth ); 555 #endif 498 556 if (pcCU->isIntra( uiAbsPartIdx ) && pcCU->getPartitionSize( uiAbsPartIdx ) == SIZE_2Nx2N ) 499 557 { … … 515 573 // prediction mode ( Intra : direction mode, Inter : Mv, reference idx ) 516 574 m_pcEntropyDecoder->decodePredInfo( pcCU, uiAbsPartIdx, uiDepth, m_ppcCU[uiDepth]); 517 #if H_3D_INTER_SDC 575 #if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130 518 576 m_pcEntropyDecoder->decodeInterSDCFlag( pcCU, uiAbsPartIdx, uiDepth ); 519 577 #endif … … 585 643 { 586 644 case MODE_INTER: 645 #if H_3D_DBBP 646 if( m_ppcCU[uiDepth]->getDBBPFlag(0) ) 647 { 648 xReconInterDBBP( m_ppcCU[uiDepth], uiAbsPartIdx, uiDepth ); 649 } 650 else 651 { 652 #endif 587 653 #if H_3D_INTER_SDC 654 #if QC_SDC_UNIFY_G0130 655 if( m_ppcCU[uiDepth]->getSDCFlag( 0 ) ) 656 #else 588 657 if( m_ppcCU[uiDepth]->getInterSDCFlag( 0 ) ) 658 #endif 589 659 { 590 660 xReconInterSDC( m_ppcCU[uiDepth], uiAbsPartIdx, uiDepth ); … … 595 665 xReconInter( m_ppcCU[uiDepth], uiDepth ); 596 666 #if H_3D_INTER_SDC 667 } 668 #endif 669 #if H_3D_DBBP 597 670 } 598 671 #endif … … 646 719 UInt uiWidth = pcCU->getWidth ( 0 ); 647 720 UInt uiHeight = pcCU->getHeight( 0 ); 721 #if !SEC_INTER_SDC_G0101 648 722 UChar* pMask = pcCU->getInterSDCMask(); 649 723 650 724 memset( pMask, 0, uiWidth*uiHeight ); 651 725 pcCU->xSetInterSDCCUMask( pcCU, pMask ); 726 #endif 652 727 653 728 Pel *pResi; … … 660 735 for( uiPelX = 0; uiPelX < uiWidth; uiPelX++ ) 661 736 { 737 #if SEC_INTER_SDC_G0101 738 pResi[ uiPelX ] = pcCU->getSDCSegmentDCOffset( 0, 0 ); 739 #else 662 740 UChar uiSeg = pMask[ uiPelX + uiPelY*uiWidth ]; 663 664 pResi[ uiPelX ] = pcCU->getInterSDCSegmentDCOffset( uiSeg, 0 );; 741 #if QC_SDC_UNIFY_G0130 742 pResi[ uiPelX ] = pcCU->getSDCSegmentDCOffset( uiSeg, 0 ); 743 #else 744 pResi[ uiPelX ] = pcCU->getInterSDCSegmentDCOffset( uiSeg, 0 ); 745 #endif 746 #endif 665 747 } 666 748 pResi += uiResiStride; … … 684 766 pRecCb += uiStrideC; 685 767 pRecCr += uiStrideC; 768 } 769 } 770 #endif 771 772 #if H_3D_DBBP 773 Void TDecCu::xReconInterDBBP( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 774 { 775 AOF(!pcCU->getSlice()->getIsDepth()); 776 AOF(!pcCU->getSlice()->isIntra()); 777 PartSize ePartSize = pcCU->getPartitionSize( 0 ); 778 779 // get collocated depth block 780 UInt uiDepthStride = 0; 781 Pel* pDepthPels = pcCU->getVirtualDepthBlock(0, pcCU->getWidth(0), pcCU->getHeight(0), uiDepthStride); 782 AOF( pDepthPels != NULL ); 783 AOF( uiDepthStride != 0 ); 784 785 // compute mask by segmenting depth block 786 Bool pMask[MAX_CU_SIZE*MAX_CU_SIZE]; 787 Bool bValidMask = m_pcPrediction->getSegmentMaskFromDepth(pDepthPels, uiDepthStride, pcCU->getWidth(0), pcCU->getHeight(0), pMask); 788 AOF(bValidMask); 789 790 DBBPTmpData* pDBBPTmpData = pcCU->getDBBPTmpData(); 791 TComYuv* apSegPredYuv[2] = { m_ppcYuvReco[uiDepth], m_ppcYuvRecoDBBP[uiDepth] }; 792 793 // first, extract the two sets of motion parameters 794 UInt uiPUOffset = ( g_auiPUOffset[UInt( ePartSize )] << ( ( pcCU->getSlice()->getSPS()->getMaxCUDepth() - uiDepth ) << 1 ) ) >> 4; 795 for( UInt uiSegment = 0; uiSegment < 2; uiSegment++ ) 796 { 797 UInt uiPartAddr = uiSegment*uiPUOffset; 798 799 pDBBPTmpData->auhInterDir[uiSegment] = pcCU->getInterDir(uiPartAddr); 800 801 for ( UInt uiRefListIdx = 0; uiRefListIdx < 2; uiRefListIdx++ ) 802 { 803 RefPicList eRefList = (RefPicList)uiRefListIdx; 804 pcCU->getMvField(pcCU, uiPartAddr, eRefList, pDBBPTmpData->acMvField[uiSegment][eRefList]); 805 } 806 807 pDBBPTmpData->ahVSPFlag[uiSegment] = pcCU->getVSPFlag( uiPartAddr ); 808 pDBBPTmpData->acDvInfo[uiSegment] = pcCU->getDvInfo( uiPartAddr ); 809 } 810 811 // do motion compensation for each segment as 2Nx2N 812 pcCU->setPartSizeSubParts( SIZE_2Nx2N, 0, uiDepth ); 813 pcCU->setPredModeSubParts( MODE_INTER, 0, uiDepth ); 814 for( UInt uiSegment = 0; uiSegment < 2; uiSegment++ ) 815 { 816 pcCU->setInterDirSubParts( pDBBPTmpData->auhInterDir[uiSegment], 0, 0, uiDepth ); 817 818 pcCU->setVSPFlagSubParts( pDBBPTmpData->ahVSPFlag[uiSegment], 0, 0, uiDepth ); 819 pcCU->setDvInfoSubParts( pDBBPTmpData->acDvInfo[uiSegment], 0, 0, uiDepth ); 820 821 for ( UInt uiRefListIdx = 0; uiRefListIdx < 2; uiRefListIdx++ ) 822 { 823 RefPicList eRefList = (RefPicList)uiRefListIdx; 824 825 pcCU->getCUMvField( eRefList )->setAllMvField( pDBBPTmpData->acMvField[uiSegment][eRefList], SIZE_2Nx2N, 0, 0 ); 826 } 827 828 // inter prediction 829 m_pcPrediction->motionCompensation( pcCU, apSegPredYuv[uiSegment] ); 830 } 831 832 // restore motion information in both segments again 833 pcCU->setPartSizeSubParts( ePartSize, 0, uiDepth ); 834 pcCU->setPredModeSubParts( MODE_INTER, 0, uiDepth ); 835 for( UInt uiSegment = 0; uiSegment < 2; uiSegment++ ) 836 { 837 UInt uiPartAddr = uiSegment*uiPUOffset; 838 839 pcCU->setDBBPFlagSubParts(true, uiPartAddr, uiSegment, uiDepth); 840 841 pcCU->setVSPFlagSubParts( pDBBPTmpData->ahVSPFlag[uiSegment], uiPartAddr, uiSegment, uiDepth ); 842 pcCU->setDvInfoSubParts( pDBBPTmpData->acDvInfo[uiSegment], uiPartAddr, uiSegment, uiDepth ); 843 844 pcCU->setInterDirSubParts(pDBBPTmpData->auhInterDir[uiSegment], uiPartAddr, uiSegment, uiDepth); // interprets depth relative to LCU level 845 846 for ( UInt uiRefListIdx = 0; uiRefListIdx < 2; uiRefListIdx++ ) 847 { 848 RefPicList eRefList = (RefPicList)uiRefListIdx; 849 850 pcCU->getCUMvField( eRefList )->setAllMvField( pDBBPTmpData->acMvField[uiSegment][eRefList], ePartSize, uiPartAddr, 0, uiSegment ); // interprets depth relative to rpcTempCU level 851 } 852 } 853 854 // reconstruct final prediction signal by combining both segments 855 m_pcPrediction->combineSegmentsWithMask(apSegPredYuv, m_ppcYuvReco[uiDepth], pMask, pcCU->getWidth(0), pcCU->getHeight(0)); 856 857 // inter recon 858 xDecodeInterTexture( pcCU, 0, uiDepth ); 859 860 // clip for only non-zero cbp case 861 if ( ( pcCU->getCbf( 0, TEXT_LUMA ) ) || ( pcCU->getCbf( 0, TEXT_CHROMA_U ) ) || ( pcCU->getCbf(0, TEXT_CHROMA_V ) ) ) 862 { 863 m_ppcYuvReco[uiDepth]->addClip( m_ppcYuvReco[uiDepth], m_ppcYuvResi[uiDepth], 0, pcCU->getWidth( 0 ) ); 864 } 865 else 866 { 867 m_ppcYuvReco[uiDepth]->copyPartToPartYuv( m_ppcYuvReco[uiDepth],0, pcCU->getWidth( 0 ),pcCU->getHeight( 0 )); 686 868 } 687 869 } … … 906 1088 UInt uiWidth = pcCU->getWidth ( 0 ); 907 1089 UInt uiHeight = pcCU->getHeight ( 0 ); 908 1090 #if QC_PKU_SDC_SPLIT_G0123 1091 #if HS_TSINGHUA_SDC_SPLIT_G0111 1092 #if QC_GENERIC_SDC_G0122 1093 TComWedgelet* dmm4SegmentationOrg = new TComWedgelet( uiWidth, uiHeight ); 1094 #endif 1095 #else 1096 #if QC_GENERIC_SDC_G0122 1097 TComWedgelet* dmm4Segmentation = new TComWedgelet( uiWidth, uiHeight ); 1098 #endif 1099 #endif 1100 #endif 1101 #if QC_PKU_SDC_SPLIT_G0123 1102 UInt numParts = 1; 1103 UInt i = 0; 1104 UInt sdcDepth = 0; 1105 TComYuv* pcRecoYuv = m_ppcYuvReco[uiDepth]; 1106 TComYuv* pcPredYuv = m_ppcYuvReco[uiDepth]; 1107 TComYuv* pcResiYuv = m_ppcYuvResi[uiDepth]; 1108 1109 UInt uiStride = 0; 1110 Pel* piReco; 1111 Pel* piPred; 1112 Pel* piResi; 1113 1114 UInt uiZOrder; 1115 Pel* piRecIPred; 1116 UInt uiRecIPredStride; 1117 1118 UInt uiLumaPredMode = 0; 1119 1120 #if HS_TSINGHUA_SDC_SPLIT_G0111 1121 if ((uiWidth >> pcCU->getSlice()->getSPS()->getQuadtreeTULog2MaxSize()) > 1) 1122 { 1123 numParts = uiWidth * uiWidth >> (2 * pcCU->getSlice()->getSPS()->getQuadtreeTULog2MaxSize()); 1124 sdcDepth = g_aucConvertToBit[uiWidth] + 2 - pcCU->getSlice()->getSPS()->getQuadtreeTULog2MaxSize(); 1125 uiWidth = uiHeight = (1 << pcCU->getSlice()->getSPS()->getQuadtreeTULog2MaxSize()); 1126 } 1127 #else 1128 if (uiWidth == 64) 1129 { 1130 numParts = 4; 1131 sdcDepth = 1; 1132 uiWidth = uiHeight = 32; 1133 } 1134 #endif 1135 1136 for ( i = 0; i < numParts; i++ ) 1137 { 1138 uiStride = pcRecoYuv->getStride (); 1139 piReco = pcRecoYuv->getLumaAddr( uiAbsPartIdx ); 1140 piPred = pcPredYuv->getLumaAddr( uiAbsPartIdx ); 1141 piResi = pcResiYuv->getLumaAddr( uiAbsPartIdx ); 1142 1143 uiZOrder = pcCU->getZorderIdxInCU() + uiAbsPartIdx; 1144 piRecIPred = pcCU->getPic()->getPicYuvRec()->getLumaAddr( pcCU->getAddr(), uiZOrder ); 1145 uiRecIPredStride = pcCU->getPic()->getPicYuvRec()->getStride (); 1146 1147 uiLumaPredMode = pcCU->getLumaIntraDir ( uiAbsPartIdx ); 1148 1149 AOF( uiWidth == uiHeight ); 1150 #else 909 1151 TComYuv* pcRecoYuv = m_ppcYuvReco[uiDepth]; 910 1152 TComYuv* pcPredYuv = m_ppcYuvReco[uiDepth]; … … 926 1168 AOF( pcCU->getSDCAvailable(uiAbsPartIdx) ); 927 1169 AOF( pcCU->getSDCFlag(uiAbsPartIdx) ); 1170 #endif 928 1171 929 1172 //===== init availability pattern ===== 930 1173 Bool bAboveAvail = false; 931 1174 Bool bLeftAvail = false; 1175 #if QC_PKU_SDC_SPLIT_G0123 1176 pcCU->getPattern()->initPattern ( pcCU, sdcDepth, uiAbsPartIdx ); 1177 pcCU->getPattern()->initAdiPattern( pcCU, uiAbsPartIdx, sdcDepth, m_pcPrediction->getPredicBuf(), m_pcPrediction->getPredicBufWidth(), m_pcPrediction->getPredicBufHeight(), bAboveAvail, bLeftAvail ); 1178 #else 932 1179 pcCU->getPattern()->initPattern ( pcCU, 0, uiAbsPartIdx ); 933 1180 pcCU->getPattern()->initAdiPattern( pcCU, uiAbsPartIdx, 0, m_pcPrediction->getPredicBuf(), m_pcPrediction->getPredicBufWidth(), m_pcPrediction->getPredicBufHeight(), bAboveAvail, bLeftAvail ); 934 1181 #endif 1182 #if !QC_PKU_SDC_SPLIT_G0123 1183 #if QC_GENERIC_SDC_G0122 1184 TComWedgelet* dmm4Segmentation = new TComWedgelet( uiWidth, uiHeight ); 1185 #endif 1186 #endif 1187 #if HS_TSINGHUA_SDC_SPLIT_G0111 1188 TComWedgelet* dmm4Segmentation = new TComWedgelet( uiWidth, uiHeight ); 1189 #endif 935 1190 //===== get prediction signal ===== 936 1191 #if H_3D_DIM 937 1192 if( isDimMode( uiLumaPredMode ) ) 938 1193 { 939 m_pcPrediction->predIntraLumaDepth( pcCU, uiAbsPartIdx, uiLumaPredMode, piPred, uiStride, uiWidth, uiHeight ); 1194 m_pcPrediction->predIntraLumaDepth( pcCU, uiAbsPartIdx, uiLumaPredMode, piPred, uiStride, uiWidth, uiHeight 1195 #if QC_GENERIC_SDC_G0122 1196 , false, dmm4Segmentation 1197 #endif 1198 ); 1199 #if HS_TSINGHUA_SDC_SPLIT_G0111 1200 Bool* dmm4PatternSplit = dmm4Segmentation->getPattern(); 1201 Bool* dmm4PatternOrg = dmm4SegmentationOrg->getPattern(); 1202 for( UInt k = 0; k < (uiWidth*uiHeight); k++ ) 1203 { 1204 dmm4PatternOrg[k+(uiAbsPartIdx<<4)] = dmm4PatternSplit[k]; 1205 } 1206 #endif 940 1207 } 941 1208 else … … 946 1213 } 947 1214 #endif 948 1215 #if QC_PKU_SDC_SPLIT_G0123 1216 if ( numParts > 1 ) 1217 { 1218 for( UInt uiY = 0; uiY < uiHeight; uiY++ ) 1219 { 1220 for( UInt uiX = 0; uiX < uiWidth; uiX++ ) 1221 { 1222 piReco [ uiX ] = ClipY( piPred[ uiX ] ); 1223 piRecIPred [ uiX ] = piReco[ uiX ]; 1224 } 1225 piPred += uiStride; 1226 piReco += uiStride; 1227 piRecIPred += uiRecIPredStride; 1228 } 1229 } 1230 uiAbsPartIdx += ( (uiWidth * uiWidth) >> 4 ); 1231 #if HS_TSINGHUA_SDC_SPLIT_G0111 1232 dmm4Segmentation->destroy(); delete dmm4Segmentation; 1233 #endif 1234 } 1235 uiAbsPartIdx = 0; 1236 1237 if ( numParts > 1 ) 1238 { 1239 uiWidth = pcCU->getWidth( 0 ); 1240 uiHeight = pcCU->getHeight( 0 ); 1241 } 1242 piReco = pcRecoYuv->getLumaAddr( uiAbsPartIdx ); 1243 piPred = pcPredYuv->getLumaAddr( uiAbsPartIdx ); 1244 piResi = pcResiYuv->getLumaAddr( uiAbsPartIdx ); 1245 uiZOrder = pcCU->getZorderIdxInCU() + uiAbsPartIdx; 1246 piRecIPred = pcCU->getPic()->getPicYuvRec()->getLumaAddr( pcCU->getAddr(), uiZOrder ); 1247 uiRecIPredStride = pcCU->getPic()->getPicYuvRec()->getStride (); 1248 #endif 949 1249 // number of segments depends on prediction mode 950 1250 UInt uiNumSegments = 1; … … 963 1263 uiMaskStride = pcWedgelet->getStride(); 964 1264 } 965 1265 #if QC_GENERIC_SDC_G0122 1266 if( getDimType( uiLumaPredMode ) == DMM4_IDX ) 1267 { 1268 uiNumSegments = 2; 1269 #if HS_TSINGHUA_SDC_SPLIT_G0111 1270 pbMask = dmm4SegmentationOrg->getPattern(); 1271 uiMaskStride = dmm4SegmentationOrg->getStride(); 1272 #else 1273 pbMask = dmm4Segmentation->getPattern(); 1274 uiMaskStride = dmm4Segmentation->getStride(); 1275 #endif 1276 } 1277 #endif 966 1278 // get DC prediction for each segment 967 1279 Pel apDCPredValues[2]; … … 1025 1337 pRecCr += uiStrideC; 1026 1338 } 1339 #if QC_GENERIC_SDC_G0122 1340 #if HS_TSINGHUA_SDC_SPLIT_G0111 1341 dmm4SegmentationOrg->destroy(); delete dmm4SegmentationOrg; 1342 #else 1343 dmm4Segmentation->destroy(); delete dmm4Segmentation; 1344 #endif 1345 #endif 1027 1346 } 1028 1347 #endif -
trunk/source/Lib/TLibDecoder/TDecCu.h
r655 r833 63 63 TComDataCU** m_ppcCU; ///< CU data array 64 64 65 #if H_3D_DBBP 66 TComYuv** m_ppcYuvRecoDBBP; 67 #endif 68 65 69 // access channel 66 70 TComTrQuant* m_pcTrQuant; … … 98 102 Void xReconInter ( TComDataCU* pcCU, UInt uiDepth ); 99 103 104 #if H_3D_DBBP 105 Void xReconInterDBBP ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 106 #endif 107 100 108 Void xReconIntraQT ( TComDataCU* pcCU, UInt uiDepth ); 101 109 Void xIntraRecLumaBlk ( TComDataCU* pcCU, UInt uiTrDepth, UInt uiAbsPartIdx, TComYuv* pcRecoYuv, TComYuv* pcPredYuv, TComYuv* pcResiYuv ); -
trunk/source/Lib/TLibDecoder/TDecEntropy.cpp
r773 r833 111 111 pcCU->setICFlagSubParts( false , uiAbsPartIdx, 0, uiDepth ); 112 112 113 #if SEC_IC_ARP_SIG_G0072 114 if ( pcCU->isIntra( uiAbsPartIdx ) || ( pcCU->getSlice()->getViewIndex() == 0 ) || pcCU->getSlice()->getIsDepth() || pcCU->getARPW( uiAbsPartIdx ) > 0 ) 115 #else 113 116 if ( pcCU->isIntra( uiAbsPartIdx ) || ( pcCU->getSlice()->getViewIndex() == 0 ) || pcCU->getSlice()->getIsDepth() ) 117 #endif 114 118 { 115 119 return; … … 137 141 { 138 142 m_pcEntropyDecoderIf->parsePartSize( pcCU, uiAbsPartIdx, uiDepth ); 143 144 #if H_3D_DBBP 145 if( pcCU->getSlice()->getVPS()->getUseDBBP(pcCU->getSlice()->getLayerIdInVps()) && pcCU->getPartitionSize(uiAbsPartIdx) == RWTH_DBBP_PACK_MODE ) 146 { 147 decodeDBBPFlag(pcCU, uiAbsPartIdx, uiDepth); 148 149 if( pcCU->getDBBPFlag(uiAbsPartIdx) ) 150 { 151 AOF( pcCU->getPartitionSize(uiAbsPartIdx) == RWTH_DBBP_PACK_MODE ); 152 153 // get collocated depth block 154 UInt uiDepthStride = 0; 155 Pel* pDepthPels = NULL; 156 pDepthPels = pcCU->getVirtualDepthBlock(uiAbsPartIdx, pcCU->getWidth(uiAbsPartIdx), pcCU->getHeight(uiAbsPartIdx), uiDepthStride); 157 158 AOF( pDepthPels != NULL ); 159 AOF( uiDepthStride != 0 ); 160 161 // derive true partitioning for this CU based on depth 162 // (needs to be done in parsing process as motion vector predictors are also derived during parsing) 163 PartSize eVirtualPartSize = m_pcPrediction->getPartitionSizeFromDepth(pDepthPels, uiDepthStride, pcCU->getWidth(uiAbsPartIdx)); 164 AOF( eVirtualPartSize != SIZE_NONE ); 165 166 pcCU->setPartSizeSubParts(eVirtualPartSize, uiAbsPartIdx, uiDepth); 167 } 168 } 169 #endif 139 170 } 140 171 … … 241 272 decodeMergeIndex( pcCU, uiPartIdx, uiSubPartIdx, uiDepth ); 242 273 UInt uiMergeIndex = pcCU->getMergeIndex(uiSubPartIdx); 274 #if !SEC_IC_ARP_SIG_G0072 243 275 #if H_3D_IC 244 276 decodeICFlag( pcCU, uiAbsPartIdx, uiDepth ); 245 277 #endif 278 #endif 246 279 #if H_3D_ARP 247 280 decodeARPW ( pcCU, uiAbsPartIdx, uiDepth ); 248 281 #endif 282 #if SEC_IC_ARP_SIG_G0072 283 #if H_3D_IC 284 decodeICFlag( pcCU, uiAbsPartIdx, uiDepth ); 285 #endif 286 #endif 287 #if H_3D_DBBP 288 if ( pcCU->getSlice()->getPPS()->getLog2ParallelMergeLevelMinus2() && ePartSize != SIZE_2Nx2N && pcSubCU->getWidth( 0 ) <= 8 && pcCU->getDBBPFlag(uiAbsPartIdx) == false ) 289 #else 249 290 if ( pcCU->getSlice()->getPPS()->getLog2ParallelMergeLevelMinus2() && ePartSize != SIZE_2Nx2N && pcSubCU->getWidth( 0 ) <= 8 ) 291 #endif 250 292 { 251 293 pcSubCU->setPartSizeSubParts( SIZE_2Nx2N, 0, uiDepth ); … … 320 362 pcCU->setInterDirSubParts( uhInterDirNeighbours[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth ); 321 363 364 #if MTK_DDD_G0063 365 if( uiMergeIndex == pcSubCU->getUseDDDCandIdx() ) 366 { 367 assert( pcCU->getSlice()->getViewIndex() != 0 ); 368 pcCU->setUseDDD( true, uiSubPartIdx, uiPartIdx, uiDepth ); 369 pcCU->setDDDepthSubParts( pcSubCU->getDDTmpDepth(),uiSubPartIdx, uiPartIdx, uiDepth ); 370 } 371 else 372 { 373 pcCU->setUseDDD( false, uiSubPartIdx, uiPartIdx, uiDepth ); 374 } 375 #endif 376 322 377 TComMv cTmpMv( 0, 0 ); 323 378 for ( UInt uiRefListIdx = 0; uiRefListIdx < 2; uiRefListIdx++ ) … … 329 384 pcCU->getCUMvField( RefPicList( uiRefListIdx ) )->setAllMvd( cTmpMv, ePartSize, uiSubPartIdx, uiDepth, uiPartIdx ); 330 385 pcCU->getCUMvField( RefPicList( uiRefListIdx ) )->setAllMvField( cMvFieldNeighbours[ 2*uiMergeIndex + uiRefListIdx ], ePartSize, uiSubPartIdx, uiDepth, uiPartIdx ); 386 #if NTT_STORE_SPDV_VSP_G0148 387 #if H_3D_DBBP 388 if( pcCU->getVSPFlag( uiSubPartIdx ) != 0 && !pcCU->getDBBPFlag( uiAbsPartIdx ) ) 389 #else 390 if( pcCU->getVSPFlag( uiSubPartIdx ) != 0 ) 391 #endif 392 { 393 if ( uhInterDirNeighbours[ uiMergeIndex ] & (1<<uiRefListIdx) ) 394 { 395 UInt dummy; 396 Int vspSize; 397 Int width, height; 398 pcCU->getPartIndexAndSize( uiPartIdx, dummy, width, height, uiSubPartIdx, pcCU->getTotalNumPart()==256 ); 399 pcCU->setMvFieldPUForVSP( pcCU, uiSubPartIdx, width, height, RefPicList( uiRefListIdx ), cMvFieldNeighbours[ 2*uiMergeIndex + uiRefListIdx ].getRefIdx(), vspSize ); 400 pcCU->setVSPFlag( uiSubPartIdx, vspSize ); 401 } 402 } 403 #endif 331 404 } 332 405 } … … 367 440 } 368 441 } 442 #if !SEC_IC_ARP_SIG_G0072 369 443 #if H_3D_IC 370 444 decodeICFlag( pcCU, uiAbsPartIdx, uiDepth ); 371 445 #endif 446 #endif 372 447 #if H_3D_ARP 373 448 decodeARPW ( pcCU, uiAbsPartIdx, uiDepth ); 374 449 #endif 450 #if SEC_IC_ARP_SIG_G0072 451 #if H_3D_IC 452 decodeICFlag( pcCU, uiAbsPartIdx, uiDepth ); 453 #endif 454 #endif 375 455 } 376 456 #if H_3D_VSP 457 #if NTT_STORE_SPDV_VSP_G0148 458 if ( (pcCU->getInterDir(uiSubPartIdx) == 3) && pcSubCU->isBipredRestriction(uiPartIdx) && (pcCU->getVSPFlag(uiSubPartIdx) == 0)) 459 #else 377 460 if ( (pcCU->getInterDir(uiSubPartIdx) == 3) && pcSubCU->isBipredRestriction(uiPartIdx) && (pcCU->getVSPFlag(uiSubPartIdx) == false)) 461 #endif 378 462 #else 379 463 if ( (pcCU->getInterDir(uiSubPartIdx) == 3) && pcSubCU->isBipredRestriction(uiPartIdx) ) … … 713 797 UInt uiLumaOffset = uiMinCoeffSize*uiAbsPartIdx; 714 798 UInt uiChromaOffset = uiLumaOffset>>2; 715 799 #if QC_SDC_UNIFY_G0130 716 800 #if H_3D_DIM_SDC 717 if( pcCU->getSDCFlag( uiAbsPartIdx ) )801 if( pcCU->getSDCFlag( uiAbsPartIdx ) && pcCU->isIntra( uiAbsPartIdx) ) 718 802 { 719 803 assert( pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2Nx2N ); … … 722 806 assert( pcCU->getCbf(uiAbsPartIdx, TEXT_CHROMA_U) == 1 ); 723 807 assert( pcCU->getCbf(uiAbsPartIdx, TEXT_CHROMA_V) == 1 ); 808 } 809 #endif 810 811 #if H_3D_INTER_SDC 812 if( pcCU->getSDCFlag( uiAbsPartIdx ) && !pcCU->isIntra( uiAbsPartIdx) ) 813 { 814 assert( !pcCU->isSkipped( uiAbsPartIdx ) ); 815 assert( !pcCU->isIntra( uiAbsPartIdx) ); 816 assert( pcCU->getSlice()->getIsDepth() ); 817 } 818 #endif 819 #if QC_SDC_UNIFY_G0130_FIX 820 if( pcCU->getSlice()->getIsDepth() && ( pcCU->getSDCFlag( uiAbsPartIdx ) || pcCU->isIntra( uiAbsPartIdx ) ) ) 821 #else 822 if( pcCU->getSDCFlag( uiAbsPartIdx ) || pcCU->isIntra( uiAbsPartIdx ) ) 823 #endif 824 { 825 Int iPartNum = ( pcCU->isIntra( uiAbsPartIdx ) && pcCU->getPartitionSize( uiAbsPartIdx ) == SIZE_NxN ) ? 4 : 1; 826 UInt uiPartOffset = ( pcCU->getPic()->getNumPartInCU() >> ( pcCU->getDepth( uiAbsPartIdx ) << 1 ) ) >> 2; 827 828 if( !pcCU->getSDCFlag( uiAbsPartIdx ) ) 829 { 830 for( Int iPart = 0; iPart < iPartNum; iPart++ ) 831 { 832 if( getDimType( pcCU->getLumaIntraDir( uiAbsPartIdx + uiPartOffset*iPart ) ) < DIM_NUM_TYPE ) 833 { 834 m_pcEntropyDecoderIf->parseDeltaDC( pcCU, uiAbsPartIdx + uiPartOffset*iPart, uiDepth + ( pcCU->getPartitionSize( uiAbsPartIdx ) == SIZE_NxN ) ); 835 } 836 } 837 } 838 else 839 { 840 m_pcEntropyDecoderIf->parseDeltaDC( pcCU, uiAbsPartIdx, uiDepth ); 841 return; 842 } 843 } 844 #else 845 #if H_3D_DIM_SDC 846 if( pcCU->getSDCFlag( uiAbsPartIdx ) ) 847 { 848 assert( pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2Nx2N ); 849 assert( pcCU->getTransformIdx(uiAbsPartIdx) == 0 ); 850 assert( pcCU->getCbf(uiAbsPartIdx, TEXT_LUMA) == 1 ); 851 assert( pcCU->getCbf(uiAbsPartIdx, TEXT_CHROMA_U) == 1 ); 852 assert( pcCU->getCbf(uiAbsPartIdx, TEXT_CHROMA_V) == 1 ); 724 853 return; 725 854 } … … 737 866 } 738 867 #endif 868 #endif 739 869 740 870 if( pcCU->isIntra(uiAbsPartIdx) ) … … 760 890 761 891 #if H_3D_INTER_SDC 892 #if QC_SDC_UNIFY_G0130 893 Void TDecEntropy::decodeSDCFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 894 { 895 pcCU->setSDCFlagSubParts( false, uiAbsPartIdx, uiDepth ); 896 897 if( ( !pcCU->isIntra( uiAbsPartIdx ) && !pcCU->getSlice()->getVPS()->getInterSDCFlag( pcCU->getSlice()->getLayerIdInVps() ) ) || 898 ( pcCU->isIntra( uiAbsPartIdx ) && !pcCU->getSlice()->getVPS()->getVpsDepthModesFlag( pcCU->getSlice()->getLayerIdInVps() ) ) ) 899 { 900 return; 901 } 902 903 #if SEC_INTER_SDC_G0101 904 if( !pcCU->getSlice()->getIsDepth() || pcCU->getPartitionSize( uiAbsPartIdx ) != SIZE_2Nx2N || pcCU->isSkipped( uiAbsPartIdx ) ) 905 #else 906 if( !pcCU->getSlice()->getIsDepth() || ( pcCU->isIntra( uiAbsPartIdx ) && pcCU->getPartitionSize( uiAbsPartIdx ) != SIZE_2Nx2N ) || pcCU->isSkipped( uiAbsPartIdx ) ) 907 #endif 908 { 909 return; 910 } 911 912 #if SEC_INTER_SDC_G0101 913 assert( pcCU->getPartitionSize( uiAbsPartIdx ) == SIZE_2Nx2N || ( !pcCU->isIntra( uiAbsPartIdx ) && !pcCU->isSkipped( uiAbsPartIdx ) ) ); 914 #else 915 assert( ( pcCU->isIntra( uiAbsPartIdx ) && pcCU->getPartitionSize( uiAbsPartIdx ) == SIZE_2Nx2N ) || ( !pcCU->isIntra( uiAbsPartIdx ) && !pcCU->isSkipped( uiAbsPartIdx ) ) ); 916 #endif 917 918 m_pcEntropyDecoderIf->parseSDCFlag( pcCU, uiAbsPartIdx, uiDepth ); 919 } 920 921 #else 762 922 Void TDecEntropy::decodeInterSDCFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 763 923 { … … 798 958 } 799 959 #endif 960 #endif 961 #if H_3D_DBBP 962 Void TDecEntropy::decodeDBBPFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 963 { 964 m_pcEntropyDecoderIf->parseDBBPFlag( pcCU, uiAbsPartIdx, uiDepth ); 965 } 966 #endif 800 967 801 968 //! \} -
trunk/source/Lib/TLibDecoder/TDecEntropy.h
r773 r833 96 96 #endif 97 97 #if H_3D_INTER_SDC 98 #if QC_SDC_UNIFY_G0130 99 virtual Void parseDeltaDC ( TComDataCU* pcCU, UInt absPartIdx, UInt depth ) = 0; 100 virtual Void parseSDCFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0; 101 #else 98 102 virtual Void parseInterSDCFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0; 99 103 virtual Void parseInterSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPart ) = 0; 104 #endif 105 #endif 106 #if H_3D_DBBP 107 virtual Void parseDBBPFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0; 100 108 #endif 101 109 virtual Void parsePartSize ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0; … … 179 187 #endif 180 188 #if H_3D_INTER_SDC 189 #if QC_SDC_UNIFY_G0130 190 Void decodeSDCFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 191 #else 181 192 Void decodeInterSDCFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 182 193 Void decodeInterSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 183 194 #endif 195 #endif 196 #if H_3D_DBBP 197 Void decodeDBBPFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 198 #endif 184 199 Void decodeIPCMInfo ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 185 200 -
trunk/source/Lib/TLibDecoder/TDecSbac.cpp
r773 r833 87 87 , m_cDdcFlagSCModel ( 1, 1, NUM_DDC_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 88 88 , m_cDdcDataSCModel ( 1, 1, NUM_DDC_DATA_CTX , m_contextModels + m_numContextModels, m_numContextModels) 89 #if QC_GENERIC_SDC_G0122 90 , m_cAngleFlagSCModel ( 1, 1, NUM_ANGLE_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 91 #if !QC_SDC_UNIFY_G0130 92 , m_cIntraSdcFlagSCModel ( 1, 1, NUM_INTRASDC_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 93 #endif 94 #endif 89 95 #if H_3D_DIM_DMM 90 96 , m_cDmm1DataSCModel ( 1, 1, NUM_DMM1_DATA_CTX , m_contextModels + m_numContextModels, m_numContextModels) … … 95 101 #endif 96 102 #endif 97 #if H_3D_INTER_SDC 103 #if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130 98 104 , m_cInterSDCFlagSCModel ( 1, 1, NUM_INTER_SDC_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 99 105 , m_cInterSDCResidualSCModel ( 1, 1, NUM_INTER_SDC_RESIDUAL_CTX , m_contextModels + m_numContextModels, m_numContextModels) 100 106 , m_cInterSDCResidualSignFlagSCModel ( 1, 1, NUM_INTER_SDC_SIGN_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 107 #endif 108 #if QC_SDC_UNIFY_G0130 109 , m_cSDCFlagSCModel ( 1, 1, NUM_SDC_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 110 #endif 111 #if H_3D_DBBP 112 , m_cDBBPFlagSCModel ( 1, 1, DBBP_NUM_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 101 113 #endif 102 114 { … … 170 182 m_cDdcFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_DDC_FLAG ); 171 183 m_cDdcDataSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_DDC_DATA ); 184 #if QC_GENERIC_SDC_G0122 185 m_cAngleFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_ANGLE_FLAG ); 186 #if !QC_SDC_UNIFY_G0130 187 m_cIntraSdcFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_INTRASDC_FLAG ); 188 #endif 189 #endif 172 190 #if H_3D_DIM_DMM 173 191 m_cDmm1DataSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_DMM1_DATA ); … … 178 196 #endif 179 197 #endif 180 #if H_3D_INTER_SDC 198 #if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130 181 199 m_cInterSDCFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_INTER_SDC_FLAG ); 182 200 m_cInterSDCResidualSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_INTER_SDC_RESIDUAL ); 183 201 m_cInterSDCResidualSignFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_INTER_SDC_SIGN_FLAG ); 202 #endif 203 #if QC_SDC_UNIFY_G0130 204 m_cSDCFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_SDC_FLAG ); 205 #endif 206 #if H_3D_DBBP 207 m_cDBBPFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_DBBP_FLAG ); 184 208 #endif 185 209 m_uiLastDQpNonZero = 0; … … 239 263 m_cDdcFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DDC_FLAG ); 240 264 m_cDdcDataSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DDC_DATA ); 265 #if QC_GENERIC_SDC_G0122 266 m_cAngleFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_ANGLE_FLAG ); 267 #if !QC_SDC_UNIFY_G0130 268 m_cIntraSdcFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_INTRASDC_FLAG ); 269 #endif 270 #endif 241 271 #if H_3D_DIM_DMM 242 272 m_cDmm1DataSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DMM1_DATA ); … … 247 277 #endif 248 278 #endif 249 #if H_3D_INTER_SDC 279 #if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130 250 280 m_cInterSDCFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_INTER_SDC_FLAG ); 251 281 m_cInterSDCResidualSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_INTER_SDC_RESIDUAL ); 252 282 m_cInterSDCResidualSignFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_INTER_SDC_SIGN_FLAG ); 283 #endif 284 #if QC_SDC_UNIFY_G0130 285 m_cSDCFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SDC_FLAG ); 286 #endif 287 #if H_3D_DBBP 288 m_cDBBPFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DBBP_FLAG ); 253 289 #endif 254 290 m_pcTDecBinIf->start(); … … 784 820 Bool rapPic = (pcCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_W_RADL || pcCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_N_LP || pcCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA); 785 821 822 #if MTK_TEX_DEP_PAR_G0055 823 Bool depthDependent = false; 824 UInt uiTexturePart = uiMode; 825 #endif 786 826 if(bDepthMapDetect && !bIntraSliceDetect && !rapPic && sps->getUseQTL() && sps->getUsePC()) 787 827 { 788 828 TComDataCU *pcTextureCU = pcTexture->getCU(pcCU->getAddr()); 789 829 assert(pcTextureCU->getDepth(uiAbsPartIdx) >= uiDepth); 830 #if !MTK_TEX_DEP_PAR_G0055 790 831 if (pcTextureCU->getDepth(uiAbsPartIdx) == uiDepth && pcTextureCU->getPartitionSize( uiAbsPartIdx ) != SIZE_NxN) 832 #else 833 if(pcTextureCU->getDepth(uiAbsPartIdx) == uiDepth ) 834 { 835 depthDependent = true; 836 uiTexturePart = pcTextureCU->getPartitionSize( uiAbsPartIdx ); 837 } 838 if (pcTextureCU->getDepth(uiAbsPartIdx) == uiDepth && pcTextureCU->getPartitionSize( uiAbsPartIdx ) == SIZE_2Nx2N) 839 #endif 791 840 { 792 841 bParsePartSize = false; … … 833 882 if(bParsePartSize) 834 883 { 884 #endif 885 #if MTK_TEX_DEP_PAR_G0055 886 if (depthDependent==false || uiTexturePart == SIZE_NxN|| uiTexturePart == SIZE_2Nx2N) 887 { 835 888 #endif 836 889 UInt uiMaxNumBits = 2; … … 870 923 } 871 924 } 925 #if MTK_TEX_DEP_PAR_G0055 926 } 927 else if(uiTexturePart == SIZE_2NxN || uiTexturePart == SIZE_2NxnU || uiTexturePart == SIZE_2NxnD) 928 { 929 UInt uiMaxNumBits = 1; 930 if ( pcCU->getSlice()->getSPS()->getAMPAcc( uiDepth ) ) 931 { 932 uiMaxNumBits ++; 933 } 934 for ( UInt ui = 0; ui < uiMaxNumBits; ui++ ) 935 { 936 m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUPartSizeSCModel.get( 0, 0, ui) ); 937 if ( uiSymbol ) 938 { 939 break; 940 } 941 uiMode++; 942 } 943 eMode = (PartSize) uiMode; 944 if(uiMode && pcCU->getSlice()->getSPS()->getAMPAcc( uiDepth ) && uiSymbol==1 ) 945 { 946 eMode = SIZE_2NxN; 947 } 948 else if (uiMode && pcCU->getSlice()->getSPS()->getAMPAcc( uiDepth )==0 && uiSymbol==0) 949 { 950 eMode = SIZE_2NxN; 951 } 952 else if (uiMode && pcCU->getSlice()->getSPS()->getAMPAcc( uiDepth ) && uiSymbol==0) 953 { 954 m_pcTDecBinIf->decodeBinEP(uiSymbol); 955 eMode = (uiSymbol == 0? SIZE_2NxnU : SIZE_2NxnD); 956 } 957 } 958 else if(uiTexturePart == SIZE_Nx2N|| uiTexturePart==SIZE_nLx2N || uiTexturePart==SIZE_nRx2N) 959 { 960 UInt uiMaxNumBits = 1; 961 if ( pcCU->getSlice()->getSPS()->getAMPAcc( uiDepth ) ) 962 { 963 uiMaxNumBits ++; 964 } 965 for ( UInt ui = 0; ui < uiMaxNumBits; ui++ ) 966 { 967 m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUPartSizeSCModel.get( 0, 0, ui) ); 968 if ( uiSymbol ) 969 { 970 break; 971 } 972 uiMode++; 973 } 974 eMode = (PartSize) uiMode; 975 if(uiMode && pcCU->getSlice()->getSPS()->getAMPAcc( uiDepth ) && uiSymbol==1 ) 976 { 977 eMode = SIZE_Nx2N; 978 } 979 else if (uiMode && pcCU->getSlice()->getSPS()->getAMPAcc( uiDepth )==0 && uiSymbol==0) 980 { 981 eMode = SIZE_Nx2N; 982 } 983 else if (uiMode && pcCU->getSlice()->getSPS()->getAMPAcc( uiDepth ) && uiSymbol==0) 984 { 985 m_pcTDecBinIf->decodeBinEP(uiSymbol); 986 eMode = (uiSymbol == 0? SIZE_nLx2N : SIZE_nRx2N); 987 } 988 } 989 else 990 assert(0); 991 #endif 872 992 #if H_MV_ENC_DEC_TRAC 873 993 DTRACE_CU("part_mode", eMode ) … … 925 1045 if( pcCU->getLumaIntraDir( absPartIdx+partOffset*j ) < NUM_INTRA_MODE ) 926 1046 #if H_3D_DIM_SDC 1047 #if QC_GENERIC_SDC_G0122 1048 if( 1 ) // This should be cleaned up. 1049 #else 927 1050 if( !pcCU->getSDCFlag( absPartIdx+partOffset*j ) ) 1051 #endif 928 1052 #endif 929 1053 { … … 943 1067 if( pcCU->getLumaIntraDir( absPartIdx+partOffset*j ) < NUM_INTRA_MODE ) 944 1068 #if H_3D_DIM_SDC 1069 #if QC_GENERIC_SDC_G0122 1070 if( 1 ) // This should be cleaned up. 1071 #else 945 1072 if( !pcCU->getSDCFlag( absPartIdx+partOffset*j ) ) 1073 #endif 946 1074 #endif 947 1075 { … … 1046 1174 } 1047 1175 1176 #if !QC_SDC_UNIFY_G0130 1048 1177 if( dimType < DIM_NUM_TYPE || pcCU->getSDCFlag( absPartIdx ) ) 1049 1178 { 1050 1179 UInt symbol; 1180 #if QC_GENERIC_SDC_G0122 1181 UInt uiNumSegments = isDimMode( dir ) ? 2 : 1; 1182 #else 1051 1183 UInt uiNumSegments = ( dir == PLANAR_IDX ) ? 1 : 2; 1184 #endif 1052 1185 1053 1186 if( pcCU->getSDCFlag( absPartIdx ) ) … … 1085 1218 } 1086 1219 } 1087 1220 #endif 1088 1221 pcCU->setLumaIntraDirSubParts( (UChar)dir, absPartIdx, depth ); 1089 1222 } 1090 1223 1224 #if QC_GENERIC_SDC_G0122 1225 Void TDecSbac::parseIntraDepthMode( TComDataCU* pcCU, UInt absPartIdx, UInt depth ) 1226 { 1227 UInt uiSymbol, uiIsDimMode; 1228 1229 if( ( pcCU->getSlice()->getSPS()->getMaxCUWidth() >> pcCU->getDepth( absPartIdx ) ) < 64 ) //DMM and HEVC intra modes are both allowed 1230 { 1231 m_pcTDecBinIf->decodeBin( uiSymbol, m_cAngleFlagSCModel.get( 0, 0, pcCU->getCtxAngleFlag( absPartIdx ) ) ); 1232 } 1233 else 1234 { 1235 uiSymbol = 1; 1236 } 1237 uiIsDimMode = uiSymbol ? 0 : 1; 1238 pcCU->setLumaIntraDirSubParts( 0, absPartIdx, depth ); 1239 #if !QC_SDC_UNIFY_G0130 1240 if( pcCU->getPartitionSize( absPartIdx ) == SIZE_2Nx2N ) //SDC is allowed only in this case 1241 { 1242 m_pcTDecBinIf->decodeBin( uiSymbol, m_cIntraSdcFlagSCModel.get( 0, 0, pcCU->getCtxSDCFlag( absPartIdx ) ) ); 1243 } 1244 else 1245 { 1246 uiSymbol = 0; 1247 } 1248 1249 pcCU->setSDCFlagSubParts( uiSymbol, absPartIdx, depth ); 1250 #endif 1251 //decode DMM index 1252 if( uiIsDimMode ) 1253 { 1254 m_pcTDecBinIf->decodeBin( uiSymbol, m_cDepthIntraModeSCModel.get( 0, 0, 0 ) ); 1255 if( !uiSymbol ) 1256 { 1257 pcCU->setLumaIntraDirSubParts( ( 2 * DMM1_IDX + DIM_OFFSET ), absPartIdx, depth ); 1258 } 1259 else 1260 { 1261 pcCU->setLumaIntraDirSubParts( ( 2 * DMM4_IDX + DIM_OFFSET ), absPartIdx, depth ); 1262 } 1263 } 1264 } 1265 #else 1091 1266 Void TDecSbac::parseIntraDepthMode( TComDataCU* pcCU, UInt absPartIdx, UInt depth ) 1092 1267 { … … 1151 1326 #endif 1152 1327 } 1328 #endif 1153 1329 #endif 1154 1330 … … 2058 2234 if( 1 == uiW ) 2059 2235 { 2236 #if MTK_ARP_FLAG_CABAC_SIMP_G0061 2237 m_pcTDecBinIf->decodeBin( uiCode , m_cCUPUARPWSCModel.get( 0, 0, 2 ) ); 2238 #else 2060 2239 m_pcTDecBinIf->decodeBin( uiCode , m_cCUPUARPWSCModel.get( 0, 0, 3 ) ); 2240 #endif 2061 2241 uiW += ( 1 == uiCode ? 1 : 0 ); 2062 2242 } … … 2078 2258 { 2079 2259 UInt uiSymbol = 0; 2260 #if MTK_IC_FLAG_CABAC_SIMP_G0061 2261 m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUICFlagSCModel.get( 0, 0, 0 ) ); 2262 #else 2080 2263 UInt uiCtxIC = pcCU->getCtxICFlag( uiAbsPartIdx ); 2081 2264 m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUICFlagSCModel.get( 0, 0, uiCtxIC ) ); 2265 #endif 2082 2266 #if !H_MV_ENC_DEC_TRAC 2083 2267 DTRACE_CABAC_VL( g_nSymbolCounter++ ); … … 2097 2281 2098 2282 #if H_3D_INTER_SDC 2283 #if QC_SDC_UNIFY_G0130 2284 Void TDecSbac::parseDeltaDC( TComDataCU* pcCU, UInt absPartIdx, UInt depth ) 2285 { 2286 if( ! ( pcCU->getSDCFlag( absPartIdx ) || ( pcCU->isIntra( absPartIdx ) && getDimType( pcCU->getLumaIntraDir( absPartIdx ) ) < DIM_NUM_TYPE ) ) ) 2287 { 2288 assert( 0 ); 2289 } 2290 2291 UInt symbol = 0; 2292 UInt uiNumSegments = 0; 2293 2294 if( pcCU->isIntra( absPartIdx ) ) 2295 { 2296 UInt dir = pcCU->getLumaIntraDir( absPartIdx ); 2297 uiNumSegments = isDimMode( dir ) ? 2 : 1; 2298 2299 m_pcTDecBinIf->decodeBin( symbol, m_cDdcFlagSCModel.get( 0, 0, uiNumSegments-1 ) ); 2300 2301 if( pcCU->getSDCFlag( absPartIdx ) ) 2302 { 2303 assert( pcCU->getPartitionSize( absPartIdx ) == SIZE_2Nx2N ); 2304 pcCU->setTrIdxSubParts( 0, absPartIdx, depth ); 2305 pcCU->setCbfSubParts( 1, 1, 1, absPartIdx, depth ); 2306 } 2307 else 2308 { 2309 pcCU->setLumaIntraDirSubParts( dir + symbol, absPartIdx, depth ); 2310 } 2311 } 2312 else 2313 { 2314 #if SEC_INTER_SDC_G0101 2315 uiNumSegments = 1; 2316 #else 2317 PartSize cPartSize = pcCU->getPartitionSize( absPartIdx ); 2318 uiNumSegments = ( cPartSize == SIZE_2Nx2N ) ? 1 : ( cPartSize == SIZE_NxN ? 4 : 2 ); 2319 #endif 2320 symbol = 1; 2321 } 2322 2323 2324 for( UInt segment = 0; segment < uiNumSegments; segment++ ) 2325 { 2326 Pel valDeltaDC = 0; 2327 if( symbol ) 2328 { 2329 xParseDimDeltaDC( valDeltaDC, uiNumSegments ); 2330 } 2331 2332 if( pcCU->isIntra( absPartIdx ) ) 2333 { 2334 UInt dir = pcCU->getLumaIntraDir( absPartIdx ); 2335 2336 if( pcCU->getSDCFlag( absPartIdx ) ) 2337 { 2338 pcCU->setSDCSegmentDCOffset( valDeltaDC, segment, absPartIdx ); 2339 } 2340 else 2341 { 2342 pcCU->setDimDeltaDC( getDimType( dir ), segment, absPartIdx, valDeltaDC ); 2343 } 2344 } 2345 else 2346 { 2347 pcCU->setSDCSegmentDCOffset( valDeltaDC, segment, absPartIdx ); 2348 } 2349 } 2350 } 2351 2352 Void TDecSbac::parseSDCFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 2353 { 2354 UInt uiSymbol = 0; 2355 UInt uiCtxSDCFlag = pcCU->getCtxSDCFlag( uiAbsPartIdx ); 2356 2357 m_pcTDecBinIf->decodeBin( uiSymbol, m_cSDCFlagSCModel.get( 0, 0, uiCtxSDCFlag ) ); 2358 2359 if( uiSymbol ) 2360 { 2361 pcCU->setSDCFlagSubParts( true, uiAbsPartIdx, uiDepth ); 2362 pcCU->setTrIdxSubParts( 0, uiAbsPartIdx, uiDepth ); 2363 pcCU->setCbfSubParts( 1, 1, 1, uiAbsPartIdx, uiDepth ); 2364 } 2365 else 2366 { 2367 pcCU->setSDCFlagSubParts( false, uiAbsPartIdx, uiDepth ); 2368 } 2369 } 2370 #else 2099 2371 Void TDecSbac::parseInterSDCFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 2100 2372 { … … 2131 2403 } 2132 2404 #endif 2405 #endif 2406 2407 #if H_3D_DBBP 2408 Void TDecSbac::parseDBBPFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 2409 { 2410 PartSize ePartSize = pcCU->getPartitionSize( uiAbsPartIdx ); 2411 AOF( pcCU->getSlice()->getVPS()->getUseDBBP(pcCU->getSlice()->getLayerIdInVps()) ); 2412 AOF( !pcCU->getSlice()->getIsDepth() ); 2413 AOF( ePartSize == RWTH_DBBP_PACK_MODE ); 2414 2415 UInt uiSymbol = 0; 2416 2417 m_pcTDecBinIf->decodeBin( uiSymbol, m_cDBBPFlagSCModel.get( 0, 0, 0 ) ); 2418 2419 if( uiSymbol ) 2420 { 2421 pcCU->setDBBPFlagSubParts(true, uiAbsPartIdx, 0, uiDepth); 2422 } 2423 } 2424 #endif 2133 2425 2134 2426 //! \} -
trunk/source/Lib/TLibDecoder/TDecSbac.h
r773 r833 112 112 #endif 113 113 #if H_3D_INTER_SDC 114 #if QC_SDC_UNIFY_G0130 115 Void parseDeltaDC ( TComDataCU* pcCU, UInt absPartIdx, UInt depth ); 116 Void parseSDCFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 117 #else 114 118 Void parseInterSDCFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 115 119 Void parseInterSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPart ); 120 #endif 121 #endif 122 #if H_3D_DBBP 123 Void parseDBBPFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 116 124 #endif 117 125 private: … … 211 219 ContextModel3DBuffer m_cDdcFlagSCModel; 212 220 ContextModel3DBuffer m_cDdcDataSCModel; 221 #if QC_GENERIC_SDC_G0122 222 ContextModel3DBuffer m_cAngleFlagSCModel; 223 #if !QC_SDC_UNIFY_G0130 224 ContextModel3DBuffer m_cIntraSdcFlagSCModel; 225 #endif 226 #endif 213 227 #if H_3D_DIM_DMM 214 228 ContextModel3DBuffer m_cDmm1DataSCModel; … … 219 233 #endif 220 234 #endif 221 #if H_3D_INTER_SDC 235 #if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130 222 236 ContextModel3DBuffer m_cInterSDCFlagSCModel; 223 237 ContextModel3DBuffer m_cInterSDCResidualSCModel; 224 238 ContextModel3DBuffer m_cInterSDCResidualSignFlagSCModel; 225 239 #endif 240 #if QC_SDC_UNIFY_G0130 241 ContextModel3DBuffer m_cSDCFlagSCModel; 242 #endif 243 #if H_3D_DBBP 244 ContextModel3DBuffer m_cDBBPFlagSCModel; 245 #endif 226 246 }; 227 247 -
trunk/source/Lib/TLibDecoder/TDecTop.h
r773 r833 82 82 #endif 83 83 84 #if MTK_DDD_G0063 85 Int getCodedScale( Int iBaseView, Int iCureView){ return m_aaiCodedScale[ iBaseView ][ iCureView ];} 86 Int getCodedOffset( Int iBaseView, Int iCureView){ return m_aaiCodedOffset[ iBaseView ][ iCureView ];} 87 UInt getCamParsCodedPrecision(){ return m_uiCamParsCodedPrecision; } 88 #endif 89 84 90 private: 85 91 Bool xIsComplete ();
Note: See TracChangeset for help on using the changeset viewer.