Changeset 782 in 3DVCSoftware for branches/HTM-9.3-dev3-Qualcomm/source/Lib/TLibDecoder
- Timestamp:
- 20 Jan 2014, 05:01:03 (11 years ago)
- Location:
- branches/HTM-9.3-dev3-Qualcomm/source/Lib/TLibDecoder
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-9.3-dev3-Qualcomm/source/Lib/TLibDecoder/TDecCAVLC.cpp
r773 r782 2774 2774 #endif 2775 2775 #if H_3D_INTER_SDC 2776 #if QC_SDC_UNIFY_G0130 2777 Void TDecCavlc::parseDeltaDC( TComDataCU* /*pcCU*/, UInt /*uiAbsPartIdx*/, UInt /*uiDepth*/ ) 2778 { 2779 assert(0); 2780 } 2781 2782 Void TDecCavlc::parseSDCFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 2783 { 2784 assert(0); 2785 } 2786 #else 2776 2787 Void TDecCavlc::parseInterSDCFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 2777 2788 { … … 2783 2794 assert(0); 2784 2795 } 2796 #endif 2785 2797 #endif 2786 2798 // ==================================================================================================================== -
branches/HTM-9.3-dev3-Qualcomm/source/Lib/TLibDecoder/TDecCAVLC.h
r773 r782 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 128 133 #endif 129 134 Void parseSplitFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); -
branches/HTM-9.3-dev3-Qualcomm/source/Lib/TLibDecoder/TDecCu.cpp
r781 r782 495 495 m_pcEntropyDecoder->decodePredMode( pcCU, uiAbsPartIdx, uiDepth ); 496 496 m_pcEntropyDecoder->decodePartSize( pcCU, uiAbsPartIdx, uiDepth ); 497 497 #if QC_SDC_UNIFY_G0130 498 m_pcEntropyDecoder->decodeSDCFlag( pcCU, uiAbsPartIdx, uiDepth ); 499 #endif 498 500 if (pcCU->isIntra( uiAbsPartIdx ) && pcCU->getPartitionSize( uiAbsPartIdx ) == SIZE_2Nx2N ) 499 501 { … … 515 517 // prediction mode ( Intra : direction mode, Inter : Mv, reference idx ) 516 518 m_pcEntropyDecoder->decodePredInfo( pcCU, uiAbsPartIdx, uiDepth, m_ppcCU[uiDepth]); 517 #if H_3D_INTER_SDC 519 #if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130 518 520 m_pcEntropyDecoder->decodeInterSDCFlag( pcCU, uiAbsPartIdx, uiDepth ); 519 521 #endif … … 586 588 case MODE_INTER: 587 589 #if H_3D_INTER_SDC 590 #if QC_SDC_UNIFY_G0130 591 if( m_ppcCU[uiDepth]->getSDCFlag( 0 ) ) 592 #else 588 593 if( m_ppcCU[uiDepth]->getInterSDCFlag( 0 ) ) 594 #endif 589 595 { 590 596 xReconInterSDC( m_ppcCU[uiDepth], uiAbsPartIdx, uiDepth ); … … 661 667 { 662 668 UChar uiSeg = pMask[ uiPelX + uiPelY*uiWidth ]; 663 664 pResi[ uiPelX ] = pcCU->getInterSDCSegmentDCOffset( uiSeg, 0 );; 669 #if QC_SDC_UNIFY_G0130 670 pResi[ uiPelX ] = pcCU->getSDCSegmentDCOffset( uiSeg, 0 ); 671 #else 672 pResi[ uiPelX ] = pcCU->getInterSDCSegmentDCOffset( uiSeg, 0 ); 673 #endif 665 674 } 666 675 pResi += uiResiStride; -
branches/HTM-9.3-dev3-Qualcomm/source/Lib/TLibDecoder/TDecEntropy.cpp
r773 r782 713 713 UInt uiLumaOffset = uiMinCoeffSize*uiAbsPartIdx; 714 714 UInt uiChromaOffset = uiLumaOffset>>2; 715 715 #if QC_SDC_UNIFY_G0130 716 716 #if H_3D_DIM_SDC 717 if( pcCU->getSDCFlag( uiAbsPartIdx ) )717 if( pcCU->getSDCFlag( uiAbsPartIdx ) && pcCU->isIntra( uiAbsPartIdx) ) 718 718 { 719 719 assert( pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2Nx2N ); … … 722 722 assert( pcCU->getCbf(uiAbsPartIdx, TEXT_CHROMA_U) == 1 ); 723 723 assert( pcCU->getCbf(uiAbsPartIdx, TEXT_CHROMA_V) == 1 ); 724 } 725 #endif 726 727 #if H_3D_INTER_SDC 728 if( pcCU->getSDCFlag( uiAbsPartIdx ) && !pcCU->isIntra( uiAbsPartIdx) ) 729 { 730 assert( !pcCU->isSkipped( uiAbsPartIdx ) ); 731 assert( !pcCU->isIntra( uiAbsPartIdx) ); 732 assert( pcCU->getSlice()->getIsDepth() ); 733 } 734 #endif 735 736 if( pcCU->getSDCFlag( uiAbsPartIdx ) || pcCU->isIntra( uiAbsPartIdx ) ) 737 { 738 Int iPartNum = ( pcCU->isIntra( uiAbsPartIdx ) && pcCU->getPartitionSize( uiAbsPartIdx ) == SIZE_NxN ) ? 4 : 1; 739 UInt uiPartOffset = ( pcCU->getPic()->getNumPartInCU() >> ( pcCU->getDepth( uiAbsPartIdx ) << 1 ) ) >> 2; 740 741 if( !pcCU->getSDCFlag( uiAbsPartIdx ) ) 742 { 743 for( Int iPart = 0; iPart < iPartNum; iPart++ ) 744 { 745 if( getDimType( pcCU->getLumaIntraDir( uiAbsPartIdx + uiPartOffset*iPart ) ) < DIM_NUM_TYPE ) 746 { 747 m_pcEntropyDecoderIf->parseDeltaDC( pcCU, uiAbsPartIdx + uiPartOffset*iPart, uiDepth + ( pcCU->getPartitionSize( uiAbsPartIdx ) == SIZE_NxN ) ); 748 } 749 } 750 } 751 else 752 { 753 m_pcEntropyDecoderIf->parseDeltaDC( pcCU, uiAbsPartIdx, uiDepth ); 754 return; 755 } 756 } 757 #else 758 #if H_3D_DIM_SDC 759 if( pcCU->getSDCFlag( uiAbsPartIdx ) ) 760 { 761 assert( pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2Nx2N ); 762 assert( pcCU->getTransformIdx(uiAbsPartIdx) == 0 ); 763 assert( pcCU->getCbf(uiAbsPartIdx, TEXT_LUMA) == 1 ); 764 assert( pcCU->getCbf(uiAbsPartIdx, TEXT_CHROMA_U) == 1 ); 765 assert( pcCU->getCbf(uiAbsPartIdx, TEXT_CHROMA_V) == 1 ); 724 766 return; 725 767 } … … 737 779 } 738 780 #endif 781 #endif 739 782 740 783 if( pcCU->isIntra(uiAbsPartIdx) ) … … 760 803 761 804 #if H_3D_INTER_SDC 805 #if QC_SDC_UNIFY_G0130 806 Void TDecEntropy::decodeSDCFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 807 { 808 pcCU->setSDCFlagSubParts( false, uiAbsPartIdx, uiDepth ); 809 810 if( ( !pcCU->isIntra( uiAbsPartIdx ) && !pcCU->getSlice()->getVPS()->getInterSDCFlag( pcCU->getSlice()->getLayerIdInVps() ) ) || 811 ( pcCU->isIntra( uiAbsPartIdx ) && !pcCU->getSlice()->getVPS()->getVpsDepthModesFlag( pcCU->getSlice()->getLayerIdInVps() ) ) ) 812 { 813 return; 814 } 815 816 if( !pcCU->getSlice()->getIsDepth() || ( pcCU->isIntra( uiAbsPartIdx ) && pcCU->getPartitionSize( uiAbsPartIdx ) != SIZE_2Nx2N ) || pcCU->isSkipped( uiAbsPartIdx ) ) 817 { 818 return; 819 } 820 821 assert( ( pcCU->isIntra( uiAbsPartIdx ) && pcCU->getPartitionSize( uiAbsPartIdx ) == SIZE_2Nx2N ) || ( !pcCU->isIntra( uiAbsPartIdx ) && !pcCU->isSkipped( uiAbsPartIdx ) ) ); 822 823 m_pcEntropyDecoderIf->parseSDCFlag( pcCU, uiAbsPartIdx, uiDepth ); 824 } 825 826 #else 762 827 Void TDecEntropy::decodeInterSDCFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 763 828 { … … 798 863 } 799 864 #endif 865 #endif 800 866 801 867 //! \} -
branches/HTM-9.3-dev3-Qualcomm/source/Lib/TLibDecoder/TDecEntropy.h
r773 r782 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 100 105 #endif 101 106 virtual Void parsePartSize ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0; … … 179 184 #endif 180 185 #if H_3D_INTER_SDC 186 #if QC_SDC_UNIFY_G0130 187 Void decodeSDCFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 188 #else 181 189 Void decodeInterSDCFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 182 190 Void decodeInterSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 183 191 #endif 192 #endif 184 193 Void decodeIPCMInfo ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 185 194 -
branches/HTM-9.3-dev3-Qualcomm/source/Lib/TLibDecoder/TDecSbac.cpp
r781 r782 89 89 #if QC_GENERIC_SDC_G0122 90 90 , m_cAngleFlagSCModel ( 1, 1, NUM_ANGLE_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 91 #if !QC_SDC_UNIFY_G0130 91 92 , m_cIntraSdcFlagSCModel ( 1, 1, NUM_INTRASDC_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 93 #endif 92 94 #endif 93 95 #if H_3D_DIM_DMM … … 99 101 #endif 100 102 #endif 101 #if H_3D_INTER_SDC 103 #if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130 102 104 , m_cInterSDCFlagSCModel ( 1, 1, NUM_INTER_SDC_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 103 105 , m_cInterSDCResidualSCModel ( 1, 1, NUM_INTER_SDC_RESIDUAL_CTX , m_contextModels + m_numContextModels, m_numContextModels) 104 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) 105 110 #endif 106 111 { … … 176 181 #if QC_GENERIC_SDC_G0122 177 182 m_cAngleFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_ANGLE_FLAG ); 183 #if !QC_SDC_UNIFY_G0130 178 184 m_cIntraSdcFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_INTRASDC_FLAG ); 185 #endif 179 186 #endif 180 187 #if H_3D_DIM_DMM … … 186 193 #endif 187 194 #endif 188 #if H_3D_INTER_SDC 195 #if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130 189 196 m_cInterSDCFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_INTER_SDC_FLAG ); 190 197 m_cInterSDCResidualSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_INTER_SDC_RESIDUAL ); 191 198 m_cInterSDCResidualSignFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_INTER_SDC_SIGN_FLAG ); 199 #endif 200 #if QC_SDC_UNIFY_G0130 201 m_cSDCFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_SDC_FLAG ); 192 202 #endif 193 203 m_uiLastDQpNonZero = 0; … … 249 259 #if QC_GENERIC_SDC_G0122 250 260 m_cAngleFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_ANGLE_FLAG ); 261 #if !QC_SDC_UNIFY_G0130 251 262 m_cIntraSdcFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_INTRASDC_FLAG ); 263 #endif 252 264 #endif 253 265 #if H_3D_DIM_DMM … … 259 271 #endif 260 272 #endif 261 #if H_3D_INTER_SDC 273 #if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130 262 274 m_cInterSDCFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_INTER_SDC_FLAG ); 263 275 m_cInterSDCResidualSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_INTER_SDC_RESIDUAL ); 264 276 m_cInterSDCResidualSignFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_INTER_SDC_SIGN_FLAG ); 277 #endif 278 #if QC_SDC_UNIFY_G0130 279 m_cSDCFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SDC_FLAG ); 265 280 #endif 266 281 m_pcTDecBinIf->start(); … … 1065 1080 default: break; 1066 1081 } 1067 1082 #if !QC_SDC_UNIFY_G0130 1068 1083 if( dimType < DIM_NUM_TYPE || pcCU->getSDCFlag( absPartIdx ) ) 1069 1084 { … … 1109 1124 } 1110 1125 } 1111 1126 #endif 1112 1127 pcCU->setLumaIntraDirSubParts( (UChar)dir, absPartIdx, depth ); 1113 1128 } … … 1128 1143 uiIsDimMode = uiSymbol ? 0 : 1; 1129 1144 pcCU->setLumaIntraDirSubParts( 0, absPartIdx, depth ); 1130 1145 #if !QC_SDC_UNIFY_G0130 1131 1146 if( pcCU->getPartitionSize( absPartIdx ) == SIZE_2Nx2N ) //SDC is allowed only in this case 1132 1147 { … … 1139 1154 1140 1155 pcCU->setSDCFlagSubParts( uiSymbol, absPartIdx, depth ); 1141 1156 #endif 1142 1157 //decode DMM index 1143 1158 if( uiIsDimMode ) … … 2164 2179 2165 2180 #if H_3D_INTER_SDC 2181 #if QC_SDC_UNIFY_G0130 2182 Void TDecSbac::parseDeltaDC( TComDataCU* pcCU, UInt absPartIdx, UInt depth ) 2183 { 2184 if( ! ( pcCU->getSDCFlag( absPartIdx ) || ( pcCU->isIntra( absPartIdx ) && getDimType( pcCU->getLumaIntraDir( absPartIdx ) ) < DIM_NUM_TYPE ) ) ) 2185 { 2186 assert( 0 ); 2187 } 2188 2189 UInt symbol = 0; 2190 UInt uiNumSegments = 0; 2191 2192 if( pcCU->isIntra( absPartIdx ) ) 2193 { 2194 UInt dir = pcCU->getLumaIntraDir( absPartIdx ); 2195 uiNumSegments = isDimMode( dir ) ? 2 : 1; 2196 2197 m_pcTDecBinIf->decodeBin( symbol, m_cDdcFlagSCModel.get( 0, 0, uiNumSegments-1 ) ); 2198 2199 if( pcCU->getSDCFlag( absPartIdx ) ) 2200 { 2201 assert( pcCU->getPartitionSize( absPartIdx ) == SIZE_2Nx2N ); 2202 pcCU->setTrIdxSubParts( 0, absPartIdx, depth ); 2203 pcCU->setCbfSubParts( 1, 1, 1, absPartIdx, depth ); 2204 } 2205 else 2206 { 2207 pcCU->setLumaIntraDirSubParts( dir + symbol, absPartIdx, depth ); 2208 } 2209 } 2210 else 2211 { 2212 PartSize cPartSize = pcCU->getPartitionSize( absPartIdx ); 2213 2214 uiNumSegments = ( cPartSize == SIZE_2Nx2N ) ? 1 : ( cPartSize == SIZE_NxN ? 4 : 2 ); 2215 symbol = 1; 2216 } 2217 2218 2219 for( UInt segment = 0; segment < uiNumSegments; segment++ ) 2220 { 2221 Pel valDeltaDC = 0; 2222 if( symbol ) 2223 { 2224 xParseDimDeltaDC( valDeltaDC, uiNumSegments ); 2225 } 2226 2227 if( pcCU->isIntra( absPartIdx ) ) 2228 { 2229 UInt dir = pcCU->getLumaIntraDir( absPartIdx ); 2230 2231 if( pcCU->getSDCFlag( absPartIdx ) ) 2232 { 2233 pcCU->setSDCSegmentDCOffset( valDeltaDC, segment, absPartIdx ); 2234 } 2235 else 2236 { 2237 pcCU->setDimDeltaDC( getDimType( dir ), segment, absPartIdx, valDeltaDC ); 2238 } 2239 } 2240 else 2241 { 2242 pcCU->setSDCSegmentDCOffset( valDeltaDC, segment, absPartIdx ); 2243 } 2244 } 2245 } 2246 2247 Void TDecSbac::parseSDCFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 2248 { 2249 UInt uiSymbol = 0; 2250 UInt uiCtxSDCFlag = pcCU->getCtxSDCFlag( uiAbsPartIdx ); 2251 2252 m_pcTDecBinIf->decodeBin( uiSymbol, m_cSDCFlagSCModel.get( 0, 0, uiCtxSDCFlag ) ); 2253 2254 if( uiSymbol ) 2255 { 2256 pcCU->setSDCFlagSubParts( true, uiAbsPartIdx, uiDepth ); 2257 pcCU->setTrIdxSubParts( 0, uiAbsPartIdx, uiDepth ); 2258 pcCU->setCbfSubParts( 1, 1, 1, uiAbsPartIdx, uiDepth ); 2259 } 2260 else 2261 { 2262 pcCU->setSDCFlagSubParts( false, uiAbsPartIdx, uiDepth ); 2263 } 2264 } 2265 #else 2166 2266 Void TDecSbac::parseInterSDCFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 2167 2267 { … … 2198 2298 } 2199 2299 #endif 2300 #endif 2200 2301 2201 2302 //! \} -
branches/HTM-9.3-dev3-Qualcomm/source/Lib/TLibDecoder/TDecSbac.h
r781 r782 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 116 121 #endif 117 122 private: … … 213 218 #if QC_GENERIC_SDC_G0122 214 219 ContextModel3DBuffer m_cAngleFlagSCModel; 220 #if !QC_SDC_UNIFY_G0130 215 221 ContextModel3DBuffer m_cIntraSdcFlagSCModel; 222 #endif 216 223 #endif 217 224 #if H_3D_DIM_DMM … … 223 230 #endif 224 231 #endif 225 #if H_3D_INTER_SDC 232 #if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130 226 233 ContextModel3DBuffer m_cInterSDCFlagSCModel; 227 234 ContextModel3DBuffer m_cInterSDCResidualSCModel; 228 235 ContextModel3DBuffer m_cInterSDCResidualSignFlagSCModel; 229 236 #endif 237 #if QC_SDC_UNIFY_G0130 238 ContextModel3DBuffer m_cSDCFlagSCModel; 239 #endif 230 240 }; 231 241
Note: See TracChangeset for help on using the changeset viewer.