[Ffmpeg-cvslog] CVS: ffmpeg/libavcodec truespeech.c,1.2,1.3
James A. Morrison
ja2morri
Sat Jan 21 07:24:51 CET 2006
banan at mplayerhq.hu (Benjamin Larsson CVS) writes:
> Update of /cvsroot/ffmpeg/ffmpeg/libavcodec
> In directory mail:/var2/tmp/cvs-serv16817/libavcodec
>
> Modified Files:
> truespeech.c
> Log Message:
> Silence warnings, these came when some tables got declared as const.
>
>
> Index: truespeech.c
> ===================================================================
> RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/truespeech.c,v
> retrieving revision 1.2
> retrieving revision 1.3
> diff -u -d -r1.2 -r1.3
> --- truespeech.c 12 Jan 2006 22:43:17 -0000 1.2
> +++ truespeech.c 20 Jan 2006 23:06:35 -0000 1.3
> @@ -201,7 +201,7 @@
> off = (t / 25) + dec->offset1[quart >> 1] + 18;
> ptr0 = tmp + 145 - off;
> ptr1 = tmp + 146;
> - filter = ts_240 + (t % 25) * 2;
> + filter = (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++;
> @@ -225,7 +225,7 @@
> }
>
> coef = dec->pulsepos[quart] >> 15;
> - ptr1 = ts_140 + 30;
> + ptr1 = (int16_t*)ts_140 + 30;
> ptr2 = tmp;
> for(i = 0, j = 3; (i < 30) && (j > 0); i++){
> t = *ptr1++;
> @@ -238,7 +238,7 @@
> }
> }
> coef = dec->pulsepos[quart] & 0x7FFF;
> - ptr1 = ts_140;
> + ptr1 = (int16_t*)ts_140;
> for(i = 30, j = 4; (i < 60) && (j > 0); i++){
> t = *ptr1++;
> if(coef >= t)
Why not make filter/ptr1/ptr2 const? None of the memory pointed to is written
to.
--
Thanks,
Jim
http://www.csclub.uwaterloo.ca/~ja2morri/
http://phython.blogspot.com
http://open.nit.ca/wiki/?page=jim
More information about the ffmpeg-cvslog
mailing list