mbuffer.h File Reference

Frame buffer functions. More...

#include "global.h"
#include "enc_statistics.h"

Include dependency graph for mbuffer.h:

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

Go to the source code of this file.

Data Structures

struct  picture_stats
struct  pic_motion_params
 definition of pic motion parameters More...
struct  storable_picture
 definition a picture (field or frame) More...
struct  motion_params
 definition of motion parameters More...
struct  colocated_params
 definition a picture (field or frame) More...
struct  frame_store
 Frame Stores for Decoded Picture Buffer. More...
struct  decoded_picture_buffer
 Decoded Picture Buffer. More...

Defines

#define MAX_LIST_SIZE   33

Typedefs

typedef struct picture_stats PictureStats
typedef struct pic_motion_params PicMotionParams
typedef struct storable_picture StorablePicture
typedef struct motion_params MotionParams
typedef struct colocated_params ColocatedParams
typedef struct frame_store FrameStore
typedef struct
decoded_picture_buffer 
DecodedPictureBuffer

Functions

void init_dpb (void)
void free_dpb (void)
FrameStore * alloc_frame_store (void)
void free_frame_store (FrameStore *f)
StorablePicture * alloc_storable_picture (PictureStructure type, int size_x, int size_y, int size_x_cr, int size_y_cr)
void free_storable_picture (StorablePicture *p)
void store_picture_in_dpb (StorablePicture *p)
void replace_top_pic_with_frame (StorablePicture *p)
void flush_dpb (void)
void dpb_split_field (FrameStore *fs)
void dpb_combine_field (FrameStore *fs)
void dpb_combine_field_yuv (FrameStore *fs)
void init_lists (int currSliceType, PictureStructure currPicStructure)
void reorder_ref_pic_list (StorablePicture **list, int *list_size, int num_ref_idx_lX_active_minus1, int *reordering_of_pic_nums_idc, int *abs_diff_pic_num_minus1, int *long_term_pic_idx)
void init_mbaff_lists (void)
void alloc_ref_pic_list_reordering_buffer (Slice *currSlice)
void free_ref_pic_list_reordering_buffer (Slice *currSlice)
void fill_frame_num_gap (ImageParameters *img)
ColocatedParams * alloc_colocated (int size_x, int size_y, int mb_adaptive_frame_field_flag)
void free_colocated (ColocatedParams *p)
void compute_colocated (ColocatedParams *p, StorablePicture **listX[6])
void compute_colocated_JV (ColocatedParams *p, StorablePicture **listX[6])
void copy_storable_param_JV (int nplane, StorablePicture *d, StorablePicture *s)

Variables

DecodedPictureBuffer dpb
StorablePicture ** listX [6]
int listXsize [6]


Detailed Description

Frame buffer functions.

mbuffer.h

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

Definition in file mbuffer.h.


Typedef Documentation

definition a picture (field or frame)

Decoded Picture Buffer.

typedef struct frame_store FrameStore

Frame Stores for Decoded Picture Buffer.

typedef struct motion_params MotionParams

definition of motion parameters

definition of pic motion parameters

definition a picture (field or frame)


Function Documentation

ColocatedParams* alloc_colocated ( int  size_x,
int  size_y,
int  mb_adaptive_frame_field_flag 
)

Allocate co-located memory.

Parameters:
size_x horizontal luma size
size_y vertical luma size
mb_adaptive_frame_field_flag flag that indicates macroblock adaptive frame/field coding
Returns:
the allocated StorablePicture structure

Definition at line 3548 of file mbuffer.c.

References alloc_motion_params(), colocated_params::bottom, colocated_params::frame, colocated_params::mb_adaptive_frame_field_flag, no_mem_exit(), colocated_params::size_x, colocated_params::size_y, and colocated_params::top.

Referenced by GenerateSequenceParameterSet().

Here is the call graph for this function:

FrameStore* alloc_frame_store ( void   ) 

Allocate memory for decoded picture buffer frame stores an initialize with sane values.

Returns:
the allocated FrameStore structure

Definition at line 305 of file mbuffer.c.

References frame_store::bottom_field, f, frame_store::frame, frame_store::is_long_term, frame_store::is_orig_reference, frame_store::is_output, frame_store::is_reference, frame_store::is_used, no_mem_exit(), and frame_store::top_field.

Referenced by idr_memory_management(), init_dpb(), and init_out_buffer().

Here is the call graph for this function:

void alloc_ref_pic_list_reordering_buffer ( Slice *  currSlice  ) 

StorablePicture* alloc_storable_picture ( PictureStructure  structure,
int  size_x,
int  size_y,
int  size_x_cr,
int  size_y_cr 
)

Allocate memory for a stored picture.

Parameters:
structure picture structure
size_x horizontal luma size
size_y vertical luma size
size_x_cr horizontal chroma size
size_y_cr vertical chroma size
Returns:
the allocated StorablePicture structure

Definition at line 370 of file mbuffer.c.

References storable_picture::bottom_field, storable_picture::coded_frame, storable_picture::dec_imgUV, storable_picture::dec_imgY, storable_picture::frame, storable_picture::frame_num, get_mem2Dpel(), get_mem3D(), get_mem3Dpel(), get_mem4Dpel(), IMG_PAD_SIZE, storable_picture::imgUV, storable_picture::imgUV_sub, storable_picture::imgY, storable_picture::imgY_sub, storable_picture::is_long_term, storable_picture::is_output, storable_picture::JVmotion, storable_picture::long_term_frame_idx, storable_picture::long_term_pic_num, ImageParameters::mb_cr_size_x, ImageParameters::mb_cr_size_y, storable_picture::mb_error_map, storable_picture::MbaffFrameFlag, storable_picture::motion, no_mem_exit(), storable_picture::non_existing, InputParameters::NoOfDecoders, storable_picture::p_curr_img, storable_picture::p_curr_img_sub, storable_picture::p_dec_img, storable_picture::p_img, storable_picture::p_img_sub, storable_picture::pic_num, InputParameters::rdopt, storable_picture::size_x, storable_picture::size_x_cr, storable_picture::size_x_cr_pad, storable_picture::size_x_pad, storable_picture::size_x_padded, storable_picture::size_y, storable_picture::size_y_cr, storable_picture::size_y_cr_pad, storable_picture::size_y_pad, storable_picture::size_y_padded, storable_picture::stats, storable_picture::structure, storable_picture::top_field, storable_picture::used_for_reference, YUV400, and ImageParameters::yuv_format.

Referenced by dpb_combine_field_yuv(), dpb_split_field(), field_picture(), fill_frame_num_gap(), prepare_enc_frame_picture(), and write_unpaired_field().

Here is the call graph for this function:

void compute_colocated ( ColocatedParams *  p,
StorablePicture **  listX[6] 
)

void compute_colocated_JV ( ColocatedParams *  p,
StorablePicture **  listX[6] 
)

void copy_storable_param_JV ( int  nplane,
StorablePicture *  d,
StorablePicture *  s 
)

void dpb_combine_field ( FrameStore *  fs  ) 

Generate a frame from top and bottom fields.

Use inference flag to remap mvs/references

Generate Frame parameters from field information.

association with id already known for fields.

need to make association with frames

need to make association with frames

Definition at line 3322 of file mbuffer.c.

References frame_store::bottom_field, dpb_combine_field_yuv(), pic_motion_params::field_frame, frame_store::frame, storable_picture::frm_ref_pic_num, storable_picture::motion, pic_motion_params::mv, pic_motion_params::ref_id, pic_motion_params::ref_idx, storable_picture::ref_pic_num, storable_picture::size_x, storable_picture::size_y, frame_store::top_field, UnifiedOneForthPix(), and UnifiedOneForthPix_JV().

Referenced by insert_picture_in_dpb().

Here is the call graph for this function:

void dpb_combine_field_yuv ( FrameStore *  fs  ) 

void dpb_split_field ( FrameStore *  fs  ) 

void fill_frame_num_gap ( ImageParameters *  img  ) 

void flush_dpb ( void   ) 

All stored picture are output. Should be called to empty the buffer.

Definition at line 2969 of file mbuffer.c.

References decoded_picture_buffer::fs, decoded_picture_buffer::last_output_poc, output_one_frame_from_dpb(), remove_unused_frame_from_dpb(), unmark_for_reference(), and decoded_picture_buffer::used_size.

Referenced by adaptive_memory_management(), error(), free_encoder_memory(), and idr_memory_management().

Here is the call graph for this function:

void free_colocated ( ColocatedParams *  p  ) 

Free co-located memory.

Parameters:
p Picture to be freed

Definition at line 3603 of file mbuffer.c.

References colocated_params::bottom, colocated_params::frame, free_motion_params(), colocated_params::mb_adaptive_frame_field_flag, and colocated_params::top.

Referenced by free_encoder_memory().

Here is the call graph for this function:

void free_dpb ( void   ) 

void free_frame_store ( FrameStore *  f  ) 

Free frame store memory.

Parameters:
f FrameStore to be freed

Definition at line 510 of file mbuffer.c.

References frame_store::bottom_field, frame_store::frame, free_storable_picture(), and frame_store::top_field.

Referenced by free_dpb(), idr_memory_management(), and uninit_out_buffer().

Here is the call graph for this function:

void free_ref_pic_list_reordering_buffer ( Slice *  currSlice  ) 

void free_storable_picture ( StorablePicture *  p  ) 

void init_dpb ( void   ) 

void init_lists ( int  currSliceType,
PictureStructure  currPicStructure 
)

void init_mbaff_lists ( void   ) 

Initialize listX[2..5] from lists 0 and 1 listX[2]: list0 for current_field==top listX[3]: list1 for current_field==top listX[4]: list0 for current_field==bottom listX[5]: list1 for current_field==bottom.

Definition at line 1440 of file mbuffer.c.

References storable_picture::bottom_field, and storable_picture::top_field.

Referenced by init_slice().

void reorder_ref_pic_list ( StorablePicture **  list,
int *  list_size,
int  num_ref_idx_lX_active_minus1,
int *  reordering_of_pic_nums_idc,
int *  abs_diff_pic_num_minus1,
int *  long_term_pic_idx 
)

Reordering process for reference picture lists.

Definition at line 1602 of file mbuffer.c.

References error(), ImageParameters::frame_num, reorder_long_term(), reorder_short_term(), and ImageParameters::structure.

Referenced by init_slice(), ref_pic_list_reordering(), and wpxReorderLists().

Here is the call graph for this function:

void replace_top_pic_with_frame ( StorablePicture *  p  ) 

void store_picture_in_dpb ( StorablePicture *  p  ) 


Documentation generated with DoxyGen