[FFmpeg-soc] [soc]: r719 - in qcelp: README doc/TODO qcelpdec.c

Reynaldo Verdejo rverdejo at gmail.com
Sun Aug 12 17:36:20 CEST 2007


On 8/12/07, Michael Niedermayer <michaelni at gmx.at> wrote:
>
> Hi
>
> On Sun, Aug 12, 2007 at 10:45:02AM +0200, reynaldo wrote:
> [...]
> > +
> > +                if(lag[i] == 140.5 || lag[i] == 141.5 || lag[i] ==
> 142.5)
>
> be carefull with == checks and floating point variables
> this can fail in cases like
> 140.499999 != 140.5


Thinking about this twice, lag can only be of the form a+b*0.5 where a E N
and b [0,1], ie ....20, 20.5, 21,  21.5, .... So while not perfect it may be
safe
to do this comparission. Ill keep this in mind though.

Reynaldo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-soc/attachments/20070812/201de692/attachment.htm>


More information about the FFmpeg-soc mailing list