[FFmpeg-devel] [PATCH] WMA: use a table instead of pow() in decode_exp_vlc
Tue Sep 29 16:46:22 CEST 2009
Reimar D?ffinger <Reimar.Doeffinger at gmx.de> writes:
> This one has been applied it seems.
>> @@ -271,8 +339,9 @@ static int decode_exp_vlc(WMACodecContext *s, int ch)
>> return -1;
>> /* NOTE: this offset is the same as MPEG4 AAC ! */
>> last_exp += code - 60;
>> - /* XXX: use a table */
>> - v = pow(10, last_exp * (1.0 / 16.0));
>> + if ((unsigned)last_exp + 60 > FF_ARRAY_ELEMS(pow_tab))
>> + return -1;
> Should we maybe add a request for samples here? If we get a real-world
> sample, it might be worth to try doing something better than just giving
> up here.
> Note that this is in part a general question, would it make sense to
> request sample for all "fail hard" errors we have where we potentially
> could do better?
I got the table size from Rockbox. I don't know where they got it.
mans at mansr.com
More information about the ffmpeg-devel