Ignore:
Timestamp:
27 Feb 2015, 21:05:56 (10 years ago)
Author:
seregin
Message:

implementation of alpha channel SEI (JCTVC-P0123) with macro P0123_ALPHA_CHANNEL_SEI, patch was provided by Matteo Naccari <Matteo.Naccari@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncGOP.cpp

    r1035 r1037  
    684684#else
    685685    m_seiWriter.writeSEImessage(nalu.m_Bitstream, *sei, sps);
     686#endif
     687    writeRBSPTrailingBits(nalu.m_Bitstream);
     688    accessUnit.push_back(new NALUnitEBSP(nalu));
     689    delete sei;
     690  }
     691#endif
     692
     693#if P0123_ALPHA_CHANNEL_SEI
     694  if( m_pcCfg->getAlphaSEIEnabled() && m_pcEncTop->getVPS()->getScalabilityId(m_layerId, AUX_ID) && m_pcEncTop->getVPS()->getDimensionId(m_layerId, m_pcEncTop->getVPS()->getNumScalabilityTypes() - 1) == AUX_ALPHA )
     695  {
     696    SEIAlphaChannelInfo *sei = xCreateSEIAlphaChannelInfo();
     697    m_pcEntropyCoder->setBitstream(&nalu.m_Bitstream);
     698#if O0164_MULTI_LAYER_HRD
     699    m_seiWriter.writeSEImessage(nalu.m_Bitstream, *sei, m_pcEncTop->getVPS(), sps);
     700#else
     701    m_seiWriter.writeSEImessage(nalu.m_Bitstream, *sei, sps);
    686702#endif
    687703    writeRBSPTrailingBits(nalu.m_Bitstream);
     
    43644380}
    43654381
     4382#if P0123_ALPHA_CHANNEL_SEI
     4383SEIAlphaChannelInfo* TEncGOP::xCreateSEIAlphaChannelInfo()
     4384{
     4385  SEIAlphaChannelInfo *sei = new SEIAlphaChannelInfo();
     4386  sei->m_alphaChannelCancelFlag = m_pcCfg->getAlphaCancelFlag();
     4387  if(!sei->m_alphaChannelCancelFlag)
     4388  {
     4389    sei->m_alphaChannelUseIdc = m_pcCfg->getAlphaUseIdc();
     4390    sei->m_alphaChannelBitDepthMinus8 = m_pcCfg->getAlphaBitDepthMinus8();
     4391    sei->m_alphaTransparentValue = m_pcCfg->getAlphaTransparentValue();
     4392    sei->m_alphaOpaqueValue = m_pcCfg->getAlphaOpaqueValue();
     4393    sei->m_alphaChannelIncrFlag = m_pcCfg->getAlphaIncrementFlag();
     4394    sei->m_alphaChannelClipFlag = m_pcCfg->getAlphaClipFlag();
     4395    sei->m_alphaChannelClipTypeFlag = m_pcCfg->getAlphaClipTypeFlag();
     4396  }
     4397  return sei;
     4398}
     4399#endif
    43664400#if Q0096_OVERLAY_SEI
    43674401SEIOverlayInfo* TEncGOP::xCreateSEIOverlayInfo()
Note: See TracChangeset for help on using the changeset viewer.