Mercurial > libavcodec.hg
changeset 3347:82277c821113 libavcodec
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
author | diego |
---|---|
date | Sun, 18 Jun 2006 11:33:14 +0000 |
parents | 052765f11f1c |
children | 3fb4ffd4849c |
files | alac.c png.c resample2.c truespeech.c |
diffstat | 4 files changed, 10 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/alac.c Sat Jun 17 18:46:06 2006 +0000 +++ b/alac.c Sun Jun 18 11:33:14 2006 +0000 @@ -407,7 +407,7 @@ } } -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,
--- a/png.c Sat Jun 17 18:46:06 2006 +0000 +++ b/png.c Sun Jun 18 11:33:14 2006 +0000 @@ -346,7 +346,7 @@ 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;
--- a/resample2.c Sat Jun 17 18:46:06 2006 +0000 +++ b/resample2.c Sun Jun 18 11:33:14 2006 +0000 @@ -62,7 +62,7 @@ /** * 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;
--- a/truespeech.c Sat Jun 17 18:46:06 2006 +0000 +++ b/truespeech.c Sun Jun 18 11:33:14 2006 +0000 @@ -188,7 +188,8 @@ 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 @@ 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 @@ { 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 @@ } 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 @@ } } 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)