[FFmpeg-devel] [PATCH] Faster ff_sqrt()

Vitor Sessak vitor1001
Sun Jan 13 19:09:28 CET 2008


Hi

Loren Merritt wrote:
> On Sun, 13 Jan 2008, Vitor Sessak wrote:
> 
>> I saw in the thread "Copy-on-write pages statistics" that roqaudioenc.c
>> is a big copy-on-write memory usage offender. I think that
>> increasing the memory usage of FFmpeg by 16kb just for a table used in a
>> game format encoder is not a good idea. So I'm sending a new, faster
>> ff_sqrt(), so I can remove the table completely without too much speed loss.
> 
> Not that I object to a faster sqrt, but the RoQ table only costs 16kb 
> when RoQ is in use. Otherwise the table is not written to, and thus not 
> copied. No matter how big a table is it wastes at most 1 page, when the 
> table is not page-aligned and values on both sides are written to.

Ok, I missed that... But anyway, a big square-root table don't look like 
a good idea to me. I still think it is better (and simpler) to have a 
fast enough ff_sqrt().

-Vitor




More information about the ffmpeg-devel mailing list