Ignore:
Timestamp:
20 Jan 2014, 05:01:03 (10 years ago)
Author:
qualcomm
Message:

integration of JCT3V-G0130 (unify signaling and delta DC coding in intra SDC and inter SDC) by Qualcomm

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-9.3-dev3-Qualcomm/source/Lib/TLibEncoder/TEncEntropy.cpp

    r773 r782  
    649649  UInt uiLumaOffset   = uiMinCoeffSize*uiAbsPartIdx;
    650650  UInt uiChromaOffset = uiLumaOffset>>2;
    651    
     651#if QC_SDC_UNIFY_G0130
    652652#if H_3D_DIM_SDC
    653   if( pcCU->getSDCFlag( uiAbsPartIdx ) )
     653  if( pcCU->getSDCFlag( uiAbsPartIdx ) && pcCU->isIntra( uiAbsPartIdx ) )
    654654  {
    655655    assert( pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2Nx2N );
     
    658658    assert( pcCU->getCbf(uiAbsPartIdx, TEXT_CHROMA_U) == 1 );
    659659    assert( pcCU->getCbf(uiAbsPartIdx, TEXT_CHROMA_V) == 1 );
    660     return;
    661660  }
    662661#endif
    663662
    664663#if H_3D_INTER_SDC
    665   if( pcCU->getInterSDCFlag( uiAbsPartIdx ) )
     664  if( pcCU->getSDCFlag( uiAbsPartIdx ) && !pcCU->isIntra( uiAbsPartIdx ) )
    666665  {
    667666    assert( !pcCU->isSkipped( uiAbsPartIdx ) );
    668667    assert( !pcCU->isIntra( uiAbsPartIdx) );
    669668    assert( pcCU->getSlice()->getIsDepth() );
     669  }
     670#endif
     671
     672  if( pcCU->getSDCFlag( uiAbsPartIdx ) || pcCU->isIntra( uiAbsPartIdx ) )
     673  {
     674    Int iPartNum = ( pcCU->isIntra( uiAbsPartIdx ) && pcCU->getPartitionSize( uiAbsPartIdx ) == SIZE_NxN ) ? 4 : 1;
     675    UInt uiPartOffset = ( pcCU->getPic()->getNumPartInCU() >> ( pcCU->getDepth( uiAbsPartIdx ) << 1 ) ) >> 2;
     676
     677    if( !pcCU->getSDCFlag( uiAbsPartIdx ) )
     678    {
     679      for( Int iPart = 0; iPart < iPartNum; iPart++ )
     680      {
     681        if( getDimType( pcCU->getLumaIntraDir( uiAbsPartIdx + uiPartOffset*iPart ) ) < DIM_NUM_TYPE )
     682        {
     683          m_pcEntropyCoderIf->codeDeltaDC( pcCU, uiAbsPartIdx + uiPartOffset*iPart );
     684        }
     685      }
     686    }
     687    else
     688    {
     689      m_pcEntropyCoderIf->codeDeltaDC( pcCU, uiAbsPartIdx );
     690      return;
     691    }
     692  }
     693#else
     694#if H_3D_DIM_SDC
     695  if( pcCU->getSDCFlag( uiAbsPartIdx ) )
     696  {
     697    assert( pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2Nx2N );
     698    assert( pcCU->getTransformIdx(uiAbsPartIdx) == 0 );
     699    assert( pcCU->getCbf(uiAbsPartIdx, TEXT_LUMA) == 1 );
     700    assert( pcCU->getCbf(uiAbsPartIdx, TEXT_CHROMA_U) == 1 );
     701    assert( pcCU->getCbf(uiAbsPartIdx, TEXT_CHROMA_V) == 1 );
     702    return;
     703  }
     704#endif
     705
     706#if H_3D_INTER_SDC
     707  if( pcCU->getInterSDCFlag( uiAbsPartIdx ) )
     708  {
     709    assert( !pcCU->isSkipped( uiAbsPartIdx ) );
     710    assert( !pcCU->isIntra( uiAbsPartIdx) );
     711    assert( pcCU->getSlice()->getIsDepth() );
    670712
    671713    encodeInterSDCResidualData( pcCU, uiAbsPartIdx, false );
    672714    return;
    673715  }
     716#endif
    674717#endif
    675718
     
    825868
    826869#if H_3D_INTER_SDC
     870#if QC_SDC_UNIFY_G0130
     871Void TEncEntropy::encodeDeltaDC  ( TComDataCU* pcCU, UInt absPartIdx )
     872{
     873  m_pcEntropyCoderIf->codeDeltaDC( pcCU, absPartIdx );
     874}
     875
     876Void TEncEntropy::encodeSDCFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD )
     877{
     878  if( ( !pcCU->isIntra( uiAbsPartIdx ) && !pcCU->getSlice()->getVPS()->getInterSDCFlag( pcCU->getSlice()->getLayerIdInVps() ) ) ||
     879    ( pcCU->isIntra( uiAbsPartIdx ) && !pcCU->getSlice()->getVPS()->getVpsDepthModesFlag( pcCU->getSlice()->getLayerIdInVps() ) ) )
     880  {
     881    return;
     882  }
     883
     884  if( !pcCU->getSlice()->getIsDepth() || ( pcCU->isIntra( uiAbsPartIdx ) && pcCU->getPartitionSize( uiAbsPartIdx ) != SIZE_2Nx2N ) || pcCU->isSkipped( uiAbsPartIdx ) )
     885  {
     886    return;
     887  }
     888
     889  assert( ( pcCU->isIntra( uiAbsPartIdx ) && pcCU->getPartitionSize( uiAbsPartIdx ) == SIZE_2Nx2N ) || ( !pcCU->isIntra( uiAbsPartIdx ) && !pcCU->isSkipped( uiAbsPartIdx ) ) );
     890
     891  if( bRD )
     892  {
     893    uiAbsPartIdx = 0;
     894  }
     895
     896  m_pcEntropyCoderIf->codeSDCFlag( pcCU, uiAbsPartIdx );
     897}
     898#else
    827899Void TEncEntropy::encodeInterSDCFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD )
    828900{
     
    872944}
    873945#endif
     946#endif
    874947
    875948//! \}
Note: See TracChangeset for help on using the changeset viewer.