summaryrefslogtreecommitdiff
path: root/libavcodec/adpcm.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2019-06-19 04:39:47 +0200
committerJames Almer <jamrial@gmail.com>2019-06-20 14:47:46 -0300
commita1a8815220fcb844b645ce32cb1593e744798419 (patch)
treeac23567ed7f1e35b5b23b835f79da3e7f58e69c5 /libavcodec/adpcm.c
parent91f5950f833fd48f12de769374129334f8c6b237 (diff)
libavcodec: Reduce the size of some arrays
This commit uses smaller types for some static const arrays to reduce their size in case the entries can be represented in the smaller type. The biggest savings came from inv_map_table in vp9.c. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/adpcm.c')
-rw-r--r--libavcodec/adpcm.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/adpcm.c b/libavcodec/adpcm.c
index ede0130bf1..e194764374 100644
--- a/libavcodec/adpcm.c
+++ b/libavcodec/adpcm.c
@@ -57,7 +57,7 @@
*/
/* These are for CD-ROM XA ADPCM */
-static const int xa_adpcm_table[5][2] = {
+static const int8_t xa_adpcm_table[5][2] = {
{ 0, 0 },
{ 60, 0 },
{ 115, -52 },
@@ -65,7 +65,7 @@ static const int xa_adpcm_table[5][2] = {
{ 122, -60 }
};
-static const int ea_adpcm_table[] = {
+static const int16_t ea_adpcm_table[] = {
0, 240, 460, 392,
0, 0, -208, -220,
0, 1, 3, 4,
@@ -74,7 +74,7 @@ static const int ea_adpcm_table[] = {
};
// padded to zero where table size is less then 16
-static const int swf_index_tables[4][16] = {
+static const int8_t swf_index_tables[4][16] = {
/*2*/ { -1, 2 },
/*3*/ { -1, -1, 2, 4 },
/*4*/ { -1, -1, -1, -1, 2, 4, 6, 8 },
@@ -484,7 +484,7 @@ static void adpcm_swf_decode(AVCodecContext *avctx, const uint8_t *buf, int buf_
{
ADPCMDecodeContext *c = avctx->priv_data;
GetBitContext gb;
- const int *table;
+ const int8_t *table;
int k0, signmask, nb_bits, count;
int size = buf_size*8;
int i;