aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorStefan Huehner <stefan@huehner.org>2006-06-18 11:33:14 +0000
committerDiego Biurrun <diego@biurrun.de>2006-06-18 11:33:14 +0000
commit7b49ce2e344a5f8864d8365d57f3c6c743f0c8f7 (patch)
tree12c908af01e95ca2df7f4ca20be592871527577e /libavcodec
parent3b9bee88891d1c170eb42d1ef51c5cd7f19b5ba5 (diff)
downloadffmpeg-7b49ce2e344a5f8864d8365d57f3c6c743f0c8f7.tar.gz
Add const to (mostly) char* and make some functions static, which aren't used
outside their declaring source file and which have no corresponding prototype. patch by Stefan Huehner stefan^^@^^huehner^^.^^org Originally committed as revision 5497 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/alac.c2
-rw-r--r--libavcodec/png.c2
-rw-r--r--libavcodec/resample2.c2
-rw-r--r--libavcodec/truespeech.c12
4 files changed, 10 insertions, 8 deletions
diff --git a/libavcodec/alac.c b/libavcodec/alac.c
index 2dc1a48559..8bd75e5d90 100644
--- a/libavcodec/alac.c
+++ b/libavcodec/alac.c
@@ -407,7 +407,7 @@ static void predictor_decompress_fir_adapt(int32_t *error_buffer,
}
}
-void deinterlace_16(int32_t *buffer_a, int32_t *buffer_b,
+static void deinterlace_16(int32_t *buffer_a, int32_t *buffer_b,
int16_t *buffer_out,
int numchannels, int numsamples,
uint8_t interlacing_shift,
diff --git a/libavcodec/png.c b/libavcodec/png.c
index c96638c2d8..efe4cdf4ff 100644
--- a/libavcodec/png.c
+++ b/libavcodec/png.c
@@ -346,7 +346,7 @@ static void convert_from_rgba32(uint8_t *dst, const uint8_t *src, int width)
d = dst;
for(j = 0; j < width; j++) {
- v = ((uint32_t *)src)[j];
+ v = ((const uint32_t *)src)[j];
d[0] = v >> 16;
d[1] = v >> 8;
d[2] = v;
diff --git a/libavcodec/resample2.c b/libavcodec/resample2.c
index 735f612d16..11da57651f 100644
--- a/libavcodec/resample2.c
+++ b/libavcodec/resample2.c
@@ -62,7 +62,7 @@ typedef struct AVResampleContext{
/**
* 0th order modified bessel function of the first kind.
*/
-double bessel(double x){
+static double bessel(double x){
double v=1;
double t=1;
int i;
diff --git a/libavcodec/truespeech.c b/libavcodec/truespeech.c
index 71b3297b66..dbd29b38f5 100644
--- a/libavcodec/truespeech.c
+++ b/libavcodec/truespeech.c
@@ -188,7 +188,8 @@ static void truespeech_filters_merge(TSContext *dec)
static void truespeech_apply_twopoint_filter(TSContext *dec, int quart)
{
- int16_t tmp[146 + 60], *ptr0, *ptr1, *filter;
+ int16_t tmp[146 + 60], *ptr0, *ptr1;
+ const int16_t *filter;
int i, t, off;
t = dec->offset2[quart];
@@ -201,7 +202,7 @@ static void truespeech_apply_twopoint_filter(TSContext *dec, int quart)
off = (t / 25) + dec->offset1[quart >> 1] + 18;
ptr0 = tmp + 145 - off;
ptr1 = tmp + 146;
- filter = (int16_t*)ts_240 + (t % 25) * 2;
+ filter = (const int16_t*)ts_240 + (t % 25) * 2;
for(i = 0; i < 60; i++){
t = (ptr0[0] * filter[0] + ptr0[1] * filter[1] + 0x2000) >> 14;
ptr0++;
@@ -214,7 +215,8 @@ static void truespeech_place_pulses(TSContext *dec, int16_t *out, int quart)
{
int16_t tmp[7];
int i, j, t;
- int16_t *ptr1, *ptr2;
+ const int16_t *ptr1;
+ int16_t *ptr2;
int coef;
memset(out, 0, 60 * 2);
@@ -225,7 +227,7 @@ static void truespeech_place_pulses(TSContext *dec, int16_t *out, int quart)
}
coef = dec->pulsepos[quart] >> 15;
- ptr1 = (int16_t*)ts_140 + 30;
+ ptr1 = (const int16_t*)ts_140 + 30;
ptr2 = tmp;
for(i = 0, j = 3; (i < 30) && (j > 0); i++){
t = *ptr1++;
@@ -238,7 +240,7 @@ static void truespeech_place_pulses(TSContext *dec, int16_t *out, int quart)
}
}
coef = dec->pulsepos[quart] & 0x7FFF;
- ptr1 = (int16_t*)ts_140;
+ ptr1 = (const int16_t*)ts_140;
for(i = 30, j = 4; (i < 60) && (j > 0); i++){
t = *ptr1++;
if(coef >= t)