summaryrefslogtreecommitdiff
path: root/src/demuxers
diff options
context:
space:
mode:
Diffstat (limited to 'src/demuxers')
-rw-r--r--src/demuxers/demux_iff.c4
-rw-r--r--src/demuxers/demux_qt.c2
-rw-r--r--src/demuxers/iff.h7
-rw-r--r--src/demuxers/qtpalette.h6
4 files changed, 10 insertions, 9 deletions
diff --git a/src/demuxers/demux_iff.c b/src/demuxers/demux_iff.c
index cc4df0c85..7ca851718 100644
--- a/src/demuxers/demux_iff.c
+++ b/src/demuxers/demux_iff.c
@@ -148,7 +148,7 @@ typedef struct {
* different decoding deltas
*/
-static int8_t delta_decode_block(int8_t *source, int32_t n, int8_t *dest, int8_t x, int8_t *table) {
+static int8_t delta_decode_block(const int8_t *source, int32_t n, int8_t *dest, int8_t x, const int8_t *table) {
int32_t i;
int lim = n * 2;
@@ -163,7 +163,7 @@ static int8_t delta_decode_block(int8_t *source, int32_t n, int8_t *dest, int8_t
}
/* Decode a complete delta encoded array */
-static void delta_decode(int8_t *dest, int8_t *source, int32_t n, int8_t *table){
+static void delta_decode(int8_t *dest, const int8_t *source, int32_t n, const int8_t *table){
delta_decode_block(&source[2], n-2, dest, source[1], table);
}
diff --git a/src/demuxers/demux_qt.c b/src/demuxers/demux_qt.c
index 6693637c7..f837a2272 100644
--- a/src/demuxers/demux_qt.c
+++ b/src/demuxers/demux_qt.c
@@ -832,7 +832,7 @@ static qt_error parse_trak_atom (qt_trak *trak,
int color_index;
int color_dec;
int color_greyscale;
- unsigned char *color_table;
+ const unsigned char *color_table;
/* initialize trak structure */
trak->edit_list_count = 0;
diff --git a/src/demuxers/iff.h b/src/demuxers/iff.h
index 9d4fb5abe..64f44fd94 100644
--- a/src/demuxers/iff.h
+++ b/src/demuxers/iff.h
@@ -118,7 +118,8 @@
#define HAMBITS_RED 2 /* modify red component */
#define HAMBITS_GREEN 3 /* modify green component */
-int bitplainoffeset[] = { 1, 2, 4, 8,
+static const int bitplainoffeset[] = {
+ 1, 2, 4, 8,
16, 32, 64, 128,
1, 2, 4, 8,
16, 32, 64, 128,
@@ -237,9 +238,9 @@ typedef struct {
#define max_volume 65536 /* Unity = Fixed 1.0 = maximum volume */
-int8_t fibonacci[] = { -34, -21, -13, -8, -5, -3, -2, -1, 0, 1, 2, 3, 5, 8, 13, 21 };
+static const int8_t fibonacci[] = { -34, -21, -13, -8, -5, -3, -2, -1, 0, 1, 2, 3, 5, 8, 13, 21 };
-int8_t exponential[] = { -128, -64, -32, -16, -8, -4, -2, -1, 0, 1, 2, 4, 8, 16, 32, 64 };
+static const int8_t exponential[] = { -128, -64, -32, -16, -8, -4, -2, -1, 0, 1, 2, 4, 8, 16, 32, 64 };
typedef struct {
uint32_t oneShotHiSamples; /* # samples in the high octave 1-shot part */
diff --git a/src/demuxers/qtpalette.h b/src/demuxers/qtpalette.h
index 18b47c697..a8a44e916 100644
--- a/src/demuxers/qtpalette.h
+++ b/src/demuxers/qtpalette.h
@@ -7,14 +7,14 @@
#ifndef QTPALETTE_H
#define QTPALETTE_H
-unsigned char qt_default_palette_4[4 * 4] = {
+static const unsigned char qt_default_palette_4[4 * 4] = {
0x93, 0x65, 0x5E, 0x00,
0xFF, 0xFF, 0xFF, 0x00,
0xDF, 0xD0, 0xAB, 0x00,
0x00, 0x00, 0x00, 0x00
};
-unsigned char qt_default_palette_16[16 * 4] = {
+static const unsigned char qt_default_palette_16[16 * 4] = {
0xFF, 0xFB, 0xFF, 0x00,
0xEF, 0xD9, 0xBB, 0x00,
0xE8, 0xC9, 0xB1, 0x00,
@@ -33,7 +33,7 @@ unsigned char qt_default_palette_16[16 * 4] = {
0x00, 0x00, 0x00, 0x00
};
-unsigned char qt_default_palette_256[256 * 4] = {
+static const unsigned char qt_default_palette_256[256 * 4] = {
/* 0, 0x00 */ 0xFF, 0xFF, 0xFF, 0x00,
/* 1, 0x01 */ 0xFF, 0xFF, 0xCC, 0x00,
/* 2, 0x02 */ 0xFF, 0xFF, 0x99, 0x00,