Changeset 1039 in 3DVCSoftware for trunk/source/Lib/TLibDecoder
- Timestamp:
- 4 Aug 2014, 11:36:05 (11 years ago)
- Location:
- trunk/source/Lib/TLibDecoder
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/Lib/TLibDecoder/TDecCAVLC.cpp
r976 r1039 1051 1051 Void TDecCavlc::parseSPSExtension2( TComSPS* pcSPS, Int viewIndex, Bool depthFlag ) 1052 1052 { 1053 #if !MTK_I0099_VPS_EX2 1053 1054 UInt uiCode; 1054 1055 #if H_3D_QTLPC … … 1061 1062 pcSPS->setUsePC( uiCode ); 1062 1063 } 1064 #endif 1063 1065 #endif 1064 1066 } … … 1756 1758 { 1757 1759 UInt uiCode; 1760 #if SEC_VPS_CLEANUP_I0090 1761 for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1762 #else 1758 1763 for( Int i = 0; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1764 #endif 1759 1765 { 1760 1766 #if H_3D_ARP … … 1765 1771 pcVPS->setSubPULog2Size(i, 0); 1766 1772 #endif 1773 #if !SEC_VPS_CLEANUP_I0090 1767 1774 if ( i != 0 ) 1768 { 1775 #endif 1776 { 1777 #if MTK_I0099_VPS_EX2 1778 READ_FLAG( uiCode, "iv_mv_pred_flag[i]"); pcVPS->setIvMvPredFlag ( i, uiCode == 1 ? true : false ); 1779 #if SEC_HLS_CLEANUP_I0100 1780 READ_FLAG( uiCode, "iv_mv_scaling_flag[i]"); pcVPS->setIvMvScalingFlag ( i, uiCode == 1 ? true : false ); 1781 #endif 1782 #endif 1769 1783 if( !( pcVPS->getDepthId( i ) == 1 ) ) 1770 1784 { 1771 1785 #if H_3D_IV_MERGE 1786 #if !MTK_I0099_VPS_EX2 1772 1787 READ_FLAG( uiCode, "iv_mv_pred_flag[i]"); pcVPS->setIvMvPredFlag ( i, uiCode == 1 ? true : false ); 1788 #endif 1773 1789 if( !pcVPS->getNumDirectRefLayers(i) ) 1774 1790 { … … 1802 1818 else 1803 1819 { 1820 #if !MTK_I0099_VPS_EX2 1804 1821 #if H_3D_IV_MERGE 1805 1822 if(i!=1) … … 1818 1835 } 1819 1836 #endif 1837 #endif 1820 1838 #if H_3D_IV_MERGE 1821 1839 READ_FLAG( uiCode, "mpi_flag[i]" ); pcVPS->setMPIFlag( i, uiCode == 1 ? true : false ); 1822 1840 #endif 1841 #if MTK_I0099_VPS_EX2 1842 READ_UVLC (uiCode, "log2_mpi_sub_PU_size_minus3[i]"); pcVPS->setSubPUMPILog2Size(i, uiCode+3); 1843 #endif 1823 1844 READ_FLAG( uiCode, "vps_depth_modes_flag[i]" ); pcVPS->setVpsDepthModesFlag( i, uiCode == 1 ? true : false ); 1824 // READ_FLAG( uiCode, "lim_qt_pred_flag[i]"); pcVPS->setLimQtPreFlag ( i, uiCode == 1 ? true : false ); 1845 #if SEPARATE_FLAG_I0085 1846 READ_FLAG( uiCode, "ivp_flag[i]" ); pcVPS->setIVPFlag( i, uiCode == 1 ? true : false ); 1847 #endif 1848 #if MTK_I0099_VPS_EX2 1849 READ_FLAG( uiCode, "lim_qt_pred_flag[i]"); pcVPS->setLimQtPredFlag ( i, uiCode == 1 ? true : false ); 1850 #endif 1825 1851 #if H_3D_INTER_SDC 1826 1852 READ_FLAG( uiCode, "depth_inter_SDC_flag" ); pcVPS->setInterSDCFlag( i, uiCode ? true : false ); … … 1835 1861 1836 1862 READ_UVLC( uiCamParPrecision, "cp_precision" ); 1863 #if SEC_VPS_CLEANUP_I0090 1864 for (UInt viewIndex=1; viewIndex<pcVPS->getNumViews(); viewIndex++) 1865 #else 1837 1866 for (UInt viewIndex=0; viewIndex<pcVPS->getNumViews(); viewIndex++) 1867 #endif 1838 1868 { 1839 1869 pcVPS->setCamParPresent ( viewIndex, false ); … … 1857 1887 } 1858 1888 } 1889 #if !MTK_I0099_VPS_EX2 1859 1890 READ_UVLC (uiCode, "log2_sub_PU_MPI_size_minus3"); pcVPS->setSubPUMPILog2Size( uiCode + 3 ); 1891 #endif 1892 #if !SEC_HLS_CLEANUP_I0100 1860 1893 READ_FLAG( uiCode, "iv_mv_scaling_flag"); pcVPS->setIvMvScalingFlag( uiCode == 1 ? true : false ); 1894 #endif 1861 1895 } 1862 1896 #endif … … 2459 2493 } 2460 2494 #if H_3D_IC 2495 #if SEC_HLS_CLEANUP_I0100 2496 else if( rpcSlice->getViewIndex() && ( rpcSlice->getSliceType() == P_SLICE || rpcSlice->getSliceType() == B_SLICE ) && !rpcSlice->getIsDepth() && vps->getNumDirectRefLayers( layerId ) > 0 ) 2497 #else 2461 2498 else if( rpcSlice->getViewIndex() && ( rpcSlice->getSliceType() == P_SLICE || rpcSlice->getSliceType() == B_SLICE ) && !rpcSlice->getIsDepth()) 2499 #endif 2462 2500 { 2463 2501 UInt uiCodeTmp = 0; … … 2471 2509 rpcSlice->setIcSkipParseFlag( uiCodeTmp ); 2472 2510 } 2511 } 2512 #endif 2513 #if MTK_SINGLE_DEPTH_MODE_I0095 2514 if(rpcSlice->getIsDepth()) 2515 { 2516 UInt uiCodeTmp = 0; 2517 READ_FLAG( uiCodeTmp, "slice_enable_single_depth_mode" ); 2518 rpcSlice->setApplySingleDepthMode(uiCodeTmp); 2473 2519 } 2474 2520 #endif … … 2843 2889 assert(0); 2844 2890 } 2845 2891 #if MTK_SINGLE_DEPTH_MODE_I0095 2892 Void TDecCavlc::parseSingleDepthMode( TComDataCU* /*pcCU*/, UInt /*uiAbsPartIdx*/, UInt /*uiDepth*/ ) 2893 { 2894 assert(0); 2895 } 2896 #endif 2846 2897 Void TDecCavlc::parseCUTransquantBypassFlag( TComDataCU* /*pcCU*/, UInt /*uiAbsPartIdx*/, UInt /*uiDepth*/ ) 2847 2898 { -
trunk/source/Lib/TLibDecoder/TDecCAVLC.h
r976 r1039 119 119 120 120 Void parseSkipFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 121 #if MTK_SINGLE_DEPTH_MODE_I0095 122 Void parseSingleDepthMode ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 123 #endif 121 124 Void parseCUTransquantBypassFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 122 125 Void parseMergeFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPUIdx ); -
trunk/source/Lib/TLibDecoder/TDecCu.cpp
r976 r1039 420 420 Int vspFlag[MRG_MAX_NUM_CANDS_MEM]; 421 421 memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM); 422 #if !FIX_TICKET_79 422 423 InheritedVSPDisInfo inheritedVSPDisInfo[MRG_MAX_NUM_CANDS_MEM]; 424 #endif 423 425 #if H_3D_SPIVMP 424 426 Bool bSPIVMPFlag[MRG_MAX_NUM_CANDS_MEM]; … … 432 434 m_ppcCU[uiDepth]->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex ); 433 435 m_ppcCU[uiDepth]->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours 436 #if !FIX_TICKET_79 434 437 , inheritedVSPDisInfo 438 #endif 435 439 #if H_3D_SPIVMP 436 440 , pcMvFieldSP, puhInterDirSP … … 453 457 #endif 454 458 #endif 455 #if H_3D_VSP 459 #if H_3D_VSP && !FIX_TICKET_79 456 460 if(vspFlag[uiMergeIndex]) 457 461 { … … 542 546 return; 543 547 } 544 548 #if MTK_SINGLE_DEPTH_MODE_I0095 549 m_pcEntropyDecoder->decodeSingleDepthMode( pcCU, uiAbsPartIdx, uiDepth ); 550 if(!pcCU->getSingleDepthFlag(uiAbsPartIdx)) 551 { 552 #endif 545 553 m_pcEntropyDecoder->decodePredMode( pcCU, uiAbsPartIdx, uiDepth ); 546 554 m_pcEntropyDecoder->decodePartSize( pcCU, uiAbsPartIdx, uiDepth ); … … 572 580 m_pcEntropyDecoder->decodeCoeff( pcCU, uiAbsPartIdx, uiDepth, uiCurrWidth, uiCurrHeight, bCodeDQP ); 573 581 setdQPFlag( bCodeDQP ); 582 #if MTK_SINGLE_DEPTH_MODE_I0095 583 } 584 #endif 574 585 xFinishDecodeCU( pcCU, uiAbsPartIdx, uiDepth, ruiIsLast ); 575 586 #if H_3D_IV_MERGE … … 671 682 break; 672 683 case MODE_INTRA: 684 #if MTK_SINGLE_DEPTH_MODE_I0095 685 if( m_ppcCU[uiDepth]->getSingleDepthFlag(0) ) 686 xReconIntraSingleDepth( m_ppcCU[uiDepth], 0, uiDepth ); 687 #if H_3D_DIM_SDC 688 else if( m_ppcCU[uiDepth]->getSDCFlag(0) ) 689 xReconIntraSDC( m_ppcCU[uiDepth], 0, uiDepth ); 690 #endif 691 else 692 #else 673 693 #if H_3D_DIM_SDC 674 694 if( m_ppcCU[uiDepth]->getSDCFlag(0) ) 675 695 xReconIntraSDC( m_ppcCU[uiDepth], 0, uiDepth ); 676 696 else 697 #endif 677 698 #endif 678 699 xReconIntraQT( m_ppcCU[uiDepth], uiDepth ); … … 709 730 } 710 731 } 711 732 #if MTK_SINGLE_DEPTH_MODE_I0095 733 Void TDecCu::xReconIntraSingleDepth( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 734 { 735 UInt uiWidth = pcCU->getWidth ( 0 ); 736 UInt uiHeight = pcCU->getHeight ( 0 ); 737 738 TComYuv* pcRecoYuv = m_ppcYuvReco[uiDepth]; 739 740 UInt uiStride = pcRecoYuv->getStride (); 741 Pel* piReco = pcRecoYuv->getLumaAddr( uiAbsPartIdx ); 742 743 744 AOF( uiWidth == uiHeight ); 745 AOF( uiAbsPartIdx == 0 ); 746 747 //construction of depth candidates 748 Pel testDepth; 749 Pel DepthNeighbours[5]; 750 Int index =0; 751 for( Int i = 0; (i < 5) && (index<MTK_SINGLE_DEPTH_MODE_CANDIDATE_LIST_SIZE) ; i++ ) 752 { 753 if(!pcCU->getNeighDepth (0, uiAbsPartIdx, &testDepth, i)) 754 { 755 continue; 756 } 757 DepthNeighbours[index]=testDepth; 758 index++; 759 for(Int j=0;j<index-1;j++) 760 { 761 if( (DepthNeighbours[index-1]==DepthNeighbours[j]) ) 762 { 763 index--; 764 break; 765 } 766 } 767 } 768 769 if(index==0) 770 { 771 DepthNeighbours[index]=1<<(g_bitDepthY-1); 772 index++; 773 } 774 775 if(index==1) 776 { 777 DepthNeighbours[index]=ClipY(DepthNeighbours[0] + 1 ); 778 index++; 779 } 780 781 for( UInt uiY = 0; uiY < uiHeight; uiY++ ) 782 { 783 for( UInt uiX = 0; uiX < uiWidth; uiX++ ) 784 { 785 piReco[ uiX ] =DepthNeighbours[(Int)pcCU->getSingleDepthValue(uiAbsPartIdx)]; 786 } 787 piReco += uiStride; 788 } 789 790 // clear UV 791 UInt uiStrideC = pcRecoYuv->getCStride(); 792 Pel *pRecCb = pcRecoYuv->getCbAddr(); 793 Pel *pRecCr = pcRecoYuv->getCrAddr(); 794 795 for (Int y=0; y<uiHeight/2; y++) 796 { 797 for (Int x=0; x<uiWidth/2; x++) 798 { 799 pRecCb[x] = 1<<(g_bitDepthC-1); 800 pRecCr[x] = 1<<(g_bitDepthC-1); 801 } 802 803 pRecCb += uiStrideC; 804 pRecCr += uiStrideC; 805 } 806 } 807 #endif 712 808 #if H_3D_INTER_SDC 713 809 Void TDecCu::xReconInterSDC( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) … … 832 928 833 929 // reconstruct final prediction signal by combining both segments 930 #if SHARP_DBBP_SIMPLE_FLTER_I0109 931 m_pcPrediction->combineSegmentsWithMask(apSegPredYuv, m_ppcYuvReco[uiDepth], pMask, pcCU->getWidth(0), pcCU->getHeight(0), 0, ePartSize); 932 #else 834 933 m_pcPrediction->combineSegmentsWithMask(apSegPredYuv, m_ppcYuvReco[uiDepth], pMask, pcCU->getWidth(0), pcCU->getHeight(0)); 934 #endif 835 935 836 936 // inter recon … … 1206 1306 { 1207 1307 Int uiTabIdx = pcCU->getDmmWedgeTabIdx(DMM1_IDX, uiAbsPartIdx); 1208 1308 1309 #if SHARP_DMM1_I0110 1310 WedgeList* pacWedgeList = pcCU->isDMM1UpscaleMode(uiWidth) ? &g_dmmWedgeLists[(g_aucConvertToBit[pcCU->getDMM1BasePatternWidth(uiWidth)])] : &g_dmmWedgeLists[(g_aucConvertToBit[uiWidth])]; 1311 #else 1209 1312 WedgeList* pacWedgeList = &g_dmmWedgeLists[(g_aucConvertToBit[uiWidth])]; 1313 #endif 1210 1314 TComWedgelet* pcWedgelet = &(pacWedgeList->at( uiTabIdx )); 1211 1315 1212 1316 uiNumSegments = 2; 1317 1318 #if SHARP_DMM1_I0110 1319 pbMask = pcCU->isDMM1UpscaleMode( uiWidth ) ? pcWedgelet->getScaledPattern(uiWidth) : pcWedgelet->getPattern(); 1320 uiMaskStride = pcCU->isDMM1UpscaleMode( uiWidth ) ? uiWidth : pcWedgelet->getStride(); 1321 #else 1213 1322 pbMask = pcWedgelet->getPattern(); 1214 1323 uiMaskStride = pcWedgelet->getStride(); 1324 #endif 1215 1325 } 1216 1326 if( getDimType( uiLumaPredMode ) == DMM4_IDX ) -
trunk/source/Lib/TLibDecoder/TDecCu.h
r872 r1039 123 123 Void setdQPFlag ( Bool b ) { m_bDecodeDQP = b; } 124 124 Void xFillPCMBuffer (TComDataCU* pCU, UInt depth); 125 #if MTK_SINGLE_DEPTH_MODE_I0095 126 Void xReconIntraSingleDepth( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 127 #endif 125 128 #if H_3D_DIM_SDC 126 129 Void xReconIntraSDC ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); -
trunk/source/Lib/TLibDecoder/TDecEntropy.cpp
r976 r1039 52 52 m_pcEntropyDecoderIf->parseSkipFlag( pcCU, uiAbsPartIdx, uiDepth ); 53 53 } 54 54 #if MTK_SINGLE_DEPTH_MODE_I0095 55 Void TDecEntropy::decodeSingleDepthMode( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 56 { 57 if ( !pcCU->getSlice()->getIsDepth() ) 58 { 59 return; 60 } 61 if(!pcCU->getSlice()->getApplySingleDepthMode()) 62 { 63 return; 64 } 65 m_pcEntropyDecoderIf->parseSingleDepthMode( pcCU, uiAbsPartIdx, uiDepth ); 66 } 67 #endif 55 68 Void TDecEntropy::decodeCUTransquantBypassFlag(TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 56 69 { … … 140 153 #if H_3D_DBBP 141 154 155 #if SEC_DBBP_EXPLICIT_SIG_I0077 156 #if SEC_DBBP_DISALLOW_8x8_I0078 157 if( pcCU->getSlice()->getVPS()->getUseDBBP(pcCU->getSlice()->getLayerIdInVps()) && (pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2NxN || pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_Nx2N) && pcCU->getWidth(uiAbsPartIdx) > 8 ) 158 #else 159 if( pcCU->getSlice()->getVPS()->getUseDBBP(pcCU->getSlice()->getLayerIdInVps()) && (pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2NxN || pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_Nx2N) ) 160 #endif 161 #else 162 #if SEC_DBBP_DISALLOW_8x8_I0078 163 if( pcCU->getSlice()->getVPS()->getUseDBBP(pcCU->getSlice()->getLayerIdInVps()) && pcCU->getWidth(uiAbsPartIdx) > 8 ) 164 #else 142 165 if( pcCU->getSlice()->getVPS()->getUseDBBP(pcCU->getSlice()->getLayerIdInVps()) ) 166 #endif 167 #endif 143 168 { 144 169 decodeDBBPFlag(pcCU, uiAbsPartIdx, uiDepth); 145 170 #if !SEC_DBBP_EXPLICIT_SIG_I0077 146 171 if( pcCU->getDBBPFlag(uiAbsPartIdx) ) 147 172 { … … 167 192 pcCU->setDBBPFlagSubParts(true, uiAbsPartIdx+uiPUOffset, 1, uiDepth); 168 193 } 194 #endif 169 195 } 170 196 #endif … … 285 311 Int vspFlag[MRG_MAX_NUM_CANDS_MEM]; 286 312 memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM); 313 #if !FIX_TICKET_79 287 314 InheritedVSPDisInfo inheritedVSPDisInfo[MRG_MAX_NUM_CANDS_MEM]; 315 #endif 288 316 #if H_3D_SPIVMP 289 317 memset(bSPIVMPFlag, false, sizeof(Bool)*MRG_MAX_NUM_CANDS_MEM); … … 292 320 pcSubCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand); 293 321 pcSubCU->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours 322 #if !FIX_TICKET_79 294 323 , inheritedVSPDisInfo 324 #endif 295 325 #if H_3D_SPIVMP 296 326 , pcMvFieldSP, puhInterDirSP … … 304 334 pcCU->setVSPFlagSubParts( vspFlag[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth ); 305 335 336 #if !FIX_TICKET_79 306 337 if(vspFlag[uiMergeIndex]) 307 338 { 308 339 pcCU->setDvInfoSubParts(inheritedVSPDisInfo[uiMergeIndex].m_acDvInfo, uiSubPartIdx, uiPartIdx, uiDepth); 309 340 } 341 #endif 310 342 #else 311 343 #if H_3D … … 328 360 Int vspFlag[MRG_MAX_NUM_CANDS_MEM]; 329 361 memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM); 362 #if !FIX_TICKET_79 330 363 InheritedVSPDisInfo inheritedVSPDisInfo[MRG_MAX_NUM_CANDS_MEM]; 364 #endif 331 365 #if H_3D_SPIVMP 332 366 memset(bSPIVMPFlag, false, sizeof(Bool)*MRG_MAX_NUM_CANDS_MEM); … … 335 369 pcSubCU->getInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex ); 336 370 pcSubCU->xGetInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours 371 #if !FIX_TICKET_79 337 372 , inheritedVSPDisInfo 373 #endif 338 374 #if H_3D_SPIVMP 339 375 , pcMvFieldSP, puhInterDirSP … … 346 382 ,numValidMergeCand ); 347 383 pcCU->setVSPFlagSubParts( vspFlag[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth ); 384 #if !FIX_TICKET_79 348 385 if(vspFlag[uiMergeIndex]) 349 386 { 350 387 pcCU->setDvInfoSubParts(inheritedVSPDisInfo[uiMergeIndex].m_acDvInfo, uiSubPartIdx, uiPartIdx, uiDepth); 351 388 } 389 #endif 352 390 #else 353 391 #if H_3D … … 447 485 #endif 448 486 } 449 #if H_3D_VSP 487 #if H_3D_VSP && !FIX_TICKET_75 450 488 if ( (pcCU->getInterDir(uiSubPartIdx) == 3) && pcSubCU->isBipredRestriction(uiPartIdx) && (pcCU->getVSPFlag(uiSubPartIdx) == 0)) 451 489 #else -
trunk/source/Lib/TLibDecoder/TDecEntropy.h
r976 r1039 89 89 public: 90 90 virtual Void parseSkipFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0; 91 #if MTK_SINGLE_DEPTH_MODE_I0095 92 virtual Void parseSingleDepthMode ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0; 93 #endif 91 94 virtual Void parseCUTransquantBypassFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0; 92 95 virtual Void parseSplitFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0; … … 176 179 Void decodeSplitFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 177 180 Void decodeSkipFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 181 #if MTK_SINGLE_DEPTH_MODE_I0095 182 Void decodeSingleDepthMode ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) ; 183 #endif 178 184 Void decodeCUTransquantBypassFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 179 185 Void decodeMergeFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPUIdx ); -
trunk/source/Lib/TLibDecoder/TDecSbac.cpp
r976 r1039 52 52 , m_cCUSplitFlagSCModel ( 1, 1, NUM_SPLIT_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels ) 53 53 , m_cCUSkipFlagSCModel ( 1, 1, NUM_SKIP_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 54 #if MTK_SINGLE_DEPTH_MODE_I0095 55 , m_cCUSingleDepthFlagSCModel ( 1, 1, NUM_SINGLEDEPTH_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 56 , m_cSingleDepthValueSCModel ( 1, 1, NUM_SINGLE_DEPTH_VALUE_DATA_CTX , m_contextModels + m_numContextModels, m_numContextModels) 57 #endif 54 58 , m_cCUMergeFlagExtSCModel ( 1, 1, NUM_MERGE_FLAG_EXT_CTX , m_contextModels + m_numContextModels, m_numContextModels) 55 59 , m_cCUMergeIdxExtSCModel ( 1, 1, NUM_MERGE_IDX_EXT_CTX , m_contextModels + m_numContextModels, m_numContextModels) … … 132 136 m_cCUSplitFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_SPLIT_FLAG ); 133 137 m_cCUSkipFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_SKIP_FLAG ); 138 #if MTK_SINGLE_DEPTH_MODE_I0095 139 m_cCUSingleDepthFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_SINGLEDEPTH_FLAG ); 140 m_cSingleDepthValueSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_SINGLE_DEPTH_VALUE_DATA ); 141 #endif 134 142 m_cCUMergeFlagExtSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_MERGE_FLAG_EXT ); 135 143 m_cCUMergeIdxExtSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_MERGE_IDX_EXT ); … … 199 207 m_cCUSplitFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SPLIT_FLAG ); 200 208 m_cCUSkipFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SKIP_FLAG ); 209 #if MTK_SINGLE_DEPTH_MODE_I0095 210 m_cCUSingleDepthFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SINGLEDEPTH_FLAG ); 211 m_cSingleDepthValueSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SINGLE_DEPTH_VALUE_DATA ); 212 #endif 201 213 m_cCUMergeFlagExtSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_MERGE_FLAG_EXT ); 202 214 m_cCUMergeIdxExtSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_MERGE_IDX_EXT ); … … 420 432 #endif 421 433 434 #if !FIX_TICKET_76 422 435 #if H_3D_DIM_SDC 423 436 Void TDecSbac::xParseSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiSegment ) … … 499 512 #endif 500 513 #endif 501 514 #endif 502 515 /** Parse I_PCM information. 503 516 * \param pcCU … … 636 649 #endif 637 650 } 638 651 #if MTK_SINGLE_DEPTH_MODE_I0095 652 Void TDecSbac::parseSingleDepthMode( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 653 { 654 pcCU->setSingleDepthFlagSubParts( false, uiAbsPartIdx, uiDepth ); 655 UInt uiSymbol = 0; 656 m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUSingleDepthFlagSCModel.get( 0, 0, 0 ) ); 657 if( uiSymbol ) 658 { 659 pcCU->setSingleDepthFlagSubParts( true, uiAbsPartIdx, uiDepth ); 660 pcCU->setSkipFlagSubParts( false, uiAbsPartIdx, uiDepth ); 661 pcCU->setSDCFlagSubParts( false, uiAbsPartIdx, uiDepth ); 662 pcCU->setPredModeSubParts( MODE_INTRA, uiAbsPartIdx, uiDepth ); 663 pcCU->setPartSizeSubParts( SIZE_2Nx2N, uiAbsPartIdx, uiDepth ); 664 pcCU->setLumaIntraDirSubParts (DC_IDX, uiAbsPartIdx, uiDepth ); 665 pcCU->setSizeSubParts( g_uiMaxCUWidth>>uiDepth, g_uiMaxCUHeight>>uiDepth, uiAbsPartIdx, uiDepth ); 666 pcCU->setMergeFlagSubParts( false , uiAbsPartIdx, 0, uiDepth ); 667 pcCU->setTrIdxSubParts(0, uiAbsPartIdx, uiDepth); 668 pcCU->setCbfSubParts(0, 1, 1, uiAbsPartIdx, uiDepth); 669 670 UInt absValDeltaDC = 0; 671 672 UInt uiUnaryIdx = 0; 673 UInt uiNumCand = MTK_SINGLE_DEPTH_MODE_CANDIDATE_LIST_SIZE; 674 if ( uiNumCand > 1 ) 675 { 676 for( ; uiUnaryIdx < uiNumCand - 1; ++uiUnaryIdx ) 677 { 678 UInt uiSymbol2 = 0; 679 if ( uiUnaryIdx==0 ) 680 { 681 m_pcTDecBinIf->decodeBin( uiSymbol2, m_cSingleDepthValueSCModel.get( 0, 0, 0 ) ); 682 } 683 else 684 { 685 m_pcTDecBinIf->decodeBinEP( uiSymbol2); 686 } 687 if( uiSymbol2 == 0 ) 688 { 689 break; 690 } 691 } 692 } 693 absValDeltaDC = uiUnaryIdx; 694 pcCU->setSingleDepthValueSubParts((Pel)absValDeltaDC,uiAbsPartIdx, 0, uiDepth); 695 } 696 } 697 698 #endif 639 699 /** parse merge flag 640 700 * \param pcCU … … 721 781 Bool bParseSplitFlag = true; 722 782 783 #if MTK_I0099_VPS_EX2 784 TComVPS *vps = pcCU->getPic()->getSlice(0)->getVPS(); 785 Bool bLimQtPredFlag = vps->getLimQtPredFlag(pcCU->getPic()->getSlice(0)->getLayerId()); 786 #else 723 787 TComSPS *sps = pcCU->getPic()->getSlice(0)->getSPS(); 788 #endif 724 789 TComPic *pcTexture = pcCU->getSlice()->getTexturePic(); 725 790 Bool bDepthMapDetect = (pcTexture != NULL); … … 728 793 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); 729 794 795 #if MTK_I0099_VPS_EX2 796 if(bDepthMapDetect && !bIntraSliceDetect && !rapPic && bLimQtPredFlag) 797 #else 730 798 if(bDepthMapDetect && !bIntraSliceDetect && !rapPic && sps->getUseQTL() && sps->getUsePC()) 799 #endif 731 800 { 732 801 TComDataCU *pcTextureCU = pcTexture->getCU(pcCU->getAddr()); … … 770 839 #if H_3D_QTLPC 771 840 Bool bParsePartSize = true; 841 #if MTK_I0099_VPS_EX2 842 TComVPS *vps = pcCU->getPic()->getSlice(0)->getVPS(); 843 Bool bLimQtPredFlag = vps->getLimQtPredFlag(pcCU->getPic()->getSlice(0)->getLayerId()); 844 #else 772 845 TComSPS *sps = pcCU->getPic()->getSlice(0)->getSPS(); 846 #endif 773 847 TComPic *pcTexture = pcCU->getSlice()->getTexturePic(); 774 848 Bool bDepthMapDetect = (pcTexture != NULL); … … 779 853 Bool depthDependent = false; 780 854 UInt uiTexturePart = uiMode; 855 #if MTK_I0099_VPS_EX2 856 if(bDepthMapDetect && !bIntraSliceDetect && !rapPic && bLimQtPredFlag ) 857 #else 781 858 if(bDepthMapDetect && !bIntraSliceDetect && !rapPic && sps->getUseQTL() && sps->getUsePC()) 859 #endif 782 860 { 783 861 TComDataCU *pcTextureCU = pcTexture->getCU(pcCU->getAddr()); … … 990 1068 { 991 1069 #if H_3D_DIM 1070 #if SEPARATE_FLAG_I0085 1071 if( pcCU->getSlice()->getVpsDepthModesFlag() || pcCU->getSlice()->getIVPFlag() ) 1072 #else 992 1073 if( pcCU->getSlice()->getVpsDepthModesFlag() ) 1074 #endif 993 1075 { 994 1076 parseIntraDepth( pcCU, absPartIdx+partOffset*j, depth ); … … 1132 1214 if( uiIsDimMode ) 1133 1215 { 1216 #if SEPARATE_FLAG_I0085 1217 if( pcCU->getSlice()->getVpsDepthModesFlag() && pcCU->getSlice()->getIVPFlag() ) 1218 { 1219 m_pcTDecBinIf->decodeBin( uiSymbol, m_cDepthIntraModeSCModel.get( 0, 0, 0 ) ); 1220 if( !uiSymbol ) 1221 { 1222 #if HS_DMM_SIGNALLING_I0120 1223 pcCU->setLumaIntraDirSubParts( DIM_OFFSET, absPartIdx, depth ); 1224 #else 1225 pcCU->setLumaIntraDirSubParts( ( 2 * DMM1_IDX + DIM_OFFSET ), absPartIdx, depth ); 1226 #endif 1227 } 1228 else 1229 { 1230 #if HS_DMM_SIGNALLING_I0120 1231 pcCU->setLumaIntraDirSubParts( ( 1+ DIM_OFFSET ), absPartIdx, depth ); 1232 #else 1233 pcCU->setLumaIntraDirSubParts( ( 2 * DMM4_IDX + DIM_OFFSET ), absPartIdx, depth ); 1234 #endif 1235 } 1236 } 1237 else if ( pcCU->getSlice()->getVpsDepthModesFlag() ) 1238 { 1239 #if HS_DMM_SIGNALLING_I0120 1240 pcCU->setLumaIntraDirSubParts( DIM_OFFSET, absPartIdx, depth ); 1241 #else 1242 pcCU->setLumaIntraDirSubParts( ( 2 * DMM1_IDX + DIM_OFFSET ), absPartIdx, depth ); 1243 #endif 1244 } 1245 else if( pcCU->getSlice()->getIVPFlag() ) 1246 { 1247 #if HS_DMM_SIGNALLING_I0120 1248 pcCU->setLumaIntraDirSubParts( ( 1+ DIM_OFFSET ), absPartIdx, depth ); 1249 #else 1250 pcCU->setLumaIntraDirSubParts( ( 2 * DMM4_IDX + DIM_OFFSET ), absPartIdx, depth ); 1251 #endif 1252 } 1253 #else 1134 1254 m_pcTDecBinIf->decodeBin( uiSymbol, m_cDepthIntraModeSCModel.get( 0, 0, 0 ) ); 1135 1255 if( !uiSymbol ) 1136 1256 { 1257 #if HS_DMM_SIGNALLING_I0120 1258 pcCU->setLumaIntraDirSubParts( DIM_OFFSET, absPartIdx, depth ); 1259 #else 1137 1260 pcCU->setLumaIntraDirSubParts( ( 2 * DMM1_IDX + DIM_OFFSET ), absPartIdx, depth ); 1261 #endif 1138 1262 } 1139 1263 else 1140 1264 { 1265 #if HS_DMM_SIGNALLING_I0120 1266 pcCU->setLumaIntraDirSubParts( ( 1+ DIM_OFFSET ), absPartIdx, depth ); 1267 #else 1141 1268 pcCU->setLumaIntraDirSubParts( ( 2 * DMM4_IDX + DIM_OFFSET ), absPartIdx, depth ); 1142 } 1269 #endif 1270 } 1271 #endif 1143 1272 } 1144 1273 } … … 2053 2182 } 2054 2183 2184 #if HS_DMM_SIGNALLING_I0120 2185 UInt symbol = 1; 2186 UInt uiNumSegments = isDimMode( pcCU->getLumaIntraDir( absPartIdx ) ) ? 2 : 1; 2187 #else 2055 2188 UInt symbol = 0; 2056 2189 UInt uiNumSegments = 0; 2057 2190 #endif 2191 2192 #if HS_DMM_SIGNALLING_I0120 2193 if( pcCU->isIntra( absPartIdx ) && pcCU->getSDCFlag( absPartIdx )) 2194 { 2195 #else 2058 2196 if( pcCU->isIntra( absPartIdx ) ) 2059 2197 { 2060 2198 UInt dir = pcCU->getLumaIntraDir( absPartIdx ); 2061 2199 uiNumSegments = isDimMode( dir ) ? 2 : 1; 2200 #endif 2062 2201 m_pcTDecBinIf->decodeBin( symbol, m_cDdcFlagSCModel.get( 0, 0, 0 ) ); 2202 #if !HS_DMM_SIGNALLING_I0120 2063 2203 if( pcCU->getSDCFlag( absPartIdx ) ) 2064 2204 { 2205 #endif 2065 2206 assert( pcCU->getPartitionSize( absPartIdx ) == SIZE_2Nx2N ); 2066 2207 pcCU->setTrIdxSubParts( 0, absPartIdx, depth ); 2067 2208 pcCU->setCbfSubParts( 1, 1, 1, absPartIdx, depth ); 2068 2209 } 2210 #if !HS_DMM_SIGNALLING_I0120 2069 2211 else 2070 2212 { … … 2077 2219 symbol = 1; 2078 2220 } 2221 #endif 2079 2222 2080 2223 … … 2138 2281 m_pcTDecBinIf->decodeBin( uiSymbol, m_cDBBPFlagSCModel.get( 0, 0, 0 ) ); 2139 2282 2283 #if SEC_DBBP_EXPLICIT_SIG_I0077 2284 PartSize ePartSize = pcCU->getPartitionSize( uiAbsPartIdx ); 2285 AOF( ePartSize == SIZE_2NxN || ePartSize == SIZE_Nx2N ); 2286 UInt uiPUOffset = ( g_auiPUOffset[UInt( ePartSize )] << ( ( pcCU->getSlice()->getSPS()->getMaxCUDepth() - uiDepth ) << 1 ) ) >> 4; 2287 pcCU->setDBBPFlagSubParts(uiSymbol, uiAbsPartIdx, 0, uiDepth); 2288 pcCU->setDBBPFlagSubParts(uiSymbol, uiAbsPartIdx+uiPUOffset, 1, uiDepth); 2289 #else 2140 2290 if( uiSymbol ) 2141 2291 { … … 2144 2294 pcCU->setDBBPFlagSubParts(true, uiAbsPartIdx + 2*uiCurrPartNumQ, 1, uiDepth); 2145 2295 } 2296 #endif 2146 2297 } 2147 2298 #endif -
trunk/source/Lib/TLibDecoder/TDecSbac.h
r976 r1039 129 129 130 130 Void parseSkipFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 131 #if MTK_SINGLE_DEPTH_MODE_I0095 132 Void parseSingleDepthMode ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 133 #endif 131 134 Void parseCUTransquantBypassFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 132 135 Void parseSplitFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); … … 179 182 ContextModel3DBuffer m_cCUSplitFlagSCModel; 180 183 ContextModel3DBuffer m_cCUSkipFlagSCModel; 184 #if MTK_SINGLE_DEPTH_MODE_I0095 185 ContextModel3DBuffer m_cCUSingleDepthFlagSCModel; 186 ContextModel3DBuffer m_cSingleDepthValueSCModel; 187 #endif 181 188 ContextModel3DBuffer m_cCUMergeFlagExtSCModel; 182 189 ContextModel3DBuffer m_cCUMergeIdxExtSCModel;
Note: See TracChangeset for help on using the changeset viewer.