quantize_pvt.h File Reference

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

Go to the source code of this file.

Classes

struct  calc_noise_result_t
struct  calc_noise_data_t
 allows re-use of previously computed noise values More...

Defines

#define IXMAX_VAL   8206
#define PRECALC_SIZE   (IXMAX_VAL+2)
#define Q_MAX   (256+1)
#define Q_MAX2   116
#define LARGE_BITS   100000

Typedefs

typedef calc_noise_result_t calc_noise_result
typedef calc_noise_data_t calc_noise_data
 allows re-use of previously computed noise values

Functions

int on_pe (lame_global_flags const *gfp, FLOAT const pe[2][2], III_side_info_t const *l3_side, int targ_bits[2], int mean_bits, int gr, int cbr)
void reduce_side (int targ_bits[2], FLOAT ms_ener_ratio, int mean_bits, int max_bits)
int bin_search_StepSize (lame_internal_flags *const gfc, gr_info *const cod_info, int desired_rate, const int ch, const FLOAT xrpow[576])
void iteration_init (lame_global_flags *gfp)
int calc_xmin (lame_global_flags const *gfp, III_psy_ratio const *const ratio, gr_info *const cod_info, FLOAT *l3_xmin)
int calc_noise (const gr_info *const cod_info, const FLOAT *l3_xmin, FLOAT *distort, calc_noise_result *const res, calc_noise_data *prev_noise)
void set_frame_pinfo (lame_global_flags const *gfp, III_psy_ratio const ratio[2][2])
int count_bits (lame_internal_flags const *const gfc, const FLOAT *const xr, gr_info *const cod_info, calc_noise_data *prev_noise)
int noquant_count_bits (lame_internal_flags const *const gfc, gr_info *const cod_info, calc_noise_data *prev_noise)
void best_huffman_divide (const lame_internal_flags *const gfc, gr_info *const cod_info)
void best_scalefac_store (const lame_internal_flags *gfc, const int gr, const int ch, III_side_info_t *const l3_side)
int scale_bitcount (gr_info *const cod_info)
int scale_bitcount_lsf (const lame_internal_flags *gfp, gr_info *const cod_info)
void huffman_init (lame_internal_flags *const gfc)
void quantize_init (lame_internal_flags *const gfc)
void init_xrpow_core_init (lame_internal_flags *const gfc)
FLOAT athAdjust (FLOAT a, FLOAT x, FLOAT athFloor)
 Robert Hegemann 2001-04-27: this adjusts the ATH, keeping the original noise floor affects the higher frequencies more than the lower ones.

Variables

const int nr_of_sfb_block [6][3][4]
const int pretab [SBMAX_l]
const int slen1_tab [16]
const int slen2_tab [16]
const scalefac_struct sfBandIndex [9]
FLOAT pow43 [PRECALC_SIZE]
FLOAT adj43 [PRECALC_SIZE]
FLOAT pow20 [Q_MAX+Q_MAX2+1]
FLOAT ipow20 [Q_MAX]
FLOAT iipow20 [Q_MAX2+1]


Define Documentation

#define IXMAX_VAL   8206

Definition at line 25 of file quantize_pvt.h.

Referenced by choose_table_nonMMX(), count_bits(), find_lowest_scalefac(), k_34_2(), k_34_4(), k_iso_2(), and k_iso_4().

#define LARGE_BITS   100000

Definition at line 133 of file quantize_pvt.h.

Referenced by choose_table_nonMMX(), count_bits(), recalc_divide_init(), scale_bitcount(), searchGlobalStepsizeMax(), and tryGlobalStepsize().

#define PRECALC_SIZE   (IXMAX_VAL+2)

Definition at line 30 of file quantize_pvt.h.

Referenced by iteration_init().

#define Q_MAX   (256+1)

Definition at line 47 of file quantize_pvt.h.

Referenced by iteration_init().

#define Q_MAX2   116

Definition at line 48 of file quantize_pvt.h.

Referenced by calc_sfb_noise_ISO(), calc_sfb_noise_x34(), and iteration_init().


Typedef Documentation

typedef struct calc_noise_data_t calc_noise_data

allows re-use of previously computed noise values

typedef struct calc_noise_result_t calc_noise_result


Function Documentation

FLOAT athAdjust ( FLOAT  a,
FLOAT  x,
FLOAT  athFloor 
)

Robert Hegemann 2001-04-27: this adjusts the ATH, keeping the original noise floor affects the higher frequencies more than the lower ones.

Definition at line 576 of file quantize_pvt.c.

References FAST_LOG10_X.

void best_huffman_divide ( const lame_internal_flags *const  gfc,
gr_info *const  cod_info 
)

Definition at line 973 of file takehiro.c.

References gr_info::big_values, gr_info::block_type, gr_info::count1, gr_info::count1bits, gr_info::count1table_select, gfc, i, gr_info::l3_enc, memcpy, lame_internal_flags::mode_gr, NORM_TYPE, gr_info::part2_3_length, recalc_divide_init(), recalc_divide_sub(), SHORT_TYPE, t32l, t33l, and gr_info::table_select.

Referenced by iteration_finish_one(), and reduce_bit_usage().

Here is the call graph for this function:

void best_scalefac_store ( const lame_internal_flags gfc,
const int  gr,
const int  ch,
III_side_info_t *const  l3_side 
)

Definition at line 1108 of file takehiro.c.

References i, gr_info::l3_enc, gr_info::preflag, gr_info::scalefac, gr_info::scalefac_scale, gr_info::sfbmax, III_side_info_t::tt, and gr_info::width.

Referenced by iteration_finish_one(), and reduce_bit_usage().

int bin_search_StepSize ( lame_internal_flags *const  gfc,
gr_info *const  cod_info,
int  desired_rate,
const int  ch,
const FLOAT  xrpow[576] 
)

Definition at line 351 of file quantize.c.

References BINSEARCH_DOWN, BINSEARCH_NONE, BINSEARCH_UP, count_bits(), lame_internal_flags::CurrentStep, gfc, gr_info::global_gain, lame_internal_flags::OldValue, gr_info::part2_3_length, and gr_info::part2_length.

Referenced by outer_loop().

Here is the call graph for this function:

int calc_noise ( const gr_info *const   cod_info,
const FLOAT l3_xmin,
FLOAT distort,
calc_noise_result *const  res,
calc_noise_data prev_noise 
)

Definition at line 832 of file quantize_pvt.c.

References calc_noise_core_c(), FAST_LOG10, calc_noise_data_t::global_gain, gr_info::global_gain, Max, gr_info::max_nonzero_coeff, calc_noise_data_t::noise, calc_noise_data_t::noise_log, calc_noise_result_t::over_SSD, POW20, gr_info::preflag, pretab, gr_info::psymax, gr_info::scalefac, gr_info::scalefac_scale, calc_noise_data_t::step, gr_info::subblock_gain, gr_info::width, and gr_info::window.

Referenced by outer_loop(), set_pinfo(), and trancate_smallspectrums().

Here is the call graph for this function:

int calc_xmin ( lame_global_flags const *  gfp,
III_psy_ratio const *const  ratio,
gr_info *const  cod_info,
FLOAT l3_xmin 
)

Definition at line 610 of file quantize_pvt.c.

References ATH_t::adjust, lame_internal_flags::ATH, athAdjust(), lame_global_struct::ATHonly, III_psy_ratio::en, f, ATH_t::floor, gfc, gfp, lame_global_struct::internal_flags, III_psy_xmin::l, ATH_t::l, nsPsy_t::longfact, lame_internal_flags::masking_lower, lame_internal_flags::nsPsy, gr_info::psy_lmax, SBPSY_l, III_psy_ratio::thm, lame_global_struct::VBR, vbr_mtrh, vbr_rh, gr_info::width, and gr_info::xr.

Referenced by ABR_iteration_loop(), CBR_iteration_loop(), set_pinfo(), VBR_new_prepare(), and VBR_old_prepare().

Here is the call graph for this function:

int count_bits ( lame_internal_flags const *const  gfc,
const FLOAT *const  xr,
gr_info *const  cod_info,
calc_noise_data prev_noise 
)

Definition at line 858 of file takehiro.c.

References gfc, gr_info::global_gain, IPOW20, IXMAX_VAL, gr_info::l3_enc, LARGE_BITS, noquant_count_bits(), lame_internal_flags::pseudohalf, quantize_xrpow(), gr_info::scalefac_scale, gr_info::sfbmax, lame_internal_flags::substep_shaping, gr_info::width, and gr_info::xrpow_max.

Referenced by bin_search_StepSize(), and outer_loop().

Here is the call graph for this function:

void huffman_init ( lame_internal_flags *const  gfc  ) 

Definition at line 1410 of file takehiro.c.

References lame_internal_flags::bv_scf, lame_internal_flags::choose_table, choose_table_nonMMX(), lame_internal_flags::CPU_features, gfc, i, scalefac_struct::l, lame_internal_flags::MMX, region0_count, region1_count, lame_internal_flags::scalefac_band, and subdv_table.

Referenced by iteration_init().

Here is the call graph for this function:

void init_xrpow_core_init ( lame_internal_flags *const  gfc  ) 

Definition at line 95 of file quantize.c.

References lame_internal_flags::CPU_features, gfc, lame_internal_flags::init_xrpow_core, init_xrpow_core_c(), and lame_internal_flags::SSE.

Referenced by iteration_init().

Here is the call graph for this function:

void iteration_init ( lame_global_flags gfp  ) 

Definition at line 332 of file quantize_pvt.c.

References adj43, compute_ath(), lame_global_struct::exp_nspsytune, f, gfc, gfp, huffman_init(), i, init_xrpow_core_init(), lame_global_struct::internal_flags, ipow20, lame_internal_flags::iteration_init_init, lame_internal_flags::l3_side, III_side_info_t::main_data_begin, pow20, pow43, PRECALC_SIZE, PSY_NSPSYTUNE, lame_global_struct::psymodel, Q_MAX, Q_MAX2, quantize_init(), SBMAX_l, and SBMAX_s.

Referenced by lame_init_params().

Here is the call graph for this function:

int noquant_count_bits ( lame_internal_flags const *const  gfc,
gr_info *const  cod_info,
calc_noise_data prev_noise 
)

Definition at line 750 of file takehiro.c.

References gr_info::big_values, gr_info::block_type, gr_info::count1, gr_info::count1bits, gr_info::count1table_select, gfc, i, gr_info::l3_enc, gr_info::max_nonzero_coeff, Min, scalefac_struct::s, lame_internal_flags::scalefac_band, calc_noise_data_t::sfb_count1, SHORT_TYPE, t32l, and t33l.

Referenced by count_bits(), and quantizeAndCountBits().

int on_pe ( lame_global_flags const *  gfp,
FLOAT const   pe[2][2],
III_side_info_t const *  l3_side,
int  targ_bits[2],
int  mean_bits,
int  gr,
int  cbr 
)

void quantize_init ( lame_internal_flags *const  gfc  ) 

Definition at line 502 of file takehiro.c.

References gfc, lame_internal_flags::quantization, lame_internal_flags::quantize_lines_xrpow, quantize_lines_xrpow(), and quantize_lines_xrpow_ISO().

Referenced by iteration_init().

Here is the call graph for this function:

void reduce_side ( int  targ_bits[2],
FLOAT  ms_ener_ratio,
int  mean_bits,
int  max_bits 
)

Definition at line 514 of file quantize_pvt.c.

References MAX_BITS_PER_CHANNEL, and MAX_BITS_PER_GRANULE.

Referenced by CBR_iteration_loop(), and VBR_old_prepare().

int scale_bitcount ( gr_info *const  cod_info  ) 

Definition at line 1227 of file takehiro.c.

References all_scalefactors_not_negative(), gr_info::block_type, LARGE_BITS, gr_info::mixed_block_flag, gr_info::part2_length, gr_info::preflag, pretab, gr_info::scalefac, gr_info::scalefac_compress, gr_info::sfbdivide, gr_info::sfbmax, SHORT_TYPE, slen1_n, and slen2_n.

Referenced by balance_noise(), and bitcount().

Here is the call graph for this function:

int scale_bitcount_lsf ( const lame_internal_flags gfp,
gr_info *const  cod_info 
)

Definition at line 1308 of file takehiro.c.

References gr_info::block_type, i, nr_of_sfb_block, gr_info::preflag, gr_info::scalefac, SHORT_TYPE, and window.

Referenced by balance_noise(), and bitcount().

void set_frame_pinfo ( lame_global_flags const *  gfp,
III_psy_ratio const   ratio[2][2] 
)

Definition at line 1060 of file quantize_pvt.c.

References lame_internal_flags::channels_out, gfc, gfp, lame_global_struct::internal_flags, lame_internal_flags::l3_side, lame_internal_flags::masking_lower, memcpy, lame_internal_flags::mode_gr, gr_info::scalefac, set_pinfo(), SFBMAX, and III_side_info_t::tt.

Here is the call graph for this function:


Variable Documentation

FLOAT adj43[PRECALC_SIZE]

Definition at line 179 of file quantize_pvt.c.

Referenced by iteration_init().

FLOAT iipow20[Q_MAX2+1]

FLOAT ipow20[Q_MAX]

Definition at line 173 of file quantize_pvt.c.

Referenced by calc_sfb_noise_ISO(), calc_sfb_noise_x34(), find_lowest_scalefac(), iteration_init(), quantize_ISO(), and quantize_x34().

const int nr_of_sfb_block[6][3][4]

Definition at line 52 of file quantize_pvt.c.

Referenced by scale_bitcount_lsf().

FLOAT pow20[Q_MAX+Q_MAX2+1]

Definition at line 172 of file quantize_pvt.c.

Referenced by calc_sfb_noise_ISO(), calc_sfb_noise_x34(), and iteration_init().

FLOAT pow43[PRECALC_SIZE]

Definition at line 174 of file quantize_pvt.c.

Referenced by calc_noise_core_c(), calc_sfb_noise_ISO(), calc_sfb_noise_x34(), and iteration_init().

const int pretab[SBMAX_l]

Definition at line 87 of file quantize_pvt.c.

Referenced by calc_noise(), checkScalefactor(), inc_scalefac_scale(), long_block_constrain(), quantize_ISO(), quantize_x34(), quantize_xrpow(), scale_bitcount(), set_pinfo(), and set_scalefacs().

const scalefac_struct sfBandIndex[9]

Definition at line 101 of file quantize_pvt.c.

Referenced by lame_init_params().

const int slen1_tab[16]

Definition at line 1048 of file takehiro.c.

Referenced by writeMainData().

const int slen2_tab[16]

Definition at line 1049 of file takehiro.c.

Referenced by writeMainData().


Generated on Sun Dec 2 11:36:54 2007 for LAME by  doxygen 1.5.2