summaryrefslogtreecommitdiff
path: root/apps/codecs/mp3_enc.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/codecs/mp3_enc.c')
-rw-r--r--apps/codecs/mp3_enc.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/apps/codecs/mp3_enc.c b/apps/codecs/mp3_enc.c
index 18aa1bfe1a..94d4c2a5f3 100644
--- a/apps/codecs/mp3_enc.c
+++ b/apps/codecs/mp3_enc.c
@@ -1156,7 +1156,7 @@ void putbits(uint32_t val, uint32_t nbit)
1156/* of the Huffman tables as defined in the IS (Table B.7), and will not */ 1156/* of the Huffman tables as defined in the IS (Table B.7), and will not */
1157/* work with any arbitrary tables. */ 1157/* work with any arbitrary tables. */
1158/***************************************************************************/ 1158/***************************************************************************/
1159int choose_table( short *ix, uint32_t begin, uint32_t end, int *bits ) 1159static int choose_table( short *ix, uint32_t begin, uint32_t end, int *bits )
1160{ 1160{
1161 uint32_t i; 1161 uint32_t i;
1162 int max, table0, table1; 1162 int max, table0, table1;
@@ -1301,7 +1301,7 @@ int count_bigv(short *ix, uint32_t start, uint32_t end, int table0,
1301/* Function: Calculation of rzero, count1, address3 */ 1301/* Function: Calculation of rzero, count1, address3 */
1302/* (Partitions ix into big values, quadruples and zeros). */ 1302/* (Partitions ix into big values, quadruples and zeros). */
1303/*************************************************************************/ 1303/*************************************************************************/
1304int calc_runlen( short *ix, side_info_t *si ) 1304static int calc_runlen( short *ix, side_info_t *si )
1305{ 1305{
1306 int p, i, sum = 0; 1306 int p, i, sum = 0;
1307 1307
@@ -1347,7 +1347,7 @@ int calc_runlen( short *ix, side_info_t *si )
1347/*************************************************************************/ 1347/*************************************************************************/
1348/* Function: Quantization of the vector xr ( -> ix) */ 1348/* Function: Quantization of the vector xr ( -> ix) */
1349/*************************************************************************/ 1349/*************************************************************************/
1350int quantize_int(int *xr, short *ix, side_info_t *si) 1350static int quantize_int(int *xr, short *ix, side_info_t *si)
1351{ 1351{
1352 unsigned int i, idx, s, frac_pow[] = { 0x10000, 0xd745, 0xb505, 0x9838 }; 1352 unsigned int i, idx, s, frac_pow[] = { 0x10000, 0xd745, 0xb505, 0x9838 };
1353 1353
@@ -1379,7 +1379,7 @@ int quantize_int(int *xr, short *ix, side_info_t *si)
1379/*************************************************************************/ 1379/*************************************************************************/
1380/* subdivides the bigvalue region which will use separate Huffman tables */ 1380/* subdivides the bigvalue region which will use separate Huffman tables */
1381/*************************************************************************/ 1381/*************************************************************************/
1382void subdivide(side_info_t *si) 1382static void subdivide(side_info_t *si)
1383{ 1383{
1384 int scfb, count0, count1; 1384 int scfb, count0, count1;
1385 1385
@@ -1407,7 +1407,7 @@ void subdivide(side_info_t *si)
1407/*******************************************************************/ 1407/*******************************************************************/
1408/* Count the number of bits necessary to code the bigvalues region */ 1408/* Count the number of bits necessary to code the bigvalues region */
1409/*******************************************************************/ 1409/*******************************************************************/
1410int bigv_bitcount(short *ix, side_info_t *gi) 1410static int bigv_bitcount(short *ix, side_info_t *gi)
1411{ 1411{
1412 int b1=0, b2=0, b3=0; 1412 int b1=0, b2=0, b3=0;
1413 1413
@@ -1428,7 +1428,7 @@ int bigv_bitcount(short *ix, side_info_t *gi)
1428 return b1+b2+b3; 1428 return b1+b2+b3;
1429} 1429}
1430 1430
1431int quantize_and_count_bits(int *xr, short *ix, side_info_t *si) 1431static int quantize_and_count_bits(int *xr, short *ix, side_info_t *si)
1432{ 1432{
1433 int bits = 10000; 1433 int bits = 10000;
1434 1434
@@ -1445,7 +1445,7 @@ int quantize_and_count_bits(int *xr, short *ix, side_info_t *si)
1445/************************************************************************/ 1445/************************************************************************/
1446/* The code selects the best quantStep for a particular set of scalefacs*/ 1446/* The code selects the best quantStep for a particular set of scalefacs*/
1447/************************************************************************/ 1447/************************************************************************/
1448int inner_loop(int *xr, int max_bits, side_info_t *si) 1448static int inner_loop(int *xr, int max_bits, side_info_t *si)
1449{ 1449{
1450 int bits; 1450 int bits;
1451 1451
@@ -1469,7 +1469,7 @@ int inner_loop(int *xr, int max_bits, side_info_t *si)
1469 return bits; 1469 return bits;
1470} 1470}
1471 1471
1472void iteration_loop(int *xr, side_info_t *si, int gr_cnt) 1472static void iteration_loop(int *xr, side_info_t *si, int gr_cnt)
1473{ 1473{
1474 int remain, tar_bits, max_bits = cfg.mean_bits; 1474 int remain, tar_bits, max_bits = cfg.mean_bits;
1475 1475
@@ -1971,10 +1971,10 @@ static int find_samplerate_index(long freq, int *mp3_type)
1971 return i; 1971 return i;
1972} 1972}
1973 1973
1974bool init_mp3_encoder_engine(int sample_rate, 1974static bool init_mp3_encoder_engine(int sample_rate,
1975 int num_channels, 1975 int num_channels,
1976 int rec_mono_mode, 1976 int rec_mono_mode,
1977 struct encoder_config *enc_cfg) 1977 struct encoder_config *enc_cfg)
1978{ 1978{
1979 const bool stereo = num_channels > 1; 1979 const bool stereo = num_channels > 1;
1980 uint32_t avg_byte_per_frame; 1980 uint32_t avg_byte_per_frame;
@@ -2157,7 +2157,7 @@ static inline void byte_swap_frame32(uint32_t *dst, uint32_t *src,
2157} /* byte_swap_frame32 */ 2157} /* byte_swap_frame32 */
2158#endif /* ROCKBOX_LITTLE_ENDIAN */ 2158#endif /* ROCKBOX_LITTLE_ENDIAN */
2159 2159
2160void set_scale_facs(int *mdct_freq) 2160static void set_scale_facs(int *mdct_freq)
2161{ 2161{
2162 unsigned int i, is, ie, k, s; 2162 unsigned int i, is, ie, k, s;
2163 int max_freq_val, avrg_freq_val; 2163 int max_freq_val, avrg_freq_val;