[FFmpeg-devel] [RFC UNTESTED PATCH] Add IA-64 assembly byteswapping functions.

Måns Rullgård mans
Thu Oct 23 10:40:03 CEST 2008


Diego Biurrun <diego at biurrun.de> writes:

> On Thu, Oct 23, 2008 at 03:11:10AM +0200, Diego 'Flameeyes' Petten? wrote:
>> This *totally untested* patch copies over the IA-64 optimised
>> byteswapping code that is currently in glib 2.18.
>> 
>> --- /dev/null
>> +++ b/libavutil/ia64/bswap.h
>> @@ -0,0 +1,75 @@
>> +
>> +#define bswap_16 bswap_16
>
> This is a nop.

Yes it is, but it's needed to inform the top-level bswap.h that this
function is defined.

>> +static av_always_inline av_const uint16_t bswap_16(uint16_t x)
>> +{
>> +    uint16_t __v;
>
> This is an illegal variable name, names starting with __ are reserved
> for the system.  Please educate the glib guys about this.

Good luck with that.  They probably believe they *are* the system, the
universe, and God almighty, all at the same time.

>> +    __asm__ __volatile__ ("shl %0 = %1, 48 ;;"
>
> Just 'volatile' is more portable.

Is it even necessary?

-- 
M?ns Rullg?rd
mans at mansr.com




More information about the ffmpeg-devel mailing list