sei.h File Reference

definitions for Supplemental Enhanced Information More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  sei_struct
 SEI structure. More...
struct  spare_picture_struct
 Spare Picture. More...
struct  subseq_information_struct
 Subseq Information. More...
struct  subseq_layer_information_struct
 Subseq Layer Information. More...
struct  subseq_char_information_struct
 Subseq Characteristics. More...
struct  scene_information_struct
struct  panscanrect_information_struct
 PanScanRect Information. More...
struct  user_data_unregistered_information_struct
 User_data_unregistered Information. More...
struct  user_data_registered_itu_t_t35_information_struct
 User_data_registered_itu_t_t35 Information. More...
struct  recovery_point_information_struct
 Recovery Point Information. More...
struct  tone_mapping_struct
struct  post_filter_information_struct
 Post Filter Hints Information. More...
struct  bufferingperiod_information_struct
struct  pictiming_information_struct
 Picture timing Information. More...
struct  drpm_repetition_information_struct
 Picture timing Information. More...

Defines

#define MAX_LAYER_NUMBER   2
#define MAX_DEPENDENT_SUBSEQ   5
#define MAX_FN   256
#define AGGREGATION_PACKET_TYPE   4
#define SEI_PACKET_TYPE   5
#define NORMAL_SEI   0
#define AGGREGATION_SEI   1
#define MAX_CODED_BIT_DEPTH   12
#define MAX_SEI_BIT_DEPTH   12
#define MAX_NUM_PIVOTS   (1<<MAX_CODED_BIT_DEPTH)
#define MAX_CPB_CNT_MINUS1   31
#define MAX_PIC_STRUCT_VALUE   16

Enumerations

enum  SEI_type {
  SEI_BUFFERING_PERIOD = 0, SEI_PIC_TIMING, SEI_PAN_SCAN_RECT, SEI_FILLER_PAYLOAD,
  SEI_USER_DATA_REGISTERED_ITU_T_T35, SEI_USER_DATA_UNREGISTERED, SEI_RECOVERY_POINT, SEI_DEC_REF_PIC_MARKING_REPETITION,
  SEI_SPARE_PIC, SEI_SCENE_INFO, SEI_SUB_SEQ_INFO, SEI_SUB_SEQ_LAYER_CHARACTERISTICS,
  SEI_SUB_SEQ_CHARACTERISTICS, SEI_FULL_FRAME_FREEZE, SEI_FULL_FRAME_FREEZE_RELEASE, SEI_FULL_FRAME_SNAPSHOT,
  SEI_PROGRESSIVE_REFINEMENT_SEGMENT_START, SEI_PROGRESSIVE_REFINEMENT_SEGMENT_END, SEI_MOTION_CONSTRAINED_SLICE_GROUP_SET, SEI_FILM_GRAIN_CHARACTERISTICS,
  SEI_DEBLOCKING_FILTER_DISPLAY_PREFERENCE, SEI_STEREO_VIDEO_INFO, SEI_POST_FILTER_HINTS, SEI_TONE_MAPPING,
  SEI_MAX_ELEMENTS
}

Functions

void InitSEIMessages (void)
void CloseSEIMessages (void)
Boolean HaveAggregationSEI (void)
void write_sei_message (int id, byte *payload, int payload_size, int payload_type)
void finalize_sei_message (int id)
void clear_sei_message (int id)
void AppendTmpbits2Buf (Bitstream *dest, Bitstream *source)
void PrepareAggregationSEIMessage (void)
void InitSparePicture ()
void CloseSparePicture ()
void CalculateSparePicture ()
void ComposeSparePictureMessage (int delta_spare_frame_num, int ref_area_indicator, Bitstream *tmpBitstream)
Boolean CompressSpareMBMap (unsigned char **map_sp, Bitstream *bitstream)
void FinalizeSpareMBMap ()
void InitSubseqInfo (int currLayer)
void UpdateSubseqInfo (int currLayer)
void FinalizeSubseqInfo (int currLayer)
void ClearSubseqInfoPayload (int currLayer)
void CloseSubseqInfo (int currLayer)
void InitSubseqLayerInfo ()
void CloseSubseqLayerInfo ()
void FinalizeSubseqLayerInfo ()
void InitSubseqChar ()
void ClearSubseqCharPayload ()
void UpdateSubseqChar ()
void FinalizeSubseqChar ()
void CloseSubseqChar ()
void InitSceneInformation ()
void CloseSceneInformation ()
void UpdateSceneInformation (Boolean HasSceneInformation, int sceneID, int sceneTransType, int secondSceneID)
void FinalizeSceneInformation ()
void InitPanScanRectInfo ()
void ClearPanScanRectInfoPayload ()
void UpdatePanScanRectInfo ()
void FinalizePanScanRectInfo ()
void ClosePanScanRectInfo ()
void InitUser_data_unregistered ()
void ClearUser_data_unregistered ()
void UpdateUser_data_unregistered ()
void FinalizeUser_data_unregistered ()
void CloseUser_data_unregistered ()
void InitUser_data_registered_itu_t_t35 ()
void ClearUser_data_registered_itu_t_t35 ()
void UpdateUser_data_registered_itu_t_t35 ()
void FinalizeUser_data_registered_itu_t_t35 ()
void CloseUser_data_registered_itu_t_t35 ()
void InitRandomAccess ()
void ClearRandomAccess ()
void UpdateRandomAccess ()
void FinalizeRandomAccess ()
void CloseRandomAccess ()
void InitToneMapping ()
void FinalizeToneMapping ()
void ClearToneMapping ()
void UpdateToneMapping ()
void CloseToneMapping ()
void InitPostFilterHints ()
void ClearPostFilterHints ()
void UpdatePostFilterHints ()
void FinalizePostFilterHints ()
void ClosePostFilterHints ()
int Write_SEI_NALU (int len)
void InitBufferingPeriod ()
void ClearBufferingPeriod ()
void CloseBufferingPeriod ()
void UpdateBufferingPeriod ()
void FinalizeBufferingPeriod ()
void InitPicTiming ()
void ClearPicTiming ()
void ClosePicTiming ()
void UpdatePicTiming ()
void FinalizePicTiming ()
void InitDRPMRepetition ()
void ClearDRPMRepetition ()
void CloseDRPMRepetition ()
void UpdateDRPMRepetition ()
void FinalizeDRPMRepetition ()
void free_drpm_buffer (DecRefPicMarking_t *pDRPM)

Variables

sei_struct sei_message [2]
Boolean seiHasSparePicture
spare_picture_struct seiSparePicturePayload
Boolean seiHasSubseqInfo
subseq_information_struct seiSubseqInfo [MAX_LAYER_NUMBER]
Boolean seiHasSubseqLayerInfo
subseq_layer_information_struct seiSubseqLayerInfo
Boolean seiHasSubseqChar
subseq_char_information_struct seiSubseqChar
Boolean seiHasSceneInformation
scene_information_struct seiSceneInformation
Boolean seiHasPanScanRectInfo
panscanrect_information_struct seiPanScanRectInfo
Boolean seiHasUser_data_unregistered_info
user_data_unregistered_information_struct seiUser_data_unregistered
Boolean seiHasUser_data_registered_itu_t_t35_info
user_data_registered_itu_t_t35_information_struct seiUser_data_registered_itu_t_t35
Boolean seiHasRecoveryPoint_info
recovery_point_information_struct seiRecoveryPoint
Boolean seiHasTone_mapping
tone_mapping_struct seiToneMapping
Boolean seiHasPostFilterHints_info
post_filter_information_struct seiPostFilterHints
Boolean seiHasBuffering_period
bufferingperiod_information_struct seiBufferingPeriod
Boolean seiHasPicTiming_info
pictiming_information_struct seiPicTiming
Boolean seiHasDRPMRepetition_info
drpm_repetition_information_struct seiDRPMRepetition


Detailed Description

definitions for Supplemental Enhanced Information

sei.h

Author:
(s)
************************************************************************

Definition in file sei.h.


Define Documentation

#define MAX_CPB_CNT_MINUS1   31

Buffering Period Information.

Definition at line 335 of file sei.h.


Enumeration Type Documentation

enum SEI_type

definition of SEI payload type

Enumerator:
SEI_MAX_ELEMENTS  number of maximum syntax elements

Definition at line 23 of file sei.h.


Function Documentation

void AppendTmpbits2Buf ( Bitstream *  dest,
Bitstream *  source 
)

copy the bits from one bitstream buffer to another one

Parameters:
dest pointer to the dest bitstream buffer
source pointer to the source bitstream buffer
Output
the content of the dest bitstream is changed.

Definition at line 258 of file sei.c.

References Bitstream::bits_to_go, Bitstream::byte_buf, Bitstream::byte_pos, and Bitstream::streamBuffer.

Referenced by ComposeSparePictureMessage(), and FinalizeSpareMBMap().

void CalculateSparePicture (  ) 

Calculate the spare picture info, save the result in map_sp then compose the spare picture information.

Output
the spare picture payload is available in *seiSparePicturePayload* the syntax elements in the loop (see FCD), excluding the two elements at the beginning.

Definition at line 376 of file sei.c.

void clear_sei_message ( int  id  ) 

empty the sei message buffer

Parameters:
id 0, if this is the normal packet
1, if this is a aggregation packet
Output
the content of the sei message is cleared and ready for storing new messages

Definition at line 239 of file sei.c.

References sei_struct::available, MAXRTPPAYLOADLEN, and sei_struct::payloadSize.

Referenced by PrepareAggregationSEIMessage().

void ClearSubseqInfoPayload ( int  currLayer  ) 

void CloseSparePicture (  ) 

Close the global variables for spare picture information.

Definition at line 353 of file sei.c.

References spare_picture_struct::data, spare_picture_struct::num_spare_pics, Bitstream::streamBuffer, and spare_picture_struct::target_frame_num.

Referenced by InitSparePicture().

void CloseSubseqInfo ( int  currLayer  ) 

Close the global variables for spare picture information.

Definition at line 932 of file sei.c.

References subseq_information_struct::payloadSize, and subseq_information_struct::stored_frame_cnt.

void ComposeSparePictureMessage ( int  delta_spare_frame_num,
int  ref_area_indicator,
Bitstream *  tmpBitstream 
)

compose the spare picture information.

Parameters:
delta_spare_frame_num see FCD
ref_area_indicator Indicate how to represent the spare mb map
tmpBitstream pointer to a buffer to save the payload
Output
bitstream: the composed spare picture payload are ready to put into the sei_message.

Definition at line 557 of file sei.c.

References AppendTmpbits2Buf(), spare_picture_struct::data, syntaxelement::mapping, syntaxelement::type, ue_linfo(), syntaxelement::value1, and writeSyntaxElement2Buf_UVLC().

Here is the call graph for this function:

Boolean CompressSpareMBMap ( unsigned char **  map_sp,
Bitstream *  bitstream 
)

test if the compressed spare mb map will occupy less mem and fill the payload buffer.

Parameters:
map_sp in which the spare picture information are stored.
bitstream pointer to a buffer to save the payload
Returns:
TRUE: If it is compressed version,
FALSE: If it is not compressed.

Definition at line 587 of file sei.c.

References Bitstream::bits_to_go, Bitstream::byte_buf, Bitstream::byte_pos, ImageParameters::height, syntaxelement::mapping, Bitstream::streamBuffer, syntaxelement::type, ue_linfo(), syntaxelement::value1, ImageParameters::width, and writeSyntaxElement2Buf_UVLC().

Here is the call graph for this function:

void finalize_sei_message ( int  id  ) 

write rbsp_trailing_bits to the sei message

Parameters:
id 0, if this is the normal packet
1, if this is a aggregation packet
Output
the content of the sei message is updated and ready for packetisation

Definition at line 217 of file sei.c.

References sei_struct::available, sei_struct::data, and sei_struct::payloadSize.

Referenced by PrepareAggregationSEIMessage().

void FinalizeSpareMBMap (  ) 

Finalize the spare picture SEI payload. The spare picture paylaod will be ready for encapsulation, and it should be called before current picture packetized.

Input
seiSparePicturePayload.data: points to the payload starting from delta_spare_frame_num. (See FCD)
Output
seiSparePicturePayload.data is updated, pointing to the whole spare picture information: spare_picture( PayloadSize ) (See FCD) Make sure it is byte aligned.

Definition at line 747 of file sei.c.

References AppendTmpbits2Buf(), Bitstream::bits_to_go, Bitstream::byte_buf, Bitstream::byte_pos, spare_picture_struct::data, syntaxelement::mapping, MAXRTPPAYLOADLEN, no_mem_exit(), spare_picture_struct::num_spare_pics, ImageParameters::number, spare_picture_struct::payloadSize, Bitstream::streamBuffer, spare_picture_struct::target_frame_num, syntaxelement::type, ue_linfo(), syntaxelement::value1, and writeSyntaxElement2Buf_UVLC().

Referenced by PrepareAggregationSEIMessage().

Here is the call graph for this function:

void FinalizeSubseqInfo ( int  currLayer  ) 

void FinalizeSubseqLayerInfo (  ) 

void free_drpm_buffer ( DecRefPicMarking_t *  pDRPM  ) 

Free dec_ref_pic_marking_bufffer structure.

Definition at line 2696 of file sei.c.

References DecRefPicMarking_s::Next.

void InitSparePicture (  ) 

Init the global variables for spare picture information.

Definition at line 330 of file sei.c.

References Bitstream::bits_to_go, Bitstream::byte_buf, Bitstream::byte_pos, CloseSparePicture(), spare_picture_struct::data, MAXRTPPAYLOADLEN, no_mem_exit(), spare_picture_struct::num_spare_pics, Bitstream::streamBuffer, and spare_picture_struct::target_frame_num.

Here is the call graph for this function:

void InitSubseqInfo ( int  currLayer  ) 

void InitSubseqLayerInfo (  ) 

Init the global variables for spare picture information.

Definition at line 960 of file sei.c.

References subseq_layer_information_struct::bit_rate, subseq_layer_information_struct::frame_rate, and subseq_layer_information_struct::layer_number.

void PrepareAggregationSEIMessage ( void   ) 

void UpdateSubseqInfo ( int  currLayer  ) 

void write_sei_message ( int  id,
byte *  payload,
int  payload_size,
int  payload_type 
)

write one sei payload to the sei message

Parameters:
id 0, if this is the normal packet
1, if this is a aggregation packet
payload a pointer that point to the sei payload. Note that the bitstream should have be byte aligned already.
payload_size the size of the sei payload
payload_type the type of the sei payload
Output
the content of the sei message (sei_message[id]) is updated.

Definition at line 177 of file sei.c.

References sei_struct::data, sei_struct::payloadSize, and SEI_MAX_ELEMENTS.

Referenced by PrepareAggregationSEIMessage().


Variable Documentation

sei_message[0]: this struct is to store the sei message packetized independently sei_message[1]: this struct is to store the sei message packetized together with slice data

Definition at line 54 of file sei.c.

Referenced by GenerateSEImessage_rbsp().


Documentation generated with DoxyGen