diff dpcm.c @ 3420:54814e15aa3d libavcodec

Mark some read-only datastructures as const. patch by Stefan Huehner, stefan & at & huehner & dot & org
author diego
date Thu, 06 Jul 2006 13:53:07 +0000
parents 0b546eab515d
children c8c591fe26f8
line wrap: on
line diff
--- a/dpcm.c	Thu Jul 06 03:42:51 2006 +0000
+++ b/dpcm.c	Thu Jul 06 13:53:07 2006 +0000
@@ -41,7 +41,7 @@
     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 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,