[FFmpeg-devel] [PATCH] Optimization of original IFF codec
Sebastian Vater
cdgs.basty
Mon Apr 26 00:19:28 CEST 2010
Hi Michael!
Michael Niedermayer a ?crit :
> On Sun, Apr 25, 2010 at 01:49:54PM +0200, Sebastian Vater wrote:
>
>>> that loop then can be unrolled by a factor of 4 and its inside for the
>>> uint8_t type case be implemented like:
>>> v= lut[get_bits(&gb, 4)];
>>> AV_WN32A(dst+b, AV_RN32A(dst+b) | v);
>>>
>>>
>> The thing is that type can be both uint8_t and uint32_t. It's a #define
>> macro which gets the type (uint8_t or uint32_t) passed by.
>>
>> So not fixed yet because I'm unsure here, if those two lines can be done
>> with dst being uint32_t also.
>>
>
> they can, and it will speed the uint8 case up significantly
>
When I understand you right, I have to create a lookup table the
following way:
For each of the 4-pair read bits:
{0000 = 0, 0001 = 1 << plane, 0010 = 0x100 << plane, 0011 = (1 << plane)
| (0x100 << plane), 0100 = (0x10000 << plane), ...}
Is that correct?
--
Best regards,
:-) Basty/CDGS (-:
More information about the ffmpeg-devel
mailing list