#include "parsetcommon.h"
#include "nalu.h"
#include "sei.h"
Go to the source code of this file.
Functions | |
void | GenerateParameterSets (ImageParameters *p_Img, InputParameters *p_Inp) |
void | FreeParameterSets (ImageParameters *p_Img) |
NALU_t * | GenerateSeq_parameter_set_NALU (ImageParameters *p_Img) |
NALU_t * | GeneratePic_parameter_set_NALU (ImageParameters *p_Img, InputParameters *p_Inp, int) |
NALU_t * | GenerateSEImessage_NALU (InputParameters *p_Inp) |
void | GenerateSequenceParameterSet (seq_parameter_set_rbsp_t *sps, ImageParameters *p_Img, InputParameters *p_Inp, int SPS_id) |
void | GeneratePictureParameterSet (pic_parameter_set_rbsp_t *pps, seq_parameter_set_rbsp_t *sps, ImageParameters *p_Img, InputParameters *p_Inp, int PPS_id, int WeightedPrediction, int WeightedBiprediction, int cb_qp_index_offset, int cr_qp_index_offset) |
int | Scaling_List (short *scalingListinput, short *scalingList, int sizeOfScalingList, short *UseDefaultScalingMatrix, Bitstream *bitstream) |
int | GenerateSeq_parameter_set_rbsp (ImageParameters *p_Img, seq_parameter_set_rbsp_t *sps, byte *buf) |
int | GeneratePic_parameter_set_rbsp (ImageParameters *p_Img, InputParameters *p_Inp, pic_parameter_set_rbsp_t *pps, byte *buf) |
int | GenerateSEImessage_rbsp (InputParameters *p_Inp, int id, byte *buf) |
void | FreeSPS (seq_parameter_set_rbsp_t *sps) |
void | FreePPS (pic_parameter_set_rbsp_t *pps) |
int | WriteHRDParameters (seq_parameter_set_rbsp_t *sps, Bitstream *bitstream) |
void | GenerateVUIParameters (seq_parameter_set_rbsp_t *sps, InputParameters *p_Inp) |
pic_parameter_set_rbsp_t * | AllocPPS (void) |
seq_parameter_set_rbsp_t * | AllocSPS (void) |
Definition in file parset.h.
pic_parameter_set_rbsp_t* AllocPPS | ( | ) |
Allocates memory for a picture paramater set.
Definition at line 29 of file parsetcommon.c.
Referenced by GenerateParameterSets().
seq_parameter_set_rbsp_t* AllocSPS | ( | ) |
Allocates memory for am sequence paramater set.
Definition at line 50 of file parsetcommon.c.
Referenced by GenerateParameterSets().
void FreeParameterSets | ( | ImageParameters * | p_Img | ) |
frees global parameter sets active_sps and active_pps
Definition at line 116 of file parset.c.
References FreePPS(), and FreeSPS().
Referenced by free_encoder_memory().
void FreePPS | ( | pic_parameter_set_rbsp_t * | pps | ) |
Frees a picture parameter set.
pps | to be freed Picture parameter set to be freed |
Definition at line 70 of file parsetcommon.c.
Referenced by FreeParameterSets().
void FreeSPS | ( | seq_parameter_set_rbsp_t * | sps | ) |
Frees a sps.
sps | Sequence parameter set to be freed |
Definition at line 89 of file parsetcommon.c.
Referenced by FreeParameterSets().
void GenerateParameterSets | ( | ImageParameters * | p_Img, | |
InputParameters * | p_Inp | |||
) |
generates a sequence and picture parameter set and stores these in global active_sps and active_pps
Definition at line 57 of file parset.c.
References AllocPPS(), AllocSPS(), GeneratePictureParameterSet(), GenerateSequenceParameterSet(), inp_par_enc::WeightedBiprediction, and inp_par_enc::WeightedPrediction.
Referenced by init_encoder().
NALU_t* GeneratePic_parameter_set_NALU | ( | ImageParameters * | p_Img, | |
InputParameters * | p_Inp, | |||
int | PPS_id | |||
) |
NALU_t *GeneratePic_parameter_set_NALU (ImageParameters *p_Img, InputParameters *p_Inp, int PPS_id);.
Definition at line 176 of file parset.c.
References AllocNALU(), GeneratePic_parameter_set_rbsp(), RBSPtoNALU(), and nalu_t::startcodeprefix_len.
Referenced by write_PPS().
int GeneratePic_parameter_set_rbsp | ( | ImageParameters * | p_Img, | |
InputParameters * | p_Inp, | |||
pic_parameter_set_rbsp_t * | pps, | |||
byte * | rbsp | |||
) |
int GeneratePic_parameter_set_rbsp (ImageParameters *p_Img, InputParameters *p_Inp, pic_parameter_set_rbsp_t *pps, char *rbsp);
p_Img | picture parameter structure | |
p_Inp | InputParameters | |
pps | picture parameter structure | |
rbsp | buffer to be filled with the rbsp, size should be at least MAXIMUMPARSETRBSPSIZE |
Definition at line 722 of file parset.c.
References Bitstream::bits_to_go, Bitstream::byte_pos, IdentifyProfile(), no_mem_exit(), Scaling_List(), se_v(), SODBtoRBSP(), Bitstream::streamBuffer, u_1(), u_v(), and ue_v().
Referenced by GeneratePic_parameter_set_NALU().
void GeneratePictureParameterSet | ( | pic_parameter_set_rbsp_t * | pps, | |
seq_parameter_set_rbsp_t * | sps, | |||
ImageParameters * | p_Img, | |||
InputParameters * | p_Inp, | |||
int | PPS_id, | |||
int | WeightedPrediction, | |||
int | WeightedBiprediction, | |||
int | cb_qp_index_offset, | |||
int | cr_qp_index_offset | |||
) |
GeneratePictureParameterSet: Generates a Picture Parameter Set structure.
Following set the parameter for different slice group types
pps | Picture Parameter Set to be filled | |
sps | used Sequence Parameter Set | |
p_Img | the image pointer | |
p_Inp | Input configuration parameters | |
PPS_id | PPS ID | |
WeightedPrediction | value of weighted_pred_flag | |
WeightedBiprediction | value of weighted_bipred_idc | |
cb_qp_index_offset | value of cb_qp_index_offset | |
cr_qp_index_offset | value of cr_qp_index_offset |
Definition at line 376 of file parset.c.
References FREXT_CAVLC444, FREXT_Hi10P, FREXT_Hi422, FREXT_Hi444, FREXT_HP, IdentifyProfile(), no_mem_exit(), inp_par_enc::num_slice_groups_minus1, inp_par_enc::output, inp_par_enc::run_length_minus1, inp_par_enc::slice_group_id, inp_par_enc::symbol_mode, inp_par_enc::top_left, inp_par_enc::UseConstrainedIntraPred, and YUV444.
Referenced by GenerateParameterSets().
NALU_t* GenerateSEImessage_NALU | ( | InputParameters * | p_Inp | ) |
Function body for SEI message NALU generation.
Definition at line 989 of file parset.c.
References AllocNALU(), GenerateSEImessage_rbsp(), RBSPtoNALU(), and nalu_t::startcodeprefix_len.
Referenced by rewrite_paramsets(), and start_sequence().
int GenerateSEImessage_rbsp | ( | InputParameters * | p_Inp, | |
int | id, | |||
byte * | rbsp | |||
) |
int GenerateSEImessage_rbsp (int, bufferingperiod_information_struct*, char*)
Definition at line 1016 of file parset.c.
References Bitstream::bits_to_go, Bitstream::byte_pos, no_mem_exit(), SODBtoRBSP(), Bitstream::streamBuffer, and u_v().
Referenced by GenerateSEImessage_NALU().
NALU_t* GenerateSeq_parameter_set_NALU | ( | ImageParameters * | p_Img | ) |
int GenerateSeq_parameter_set_NALU (ImageParameters *p_Img);
p_Img | ImageParameters structure |
Definition at line 146 of file parset.c.
References AllocNALU(), GenerateSeq_parameter_set_rbsp(), RBSPtoNALU(), and nalu_t::startcodeprefix_len.
Referenced by rewrite_paramsets(), and start_sequence().
int GenerateSeq_parameter_set_rbsp | ( | ImageParameters * | p_Img, | |
seq_parameter_set_rbsp_t * | sps, | |||
byte * | rbsp | |||
) |
int GenerateSeq_parameter_set_rbsp (ImageParameters *p_Img, seq_parameter_set_rbsp_t *sps, char *rbsp);
p_Img | Image parameters structure | |
sps | sequence parameter structure | |
rbsp | buffer to be filled with the rbsp, size should be at least MAXIMUMPARSETRBSPSIZE |
Definition at line 592 of file parset.c.
References Bitstream::bits_to_go, Bitstream::byte_pos, GenerateVUI_parameters_rbsp(), no_mem_exit(), Scaling_List(), se_v(), SODBtoRBSP(), Bitstream::streamBuffer, u_1(), u_v(), ue_v(), and YUV444.
Referenced by GenerateSeq_parameter_set_NALU().
void GenerateSequenceParameterSet | ( | seq_parameter_set_rbsp_t * | sps, | |
ImageParameters * | p_Img, | |||
InputParameters * | p_Inp, | |||
int | SPS_id | |||
) |
GenerateSequenceParameterSet: extracts info from global variables and generates sequence parameter set structure.
sps | Sequence Parameter Set to be filled | |
p_Img | ImageParameters for encoding | |
p_Inp | InputParameters | |
SPS_id | SPS ID |
POC stuff: The following values are hard-coded in init_poc(). Apparently, the poc implementation covers only a subset of the poc functionality. Here, the same subset is implemented. Changes in the POC stuff have also to be reflected here
sps | Sequence Parameter Set to be filled | |
p_Img | ImageParameters for encoding | |
p_Inp | Input configuration parameters | |
SPS_id | SPS ID |
Definition at line 213 of file parset.c.
References inp_par_enc::directInferenceFlag, error(), FREXT_CAVLC444, FREXT_Hi10P, FREXT_Hi422, FREXT_Hi444, FREXT_HP, GenerateVUIParameters(), IdentifyLevel(), IdentifyProfile(), inp_par_enc::IntraProfile, inp_par_enc::MbInterlace, inp_par_enc::num_ref_frames, inp_par_enc::output, inp_par_enc::pic_order_cnt_type, inp_par_enc::PicInterlace, and YUV444.
Referenced by GenerateParameterSets().
void GenerateVUIParameters | ( | seq_parameter_set_rbsp_t * | sps, | |
InputParameters * | p_Inp | |||
) |
void GenerateVUIParameters(seq_parameter_set_rbsp_t *sps, InputParameters *p_Inp)
Definition at line 1129 of file parset.c.
References inp_par_enc::output, and YUV444.
Referenced by GenerateSequenceParameterSet().
int Scaling_List | ( | short * | scalingListinput, | |
short * | scalingList, | |||
int | sizeOfScalingList, | |||
short * | UseDefaultScalingMatrix, | |||
Bitstream * | bitstream | |||
) |
syntax for scaling list matrix values
scalingListinput | input scaling list | |
scalingList | scaling list to be used | |
sizeOfScalingList | size of the scaling list | |
UseDefaultScalingMatrix | usage of default Scaling Matrix | |
bitstream | target bitstream for writing syntax |
Definition at line 539 of file parset.c.
References se_v().
Referenced by GeneratePic_parameter_set_rbsp(), and GenerateSeq_parameter_set_rbsp().
int WriteHRDParameters | ( | seq_parameter_set_rbsp_t * | sps, | |
Bitstream * | bitstream | |||
) |
int WriteHRDParameters((seq_parameter_set_rbsp_t *sps, Bitstream *bitstream)
Definition at line 1090 of file parset.c.
References u_1(), u_v(), and ue_v().
Referenced by GenerateVUI_parameters_rbsp().