Libav
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_bswapdsp (void)
 
void checkasm_check_dcadsp (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_idct (void)
 
void checkasm_check_hevc_mc (void)
 
void checkasm_check_synth_filter (void)
 
void checkasm_check_v210enc (void)
 
void checkasm_check_vp8dsp (void)
 
void checkasm_check_vp9dsp (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

◆ rnd

#define rnd ( )    av_lfg_get(&checkasm_lfg)

◆ BENCH_RUNS

#define BENCH_RUNS   1000 /* Trade-off between accuracy and speed */

Definition at line 69 of file checkasm.h.

◆ check_func

#define check_func (   func,
  ... 
)    (func_ref = checkasm_check_func((func_new = func), __VA_ARGS__))

◆ declare_func

#define declare_func (   ret,
  ... 
)    declare_new(ret, __VA_ARGS__) typedef ret func_type(__VA_ARGS__)

◆ declare_func_emms

#define declare_func_emms (   cpu_flags,
  ret,
  ... 
)    declare_new_emms(cpu_flags, ret, __VA_ARGS__) typedef ret func_type(__VA_ARGS__)

◆ fail

#define fail ( )    checkasm_fail_func("%s:%d", av_basename(__FILE__), __LINE__)

Definition at line 80 of file checkasm.h.

Referenced by aac_adtstoasc_filter(), aac_decode_frame_int(), aac_encode_init(), alloc_frame(), alloc_picture(), apply_param_change(), asf_read_picture(), audio_get_buffer(), audio_read_header(), audio_write_header(), av_bitstream_filter_init(), av_bsf_alloc(), av_frame_ref(), av_get_frame_filename(), av_hwdevice_ctx_alloc(), av_hwdevice_ctx_create(), av_hwdevice_ctx_init(), av_hwframe_ctx_alloc(), av_hwframe_ctx_init(), av_interleaved_write_frame(), av_packet_ref(), av_probe_input_buffer(), av_write_trailer(), avcodec_copy_context(), avconv_parse_options(), avfilter_graph_create_filter(), avfilter_graph_parse(), avfilter_graph_parse2(), avfilter_init_str(), avformat_new_stream(), avformat_open_input(), avi_read_header(), avisynth_load_library(), avisynth_open_file(), check_epel(), check_idct(), check_idct_dc(), check_idct_dc4(), check_loopfilter_16y(), check_loopfilter_8uv(), check_loopfilter_simple(), check_luma_dc_wht(), check_mc(), check_pred16x16(), check_pred4x4(), check_pred8x8(), check_pred8x8l(), check_qpel(), checkasm_check_fmtconvert(), checkasm_check_h264qpel(), checkasm_check_synth_filter(), config_input_overlay(), config_props(), cuda_pool_alloc(), cudaupload_filter_frame(), dash_write_header(), decode_blocks(), decode_dvd_subtitles(), decode_extradata_ps(), decode_frame(), decode_init(), decode_nal_unit(), decode_nal_units(), decode_packet(), decode_plane(), decode_thread(), decode_video(), device_open(), dh_is_valid_public_key(), dnxhd_encode_init(), dnxhd_init_qmat(), dnxhd_init_rc(), dnxhd_init_vlc(), dump_extradata(), dump_paramchange(), dvdsub_init(), dxva2_alloc(), dxva2_create_decoder(), encode_frame(), fbdev_read_header(), ff_alloc_picture(), 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(), ff_flac_parse_picture(), 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_imdct15_init(), ff_mdct_init(), ff_merge_channel_layouts(), ff_merge_formats(), ff_merge_samplerates(), 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_raw_video_read_header(), ff_rl_init(), ff_rtp_chain_mux_open(), ff_rtsp_open_transport_ctx(), ff_sndio_open(), ff_thread_release_buffer(), ff_vaapi_encode2(), ff_vaapi_encode_h26x_nal_unit_to_byte_stream(), ff_vaapi_encode_init(), ffio_fdopen(), ffmal_update_format(), ffmmal_flush(), ffmmal_init_decoder(), ffurl_open(), film_read_header(), filter_frame(), find_and_decode_index(), find_image_range(), find_sidx(), fourxm_read_header(), frame_alloc(), get_buffer(), get_private_data(), get_video_buffer(), get_video_private_data(), gopher_open(), h264_mp4toannexb_filter(), 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_open(), hls_read_header(), hls_window(), hls_write_header(), http_open_cnx(), huf_uncompress(), hwdownload_filter_frame(), hwframe_pool_prealloc(), hwupload_config_output(), hwupload_filter_frame(), hwupload_query_formats(), imx_dump_header(), init(), init_complex_filtergraph(), init_context_frame(), init_duplicate_context(), init_muxer(), init_stage(), initFilter(), ism_write_header(), join_config_output(), join_init(), join_request_frame(), libopenjpeg_encode_init(), libopus_encode_init(), main(), matroska_parse_frame(), matroska_parse_wavpack(), mjpeg2jpeg_filter(), mjpega_dump_header(), mkv_strip_wavpack(), mkv_write_seekhead(), mms_open(), mmsh_open(), mov2textsub(), mov_read_custom(), mov_read_stsd(), mpeg_mux_init(), mpegts_write_header(), noise(), nppscale_config_props(), nppscale_filter_frame(), nsv_parse_NSVs_header(), nut_read_header(), nvenc_check_codec_support(), nvenc_check_device(), omx_encode_init(), opus_decode_init(), opus_decode_redundancy(), pad_last_frame(), parse_font(), parse_fragment(), parse_link_name(), parse_nal_units(), parse_packet(), parse_playlist(), pic_arrays_init(), process_frame(), qsv_decode_init(), qsv_init_child_ctx(), qsvscale_config_props(), qsvscale_filter_frame(), read_apic(), read_frame(), read_geobtag(), read_header(), read_mfra(), read_moof_duration(), read_packet(), read_tfra(), rtmp_calc_swf_verification(), rtmp_calc_swfhash(), rtmp_http_open(), rtmp_open(), rtmp_send_packet(), rtmp_write_amf_data(), rtp_mpegts_write_header(), rtp_open(), rtp_write_header(), sap_read_header(), sap_write_header(), scale_vaapi_config_output(), scale_vaapi_filter_frame(), sctp_open(), seg_write_header(), seg_write_packet(), seg_write_trailer(), segment_hls_window(), set_param(), set_sps(), shuffleplanes_filter_frame(), srtp_open(), stream_component_open(), stream_setup(), sws_getDefaultFilter(), sws_init_context(), tcp_open(), test_random_shared_secret(), test_ref_data(), text2movsub(), tls_open(), transcode(), transfer_data_alloc(), try_decode_frame(), udp_open(), udp_socket_create(), unix_open(), update_frame_pool(), update_frames(), url_alloc_for_protocol(), vaapi_build_decoder_config(), vaapi_decode_init(), vaapi_device_init(), vaapi_encode_check_config(), vaapi_encode_get_next(), vaapi_encode_issue(), vaapi_encode_output(), vaapi_frames_get_constraints(), vaapi_frames_init(), vaapi_map_frame(), vaapi_retrieve_data(), vaapi_transfer_data_from(), vaapi_transfer_data_to(), vda_init(), vdpau_alloc(), video_get_buffer(), videostream_cb(), vp9_decode_frame(), vp9_decode_init(), vp9_frame_ref(), vqa_decode_init(), wavpack_encode_init(), wma_decode_superframe(), write_fragments(), xmv_read_header(), and xwma_read_header().

◆ report

#define report   checkasm_report

◆ call_ref

#define call_ref (   ...)    ((func_type *)func_ref)(__VA_ARGS__)

◆ declare_new

#define declare_new (   ret,
  ... 
)

Definition at line 138 of file checkasm.h.

◆ declare_new_emms

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

Definition at line 139 of file checkasm.h.

◆ call_new

#define call_new (   ...)    ((func_type *)func_new)(__VA_ARGS__)

◆ bench_new

#define bench_new (   ...)    while(0)

Function Documentation

◆ checkasm_check_bswapdsp()

void checkasm_check_bswapdsp ( void  )

Definition at line 59 of file bswapdsp.c.

◆ checkasm_check_dcadsp()

void checkasm_check_dcadsp ( void  )

Definition at line 78 of file dcadsp.c.

◆ checkasm_check_fmtconvert()

void checkasm_check_fmtconvert ( void  )

Definition at line 44 of file fmtconvert.c.

◆ checkasm_check_h264dsp()

void checkasm_check_h264dsp ( void  )

Definition at line 229 of file h264dsp.c.

◆ checkasm_check_h264pred()

void checkasm_check_h264pred ( void  )

Definition at line 232 of file h264pred.c.

◆ checkasm_check_h264qpel()

void checkasm_check_h264qpel ( void  )

Definition at line 50 of file h264qpel.c.

◆ checkasm_check_hevc_idct()

void checkasm_check_hevc_idct ( void  )

Definition at line 62 of file hevc_idct.c.

◆ checkasm_check_hevc_mc()

void checkasm_check_hevc_mc ( void  )

Definition at line 292 of file hevc_mc.c.

◆ checkasm_check_synth_filter()

void checkasm_check_synth_filter ( void  )

Definition at line 44 of file synth_filter.c.

◆ checkasm_check_v210enc()

void checkasm_check_v210enc ( void  )

Definition at line 81 of file v210enc.c.

◆ checkasm_check_vp8dsp()

void checkasm_check_vp8dsp ( void  )

Definition at line 507 of file vp8dsp.c.

◆ checkasm_check_vp9dsp()

void checkasm_check_vp9dsp ( void  )

Definition at line 124 of file vp9dsp.c.

◆ checkasm_check_func()

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

◆ checkasm_bench_func()

void int checkasm_bench_func ( void  )

Definition at line 583 of file checkasm.c.

◆ checkasm_fail_func()

void checkasm_fail_func ( const char *  msg,
  ... 
)

◆ checkasm_update_bench()

void void checkasm_update_bench ( int  iterations,
uint64_t  cycles 
)

Definition at line 608 of file checkasm.c.

◆ checkasm_report()

void checkasm_report ( const char *  name,
  ... 
)

◆ float_near_ulp()

void int float_near_ulp ( float  a,
float  b,
unsigned  max_ulp 
)

Definition at line 184 of file checkasm.c.

Referenced by float_near_abs_eps_ulp(), and float_near_ulp_array().

◆ float_near_abs_eps()

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

Definition at line 214 of file checkasm.c.

Referenced by float_near_abs_eps_array(), and float_near_abs_eps_ulp().

◆ float_near_abs_eps_ulp()

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

Definition at line 233 of file checkasm.c.

Referenced by checkasm_check_synth_filter(), and float_near_abs_eps_array_ulp().

◆ float_near_ulp_array()

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

Definition at line 202 of file checkasm.c.

Referenced by checkasm_check_fmtconvert().

◆ float_near_abs_eps_array()

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

Definition at line 221 of file checkasm.c.

◆ float_near_abs_eps_array_ulp()

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

Definition at line 238 of file checkasm.c.

Variable Documentation

◆ checkasm_lfg

AVLFG checkasm_lfg

Definition at line 176 of file checkasm.c.

◆ func_ref

av_unused void* func_ref
static

Definition at line 67 of file checkasm.h.

◆ func_new

av_unused void * func_new
static

Definition at line 67 of file checkasm.h.