1 int encode_init(frame_info
*frame
);
2 void scalefactor_calc_new (double sb_sample
[][3][SCALE_BLOCK
][SBLIMIT
],
3 unsigned int scalar
[][3][SBLIMIT
], int nch
,
6 INLINE
double mod (double a
);
8 void combine_LR_new (double sb_sample
[2][3][SCALE_BLOCK
][SBLIMIT
],
9 double joint_sample
[3][SCALE_BLOCK
][SBLIMIT
], int sblimit
);
11 void find_sf_max (unsigned int sf_index
[2][3][SBLIMIT
], frame_info
* frame
,
12 double sf_max
[2][SBLIMIT
]);
14 void sf_transmission_pattern (unsigned int sf_index
[2][3][SBLIMIT
],
15 unsigned int sf_selectinfo
[2][SBLIMIT
],
18 void write_header (frame_info
* frame
, Bit_stream_struc
* bs
);
20 void write_bit_alloc (unsigned int bit_alloc
[2][SBLIMIT
],
21 frame_info
* frame
, Bit_stream_struc
* bs
);
23 void write_scalefactors (unsigned int bit_alloc
[2][SBLIMIT
],
24 unsigned int sf_selectinfo
[2][SBLIMIT
],
25 unsigned int scalar
[2][3][SBLIMIT
], frame_info
* frame
,
26 Bit_stream_struc
* bs
);
28 void subband_quantization_new (unsigned int sf_index
[2][3][SBLIMIT
],
29 double sb_samples
[2][3][SCALE_BLOCK
][SBLIMIT
],
30 unsigned int j_scale
[3][SBLIMIT
],
31 double j_samps
[3][SCALE_BLOCK
][SBLIMIT
],
32 unsigned int bit_alloc
[2][SBLIMIT
],
33 unsigned int sbband
[2][3][SCALE_BLOCK
][SBLIMIT
],
36 void write_samples_new (unsigned int sbband
[2][3][SCALE_BLOCK
][SBLIMIT
],
37 unsigned int bit_alloc
[2][SBLIMIT
],
38 frame_info
* frame
, Bit_stream_struc
* bs
);
40 /*******************************************************
42 ******************************************************/
44 int bits_for_nonoise_new (double SMR
[2][SBLIMIT
],
45 unsigned int scfsi
[2][SBLIMIT
], frame_info
* frame
, float min_mnr
,
46 unsigned int bit_alloc
[2][SBLIMIT
]);
47 void main_bit_allocation_new (double SMR
[2][SBLIMIT
],
48 unsigned int scfsi
[2][SBLIMIT
],
49 unsigned int bit_alloc
[2][SBLIMIT
], int *adb
,
50 frame_info
* frame
, options
* glopts
);
51 void VBR_maxmnr_new (double mnr
[2][SBLIMIT
], char used
[2][SBLIMIT
], int sblimit
,
52 int nch
, int *min_sb
, int *min_ch
, options
* glopts
);
54 VBR_bit_allocation_new (double SMR
[2][SBLIMIT
],
55 unsigned int scfsi
[2][SBLIMIT
],
56 unsigned int bit_alloc
[2][SBLIMIT
], int *adb
,
57 frame_info
* frame
, options
* glopts
);
58 void maxmnr_new (double mnr
[2][SBLIMIT
], char used
[2][SBLIMIT
], int sblimit
,
59 int nch
, int *min_sb
, int *min_ch
);
60 int a_bit_allocation_new (double SMR
[2][SBLIMIT
],
61 unsigned int scfsi
[2][SBLIMIT
],
62 unsigned int bit_alloc
[2][SBLIMIT
], int *adb
,