Subversion Repositories Kolibri OS

Rev

Rev 1905 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1905 Rev 3960
Line 1... Line 1...
1
/*
1
/*
2
	layer1.c: the layer 1 decoder
2
	layer1.c: the layer 1 decoder
Line 3... Line 3...
3
 
3
 
4
	copyright 1995-2008 by the mpg123 project - free software under the terms of the LGPL 2.1
4
	copyright 1995-2009 by the mpg123 project - free software under the terms of the LGPL 2.1
5
	see COPYING and AUTHORS files in distribution or http://mpg123.org
5
	see COPYING and AUTHORS files in distribution or http://mpg123.org
Line 6... Line 6...
6
	initially written by Michael Hipp
6
	initially written by Michael Hipp
7
 
7
 
Line 8... Line 8...
8
	may have a few bugs after last optimization ... 
8
	may have a few bugs after last optimization ... 
9
*/
9
*/
Line 10... Line 10...
10
 
10
 
11
#include "mpg123lib_intern.h"
11
#include "mpg123lib_intern.h"
12
#include "getbits.h"
12
#include "getbits.h"
13
 
13
 
Line 14... Line 14...
14
void I_step_one(unsigned int balloc[], unsigned int scale_index[2][SBLIMIT],mpg123_handle *fr)
14
static void I_step_one(unsigned int balloc[], unsigned int scale_index[2][SBLIMIT],mpg123_handle *fr)
Line 53... Line 53...
53
		if ((*ba++))
53
		if ((*ba++))
54
		*sca++ = getbits(fr, 6);
54
		*sca++ = getbits(fr, 6);
55
	}
55
	}
56
}
56
}
Line 57... Line 57...
57
 
57
 
58
void I_step_two(real fraction[2][SBLIMIT],unsigned int balloc[2*SBLIMIT], unsigned int scale_index[2][SBLIMIT],mpg123_handle *fr)
58
static void I_step_two(real fraction[2][SBLIMIT],unsigned int balloc[2*SBLIMIT], unsigned int scale_index[2][SBLIMIT],mpg123_handle *fr)
59
{
59
{
60
	int i,n;
60
	int i,n;
61
	int smpb[2*SBLIMIT]; /* values: 0-65535 */
61
	int smpb[2*SBLIMIT]; /* values: 0-65535 */
62
	int *sample;
62
	int *sample;
Line 127... Line 127...
127
{
127
{
128
	int clip=0;
128
	int clip=0;
129
	int i,stereo = fr->stereo;
129
	int i,stereo = fr->stereo;
130
	unsigned int balloc[2*SBLIMIT];
130
	unsigned int balloc[2*SBLIMIT];
131
	unsigned int scale_index[2][SBLIMIT];
131
	unsigned int scale_index[2][SBLIMIT];
132
	ALIGNED(16) real fraction[2][SBLIMIT];
132
	real (*fraction)[SBLIMIT] = fr->layer1.fraction; /* fraction[2][SBLIMIT] */
133
	int single = fr->single;
133
	int single = fr->single;
Line 134... Line 134...
134
 
134
 
Line 135... Line 135...
135
	fr->jsbound = (fr->mode == MPG_MD_JOINT_STEREO) ? (fr->mode_ext<<2)+4 : 32;
135
	fr->jsbound = (fr->mode == MPG_MD_JOINT_STEREO) ? (fr->mode_ext<<2)+4 : 32;