[FFmpeg-devel] libavutil simd

Nigel Pearson nigel
Tue Oct 2 09:26:57 CEST 2007


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;
>
> }

I wish I had seen this a few hours ago!


1. Do we know that HW_VECTORUNIT is PowerPC only?
    I fear that it may also be true for SSE.

2. sysctlbyname("hw.optional.altivec"...)
    is maybe easier to understand?

--
Nigel Pearson, nigel at ind.tansu.com.au|"Things you own-
Telstra Net. Eng., Sydney, Australia | end up owning you"
Office: 9202 3900    Fax:  9261 3912 |      Tyler,
Mobile: 0408 664435  Home: 9792 6998 |    Fight Club




More information about the ffmpeg-devel mailing list