[FFmpeg-devel] [PATCH] Arithmetic decoding in ALS

Thilo Borgmann thilo.borgmann
Tue Jan 12 20:50:27 CET 2010

Am 12.01.10 00:33, schrieb Michael Niedermayer:
> On Mon, Jan 11, 2010 at 09:15:05PM +0100, Thilo Borgmann wrote:
>> ...
>> +    while (cf_table[sx][(symbol + 1) << delta] > target)
>> +        symbol++;
> this probably can be speed up by a LUT of some of the MSBs

I thought a bit about that but I'm still lacking an idea of how to
generate suitable lookup tables.

What I've tried and benchmarked as an alternative is to use a bisection
method to search through cf_table[sx] but its slower than the existing
solution - most likely because the number of iterations is small enough
in almost all cases. Iterations are less than 10 in almost all cases and
just about 900 dezicycles are spend within this loop (~1350 using

So I don't know if it really needs to be optimized?

All other issued done. Revision 1 attached.


-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: als_bgmc.rev1.patch
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100112/e3384c1a/attachment.asc>

More information about the ffmpeg-devel mailing list