diff options
author | Nils Wallménius <nils@rockbox.org> | 2011-09-16 14:00:06 +0000 |
---|---|---|
committer | Nils Wallménius <nils@rockbox.org> | 2011-09-16 14:00:06 +0000 |
commit | 769996654b54209f85ab5bdf852e06def713de36 (patch) | |
tree | 7a81d229655cdd4db1e0e41d86813c3524727d52 /apps | |
parent | bcfb2b53eb45710f00f3900773249231b00a28bc (diff) | |
download | rockbox-769996654b54209f85ab5bdf852e06def713de36.tar.gz rockbox-769996654b54209f85ab5bdf852e06def713de36.zip |
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
Diffstat (limited to 'apps')
-rw-r--r-- | apps/codecs/libtremor/backends.h | 6 | ||||
-rw-r--r-- | apps/codecs/libtremor/mapping0.c | 6 |
2 files changed, 7 insertions, 5 deletions
diff --git a/apps/codecs/libtremor/backends.h b/apps/codecs/libtremor/backends.h index 9b63080a6b..e27f1f2b80 100644 --- a/apps/codecs/libtremor/backends.h +++ b/apps/codecs/libtremor/backends.h | |||
@@ -110,7 +110,7 @@ typedef struct{ | |||
110 | 110 | ||
111 | typedef struct vorbis_info_mapping0{ | 111 | typedef struct vorbis_info_mapping0{ |
112 | int submaps; /* <= 16 */ | 112 | int submaps; /* <= 16 */ |
113 | int chmuxlist[256]; /* up to 256 channels in a Vorbis stream */ | 113 | int chmuxlist[CHANNELS]; /* up to 256 channels in a Vorbis stream */ |
114 | 114 | ||
115 | int floorsubmap[16]; /* [mux] submap to floors */ | 115 | int floorsubmap[16]; /* [mux] submap to floors */ |
116 | int residuesubmap[16]; /* [mux] submap to residue */ | 116 | int residuesubmap[16]; /* [mux] submap to residue */ |
@@ -121,8 +121,8 @@ typedef struct vorbis_info_mapping0{ | |||
121 | #endif | 121 | #endif |
122 | 122 | ||
123 | int coupling_steps; | 123 | int coupling_steps; |
124 | int coupling_mag[256]; | 124 | unsigned char coupling_mag[256]; |
125 | int coupling_ang[256]; | 125 | unsigned char coupling_ang[256]; |
126 | } vorbis_info_mapping0; | 126 | } vorbis_info_mapping0; |
127 | 127 | ||
128 | #endif | 128 | #endif |
diff --git a/apps/codecs/libtremor/mapping0.c b/apps/codecs/libtremor/mapping0.c index 9284775718..9042b9c174 100644 --- a/apps/codecs/libtremor/mapping0.c +++ b/apps/codecs/libtremor/mapping0.c | |||
@@ -147,8 +147,10 @@ static vorbis_info_mapping *mapping0_unpack(vorbis_info *vi,oggpack_buffer *opb) | |||
147 | info->coupling_steps=oggpack_read(opb,8)+1; | 147 | info->coupling_steps=oggpack_read(opb,8)+1; |
148 | if(info->coupling_steps<=0)goto err_out; | 148 | if(info->coupling_steps<=0)goto err_out; |
149 | for(i=0;i<info->coupling_steps;i++){ | 149 | for(i=0;i<info->coupling_steps;i++){ |
150 | int testM=info->coupling_mag[i]=oggpack_read(opb,ilog(vi->channels)); | 150 | int testM=oggpack_read(opb,ilog(vi->channels)); |
151 | int testA=info->coupling_ang[i]=oggpack_read(opb,ilog(vi->channels)); | 151 | info->coupling_mag[i]=testM; |
152 | int testA=oggpack_read(opb,ilog(vi->channels)); | ||
153 | info->coupling_ang[i]=testA; | ||
152 | 154 | ||
153 | if(testM<0 || | 155 | if(testM<0 || |
154 | testA<0 || | 156 | testA<0 || |