public class QuantizePVT
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
float[] |
adj43 |
float[] |
ipow20 |
static int |
IXMAX_VAL
ix always <= 8191+15.
|
static int |
LARGE_BITS |
int[][][] |
nr_of_sfb_block
The following table is used to implement the scalefactor partitioning for
MPEG2 as described in section 2.4.3.2 of the IS.
|
float[] |
pow20 |
float[] |
pow43 |
int[] |
pretab
Table B.6: layer3 preemphasis
|
static int |
Q_MAX2
minimum possible number of
-cod_info.global_gain + ((scalefac[] + (cod_info.preflag ? pretab[sfb] : 0))
<< (cod_info.scalefac_scale + 1)) + cod_info.subblock_gain[cod_info.window[sfb]] * 8;
for long block, 0+((15+3)<<2) = 18*4 = 72
for short block, 0+(15<<2)+7*8 = 15*4+56 = 116
|
ScaleFac[] |
sfBandIndex
Here are MPEG1 Table B.8 and MPEG2 Table B.1 -- Layer III scalefactor
bands.
|
| Constructor and Description |
|---|
QuantizePVT() |
| Modifier and Type | Method and Description |
|---|---|
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
|
int |
calc_noise(GrInfo cod_info,
float[] l3_xmin,
float[] distort,
CalcNoiseResult res,
CalcNoiseData prev_noise)
-oo dB => -1.00
- 6 dB => -0.97
- 3 dB => -0.80
- 2 dB => -0.64
- 1 dB => -0.38
0 dB => 0.00
+ 1 dB => +0.49
+ 2 dB => +1.06
+ 3 dB => +1.68
+ 6 dB => +3.69
+10 dB => +6.45
|
int |
calc_xmin(LameGlobalFlags gfp,
III_psy_ratio ratio,
GrInfo cod_info,
float[] pxmin)
Calculate the allowed distortion for each scalefactor band, as determined
by the psychoacoustic model.
|
float |
IPOW20(int x) |
void |
iteration_init(LameGlobalFlags gfp)
initialization for iteration_loop
|
int |
on_pe(LameGlobalFlags gfp,
float[][] pe,
int[] targ_bits,
int mean_bits,
int gr,
int cbr)
allocate bits among 2 channels based on PE
mt 6/99 bugfixes rh 8/01: often allocated more than the allowed 4095 bits |
float |
POW20(int x) |
void |
reduce_side(int[] targ_bits,
float ms_ener_ratio,
int mean_bits,
int max_bits) |
void |
set_frame_pinfo(LameGlobalFlags gfp,
III_psy_ratio[][] ratio)
updates plotting data for a whole frame
Robert Hegemann 2000-10-21
|
void |
setModules(Takehiro tk,
Reservoir rv,
PsyModel psy) |
public static final int IXMAX_VAL
public static final int Q_MAX2
minimum possible number of
-cod_info.global_gain + ((scalefac[] + (cod_info.preflag ? pretab[sfb] : 0))
<< (cod_info.scalefac_scale + 1)) + cod_info.subblock_gain[cod_info.window[sfb]] * 8;
for long block, 0+((15+3)<<2) = 18*4 = 72
for short block, 0+(15<<2)+7*8 = 15*4+56 = 116
public static final int LARGE_BITS
public final int[][][] nr_of_sfb_block
public final int[] pretab
public final ScaleFac[] sfBandIndex
public float[] pow20
public float[] ipow20
public float[] pow43
public float[] adj43
public final float POW20(int x)
public final float IPOW20(int x)
public final void iteration_init(LameGlobalFlags gfp)
public final int on_pe(LameGlobalFlags gfp, float[][] pe, int[] targ_bits, int mean_bits, int gr, int cbr)
public final void reduce_side(int[] targ_bits,
float ms_ener_ratio,
int mean_bits,
int max_bits)
public final float athAdjust(float a,
float x,
float athFloor)
public final int calc_xmin(LameGlobalFlags gfp, III_psy_ratio ratio, GrInfo cod_info, float[] pxmin)
public final int calc_noise(GrInfo cod_info, float[] l3_xmin, float[] distort, CalcNoiseResult res, CalcNoiseData prev_noise)
-oo dB => -1.00 - 6 dB => -0.97 - 3 dB => -0.80 - 2 dB => -0.64 - 1 dB => -0.38 0 dB => 0.00 + 1 dB => +0.49 + 2 dB => +1.06 + 3 dB => +1.68 + 6 dB => +3.69 +10 dB => +6.45
public final void set_frame_pinfo(LameGlobalFlags gfp, III_psy_ratio[][] ratio)