Changeset 1031 in SHVCSoftware for branches/SHM-dev/source/Lib


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

fix convertToMonochrome

Location:
branches/SHM-dev/source/Lib/TLibCommon
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • 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.