Changeset 616 in SHVCSoftware


Ignore:
Timestamp:
18 Feb 2014, 14:07:05 (11 years ago)
Author:
nokia
Message:

JCTVC-P0138: Implementation of use_alt_cpb_params_flag

Location:
branches/SHM-5.1-dev/source/Lib
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-5.1-dev/source/Lib/TLibCommon/SEI.h

    r595 r616  
    157157  , m_cpbDelayOffset      (0)
    158158  , m_dpbDelayOffset      (0)
     159#if P0138_USE_ALT_CPB_PARAMS_FLAG
     160  , m_useAltCpbParamsFlagPresent(false)
     161  , m_useAltCpbParamsFlag (false)
     162#endif
    159163  {
    160164    ::memset(m_initialCpbRemovalDelay, 0, sizeof(m_initialCpbRemovalDelay));
     
    175179  Bool m_concatenationFlag;
    176180  UInt m_auCpbRemovalDelayDelta;
     181#if P0138_USE_ALT_CPB_PARAMS_FLAG
     182  Bool m_useAltCpbParamsFlagPresent;
     183  Bool m_useAltCpbParamsFlag;
     184#endif
    177185};
    178186class SEIPictureTiming : public SEI
  • branches/SHM-5.1-dev/source/Lib/TLibCommon/TComBitStream.cpp

    r595 r616  
    229229  UChar saved_held_bits = m_held_bits;
    230230  UInt saved_fifo_idx = m_fifo_idx;
     231#if P0138_USE_ALT_CPB_PARAMS_FLAG
     232  UInt saved_numBitsRead = m_numBitsRead;
     233#endif
    231234
    232235  UInt num_bits_to_read = min(uiNumberOfBits, getNumBitsLeft());
     
    237240  m_held_bits = saved_held_bits;
    238241  m_num_held_bits = saved_num_held_bits;
     242#if P0138_USE_ALT_CPB_PARAMS_FLAG
     243  m_numBitsRead = saved_numBitsRead;
     244#endif
    239245}
    240246
  • branches/SHM-5.1-dev/source/Lib/TLibCommon/TypeDef.h

    r614 r616  
    233233#define NO_CLRAS_OUTPUT_FLAG             1
    234234#define O0149_CROSS_LAYER_BLA_FLAG       1      ///< JCTVC-O0149: signal cross_layer_bla_flag in slice header
     235
     236#define P0138_USE_ALT_CPB_PARAMS_FLAG    1      ///< JCTVC-P0138: use_alt_cpb_params_flag syntax in buffering period SEI message extension
    235237
    236238#if VIEW_ID_RELATED_SIGNALING
  • branches/SHM-5.1-dev/source/Lib/TLibDecoder/SEIread.cpp

    r595 r616  
    380380}
    381381
     382#if P0138_USE_ALT_CPB_PARAMS_FLAG
     383/**
     384 * Check if SEI message contains payload extension
     385 */
     386Bool SEIReader::xPayloadExtensionPresent()
     387{
     388  Int payloadBitsRemaining = getBitstream()->getNumBitsLeft();
     389  Bool payloadExtensionPresent = false;
     390
     391  if (payloadBitsRemaining > 8)
     392  {
     393    payloadExtensionPresent = true;
     394  }
     395  else
     396  {
     397    Int finalBits = getBitstream()->peekBits(payloadBitsRemaining);
     398    while (payloadBitsRemaining && (finalBits & 1) == 0)
     399    {
     400      payloadBitsRemaining--;
     401      finalBits >>= 1;
     402    }
     403    payloadBitsRemaining--;
     404    if (payloadBitsRemaining > 0)
     405    {
     406      payloadExtensionPresent = true;
     407    }
     408  }
     409
     410  return payloadExtensionPresent;
     411}
     412#endif
     413
    382414/**
    383415 * parse bitstream bs and unpack a user_data_unregistered SEI message
     
    536568    }
    537569  }
     570
     571#if P0138_USE_ALT_CPB_PARAMS_FLAG
     572  sei.m_useAltCpbParamsFlag = false;
     573  sei.m_useAltCpbParamsFlagPresent = false;
     574  if (xPayloadExtensionPresent())
     575  {
     576    READ_FLAG (code, "use_alt_cpb_params_flag");
     577    sei.m_useAltCpbParamsFlag = code;
     578    sei.m_useAltCpbParamsFlagPresent = true;
     579  }
     580#endif
     581
    538582  xParseByteAlign();
    539583}
  • branches/SHM-5.1-dev/source/Lib/TLibDecoder/SEIread.h

    r595 r616  
    6767  Void xReadSEImessage                (SEIMessages& seis, const NalUnitType nalUnitType, TComSPS *sps);
    6868#endif
     69#if P0138_USE_ALT_CPB_PARAMS_FLAG
     70  Bool xPayloadExtensionPresent       ();
     71#endif
    6972  Void xParseSEIuserDataUnregistered  (SEIuserDataUnregistered &sei, UInt payloadSize);
    7073  Void xParseSEIActiveParameterSets   (SEIActiveParameterSets  &sei, UInt payloadSize);
  • branches/SHM-5.1-dev/source/Lib/TLibEncoder/SEIwrite.cpp

    r595 r616  
    367367    }
    368368  }
     369#if P0138_USE_ALT_CPB_PARAMS_FLAG
     370  if (sei.m_useAltCpbParamsFlagPresent)
     371  {
     372    WRITE_FLAG( sei.m_useAltCpbParamsFlag, "use_alt_cpb_params_flag");
     373  }
     374#endif
    369375  xWriteByteAlign();
    370376}
Note: See TracChangeset for help on using the changeset viewer.