mode_decision.h File Reference

Headerfile for mode decision. More...

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

Go to the source code of this file.

Functions

int BIDPartitionCost (Macroblock *currMB, int, int, char[2], int)
int BPredPartitionCost (Macroblock *currMB, int, int, short, short, int, int)
void StoreMV8x8 (Slice *currSlice, int dir)
void RestoreMV8x8 (Slice *currSlice, int dir)
void store_macroblock_parameters (Macroblock *currMB, int)
void SetModesAndRefframeForBlocks (Macroblock *currMB, short)
void StoreNewMotionVectorsBlock8x8 (Slice *currSlice, int, int, Info8x8 *)
void assign_enc_picture_params (Macroblock *currMB, int mode, Info8x8 *best, int block)
void set_subblock8x8_info (Block8x8Info *, int, int, RD_8x8DATA *)
void set_block8x8_info (Block8x8Info *, int, int, Info8x8 *best)
void update_refresh_map (Macroblock *currMB, int intra, int intra1)
void SetCoeffAndReconstruction8x8 (Macroblock *currMB)
void get_bipred_cost (Macroblock *currMB, int mode, int block, int i, int j, Info8x8 *best, RD_PARAMS *enc_mb, int bmcost[5])
short I16Offset (int, short)
int CheckReliabilityOfRef (Macroblock *currMB, int block, int list_idx, int ref, int mode)
int Mode_Decision_for_Intra4x4Macroblock (Macroblock *currMB, double, double *)
int RDCost_for_macroblocks (Macroblock *currMB, double, short)
double RDCost_for_8x8blocks (Macroblock *currMB, RD_8x8DATA *dataTr, int *, int64 *, double, int, short, Info8x8 *, double)
void rc_store_diff (int diff[16][16], imgpel **p_curImg, int cpix_x, imgpel **prediction)
void submacroblock_mode_decision (Macroblock *currMB, RD_PARAMS *, RD_8x8DATA *, int ****, int, int *)
void submacroblock_mode_decision_low (Macroblock *currMB, RD_PARAMS *, RD_8x8DATA *, int ****, int *, int, int *, int *, int *, int)
void init_enc_mb_params (Macroblock *currMB, RD_PARAMS *enc_mb, int intra)
void list_prediction_cost (Macroblock *currMB, int list, int block, int mode, RD_PARAMS *enc_mb, int bmcost[5], char best_ref[2])
void determine_prediction_list (int[5], Info8x8 *, int *)
void compute_mode_RD_cost (Macroblock *currMB, RD_PARAMS *enc_mb, short mode, short *inter_skip)
int transform_termination_control (Macroblock *currMB, int mode)
int bslice_16x16_termination_control (InputParameters *p_Inp, Block8x8Info *b8x8info, int *ctr16x16, int mode, int bslice)
int iminarray (int arr[], int size, int *minind)
void update_lambda_costs (Macroblock *currMB, RD_PARAMS *enc_mb, int lambda_mf[3])
void get_initial_mb16x16_cost (Macroblock *currMB)
void adjust_mb16x16_cost (Macroblock *currMB, int cost)
void reset_adaptive_rounding (ImageParameters *p_Img)
int64 distortionSSE (Macroblock *currMB)

Variables

static const int b8_mode_table [6] = {0, 4, 5, 6, 7}
static const char mb_mode_table [9] = {0, 1, 2, 3, P8x8, I16MB, I4MB, I8MB, IPCM}


Detailed Description

Headerfile for mode decision.

mode_decision.h

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

Definition in file mode_decision.h.


Function Documentation

int BIDPartitionCost ( Macroblock currMB,
int  ,
int  ,
char  [2],
int   
)

Motion Cost for Bidirectional modes.

Definition at line 1138 of file mv_search.c.

References slice::all_mv, luma_prediction(), slice::mb_pred, macroblock::opix_y, macroblock::p_Img, macroblock::p_slice, img_par::pCurImg, and macroblock::pix_x.

Referenced by list_prediction_cost().

Here is the call graph for this function:

int BPredPartitionCost ( Macroblock currMB,
int  ,
int  ,
short  ,
short  ,
int  ,
int   
)

Motion Cost for Bidirectional modes.

Definition at line 581 of file mv_search.c.

References slice::bipred_mv, luma_prediction_bi(), slice::mb_pred, macroblock::opix_y, macroblock::p_Img, macroblock::p_slice, img_par::pCurImg, and macroblock::pix_x.

Referenced by list_prediction_cost().

Here is the call graph for this function:

int bslice_16x16_termination_control ( InputParameters p_Inp,
Block8x8Info b8x8info,
int *  ctr16x16,
int  mode,
int  bslice 
)

Update prediction direction for mode P16x16 to check all prediction directions.

Definition at line 1424 of file mode_decision.c.

References inp_par_enc::BiPredMotionEstimation, and error().

Referenced by compute_mode_RD_cost().

Here is the call graph for this function:

int CheckReliabilityOfRef ( Macroblock currMB,
int  block,
int  list_idx,
int  ref,
int  mode 
)

Checks if a given reference frame is reliable for the current macroblock, given the motion vectors that the motion search has returned.

Returns:
If the return value is 1, the reference frame is reliable. If it is 0, then it is not reliable.
Note:
A specific area in each reference frame is assumed to be unreliable if the same area has been intra-refreshed in a subsequent frame. The information about intra-refreshed areas is kept in the p_Img->pixel_map.

Definition at line 351 of file rdopt.c.

References slice::all_mv, macroblock::block_x, macroblock::block_y, img_par::height, macroblock::p_Img, macroblock::p_slice, img_par::pixel_map, and img_par::width.

Referenced by list_prediction_cost().

void compute_mode_RD_cost ( Macroblock currMB,
RD_PARAMS *  enc_mb,
short  mode,
short *  inter_skip 
)

void determine_prediction_list ( int  [5],
Info8x8 ,
int *   
)

Determination of prediction list based on simple distortion computation.

Definition at line 358 of file mode_decision.c.

References iminarray().

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

Here is the call graph for this function:

int64 distortionSSE ( Macroblock currMB  ) 

void get_bipred_cost ( Macroblock currMB,
int  mode,
int  block,
int  i,
int  j,
Info8x8 best,
RD_PARAMS *  enc_mb,
int  bmcost[5] 
)

Compute bipred costs.

Definition at line 1480 of file mode_decision.c.

References slice::all_mv, slice::bipred_mv, list_prediction_cost(), and macroblock::p_slice.

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

Here is the call graph for this function:

int iminarray ( int  arr[],
int  size,
int *  minind 
)

Return array's minimum and its index.

Definition at line 1332 of file mode_decision.c.

Referenced by determine_prediction_list().

void init_enc_mb_params ( Macroblock currMB,
RD_PARAMS *  enc_mb,
int  intra 
)

void list_prediction_cost ( Macroblock currMB,
int  list,
int  block,
int  mode,
RD_PARAMS *  enc_mb,
int  bmcost[5],
char  best_ref[2] 
)

int Mode_Decision_for_Intra4x4Macroblock ( Macroblock currMB,
double  ,
double *   
)

4x4 Intra mode decision for an macroblock

Definition at line 388 of file rd_intra_jm.c.

References Mode_Decision_for_IntraSubMBlocks(), and macroblock::p_slice.

Referenced by encode_one_macroblock_low(), and RDCost_for_macroblocks().

Here is the call graph for this function:

void rc_store_diff ( int  diff[16][16],
imgpel **  p_curImg,
int  cpix_x,
imgpel **  prediction 
)

double RDCost_for_8x8blocks ( Macroblock currMB,
RD_8x8DATA *  dataTr,
int *  ,
int64 *  ,
double  ,
int  ,
short  ,
Info8x8 ,
double   
)

int RDCost_for_macroblocks ( Macroblock currMB,
double  ,
short   
)

void reset_adaptive_rounding ( ImageParameters p_Img  ) 

void RestoreMV8x8 ( Slice currSlice,
int  dir 
)

Restore motion vectors of 8x8 partitions of one macroblock.

Definition at line 2971 of file rdopt.c.

References RestoreMVBlock8x8().

Referenced by set_stored_macroblock_parameters(), set_stored_macroblock_parameters_mpass(), set_stored_macroblock_parameters_sp(), and SetCoeffAndReconstruction8x8().

Here is the call graph for this function:

void set_block8x8_info ( Block8x8Info ,
int  ,
int  ,
Info8x8 best 
)

Set block 8x8 mode information.

Definition at line 3306 of file rdopt.c.

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

void set_subblock8x8_info ( Block8x8Info ,
int  ,
int  ,
RD_8x8DATA *   
)

Set block 8x8 mode information for P8x8 mode.

Definition at line 3339 of file rdopt.c.

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

void SetCoeffAndReconstruction8x8 ( Macroblock currMB  ) 

void SetModesAndRefframeForBlocks ( Macroblock currMB,
short   
)

void store_macroblock_parameters ( Macroblock currMB,
int   
)

void StoreMV8x8 ( Slice currSlice,
int  dir 
)

Store motion vectors of 8x8 partitions of one macroblock.

Definition at line 2894 of file rdopt.c.

References StoreMVBlock8x8().

Referenced by SetCoeffAndReconstruction8x8().

Here is the call graph for this function:

void StoreNewMotionVectorsBlock8x8 ( Slice currSlice,
int  ,
int  ,
Info8x8  
)

Store predictors for 8x8 partition.

Definition at line 2987 of file rdopt.c.

References slice::all_mv, slice::bipred_mv, and slice::slice_type.

Referenced by submacroblock_mode_decision(), and submacroblock_mode_decision_low().

void submacroblock_mode_decision ( Macroblock currMB,
RD_PARAMS *  ,
RD_8x8DATA *  ,
int ****  ,
int  ,
int *   
)

void submacroblock_mode_decision_low ( Macroblock currMB,
RD_PARAMS *  ,
RD_8x8DATA *  ,
int ****  ,
int *  ,
int  ,
int *  ,
int *  ,
int *  ,
int   
)

int transform_termination_control ( Macroblock currMB,
int  mode 
)

Decides whether to perform tranform 8x8 for this mode.

Definition at line 1384 of file mode_decision.c.

References macroblock::p_Img, macroblock::p_slice, and slice::slice_type.

Referenced by compute_mode_RD_cost().


Documentation generated with DoxyGen