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

Loren Merritt lorenm
Sun Jan 13 18:52:13 CET 2008


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.

--Loren Merritt




More information about the ffmpeg-devel mailing list