[FFmpeg-devel] [PATCH] A rather simple H.264 speed optimization

Alexander Strange astrange
Mon Jul 28 22:36:01 CEST 2008


On Jul 28, 2008, at 11:53 AM, Jason Garrett-Glaser wrote:

>> What does gcc do with this on 32-bit platforms.  I've often seen it  
>> do
>> some rather horrid things with 64-bit types there.
>
> h264.c already uses 64-bit write combining in many many places; I'm
> just extending it.
>
> x264 uses it too, and I have never seen GCC pessimize it.  GCC
> pessimizes 64-bit *arithmetic ops*, not copies.
>
> Dark Shikari

It might be useful to have a COPY64/XCHG64 macro, so we can use 'movq'  
or double copies on architectures without 64-bit. There might even be  
some opportunities for 128-bit copies, too. This is obviously  
incompatible with runtime CPU detection, of course.
gcc should be able to do this on its own, but I haven't seen any  
compiler that can and I haven't had time to file a bug about it.





More information about the ffmpeg-devel mailing list