OSDN Git Service

aacenc: Mark some global arrays const
authorMartin Storsjo <martin@martin.st>
Sun, 9 Sep 2012 13:33:52 +0000 (16:33 +0300)
committerMartin Storsjo <martin@martin.st>
Sun, 9 Sep 2012 13:34:56 +0000 (16:34 +0300)
This gets rid of initialized writeable data in the library.

Change-Id: I7c1cbeb3df10c302b645b7311591ead87a289ca1

media/libstagefright/codecs/aacenc/inc/aac_rom.h
media/libstagefright/codecs/aacenc/src/aac_rom.c
media/libstagefright/codecs/aacenc/src/block_switch.c

index 8e206b7..0b6f656 100644 (file)
@@ -57,7 +57,7 @@ extern const Word32 mTab_4_3[512];
 /*! $2^{-\frac{n}{16}}$ table */
 extern const Word16 pow2tominusNover16[17] ;
 
-extern Word32 specExpMantTableComb_enc[4][14];
+extern const Word32 specExpMantTableComb_enc[4][14];
 extern const UWord8 specExpTableComb_enc[4][14];
 
 extern const Word16 quantBorders[4][4];
index 127322d..f08f3a9 100644 (file)
@@ -1367,7 +1367,7 @@ const Word16 sideInfoTabShort[MAX_SFB_SHORT + 1] = {
   10, 10, 10, 10, 10, 13, 13
 };
 
-Word32 specExpMantTableComb_enc[4][14] =
+const Word32 specExpMantTableComb_enc[4][14] =
 {
   {0x40000000,  0x50a28be6,  0x6597fa95,  0x40000000,
    0x50a28be6,  0x6597fa95,  0x40000000,  0x50a28be6,
index 47fd15e..c80538f 100644 (file)
@@ -51,7 +51,7 @@ CalcWindowEnergy(BLOCK_SWITCHING_CONTROL *blockSwitchingControl,
 /*
   IIR high pass coeffs
 */
-Word32 hiPassCoeff[BLOCK_SWITCHING_IIR_LEN] = {
+const Word32 hiPassCoeff[BLOCK_SWITCHING_IIR_LEN] = {
   0xbec8b439, 0x609d4952  /* -0.5095f, 0.7548f */
 };