#include "contributors.h"
#include <sys/stat.h>
#include "global.h"
#include "image.h"
#include "memalloc.h"
#include "mc_prediction.h"
#include "mbuffer.h"
#include "leaky_bucket.h"
#include "fmo.h"
#include "output.h"
#include "cabac.h"
#include "parset.h"
#include "sei.h"
#include "erc_api.h"
#include "quant.h"
#include "block.h"
#include "nalu.h"

Go to the source code of this file.
Defines | |
| #define | JM "15 (FRExt)" |
| #define | VERSION "15.1" |
| #define | EXT_VERSION "(FRExt)" |
| #define | LOGFILE "log.dec" |
| #define | DATADECFILE "dataDec.txt" |
| #define | TRACEFILE "trace_dec.txt" |
| #define | OUTSTRING_SIZE 255 |
Functions | |
| void | JMDecHelpExit (void) |
| void | Configure (int ac, char *av[]) |
| static void | alloc_img (ImageParameters **img) |
| static void | free_img (ImageParameters *img) |
| int | main (int argc, char **argv) |
| void | init (ImageParameters *img) |
| void | init_frext (ImageParameters *img) |
| static void | conf_read_check (int val, int expected) |
| void | init_conf (struct inp_par *inp, char *config_filename) |
| void | report (struct inp_par *inp, ImageParameters *img, struct snr_par *snr) |
| DataPartition * | AllocPartition (int n) |
| void | FreePartition (DataPartition *dp, int n) |
| void | malloc_slice (struct inp_par *inp, ImageParameters *img) |
| void | free_slice (ImageParameters *img) |
| int | init_global_buffers (void) |
| void | free_global_buffers (void) |
Variables | |
| objectBuffer_t * | erc_object_list |
| ercVariables_t * | erc_errorVar |
| ColocatedParams * | Co_located |
| ColocatedParams * | Co_located_JV [MAX_PLANE] |
| StorablePicture * | dec_picture |
| struct inp_par * | params |
| struct snr_par * | snr |
| ImageParameters * | img |
| int | global_init_done = 0 |
Definition in file ldecod.c.
| static void alloc_img | ( | ImageParameters ** | img | ) | [static] |
Allocate the Image structure.
Definition at line 291 of file ldecod.c.
References get_mem3Dint(), get_mem3Dpel(), and no_mem_exit().
Referenced by main().

| DataPartition* AllocPartition | ( | int | n | ) |
Allocates a stand-alone partition structure. Structure should be freed by FreePartition(); data structures.
Definition at line 818 of file ldecod.c.
References datapartition::bitstream, error(), errortext, ET_SIZE, MAX_CODED_FRAME_SIZE, and Bitstream::streamBuffer.
Referenced by malloc_slice().

| static void conf_read_check | ( | int | val, | |
| int | expected | |||
| ) | [inline, static] |
exit with error message if reading from config file failed
Definition at line 513 of file ldecod.c.
References error().
Referenced by init_conf().

| void Configure | ( | int | ac, | |
| char * | av[] | |||
| ) |
set default bitstream name
set default output file name
set default reference file name
Input file
Output File
Reference File
Poc Scale
indicate UV writing for 4:0:0
Definition at line 128 of file ldecod.c.
References error(), errortext, ET_SIZE, init_conf(), JMDecHelpExit(), p_out, p_ref, PAR_OF_ANNEXB, and params.
Referenced by main().

| void free_global_buffers | ( | void | ) |
Free allocated memory of frame size related global buffers buffers are defined in global.h, allocated memory is allocated in int init_global_buffers().
Definition at line 1039 of file ldecod.c.
References free_mem2D(), free_mem2Dint(), free_mem2Dpel(), free_mem3Dint(), free_mem3Dpel(), free_mem4D(), free_mem4Dint(), img, and imgY_ref.
Referenced by init_global_buffers(), and main().

| static void free_img | ( | ImageParameters * | img | ) | [static] |
Free the Image structure.
Definition at line 314 of file ldecod.c.
References free_mem3Dint(), and free_mem3Dpel().
Referenced by main().

| void free_slice | ( | ImageParameters * | img | ) |
Memory frees of the Slice structure and of its dependent data structures.
Definition at line 930 of file ldecod.c.
References delete_contexts_MotionInfo(), delete_contexts_TextureInfo(), FreePartition(), Slice::mot_ctx, Slice::partArr, and Slice::tex_ctx.
Referenced by main().

| void FreePartition | ( | DataPartition * | dp, | |
| int | n | |||
| ) |
Frees a partition structure (array).
Definition at line 869 of file ldecod.c.
References datapartition::bitstream, and Bitstream::streamBuffer.
Referenced by free_slice().
| void init | ( | ImageParameters * | img | ) |
| void init_conf | ( | struct inp_par * | inp, | |
| char * | config_filename | |||
| ) |
Read parameters from configuration file.
Definition at line 533 of file ldecod.c.
References conf_read_check(), error(), errortext, ET_SIZE, img, PAR_OF_ANNEXB, and PAR_OF_RTP.
Referenced by Configure().

| void init_frext | ( | ImageParameters * | img | ) |
| int init_global_buffers | ( | void | ) |
Dynamic memory allocation of frame size related global buffers buffers are defined in global.h, allocated memory must be freed in void free_global_buffers().
Helper array to access macroblock positions. We add 1 to also consider last MB.
Definition at line 961 of file ldecod.c.
References free_global_buffers(), get_mem2D(), get_mem2Dint(), get_mem2Dpel(), get_mem3Dint(), get_mem3Dpel(), get_mem4D(), get_mem4Dint(), img, imgY_ref, MAX_REFERENCE_PICTURES, no_mem_exit(), and YUV400.

| void JMDecHelpExit | ( | void | ) |
| int main | ( | int | argc, | |
| char ** | argv | |||
| ) |
main function for TML decoder
Definition at line 331 of file ldecod.c.
References alloc_img(), Configure(), decode_one_frame(), EOS, ercClose(), flush_dpb(), FmoFinit(), free_colocated(), free_dpb(), free_global_buffers(), free_img(), free_slice(), img, init(), decoded_picture_buffer::init_done, init_old_slice(), init_out_buffer(), initBitsFile(), malloc_slice(), no_mem_exit(), p_out, p_ref, params, ref_flag, report(), snr, and uninit_out_buffer().

| void malloc_slice | ( | struct inp_par * | inp, | |
| ImageParameters * | img | |||
| ) |
Allocates the slice structure along with its dependent data structures.
you don't know whether we do CABAC hre, hence initialize CABAC anyway
assume data partitioning (worst case) for the following mallocs()
Definition at line 895 of file ldecod.c.
References AllocPartition(), create_contexts_MotionInfo(), create_contexts_TextureInfo(), error(), errortext, ET_SIZE, Slice::max_part_nr, Slice::mot_ctx, Slice::partArr, and Slice::tex_ctx.
Referenced by main().

| void report | ( | struct inp_par * | inp, | |
| ImageParameters * | img, | |||
| struct snr_par * | snr | |||
| ) |
Reports the gathered information to appropriate outputs.
Definition at line 653 of file ldecod.c.
References error(), errortext, ET_SIZE, p_log, and params.
Referenced by main().

| ColocatedParams* Co_located_JV[MAX_PLANE] |
| ImageParameters* img |
image parameters
Definition at line 89 of file ldecod.c.
Referenced by adaptive_memory_management(), alloc_ref_pic_list_reordering_buffer(), alloc_storable_picture(), CheckAvailabilityOfNeighbors(), clear_picture(), compute_colocated(), compute_colocated_JV(), conceal_non_ref_pics(), concealByTrial(), copyPredMB(), ercConcealInterFrame(), FirstPartOfSliceHeader(), flush_dpb(), FmoGenerateMbToSliceGroupMap(), FmoGenerateType1MapUnitMap(), FmoGenerateType2MapUnitMap(), FmoGenerateType3MapUnitMap(), FmoGenerateType4MapUnitMap(), FmoGenerateType5MapUnitMap(), FmoGetLastMBInSliceGroup(), FmoGetNextMBNr(), FmoGetSliceGroupId(), FmoInit(), free_dpb(), free_global_buffers(), free_storable_picture(), get_long_term_pic(), get_pic_from_dpb(), get_short_term_pic(), getAffNeighbour(), getNonAffNeighbour(), init_conf(), init_dpb(), init_global_buffers(), init_lists(), init_lists_for_non_reference_loss(), main(), mb_is_available(), output_one_frame_from_dpb(), pixMeanInterpolateBlock(), readRefPictureIdx_VLC(), ref_pic_list_reordering(), reorder_ref_pic_list(), RestOfSliceHeader(), store_picture_in_dpb(), unmark_long_term_field_for_reference_by_frame_idx(), write_lost_non_ref_pic(), write_lost_ref_after_idr(), and write_out_picture().
| struct inp_par* params |
input parameters from input configuration file
Definition at line 87 of file ldecod.c.
Referenced by calculate_frame_no(), Configure(), direct_output(), exit_picture(), find_snr(), init(), insert_picture_in_dpb(), main(), read_new_slice(), read_next_nalu(), report(), RestOfSliceHeader(), and write_out_picture().
| struct snr_par* snr |
statistics
Definition at line 88 of file ldecod.c.
Referenced by direct_output(), exit_picture(), insert_picture_in_dpb(), and main().