libavutil/cpu.c File Reference

#include "cpu.h"
#include "config.h"
#include "opt.h"

Go to the source code of this file.

Defines

#define CPUFLAG_MMX2   (AV_CPU_FLAG_MMX | AV_CPU_FLAG_MMX2)
#define CPUFLAG_3DNOW   (AV_CPU_FLAG_3DNOW | AV_CPU_FLAG_MMX)
#define CPUFLAG_3DNOWEXT   (AV_CPU_FLAG_3DNOWEXT | CPUFLAG_3DNOW)
#define CPUFLAG_SSE   (AV_CPU_FLAG_SSE | CPUFLAG_MMX2)
#define CPUFLAG_SSE2   (AV_CPU_FLAG_SSE2 | CPUFLAG_SSE)
#define CPUFLAG_SSE2SLOW   (AV_CPU_FLAG_SSE2SLOW | CPUFLAG_SSE2)
#define CPUFLAG_SSE3   (AV_CPU_FLAG_SSE3 | CPUFLAG_SSE2)
#define CPUFLAG_SSE3SLOW   (AV_CPU_FLAG_SSE3SLOW | CPUFLAG_SSE3)
#define CPUFLAG_SSSE3   (AV_CPU_FLAG_SSSE3 | CPUFLAG_SSE3)
#define CPUFLAG_SSE4   (AV_CPU_FLAG_SSE4 | CPUFLAG_SSSE3)
#define CPUFLAG_SSE42   (AV_CPU_FLAG_SSE42 | CPUFLAG_SSE4)
#define CPUFLAG_AVX   (AV_CPU_FLAG_AVX | CPUFLAG_SSE42)
#define CPUFLAG_XOP   (AV_CPU_FLAG_XOP | CPUFLAG_AVX)
#define CPUFLAG_FMA4   (AV_CPU_FLAG_FMA4 | CPUFLAG_AVX)

Functions

void av_force_cpu_flags (int arg)
 Disables cpu detection and forces the specified flags.
int av_get_cpu_flags (void)
 Return the flags which specify extensions supported by the CPU.
void av_set_cpu_flags_mask (int mask)
 Set a mask on flags returned by av_get_cpu_flags().
int av_parse_cpu_flags (const char *s)
 Parse CPU flags from a string.
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.

Variables

static int flags
static int checked


Define Documentation

#define CPUFLAG_3DNOW   (AV_CPU_FLAG_3DNOW | AV_CPU_FLAG_MMX)

Referenced by av_parse_cpu_flags().

#define CPUFLAG_3DNOWEXT   (AV_CPU_FLAG_3DNOWEXT | CPUFLAG_3DNOW)

Referenced by av_parse_cpu_flags().

#define CPUFLAG_AVX   (AV_CPU_FLAG_AVX | CPUFLAG_SSE42)

Referenced by av_parse_cpu_flags().

#define CPUFLAG_FMA4   (AV_CPU_FLAG_FMA4 | CPUFLAG_AVX)

Referenced by av_parse_cpu_flags().

#define CPUFLAG_MMX2   (AV_CPU_FLAG_MMX | AV_CPU_FLAG_MMX2)

Referenced by av_parse_cpu_flags().

#define CPUFLAG_SSE   (AV_CPU_FLAG_SSE | CPUFLAG_MMX2)

Referenced by av_parse_cpu_flags().

#define CPUFLAG_SSE2   (AV_CPU_FLAG_SSE2 | CPUFLAG_SSE)

Referenced by av_parse_cpu_flags().

#define CPUFLAG_SSE2SLOW   (AV_CPU_FLAG_SSE2SLOW | CPUFLAG_SSE2)

Referenced by av_parse_cpu_flags().

#define CPUFLAG_SSE3   (AV_CPU_FLAG_SSE3 | CPUFLAG_SSE2)

Referenced by av_parse_cpu_flags().

#define CPUFLAG_SSE3SLOW   (AV_CPU_FLAG_SSE3SLOW | CPUFLAG_SSE3)

Referenced by av_parse_cpu_flags().

#define CPUFLAG_SSE4   (AV_CPU_FLAG_SSE4 | CPUFLAG_SSSE3)

Referenced by av_parse_cpu_flags().

#define CPUFLAG_SSE42   (AV_CPU_FLAG_SSE42 | CPUFLAG_SSE4)

Referenced by av_parse_cpu_flags().

#define CPUFLAG_SSSE3   (AV_CPU_FLAG_SSSE3 | CPUFLAG_SSE3)

Referenced by av_parse_cpu_flags().

#define CPUFLAG_XOP   (AV_CPU_FLAG_XOP | CPUFLAG_AVX)

Referenced by av_parse_cpu_flags().


Function Documentation

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.

Definition at line 25 of file cpu.c.

Referenced by opt_cpuflags().

int av_get_cpu_flags ( void   ) 

Return the flags which specify extensions supported by the CPU.

Definition at line 30 of file cpu.c.

Referenced by av_set_cpu_flags_mask(), DECLARE_ASM_CONST(), ff_ac3dsp_init_arm(), ff_ac3dsp_init_x86(), ff_audio_convert_init_x86(), ff_audio_mix_init_x86(), ff_cavsdsp_init_mmx(), ff_dcadsp_init_arm(), ff_diracdsp_init_mmx(), ff_dnxhd_init_mmx(), ff_dsputil_h264_init_ppc(), ff_dsputil_init_arm(), ff_dsputil_init_mmx(), ff_dsputil_init_pix_mmx(), ff_dsputil_init_ppc(), ff_dsputil_init_vfp(), ff_dsputilenc_init_mmx(), ff_dwt_init_x86(), ff_fft_fixed_init_arm(), ff_fft_init_arm(), ff_fft_init_mmx(), ff_fmt_convert_init_arm(), ff_fmt_convert_init_x86(), ff_h263_decode_frame(), ff_h264_pred_init_arm(), ff_h264dsp_init_arm(), ff_h264dsp_init_ppc(), ff_h264dsp_init_x86(), ff_lpc_init_x86(), ff_mpadsp_init_arm(), ff_mpadsp_init_mmx(), ff_MPV_common_init_altivec(), ff_MPV_common_init_arm(), ff_MPV_common_init_mmx(), ff_pngdsp_init_x86(), ff_proresdsp_x86_init(), ff_psdsp_init_arm(), ff_rv34dsp_init_x86(), ff_rv40dsp_init_x86(), ff_sbrdsp_init_arm(), ff_sbrdsp_init_x86(), ff_spatial_idwt_init_mmx(), ff_sws_init_swScale_altivec(), ff_sws_init_swScale_mmx(), ff_swscale_get_unscaled_altivec(), ff_vc1dsp_init_altivec(), ff_vc1dsp_init_mmx(), ff_vp56dsp_init_arm(), ff_vp56dsp_init_x86(), ff_vp8dsp_init_altivec(), ff_vp8dsp_init_arm(), ff_vp8dsp_init_x86(), ff_yuv2rgb_init_altivec(), init(), main(), opt_cpuflags(), PRED4x4(), swri_audio_convert_init_x86(), sws_init_context(), sws_setColorspaceDetails(), swScale(), v210_x86_init(), and xvid_encode_init().

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.

Returns:
negative on error.

Definition at line 113 of file cpu.c.

Referenced by opt_cpuflags().

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.

Returns:
a combination of AV_CPU_* flags, negative on error.

Definition at line 50 of file cpu.c.

Referenced by main().

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

Warning:
this function is not thread safe.

Definition at line 43 of file cpu.c.

Referenced by main().


Variable Documentation

int checked [static]

int flags [static]

Definition at line 23 of file cpu.c.

Referenced by ape_tag_read_field(), apply_param_change(), asf_write_packet(), av_force_cpu_flags(), av_get_cpu_flags(), av_image_alloc(), av_log_default_callback(), av_log_set_flags(), av_parse_cpu_flags(), av_read_image_line(), av_set_cpu_flags_mask(), av_write_image_line(), avcodec_get_context_defaults3(), avfilter_make_all_formats(), avi_read_idx1(), avi_write_packet(), avpicture_get_size(), bidir_refine(), build_feed_streams(), check_input_motion(), config(), create_all_formats(), DECLARE_ASM_CONST(), decode_frame(), decode_frame_header(), decode_hextile(), decode_init(), decode_mb_b(), decode_rle(), decode_subblock(), decode_subblock3(), device_open(), dnxhd_decode_dct_block(), dxa_read_header(), encode_frame(), epzs_motion_search2(), epzs_motion_search4(), fbdev_read_header(), ff_ac3_apply_rematrixing(), ff_alsa_open(), ff_get_mb_score(), ff_get_unscaled_swscale(), ff_mms_asf_header_parser(), ff_mov_read_stsd_entries(), ff_mp4_parse_es_descr(), ff_pngdsp_init_x86(), ff_proresdsp_x86_init(), ff_rdt_parse_packet(), fileTest(), filter_codec_opts(), flv_read_header(), flv_read_packet(), flv_write_packet(), get_audio_flags(), get_needed_flags(), gif_read_image(), hpel_motion_search(), ipvideo_decode_block_opcode_0x7(), ipvideo_decode_block_opcode_0x7_16(), ipvideo_decode_block_opcode_0x8(), ipvideo_decode_block_opcode_0x8_16(), ipvideo_decode_block_opcode_0x9(), ipvideo_decode_block_opcode_0x9_16(), ipvideo_decode_block_opcode_0xA(), ipvideo_decode_block_opcode_0xA_16(), main(), matroska_parse_block(), mov_read_chan(), mov_read_tfhd(), mov_read_timecode_track(), mov_read_trun(), mov_write_tfhd_tag(), mov_write_trun_tag(), mpeg_decode_user_data(), mpegps_read_pes_header(), mpegts_push_data(), mpegts_write_pes(), mpegts_write_section1(), msvideo1_decode_16bit(), msvideo1_decode_8bit(), mxf_parse_structural_metadata(), nut_write_packet(), ogg_read_page(), opt_cpuflags(), opt_help(), parse_MP4SLDescrTag(), parse_pcr(), pmp_header(), put_image(), qpel_motion_search(), query_formats(), read_desc_chunk(), read_header(), read_packet(), read_part_of_packet(), rm_read_dts(), rm_read_header(), rm_read_packet(), rtp_parse_one_packet(), rtp_parse_packet_internal(), rv10_write_header(), sad_hpel_motion_search(), selfTest(), seqvideo_decode(), smacker_read_packet(), sws_getContextFromCmdLine(), sws_init_context(), swScale(), txd_decode_frame(), utvideo_encode_init(), vf_get_image(), vf_next_config(), video_open(), vmdaudio_decode_frame(), wmavoice_decode_init(), and xwd_encode_frame().


Generated on Fri Oct 26 02:48:02 2012 for FFmpeg by  doxygen 1.5.8