Changeset 1031 in SHVCSoftware


Ignore:
Timestamp:
27 Feb 2015, 01:16:03 (10 years ago)
Author:
seregin
Message:

fix convertToMonochrome

Location:
branches/SHM-dev/source
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-dev/source/App/TAppEncoder/TAppEncTop.cpp

    r1030 r1031  
    14151415 
    14161416#if AUXILIARY_PICTURES
    1417   if (m_scalabilityMask[3])
     1417  if (m_scalabilityMask[AUX_ID])
    14181418  {
    14191419    UInt maxAuxId = 0;
    14201420    UInt auxDimIdLen = 1;
     1421    Int  auxId = vps->getNumScalabilityTypes() - 1;
    14211422    for(i = 1; i < vps->getMaxLayers(); i++)
    14221423    {
     
    14301431      auxDimIdLen++;
    14311432    }
    1432     vps->setDimensionIdLen(1, auxDimIdLen);
     1433    vps->setDimensionIdLen(auxId, auxDimIdLen);
    14331434    for(i = 1; i < vps->getMaxLayers(); i++)
    14341435    {
    1435       vps->setDimensionId(i, 1, m_acLayerCfg[i].getAuxId());
     1436      vps->setDimensionId(i, auxId, m_acLayerCfg[i].getAuxId());
    14361437    }
    14371438  }
     
    21392140#if R0062_AUX_PSEUDO_MONOCHROME
    21402141        if ( m_acLayerCfg[layer].getChromaFormatIDC() == CHROMA_400 ||
    2141              (m_apcTEncTop[0]->getVPS()->getScalabilityMask(3) && (m_acLayerCfg[layer].getAuxId() == 1 || m_acLayerCfg[layer].getAuxId() == 2)) )
     2142             (m_apcTEncTop[0]->getVPS()->getScalabilityMask(AUX_ID) && (m_acLayerCfg[layer].getAuxId() == AUX_ALPHA || m_acLayerCfg[layer].getAuxId() == AUX_DEPTH)) )
    21422143#else
    21432144        if (m_acLayerCfg[layer].getChromaFormatIDC() == CHROMA_400)
  • branches/SHM-dev/source/Lib/TLibCommon/TComPicYuv.cpp

    r1029 r1031  
    330330Void TComPicYuv::convertToMonochrome()
    331331{
    332   Int numPix = ((m_iPicWidth >> 1) + (m_iMarginX << 1)) * ((m_iPicHeight >> 1) + (m_iMarginY << 1));
    333332  Pel grayVal = (1 << (g_bitDepth[CHANNEL_TYPE_CHROMA] - 1));
    334333
    335   for (UInt i = 0; i < numPix; i++)
    336   {
    337     m_apiPicBuf[COMPONENT_Cb][i] = grayVal;
    338     m_apiPicBuf[COMPONENT_Cr][i] = grayVal;
     334  for( UInt comp = 1; comp < getNumberValidComponents(); comp++ )
     335  {
     336    const ComponentID ch=ComponentID(comp);
     337    for( UInt i = 0; i < getStride(ch) * getTotalHeight(ch); i++ )
     338    {
     339      m_apiPicBuf[ch][i] = grayVal;
     340    }
    339341  }
    340342}
  • branches/SHM-dev/source/Lib/TLibCommon/TypeDef.h

    r1029 r1031  
    305305};
    306306
     307enum AuxType
     308{
     309  AUX_ALPHA = 1,
     310  AUX_DEPTH = 2,
     311};
     312
    307313/// normative encoder constraints --------
    308314#define MFM_ENCCONSTRAINT                1      ///< JCTVC-O0216: Encoder constraint for motion field mapping
Note: See TracChangeset for help on using the changeset viewer.