World of Might and Magic  0.2.0
Open reimplementation of Might and Magic 6 7 8 game engine
Файл cpu.h

См. исходные тексты.

Функции

int av_get_cpu_flags (void)
 
void av_force_cpu_flags (int flags)
 
attribute_deprecated void av_set_cpu_flags_mask (int mask)
 
attribute_deprecated int av_parse_cpu_flags (const char *s)
 
int av_parse_cpu_caps (unsigned *flags, const char *s)
 
int av_cpu_count (void)
 
size_t av_cpu_max_align (void)
 

Функции

◆ av_get_cpu_flags()

int av_get_cpu_flags ( void  )

Return the flags which specify extensions supported by the CPU. The returned value is affected by av_force_cpu_flags() if that was used before. So av_get_cpu_flags() can easily be used in an application to detect the enabled cpu flags.

◆ av_force_cpu_flags()

void av_force_cpu_flags ( int  flags)

Disables cpu detection and forces the specified flags. -1 is a special case that disables forcing of specific flags.

◆ av_set_cpu_flags_mask()

attribute_deprecated void av_set_cpu_flags_mask ( int  mask)

Set a mask on flags returned by av_get_cpu_flags(). This function is mainly useful for testing. Please use av_force_cpu_flags() and av_get_cpu_flags() instead which are more flexible

◆ av_parse_cpu_flags()

attribute_deprecated int av_parse_cpu_flags ( const char *  s)

Parse CPU flags from a string.

The returned flags contain the specified flags as well as related unspecified flags.

This function exists only for compatibility with libav. Please use av_parse_cpu_caps() when possible.

Возвращает
a combination of AV_CPU_* flags, negative on error.

◆ av_parse_cpu_caps()

int av_parse_cpu_caps ( unsigned *  flags,
const char *  s 
)

Parse CPU caps from a string and update the given AV_CPU_* flags based on that.

Возвращает
negative on error.

◆ av_cpu_count()

int av_cpu_count ( void  )
Возвращает
the number of logical CPU cores present.

◆ av_cpu_max_align()

size_t av_cpu_max_align ( void  )

Get the maximum data alignment that may be required by FFmpeg.

Note that this is affected by the build configuration and the CPU flags mask, so e.g. if the CPU supports AVX, but libavutil has been built with –disable-avx or the AV_CPU_FLAG_AVX flag has been disabled through av_set_cpu_flags_mask(), then this function will behave as if AVX is not present.