Changeset 1145 in 3DVCSoftware for branches/HTM-13.1-dev1-Samsung/source/Lib/TLibDecoder
- Timestamp:
- 25 Feb 2015, 10:53:42 (10 years ago)
- Location:
- branches/HTM-13.1-dev1-Samsung/source/Lib/TLibDecoder
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-13.1-dev1-Samsung/source/Lib/TLibDecoder/TDecCAVLC.cpp
r1133 r1145 1040 1040 READ_FLAG( uiCode, "qt_pred_flag" ); sps3dExt->setQtPredFlag( d, uiCode == 1 ); 1041 1041 READ_FLAG( uiCode, "inter_sdc_flag" ); sps3dExt->setInterSdcFlag( d, uiCode == 1 ); 1042 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 1043 READ_FLAG( uiCode, "intra_skip_flag" ); sps3dExt->setDepthIntraSkipFlag( d, uiCode == 1 ); 1044 #else 1042 1045 READ_FLAG( uiCode, "intra_single_flag" ); sps3dExt->setIntraSingleFlag( d, uiCode == 1 ); 1046 #endif 1043 1047 } 1044 1048 } … … 2984 2988 assert(0); 2985 2989 } 2990 2991 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 2992 Void TDecCavlc::parseDIS( TComDataCU* /*pcCU*/, UInt /*uiAbsPartIdx*/, UInt /*uiDepth*/ ) 2993 { 2994 assert(0); 2995 } 2996 #else 2986 2997 #if H_3D_SINGLE_DEPTH 2987 2998 Void TDecCavlc::parseSingleDepthMode( TComDataCU* /*pcCU*/, UInt /*uiAbsPartIdx*/, UInt /*uiDepth*/ ) … … 2990 3001 } 2991 3002 #endif 3003 #endif 3004 2992 3005 Void TDecCavlc::parseCUTransquantBypassFlag( TComDataCU* /*pcCU*/, UInt /*uiAbsPartIdx*/, UInt /*uiDepth*/ ) 2993 3006 { -
branches/HTM-13.1-dev1-Samsung/source/Lib/TLibDecoder/TDecCAVLC.h
r1133 r1145 124 124 125 125 Void parseSkipFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 126 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 127 Void parseDIS ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 128 #else 126 129 #if H_3D_SINGLE_DEPTH 127 130 Void parseSingleDepthMode ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 128 #endif 131 #endif 132 #endif 129 133 Void parseCUTransquantBypassFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 130 134 Void parseMergeFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPUIdx ); -
branches/HTM-13.1-dev1-Samsung/source/Lib/TLibDecoder/TDecCu.cpp
r1133 r1145 520 520 return; 521 521 } 522 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 523 m_pcEntropyDecoder->decodeDIS( pcCU, uiAbsPartIdx, uiDepth ); 524 if(!pcCU->getDISFlag(uiAbsPartIdx)) 525 { 526 #else 522 527 #if H_3D_SINGLE_DEPTH 523 528 m_pcEntropyDecoder->decodeSingleDepthMode( pcCU, uiAbsPartIdx, uiDepth ); 524 529 if(!pcCU->getSingleDepthFlag(uiAbsPartIdx)) 525 530 { 531 #endif 526 532 #endif 527 533 m_pcEntropyDecoder->decodePredMode( pcCU, uiAbsPartIdx, uiDepth ); … … 554 560 m_pcEntropyDecoder->decodeCoeff( pcCU, uiAbsPartIdx, uiDepth, uiCurrWidth, uiCurrHeight, bCodeDQP ); 555 561 setdQPFlag( bCodeDQP ); 562 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 563 } 564 #else 556 565 #if H_3D_SINGLE_DEPTH 557 566 } 567 #endif 558 568 #endif 559 569 xFinishDecodeCU( pcCU, uiAbsPartIdx, uiDepth, ruiIsLast ); … … 656 666 break; 657 667 case MODE_INTRA: 668 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 669 if( m_ppcCU[uiDepth]->getDISFlag(0) ) 670 { 671 xReconDIS( m_ppcCU[uiDepth], 0, uiDepth ); 672 } 673 #if H_3D_DIM_SDC 674 else if( m_ppcCU[uiDepth]->getSDCFlag(0) ) 675 { 676 xReconIntraSDC( m_ppcCU[uiDepth], 0, uiDepth ); 677 } 678 #endif 679 else 680 #else 658 681 #if H_3D_SINGLE_DEPTH 659 682 if( m_ppcCU[uiDepth]->getSingleDepthFlag(0) ) … … 671 694 #endif 672 695 #endif 696 #endif 673 697 xReconIntraQT( m_ppcCU[uiDepth], uiDepth ); 674 698 break; … … 704 728 } 705 729 } 730 731 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 732 Void TDecCu::xReconDIS( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 733 { 734 UInt uiWidth = pcCU->getWidth ( 0 ); 735 UInt uiHeight = pcCU->getHeight ( 0 ); 736 737 TComYuv* pcRecoYuv = m_ppcYuvReco[uiDepth]; 738 739 UInt uiStride = pcRecoYuv->getStride (); 740 Pel* piReco = pcRecoYuv->getLumaAddr( uiAbsPartIdx ); 741 742 743 AOF( uiWidth == uiHeight ); 744 AOF( uiAbsPartIdx == 0 ); 745 746 Bool bAboveAvail = false; 747 Bool bLeftAvail = false; 748 pcCU->getPattern()->initPattern ( pcCU, 0, uiAbsPartIdx ); 749 pcCU->getPattern()->initAdiPattern( pcCU, uiAbsPartIdx, 0, 750 m_pcPrediction->getPredicBuf (), 751 m_pcPrediction->getPredicBufWidth (), 752 m_pcPrediction->getPredicBufHeight (), 753 bAboveAvail, bLeftAvail 754 ); 755 756 if ( pcCU->getDISType(uiAbsPartIdx) == 0 ) 757 { 758 m_pcPrediction->predIntraLumaAng( pcCU->getPattern(), VER_IDX, piReco, uiStride, uiWidth, uiHeight, bAboveAvail, bLeftAvail ); 759 } 760 else if ( pcCU->getDISType(uiAbsPartIdx) == 1 ) 761 { 762 m_pcPrediction->predIntraLumaAng( pcCU->getPattern(), HOR_IDX, piReco, uiStride, uiWidth, uiHeight, bAboveAvail, bLeftAvail ); 763 } 764 else if ( pcCU->getDISType(uiAbsPartIdx) == 2 ) 765 { 766 Pel pSingleDepth = 1 << ( g_bitDepthY - 1 ); 767 pcCU->getNeighDepth ( 0, 0, &pSingleDepth, 0 ); 768 for( UInt uiY = 0; uiY < uiHeight; uiY++ ) 769 { 770 for( UInt uiX = 0; uiX < uiWidth; uiX++ ) 771 { 772 piReco[ uiX ] = pSingleDepth; 773 } 774 piReco+= uiStride; 775 } 776 } 777 else if ( pcCU->getDISType(uiAbsPartIdx) == 3 ) 778 { 779 Pel pSingleDepth = 1 << ( g_bitDepthY - 1 ); 780 pcCU->getNeighDepth ( 0, 0, &pSingleDepth, 1 ); 781 for( UInt uiY = 0; uiY < uiHeight; uiY++ ) 782 { 783 for( UInt uiX = 0; uiX < uiWidth; uiX++ ) 784 { 785 piReco[ uiX ] = pSingleDepth; 786 } 787 piReco+= uiStride; 788 } 789 } 790 791 // clear UV 792 UInt uiStrideC = pcRecoYuv->getCStride(); 793 Pel *pRecCb = pcRecoYuv->getCbAddr(); 794 Pel *pRecCr = pcRecoYuv->getCrAddr(); 795 796 for (Int y=0; y<uiHeight/2; y++) 797 { 798 for (Int x=0; x<uiWidth/2; x++) 799 { 800 pRecCb[x] = 1<<(g_bitDepthC-1); 801 pRecCr[x] = 1<<(g_bitDepthC-1); 802 } 803 804 pRecCb += uiStrideC; 805 pRecCr += uiStrideC; 806 } 807 } 808 #else 706 809 #if H_3D_SINGLE_DEPTH 707 810 Void TDecCu::xReconIntraSingleDepth( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) … … 772 875 } 773 876 #endif 877 #endif 878 774 879 #if H_3D_INTER_SDC 775 880 Void TDecCu::xReconInterSDC( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) -
branches/HTM-13.1-dev1-Samsung/source/Lib/TLibDecoder/TDecCu.h
r1084 r1145 123 123 Void setdQPFlag ( Bool b ) { m_bDecodeDQP = b; } 124 124 Void xFillPCMBuffer (TComDataCU* pCU, UInt depth); 125 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 126 Void xReconDIS ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 127 #else 125 128 #if H_3D_SINGLE_DEPTH 126 129 Void xReconIntraSingleDepth( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 130 #endif 127 131 #endif 128 132 #if H_3D_DIM_SDC -
branches/HTM-13.1-dev1-Samsung/source/Lib/TLibDecoder/TDecEntropy.cpp
r1133 r1145 52 52 m_pcEntropyDecoderIf->parseSkipFlag( pcCU, uiAbsPartIdx, uiDepth ); 53 53 } 54 55 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 56 Void TDecEntropy::decodeDIS( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 57 { 58 if( !pcCU->getSlice()->getDepthIntraSkipFlag() ) 59 { 60 return; 61 } 62 63 m_pcEntropyDecoderIf->parseDIS( pcCU, uiAbsPartIdx, uiDepth ); 64 } 65 #else 54 66 #if H_3D_SINGLE_DEPTH 55 67 Void TDecEntropy::decodeSingleDepthMode( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) … … 63 75 } 64 76 #endif 77 #endif 78 65 79 Void TDecEntropy::decodeCUTransquantBypassFlag(TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 66 80 { -
branches/HTM-13.1-dev1-Samsung/source/Lib/TLibDecoder/TDecEntropy.h
r1133 r1145 85 85 public: 86 86 virtual Void parseSkipFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0; 87 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 88 virtual Void parseDIS ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0; 89 #else 87 90 #if H_3D_SINGLE_DEPTH 88 91 virtual Void parseSingleDepthMode ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0; 92 #endif 89 93 #endif 90 94 virtual Void parseCUTransquantBypassFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0; … … 171 175 Void decodeSplitFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 172 176 Void decodeSkipFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 177 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 178 Void decodeDIS ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) ; 179 #else 173 180 #if H_3D_SINGLE_DEPTH 174 181 Void decodeSingleDepthMode ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) ; 182 #endif 175 183 #endif 176 184 Void decodeCUTransquantBypassFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); -
branches/HTM-13.1-dev1-Samsung/source/Lib/TLibDecoder/TDecSbac.cpp
r1133 r1145 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 SEC_DEPTH_INTRA_SKIP_MODE_K0033 55 , m_cCUDISFlagSCModel ( 1, 1, NUM_DIS_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 56 , m_cCUDISTypeSCModel ( 1, 1, NUM_DIS_TYPE_CTX , m_contextModels + m_numContextModels, m_numContextModels) 57 #else 54 58 #if H_3D_SINGLE_DEPTH 55 59 , m_cCUSingleDepthFlagSCModel ( 1, 1, NUM_SINGLEDEPTH_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 56 60 , m_cSingleDepthValueSCModel ( 1, 1, NUM_SINGLE_DEPTH_VALUE_DATA_CTX , m_contextModels + m_numContextModels, m_numContextModels) 61 #endif 57 62 #endif 58 63 , m_cCUMergeFlagExtSCModel ( 1, 1, NUM_MERGE_FLAG_EXT_CTX , m_contextModels + m_numContextModels, m_numContextModels) … … 136 141 m_cCUSplitFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_SPLIT_FLAG ); 137 142 m_cCUSkipFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_SKIP_FLAG ); 143 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 144 m_cCUDISFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_DIS_FLAG ); 145 m_cCUDISTypeSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_DIS_TYPE ); 146 #else 138 147 #if H_3D_SINGLE_DEPTH 139 148 m_cCUSingleDepthFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_SINGLEDEPTH_FLAG ); 140 149 m_cSingleDepthValueSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_SINGLE_DEPTH_VALUE_DATA ); 150 #endif 141 151 #endif 142 152 m_cCUMergeFlagExtSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_MERGE_FLAG_EXT ); … … 207 217 m_cCUSplitFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SPLIT_FLAG ); 208 218 m_cCUSkipFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SKIP_FLAG ); 219 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 220 m_cCUDISFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DIS_FLAG ); 221 m_cCUDISTypeSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DIS_TYPE ); 222 #else 209 223 #if H_3D_SINGLE_DEPTH 210 224 m_cCUSingleDepthFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SINGLEDEPTH_FLAG ); 211 225 m_cSingleDepthValueSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SINGLE_DEPTH_VALUE_DATA ); 226 #endif 212 227 #endif 213 228 m_cCUMergeFlagExtSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_MERGE_FLAG_EXT ); … … 570 585 #endif 571 586 } 587 588 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 589 Void TDecSbac::parseDIS( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 590 { 591 pcCU->setDISFlagSubParts( false, uiAbsPartIdx, uiDepth ); 592 UInt uiSymbol = 0; 593 m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUDISFlagSCModel.get( 0, 0, 0 ) ); 594 if( uiSymbol ) 595 { 596 pcCU->setDISFlagSubParts( true, uiAbsPartIdx, uiDepth ); 597 pcCU->setSkipFlagSubParts( false, uiAbsPartIdx, uiDepth ); 598 pcCU->setSDCFlagSubParts( false, uiAbsPartIdx, uiDepth ); 599 pcCU->setPredModeSubParts( MODE_INTRA, uiAbsPartIdx, uiDepth ); 600 pcCU->setPartSizeSubParts( SIZE_2Nx2N, uiAbsPartIdx, uiDepth ); 601 pcCU->setLumaIntraDirSubParts (DC_IDX, uiAbsPartIdx, uiDepth ); 602 pcCU->setSizeSubParts( g_uiMaxCUWidth>>uiDepth, g_uiMaxCUHeight>>uiDepth, uiAbsPartIdx, uiDepth ); 603 pcCU->setMergeFlagSubParts( false , uiAbsPartIdx, 0, uiDepth ); 604 pcCU->setTrIdxSubParts(0, uiAbsPartIdx, uiDepth); 605 pcCU->setCbfSubParts(0, 1, 1, uiAbsPartIdx, uiDepth); 606 607 UInt uiUnaryIdx = 0; 608 UInt uiNumCand = 4; 609 610 if ( uiNumCand > 1 ) 611 { 612 for( ; uiUnaryIdx < uiNumCand - 1; ++uiUnaryIdx ) 613 { 614 UInt uiSymbol2 = 0; 615 if ( uiUnaryIdx==0 ) 616 { 617 m_pcTDecBinIf->decodeBin( uiSymbol2, m_cCUDISTypeSCModel.get( 0, 0, 0 ) ); 618 } 619 else 620 { 621 m_pcTDecBinIf->decodeBinEP( uiSymbol2); 622 } 623 if( uiSymbol2 == 0 ) 624 { 625 break; 626 } 627 } 628 } 629 pcCU->setDISTypeSubParts(uiUnaryIdx, uiAbsPartIdx, 0, uiDepth); 630 } 631 } 632 #else 572 633 #if H_3D_SINGLE_DEPTH 573 634 Void TDecSbac::parseSingleDepthMode( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) … … 616 677 } 617 678 } 618 619 #endif 679 #endif 680 #endif 681 620 682 /** parse merge flag 621 683 * \param pcCU -
branches/HTM-13.1-dev1-Samsung/source/Lib/TLibDecoder/TDecSbac.h
r1133 r1145 125 125 126 126 Void parseSkipFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 127 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 128 Void parseDIS ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 129 #else 127 130 #if H_3D_SINGLE_DEPTH 128 131 Void parseSingleDepthMode ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 129 #endif 132 #endif 133 #endif 130 134 Void parseCUTransquantBypassFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 131 135 Void parseSplitFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); … … 178 182 ContextModel3DBuffer m_cCUSplitFlagSCModel; 179 183 ContextModel3DBuffer m_cCUSkipFlagSCModel; 184 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 185 ContextModel3DBuffer m_cCUDISFlagSCModel; 186 ContextModel3DBuffer m_cCUDISTypeSCModel; 187 #else 180 188 #if H_3D_SINGLE_DEPTH 181 189 ContextModel3DBuffer m_cCUSingleDepthFlagSCModel; 182 190 ContextModel3DBuffer m_cSingleDepthValueSCModel; 191 #endif 183 192 #endif 184 193 ContextModel3DBuffer m_cCUMergeFlagExtSCModel;
Note: See TracChangeset for help on using the changeset viewer.