ratectl.c File Reference

Rate Control algorithm. More...

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

Include dependency graph for ratectl.c:

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]


Detailed Description

Rate Control algorithm.

Author:
Main contributors (see contributors.h for copyright, address and affiliation details)
Date:
16 Jan. 2003

Definition in file ratectl.c.


Function Documentation

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

Returns:
calculated MAD

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().

Here is the call graph for this function:

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().

Here is the call graph for this function:

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  ) 

void rc_init_gop_params ( void   ) 

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().

Here is the call graph for this function:

void rc_store_diff ( int  cpix_x,
int  cpix_y,
imgpel **  prediction 
)

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().

Here is the call graph for this function:


Documentation generated with DoxyGen