Changeset 598 in 3DVCSoftware for branches/HTM-DEV-2.0-dev0/source/Lib/TLibDecoder
- Timestamp:
- 29 Aug 2013, 13:55:40 (12 years ago)
- Location:
- branches/HTM-DEV-2.0-dev0/source/Lib/TLibDecoder
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-DEV-2.0-dev0/source/Lib/TLibDecoder/TDecCAVLC.cpp
r541 r598 1073 1073 } 1074 1074 #endif 1075 #if LGE_INTER_SDC_E0156 1076 READ_FLAG( uiCode, "depth_inter_SDC_flag" ); pcVPS->setInterSDCFlag( i, uiCode ? true : false ); 1077 #endif 1075 1078 } 1076 1079 } … … 2033 2036 } 2034 2037 #endif 2038 #if LGE_INTER_SDC_E0156 2039 Void TDecCavlc::parseInterSDCFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 2040 { 2041 assert(0); 2042 } 2043 2044 Void TDecCavlc::parseInterSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPart ) 2045 { 2046 assert(0); 2047 } 2048 #endif 2035 2049 // ==================================================================================================================== 2036 2050 // Protected member functions -
branches/HTM-DEV-2.0-dev0/source/Lib/TLibDecoder/TDecCAVLC.h
r537 r598 102 102 Void parseICFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 103 103 #endif 104 #if LGE_INTER_SDC_E0156 105 Void parseInterSDCFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 106 Void parseInterSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPart ); 107 #endif 104 108 Void parseSplitFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 105 109 Void parsePartSize ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); -
branches/HTM-DEV-2.0-dev0/source/Lib/TLibDecoder/TDecCu.cpp
r597 r598 437 437 m_pcEntropyDecoder->decodeARPW ( pcCU , uiAbsPartIdx , uiDepth ); 438 438 #endif 439 #if LGE_INTER_SDC_E0156 440 m_pcEntropyDecoder->decodeInterSDCFlag( pcCU, uiAbsPartIdx, uiDepth ); 441 #endif 439 442 // Coefficient decoding 440 443 Bool bCodeDQP = getdQPFlag(); … … 501 504 { 502 505 case MODE_INTER: 506 #if LGE_INTER_SDC_E0156 507 if( m_ppcCU[uiDepth]->getInterSDCFlag( 0 ) ) 508 { 509 xReconInterSDC( m_ppcCU[uiDepth], uiAbsPartIdx, uiDepth ); 510 } 511 else 512 { 513 #endif 503 514 xReconInter( m_ppcCU[uiDepth], uiDepth ); 515 #if LGE_INTER_SDC_E0156 516 } 517 #endif 504 518 break; 505 519 case MODE_INTRA: … … 542 556 } 543 557 } 558 559 #if LGE_INTER_SDC_E0156 560 Void TDecCu::xReconInterSDC( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 561 { 562 // inter prediction 563 m_pcPrediction->motionCompensation( pcCU, m_ppcYuvReco[uiDepth] ); 564 565 UInt uiWidth = pcCU->getWidth ( 0 ); 566 UInt uiHeight = pcCU->getHeight( 0 ); 567 UChar* pMask = pcCU->getInterSDCMask(); 568 569 memset( pMask, 0, uiWidth*uiHeight ); 570 pcCU->xSetInterSDCCUMask( pcCU, pMask ); 571 572 Pel *pResi; 573 UInt uiPelX, uiPelY; 574 UInt uiResiStride = m_ppcYuvResi[uiDepth]->getStride(); 575 576 pResi = m_ppcYuvResi[uiDepth]->getLumaAddr( 0 ); 577 for( uiPelY = 0; uiPelY < uiHeight; uiPelY++ ) 578 { 579 for( uiPelX = 0; uiPelX < uiWidth; uiPelX++ ) 580 { 581 UChar uiSeg = pMask[ uiPelX + uiPelY*uiWidth ]; 582 583 pResi[ uiPelX ] = pcCU->getInterSDCSegmentDCOffset( uiSeg, 0 );; 584 } 585 pResi += uiResiStride; 586 } 587 588 m_ppcYuvReco[uiDepth]->addClip( m_ppcYuvReco[uiDepth], m_ppcYuvResi[uiDepth], 0, pcCU->getWidth( 0 ) ); 589 590 // clear UV 591 UInt uiStrideC = m_ppcYuvReco[uiDepth]->getCStride(); 592 Pel *pRecCb = m_ppcYuvReco[uiDepth]->getCbAddr(); 593 Pel *pRecCr = m_ppcYuvReco[uiDepth]->getCrAddr(); 594 595 for (Int y = 0; y < uiHeight/2; y++) 596 { 597 for (Int x = 0; x < uiWidth/2; x++) 598 { 599 pRecCb[x] = (Pel)( 1 << ( g_bitDepthC - 1 ) ); 600 pRecCr[x] = (Pel)( 1 << ( g_bitDepthC - 1 ) ); 601 } 602 603 pRecCb += uiStrideC; 604 pRecCr += uiStrideC; 605 } 606 } 607 #endif 544 608 545 609 Void -
branches/HTM-DEV-2.0-dev0/source/Lib/TLibDecoder/TDecCu.h
r531 r598 118 118 Void xReconIntraSDC ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 119 119 #endif 120 #if LGE_INTER_SDC_E0156 121 Void xReconInterSDC ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 122 #endif 120 123 }; 121 124 -
branches/HTM-DEV-2.0-dev0/source/Lib/TLibDecoder/TDecEntropy.cpp
r597 r598 675 675 #endif 676 676 677 #if LGE_INTER_SDC_E0156 678 if( pcCU->getInterSDCFlag( uiAbsPartIdx ) ) 679 { 680 assert( !pcCU->isSkipped( uiAbsPartIdx ) ); 681 assert( !pcCU->isIntra( uiAbsPartIdx) ); 682 assert( pcCU->getSlice()->getIsDepth() ); 683 684 decodeInterSDCResidualData( pcCU, uiAbsPartIdx, uiDepth ); 685 return; 686 } 687 #endif 688 677 689 if( pcCU->isIntra(uiAbsPartIdx) ) 678 690 { … … 696 708 } 697 709 710 #if LGE_INTER_SDC_E0156 711 Void TDecEntropy::decodeInterSDCFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 712 { 713 pcCU->setInterSDCFlagSubParts( false, uiAbsPartIdx, 0, uiDepth); 714 715 if( !pcCU->getSlice()->getVPS()->getInterSDCFlag( pcCU->getSlice()->getLayerIdInVps() ) ) 716 { 717 return; 718 } 719 720 if( !pcCU->getSlice()->getIsDepth() || pcCU->isIntra( uiAbsPartIdx ) || pcCU->isSkipped( uiAbsPartIdx ) ) 721 { 722 return; 723 } 724 725 m_pcEntropyDecoderIf->parseInterSDCFlag( pcCU, uiAbsPartIdx, uiDepth ); 726 } 727 728 Void TDecEntropy::decodeInterSDCResidualData( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 729 { 730 if( !pcCU->getSlice()->getVPS()->getInterSDCFlag( pcCU->getSlice()->getLayerIdInVps() ) ) 731 { 732 return; 733 } 734 735 if( !pcCU->getSlice()->getIsDepth() || pcCU->isIntra( uiAbsPartIdx ) || !pcCU->getInterSDCFlag( uiAbsPartIdx ) ) 736 { 737 return; 738 } 739 740 UInt uiNumSegments = ( pcCU->getPartitionSize( uiAbsPartIdx ) == SIZE_2Nx2N ) ? 1 : ( pcCU->getPartitionSize( uiAbsPartIdx ) == SIZE_NxN ? 4 : 2 ); 741 742 // decode residual data for each segment 743 for( UInt uiSeg = 0; uiSeg < uiNumSegments; uiSeg++ ) 744 { 745 m_pcEntropyDecoderIf->parseInterSDCResidualData( pcCU, uiAbsPartIdx, uiDepth, uiSeg ); 746 } 747 } 748 #endif 749 698 750 //! \} -
branches/HTM-DEV-2.0-dev0/source/Lib/TLibDecoder/TDecEntropy.h
r504 r598 91 91 virtual Void parseICFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0; 92 92 #endif 93 #if LGE_INTER_SDC_E0156 94 virtual Void parseInterSDCFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0; 95 virtual Void parseInterSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPart ) = 0; 96 #endif 93 97 virtual Void parsePartSize ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0; 94 98 virtual Void parsePredMode ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0; … … 166 170 Void decodeICFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 167 171 #endif 168 172 #if LGE_INTER_SDC_E0156 173 Void decodeInterSDCFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 174 Void decodeInterSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 175 #endif 169 176 Void decodeIPCMInfo ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 170 177 -
branches/HTM-DEV-2.0-dev0/source/Lib/TLibDecoder/TDecGop.cpp
r597 r598 226 226 rpcPic->destroyNonDBFilterInfo(); 227 227 } 228 228 #if MTK_SONY_PROGRESSIVE_MV_COMPRESSION_E0170 229 rpcPic->compressMotion(2); 230 #endif 229 231 #if !H_3D 230 232 rpcPic->compressMotion(); -
branches/HTM-DEV-2.0-dev0/source/Lib/TLibDecoder/TDecSbac.cpp
r541 r598 100 100 #endif 101 101 #endif 102 #if LGE_INTER_SDC_E0156 103 , m_cInterSDCFlagSCModel ( 1, 1, NUM_INTER_SDC_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 104 , m_cInterSDCResidualSCModel ( 1, 1, NUM_INTER_SDC_RESIDUAL_CTX , m_contextModels + m_numContextModels, m_numContextModels) 105 , m_cInterSDCResidualSignFlagSCModel ( 1, 1, NUM_INTER_SDC_SIGN_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 106 #endif 102 107 { 103 108 assert( m_numContextModels <= MAX_NUM_CTX_MOD ); … … 182 187 m_cSDCResidualSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_SDC_RESIDUAL ); 183 188 #endif 189 #endif 190 #if LGE_INTER_SDC_E0156 191 m_cInterSDCFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_INTER_SDC_FLAG ); 192 m_cInterSDCResidualSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_INTER_SDC_RESIDUAL ); 193 m_cInterSDCResidualSignFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_INTER_SDC_SIGN_FLAG ); 184 194 #endif 185 195 m_uiLastDQpNonZero = 0; … … 251 261 m_cSDCResidualSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SDC_RESIDUAL ); 252 262 #endif 263 #endif 264 #if LGE_INTER_SDC_E0156 265 m_cInterSDCFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_INTER_SDC_FLAG ); 266 m_cInterSDCResidualSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_INTER_SDC_RESIDUAL ); 267 m_cInterSDCResidualSignFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_INTER_SDC_SIGN_FLAG ); 253 268 #endif 254 269 m_pcTDecBinIf->start(); … … 2237 2252 #endif 2238 2253 2254 #if LGE_INTER_SDC_E0156 2255 Void TDecSbac::parseInterSDCFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 2256 { 2257 UInt uiSymbol = 0; 2258 UInt uiCtxInterSDCFlag = pcCU->getCtxInterSDCFlag( uiAbsPartIdx ); 2259 2260 m_pcTDecBinIf->decodeBin( uiSymbol, m_cInterSDCFlagSCModel.get( 0, 0, uiCtxInterSDCFlag ) ); 2261 2262 if( uiSymbol ) 2263 { 2264 pcCU->setInterSDCFlagSubParts( true, uiAbsPartIdx, 0, uiDepth ); 2265 pcCU->setTrIdxSubParts( 0, uiAbsPartIdx, uiDepth ); 2266 pcCU->setCbfSubParts( 1, 1, 1, uiAbsPartIdx, uiDepth ); 2267 } 2268 else 2269 { 2270 pcCU->setInterSDCFlagSubParts( false, uiAbsPartIdx, 0, uiDepth); 2271 } 2272 } 2273 2274 Void TDecSbac::parseInterSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiSegment ) 2275 { 2276 UInt uiAbsIdx = 0; 2277 UInt uiSign = 0; 2278 Int iIdx = 0; 2279 2280 xReadExGolombLevel( uiAbsIdx, m_cInterSDCResidualSCModel.get( 0, 0, 0 ) ); 2281 2282 uiAbsIdx++; 2283 m_pcTDecBinIf->decodeBin( uiSign, m_cInterSDCResidualSignFlagSCModel.get( 0, 0, 0 ) ); 2284 iIdx = (Int)( uiSign ? -1 : 1 ) * uiAbsIdx; 2285 2286 pcCU->setInterSDCSegmentDCOffset( iIdx, uiSegment, uiAbsPartIdx ); 2287 } 2288 #endif 2289 2239 2290 //! \} -
branches/HTM-DEV-2.0-dev0/source/Lib/TLibDecoder/TDecSbac.h
r531 r598 112 112 #endif 113 113 #endif 114 #if LGE_INTER_SDC_E0156 115 Void parseInterSDCFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 116 Void parseInterSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPart ); 117 #endif 114 118 private: 115 119 TComInputBitstream* m_pcBitstream; … … 221 225 #endif 222 226 #endif 227 #if LGE_INTER_SDC_E0156 228 ContextModel3DBuffer m_cInterSDCFlagSCModel; 229 ContextModel3DBuffer m_cInterSDCResidualSCModel; 230 ContextModel3DBuffer m_cInterSDCResidualSignFlagSCModel; 231 #endif 223 232 }; 224 233
Note: See TracChangeset for help on using the changeset viewer.