[FFmpeg-devel] [PATCH] CONFIG_SMALL for roqaudioenc.c

Vitor Sessak vitor1001
Fri Oct 16 04:13:18 CEST 2009


M?ns Rullg?rd wrote:
> Reimar D?ffinger <Reimar.Doeffinger at gmx.de> writes:
> 
>> Hello,
>> roqaudioenc uses a ca. 16kB lookup table by default, attached patch makes
>> it use ff_sqrt directly if CONFIG_SMALL is set.
>> Overall that means instead of a single table lookup it needs about
>> a table lookup, 2 shifts, 2 multiples, 2 adds and two branches per value
>> encoded.

I suppose it does not give exactly the same output.

> I would say that's acceptable.  It's an obscure format.  A simple
> benchmark would be good nonetheless.

I'd say to go one step further and remove the table regardless if 
CONFIG_SMALL is enabled or not, like in this patch [1], that should also 
be bit-identical. Note that RoQ video encoding is so slow, that a few 
miliseconds more for encoding audio should hardly matter.

-Vitor

[1] 
http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2008-January/040536.html



More information about the ffmpeg-devel mailing list