[FFmpeg-devel] [PATCH] Heavy optimization of IFF decoder

Måns Rullgård mans
Tue Apr 27 17:26:09 CEST 2010


"Ronald S. Bultje" <rsbultje at gmail.com> writes:

> On Mon, Apr 26, 2010 at 7:39 PM, Sebastian Vater
> <cdgs.basty at googlemail.com> wrote:
>> +    const uint32_t lut[] = {0x0000000,
>> +                            0x1000000 << plane,
>> +                            0x0010000 << plane,
>> +                            0x1010000 << plane,
>> +                            0x0000100 << plane,
>> +                            0x1000100 << plane,
>> +                            0x0010100 << plane,
>> +                            0x1010100 << plane,
>> +                            0x0000001 << plane,
>> +                            0x1000001 << plane,
>> +                            0x0010001 << plane,
>> +                            0x1010001 << plane,
>> +                            0x0000101 << plane,
>> +                            0x1000101 << plane,
>> +                            0x0010101 << plane,
>> +                            0x1010101 << plane};
>
> I really can't imagine that a static const lut[][] isn't faster. which
> file did you use to test this? (Is it on mphq/samples?)

A static table whose values are shifted in the loop is 7% faster on ARM.

To get more accurate benchmarking, I hacked the decoder to decode the
(single) frame a few thousand times for a total time of 10s or so.

-- 
M?ns Rullg?rd
mans at mansr.com



More information about the ffmpeg-devel mailing list