#include "global.h"
#include "memalloc.h"
#include "rtp.h"
#include "mbuffer.h"
#include "sei.h"
#include "vlc.h"
#include "header.h"
Go to the source code of this file.
Functions | |
static void | InitRandomAccess (SEIParameters *p_SEI) |
static void | CloseRandomAccess (SEIParameters *p_SEI) |
static void | InitToneMapping (SEIParameters *p_SEI, InputParameters *p_Inp) |
static void | CloseToneMapping (SEIParameters *p_SEI) |
static void | CloseBufferingPeriod (SEIParameters *p_SEI) |
static void | InitPicTiming (SEIParameters *p_SEI) |
static void | ClosePicTiming (SEIParameters *p_SEI) |
static void | InitDRPMRepetition (SEIParameters *p_SEI) |
static void | CloseDRPMRepetition (SEIParameters *p_SEI) |
static void | FinalizeDRPMRepetition (ImageParameters *p_Img) |
static void | InitSparePicture (SEIParameters *p_SEI) |
static void | CloseSparePicture (SEIParameters *p_SEI) |
static void | FinalizeSpareMBMap (ImageParameters *p_Img) |
static void | InitSubseqChar (ImageParameters *p_Img) |
static void | ClearSubseqCharPayload (SEIParameters *p_SEI) |
static void | CloseSubseqChar (SEIParameters *p_SEI) |
static void | InitSubseqLayerInfo (SEIParameters *p_SEI) |
static void | InitPanScanRectInfo (SEIParameters *p_SEI) |
static void | ClearPanScanRectInfoPayload (SEIParameters *p_SEI) |
static void | ClosePanScanRectInfo (SEIParameters *p_SEI) |
static void | InitUser_data_unregistered (SEIParameters *p_SEI) |
static void | InitUser_data_registered_itu_t_t35 (SEIParameters *p_SEI) |
static void | ClearUser_data_unregistered (SEIParameters *p_SEI) |
static void | CloseUser_data_unregistered (SEIParameters *p_SEI) |
static void | ClearUser_data_registered_itu_t_t35 (SEIParameters *p_SEI) |
static void | CloseUser_data_registered_itu_t_t35 (SEIParameters *p_SEI) |
static void | InitPostFilterHints (SEIParameters *p_SEI) |
static void | ClearPostFilterHints (SEIParameters *p_SEI) |
static void | ClosePostFilterHints (SEIParameters *p_SEI) |
void | init_sei (SEIParameters *p_SEI) |
void | InitSEIMessages (ImageParameters *p_Img, InputParameters *p_Inp) |
void | CloseSEIMessages (ImageParameters *p_Img, InputParameters *p_Inp) |
Boolean | HaveAggregationSEI (ImageParameters *p_Img) |
static void | write_sei_message (SEIParameters *p_SEI, int id, byte *payload, int payload_size, int payload_type) |
static void | finalize_sei_message (SEIParameters *p_SEI, int id) |
void | clear_sei_message (SEIParameters *p_SEI, int id) |
void | AppendTmpbits2Buf (Bitstream *dest, Bitstream *source) |
void | CalculateSparePicture () |
void | ComposeSparePictureMessage (SEIParameters *p_SEI, int delta_spare_frame_num, int ref_area_indicator, Bitstream *tmpBitstream) |
Boolean | CompressSpareMBMap (ImageParameters *p_Img, unsigned char **map_sp, Bitstream *bitstream) |
void | InitSubseqInfo (SEIParameters *p_SEI, int currLayer) |
void | UpdateSubseqInfo (ImageParameters *p_Img, InputParameters *p_Inp, int currLayer) |
static void | FinalizeSubseqInfo (SEIParameters *p_SEI, int currLayer) |
static void | ClearSubseqInfoPayload (SEIParameters *p_SEI, int currLayer) |
void | CloseSubseqInfo (SEIParameters *p_SEI, int currLayer) |
void | CloseSubseqLayerInfo () |
static void | FinalizeSubseqLayerInfo (SEIParameters *p_SEI) |
void | UpdateSubseqChar (ImageParameters *p_Img) |
static void | FinalizeSubseqChar (SEIParameters *p_SEI) |
void | InitSceneInformation (SEIParameters *p_SEI) |
void | CloseSceneInformation (SEIParameters *p_SEI) |
void | FinalizeSceneInformation (SEIParameters *p_SEI) |
void | UpdateSceneInformation (SEIParameters *p_SEI, Boolean HasSceneInformation, int sceneID, int sceneTransType, int secondSceneID) |
void | UpdatePanScanRectInfo (SEIParameters *p_SEI) |
void | FinalizePanScanRectInfo (SEIParameters *p_SEI) |
void | UpdateUser_data_unregistered (SEIParameters *p_SEI) |
static void | FinalizeUser_data_unregistered (SEIParameters *p_SEI) |
void | UpdateUser_data_registered_itu_t_t35 (SEIParameters *p_SEI) |
static void | FinalizeUser_data_registered_itu_t_t35 (SEIParameters *p_SEI) |
void | ClearRandomAccess (SEIParameters *p_SEI) |
void | UpdateRandomAccess (ImageParameters *p_Img) |
static void | FinalizeRandomAccess (SEIParameters *p_SEI) |
static int | ParseToneMappingConfigFile (SEIParameters *p_SEI, InputParameters *p_Inp, ToneMappingSEI *pSeiToneMapping) |
static void | FinalizeToneMapping (ImageParameters *p_Img) |
void | UpdateToneMapping (SEIParameters *p_SEI) |
static void | ClearToneMapping (SEIParameters *p_SEI) |
void | UpdatePostFilterHints (SEIParameters *p_SEI) |
static void | FinalizePostFilterHints (SEIParameters *p_SEI) |
int | Write_SEI_NALU (ImageParameters *p_Img, int len) |
void | InitBufferingPeriod (ImageParameters *p_Img) |
void | ClearBufferingPeriod (SEIParameters *p_SEI, seq_parameter_set_rbsp_t *active_sps) |
void | UpdateBufferingPeriod (ImageParameters *p_Img, InputParameters *p_Inp) |
static void | FinalizeBufferingPeriod (SEIParameters *p_SEI, seq_parameter_set_rbsp_t *active_sps) |
void | ClearPicTiming (SEIParameters *p_SEI) |
void | UpdatePicTiming (ImageParameters *p_Img, InputParameters *p_Inp) |
static void | FinalizePicTiming (ImageParameters *p_Img) |
void | ClearDRPMRepetition (SEIParameters *p_SEI) |
void | UpdateDRPMRepetition (SEIParameters *p_SEI) |
void | PrepareAggregationSEIMessage (ImageParameters *p_Img) |
void | free_drpm_buffer (DecRefPicMarking_t *pDRPM) |
Definition in file sei.c.
copy the bits from one bitstream buffer to another one
dest | pointer to the dest bitstream buffer | |
source | pointer to the source bitstream buffer |
Definition at line 301 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.
void clear_sei_message | ( | SEIParameters * | p_SEI, | |
int | id | |||
) |
empty the sei message buffer
p_SEI | the SEI message to be cleared | |
id | 0, if this is the normal packet 1, if this is a aggregation packet |
Definition at line 282 of file sei.c.
References MAXRTPPAYLOADLEN.
Referenced by PrepareAggregationSEIMessage().
static void ClearSubseqInfoPayload | ( | SEIParameters * | p_SEI, | |
int | currLayer | |||
) | [static] |
Clear the payload buffer.
Definition at line 958 of file sei.c.
References MAXRTPPAYLOADLEN.
Referenced by PrepareAggregationSEIMessage().
static void CloseSparePicture | ( | SEIParameters * | p_SEI | ) | [static] |
Close the global variables for spare picture information.
Definition at line 390 of file sei.c.
Referenced by InitSparePicture().
void CloseSubseqInfo | ( | SEIParameters * | p_SEI, | |
int | currLayer | |||
) |
void ComposeSparePictureMessage | ( | SEIParameters * | p_SEI, | |
int | delta_spare_frame_num, | |||
int | ref_area_indicator, | |||
Bitstream * | tmpBitstream | |||
) |
compose the spare picture information.
p_SEI | SEI message | |
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 |
Definition at line 596 of file sei.c.
References AppendTmpbits2Buf(), syntaxelement::type, ue_linfo(), syntaxelement::value1, and writeSyntaxElement2Buf_UVLC().
Boolean CompressSpareMBMap | ( | ImageParameters * | p_Img, | |
unsigned char ** | map_sp, | |||
Bitstream * | bitstream | |||
) |
test if the compressed spare mb map will occupy less mem and fill the payload buffer.
p_Img | Image parameters for current picture coding | |
map_sp | in which the spare picture information are stored. | |
bitstream | pointer to a buffer to save the payload |
Definition at line 628 of file sei.c.
References Bitstream::bits_to_go, Bitstream::byte_buf, Bitstream::byte_pos, img_par::height, Bitstream::streamBuffer, syntaxelement::type, ue_linfo(), syntaxelement::value1, img_par::width, and writeSyntaxElement2Buf_UVLC().
static void finalize_sei_message | ( | SEIParameters * | p_SEI, | |
int | id | |||
) | [static] |
write rbsp_trailing_bits to the sei message
p_SEI | SEI message | |
id | 0, if this is the normal packet 1, if this is a aggregation packet |
Definition at line 258 of file sei.c.
Referenced by PrepareAggregationSEIMessage().
static void FinalizeSpareMBMap | ( | ImageParameters * | p_Img | ) | [static] |
Finalize the spare picture SEI payload. The spare picture paylaod will be ready for encapsulation, and it should be called before current picture packetized.
Definition at line 788 of file sei.c.
References AppendTmpbits2Buf(), Bitstream::bits_to_go, Bitstream::byte_buf, Bitstream::byte_pos, MAXRTPPAYLOADLEN, no_mem_exit(), img_par::number, Bitstream::streamBuffer, syntaxelement::type, ue_linfo(), syntaxelement::value1, and writeSyntaxElement2Buf_UVLC().
Referenced by PrepareAggregationSEIMessage().
static void FinalizeSubseqInfo | ( | SEIParameters * | p_SEI, | |
int | currLayer | |||
) | [static] |
Finalize subseqence info.
Definition at line 918 of file sei.c.
References syntaxelement::bitpattern, Bitstream::bits_to_go, Bitstream::byte_buf, Bitstream::byte_pos, syntaxelement::len, Bitstream::streamBuffer, syntaxelement::type, ue_linfo(), syntaxelement::value1, writeSyntaxElement2Buf_Fixed(), and writeSyntaxElement2Buf_UVLC().
Referenced by PrepareAggregationSEIMessage().
static void FinalizeSubseqLayerInfo | ( | SEIParameters * | p_SEI | ) | [static] |
Write the data to buffer, which is byte aligned.
Definition at line 1027 of file sei.c.
Referenced by PrepareAggregationSEIMessage().
void free_drpm_buffer | ( | DecRefPicMarking_t * | pDRPM | ) |
static void InitSparePicture | ( | SEIParameters * | p_SEI | ) | [static] |
Init the global variables for spare picture information.
Definition at line 366 of file sei.c.
References CloseSparePicture(), MAXRTPPAYLOADLEN, and no_mem_exit().
void InitSubseqInfo | ( | SEIParameters * | p_SEI, | |
int | currLayer | |||
) |
init subseqence info
Definition at line 858 of file sei.c.
References MAXRTPPAYLOADLEN, and no_mem_exit().
static void InitSubseqLayerInfo | ( | SEIParameters * | p_SEI | ) | [static] |
void PrepareAggregationSEIMessage | ( | ImageParameters * | p_Img | ) |
Prepare the aggregation sei message.
Definition at line 2597 of file sei.c.
References clear_sei_message(), ClearSubseqInfoPayload(), finalize_sei_message(), FinalizeSpareMBMap(), FinalizeSubseqInfo(), FinalizeSubseqLayerInfo(), img_par::layer, img_par::number, and write_sei_message().
Referenced by write_non_vcl_nalu().
void UpdateSubseqInfo | ( | ImageParameters * | p_Img, | |
InputParameters * | p_Inp, | |||
int | currLayer | |||
) |
update subsequence info
Definition at line 885 of file sei.c.
References img_par::gop_number, inp_par_enc::no_frm_base, img_par::number, and inp_par_enc::NumberBFrames.
Referenced by write_non_vcl_nalu().
static void write_sei_message | ( | SEIParameters * | p_SEI, | |
int | id, | |||
byte * | payload, | |||
int | payload_size, | |||
int | payload_type | |||
) | [static] |
write one sei payload to the sei message
p_SEI | SEI message | |
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 |
Definition at line 216 of file sei.c.
References SEI_MAX_ELEMENTS.
Referenced by PrepareAggregationSEIMessage().