[Ffmpeg-devel] Re: [PATCH] Machine endian bytestream functions
Ramiro Polla
ramiro
Sat Mar 10 21:15:44 CET 2007
Hello,
Reimar D?ffinger escreveu:
> Hello,
> On Sat, Mar 10, 2007 at 11:06:41PM -0300, ramiro at lisha.ufsc.br wrote:
>
>> Attached patch makes the AV_{R,W}{L,B}xx macros have a machine endian for
>> the simple 16 and 32 bit types. Those macros are then #ifdef'd for the
>> correct endianess. 24 bit remains the same, as it would be more complex.
>>
>
> They completely ignore alignment issues...
>
>
You're right.
Attached patch makes use of machine endianess where unaligned data
accesses are possible, and faster than what gcc is currently doing.
I have only tested this on a p4, but the following program should detect
this on any architecture. Compile bytes.c and main.c with the same
options FFmpeg gives to libavcodec files, link them, and test the speed
both for patched and unpatched FFmpeg. bytes.c should be changed to 'be'
on big-endian architectures.
Regression tests pass.
Ramiro Polla
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: intreadwrite_me.diff
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070310/90e06db0/attachment.asc>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: bytes.c
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070310/90e06db0/attachment.txt>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: main.c
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070310/90e06db0/attachment-0001.asc>
More information about the ffmpeg-devel
mailing list