#include <math.h>
#include <limits.h>
#include "global.h"
#include "ratectl.h"

Go to the source code of this file.
Functions | |
| void | rc_store_mad (Macroblock *currMB) |
| double | QP2Qstep (int QP) |
| int | Qstep2QP (double Qstep) |
| int | ComputeMBMAD () |
| double | ComputeFrameMAD () |
| void | rc_copy_generic (rc_generic *dst, rc_generic *src) |
| void | rc_alloc_generic (rc_generic **prc) |
| void | rc_free_generic (rc_generic **prc) |
| void | rc_init_gop_params (void) |
| void | rc_init_frame (int FrameNumberInFile) |
| void | rc_init_sequence (void) |
| void | rc_store_slice_header_bits (int len) |
| void | rc_store_diff (int cpix_x, int cpix_y, imgpel **prediction) |
Variables | |
| int | diffy [16][16] |
Definition in file ratectl.c.
| double ComputeFrameMAD | ( | void | ) |
Compute Frame MAD.
Definition at line 149 of file ratectl.c.
References ImageParameters::FrameSizeInMbs.
Referenced by rc_update_pict(), and updateRCModel().
| int ComputeMBMAD | ( | void | ) |
calculate MAD for the current macroblock
Definition at line 131 of file ratectl.c.
Referenced by rc_store_mad().
| double QP2Qstep | ( | int | QP | ) |
map QP to Qstep
Definition at line 50 of file ratectl.c.
Referenced by Qstep2QP(), and updateRCModel().
| int Qstep2QP | ( | double | Qstep | ) |
map Qstep to QP
Definition at line 71 of file ratectl.c.
References QP2Qstep().
Referenced by updateModelQPBU(), and updateModelQPFrame().

| void rc_alloc_generic | ( | rc_generic ** | prc | ) |
Dynamically allocate memory needed for generic rate control.
Definition at line 190 of file ratectl.c.
References ImageParameters::FrameSizeInMbs, and no_mem_exit().
Referenced by rc_allocate_memory().

| void rc_copy_generic | ( | rc_generic * | dst, | |
| rc_generic * | src | |||
| ) |
Copy JVT rate control objects.
Definition at line 166 of file ratectl.c.
References ImageParameters::FrameSizeInMbs.
Referenced by encode_one_slice_MBAFF(), rc_init_frame(), rc_init_frame_rdpic(), rc_restore_state(), and rc_save_state().
| void rc_free_generic | ( | rc_generic ** | prc | ) |
Free memory needed for generic rate control.
Definition at line 213 of file ratectl.c.
Referenced by rc_free_memory().
| void rc_init_frame | ( | int | FrameNumberInFile | ) |
Initialize Frame Level Rate Control parameters.
Definition at line 299 of file ratectl.c.
References ImageParameters::BasicUnit, InputParameters::basicunit, ImageParameters::FrameSizeInMbs, InputParameters::MbInterlace, ImageParameters::number, ImageParameters::qp, rc_copy_generic(), rc_copy_quadratic(), InputParameters::RCUpdateMode, InputParameters::RDPictureDecision, and ImageParameters::type.
Referenced by encode_one_frame().

| void rc_init_gop_params | ( | void | ) |
Initialize GOP Level Rate Control parameters.
Definition at line 234 of file ratectl.c.
References InputParameters::adaptive_idr_period, ImageParameters::frm_number, InputParameters::idr_period, ImageParameters::lastIDRnumber, ImageParameters::lastIntraNumber, InputParameters::no_frm_base, ImageParameters::number, InputParameters::NumberBFrames, rc_init_GOP(), and InputParameters::RCUpdateMode.
Referenced by prepare_first_layer().

| void rc_init_sequence | ( | void | ) |
Initialize Sequence Level Rate Control parameters.
Definition at line 336 of file ratectl.c.
References rc_init_seq(), and InputParameters::RCUpdateMode.
Referenced by init_encoder().

| void rc_store_diff | ( | int | cpix_x, | |
| int | cpix_y, | |||
| imgpel ** | prediction | |||
| ) |
Update Rate Control Difference.
Definition at line 371 of file ratectl.c.
References pCurImg.
Referenced by compute_mode_RD_cost(), encode_one_macroblock_high(), encode_one_macroblock_highfast(), encode_one_macroblock_highloss(), and encode_one_macroblock_low().
| void rc_store_mad | ( | Macroblock * | currMB | ) |
Update Rate Control Parameters.
Definition at line 33 of file ratectl.c.
References InputParameters::basicunit, ComputeMBMAD(), ImageParameters::current_mb_nr, and ImageParameters::FrameSizeInMbs.
Referenced by encode_one_macroblock_high(), encode_one_macroblock_highfast(), encode_one_macroblock_highloss(), and encode_one_macroblock_low().
