Changeset 616 in SHVCSoftware
- Timestamp:
- 18 Feb 2014, 14:07:05 (11 years ago)
- 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 157 157 , m_cpbDelayOffset (0) 158 158 , m_dpbDelayOffset (0) 159 #if P0138_USE_ALT_CPB_PARAMS_FLAG 160 , m_useAltCpbParamsFlagPresent(false) 161 , m_useAltCpbParamsFlag (false) 162 #endif 159 163 { 160 164 ::memset(m_initialCpbRemovalDelay, 0, sizeof(m_initialCpbRemovalDelay)); … … 175 179 Bool m_concatenationFlag; 176 180 UInt m_auCpbRemovalDelayDelta; 181 #if P0138_USE_ALT_CPB_PARAMS_FLAG 182 Bool m_useAltCpbParamsFlagPresent; 183 Bool m_useAltCpbParamsFlag; 184 #endif 177 185 }; 178 186 class SEIPictureTiming : public SEI -
branches/SHM-5.1-dev/source/Lib/TLibCommon/TComBitStream.cpp
r595 r616 229 229 UChar saved_held_bits = m_held_bits; 230 230 UInt saved_fifo_idx = m_fifo_idx; 231 #if P0138_USE_ALT_CPB_PARAMS_FLAG 232 UInt saved_numBitsRead = m_numBitsRead; 233 #endif 231 234 232 235 UInt num_bits_to_read = min(uiNumberOfBits, getNumBitsLeft()); … … 237 240 m_held_bits = saved_held_bits; 238 241 m_num_held_bits = saved_num_held_bits; 242 #if P0138_USE_ALT_CPB_PARAMS_FLAG 243 m_numBitsRead = saved_numBitsRead; 244 #endif 239 245 } 240 246 -
branches/SHM-5.1-dev/source/Lib/TLibCommon/TypeDef.h
r614 r616 233 233 #define NO_CLRAS_OUTPUT_FLAG 1 234 234 #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 235 237 236 238 #if VIEW_ID_RELATED_SIGNALING -
branches/SHM-5.1-dev/source/Lib/TLibDecoder/SEIread.cpp
r595 r616 380 380 } 381 381 382 #if P0138_USE_ALT_CPB_PARAMS_FLAG 383 /** 384 * Check if SEI message contains payload extension 385 */ 386 Bool 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 382 414 /** 383 415 * parse bitstream bs and unpack a user_data_unregistered SEI message … … 536 568 } 537 569 } 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 538 582 xParseByteAlign(); 539 583 } -
branches/SHM-5.1-dev/source/Lib/TLibDecoder/SEIread.h
r595 r616 67 67 Void xReadSEImessage (SEIMessages& seis, const NalUnitType nalUnitType, TComSPS *sps); 68 68 #endif 69 #if P0138_USE_ALT_CPB_PARAMS_FLAG 70 Bool xPayloadExtensionPresent (); 71 #endif 69 72 Void xParseSEIuserDataUnregistered (SEIuserDataUnregistered &sei, UInt payloadSize); 70 73 Void xParseSEIActiveParameterSets (SEIActiveParameterSets &sei, UInt payloadSize); -
branches/SHM-5.1-dev/source/Lib/TLibEncoder/SEIwrite.cpp
r595 r616 367 367 } 368 368 } 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 369 375 xWriteByteAlign(); 370 376 }
Note: See TracChangeset for help on using the changeset viewer.