[FFmpeg-devel] libavutil simd

Loren Merritt lorenm
Tue Oct 2 11:53:13 CEST 2007


On Tue, 2 Oct 2007, Nigel Pearson wrote:
> On 02/10/2007, at 2:54 PM, Alexander Strange wrote:
>> If you aren't linking to Carbon ("compatibility library"?), it's
>> available as a sysctl:
>> http://developer.apple.com/hardwaredrivers/ve/g3_compatibility.html
>>
>> int GetAltiVecTypeAvailable( void )
>> {
>>
>> int sels[2] = { CTL_HW, HW_VECTORUNIT };
>> int vType = 0; //0 == scalar only
>> size_t length = sizeof(vType);
>> int error = sysctl(sels, 2, &vType, &length, NULL, 0);
>> if( 0 == error ) return vType;
>>
>> return 0;
>>
>> }
>
> 1. Do we know that HW_VECTORUNIT is PowerPC only?
>    I fear that it may also be true for SSE.

Doesn't matter: The main architecture is definitely known at compile time, 
this check is only for extensions. So just don't run it when compiled for 
x86.

--Loren Merritt




More information about the ffmpeg-devel mailing list