rdopt.h File Reference

Headerfile for RDO. More...

#include "global.h"
#include "rdopt_coding_state.h"

Include dependency graph for rdopt.h:

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

Go to the source code of this file.

Data Structures

struct  BestMode
struct  rdo_structure

Functions

int GetBestTransformP8x8 (Macroblock *currMB)
byte field_flag_inference (Macroblock *currMB)
double rdcost_for_4x4_intra_blocks (Macroblock *currMB, int *nonzero, int b8, int b4, int ipmode, double lambda, int mostProbableMode, double min_rdcost)
double rdcost_for_4x4_intra_blocks_444 (Macroblock *currMB, int *nonzero, int b8, int b4, int ipmode, double lambda, int mostProbableMode, double min_rdcost)
int valid_intra_mode (Slice *currSlice, int ipmode)
void init_md_best (BestMode *best)
void generate_pred_error_4x4 (imgpel **cur_img, imgpel **prd_img, imgpel **cur_prd, int **mb_rres, int pic_opix_x, int block_x)
void generate_pred_error_8x8 (imgpel **cur_img, imgpel **prd_img, imgpel **cur_prd, int **mb_rres, int pic_opix_x, int block_x)
void clear_rdopt (Slice *currSlice)
void init_rdopt (Slice *currSlice)
void UpdatePixelMap (ImageParameters *p_Img, InputParameters *p_Inp)
void update_qp_cbp (Macroblock *currMB)
void update_qp_cbp_tmp (Macroblock *currMB, int cbp)
void alloc_rd8x8data (RD_8x8DATA *rd_data)
void free_rd8x8data (RD_8x8DATA *rd_data)
void restore_nz_coeff (Macroblock *currMB)
void end_encode_one_macroblock (Macroblock *currMB)
void encode_one_macroblock_low (Macroblock *currMB)
void encode_one_macroblock_high (Macroblock *currMB)
void encode_one_macroblock_highfast (Macroblock *currMB)
void encode_one_macroblock_highloss (Macroblock *currMB)
static void copy_4x4block (imgpel **oblock, imgpel **iblock, int o_xoffset, int i_xoffset)


Detailed Description

Headerfile for RDO.

rdopt.h

Author:
Alexis Michael Tourapis
Date:
2 January 2008

Definition in file rdopt.h.


Function Documentation

void clear_rdopt ( Slice currSlice  ) 

delete structure for RD-optimized mode decision

Definition at line 92 of file rdopt.c.

References delete_coding_state(), EXTENDED, free_mem2D(), free_mem2Dint(), free_mem2Dpel(), free_mem3Dint(), free_mem3Dpel(), free_mem5Dshort(), free_mem_ACcoeff(), free_mem_ACcoeff_new(), free_mem_DCcoeff(), and inp_par_enc::ProfileIDC.

Referenced by free_slice().

Here is the call graph for this function:

static void copy_4x4block ( imgpel **  oblock,
imgpel **  iblock,
int  o_xoffset,
int  i_xoffset 
) [inline, static]

copy data in iblock to oblock

Definition at line 122 of file rdopt.h.

Referenced by Mode_Decision_for_4x4IntraBlocks_JM_High(), and Mode_Decision_for_4x4IntraBlocks_JM_High444().

void encode_one_macroblock_high ( Macroblock currMB  ) 

void encode_one_macroblock_highfast ( Macroblock currMB  ) 

void encode_one_macroblock_highloss ( Macroblock currMB  ) 

void encode_one_macroblock_low ( Macroblock currMB  ) 

Mode Decision for a macroblock.

have_direct

Definition at line 42 of file md_low.c.

References img_par::AdaptiveRounding, inp_par_enc::AdaptiveRounding, slice::all_mv, macroblock::ar_mode, img_par::b8x8info, macroblock::block_x, macroblock::block_y, chroma_residual_coding(), slice::cofAC, copy_image_data_16x16(), inp_par_enc::CtxAdptLagrangeMult, determine_prediction_list(), FindSkipModeMotionVector(), free_mem3Dpel(), get_mem3Dpel(), GetBestTransformP8x8(), GetDirectCostMB(), storable_picture::imgUV, storable_picture::imgY, init_enc_mb_params(), init_md_best(), intra_chroma_prediction(), macroblock::intra_pred_modes8x8, intrapred_16x16(), img_par::ipredmode, img_par::ipredmode8x8, is_bipred_enabled(), list_prediction_cost(), luma_residual_coding(), luma_residual_coding_p444(), slice::mb_pred, macroblock::mb_type, macroblock::mb_y, img_par::mb_y_intra, macroblock::mbAddrX, Mode_Decision_for_Intra4x4Macroblock(), Mode_Decision_for_Intra8x8Macroblock(), storable_picture::motion, slice::mpr_16x16, pic_motion_params::mv, macroblock::opix_y, macroblock::p_Img, macroblock::p_slice, PartitionMotionSearch(), img_par::pCurImg, macroblock::pix_x, macroblock::pix_y, RandomIntra(), rc_store_diff(), rc_store_mad(), inp_par_enc::RCEnable, pic_motion_params::ref_idx, reset_adaptive_rounding(), reset_mb_nz_coeff(), select_plane(), set_block8x8_info(), set_mbaff_parameters(), set_subblock8x8_info(), SetCoeffAndReconstruction8x8(), SetModesAndRefframeForBlocks(), slice::slice_type, submacroblock_mode_decision_low(), TransformDecision(), update_offset_params(), YUV400, and YUV444.

Referenced by init_rdopt().

Here is the call graph for this function:

void end_encode_one_macroblock ( Macroblock currMB  ) 

byte field_flag_inference ( Macroblock currMB  ) 

skip macroblock field inference

Returns:
inferred field flag

Definition at line 2803 of file rdopt.c.

References img_par::mb_data, and macroblock::p_Img.

Referenced by end_encode_one_macroblock(), RDCost_for_macroblocks(), writeMBLayerBSlice(), and writeMBLayerPSlice().

int GetBestTransformP8x8 ( Macroblock currMB  ) 

Makes the decision if 8x8 tranform will be used (for RD-off).

Definition at line 3061 of file rdopt.c.

References macroblock::opix_y, macroblock::p_Img, macroblock::p_slice, img_par::pCurImg, and macroblock::pix_x.

Referenced by encode_one_macroblock_low().

void init_md_best ( BestMode *  best  ) 

Initialize best mode information.

Definition at line 1711 of file rdopt.c.

Referenced by encode_one_macroblock_high(), encode_one_macroblock_highfast(), encode_one_macroblock_highloss(), and encode_one_macroblock_low().

void init_rdopt ( Slice currSlice  ) 

double rdcost_for_4x4_intra_blocks ( Macroblock currMB,
int *  nonzero,
int  b8,
int  b4,
int  ipmode,
double  lambda,
int  mostProbableMode,
double  min_rdcost 
)

double rdcost_for_4x4_intra_blocks_444 ( Macroblock currMB,
int *  nonzero,
int  b8,
int  b4,
int  ipmode,
double  lambda,
int  mostProbableMode,
double  min_rdcost 
)

void restore_nz_coeff ( Macroblock currMB  ) 

Restore Non zero coefficients.

Definition at line 1441 of file rdopt.c.

References macroblock::mbAddrX, img_par::nz_coeff, and macroblock::p_Img.

Referenced by encode_one_macroblock_high(), encode_one_macroblock_highfast(), and encode_one_macroblock_highloss().

void update_qp_cbp ( Macroblock currMB  ) 

Update QP Parameters (in case of SKIP MBs or MBAFF).

Definition at line 3542 of file rdopt.c.

References inp_par_enc::MbInterlace, macroblock::p_Img, macroblock::p_slice, img_par::qp, macroblock::qp, and update_qp().

Referenced by end_encode_one_macroblock().

Here is the call graph for this function:

void UpdatePixelMap ( ImageParameters p_Img,
InputParameters p_Inp 
)

Updates the pixel map that shows, which reference frames are reliable for each MB-area of the picture.

Note:
The new values of the p_Img->pixel_map are taken from the temporary buffer p_Img->refresh_map

Definition at line 302 of file rdopt.c.

References img_par::height, inp_par_enc::num_ref_frames, img_par::pixel_map, img_par::refresh_map, and img_par::width.

Referenced by encode_one_frame().


Documentation generated with DoxyGen