libtremor: save a kB or two limiting an array size to the maximum number of channels we support and using a shorter type for another. No speed diff.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30559 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
bcfb2b53eb
commit
769996654b
2 changed files with 7 additions and 5 deletions
|
@ -110,7 +110,7 @@ typedef struct{
|
|||
|
||||
typedef struct vorbis_info_mapping0{
|
||||
int submaps; /* <= 16 */
|
||||
int chmuxlist[256]; /* up to 256 channels in a Vorbis stream */
|
||||
int chmuxlist[CHANNELS]; /* up to 256 channels in a Vorbis stream */
|
||||
|
||||
int floorsubmap[16]; /* [mux] submap to floors */
|
||||
int residuesubmap[16]; /* [mux] submap to residue */
|
||||
|
@ -121,8 +121,8 @@ typedef struct vorbis_info_mapping0{
|
|||
#endif
|
||||
|
||||
int coupling_steps;
|
||||
int coupling_mag[256];
|
||||
int coupling_ang[256];
|
||||
unsigned char coupling_mag[256];
|
||||
unsigned char coupling_ang[256];
|
||||
} vorbis_info_mapping0;
|
||||
|
||||
#endif
|
||||
|
|
|
@ -147,8 +147,10 @@ static vorbis_info_mapping *mapping0_unpack(vorbis_info *vi,oggpack_buffer *opb)
|
|||
info->coupling_steps=oggpack_read(opb,8)+1;
|
||||
if(info->coupling_steps<=0)goto err_out;
|
||||
for(i=0;i<info->coupling_steps;i++){
|
||||
int testM=info->coupling_mag[i]=oggpack_read(opb,ilog(vi->channels));
|
||||
int testA=info->coupling_ang[i]=oggpack_read(opb,ilog(vi->channels));
|
||||
int testM=oggpack_read(opb,ilog(vi->channels));
|
||||
info->coupling_mag[i]=testM;
|
||||
int testA=oggpack_read(opb,ilog(vi->channels));
|
||||
info->coupling_ang[i]=testA;
|
||||
|
||||
if(testM<0 ||
|
||||
testA<0 ||
|
||||
|
|
Loading…
Reference in a new issue