Ignore:
Timestamp:
29 Aug 2013, 13:55:40 (12 years ago)
Author:
tech
Message:

Merged dev2: DEV-2.0-LG@595

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  
    10731073            }
    10741074#endif
     1075#if LGE_INTER_SDC_E0156
     1076            READ_FLAG( uiCode, "depth_inter_SDC_flag" );              pcVPS->setInterSDCFlag( i, uiCode ? true : false );
     1077#endif
    10751078          }
    10761079        }
     
    20332036}
    20342037#endif
     2038#if LGE_INTER_SDC_E0156
     2039Void TDecCavlc::parseInterSDCFlag    ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
     2040{
     2041  assert(0);
     2042}
     2043
     2044Void TDecCavlc::parseInterSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPart )
     2045{
     2046  assert(0);
     2047}
     2048#endif
    20352049// ====================================================================================================================
    20362050// Protected member functions
  • branches/HTM-DEV-2.0-dev0/source/Lib/TLibDecoder/TDecCAVLC.h

    r537 r598  
    102102  Void  parseICFlag         ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    103103#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
    104108  Void parseSplitFlag       ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    105109  Void parsePartSize        ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
  • branches/HTM-DEV-2.0-dev0/source/Lib/TLibDecoder/TDecCu.cpp

    r597 r598  
    437437  m_pcEntropyDecoder->decodeARPW    ( pcCU , uiAbsPartIdx , uiDepth ); 
    438438#endif 
     439#if LGE_INTER_SDC_E0156
     440  m_pcEntropyDecoder->decodeInterSDCFlag( pcCU, uiAbsPartIdx, uiDepth );
     441#endif
    439442  // Coefficient decoding
    440443  Bool bCodeDQP = getdQPFlag();
     
    501504  {
    502505    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
    503514      xReconInter( m_ppcCU[uiDepth], uiDepth );
     515#if LGE_INTER_SDC_E0156
     516      }
     517#endif
    504518      break;
    505519    case MODE_INTRA:
     
    542556  }
    543557}
     558
     559#if LGE_INTER_SDC_E0156
     560Void 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
    544608
    545609Void
  • branches/HTM-DEV-2.0-dev0/source/Lib/TLibDecoder/TDecCu.h

    r531 r598  
    118118  Void xReconIntraSDC           ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    119119#endif
     120#if LGE_INTER_SDC_E0156
     121  Void xReconInterSDC           ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
     122#endif
    120123};
    121124
  • branches/HTM-DEV-2.0-dev0/source/Lib/TLibDecoder/TDecEntropy.cpp

    r597 r598  
    675675#endif
    676676 
     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
    677689  if( pcCU->isIntra(uiAbsPartIdx) )
    678690  {
     
    696708}
    697709
     710#if LGE_INTER_SDC_E0156
     711Void 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
     728Void 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
    698750//! \}
  • branches/HTM-DEV-2.0-dev0/source/Lib/TLibDecoder/TDecEntropy.h

    r504 r598  
    9191  virtual Void parseICFlag        ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0;
    9292#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
    9397  virtual Void parsePartSize      ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0;
    9498  virtual Void parsePredMode      ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0;
     
    166170  Void decodeICFlag            ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    167171#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
    169176  Void decodeIPCMInfo          ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    170177
  • branches/HTM-DEV-2.0-dev0/source/Lib/TLibDecoder/TDecGop.cpp

    r597 r598  
    226226    rpcPic->destroyNonDBFilterInfo();
    227227  }
    228 
     228#if MTK_SONY_PROGRESSIVE_MV_COMPRESSION_E0170
     229  rpcPic->compressMotion(2);
     230#endif
    229231#if !H_3D
    230232  rpcPic->compressMotion();
  • branches/HTM-DEV-2.0-dev0/source/Lib/TLibDecoder/TDecSbac.cpp

    r541 r598  
    100100#endif
    101101#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
    102107{
    103108  assert( m_numContextModels <= MAX_NUM_CTX_MOD );
     
    182187  m_cSDCResidualSCModel.initBuffer        ( sliceType, qp, (UChar*)INIT_SDC_RESIDUAL );
    183188#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 );
    184194#endif
    185195  m_uiLastDQpNonZero  = 0;
     
    251261  m_cSDCResidualSCModel.initBuffer        ( eSliceType, iQp, (UChar*)INIT_SDC_RESIDUAL );
    252262#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 );
    253268#endif
    254269  m_pcTDecBinIf->start();
     
    22372252#endif
    22382253
     2254#if LGE_INTER_SDC_E0156
     2255Void 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
     2274Void 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
    22392290//! \}
  • branches/HTM-DEV-2.0-dev0/source/Lib/TLibDecoder/TDecSbac.h

    r531 r598  
    112112#endif
    113113#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
    114118private:
    115119  TComInputBitstream* m_pcBitstream;
     
    221225#endif
    222226#endif
     227#if LGE_INTER_SDC_E0156
     228  ContextModel3DBuffer m_cInterSDCFlagSCModel;
     229  ContextModel3DBuffer m_cInterSDCResidualSCModel;
     230  ContextModel3DBuffer m_cInterSDCResidualSignFlagSCModel;
     231#endif
    223232};
    224233
Note: See TracChangeset for help on using the changeset viewer.