filehandle.c File Reference

Start and terminate sequences. More...

#include "contributors.h"
#include "global.h"
#include "enc_statistics.h"
#include "rtp.h"
#include "annexb.h"
#include "parset.h"
#include "mbuffer.h"

Include dependency graph for filehandle.c:

Go to the source code of this file.

Functions

void error (char *text, int code)
int write_PPS (ImageParameters *p_Img, InputParameters *p_Inp, int len, int PPS_id)
int start_sequence (ImageParameters *p_Img, InputParameters *p_Inp)
int rewrite_paramsets (ImageParameters *p_Img, InputParameters *p_Inp)
int terminate_sequence (ImageParameters *p_Img, InputParameters *p_Inp)


Detailed Description

Start and terminate sequences.

filehandle.c

Author:
Main contributors (see contributors.h for copyright, address and affiliation details)

Definition in file filehandle.c.


Function Documentation

void error ( char *  text,
int  code 
)

Error handling procedure. Print error message to stderr and exit with supplied code.

Parameters:
text Error message
code Exit code

Definition at line 37 of file filehandle.c.

References flush_dpb().

Referenced by adaptive_memory_management(), arienco_delete_encoding_environment(), bslice_16x16_termination_control(), buf2img_basic(), buf2img_bitshift(), buf2img_endian(), check_num_ref(), Configure(), dec_ref_pic_marking(), encode_one_frame(), encode_one_slice(), encode_one_slice_MBAFF(), end_macroblock(), FmoGenerateMapUnitToSliceGroupMap(), free_mem1Dpel(), free_mem2D(), free_mem2Ddist(), free_mem2Ddouble(), free_mem2Dint(), free_mem2Dint64(), free_mem2Dlm(), free_mem2Dmp(), free_mem2Dmv(), free_mem2Dodouble(), free_mem2Doint(), free_mem2Dolm(), free_mem2Dpel(), free_mem2Dquant(), free_mem2Dshort(), free_mem2Duint16(), free_mem3D(), free_mem3Ddouble(), free_mem3Dint(), free_mem3Dint64(), free_mem3Dmp(), free_mem3Dmv(), free_mem3Dodouble(), free_mem3Doint(), free_mem3Dpel(), free_mem3Dquant(), free_mem3Dshort(), free_mem3Duint16(), free_mem4D(), free_mem4Dint(), free_mem4Dmv(), free_mem4Dpel(), free_mem4Dquant(), free_mem4Dshort(), free_mem4Duint16(), free_mem5Dint(), free_mem5Dmv(), free_mem5Dpel(), free_mem5Dquant(), free_mem5Dshort(), free_mem6Dshort(), free_mem7Dshort(), free_offset_mem2Dshort(), GenerateSequenceParameterSet(), get_picture_type(), get_smallest_poc(), getDpbSize(), getMaxBR(), getMaxCPB(), getMaxFs(), getMaxMBPS(), getMinCR(), img2buf(), init_dpb(), Init_redundant_frame(), init_slice(), interpret_gop_structure(), LevelCheck(), mm_assign_long_term_frame_idx(), no_mem_exit(), OpenFiles(), output_one_frame_from_dpb(), output_SP_coefficients(), ParseContent(), ParseMatrix(), ParseQOffsetMatrix(), PatchInp(), predict_nnz(), ProfileCheck(), read_slice_group_info(), ReadCharField(), ReadFrameConcatenated(), ReadFrameData(), ReadFrameSeparate(), ReadIntField(), ReadTextField(), ReadTIFFIFDEntry(), remove_frame_from_dpb(), reorder_ref_pic_list(), report_frame_statistic(), report_log_mode(), report_stats(), RestoreMVBlock8x8(), start_sequence(), store_picture_in_dpb(), StoreMVBlock8x8(), terminate_sequence(), TestEncoderParams(), updateMADModel(), updateRCModel(), write_out_picture(), writeCoeff4x4_CAVLC_444(), and writeCoeff4x4_CAVLC_normal().

Here is the call graph for this function:

int rewrite_paramsets ( ImageParameters p_Img,
InputParameters p_Inp 
)

This function opens the output files and generates the appropriate sequence header.

As a sequence header, here we write both sequence and picture parameter sets. As soon as IDR is implemented, this should go to the IDR part, as both parsets have to be transmitted as part of an IDR. An alternative may be to consider this function the IDR start function.

Lets write now the Picture Parameter sets. Output will be equal to the total number of bits spend here.

Definition at line 130 of file filehandle.c.

References FreeNALU(), GenerateSEImessage_NALU(), GenerateSeq_parameter_set_NALU(), inp_par_enc::SendAUD, Write_AUD_NALU(), and write_PPS().

Referenced by write_non_vcl_nalu().

Here is the call graph for this function:

int start_sequence ( ImageParameters p_Img,
InputParameters p_Inp 
)

This function opens the output files and generates the appropriate sequence header.

As a sequence header, here we write both sequence and picture parameter sets. As soon as IDR is implemented, this should go to the IDR part, as both parsets have to be transmitted as part of an IDR. An alternative may be to consider this function the IDR start function.

Lets write now the Picture Parameter sets. Output will be equal to the total number of bits spend here.

Definition at line 69 of file filehandle.c.

References error(), errortext, ET_SIZE, FreeNALU(), GenerateSEImessage_NALU(), GenerateSeq_parameter_set_NALU(), inp_par_enc::of_mode, OpenAnnexbFile(), OpenRTPFile(), inp_par_enc::outfile, PAR_OF_ANNEXB, PAR_OF_RTP, inp_par_enc::SendAUD, Write_AUD_NALU(), write_PPS(), WriteAnnexbNALU(), and WriteRTPNALU().

Referenced by init_encoder().

Here is the call graph for this function:

int terminate_sequence ( ImageParameters p_Img,
InputParameters p_Inp 
)

This function terminates the sequence and closes the output files.

Definition at line 176 of file filehandle.c.

References CloseAnnexbFile(), CloseRTPFile(), error(), errortext, ET_SIZE, inp_par_enc::of_mode, PAR_OF_ANNEXB, and PAR_OF_RTP.

Referenced by free_encoder_memory().

Here is the call graph for this function:

int write_PPS ( ImageParameters p_Img,
InputParameters p_Inp,
int  len,
int  PPS_id 
)

This function generates and writes the PPS.

Definition at line 51 of file filehandle.c.

References FreeNALU(), and GeneratePic_parameter_set_NALU().

Referenced by rewrite_paramsets(), start_sequence(), and write_non_vcl_nalu().

Here is the call graph for this function:


Documentation generated with DoxyGen