FFmpeg
|
#include "config.h"
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "checkasm.h"
#include "libavutil/common.h"
#include "libavutil/cpu.h"
#include "libavutil/intfloat.h"
#include "libavutil/random_seed.h"
Go to the source code of this file.
Data Structures | |
struct | CheckasmFuncVersion |
struct | CheckasmFunc |
Macros | |
#define | COLOR_RED 1 |
#define | COLOR_GREEN 2 |
#define | COLOR_YELLOW 3 |
#define | isatty(fd) 1 |
#define | is_red(f) ((f) && !(f)->color) |
#define | DEF_CHECKASM_CHECK_FUNC(type, fmt) |
Functions | |
static int | is_negative (union av_intfloat32 u) |
int | float_near_ulp (float a, float b, unsigned max_ulp) |
int | float_near_ulp_array (const float *a, const float *b, unsigned max_ulp, unsigned len) |
int | float_near_abs_eps (float a, float b, float eps) |
int | float_near_abs_eps_array (const float *a, const float *b, float eps, unsigned len) |
int | float_near_abs_eps_ulp (float a, float b, float eps, unsigned max_ulp) |
int | float_near_abs_eps_array_ulp (const float *a, const float *b, float eps, unsigned max_ulp, unsigned len) |
int | double_near_abs_eps (double a, double b, double eps) |
int | double_near_abs_eps_array (const double *a, const double *b, double eps, unsigned len) |
static void | color_printf (int color, const char *fmt,...) |
static void | destroy_func_tree (CheckasmFunc *f) |
static void * | checkasm_malloc (size_t size) |
static const char * | cpu_suffix (int cpu) |
static int | cmp_nop (const void *a, const void *b) |
static int | measure_nop_time (void) |
static void | print_benchs (CheckasmFunc *f) |
static int | cmp_func_names (const char *a, const char *b) |
static CheckasmFunc * | rotate_tree (CheckasmFunc *f, int dir) |
static void | balance_tree (CheckasmFunc **root) |
static CheckasmFunc * | get_func (CheckasmFunc **root, const char *name) |
static void | check_cpu_flag (const char *name, int flag) |
static void | print_cpu_name (void) |
static int | bench_init_ffmpeg (void) |
static int | bench_init (void) |
static void | bench_uninit (void) |
int | main (int argc, char *argv[]) |
void * | checkasm_check_func (void *func, const char *name,...) |
int | checkasm_bench_func (void) |
void | checkasm_fail_func (const char *msg,...) |
CheckasmPerf * | checkasm_get_perf_context (void) |
void | checkasm_report (const char *name,...) |
Variables | |
struct { | |
const char * name | |
void(* func )(void) | |
} | tests [] |
struct { | |
const char * name | |
const char * suffix | |
int flag | |
} | cpus [] |
struct { | |
CheckasmFunc * funcs | |
CheckasmFunc * current_func | |
CheckasmFuncVersion * current_func_ver | |
const char * current_test_name | |
const char * bench_pattern | |
int bench_pattern_len | |
int num_checked | |
int num_failed | |
int nop_time | |
int sysfd | |
int cpu_flag | |
const char * cpu_flag_name | |
const char * test_name | |
int verbose | |
} | state |
AVLFG | checkasm_lfg |
#define COLOR_RED 1 |
Definition at line 51 of file checkasm.c.
Referenced by checkasm_report().
#define COLOR_GREEN 2 |
Definition at line 52 of file checkasm.c.
Referenced by checkasm_report().
#define COLOR_YELLOW 3 |
Definition at line 53 of file checkasm.c.
Referenced by print_cpu_name().
#define isatty | ( | fd | ) | 1 |
Definition at line 61 of file checkasm.c.
Referenced by av_log_default_callback(), check_color_terminal(), and color_printf().
Definition at line 544 of file checkasm.c.
Referenced by balance_tree().
#define DEF_CHECKASM_CHECK_FUNC | ( | type, | |
fmt | |||
) |
Definition at line 857 of file checkasm.c.
|
static |
Definition at line 292 of file checkasm.c.
Referenced by float_near_ulp().
int float_near_ulp | ( | float | a, |
float | b, | ||
unsigned | max_ulp | ||
) |
Definition at line 297 of file checkasm.c.
Referenced by float_near_abs_eps_ulp(), and float_near_ulp_array().
int float_near_ulp_array | ( | const float * | a, |
const float * | b, | ||
unsigned | max_ulp, | ||
unsigned | len | ||
) |
Definition at line 315 of file checkasm.c.
Referenced by checkasm_check_audiodsp(), and checkasm_check_fmtconvert().
int float_near_abs_eps | ( | float | a, |
float | b, | ||
float | eps | ||
) |
Definition at line 327 of file checkasm.c.
Referenced by float_near_abs_eps_array(), float_near_abs_eps_ulp(), test_butterflies_float(), test_deemphasis(), test_fcmul_add(), test_scalarproduct_float(), test_sum_square(), test_vector_fmac_scalar(), test_vector_fmul(), test_vector_fmul_add(), test_vector_fmul_scalar(), and test_vector_fmul_window().
int float_near_abs_eps_array | ( | const float * | a, |
const float * | b, | ||
float | eps, | ||
unsigned | len | ||
) |
Definition at line 338 of file checkasm.c.
Referenced by check_horiz_slice(), check_ict_float(), check_postscale_slice(), test_add_squares(), test_autocorrelate(), test_deemphasis(), test_hf_apply_noise(), test_hf_g_filt(), test_hf_gen(), test_hybrid_analysis(), test_mul_pair_single(), test_neg_odd_64(), test_postfilter(), test_qmf_deint_bfly(), test_qmf_deint_neg(), test_qmf_post_shuffle(), test_qmf_pre_shuffle(), test_stereo_interpolate(), and test_sum64x5().
int float_near_abs_eps_ulp | ( | float | a, |
float | b, | ||
float | eps, | ||
unsigned | max_ulp | ||
) |
Definition at line 350 of file checkasm.c.
Referenced by checkasm_check_synth_filter(), and 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 355 of file checkasm.c.
int double_near_abs_eps | ( | double | a, |
double | b, | ||
double | eps | ||
) |
Definition at line 367 of file checkasm.c.
Referenced by double_near_abs_eps_array(), test_vector_dmac_scalar(), test_vector_dmul(), and test_vector_dmul_scalar().
int double_near_abs_eps_array | ( | const double * | a, |
const double * | b, | ||
double | eps, | ||
unsigned | len | ||
) |
Definition at line 374 of file checkasm.c.
Definition at line 387 of file checkasm.c.
Referenced by checkasm_report(), and print_cpu_name().
|
static |
Definition at line 430 of file checkasm.c.
Referenced by checkasm_malloc(), and main().
|
static |
Definition at line 447 of file checkasm.c.
Referenced by checkasm_check_func(), and get_func().
|
static |
Definition at line 459 of file checkasm.c.
Referenced by checkasm_fail_func(), and print_benchs().
Definition at line 470 of file checkasm.c.
Referenced by measure_nop_time().
Definition at line 476 of file checkasm.c.
Referenced by bench_init().
|
static |
Definition at line 497 of file checkasm.c.
Referenced by main().
|
static |
Definition at line 519 of file checkasm.c.
Referenced by get_func().
|
static |
Definition at line 534 of file checkasm.c.
Referenced by balance_tree().
|
static |
Definition at line 547 of file checkasm.c.
Referenced by get_func().
|
static |
Definition at line 563 of file checkasm.c.
Referenced by checkasm_check_func().
Definition at line 588 of file checkasm.c.
Referenced by main().
Definition at line 611 of file checkasm.c.
Referenced by checkasm_fail_func(), and checkasm_report().
Definition at line 643 of file checkasm.c.
Referenced by bench_init().
Definition at line 655 of file checkasm.c.
Referenced by main().
Definition at line 670 of file checkasm.c.
Referenced by main().
Definition at line 678 of file checkasm.c.
Definition at line 739 of file checkasm.c.
Definition at line 786 of file checkasm.c.
void checkasm_fail_func | ( | const char * | msg, |
... | |||
) |
Definition at line 793 of file checkasm.c.
CheckasmPerf* checkasm_get_perf_context | ( | void | ) |
Definition at line 811 of file checkasm.c.
void checkasm_report | ( | const char * | name, |
... | |||
) |
Definition at line 820 of file checkasm.c.
const char* name |
Definition at line 72 of file checkasm.c.
Referenced by check_cpu_flag().
Definition at line 73 of file checkasm.c.
Referenced by checkasm_check_func(), and main().
const { ... } tests[] |
Referenced by check_cpu_flag(), and main().
const char* suffix |
Definition at line 208 of file checkasm.c.
Referenced by av_parse_time(), coeff_abs_level_remaining_decode(), ff_hevc_hls_residual_coding(), and lavfi_read_header().
int flag |
Definition at line 209 of file checkasm.c.
Referenced by cpu_suffix(), and main().
const { ... } cpus[] |
Referenced by cpu_suffix(), and main().
CheckasmFunc* funcs |
Definition at line 269 of file checkasm.c.
Referenced by filter_frame(), init_axis_color(), and init_volume().
CheckasmFunc* current_func |
Definition at line 270 of file checkasm.c.
CheckasmFuncVersion* current_func_ver |
Definition at line 271 of file checkasm.c.
const char* current_test_name |
Definition at line 272 of file checkasm.c.
const char* bench_pattern |
Definition at line 273 of file checkasm.c.
int bench_pattern_len |
Definition at line 274 of file checkasm.c.
int num_checked |
Definition at line 275 of file checkasm.c.
int num_failed |
Definition at line 276 of file checkasm.c.
int nop_time |
Definition at line 279 of file checkasm.c.
int sysfd |
Definition at line 280 of file checkasm.c.
Referenced by measure_nop_time().
int cpu_flag |
Definition at line 282 of file checkasm.c.
const char* cpu_flag_name |
Definition at line 283 of file checkasm.c.
const char* test_name |
Definition at line 284 of file checkasm.c.
int verbose |
Definition at line 285 of file checkasm.c.
Referenced by main().
struct { ... } state |
Referenced by adts_aac_resync(), adx_parse(), apng_probe(), av1_filter_obus(), av_assert0_fpu(), av_lzo1x_decode(), av_rc4_crypt(), av_rc4_init(), avi_read_packet(), avpriv_fits_header_init(), avs2_find_frame_end(), avs2_probe(), avs3_find_frame_end(), avs3video_probe(), bench_init(), bench_uninit(), bfi_read_packet(), bmp_parse(), cavs_find_frame_end(), check_cpu_flag(), checkasm_bench_func(), checkasm_check_func(), checkasm_fail_func(), checkasm_get_perf_context(), checkasm_malloc(), checkasm_report(), convert_samples(), cri_parse(), dca_find_frame_end(), decode_cabac_intra_mb_type(), decode_line_TMPL(), decode_slice_header(), delta_decode(), dnxhd_find_frame_end(), dpx_parse(), draw_scope(), dts_probe(), dv_probe(), dv_read_header(), dxv_decompress_cgo(), dxv_decompress_dxt1(), dxv_decompress_dxt5(), dxv_decompress_yo(), encode_line_TMPL(), encode_picture_ls(), encode_slice_header(), extract_extradata_mpeg12(), extract_extradata_mpeg4(), extract_extradata_vc1(), ff_dither_alloc(), ff_dshow_filter_GetState(), ff_dshow_filter_Pause(), ff_dshow_filter_Run(), ff_dshow_filter_Stop(), ff_h263_find_frame_end(), ff_jpegls_decode_picture(), ff_mpeg1_find_frame_end(), ff_mpeg4_find_frame_end(), ff_mpeg4video_split(), ff_rtp_send_h263_rfc2190(), ff_spdif_probe(), ff_spdif_read_packet(), filler_payload(), find_any_startcode(), find_frame_end(), find_group3_syncmarker(), find_next_start_code(), find_start_code(), format_child_class_iterate(), get_cabac_inline(), get_rac(), h261_find_frame_end(), h264_find_frame_end(), h264_split(), hevc_split(), ipu_parse(), iterative_me(), jpeg_probe(), latm_find_frame_end(), libgsm_encode_frame(), main(), measure_nop_time(), message(), mlp_filter_channel(), mpegaudio_parse(), mpegts_write_packet_internal(), mpegvideo_split(), mxf_parse_h264_frame(), nc_read_packet(), opus_find_frame_end(), parse_adaptation_sets(), parse_nal_units(), parse_presentation_segment(), predictor_calc_error(), print_benchs(), print_cpu_name(), process_new(), process_old(), pulse_context_wait(), pulse_read_header(), pulse_stream_wait(), put_cabac(), put_rac(), read_extra_header(), read_header(), read_quant_table(), rm_sync(), s337m_probe(), s337m_read_packet(), svc_decode_frame(), uninit(), user_data_registered(), user_data_unregistered(), vc1_split(), webp_parse(), write_extradata(), write_header(), write_quant_table(), and xbm_parse().
AVLFG checkasm_lfg |
Definition at line 289 of file checkasm.c.