Mark some read-only datastructures as const.
patch by Stefan Huehner, stefan & at & huehner & dot & org Originally committed as revision 5639 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
committed by
Diego Biurrun
parent
0540cad324
commit
62a05b5b00
@@ -41,7 +41,7 @@ typedef struct DPCMContext {
|
||||
int channels;
|
||||
short roq_square_array[256];
|
||||
long sample[2];//for SOL_DPCM
|
||||
int *sol_table;//for SOL_DPCM
|
||||
const int *sol_table;//for SOL_DPCM
|
||||
} DPCMContext;
|
||||
|
||||
#define SATURATE_S16(x) if (x < -32768) x = -32768; \
|
||||
@@ -84,15 +84,15 @@ static int interplay_delta_table[] = {
|
||||
|
||||
};
|
||||
|
||||
static int sol_table_old[16] =
|
||||
static const int sol_table_old[16] =
|
||||
{ 0x0, 0x1, 0x2 , 0x3, 0x6, 0xA, 0xF, 0x15,
|
||||
-0x15, -0xF, -0xA, -0x6, -0x3, -0x2, -0x1, 0x0};
|
||||
|
||||
static int sol_table_new[16] =
|
||||
static const int sol_table_new[16] =
|
||||
{ 0x0, 0x1, 0x2, 0x3, 0x6, 0xA, 0xF, 0x15,
|
||||
0x0, -0x1, -0x2, -0x3, -0x6, -0xA, -0xF, -0x15};
|
||||
|
||||
static int sol_table_16[128] = {
|
||||
static const int sol_table_16[128] = {
|
||||
0x000, 0x008, 0x010, 0x020, 0x030, 0x040, 0x050, 0x060, 0x070, 0x080,
|
||||
0x090, 0x0A0, 0x0B0, 0x0C0, 0x0D0, 0x0E0, 0x0F0, 0x100, 0x110, 0x120,
|
||||
0x130, 0x140, 0x150, 0x160, 0x170, 0x180, 0x190, 0x1A0, 0x1B0, 0x1C0,
|
||||
|
||||
Reference in New Issue
Block a user