Commit 29ed059b authored by Gildas Bazin's avatar Gildas Bazin

Mark tables as static constants. Patch by Diego Flameeyes Pettenò

parent 84e072de
......@@ -548,7 +548,7 @@ static int dca_subframe_header (dca_state_t * state)
/* Scale factors */
for (j = 0; j < state->prim_channels; j++)
{
int *scale_table;
const int *scale_table;
int scale_sum;
for (k = 0; k < state->subband_activity[j]; k++)
......@@ -761,7 +761,7 @@ static int dca_subsubframe (dca_state_t * state)
int k, l;
int subsubframe = state->current_subsubframe;
double *quant_step_table;
const double *quant_step_table;
/* FIXME */
double subband_samples[DCA_PRIM_CHANNELS_MAX][DCA_SUBBANDS][8];
......@@ -1145,7 +1145,7 @@ static void qmf_32_subbands (dca_state_t * state, int chans,
double samples_in[32][8], sample_t *samples_out,
double scale, sample_t bias)
{
double *prCoeff;
const double *prCoeff;
int i, j, k;
double raXin[32];
......@@ -1236,7 +1236,7 @@ static void lfe_interpolation_fir (int nDecimationSelect, int nNumDeciSample,
*/
int nDeciFactor, k, J;
double *prCoeff;
const double *prCoeff;
int NumFIRCoef = 512; /* Number of FIR coefficients */
int nInterpIndex = 0; /* Index to the interpolated samples */
......
......@@ -21,7 +21,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
double fir_32bands_perfect[] =
static const double fir_32bands_perfect[] =
{
+1.135985195E-010,
-6.022448247E-007,
......@@ -537,7 +537,7 @@ double fir_32bands_perfect[] =
-1.135985195E-010
};
double fir_32bands_nonperfect[] =
static const double fir_32bands_nonperfect[] =
{
-1.390191784E-007,
-1.693738625E-007,
......@@ -1053,7 +1053,7 @@ double fir_32bands_nonperfect[] =
+1.390191784E-007
};
double lfe_fir_64[] =
static const double lfe_fir_64[] =
{
2.6584343868307770E-004,
8.1793652498163280E-005,
......@@ -1569,7 +1569,7 @@ double lfe_fir_64[] =
2.6584343868307770E-004
};
double lfe_fir_128[] =
static const double lfe_fir_128[] =
{
0.00053168571,
0.00016358691,
......
This diff is collapsed.
......@@ -21,7 +21,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
int scale_factor_quant6[] =
static const int scale_factor_quant6[] =
{
1, 2, 2, 3, 3, 4, 6, 7,
10, 12, 16, 20, 26, 34, 44, 56,
......@@ -33,7 +33,7 @@ int scale_factor_quant6[] =
1819701, 2344229, 3019952, 3890451, 5011872, 6456542, 8317638, 0
};
int scale_factor_quant7[] =
static const int scale_factor_quant7[] =
{
1, 1, 2, 2, 2, 2, 3, 3,
3, 4, 4, 5, 6, 7, 7, 8,
......@@ -54,7 +54,7 @@ int scale_factor_quant7[] =
};
/* 20bits unsigned fractional binary codes */
int lossy_quant[] =
static const int lossy_quant[] =
{
0, 6710886, 4194304, 3355443, 2474639, 2097152, 1761608, 1426063,
796918, 461373, 251658, 146801, 79692, 46137, 27263, 16777,
......@@ -62,7 +62,7 @@ int lossy_quant[] =
84, 42, 21, 0, 0, 0, 0, 0
};
double lossy_quant_d[] =
static const double lossy_quant_d[] =
{
0, 1.6, 1.0, 0.8, 0.59, 0.50, 0.42, 0.34,
0.19, 0.11, 0.06, 0.035, 0.019, 0.011, 0.0065, 0.0040,
......@@ -71,7 +71,7 @@ double lossy_quant_d[] =
};
/* 20bits unsigned fractional binary codes */
int lossless_quant[] =
static const int lossless_quant[] =
{
0, 4194304, 2097152, 1384120, 1048576, 696254, 524288, 348127,
262144, 131072, 65431, 33026, 16450, 8208, 4100, 2049,
......@@ -79,7 +79,7 @@ int lossless_quant[] =
4, 2, 1, 0, 0, 0, 0, 0
};
double lossless_quant_d[] =
static const double lossless_quant_d[] =
{
0, 1.0, 0.5, 0.33, 0.25, 0.166, 0.125,
0.083, 0.0625, 0.03125, 0.0156, 7.874E-3, 3.922E-3, 1.957E-3,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment