Changeset 40 in 3DVCSoftware for branches/0.3-ericsson/source/Lib/TLibEncoder/TEncCavlc.cpp
- Timestamp:
- 25 Mar 2012, 13:04:30 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/0.3-ericsson/source/Lib/TLibEncoder/TEncCavlc.cpp
r5 r40 39 39 40 40 #include "TEncCavlc.h" 41 #include "../TLibCommon/SEI.h" 41 42 #include "SEIwrite.h" 42 43 … … 228 229 void TEncCavlc::codeSEI(const SEI& sei) 229 230 { 231 #if BITSTREAM_EXTRACTION 232 codeNALUnitHeader( NAL_UNIT_SEI, NAL_REF_IDC_PRIORITY_LOWEST, 0, sei.getLayerId() ); 233 #else 230 234 codeNALUnitHeader(NAL_UNIT_SEI, NAL_REF_IDC_PRIORITY_LOWEST); 235 #endif 231 236 writeSEImessage(*m_pcBitIf, sei); 232 237 } … … 235 240 { 236 241 // uiFirstByte 242 #if BITSTREAM_EXTRACTION 243 codeNALUnitHeader( NAL_UNIT_PPS, NAL_REF_IDC_PRIORITY_HIGHEST, 0, pcPPS->getLayerId() ); 244 #else 237 245 codeNALUnitHeader( NAL_UNIT_PPS, NAL_REF_IDC_PRIORITY_HIGHEST ); 246 #endif 238 247 239 248 xWriteUvlc( pcPPS->getPPSId() ); … … 249 258 } 250 259 260 #if BITSTREAM_EXTRACTION 261 Void TEncCavlc::codeNALUnitHeader( NalUnitType eNalUnitType, NalRefIdc eNalRefIdc, UInt TemporalId, UInt uiLayerId ) 262 { 263 // uiFirstByte 264 xWriteCode( 0, 1); // forbidden_zero_flag 265 xWriteCode( eNalRefIdc==0 ? 0:1, 1); // nal_ref_flag 266 xWriteCode( eNalUnitType, 6); // nal_unit_type 267 268 xWriteCode( TemporalId, 3); // temporal_id 269 xWriteCode( uiLayerId+1, 5); // layer_id_plus1 270 } 271 #else 251 272 Void TEncCavlc::codeNALUnitHeader( NalUnitType eNalUnitType, NalRefIdc eNalRefIdc, UInt TemporalId, Bool bOutputFlag ) 252 273 { … … 263 284 } 264 285 } 286 #endif 265 287 266 288 Void TEncCavlc::codeSPS( TComSPS* pcSPS ) 267 289 { 268 290 // uiFirstByte 291 #if BITSTREAM_EXTRACTION 292 codeNALUnitHeader( NAL_UNIT_SPS, NAL_REF_IDC_PRIORITY_HIGHEST, 0, pcSPS->getLayerId() ); 293 #else 269 294 codeNALUnitHeader( NAL_UNIT_SPS, NAL_REF_IDC_PRIORITY_HIGHEST ); 295 #endif 270 296 271 297 // Structure … … 385 411 // here someone can add an appropriated NalRefIdc type 386 412 #if DCM_DECODING_REFRESH 413 #if BITSTREAM_EXTRACTION 414 codeNALUnitHeader (pcSlice->getNalUnitType(), NAL_REF_IDC_PRIORITY_HIGHEST, 1, pcSlice->getLayerId()); 415 #else 387 416 codeNALUnitHeader (pcSlice->getNalUnitType(), NAL_REF_IDC_PRIORITY_HIGHEST, 1, true); 417 #endif 418 #else 419 #if BITSTREAM_EXTRACTION 420 codeNALUnitHeader (NAL_UNIT_CODED_SLICE, NAL_REF_IDC_PRIORITY_HIGHEST, 0, pcSlice->getLayerId()); 388 421 #else 389 422 codeNALUnitHeader (NAL_UNIT_CODED_SLICE, NAL_REF_IDC_PRIORITY_HIGHEST); 423 #endif 390 424 #endif 391 425
Note: See TracChangeset for help on using the changeset viewer.