#include <config.h>
#include "lame.h"
#include "machine.h"
#include "encoder.h"
#include "util.h"
#include "quantize_pvt.h"
#include "tables.h"
Include dependency graph for takehiro.c:
Go to the source code of this file.
Defines | |
#define | XRPOW_FTOI(src, dest) ((dest) = (int)(src)) |
#define | QUANTFAC(rx) adj43[rx] |
#define | ROUNDFAC 0.4054 |
Functions | |
void | quantize_lines_xrpow_01 (int l, FLOAT istep, const FLOAT *xr, int *ix) |
void | quantize_lines_xrpow (int l, FLOAT istep, const FLOAT *xr, int *ix) |
void | quantize_lines_xrpow_ISO (int l, FLOAT istep, const FLOAT *xr, int *ix) |
static void | quantize_xrpow (const FLOAT *xp, int *pi, FLOAT istep, gr_info const *const cod_info, calc_noise_data const *prev_noise, lame_internal_flags const *const gfc) |
void | quantize_init (lame_internal_flags *const gfc) |
int | ix_max (const int *ix, const int *end) |
int | count_bit_ESC (const int *ix, const int *const end, int t1, const int t2, int *const s) |
static int | count_bit_noESC (const int *ix, const int *const end, int *const s) |
static int | count_bit_noESC_from2 (const int *ix, const int *const end, int t1, int *const s) |
static int | count_bit_noESC_from3 (const int *ix, const int *const end, int t1, int *const s) |
static int | choose_table_nonMMX (const int *ix, const int *const end, int *const s) |
int | noquant_count_bits (lame_internal_flags const *const gfc, gr_info *const gi, calc_noise_data *prev_noise) |
int | count_bits (lame_internal_flags const *const gfc, const FLOAT *const xr, gr_info *const gi, calc_noise_data *prev_noise) |
static void | recalc_divide_init (const lame_internal_flags *const gfc, gr_info const *cod_info, int const *const ix, int r01_bits[], int r01_div[], int r0_tbl[], int r1_tbl[]) |
static void | recalc_divide_sub (const lame_internal_flags *const gfc, const gr_info *cod_info2, gr_info *const gi, const int *const ix, const int r01_bits[], const int r01_div[], const int r0_tbl[], const int r1_tbl[]) |
void | best_huffman_divide (const lame_internal_flags *const gfc, gr_info *const gi) |
static void | scfsi_calc (int ch, III_side_info_t *l3_side) |
void | best_scalefac_store (const lame_internal_flags *gfc, const int gr, const int ch, III_side_info_t *const l3_side) |
static int | all_scalefactors_not_negative (int const *scalefac, int n) |
int | scale_bitcount (gr_info *const cod_info) |
int | scale_bitcount_lsf (const lame_internal_flags *gfc, gr_info *const cod_info) |
void | huffman_init (lame_internal_flags *const gfc) |
Variables | |
struct { | |
const int region0_count | |
const int region1_count | |
} | subdv_table [23] |
static const int | slen1_n [16] = { 1, 1, 1, 1, 8, 2, 2, 2, 4, 4, 4, 8, 8, 8, 16, 16 } |
static const int | slen2_n [16] = { 1, 2, 4, 8, 1, 2, 4, 8, 2, 4, 8, 2, 4, 8, 4, 8 } |
const int | slen1_tab [16] = { 0, 0, 0, 0, 3, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4 } |
const int | slen2_tab [16] = { 0, 1, 2, 3, 0, 1, 2, 3, 1, 2, 3, 1, 2, 3, 2, 3 } |
static const int | scale_short [16] |
static const int | scale_mixed [16] |
static const int | scale_long [16] |
static const int | max_range_sfac_tab [6][4] |
#define QUANTFAC | ( | rx | ) | adj43[rx] |
Definition at line 255 of file takehiro.c.
Referenced by k_34_2(), k_34_4(), and quantize_lines_xrpow().
#define ROUNDFAC 0.4054 |
Definition at line 256 of file takehiro.c.
Referenced by k_iso_2(), k_iso_4(), and quantize_lines_xrpow_ISO().
#define XRPOW_FTOI | ( | src, | |||
dest | ) | ((dest) = (int)(src)) |
Definition at line 254 of file takehiro.c.
Referenced by k_34_2(), k_34_4(), quantize_lines_xrpow(), and quantize_lines_xrpow_ISO().
static int all_scalefactors_not_negative | ( | int const * | scalefac, | |
int | n | |||
) | [static] |
void best_huffman_divide | ( | const lame_internal_flags *const | gfc, | |
gr_info *const | gi | |||
) |
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().
static int choose_table_nonMMX | ( | const int * | ix, | |
const int *const | end, | |||
int *const | s | |||
) | [static] |
Definition at line 687 of file takehiro.c.
References count_bit_ESC(), count_bit_noESC(), count_bit_noESC_from2(), count_bit_noESC_from3(), ht, ix_max(), IXMAX_VAL, and LARGE_BITS.
Referenced by huffman_init().
Here is the call graph for this function:
int count_bit_ESC | ( | const int * | ix, | |
const int *const | end, | |||
int | t1, | |||
const int | t2, | |||
int *const | s | |||
) |
static int count_bit_noESC | ( | const int * | ix, | |
const int *const | end, | |||
int *const | s | |||
) | [inline, static] |
static int count_bit_noESC_from2 | ( | const int * | ix, | |
const int *const | end, | |||
int | t1, | |||
int *const | s | |||
) | [inline, static] |
Definition at line 607 of file takehiro.c.
References ht, table23, and table56.
Referenced by choose_table_nonMMX().
static int count_bit_noESC_from3 | ( | const int * | ix, | |
const int *const | end, | |||
int | t1, | |||
int *const | s | |||
) | [inline, static] |
int count_bits | ( | lame_internal_flags const *const | gfc, | |
const FLOAT *const | xr, | |||
gr_info *const | gi, | |||
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:
int ix_max | ( | const int * | ix, | |
const int * | end | |||
) |
int noquant_count_bits | ( | lame_internal_flags const *const | gfc, | |
gr_info *const | gi, | |||
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().
void quantize_init | ( | lame_internal_flags *const | gfc | ) |
Definition at line 502 of file takehiro.c.
References gfc, lame_internal_flags::quantization, quantize_lines_xrpow(), lame_internal_flags::quantize_lines_xrpow, and quantize_lines_xrpow_ISO().
Referenced by iteration_init().
Here is the call graph for this function:
Definition at line 260 of file takehiro.c.
References QUANTFAC, and XRPOW_FTOI.
Referenced by quantize_init().
Definition at line 309 of file takehiro.c.
References ROUNDFAC, and XRPOW_FTOI.
Referenced by quantize_init().
static void quantize_xrpow | ( | const FLOAT * | xp, | |
int * | pi, | |||
FLOAT | istep, | |||
gr_info const *const | cod_info, | |||
calc_noise_data const * | prev_noise, | |||
lame_internal_flags const *const | gfc | |||
) | [static] |
Definition at line 364 of file takehiro.c.
References gr_info::block_type, gfc, calc_noise_data_t::global_gain, gr_info::global_gain, gr_info::max_nonzero_coeff, NORM_TYPE, gr_info::preflag, pretab, lame_internal_flags::quantize_lines_xrpow, quantize_lines_xrpow_01(), gr_info::scalefac, gr_info::scalefac_scale, calc_noise_data_t::sfb_count1, SHORT_TYPE, calc_noise_data_t::step, gr_info::subblock_gain, gr_info::width, and gr_info::window.
Referenced by count_bits().
Here is the call graph for this function:
static void recalc_divide_init | ( | const lame_internal_flags *const | gfc, | |
gr_info const * | cod_info, | |||
int const *const | ix, | |||
int | r01_bits[], | |||
int | r01_div[], | |||
int | r0_tbl[], | |||
int | r1_tbl[] | |||
) | [inline, static] |
Definition at line 898 of file takehiro.c.
References gr_info::big_values, lame_internal_flags::choose_table, gfc, scalefac_struct::l, LARGE_BITS, and lame_internal_flags::scalefac_band.
Referenced by best_huffman_divide().
static void recalc_divide_sub | ( | const lame_internal_flags *const | gfc, | |
const gr_info * | cod_info2, | |||
gr_info *const | gi, | |||
const int *const | ix, | |||
const int | r01_bits[], | |||
const int | r01_div[], | |||
const int | r0_tbl[], | |||
const int | r1_tbl[] | |||
) | [inline, static] |
Definition at line 936 of file takehiro.c.
References gr_info::big_values, lame_internal_flags::choose_table, gr_info::count1bits, gfc, scalefac_struct::l, memcpy, gr_info::part2_3_length, gr_info::region0_count, gr_info::region1_count, SBMAX_l, lame_internal_flags::scalefac_band, and gr_info::table_select.
Referenced by best_huffman_divide().
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 * | gfc, | |
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().
static void scfsi_calc | ( | int | ch, | |
III_side_info_t * | l3_side | |||
) | [static] |
Definition at line 1052 of file takehiro.c.
References i, gr_info::part2_length, SBPSY_l, gr_info::scalefac, gr_info::scalefac_compress, III_side_info_t::scfsi, scfsi_band, and III_side_info_t::tt.
const int max_range_sfac_tab[6][4] [static] |
Initial value:
{ {15, 15, 7, 7}, {15, 15, 7, 0}, {7, 3, 0, 0}, {15, 31, 31, 0}, {7, 7, 7, 0}, {3, 3, 0, 0} }
Definition at line 1285 of file takehiro.c.
const int region0_count |
const int region1_count |
const int scale_long[16] [static] |
Initial value:
{ 0, 10, 20, 30, 33, 21, 31, 41, 32, 42, 52, 43, 53, 63, 64, 74 }
Definition at line 1215 of file takehiro.c.
const int scale_mixed[16] [static] |
Initial value:
{ 0, 18, 36, 54, 51, 35, 53, 71, 52, 70, 88, 69, 87, 105, 104, 122 }
Definition at line 1210 of file takehiro.c.
const int scale_short[16] [static] |
Initial value:
{ 0, 18, 36, 54, 54, 36, 54, 72, 54, 72, 90, 72, 90, 108, 108, 126 }
Definition at line 1205 of file takehiro.c.
const int slen1_n[16] = { 1, 1, 1, 1, 8, 2, 2, 2, 4, 4, 4, 8, 8, 8, 16, 16 } [static] |
const int slen1_tab[16] = { 0, 0, 0, 0, 3, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4 } |
const int slen2_n[16] = { 1, 2, 4, 8, 1, 2, 4, 8, 2, 4, 8, 2, 4, 8, 4, 8 } [static] |
const int slen2_tab[16] = { 0, 1, 2, 3, 0, 1, 2, 3, 1, 2, 3, 1, 2, 3, 2, 3 } |
struct { ... } subdv_table[23] [static] |
Referenced by huffman_init().