OSDN Git Service

stagefright aacenc: Add const declarations to some pointers
authorMartin Storsjo <martin@martin.st>
Wed, 22 Dec 2010 21:23:06 +0000 (22:23 +0100)
committerMartin Storsjo <martin@martin.st>
Wed, 18 Jan 2012 06:16:42 +0000 (08:16 +0200)
This avoids some compilation warnings.

Change-Id: Ia89ab94020a9f1ee4c1df48823fb89325cca7d36

media/libstagefright/codecs/aacenc/inc/psy_configuration.h
media/libstagefright/codecs/aacenc/src/dyn_bits.c
media/libstagefright/codecs/aacenc/src/interface.c
media/libstagefright/codecs/aacenc/src/psy_configuration.c
media/libstagefright/codecs/aacenc/src/psy_main.c
media/libstagefright/codecs/aacenc/src/quantize.c

index 9abfc99..f6981fa 100644 (file)
@@ -31,7 +31,7 @@ typedef struct{
 
   Word16 sfbCnt;
   Word16 sfbActive;   /* number of sf bands containing energy after lowpass */
-  Word16 *sfbOffset;
+  const Word16 *sfbOffset;
 
   Word32 sfbThresholdQuiet[MAX_SFB_LONG];
 
@@ -61,7 +61,7 @@ typedef struct{
 
   Word16 sfbCnt;
   Word16 sfbActive;   /* number of sf bands containing energy after lowpass */
-  Word16 *sfbOffset;
+  const Word16 *sfbOffset;
 
   Word32 sfbThresholdQuiet[MAX_SFB_SHORT];
 
index 3d2efdc..7769188 100644 (file)
@@ -281,7 +281,7 @@ noiselessCounter(SECTION_DATA *sectionData,
                  const Word32 blockType)
 {
   Word32 grpNdx, i;
-  Word16 *sideInfoTab = NULL;
+  const Word16 *sideInfoTab = NULL;
   SECTION_INFO *sectionInfo;
 
   /*
index f2472d8..d0ad433 100644 (file)
@@ -99,8 +99,8 @@ void BuildInterface(Word32                  *groupedMdctSpectrum,
     Word32 i;
     Word32 accuSumMS=0;
     Word32 accuSumLR=0;
-       Word32 *pSumMS = sfbEnergySumMS.sfbShort;
-       Word32 *pSumLR = sfbEnergySumLR.sfbShort;
+    const Word32 *pSumMS = sfbEnergySumMS.sfbShort;
+    const Word32 *pSumLR = sfbEnergySumLR.sfbShort;
 
     for (i=TRANS_FAC; i; i--) {
       accuSumLR = L_add(accuSumLR, *pSumLR); pSumLR++;
index 02d92ab..dd40f9b 100644 (file)
@@ -139,7 +139,7 @@ static Word16 BarcLineValue(Word16 noOfLines, Word16 fftLine, Word32 samplingFre
 *
 *****************************************************************************/
 static void initThrQuiet(Word16  numPb,
-                         Word16 *pbOffset,
+                         const Word16 *pbOffset,
                          Word16 *pbBarcVal,
                          Word32 *pbThresholdQuiet) {
   Word16 i;
@@ -250,7 +250,7 @@ static void initSpreading(Word16  numPb,
 *
 *****************************************************************************/
 static void initBarcValues(Word16  numPb,
-                           Word16 *pbOffset,
+                           const Word16 *pbOffset,
                            Word16  numLines,
                            Word32  samplingFrequency,
                            Word16 *pbBval)
index 085acb8..4e9218c 100644 (file)
@@ -658,7 +658,8 @@ static Word16 advancePsychShort(PSY_DATA* psyData,
   Word32 normEnergyShift = (psyData->mdctScale + 1) << 1; /* in reference code, mdct spectrum must be multipied with 2, so +1 */
   Word32 clipEnergy = hPsyConfShort->clipEnergy >> normEnergyShift;
   Word32 wOffset = 0;
-  Word32 *data0, *data1;
+  Word32 *data0;
+  const Word32 *data1;
 
   for(w = 0; w < TRANS_FAC; w++) {
     Word32 i, tdata;
index 54add2f..0d0f550 100644 (file)
@@ -110,7 +110,7 @@ static void quantizeLines(const Word16 gain,
   Word32 m = gain&3;
   Word32 g = (gain >> 2) + 4;
   Word32 mdctSpeL;
-  Word16 *pquat;
+  const Word16 *pquat;
     /* gain&3 */
 
   pquat = quantBorders[m];
@@ -333,7 +333,7 @@ Word32 calcSfbDist(const Word32 *spec,
   Word32 m = gain&3;
   Word32 g = (gain >> 2) + 4;
   Word32 g2 = (g << 1) + 1;
-  Word16 *pquat, *repquat;
+  const Word16 *pquat, *repquat;
     /* gain&3 */
 
   pquat = quantBorders[m];