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/internal.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_audiodsp (void)
 
void checkasm_check_blend (void)
 
void checkasm_check_blockdsp (void)
 
void checkasm_check_bswapdsp (void)
 
void checkasm_check_colorspace (void)
 
void checkasm_check_flacdsp (void)
 
void checkasm_check_fmtconvert (void)
 
void checkasm_check_h264dsp (void)
 
void checkasm_check_h264pred (void)
 
void checkasm_check_h264qpel (void)
 
void checkasm_check_hevc_add_res (void)
 
void checkasm_check_hevc_idct (void)
 
void checkasm_check_jpeg2000dsp (void)
 
void checkasm_check_llviddsp (void)
 
void checkasm_check_pixblockdsp (void)
 
void checkasm_check_synth_filter (void)
 
void checkasm_check_v210enc (void)
 
void checkasm_check_vp8dsp (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 78 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 89 of file checkasm.h.

Referenced by aac_adtstoasc_filter(), 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_bitstream_filter_init(), av_bsf_alloc(), av_frame_ref(), av_get_frame_filename2(), av_hwdevice_ctx_alloc(), av_hwdevice_ctx_create(), av_hwdevice_ctx_init(), av_hwframe_ctx_alloc(), av_hwframe_ctx_create_derived(), av_hwframe_ctx_init(), 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(), avformat_write_header(), avi_read_header(), avi_write_packet(), avio_open_dir(), avisynth_load_library(), avisynth_open_file(), bsf_list_init(), build_file_streams(), build_filter(), caca_write_header(), callback(), channelmap_query_formats(), check_add_bytes(), check_add_res(), check_append_extra_bits(), check_decorrelate(), check_decorrelate_stereo(), check_idct(), check_idct_dc(), check_idct_dc4(), check_ipred(), check_itxfm(), check_loopfilter(), check_loopfilter_16y(), check_loopfilter_8uv(), check_loopfilter_simple(), check_luma_dc_wht(), check_mc(), check_mct(), check_multiply3x3(), check_pred16x16(), check_pred4x4(), check_pred8x8(), check_pred8x8l(), check_rgb2yuv(), check_yuv2rgb(), check_yuv2yuv(), checkasm_check_audiodsp(), checkasm_check_fmtconvert(), checkasm_check_h264qpel(), checkasm_check_synth_filter(), chunk_end(), codec_init_static_fields(), compute_lpc_coefs(), concat_read_header(), config_input(), config_output(), config_props(), configure_filtergraph(), configure_input_video_filter(), cuda_pool_alloc(), cudaupload_filter_frame(), decode_blocks(), decode_dvd_subtitles(), decode_extradata_ps(), decode_frame(), decode_frame_common(), decode_frame_header(), decode_ics(), decode_ics_info(), decode_info_header(), decode_init(), decode_main_header(), decode_nal_unit(), decode_nal_units(), decode_packet(), decode_plane(), decode_plane10(), decode_stream_header(), decode_video(), decode_zbuf(), deint_vaapi_config_output(), deint_vaapi_filter_frame(), device_open(), dh_is_valid_public_key(), dnxhd_encode_init(), dnxhd_init_qmat(), dnxhd_init_rc(), dnxhd_init_vlc(), dshow_show_filter_properties(), dump_extradata(), dump_paramchange(), dvdsub_parse_extradata(), dxva2_alloc(), dxva2_create_decoder(), dxva2_map_frame(), dxva2_transfer_data_from(), dxva2_transfer_data_to(), encode_dvd_subtitles(), encode_frame(), estimate_best_b_count(), extract_extradata_filter(), extract_extradata_h2645(), fbdev_read_header(), fbdev_write_header(), ff_alloc_picture(), ff_alsa_get_device_list(), ff_alsa_open(), ff_AMediaCodec_cleanOutputBuffers(), ff_AMediaCodec_configure(), ff_AMediaCodec_createCodecByName(), ff_AMediaCodec_createDecoderByType(), ff_AMediaCodec_createEncoderByType(), ff_AMediaCodec_dequeueInputBuffer(), ff_AMediaCodec_dequeueOutputBuffer(), ff_AMediaCodec_flush(), ff_AMediaCodec_getInputBuffer(), ff_AMediaCodec_getName(), ff_AMediaCodec_getOutputBuffer(), ff_AMediaCodec_getOutputFormat(), ff_AMediaCodec_queueInputBuffer(), ff_AMediaCodec_releaseOutputBuffer(), ff_AMediaCodec_releaseOutputBufferAtTime(), ff_AMediaCodec_start(), ff_AMediaCodec_stop(), ff_AMediaFormat_getBuffer(), ff_AMediaFormat_getFloat(), ff_AMediaFormat_getInt32(), ff_AMediaFormat_getInt64(), ff_AMediaFormat_getString(), ff_AMediaFormat_new(), ff_AMediaFormat_newFromObject(), ff_AMediaFormat_setBuffer(), ff_AMediaFormat_setFloat(), ff_AMediaFormat_setInt32(), ff_AMediaFormat_setInt64(), ff_AMediaFormat_setString(), ff_AMediaFormat_toString(), 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_pool_audio_init(), ff_frame_pool_get(), ff_frame_pool_video_init(), ff_frame_thread_encoder_init(), ff_h264_alloc_tables(), ff_h264_decode_picture_parameter_set(), ff_h264_decode_seq_parameter_set(), ff_h264_parse_ref_count(), ff_h264_ref_picture(), ff_h264_slice_context_init(), ff_hevc_frame_rps(), ff_hwframe_map_create(), ff_img_read_packet(), ff_mdct15_init(), ff_mdct_init(), ff_mediacodec_dec_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_reshuffle_raw_rgb(), ff_rl_init(), ff_rtp_chain_mux_open(), ff_scale_eval_dimensions(), ff_sndio_open(), ff_snow_common_init_after_header(), ff_tee_parse_slave_options(), ff_thread_release_buffer(), ff_vaapi_decode_init(), ff_vaapi_decode_issue(), ff_vaapi_encode2(), ff_vaapi_encode_h26x_nal_unit_to_byte_stream(), ff_vaapi_encode_init(), ffio_fdopen(), 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(), fifo_basic_test(), fifo_overflow_drop_test(), fifo_thread_attempt_recovery(), fifo_write_header_err_tst(), fifo_write_packet(), film_read_header(), filter_frame(), find_and_decode_index(), find_image_range(), find_sidx(), flac_read_header(), fourxm_read_header(), frame_alloc(), frame_new_side_data(), 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(), hwdownload_filter_frame(), hwframe_pool_prealloc(), hwmap_config_output(), hwmap_filter_frame(), hwupload_config_output(), hwupload_filter_frame(), hwupload_query_formats(), iec61883_read_header(), imx_dump_header(), init(), init_axis_from_font(), init_complex_filtergraph(), init_context_frame(), init_cscheme(), init_duplicate_context(), init_muxer(), init_stage(), 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(), matroska_read_header(), mca(), mediacodec_wrap_hw_buffer(), mjpeg2jpeg_filter(), mjpega_dump_header(), mkv_strip_wavpack(), mkv_write_header(), mkv_write_seekhead(), mms_open(), mmsh_open_internal(), mov2textsub(), mov_read_adrm(), mov_read_mfra(), mov_read_stsd(), mov_write_packet(), mp3_header_decompress(), mpeg_mux_init(), mpegts_add_service(), mpegts_init(), mxf_read_header(), new_connection(), noise(), nppscale_config_props(), nppscale_filter_frame(), nsv_parse_NSVs_header(), nut_read_header(), nut_write_packet(), nvenc_check_codec_support(), nvenc_check_device(), ogg_read_packet(), old_flac_header(), omx_encode_init(), 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_nal_units(), parse_packet(), parse_playlist(), parse_script(), parse_string(), pic_arrays_init(), print_sdp(), process_frame(), prompeg_init(), prompeg_open(), pulse_add_detected_device(), pulse_update_sink_input_info(), pulse_write_header(), pulse_write_packet(), qsv_decode_init(), qsv_frame_lock(), qsv_init_child_ctx(), qsv_map_from(), qsvscale_config_props(), qsvscale_filter_frame(), 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(), render_fontconfig(), render_freetype(), replace_int_data_in_filename(), 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(), scale_vaapi_config_output(), scale_vaapi_filter_frame(), sctp_open(), sdl2_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(), svq3_decode_init(), swr_alloc_set_opts(), swr_config_frame(), swr_init(), sws_getDefaultFilter(), sws_init_context(), tcp_open(), tee_open(), tee_write_header(), test_random_shared_secret(), test_ref_data(), text2movsub(), tls_client_handshake(), tls_client_handshake_loop(), tls_open(), transcode(), transfer_data_alloc(), 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(), vaapi_decode_init(), vaapi_decode_make_config(), vaapi_device_init(), vaapi_encode_config_attributes(), vaapi_encode_create_recon_frames(), vaapi_encode_get_next(), vaapi_encode_issue(), vaapi_encode_output(), vaapi_frames_get_constraints(), vaapi_frames_init(), vaapi_h264_start_frame(), vaapi_hevc_end_frame(), vaapi_hevc_start_frame(), vaapi_map_frame(), vaapi_mpeg2_end_frame(), vaapi_mpeg2_start_frame(), vaapi_mpeg4_end_frame(), vaapi_mpeg4_start_frame(), vaapi_retrieve_data(), vaapi_transfer_data_from(), vaapi_transfer_data_to(), vaapi_vc1_end_frame(), vaapi_vc1_start_frame(), vdpau_alloc(), vfw_read_header(), video_get_buffer(), videostream_cb(), videotoolbox_init(), vivo_read_packet(), vp6_parse_header(), vp9_frame_alloc(), vp9_frame_ref(), 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 152 of file checkasm.h.

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

Definition at line 153 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_audiodsp ( void  )

Definition at line 51 of file audiodsp.c.

void checkasm_check_blend ( void  )

Definition at line 87 of file vf_blend.c.

void checkasm_check_blockdsp ( void  )

Definition at line 54 of file blockdsp.c.

void checkasm_check_bswapdsp ( void  )

Definition at line 59 of file bswapdsp.c.

void checkasm_check_colorspace ( void  )

Definition at line 308 of file vf_colorspace.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_h264dsp ( void  )

Definition at line 229 of file h264dsp.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_hevc_add_res ( void  )

Definition at line 74 of file hevc_add_res.c.

void checkasm_check_hevc_idct ( void  )

Definition at line 86 of file hevc_idct.c.

void checkasm_check_jpeg2000dsp ( void  )

Definition at line 58 of file jpeg2000dsp.c.

void checkasm_check_llviddsp ( void  )

Definition at line 66 of file llviddsp.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_vp8dsp ( void  )

Definition at line 507 of file vp8dsp.c.

void checkasm_check_vp9dsp ( void  )

Definition at line 631 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 627 of file checkasm.c.

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

Definition at line 652 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 219 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 249 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 268 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 237 of file checkasm.c.

Referenced by checkasm_check_audiodsp(), and checkasm_check_fmtconvert().

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

Definition at line 256 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 273 of file checkasm.c.

Variable Documentation

AVLFG checkasm_lfg

Definition at line 211 of file checkasm.c.

av_unused void* func_ref
static

Definition at line 76 of file checkasm.h.

av_unused void * func_new
static

Definition at line 76 of file checkasm.h.