rdoq.h File Reference

Headerfile for trellis based mode decision. More...

#include <math.h>

Include dependency graph for rdoq.h:

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

Go to the source code of this file.

Data Structures

struct  estBitsCabacStruct
struct  levelDataStruct

Defines

#define MAX_PREC_COEFF   25
#define SIGN_BITS   1

Functions

void init_rdoq_slice (int slice_type, int symbol_mode)
void est_RunLevel_CAVLC (levelDataStruct *levelData, int *levelTrellis, int block_type, int b8, int b4, int coeff_num, double lambda)
int est_CAVLC_bits (levelDataStruct *levelData, int level_to_enc[16], int sign_to_enc[16], int nnz, int block_type)
void precalculate_unary_exp_golomb_level ()
int est_unary_exp_golomb_level_bits (unsigned int symbol, int bits0, int bits1)
int est_exp_golomb_encode_eq_prob (unsigned int symbol)
void estRunLevel_CABAC (Slice *currSlice, Macroblock *currMB, int context)
void est_CBP_block_bit (Slice *currSlice, Macroblock *currMB, EncodingEnvironmentPtr eep_dp, int type)
void est_significance_map (Slice *currSlice, Macroblock *currMB, EncodingEnvironmentPtr eep_dp, int type)
void est_significant_coefficients (Slice *currSlice, Macroblock *currMB, EncodingEnvironmentPtr eep_dp, int type)
int biari_no_bits (EncodingEnvironmentPtr eep, signed short symbol, BiContextTypePtr bi_ct)
int biari_state (EncodingEnvironmentPtr eep, signed short symbol, BiContextTypePtr bi_ct)
int est_write_and_store_CBP_block_bit (Macroblock *currMB, int type)
void est_writeRunLevel_CABAC (levelDataStruct levelData[], int levelTabMin[], int type, double lambda, int kStart, int kStop, int noCoeff, int estCBP)
int est_unary_exp_golomb_level_encode (unsigned int symbol, int ctx, int type)
void init_trellis_data_4x4_CAVLC (int **tblock, int block_x, int qp_per, int qp_rem, int **levelscale, int **leveloffset, const byte *p_scan, Macroblock *currMB, levelDataStruct *dataLevel, int type)
int init_trellis_data_4x4_CABAC (int **tblock, int block_x, int qp_per, int qp_rem, int **levelscale, int **leveloffset, const byte *p_scan, Macroblock *currMB, levelDataStruct *dataLevel, int *kStart, int *kStop, int type)
void init_trellis_data_8x8_CAVLC (int **tblock, int block_x, int qp_per, int qp_rem, int **levelscale, int **leveloffset, const byte *p_scan, Macroblock *currMB, levelDataStruct levelData[4][16])
int init_trellis_data_8x8_CABAC (int **tblock, int block_x, int qp_per, int qp_rem, int **levelscale, int **leveloffset, const byte *p_scan, Macroblock *currMB, levelDataStruct *dataLevel, int *kStart, int *kStop, int symbolmode)
void init_trellis_data_DC_CAVLC (int **tblock, int qp_per, int qp_rem, int levelscale, int leveloffset, const byte *p_scan, Macroblock *currMB, levelDataStruct *dataLevel, int type)
int init_trellis_data_DC_CABAC (int **tblock, int qp_per, int qp_rem, int levelscale, int leveloffset, const byte *p_scan, Macroblock *currMB, levelDataStruct *dataLevel, int *kStart, int *kStop)
int init_trellis_data_DC_cr_CAVLC (int **tblock, int qp_per, int qp_rem, int levelscale, int leveloffset, const byte *p_scan, Macroblock *currMB, levelDataStruct *dataLevel)
int init_trellis_data_DC_cr_CABAC (int **tblock, int qp_per, int qp_rem, int levelscale, int leveloffset, const byte *p_scan, Macroblock *currMB, levelDataStruct *dataLevel, int *kStart, int *kStop)
void RDOQ_update_mode (RD_PARAMS *enc_mb, int bslice)
void copy_rddata_trellis (RD_DATA *dest, RD_DATA *src)
void updateMV_mp (int *m_cost, short ref, int list, int h, int v, int blocktype, int *lambda_factor, int block8x8)
void trellis_coding (Slice *currSlice, Macroblock *currMB, int CurrentMbAddr, Boolean prev_recode_mb)

Variables

double norm_factor_4x4
double norm_factor_8x8


Detailed Description

Headerfile for trellis based mode decision.

rdoq.h

Author:
Limin Liu <lliu@dolby.com> Alexis Michael Tourapis <alexismt@ieee.org>

Definition in file rdoq.h.


Function Documentation

int est_CAVLC_bits ( levelDataStruct *  levelData,
int  level_to_enc[16],
int  sign_to_enc[16],
int  nnz,
int  block_type 
)

void est_CBP_block_bit ( Slice *  currSlice,
Macroblock *  currMB,
EncodingEnvironmentPtr  eep_dp,
int  type 
)

estimate bit cost for each CBP bit

Definition at line 156 of file rdoq_cabac.c.

References Slice::tex_ctx.

Referenced by estRunLevel_CABAC().

int est_exp_golomb_encode_eq_prob ( unsigned int  symbol  ) 

estimate exp golomb bit cost

Definition at line 111 of file rdoq_cabac.c.

Referenced by est_unary_exp_golomb_level_encode().

void est_RunLevel_CAVLC ( levelDataStruct *  levelData,
int *  levelTrellis,
int  block_type,
int  b8,
int  b4,
int  coeff_num,
double  lambda 
)

void est_significance_map ( Slice *  currSlice,
Macroblock *  currMB,
EncodingEnvironmentPtr  eep_dp,
int  type 
)

estimate CABAC bit cost for significant coefficient map

Definition at line 175 of file rdoq_cabac.c.

References macroblock::mb_field, ImageParameters::structure, and Slice::tex_ctx.

Referenced by estRunLevel_CABAC().

void est_significant_coefficients ( Slice *  currSlice,
Macroblock *  currMB,
EncodingEnvironmentPtr  eep_dp,
int  type 
)

estimate bit cost of significant coefficient

Definition at line 214 of file rdoq_cabac.c.

References Slice::tex_ctx.

Referenced by estRunLevel_CABAC().

int est_unary_exp_golomb_level_encode ( unsigned int  symbol,
int  ctx,
int  type 
)

estimate unary exp golomb bit cost

Definition at line 567 of file rdoq_cabac.c.

References est_exp_golomb_encode_eq_prob().

Referenced by est_writeRunLevel_CABAC().

Here is the call graph for this function:

int est_write_and_store_CBP_block_bit ( Macroblock *  currMB,
int  type 
)

void est_writeRunLevel_CABAC ( levelDataStruct  levelData[],
int  levelTabMin[],
int  type,
double  lambda,
int  kStart,
int  kStop,
int  noCoeff,
int  estCBP 
)

Rate distortion optimized trellis quantization.

Definition at line 403 of file rdoq_cabac.c.

References est_unary_exp_golomb_level_encode().

Referenced by rdoq_4x4_CABAC(), rdoq_8x8_CABAC(), rdoq_ac4x4_CABAC(), rdoq_dc_CABAC(), and rdoq_dc_cr_CABAC().

Here is the call graph for this function:

void estRunLevel_CABAC ( Slice *  currSlice,
Macroblock *  currMB,
int  context 
)

estimate bit cost for CBP, significant map and significant coefficients

Definition at line 138 of file rdoq_cabac.c.

References datapartition::ee_cabac, est_CBP_block_bit(), est_significance_map(), est_significant_coefficients(), and Slice::partArr.

Here is the call graph for this function:

void init_rdoq_slice ( int  slice_type,
int  symbol_mode 
)

Initialize the parameters related to RDO_Q in slice level.

Definition at line 139 of file rdoq.c.

Referenced by init_slice().

int init_trellis_data_4x4_CABAC ( int **  tblock,
int  block_x,
int  qp_per,
int  qp_rem,
int **  levelscale,
int **  leveloffset,
const byte *  p_scan,
Macroblock *  currMB,
levelDataStruct *  dataLevel,
int *  kStart,
int *  kStop,
int  type 
)

Initialize levelData.

Definition at line 606 of file rdoq_cabac.c.

Referenced by rdoq_4x4_CABAC(), and rdoq_ac4x4_CABAC().

void init_trellis_data_4x4_CAVLC ( int **  tblock,
int  block_x,
int  qp_per,
int  qp_rem,
int **  levelscale,
int **  leveloffset,
const byte *  p_scan,
Macroblock *  currMB,
levelDataStruct *  dataLevel,
int  type 
)

Initialize levelData.

Definition at line 485 of file rdoq_cavlc.c.

Referenced by rdoq_4x4_CAVLC(), and rdoq_ac4x4_CAVLC().

void init_trellis_data_8x8_CAVLC ( int **  tblock,
int  block_x,
int  qp_per,
int  qp_rem,
int **  levelscale,
int **  leveloffset,
const byte *  p_scan,
Macroblock *  currMB,
levelDataStruct  levelData[4][16] 
)

Initialize levelData.

Definition at line 645 of file rdoq_cavlc.c.

Referenced by rdoq_8x8_CAVLC().

int init_trellis_data_DC_CABAC ( int **  tblock,
int  qp_per,
int  qp_rem,
int  levelscale,
int  leveloffset,
const byte *  p_scan,
Macroblock *  currMB,
levelDataStruct *  dataLevel,
int *  kStart,
int *  kStop 
)

Initialize levelData for Luma DC.

Definition at line 772 of file rdoq_cabac.c.

Referenced by rdoq_dc_CABAC().

void init_trellis_data_DC_CAVLC ( int **  tblock,
int  qp_per,
int  qp_rem,
int  levelscale,
int  leveloffset,
const byte *  p_scan,
Macroblock *  currMB,
levelDataStruct *  dataLevel,
int  type 
)

Initialize levelData for Luma DC.

Definition at line 567 of file rdoq_cavlc.c.

Referenced by rdoq_dc_CAVLC().

int init_trellis_data_DC_cr_CABAC ( int **  tblock,
int  qp_per,
int  qp_rem,
int  levelscale,
int  leveloffset,
const byte *  p_scan,
Macroblock *  currMB,
levelDataStruct *  dataLevel,
int *  kStart,
int *  kStop 
)

Initialize levelData for Chroma DC.

Definition at line 232 of file rdoq.c.

References ImageParameters::num_cdc_coeff.

Referenced by rdoq_dc_cr_CABAC().

int init_trellis_data_DC_cr_CAVLC ( int **  tblock,
int  qp_per,
int  qp_rem,
int  levelscale,
int  leveloffset,
const byte *  p_scan,
Macroblock *  currMB,
levelDataStruct *  dataLevel 
)

Initialize levelData for Chroma DC.

Definition at line 152 of file rdoq.c.

References ImageParameters::num_cdc_coeff.

Referenced by rdoq_dc_cr_CAVLC().


Documentation generated with DoxyGen