[Ffmpeg-devel] [PATCH] Fix for rgb24tobgr24 / "rewrite" of rgb24tobgr24

Ivo ivop
Tue Apr 17 23:12:13 CEST 2007


rgb24tobgr24 has the same problem as rgb32tobgr32 had described earlier. I 
tried rewriting the function from scratch and surprisingly came up with 
something very similar to the existing function, albeit a bit cleaner but 
also a bit slower. I managed to get the speed on par by rewriting the first 
few lines of the loop (somehow the existing code with two reads from memory 
and two unpaired instructions is faster).

Anyway, here's two patches. The first one just fixes the bug and leaves the 
existing code in tact. The second patch replaces the whole function with 
cleaner code that is just as fast. I'm unsure though if I can put it under 
the LGPL as it is remarkably similar to the existing implementation. I have 
tried my best, but I cannot come up with a different algorithm that is just 
as fast :)

So, if any or both of the patches are ok, which one should be applied?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: rgb24tobgr24.simplefix.patch
Type: text/x-diff
Size: 667 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070417/32eeb0c5/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rgb24tobgr24.patch
Type: text/x-diff
Size: 3707 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070417/32eeb0c5/attachment-0001.patch>

More information about the ffmpeg-devel mailing list