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

Sebastian Vater cdgs.basty
Tue Apr 27 23:04:34 CEST 2010


Sebastian Vater a ?crit :
> Sebastian Vater a ?crit :
>   
>> Michael Niedermayer a ?crit :
>>   
>>     
>>> speaking of registers
>>> for(dst; dst<end; dst+=4)
>>>
>>> would reduce the number of variables by 1
>>> also
>>>  const uint32_t v = AV_RN32A(dst) | lut[get_bits(&gb, 4)];
>>>  AV_WN32A(dst, v);
>>> might be worth a try
>>>
>>> and make sure dst is 4 byte aligned
>>>   
>>>     
>>>       
>> Great! It works now like a charm now for me, too.
>> I also got the 3% speedup ;)
>>
>> Patch attached!
>>
>> But could you try out and compare the new patch, if it doesn't cause any
>> side effects?
>> Load several 8bpp IFF files and see if something is truncated, etc.
>>
>> I'm far too tired right now, and just falling to bed!
>> Good night and nice dreams!
>>   
>>     
>
> Just figured out that the (buf_size * 8) + bps - 1 expression can be
> simplified to (buf_size * 8), at least it didn't change Heart.ILBM.
>
> New patch attached fixing this! But that's really the very last one for
> today!
>   

Argghh, did apply the wrong patch!

Also I noticed that it can just be reduced to (buf_size * 8) + bps
not to (buf_size * 8), so just the - 1 is discarded.

I shouldn't sent patched when extremely tired, sorry for the inconvience!

-- 

Best regards,
                   :-) Basty/CDGS (-

-------------- next part --------------
A non-text attachment was scrubbed...
Name: iff-opt-dp8-static.patch
Type: text/x-patch
Size: 1981 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100427/02db8689/attachment.bin>



More information about the ffmpeg-devel mailing list