[FFmpeg-devel] libavutil simd

Alexander Strange astrange
Tue Oct 2 06:54:20 CEST 2007


On Oct 1, 2007, at 11:40 PM, Nigel Pearson wrote:

>> Alternatively, if there's a reliable way such as /proc/cpuinfo
>
>
> 3) Using the OS X Carbon compatibility library
>     to ask the Gestalt Manager:

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;

}






More information about the ffmpeg-devel mailing list