FFmpeg  4.3
Data Structures | 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.

Data Structures

struct  CheckasmPerf
 

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_float(ret, ...)   declare_new_float(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_float(ret, ...)
 
#define declare_new_emms(cpu_flags, ret, ...)
 
#define call_new(...)   ((func_type *)func_new)(__VA_ARGS__)
 
#define bench_new(...)   while(0)
 
#define PERF_START(t)   while(0)
 
#define PERF_STOP(t)   while(0)
 
#define DECL_CHECKASM_CHECK_FUNC(type)
 
#define PASTE(a, b)   a ## b
 
#define CONCAT(a, b)   PASTE(a,b)
 
#define checkasm_check(prefix, ...)   CONCAT(checkasm_check_, prefix)(__FILE__, __LINE__, __VA_ARGS__)
 

Functions

void checkasm_check_aacpsdsp (void)
 
void checkasm_check_afir (void)
 
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_exrdsp (void)
 
void checkasm_check_fixed_dsp (void)
 
void checkasm_check_flacdsp (void)
 
void checkasm_check_float_dsp (void)
 
void checkasm_check_fmtconvert (void)
 
void checkasm_check_g722dsp (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_hevc_sao (void)
 
void checkasm_check_huffyuvdsp (void)
 
void checkasm_check_jpeg2000dsp (void)
 
void checkasm_check_llviddsp (void)
 
void checkasm_check_llviddspenc (void)
 
void checkasm_check_nlmeans (void)
 
void checkasm_check_opusdsp (void)
 
void checkasm_check_pixblockdsp (void)
 
void checkasm_check_sbrdsp (void)
 
void checkasm_check_synth_filter (void)
 
void checkasm_check_sw_rgb (void)
 
void checkasm_check_sw_scale (void)
 
void checkasm_check_utvideodsp (void)
 
void checkasm_check_v210dec (void)
 
void checkasm_check_v210enc (void)
 
void checkasm_check_vf_eq (void)
 
void checkasm_check_vf_gblur (void)
 
void checkasm_check_vf_hflip (void)
 
void checkasm_check_vf_threshold (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 struct CheckasmPerfcheckasm_get_perf_context (void)
 
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)
 
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)
 
 DECL_CHECKASM_CHECK_FUNC (uint8_t)
 
 DECL_CHECKASM_CHECK_FUNC (uint16_t)
 
 DECL_CHECKASM_CHECK_FUNC (int16_t)
 
 DECL_CHECKASM_CHECK_FUNC (int32_t)
 

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)

Definition at line 107 of file checkasm.h.

◆ BENCH_RUNS

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

Definition at line 111 of file checkasm.h.

◆ check_func

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

Definition at line 114 of file checkasm.h.

◆ declare_func

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

Definition at line 118 of file checkasm.h.

◆ declare_func_float

#define declare_func_float (   ret,
  ... 
)    declare_new_float(ret, __VA_ARGS__) typedef ret func_type(__VA_ARGS__)

Definition at line 119 of file checkasm.h.

◆ declare_func_emms

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

Definition at line 120 of file checkasm.h.

◆ fail

#define fail ( )    checkasm_fail_func("%s:%d", av_basename(__FILE__), __LINE__)
Examples
filter_audio.c, hw_decode.c, qsvdec.c, and vaapi_transcode.c.

Definition at line 123 of file checkasm.h.

◆ report

#define report   checkasm_report

Definition at line 126 of file checkasm.h.

◆ call_ref

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

Definition at line 129 of file checkasm.h.

◆ declare_new

#define declare_new (   ret,
  ... 
)

Definition at line 197 of file checkasm.h.

◆ declare_new_float

#define declare_new_float (   ret,
  ... 
)

Definition at line 198 of file checkasm.h.

◆ declare_new_emms

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

Definition at line 199 of file checkasm.h.

◆ call_new

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

Definition at line 201 of file checkasm.h.

◆ bench_new

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

Definition at line 261 of file checkasm.h.

◆ PERF_START

#define PERF_START (   t)    while(0)

Definition at line 262 of file checkasm.h.

◆ PERF_STOP

#define PERF_STOP (   t)    while(0)

Definition at line 263 of file checkasm.h.

◆ DECL_CHECKASM_CHECK_FUNC

#define DECL_CHECKASM_CHECK_FUNC (   type)
Value:
int checkasm_check_##type(const char *const file, const int line, \
const type *const buf1, const ptrdiff_t stride1, \
const type *const buf2, const ptrdiff_t stride2, \
const int w, const int h, const char *const name)

Definition at line 266 of file checkasm.h.

◆ PASTE

#define PASTE (   a,
  b 
)    a ## b

Definition at line 277 of file checkasm.h.

◆ CONCAT

#define CONCAT (   a,
  b 
)    PASTE(a,b)

Definition at line 278 of file checkasm.h.

◆ checkasm_check

#define checkasm_check (   prefix,
  ... 
)    CONCAT(checkasm_check_, prefix)(__FILE__, __LINE__, __VA_ARGS__)

Definition at line 280 of file checkasm.h.

Function Documentation

◆ checkasm_check_aacpsdsp()

void checkasm_check_aacpsdsp ( void  )

Definition at line 233 of file aacpsdsp.c.

◆ checkasm_check_afir()

void checkasm_check_afir ( void  )

Definition at line 79 of file af_afir.c.

◆ checkasm_check_alacdsp()

void checkasm_check_alacdsp ( void  )

Definition at line 115 of file alacdsp.c.

◆ checkasm_check_audiodsp()

void checkasm_check_audiodsp ( void  )

Definition at line 51 of file audiodsp.c.

◆ checkasm_check_blend()

void checkasm_check_blend ( void  )

Definition at line 88 of file vf_blend.c.

◆ checkasm_check_blockdsp()

void checkasm_check_blockdsp ( void  )

Definition at line 54 of file blockdsp.c.

◆ checkasm_check_bswapdsp()

void checkasm_check_bswapdsp ( void  )

Definition at line 59 of file bswapdsp.c.

◆ checkasm_check_colorspace()

void checkasm_check_colorspace ( void  )

Definition at line 308 of file vf_colorspace.c.

◆ checkasm_check_exrdsp()

void checkasm_check_exrdsp ( void  )

Definition at line 76 of file exrdsp.c.

◆ checkasm_check_fixed_dsp()

void checkasm_check_fixed_dsp ( void  )

Definition at line 132 of file fixed_dsp.c.

◆ checkasm_check_flacdsp()

void checkasm_check_flacdsp ( void  )

Definition at line 56 of file flacdsp.c.

◆ checkasm_check_float_dsp()

void checkasm_check_float_dsp ( void  )

Definition at line 280 of file float_dsp.c.

◆ checkasm_check_fmtconvert()

void checkasm_check_fmtconvert ( void  )

Definition at line 44 of file fmtconvert.c.

◆ checkasm_check_g722dsp()

void checkasm_check_g722dsp ( void  )

Definition at line 53 of file g722dsp.c.

◆ checkasm_check_h264dsp()

void checkasm_check_h264dsp ( void  )

Definition at line 441 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_add_res()

void checkasm_check_hevc_add_res ( void  )

Definition at line 85 of file hevc_add_res.c.

◆ checkasm_check_hevc_idct()

void checkasm_check_hevc_idct ( void  )

Definition at line 86 of file hevc_idct.c.

◆ checkasm_check_hevc_sao()

void checkasm_check_hevc_sao ( void  )

Definition at line 131 of file hevc_sao.c.

◆ checkasm_check_huffyuvdsp()

void checkasm_check_huffyuvdsp ( void  )

test width not multiple of mmsize

test always with the same size (for perf test)

Definition at line 67 of file huffyuvdsp.c.

◆ checkasm_check_jpeg2000dsp()

void checkasm_check_jpeg2000dsp ( void  )

Definition at line 91 of file jpeg2000dsp.c.

◆ checkasm_check_llviddsp()

void checkasm_check_llviddsp ( void  )

Definition at line 195 of file llviddsp.c.

◆ checkasm_check_llviddspenc()

void checkasm_check_llviddspenc ( void  )

Definition at line 104 of file llviddspenc.c.

◆ checkasm_check_nlmeans()

void checkasm_check_nlmeans ( void  )

Definition at line 31 of file vf_nlmeans.c.

◆ checkasm_check_opusdsp()

void checkasm_check_opusdsp ( void  )

Definition at line 83 of file opusdsp.c.

◆ checkasm_check_pixblockdsp()

void checkasm_check_pixblockdsp ( void  )

Definition at line 81 of file pixblockdsp.c.

◆ checkasm_check_sbrdsp()

void checkasm_check_sbrdsp ( void  )

Definition at line 252 of file sbrdsp.c.

◆ checkasm_check_synth_filter()

void checkasm_check_synth_filter ( void  )

Definition at line 44 of file synth_filter.c.

◆ checkasm_check_sw_rgb()

void checkasm_check_sw_rgb ( void  )

Definition at line 182 of file sw_rgb.c.

◆ checkasm_check_sw_scale()

void checkasm_check_sw_scale ( void  )

Definition at line 130 of file sw_scale.c.

◆ checkasm_check_utvideodsp()

void checkasm_check_utvideodsp ( void  )

Definition at line 90 of file utvideodsp.c.

◆ checkasm_check_v210dec()

void checkasm_check_v210dec ( void  )

Definition at line 47 of file v210dec.c.

◆ checkasm_check_v210enc()

void checkasm_check_v210enc ( void  )

Definition at line 81 of file v210enc.c.

◆ checkasm_check_vf_eq()

void checkasm_check_vf_eq ( void  )

Definition at line 75 of file vf_eq.c.

◆ checkasm_check_vf_gblur()

void checkasm_check_vf_gblur ( void  )

Definition at line 36 of file vf_gblur.c.

◆ checkasm_check_vf_hflip()

void checkasm_check_vf_hflip ( void  )

Definition at line 69 of file vf_hflip.c.

◆ checkasm_check_vf_threshold()

void checkasm_check_vf_threshold ( void  )

Definition at line 78 of file vf_threshold.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 625 of file vp9dsp.c.

◆ checkasm_check_videodsp()

void checkasm_check_videodsp ( void  )

Definition at line 80 of file videodsp.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 773 of file checkasm.c.

◆ checkasm_fail_func()

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

◆ checkasm_get_perf_context()

void struct CheckasmPerf* checkasm_get_perf_context ( void  )

Definition at line 798 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 284 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 
)

◆ float_near_abs_eps_ulp()

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

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

Referenced by checkasm_check_audiodsp(), and checkasm_check_fmtconvert().

◆ float_near_abs_eps_array()

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

◆ 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 342 of file checkasm.c.

◆ double_near_abs_eps()

int double_near_abs_eps ( double  a,
double  b,
double  eps 
)

◆ double_near_abs_eps_array()

int double_near_abs_eps_array ( const double *  a,
const double *  b,
double  eps,
unsigned  len 
)

Definition at line 361 of file checkasm.c.

◆ DECL_CHECKASM_CHECK_FUNC() [1/4]

DECL_CHECKASM_CHECK_FUNC ( uint8_t  )

◆ DECL_CHECKASM_CHECK_FUNC() [2/4]

DECL_CHECKASM_CHECK_FUNC ( uint16_t  )

◆ DECL_CHECKASM_CHECK_FUNC() [3/4]

DECL_CHECKASM_CHECK_FUNC ( int16_t  )

◆ DECL_CHECKASM_CHECK_FUNC() [4/4]

DECL_CHECKASM_CHECK_FUNC ( int32_t  )

Variable Documentation

◆ checkasm_lfg

AVLFG checkasm_lfg

Definition at line 276 of file checkasm.c.

Referenced by main().

◆ func_ref

av_unused void* func_ref
static

Definition at line 109 of file checkasm.h.

◆ func_new

av_unused void * func_new
static

Definition at line 109 of file checkasm.h.

name
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf default minimum maximum flags name is the option name
Definition: writing_filters.txt:88
type
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf type
Definition: writing_filters.txt:86
line
Definition: graph2dot.c:48
w
FFmpeg Automated Testing Environment ************************************Introduction Using FATE from your FFmpeg source directory Submitting the results to the FFmpeg result aggregation server Uploading new samples to the fate suite FATE makefile targets and variables Makefile targets Makefile variables Examples Introduction **************FATE is an extended regression suite on the client side and a means for results aggregation and presentation on the server side The first part of this document explains how you can use FATE from your FFmpeg source directory to test your ffmpeg binary The second part describes how you can run FATE to submit the results to FFmpeg’s FATE server In any way you can have a look at the publicly viewable FATE results by visiting this as it can be seen if some test on some platform broke with their recent contribution This usually happens on the platforms the developers could not test on The second part of this document describes how you can run FATE to submit your results to FFmpeg’s FATE server If you want to submit your results be sure to check that your combination of OS and compiler is not already listed on the above mentioned website In the third part you can find a comprehensive listing of FATE makefile targets and variables Using FATE from your FFmpeg source directory **********************************************If you want to run FATE on your machine you need to have the samples in place You can get the samples via the build target fate rsync Use this command from the top level source this will cause FATE to fail NOTE To use a custom wrapper to run the pass ‘ target exec’ to ‘configure’ or set the TARGET_EXEC Make variable Submitting the results to the FFmpeg result aggregation server ****************************************************************To submit your results to the server you should run fate through the shell script ‘tests fate sh’ from the FFmpeg sources This script needs to be invoked with a configuration file as its first argument tests fate sh path to fate_config A configuration file template with comments describing the individual configuration variables can be found at ‘doc fate_config sh template’ Create a configuration that suits your based on the configuration template The ‘slot’ configuration variable can be any string that is not yet but it is suggested that you name it adhering to the following pattern ‘ARCH OS COMPILER COMPILER VERSION’ The configuration file itself will be sourced in a shell therefore all shell features may be used This enables you to setup the environment as you need it for your build For your first test runs the ‘fate_recv’ variable should be empty or commented out This will run everything as normal except that it will omit the submission of the results to the server The following files should be present in $workdir as specified in the configuration it may help to try out the ‘ssh’ command with one or more ‘ v’ options You should get detailed output concerning your SSH configuration and the authentication process The only thing left is to automate the execution of the fate sh script and the synchronisation of the samples directory Uploading new samples to the fate suite *****************************************If you need a sample uploaded send a mail to samples request This is for developers who have an account on the fate suite server If you upload new please make sure they are as small as space on each network bandwidth and so on benefit from smaller test cases Also keep in mind older checkouts use existing sample that means in practice generally do not remove or overwrite files as it likely would break older checkouts or releases Also all needed samples for a commit should be ideally before the push If you need an account for frequently uploading samples or you wish to help others by doing that send a mail to ffmpeg devel rsync vauL Duo ug o o w
Definition: fate.txt:150
file
FFmpeg Automated Testing Environment ************************************Introduction Using FATE from your FFmpeg source directory Submitting the results to the FFmpeg result aggregation server Uploading new samples to the fate suite FATE makefile targets and variables Makefile targets Makefile variables Examples Introduction **************FATE is an extended regression suite on the client side and a means for results aggregation and presentation on the server side The first part of this document explains how you can use FATE from your FFmpeg source directory to test your ffmpeg binary The second part describes how you can run FATE to submit the results to FFmpeg’s FATE server In any way you can have a look at the publicly viewable FATE results by visiting this as it can be seen if some test on some platform broke with their recent contribution This usually happens on the platforms the developers could not test on The second part of this document describes how you can run FATE to submit your results to FFmpeg’s FATE server If you want to submit your results be sure to check that your combination of OS and compiler is not already listed on the above mentioned website In the third part you can find a comprehensive listing of FATE makefile targets and variables Using FATE from your FFmpeg source directory **********************************************If you want to run FATE on your machine you need to have the samples in place You can get the samples via the build target fate rsync Use this command from the top level source this will cause FATE to fail NOTE To use a custom wrapper to run the pass ‘ target exec’ to ‘configure’ or set the TARGET_EXEC Make variable Submitting the results to the FFmpeg result aggregation server ****************************************************************To submit your results to the server you should run fate through the shell script ‘tests fate sh’ from the FFmpeg sources This script needs to be invoked with a configuration file as its first argument tests fate sh path to fate_config A configuration file template with comments describing the individual configuration variables can be found at ‘doc fate_config sh template’ Create a configuration that suits your based on the configuration template The ‘slot’ configuration variable can be any string that is not yet but it is suggested that you name it adhering to the following pattern ‘ARCH OS COMPILER COMPILER VERSION’ The configuration file itself will be sourced in a shell therefore all shell features may be used This enables you to setup the environment as you need it for your build For your first test runs the ‘fate_recv’ variable should be empty or commented out This will run everything as normal except that it will omit the submission of the results to the server The following files should be present in $workdir as specified in the configuration file
Definition: fate.txt:125
h
h
Definition: vp9dsp_template.c:2038