mode_decision.c File Reference

Main macroblock mode decision functions and helpers. More...

#include <math.h>
#include <limits.h>
#include <float.h>
#include "global.h"
#include "rdopt_coding_state.h"
#include "mb_access.h"
#include "intrarefresh.h"
#include "image.h"
#include "transform8x8.h"
#include "ratectl.h"
#include "mode_decision.h"
#include "fmo.h"
#include "me_umhex.h"
#include "me_umhexsmp.h"
#include "macroblock.h"
#include "rdoq.h"
#include "errdo.h"
#include "q_around.h"
#include "slice.h"
#include "md_common.h"
#include "conformance.h"
#include "rdopt.h"

Include dependency graph for mode_decision.c:

Go to the source code of this file.

Functions

void reset_valid_modes (RD_PARAMS *enc_mb)
static int check_for_SI16 (int **lrec, int pix_x, int pix_y)
void end_encode_one_macroblock (Macroblock *currMB)
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])
static int compute_ref_cost (ImageParameters *p_Img, RD_PARAMS *enc_mb, int ref, int list)
void determine_prediction_list (int bmcost[5], Info8x8 *best, int *cost)
void compute_mode_RD_cost (Macroblock *currMB, RD_PARAMS *enc_mb, short mode, short *inter_skip)
void submacroblock_mode_decision (Macroblock *currMB, RD_PARAMS *enc_mb, RD_8x8DATA *dataTr, int ****cofACtr, int block, int *cost)
void submacroblock_mode_decision_low (Macroblock *currMB, RD_PARAMS *enc_mb, RD_8x8DATA *dataTr, int ****cofACtr, int *have_direct, int block, int *cost_direct, int *cost, int *cost8x8_direct, int transform8x8)
void get_initial_mb16x16_cost (Macroblock *currMB)
void adjust_mb16x16_cost (Macroblock *currMB, int cost)
void update_lambda_costs (Macroblock *currMB, RD_PARAMS *enc_mb, int lambda_mf[3])
int iminarray (int arr[], int size, int *minind)
int is_bipred_enabled (InputParameters *p_Inp, int mode)
int transform_termination_control (Macroblock *currMB, int mode)
int bslice_16x16_termination_control (InputParameters *p_Inp, Block8x8Info *b8x8info, int *ctr16x16, int mode, int bslice)
void get_bipred_cost (Macroblock *currMB, int mode, int block, int i, int j, Info8x8 *best, RD_PARAMS *enc_mb, int bmcost[5])


Detailed Description

Main macroblock mode decision functions and helpers.

Definition in file mode_decision.c.


Function Documentation

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:

static int check_for_SI16 ( int **  lrec,
int  pix_x,
int  pix_y 
) [inline, static]

Checks whether a primary SP slice macroblock was encoded as I16.

Definition at line 56 of file mode_decision.c.

Referenced by init_enc_mb_params().

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

void determine_prediction_list ( int  bmcost[5],
Info8x8 best,
int *  cost 
)

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:

void end_encode_one_macroblock ( 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 
)

int is_bipred_enabled ( InputParameters p_Inp,
int  mode 
)

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

void reset_valid_modes ( RD_PARAMS *  enc_mb  ) 

Reset Valid Modes.

Definition at line 44 of file mode_decision.c.

Referenced by init_enc_mb_params().

void submacroblock_mode_decision ( Macroblock currMB,
RD_PARAMS *  enc_mb,
RD_8x8DATA *  dataTr,
int ****  cofACtr,
int  block,
int *  cost 
)

void submacroblock_mode_decision_low ( Macroblock currMB,
RD_PARAMS *  enc_mb,
RD_8x8DATA *  dataTr,
int ****  cofACtr,
int *  have_direct,
int  block,
int *  cost_direct,
int *  cost,
int *  cost8x8_direct,
int  transform8x8 
)

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