FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
checkasm.h File Reference
#include <stdint.h>
#include "config.h"
#include "libavutil/avstring.h"
#include "libavutil/cpu.h"
#include "libavutil/lfg.h"
#include "libavutil/timer.h"

Go to the source code of this file.

Macros

#define rnd()   av_lfg_get(&checkasm_lfg)
 
#define BENCH_RUNS   1000 /* Trade-off between accuracy and speed */
 
#define check_func(func,...)   (func_ref = checkasm_check_func((func_new = func), __VA_ARGS__))
 
#define declare_func(ret,...)   declare_new(ret, __VA_ARGS__) typedef ret func_type(__VA_ARGS__)
 
#define declare_func_emms(cpu_flags, ret,...)   declare_new_emms(cpu_flags, ret, __VA_ARGS__) typedef ret func_type(__VA_ARGS__)
 
#define fail()   checkasm_fail_func("%s:%d", av_basename(__FILE__), __LINE__)
 
#define report   checkasm_report
 
#define call_ref(...)   ((func_type *)func_ref)(__VA_ARGS__)
 
#define declare_new(ret,...)
 
#define declare_new_emms(cpu_flags, ret,...)
 
#define call_new(...)   ((func_type *)func_new)(__VA_ARGS__)
 
#define bench_new(...)   while(0)
 

Functions

void checkasm_check_alacdsp (void)
 
void checkasm_check_blend (void)
 
void checkasm_check_bswapdsp (void)
 
void checkasm_check_flacdsp (void)
 
void checkasm_check_fmtconvert (void)
 
void checkasm_check_h264pred (void)
 
void checkasm_check_h264qpel (void)
 
void checkasm_check_jpeg2000dsp (void)
 
void checkasm_check_pixblockdsp (void)
 
void checkasm_check_synth_filter (void)
 
void checkasm_check_v210enc (void)
 
void checkasm_check_vp9dsp (void)
 
void checkasm_check_videodsp (void)
 
voidcheckasm_check_func (void *func, const char *name,...) av_printf_format(2
 
void int checkasm_bench_func (void)
 
void checkasm_fail_func (const char *msg,...) av_printf_format(1
 
void void checkasm_update_bench (int iterations, uint64_t cycles)
 
void checkasm_report (const char *name,...) av_printf_format(1
 
void int float_near_ulp (float a, float b, unsigned max_ulp)
 
int float_near_abs_eps (float a, float b, float eps)
 
int float_near_abs_eps_ulp (float a, float b, float eps, unsigned max_ulp)
 
int float_near_ulp_array (const float *a, const float *b, unsigned max_ulp, unsigned len)
 
int float_near_abs_eps_array (const float *a, const float *b, float eps, unsigned len)
 
int float_near_abs_eps_array_ulp (const float *a, const float *b, float eps, unsigned max_ulp, unsigned len)
 

Variables

AVLFG checkasm_lfg
 
static av_unused voidfunc_ref
 
static av_unused voidfunc_new
 

Macro Definition Documentation

#define rnd ( )    av_lfg_get(&checkasm_lfg)
#define BENCH_RUNS   1000 /* Trade-off between accuracy and speed */

Definition at line 69 of file checkasm.h.

#define check_func (   func,
  ... 
)    (func_ref = checkasm_check_func((func_new = func), __VA_ARGS__))
#define declare_func (   ret,
  ... 
)    declare_new(ret, __VA_ARGS__) typedef ret func_type(__VA_ARGS__)
#define declare_func_emms (   cpu_flags,
  ret,
  ... 
)    declare_new_emms(cpu_flags, ret, __VA_ARGS__) typedef ret func_type(__VA_ARGS__)
#define fail ( )    checkasm_fail_func("%s:%d", av_basename(__FILE__), __LINE__)
Examples:
filter_audio.c, and qsvdec.c.

Definition at line 80 of file checkasm.h.

Referenced by aac_decode_frame_int(), aac_encode_init(), add_entry(), add_file(), alloc_frame(), alloc_picture(), apng_encode_frame(), apng_read_header(), apply_param_change(), asf_read_picture(), audio_get_buffer(), audio_read_header(), audio_resample(), audio_write_header(), av_frame_ref(), av_get_frame_filename(), av_interleaved_write_frame(), av_opt_query_ranges_default(), av_packet_pack_dictionary(), av_packet_ref(), av_probe_input_buffer2(), av_write_trailer(), avcodec_copy_context(), avcodec_decode_audio4(), avcodec_decode_video2(), avdevice_capabilities_create(), avf_read_header(), avfilter_graph_create_filter(), avfilter_graph_parse(), avfilter_graph_parse2(), avfilter_init_str(), avformat_new_stream(), avformat_open_input(), avi_read_header(), avio_open_dir(), avisynth_load_library(), avisynth_open_file(), build_file_streams(), build_filter(), caca_write_header(), callback(), channelmap_query_formats(), check_append_extra_bits(), check_decorrelate(), check_decorrelate_stereo(), check_ipred(), check_itxfm(), check_loopfilter(), check_mc(), check_mct(), check_pred16x16(), check_pred4x4(), check_pred8x8(), check_pred8x8l(), checkasm_check_fmtconvert(), checkasm_check_h264qpel(), checkasm_check_synth_filter(), chunk_end(), compute_lpc_coefs(), concat_read_header(), config_input(), config_output(), config_props(), dash_write_header(), decode_blocks(), decode_dvd_subtitles(), decode_frame(), decode_frame_common(), decode_frame_header(), decode_ics_info(), decode_info_header(), decode_init(), decode_main_header(), decode_nal_unit(), decode_nal_units(), decode_packet(), decode_plane(), decode_stream_header(), decode_video(), decode_zbuf(), device_open(), dh_is_valid_public_key(), dnxhd_encode_init(), dnxhd_init_qmat(), dnxhd_init_rc(), dnxhd_init_vlc(), dshow_show_filter_properties(), dump_paramchange(), dvdsub_parse_extradata(), dxva2_alloc(), dxva2_create_decoder(), dxva2_retrieve_data(), encode_dvd_subtitles(), encode_frame(), fbdev_read_header(), fbdev_write_header(), ff_alloc_picture(), ff_alsa_get_device_list(), ff_alsa_open(), ff_ccitt_unpack(), ff_celt_init(), ff_dh_compute_shared_secret_key(), ff_dh_init(), ff_dither_alloc(), ff_fft_init(), ff_filter_frame_framed(), ff_flac_parse_picture(), ff_frame_thread_encoder_init(), ff_h264_alloc_tables(), ff_h264_decode_picture_parameter_set(), ff_h264_decode_seq_parameter_set(), ff_h264_ref_picture(), ff_h264_slice_context_init(), ff_hevc_frame_rps(), ff_imdct15_init(), ff_img_read_packet(), ff_mdct_init(), ff_merge_channel_layouts(), ff_merge_formats(), ff_merge_samplerates(), ff_mjpeg_decode_frame(), ff_mjpeg_encode_stuffing(), ff_mov_init_hinting(), ff_mpeg_er_init(), ff_mpeg_framesize_alloc(), ff_mpeg_ref_picture(), ff_mpv_common_frame_size_change(), ff_mpv_common_init(), ff_mpv_encode_init(), ff_opus_parse_packet(), ff_oss_audio_open(), ff_pulse_audio_connect_context(), ff_pulse_audio_get_devices(), ff_raw_video_read_header(), ff_rl_init(), ff_rtp_chain_mux_open(), ff_sndio_open(), ff_snow_common_init_after_header(), ff_thread_release_buffer(), ff_video_frame_pool_get(), ff_video_frame_pool_init(), ffm2_read_header(), ffm_read_header(), ffm_write_header_codec_ctx(), ffm_write_recommended_config(), ffmal_update_format(), ffmmal_flush(), ffmmal_init_decoder(), ffmpeg_parse_options(), ffurl_open_whitelist(), film_read_header(), filter_frame(), find_and_decode_index(), find_image_range(), find_sidx(), flac_read_header(), fourxm_read_header(), frame_alloc(), ftp_current_dir(), ftp_open(), ftp_open_dir(), ftp_passive_mode(), ftp_passive_mode_epsv(), get_buffer(), get_private_data(), get_video_buffer(), get_video_private_data(), gopher_open(), grab_read_header(), guess_dc(), h264_mp4toannexb_filter(), h264_slice_header_init(), handle_file(), handle_invoke_result(), hds_write_header(), hevc_extradata_to_annexb(), hevc_frame_start(), hevc_init_context(), hevc_mp4toannexb_filter(), hevc_ref_frame(), hls_delete_old_segments(), hls_open(), hls_read_header(), hls_start(), hls_window(), hls_write_header(), http_accept(), http_listen(), http_open_cnx(), http_receive_data(), huf_uncompress(), iec61883_read_header(), init(), init_axis_from_font(), init_complex_filtergraph(), init_context_frame(), init_duplicate_context(), init_muxer(), initFilter(), ism_write_header(), jacosub_read_header(), join_config_output(), libopenjpeg_encode_init(), libopus_encode_init(), libsmbc_open(), libsmbc_open_dir(), libssh_open(), libssh_open_dir(), list_devices_for_context(), list_op(), ljpeg_encode_init(), main(), matroska_parse_frame(), matroska_parse_wavpack(), mca(), mkv_strip_wavpack(), mkv_write_header(), mkv_write_seekhead(), mms_open(), mmsh_open_internal(), mov_read_adrm(), mov_read_custom(), mov_read_mfra(), mpeg_mux_init(), mpegts_add_service(), mpegts_init(), mxf_read_header(), new_connection(), nsv_parse_NSVs_header(), nut_read_header(), nut_write_packet(), ogg_read_packet(), opengl_compile_shaders(), opengl_configure_texture(), opengl_draw(), opengl_init_context(), opengl_load_shader(), opengl_prepare(), opengl_prepare_vertex(), opengl_read_limits(), opengl_write_header(), opus_decode_init(), opus_decode_redundancy(), pad_last_frame(), parse_command(), parse_fragment(), parse_frame_pbr(), parse_link_name(), parse_packet(), parse_playlist(), parse_script(), parse_slave_options(), parse_string(), pic_arrays_init(), print_sdp(), pulse_add_detected_device(), pulse_update_sink_input_info(), pulse_write_header(), pulse_write_packet(), qsv_decode_init(), qsv_transcode_init(), qtkit_read_header(), query_formats(), read_apic(), read_frame(), read_geobtag(), read_header(), read_mfra(), read_moof_duration(), read_packet(), read_priv(), read_tfra(), read_thread(), read_whole_file(), redspark_read_header(), render_freetype(), request_frame(), rm_read_header(), rtmp_calc_swfhash(), rtmp_http_open(), rtmp_open(), rtmp_send_packet(), rtmp_write_amf_data(), rtp_mpegts_write_header(), rtp_new_av_stream(), rtp_new_connection(), rtp_open(), rtp_write_header(), sap_read_header(), sap_write_header(), sbg_read_header(), sctp_open(), sdl_write_header(), seg_write_header(), seg_write_packet(), seg_write_trailer(), set_param(), set_sps(), set_string_bool(), shuffleplanes_filter_frame(), socket_open_listen(), srtp_open(), stream_component_open(), stream_open(), svc_encode_init(), svq3_decode_init(), swr_alloc_set_opts(), swr_config_frame(), swr_init(), sws_getDefaultFilter(), sws_init_context(), tcp_open(), tee_write_header(), tls_client_handshake(), tls_client_handshake_loop(), tls_open(), transcode(), try_decode_frame(), try_push_frame(), udp_open(), udp_socket_create(), unix_open(), update_frame_pool(), update_frames(), url_alloc_for_protocol(), v4l2_get_device_list(), v4l2_read_header(), vdpau_alloc(), vdpau_retrieve_data(), vfw_read_header(), video_get_buffer(), videostream_cb(), videotoolbox_init(), vivo_read_packet(), vp9_alloc_frame(), vp9_ref_frame(), vqa_decode_init(), wavesynth_init(), wavpack_encode_init(), webm_dash_manifest_write_header(), wma_decode_superframe(), write_chapter(), write_fragments(), write_header(), write_packet(), write_sm_data(), write_trailer(), writer_open(), xmv_read_header(), xv_write_header(), and xwma_read_header().

#define report   checkasm_report
#define call_ref (   ...)    ((func_type *)func_ref)(__VA_ARGS__)
#define declare_new (   ret,
  ... 
)

Definition at line 138 of file checkasm.h.

#define declare_new_emms (   cpu_flags,
  ret,
  ... 
)

Definition at line 139 of file checkasm.h.

#define call_new (   ...)    ((func_type *)func_new)(__VA_ARGS__)
#define bench_new (   ...)    while(0)

Function Documentation

void checkasm_check_alacdsp ( void  )

Definition at line 115 of file alacdsp.c.

void checkasm_check_blend ( void  )

Definition at line 87 of file vf_blend.c.

void checkasm_check_bswapdsp ( void  )

Definition at line 59 of file bswapdsp.c.

void checkasm_check_flacdsp ( void  )

Definition at line 56 of file flacdsp.c.

void checkasm_check_fmtconvert ( void  )

Definition at line 44 of file fmtconvert.c.

void checkasm_check_h264pred ( void  )

Definition at line 232 of file h264pred.c.

void checkasm_check_h264qpel ( void  )

Definition at line 50 of file h264qpel.c.

void checkasm_check_jpeg2000dsp ( void  )

Definition at line 58 of file jpeg2000dsp.c.

void checkasm_check_pixblockdsp ( void  )

Definition at line 81 of file pixblockdsp.c.

void checkasm_check_synth_filter ( void  )

Definition at line 44 of file synth_filter.c.

void checkasm_check_v210enc ( void  )

Definition at line 81 of file v210enc.c.

void checkasm_check_vp9dsp ( void  )

Definition at line 617 of file vp9dsp.c.

void checkasm_check_videodsp ( void  )

Definition at line 80 of file videodsp.c.

void* checkasm_check_func ( void func,
const char *  name,
  ... 
)
void int checkasm_bench_func ( void  )

Definition at line 594 of file checkasm.c.

void checkasm_fail_func ( const char *  msg,
  ... 
)
void void checkasm_update_bench ( int  iterations,
uint64_t  cycles 
)

Definition at line 619 of file checkasm.c.

void checkasm_report ( const char *  name,
  ... 
)
void int float_near_ulp ( float  a,
float  b,
unsigned  max_ulp 
)

Definition at line 194 of file checkasm.c.

Referenced by float_near_abs_eps_ulp(), and float_near_ulp_array().

int float_near_abs_eps ( float  a,
float  b,
float  eps 
)

Definition at line 224 of file checkasm.c.

Referenced by float_near_abs_eps_array(), and float_near_abs_eps_ulp().

int float_near_abs_eps_ulp ( float  a,
float  b,
float  eps,
unsigned  max_ulp 
)

Definition at line 243 of file checkasm.c.

Referenced by checkasm_check_synth_filter(), and float_near_abs_eps_array_ulp().

int float_near_ulp_array ( const float *  a,
const float *  b,
unsigned  max_ulp,
unsigned  len 
)

Definition at line 212 of file checkasm.c.

Referenced by checkasm_check_fmtconvert().

int float_near_abs_eps_array ( const float *  a,
const float *  b,
float  eps,
unsigned  len 
)

Definition at line 231 of file checkasm.c.

int float_near_abs_eps_array_ulp ( const float *  a,
const float *  b,
float  eps,
unsigned  max_ulp,
unsigned  len 
)

Definition at line 248 of file checkasm.c.

Variable Documentation

AVLFG checkasm_lfg

Definition at line 186 of file checkasm.c.

av_unused void* func_ref
static

Definition at line 67 of file checkasm.h.

av_unused void * func_new
static

Definition at line 67 of file checkasm.h.