FFmpeg
checkasm.c
Go to the documentation of this file.
1 /*
2  * Assembly testing and benchmarking tool
3  * Copyright (c) 2025 Niklas Haas
4  * Copyright (c) 2015 Henrik Gramner
5  * Copyright (c) 2008 Loren Merritt
6  *
7  * This file is part of FFmpeg.
8  *
9  * FFmpeg is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 2 of the License, or
12  * (at your option) any later version.
13  *
14  * FFmpeg is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License along
20  * with FFmpeg; if not, write to the Free Software Foundation, Inc.,
21  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
22  *
23  * Copyright © 2018, VideoLAN and dav1d authors
24  * Copyright © 2018, Two Orioles, LLC
25  * All rights reserved.
26  *
27  * Redistribution and use in source and binary forms, with or without
28  * modification, are permitted provided that the following conditions are met:
29  *
30  * 1. Redistributions of source code must retain the above copyright notice, this
31  * list of conditions and the following disclaimer.
32  *
33  * 2. Redistributions in binary form must reproduce the above copyright notice,
34  * this list of conditions and the following disclaimer in the documentation
35  * and/or other materials provided with the distribution.
36  *
37  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
38  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
39  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
40  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
41  * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
42  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
43  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
44  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
45  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
46  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
47  */
48 
49 #include "config.h"
50 #include "config_components.h"
51 
52 #include <checkasm/checkasm.h>
53 
54 #include "checkasm.h"
55 
56 /* List of tests to invoke */
57 static const CheckasmTest tests[] = {
58  /* NOTE: When adding a new test to this list here, it also needs to be
59  * added in tests/fate/checkasm.mak, otherwise it doesn't get executed
60  * as part of "make fate" or "make fate-checkasm". */
61 #if CONFIG_AVCODEC
62  #if CONFIG_AAC_DECODER
63  { "aacpsdsp", checkasm_check_aacpsdsp },
64  { "sbrdsp", checkasm_check_sbrdsp },
65  #endif
66  #if CONFIG_AAC_ENCODER
67  { "aacencdsp", checkasm_check_aacencdsp },
68  #endif
69  #if CONFIG_AC3DSP
70  { "ac3dsp", checkasm_check_ac3dsp },
71  #endif
72  #if CONFIG_ALAC_DECODER
73  { "alacdsp", checkasm_check_alacdsp },
74  #endif
75  #if CONFIG_APV_DECODER
76  { "apv_dsp", checkasm_check_apv_dsp },
77  #endif
78  #if CONFIG_AUDIODSP
79  { "audiodsp", checkasm_check_audiodsp },
80  #endif
81  #if CONFIG_BLOCKDSP
82  { "blockdsp", checkasm_check_blockdsp },
83  #endif
84  #if CONFIG_BSWAPDSP
85  { "bswapdsp", checkasm_check_bswapdsp },
86  #endif
87  #if CONFIG_CAVS_DECODER
88  { "cavsdsp", checkasm_check_cavsdsp },
89  #endif
90  #if CONFIG_DCA_DECODER
91  { "dcadsp", checkasm_check_dcadsp },
92  { "synth_filter", checkasm_check_synth_filter },
93  #endif
94  #if CONFIG_DIRAC_DECODER
95  { "diracdsp", checkasm_check_diracdsp },
96  #endif
97  #if CONFIG_EXR_DECODER
98  { "exrdsp", checkasm_check_exrdsp },
99  #endif
100  #if CONFIG_FDCTDSP
101  { "fdctdsp", checkasm_check_fdctdsp },
102  #endif
103  #if CONFIG_FLAC_DECODER
104  { "flacdsp", checkasm_check_flacdsp },
105  #endif
106  #if CONFIG_FMTCONVERT
107  { "fmtconvert", checkasm_check_fmtconvert },
108  #endif
109  #if CONFIG_G722DSP
110  { "g722dsp", checkasm_check_g722dsp },
111  #endif
112  #if CONFIG_H263DSP
113  { "h263dsp", checkasm_check_h263dsp },
114  #endif
115  #if CONFIG_H264CHROMA
116  { "h264chroma", checkasm_check_h264chroma },
117  #endif
118  #if CONFIG_H264DSP
119  { "h264dsp", checkasm_check_h264dsp },
120  #endif
121  #if CONFIG_H264PRED
122  { "h264pred", checkasm_check_h264pred },
123  #endif
124  #if CONFIG_H264QPEL
125  { "h264qpel", checkasm_check_h264qpel },
126  #endif
127  #if CONFIG_HEVC_DECODER
128  { "hevc_add_res", checkasm_check_hevc_add_res },
129  { "hevc_deblock", checkasm_check_hevc_deblock },
130  { "hevc_dequant", checkasm_check_hevc_dequant },
131  { "hevc_idct", checkasm_check_hevc_idct },
132  { "hevc_pel", checkasm_check_hevc_pel },
133  { "hevc_pred", checkasm_check_hevc_pred },
134  { "hevc_sao", checkasm_check_hevc_sao },
135  #endif
136  #if CONFIG_HPELDSP
137  { "hpeldsp", checkasm_check_hpeldsp },
138  #endif
139  #if CONFIG_HUFFYUVDSP
140  { "huffyuvdsp", checkasm_check_huffyuvdsp },
141  #endif
142  #if CONFIG_HUFFYUVENCDSP
143  { "huffyuvencdsp", checkasm_check_huffyuvencdsp },
144  #endif
145  #if CONFIG_IDCTDSP
146  { "idctdsp", checkasm_check_idctdsp },
147  #endif
148  #if CONFIG_JPEG2000_DECODER
149  { "jpeg2000dsp", checkasm_check_jpeg2000dsp },
150  #endif
151  #if CONFIG_LLAUDDSP
152  { "llauddsp", checkasm_check_llauddsp },
153  #endif
154  #if CONFIG_HUFFYUVDSP
155  { "llviddsp", checkasm_check_llviddsp },
156  #endif
157  #if CONFIG_LLVIDENCDSP
158  { "llvidencdsp", checkasm_check_llvidencdsp },
159  #endif
160  #if CONFIG_LPC
161  { "lpc", checkasm_check_lpc },
162  #endif
163  #if CONFIG_ME_CMP
164  { "motion", checkasm_check_motion },
165  #endif
166  #if CONFIG_MPEG4_DECODER
167  { "mpeg4videodsp", checkasm_check_mpeg4videodsp },
168  #endif
169  #if CONFIG_MPEGVIDEO
170  { "mpegvideo_unquantize", checkasm_check_mpegvideo_unquantize },
171  #endif
172  #if CONFIG_MPEGVIDEOENCDSP
173  { "mpegvideoencdsp", checkasm_check_mpegvideoencdsp },
174  #endif
175  #if CONFIG_OPUS_DECODER
176  { "opusdsp", checkasm_check_opusdsp },
177  #endif
178  #if CONFIG_PIXBLOCKDSP
179  { "pixblockdsp", checkasm_check_pixblockdsp },
180  #endif
181  #if CONFIG_PNG_DECODER
182  { "png", checkasm_check_png },
183  #endif
184  #if CONFIG_QPELDSP
185  { "qpeldsp", checkasm_check_qpeldsp },
186  #endif
187  #if CONFIG_RV34DSP
188  { "rv34dsp", checkasm_check_rv34dsp },
189  #endif
190  #if CONFIG_RV40_DECODER
191  { "rv40dsp", checkasm_check_rv40dsp },
192  #endif
193  #if CONFIG_SBC_ENCODER
194  { "sbcdsp", checkasm_check_sbcdsp },
195  #endif
196  #if CONFIG_SNOW_DECODER
197  { "snowdsp", checkasm_check_snowdsp },
198  #endif
199  #if CONFIG_SVQ1_ENCODER
200  { "svq1enc", checkasm_check_svq1enc },
201  #endif
202  #if CONFIG_TAK_DECODER
203  { "takdsp", checkasm_check_takdsp },
204  #endif
205  #if CONFIG_UTVIDEO_DECODER
206  { "utvideodsp", checkasm_check_utvideodsp },
207  #endif
208  #if CONFIG_V210_DECODER
209  { "v210dec", checkasm_check_v210dec },
210  #endif
211  #if CONFIG_V210_ENCODER
212  { "v210enc", checkasm_check_v210enc },
213  #endif
214  #if CONFIG_VC1DSP
215  { "vc1dsp", checkasm_check_vc1dsp },
216  #endif
217  #if CONFIG_VP3DSP
218  { "vp3dsp", checkasm_check_vp3dsp },
219  #endif
220  #if CONFIG_VP6_DECODER
221  { "vp6dsp", checkasm_check_vp6dsp },
222  #endif
223  #if CONFIG_VP8DSP
224  { "vp8dsp", checkasm_check_vp8dsp },
225  #endif
226  #if CONFIG_VP9_DECODER
227  { "vp9dsp", checkasm_check_vp9dsp }, // all of the below
228  { "vp9_ipred", checkasm_check_vp9_ipred },
229  { "vp9_itxfm", checkasm_check_vp9_itxfm },
230  { "vp9_loopfilter", checkasm_check_vp9_loopfilter },
231  { "vp9_mc", checkasm_check_vp9_mc },
232  #endif
233  #if CONFIG_VIDEODSP
234  { "videodsp", checkasm_check_videodsp },
235  #endif
236  #if CONFIG_VORBIS_DECODER
237  { "vorbisdsp", checkasm_check_vorbisdsp },
238  #endif
239  #if CONFIG_VVC_DECODER
240  { "vvc_alf", checkasm_check_vvc_alf },
241  { "vvc_mc", checkasm_check_vvc_mc },
242  { "vvc_sao", checkasm_check_vvc_sao },
243  #endif
244 #endif
245 #if CONFIG_AVFILTER
246  #if CONFIG_SCENE_SAD
247  { "scene_sad", checkasm_check_scene_sad },
248  #endif
249  #if CONFIG_AFIR_FILTER
250  { "af_afir", checkasm_check_afir },
251  #endif
252  #if CONFIG_BLACKDETECT_FILTER
253  { "vf_blackdetect", checkasm_check_blackdetect },
254  #endif
255  #if CONFIG_BLEND_FILTER
256  { "vf_blend", checkasm_check_blend },
257  #endif
258  #if CONFIG_BWDIF_FILTER
259  { "vf_bwdif", checkasm_check_vf_bwdif },
260  #endif
261  #if CONFIG_COLORDETECT_FILTER
262  { "vf_colordetect", checkasm_check_colordetect },
263  #endif
264  #if CONFIG_COLORSPACE_FILTER
265  { "vf_colorspace", checkasm_check_colorspace },
266  #endif
267  #if CONFIG_EQ_FILTER
268  { "vf_eq", checkasm_check_vf_eq },
269  #endif
270  #if CONFIG_FSPP_FILTER
271  { "vf_fspp", checkasm_check_vf_fspp },
272  #endif
273  #if CONFIG_GBLUR_FILTER
274  { "vf_gblur", checkasm_check_vf_gblur },
275  #endif
276  #if CONFIG_HFLIP_FILTER
277  { "vf_hflip", checkasm_check_vf_hflip },
278  #endif
279  #if CONFIG_IDET_FILTER
280  { "vf_idet", checkasm_check_idet },
281  #endif
282  #if CONFIG_NLMEANS_FILTER
283  { "vf_nlmeans", checkasm_check_nlmeans },
284  #endif
285  #if CONFIG_PP7_FILTER
286  { "vf_pp7", checkasm_check_vf_pp7 },
287  #endif
288  #if CONFIG_THRESHOLD_FILTER
289  { "vf_threshold", checkasm_check_vf_threshold },
290  #endif
291  #if CONFIG_SOBEL_FILTER
292  { "vf_sobel", checkasm_check_vf_sobel },
293  #endif
294 #endif
295 #if CONFIG_SWSCALE
296  { "sw_gbrp", checkasm_check_sw_gbrp },
297  { "sw_range_convert", checkasm_check_sw_range_convert },
298  { "sw_rgb", checkasm_check_sw_rgb },
299  { "sw_scale", checkasm_check_sw_scale },
300  { "sw_xyz2rgb", checkasm_check_sw_xyz2rgb },
301  { "sw_yuv2rgb", checkasm_check_sw_yuv2rgb },
302  { "sw_yuv2yuv", checkasm_check_sw_yuv2yuv },
303  { "sw_ops", checkasm_check_sw_ops },
304 #endif
305 #if CONFIG_AVUTIL
306  { "aes", checkasm_check_aes },
307  { "crc", checkasm_check_crc },
308  { "fixed_dsp", checkasm_check_fixed_dsp },
309  { "float_dsp", checkasm_check_float_dsp },
310  { "lls", checkasm_check_lls },
311 #if CONFIG_PIXELUTILS
312  { "pixelutils",checkasm_check_pixelutils },
313 #endif
314  { "av_tx", checkasm_check_av_tx },
315 #endif
316  { NULL }
317  /* NOTE: When adding a new test to this list here, it also needs to be
318  * added in tests/fate/checkasm.mak, otherwise it doesn't get executed
319  * as part of "make fate" or "make fate-checkasm". */
320 };
321 
322 /* List of cpu flags to check */
323 static const CheckasmCpuInfo cpuflags[] = {
324 #if ARCH_AARCH64
325  { "ARMV8", "armv8", AV_CPU_FLAG_ARMV8 },
326  { "NEON", "neon", AV_CPU_FLAG_NEON },
327  { "DOTPROD", "dotprod", AV_CPU_FLAG_DOTPROD },
328  { "I8MM", "i8mm", AV_CPU_FLAG_I8MM },
329  { "SVE", "sve", AV_CPU_FLAG_SVE },
330  { "SVE2", "sve2", AV_CPU_FLAG_SVE2 },
331  { "SME", "sme", AV_CPU_FLAG_SME },
332  { "SME-I16I64", "sme_i16i64", AV_CPU_FLAG_SME_I16I64 },
333  { "CRC", "crc", AV_CPU_FLAG_ARM_CRC },
334  { "SME2", "sme2", AV_CPU_FLAG_SME2 },
335  { "PMULL", "pmull_eor3", AV_CPU_FLAG_PMULL|AV_CPU_FLAG_EOR3 },
336 #elif ARCH_ARM
337  { "ARMV5TE", "armv5te", AV_CPU_FLAG_ARMV5TE },
338  { "ARMV6", "armv6", AV_CPU_FLAG_ARMV6 },
339  { "ARMV6T2", "armv6t2", AV_CPU_FLAG_ARMV6T2 },
340  { "VFP", "vfp", AV_CPU_FLAG_VFP },
341  { "VFP_VM", "vfp_vm", AV_CPU_FLAG_VFP_VM },
342  { "VFPV3", "vfp3", AV_CPU_FLAG_VFPV3 },
343  { "NEON", "neon", AV_CPU_FLAG_NEON },
344 #elif ARCH_PPC
345  { "ALTIVEC", "altivec", AV_CPU_FLAG_ALTIVEC },
346  { "VSX", "vsx", AV_CPU_FLAG_VSX },
347  { "POWER8", "power8", AV_CPU_FLAG_POWER8 },
348 #elif ARCH_RISCV
349  { "RVI", "rvi", AV_CPU_FLAG_RVI },
350  { "misaligned", "misaligned", AV_CPU_FLAG_RV_MISALIGNED },
351  { "RV_zbb", "rvb_b", AV_CPU_FLAG_RVB_BASIC },
352  { "RVB", "rvb", AV_CPU_FLAG_RVB },
353  { "RV_zve32x","rvv_i32", AV_CPU_FLAG_RVV_I32 },
354  { "RV_zve32f","rvv_f32", AV_CPU_FLAG_RVV_F32 },
355  { "RV_zve64x","rvv_i64", AV_CPU_FLAG_RVV_I64 },
356  { "RV_zve64d","rvv_f64", AV_CPU_FLAG_RVV_F64 },
357  { "RV_zvbb", "rv_zvbb", AV_CPU_FLAG_RV_ZVBB },
358 #elif ARCH_MIPS
359  { "MMI", "mmi", AV_CPU_FLAG_MMI },
360  { "MSA", "msa", AV_CPU_FLAG_MSA },
361 #elif ARCH_X86
362  { "MMX", "mmx", AV_CPU_FLAG_MMX|AV_CPU_FLAG_CMOV },
363  { "MMXEXT", "mmxext", AV_CPU_FLAG_MMXEXT },
364  { "SSE", "sse", AV_CPU_FLAG_SSE },
365  { "SSE2", "sse2", AV_CPU_FLAG_SSE2|AV_CPU_FLAG_SSE2SLOW },
366  { "SSE3", "sse3", AV_CPU_FLAG_SSE3|AV_CPU_FLAG_SSE3SLOW },
367  { "SSSE3", "ssse3", AV_CPU_FLAG_SSSE3|AV_CPU_FLAG_ATOM },
368  { "SSE4.1", "sse4", AV_CPU_FLAG_SSE4 },
369  { "SSE4.2", "sse42", AV_CPU_FLAG_SSE42 },
370  { "AES-NI", "aesni", AV_CPU_FLAG_AESNI },
371  { "CLMUL", "clmul", AV_CPU_FLAG_CLMUL },
372  { "AVX", "avx", AV_CPU_FLAG_AVX },
373  { "XOP", "xop", AV_CPU_FLAG_XOP },
374  { "FMA3", "fma3", AV_CPU_FLAG_FMA3 },
375  { "FMA4", "fma4", AV_CPU_FLAG_FMA4 },
376  { "AVX2", "avx2", AV_CPU_FLAG_AVX2 },
377  { "AVX-512", "avx512", AV_CPU_FLAG_AVX512 },
378  { "AVX-512ICL", "avx512icl", AV_CPU_FLAG_AVX512ICL },
379 #elif ARCH_LOONGARCH
380  { "LSX", "lsx", AV_CPU_FLAG_LSX },
381  { "LASX", "lasx", AV_CPU_FLAG_LASX },
382 #elif ARCH_WASM
383  { "SIMD128", "simd128", AV_CPU_FLAG_SIMD128 },
384 #endif
385  { NULL }
386 };
387 
388 static void set_cpu_flags(uint64_t flags)
389 {
390  av_force_cpu_flags((int) flags);
391 }
392 
393 int main(int argc, const char *argv[])
394 {
395  CheckasmConfig cfg = {
396  .cpu_flags = cpuflags,
397  .tests = tests,
398  .set_cpu_flags = set_cpu_flags,
399  .cpu = av_get_cpu_flags(),
400  };
401 
402  return checkasm_main(&cfg, argc, argv);
403 }
checkasm_check_nlmeans
void checkasm_check_nlmeans(void)
Definition: vf_nlmeans.c:34
flags
const SwsFlags flags[]
Definition: swscale.c:85
checkasm_check_sw_gbrp
void checkasm_check_sw_gbrp(void)
Definition: sw_gbrp.c:398
checkasm_check_vp8dsp
void checkasm_check_vp8dsp(void)
Definition: vp8dsp.c:511
checkasm_check_idet
void checkasm_check_idet(void)
Definition: vf_idet.c:58
checkasm_check_blockdsp
void checkasm_check_blockdsp(void)
Definition: blockdsp.c:78
checkasm_check_fdctdsp
void checkasm_check_fdctdsp(void)
Definition: fdctdsp.c:67
checkasm_check_sw_xyz2rgb
void checkasm_check_sw_xyz2rgb(void)
Definition: sw_xyz2rgb.c:104
checkasm_check_videodsp
void checkasm_check_videodsp(void)
Definition: videodsp.c:80
checkasm_check_vf_eq
void checkasm_check_vf_eq(void)
Definition: vf_eq.c:76
checkasm_check_dcadsp
void checkasm_check_dcadsp(void)
Definition: dcadsp.c:89
AV_CPU_FLAG_RVB_BASIC
#define AV_CPU_FLAG_RVB_BASIC
Basic bit-manipulations.
Definition: cpu.h:105
AV_CPU_FLAG_MSA
#define AV_CPU_FLAG_MSA
Definition: cpu.h:89
AV_CPU_FLAG_SME
#define AV_CPU_FLAG_SME
Definition: cpu.h:80
checkasm_check_alacdsp
void checkasm_check_alacdsp(void)
Definition: alacdsp.c:116
AV_CPU_FLAG_LASX
#define AV_CPU_FLAG_LASX
Definition: cpu.h:93
checkasm_check_v210dec
void checkasm_check_v210dec(void)
Definition: v210dec.c:47
checkasm_check_sw_yuv2yuv
void checkasm_check_sw_yuv2yuv(void)
Definition: sw_yuv2yuv.c:130
checkasm_check_png
void checkasm_check_png(void)
Definition: png.c:106
AV_CPU_FLAG_MMXEXT
#define AV_CPU_FLAG_MMXEXT
SSE integer functions or AMD MMX ext.
Definition: cpu.h:33
tests
static const CheckasmTest tests[]
Definition: checkasm.c:57
checkasm_check_hevc_idct
void checkasm_check_hevc_idct(void)
Definition: hevc_idct.c:108
checkasm_check_sw_scale
void checkasm_check_sw_scale(void)
Definition: sw_scale.c:460
checkasm_check_afir
void checkasm_check_afir(void)
Definition: af_afir.c:132
AV_CPU_FLAG_POWER8
#define AV_CPU_FLAG_POWER8
ISA 2.07.
Definition: cpu.h:66
checkasm_check_aes
void checkasm_check_aes(void)
Definition: aes.c:28
AV_CPU_FLAG_ARMV8
#define AV_CPU_FLAG_ARMV8
Definition: cpu.h:74
AV_CPU_FLAG_CMOV
#define AV_CPU_FLAG_CMOV
supports cmov instruction
Definition: cpu.h:55
AV_CPU_FLAG_SSSE3
#define AV_CPU_FLAG_SSSE3
Conroe SSSE3 functions.
Definition: cpu.h:44
AV_CPU_FLAG_NEON
#define AV_CPU_FLAG_NEON
Definition: cpu.h:73
AV_CPU_FLAG_ARMV6
#define AV_CPU_FLAG_ARMV6
Definition: cpu.h:69
checkasm_check_aacpsdsp
void checkasm_check_aacpsdsp(void)
Definition: aacpsdsp.c:234
AV_CPU_FLAG_I8MM
#define AV_CPU_FLAG_I8MM
Definition: cpu.h:77
checkasm_check_vvc_sao
void checkasm_check_vvc_sao(void)
Definition: vvc_sao.c:134
AV_CPU_FLAG_RVI
#define AV_CPU_FLAG_RVI
I (full GPR bank)
Definition: cpu.h:96
checkasm_check_h264dsp
void checkasm_check_h264dsp(void)
Definition: h264dsp.c:503
AV_CPU_FLAG_CLMUL
#define AV_CPU_FLAG_CLMUL
Carry-less Multiplication instruction.
Definition: cpu.h:50
checkasm_check_vp9_ipred
void checkasm_check_vp9_ipred(void)
Definition: vp9dsp.c:50
AV_CPU_FLAG_AVX
#define AV_CPU_FLAG_AVX
AVX functions: requires OS support even if YMM registers aren't used.
Definition: cpu.h:51
AV_CPU_FLAG_AVX512
#define AV_CPU_FLAG_AVX512
AVX-512 functions: requires OS support even if YMM/ZMM registers aren't used.
Definition: cpu.h:60
checkasm_check_motion
void checkasm_check_motion(void)
Definition: motion.c:137
AV_CPU_FLAG_SIMD128
#define AV_CPU_FLAG_SIMD128
Definition: cpu.h:114
checkasm_check_h263dsp
void checkasm_check_h263dsp(void)
Definition: h263dsp.c:54
AV_CPU_FLAG_VFP
#define AV_CPU_FLAG_VFP
Definition: cpu.h:71
AV_CPU_FLAG_PMULL
#define AV_CPU_FLAG_PMULL
Definition: cpu.h:85
checkasm_check_vp9dsp
void checkasm_check_vp9dsp(void)
Definition: vp9dsp.c:627
checkasm.h
CheckasmConfig::cpu_flags
const CheckasmCpuInfo * cpu_flags
List of CPU flags understood by the implementation.
Definition: checkasm.h:168
checkasm_check_vf_threshold
void checkasm_check_vf_threshold(void)
Definition: vf_threshold.c:79
checkasm_check_vf_gblur
void checkasm_check_vf_gblur(void)
Definition: vf_gblur.c:82
AV_CPU_FLAG_RV_MISALIGNED
#define AV_CPU_FLAG_RV_MISALIGNED
Fast misaligned accesses.
Definition: cpu.h:110
CheckasmCpuInfo
Describes a CPU feature flag/capability.
Definition: checkasm.h:105
checkasm_check_vvc_mc
void checkasm_check_vvc_mc(void)
Definition: vvc_mc.c:471
checkasm_check_sbcdsp
void checkasm_check_sbcdsp(void)
Definition: sbcdsp.c:111
checkasm_check_sw_yuv2rgb
void checkasm_check_sw_yuv2rgb(void)
Definition: sw_yuv2rgb.c:251
AV_CPU_FLAG_SSE3
#define AV_CPU_FLAG_SSE3
Prescott SSE3 functions.
Definition: cpu.h:41
AV_CPU_FLAG_RVV_F32
#define AV_CPU_FLAG_RVV_F32
Vectors of float's *‍/.
Definition: cpu.h:102
checkasm_check_float_dsp
void checkasm_check_float_dsp(void)
Definition: float_dsp.c:285
AV_CPU_FLAG_AVX512ICL
#define AV_CPU_FLAG_AVX512ICL
F/CD/BW/DQ/VL/VNNI/IFMA/VBMI/VBMI2/VPOPCNTDQ/BITALG/GFNI/VAES/VPCLMULQDQ.
Definition: cpu.h:61
AV_CPU_FLAG_DOTPROD
#define AV_CPU_FLAG_DOTPROD
Definition: cpu.h:76
AV_CPU_FLAG_SME2
#define AV_CPU_FLAG_SME2
Definition: cpu.h:82
checkasm_check_hevc_dequant
void checkasm_check_hevc_dequant(void)
Definition: hevc_dequant.c:65
checkasm_check_pixblockdsp
void checkasm_check_pixblockdsp(void)
Definition: pixblockdsp.c:82
checkasm_check_vf_bwdif
void checkasm_check_vf_bwdif(void)
Definition: vf_bwdif.c:72
checkasm_check_sw_rgb
void checkasm_check_sw_rgb(void)
Definition: sw_rgb.c:804
checkasm_check_hevc_sao
void checkasm_check_hevc_sao(void)
Definition: hevc_sao.c:136
AV_CPU_FLAG_ARMV5TE
#define AV_CPU_FLAG_ARMV5TE
Definition: cpu.h:68
AV_CPU_FLAG_SSE2
#define AV_CPU_FLAG_SSE2
PIV SSE2 functions.
Definition: cpu.h:37
av_get_cpu_flags
int av_get_cpu_flags(void)
Return the flags which specify extensions supported by the CPU.
Definition: cpu.c:109
AV_CPU_FLAG_FMA3
#define AV_CPU_FLAG_FMA3
Haswell FMA3 functions.
Definition: cpu.h:57
cpuflags
static const CheckasmCpuInfo cpuflags[]
Definition: checkasm.c:323
checkasm_check_hevc_pel
void checkasm_check_hevc_pel(void)
Definition: hevc_pel.c:621
AV_CPU_FLAG_SSE2SLOW
#define AV_CPU_FLAG_SSE2SLOW
SSE2 supported, but usually not faster.
Definition: cpu.h:38
AV_CPU_FLAG_EOR3
#define AV_CPU_FLAG_EOR3
Definition: cpu.h:86
checkasm_check_aacencdsp
void checkasm_check_aacencdsp(void)
Definition: aacencdsp.c:100
checkasm_check_mpeg4videodsp
void checkasm_check_mpeg4videodsp(void)
Definition: mpeg4videodsp.c:146
NULL
#define NULL
Definition: coverity.c:32
checkasm_check_takdsp
void checkasm_check_takdsp(void)
Definition: takdsp.c:145
checkasm_check_hevc_pred
void checkasm_check_hevc_pred(void)
Definition: hevc_pred.c:302
checkasm_check_sw_ops
void checkasm_check_sw_ops(void)
Definition: sw_ops.c:759
CheckasmTest
Describes a single test function.
Definition: checkasm.h:117
AV_CPU_FLAG_VFP_VM
#define AV_CPU_FLAG_VFP_VM
VFPv2 vector mode, deprecated in ARMv7-A and unavailable in various CPUs implementations.
Definition: cpu.h:75
checkasm_check_fmtconvert
void checkasm_check_fmtconvert(void)
Definition: fmtconvert.c:46
AV_CPU_FLAG_AVX2
#define AV_CPU_FLAG_AVX2
AVX2 functions: requires OS support even if YMM registers aren't used.
Definition: cpu.h:56
AV_CPU_FLAG_SVE
#define AV_CPU_FLAG_SVE
Definition: cpu.h:78
checkasm_check_vorbisdsp
void checkasm_check_vorbisdsp(void)
Definition: vorbisdsp.c:65
checkasm_check_cavsdsp
void checkasm_check_cavsdsp(void)
Definition: cavsdsp.c:116
checkasm_check_apv_dsp
void checkasm_check_apv_dsp(void)
Definition: apv_dsp.c:61
checkasm_check_hpeldsp
void checkasm_check_hpeldsp(void)
Definition: hpeldsp.c:54
checkasm_check_rv40dsp
void checkasm_check_rv40dsp(void)
Definition: rv40dsp.c:71
AV_CPU_FLAG_RVV_I64
#define AV_CPU_FLAG_RVV_I64
Vectors of 64-bit int's *‍/.
Definition: cpu.h:103
cfg
static CheckasmConfig cfg
Definition: checkasm.c:74
checkasm_check_vc1dsp
void checkasm_check_vc1dsp(void)
Definition: vc1dsp.c:476
AV_CPU_FLAG_MMI
#define AV_CPU_FLAG_MMI
Definition: cpu.h:88
checkasm_check_h264chroma
void checkasm_check_h264chroma(void)
Definition: h264chroma.c:83
main
int main(int argc, const char *argv[])
Definition: checkasm.c:393
AV_CPU_FLAG_SSE3SLOW
#define AV_CPU_FLAG_SSE3SLOW
SSE3 supported, but usually not faster.
Definition: cpu.h:42
checkasm_check_llauddsp
void checkasm_check_llauddsp(void)
Definition: llauddsp.c:108
checkasm_check_vp9_loopfilter
void checkasm_check_vp9_loopfilter(void)
Definition: vp9dsp.c:452
checkasm_check_llviddsp
void checkasm_check_llviddsp(void)
Definition: llviddsp.c:183
CheckasmConfig
Configuration structure for the checkasm test suite.
Definition: checkasm.h:158
checkasm_check_vp9_mc
void checkasm_check_vp9_mc(void)
Definition: vp9dsp.c:559
checkasm_check_vp3dsp
void checkasm_check_vp3dsp(void)
Definition: vp3dsp.c:193
checkasm_check_vf_pp7
void checkasm_check_vf_pp7(void)
Definition: vf_pp7.c:58
checkasm_check_diracdsp
void checkasm_check_diracdsp(void)
Definition: diracdsp.c:85
checkasm_check_h264pred
void checkasm_check_h264pred(void)
Definition: h264pred.c:233
checkasm_check_huffyuvdsp
void checkasm_check_huffyuvdsp(void)
Definition: huffyuvdsp.c:95
checkasm_check_fixed_dsp
void checkasm_check_fixed_dsp(void)
Definition: fixed_dsp.c:133
checkasm_check_colorspace
void checkasm_check_colorspace(void)
Definition: vf_colorspace.c:309
AV_CPU_FLAG_ALTIVEC
#define AV_CPU_FLAG_ALTIVEC
standard
Definition: cpu.h:64
checkasm_check_utvideodsp
void checkasm_check_utvideodsp(void)
Definition: utvideodsp.c:90
checkasm_check_audiodsp
void checkasm_check_audiodsp(void)
Definition: audiodsp.c:52
checkasm_check_huffyuvencdsp
void checkasm_check_huffyuvencdsp(void)
Definition: huffyuvencdsp.c:73
checkasm_check_sw_range_convert
void checkasm_check_sw_range_convert(void)
Definition: sw_range_convert.c:224
checkasm_check_mpegvideoencdsp
void checkasm_check_mpegvideoencdsp(void)
Definition: mpegvideoencdsp.c:191
checkasm_check_flacdsp
void checkasm_check_flacdsp(void)
Definition: flacdsp.c:155
AV_CPU_FLAG_XOP
#define AV_CPU_FLAG_XOP
Bulldozer XOP functions.
Definition: cpu.h:53
checkasm_check_idctdsp
void checkasm_check_idctdsp(void)
Definition: idctdsp.c:95
AV_CPU_FLAG_ARM_CRC
#define AV_CPU_FLAG_ARM_CRC
Definition: cpu.h:81
av_force_cpu_flags
void av_force_cpu_flags(int arg)
Disables cpu detection and forces the specified flags.
Definition: cpu.c:81
checkasm_check_synth_filter
void checkasm_check_synth_filter(void)
Definition: synth_filter.c:47
AV_CPU_FLAG_FMA4
#define AV_CPU_FLAG_FMA4
Bulldozer FMA4 functions.
Definition: cpu.h:54
AV_CPU_FLAG_RVV_I32
#define AV_CPU_FLAG_RVV_I32
Vectors of 8/16/32-bit int's *‍/.
Definition: cpu.h:101
AV_CPU_FLAG_SME_I16I64
#define AV_CPU_FLAG_SME_I16I64
Definition: cpu.h:83
checkasm_check_lpc
void checkasm_check_lpc(void)
Definition: lpc.c:96
AV_CPU_FLAG_VFPV3
#define AV_CPU_FLAG_VFPV3
Definition: cpu.h:72
checkasm_main
int checkasm_main(CheckasmConfig *config, int argc, const char *argv[])
Main entry point for checkasm test programs.
Definition: checkasm.c:1142
checkasm_check_g722dsp
void checkasm_check_g722dsp(void)
Definition: g722dsp.c:53
checkasm_check_ac3dsp
void checkasm_check_ac3dsp(void)
Definition: ac3dsp.c:193
checkasm_check_svq1enc
void checkasm_check_svq1enc(void)
Definition: svq1enc.c:63
checkasm_check_vf_hflip
void checkasm_check_vf_hflip(void)
Definition: vf_hflip.c:72
AV_CPU_FLAG_MMX
#define AV_CPU_FLAG_MMX
standard MMX
Definition: cpu.h:32
checkasm_check_lls
void checkasm_check_lls(void)
Definition: lls.c:73
AV_CPU_FLAG_RVV_F64
#define AV_CPU_FLAG_RVV_F64
Vectors of double's.
Definition: cpu.h:104
AV_CPU_FLAG_SVE2
#define AV_CPU_FLAG_SVE2
Definition: cpu.h:79
checkasm_check_scene_sad
void checkasm_check_scene_sad(void)
Definition: scene_sad.c:66
checkasm_check_blend
void checkasm_check_blend(void)
Definition: vf_blend.c:89
AV_CPU_FLAG_RVB
#define AV_CPU_FLAG_RVB
B (bit manipulations)
Definition: cpu.h:111
checkasm_check_bswapdsp
void checkasm_check_bswapdsp(void)
Definition: bswapdsp.c:60
checkasm_check_vf_fspp
void checkasm_check_vf_fspp(void)
Definition: vf_fspp.c:165
AV_CPU_FLAG_ARMV6T2
#define AV_CPU_FLAG_ARMV6T2
Definition: cpu.h:70
checkasm_check_h264qpel
void checkasm_check_h264qpel(void)
Definition: h264qpel.c:51
checkasm_check_colordetect
void checkasm_check_colordetect(void)
Definition: vf_colordetect.c:135
checkasm_check_mpegvideo_unquantize
void checkasm_check_mpegvideo_unquantize(void)
Definition: mpegvideo_unquantize.c:196
checkasm_check_vf_sobel
void checkasm_check_vf_sobel(void)
Definition: vf_convolution.c:100
checkasm_check_crc
void checkasm_check_crc(void)
Definition: crc.c:73
AV_CPU_FLAG_LSX
#define AV_CPU_FLAG_LSX
Definition: cpu.h:92
checkasm_check_vp6dsp
void checkasm_check_vp6dsp(void)
Definition: vp6dsp.c:39
checkasm_check_av_tx
void checkasm_check_av_tx(void)
Definition: av_tx.c:102
checkasm_check_qpeldsp
void checkasm_check_qpeldsp(void)
Definition: qpeldsp.c:52
AV_CPU_FLAG_ATOM
#define AV_CPU_FLAG_ATOM
Atom processor, some SSSE3 instructions are slower.
Definition: cpu.h:46
checkasm_check_vp9_itxfm
void checkasm_check_vp9_itxfm(void)
Definition: vp9dsp.c:311
checkasm_check_blackdetect
void checkasm_check_blackdetect(void)
Definition: vf_blackdetect.c:62
AV_CPU_FLAG_AESNI
#define AV_CPU_FLAG_AESNI
Advanced Encryption Standard functions.
Definition: cpu.h:49
checkasm_check_v210enc
void checkasm_check_v210enc(void)
Definition: v210enc.c:83
checkasm_check_sbrdsp
void checkasm_check_sbrdsp(void)
Definition: sbrdsp.c:257
checkasm_check_pixelutils
void checkasm_check_pixelutils(void)
Definition: pixelutils.c:95
AV_CPU_FLAG_SSE42
#define AV_CPU_FLAG_SSE42
Nehalem SSE4.2 functions.
Definition: cpu.h:48
checkasm_check_hevc_deblock
void checkasm_check_hevc_deblock(void)
Definition: hevc_deblock.c:264
AV_CPU_FLAG_SSE
#define AV_CPU_FLAG_SSE
SSE functions.
Definition: cpu.h:36
checkasm_check_snowdsp
void checkasm_check_snowdsp(void)
Definition: snowdsp.c:136
set_cpu_flags
static void set_cpu_flags(uint64_t flags)
Definition: checkasm.c:388
checkasm_check_jpeg2000dsp
void checkasm_check_jpeg2000dsp(void)
Definition: jpeg2000dsp.c:92
checkasm_check_hevc_add_res
void checkasm_check_hevc_add_res(void)
Definition: hevc_add_res.c:87
checkasm_check_rv34dsp
void checkasm_check_rv34dsp(void)
Definition: rv34dsp.c:129
AV_CPU_FLAG_RV_ZVBB
#define AV_CPU_FLAG_RV_ZVBB
Vector basic bit-manipulations.
Definition: cpu.h:109
checkasm_check_vvc_alf
void checkasm_check_vvc_alf(void)
Definition: vvc_alf.c:178
checkasm_check_exrdsp
void checkasm_check_exrdsp(void)
Definition: exrdsp.c:77
AV_CPU_FLAG_VSX
#define AV_CPU_FLAG_VSX
ISA 2.06.
Definition: cpu.h:65
checkasm_check_llvidencdsp
void checkasm_check_llvidencdsp(void)
Definition: llvidencdsp.c:134
AV_CPU_FLAG_SSE4
#define AV_CPU_FLAG_SSE4
Penryn SSE4.1 functions.
Definition: cpu.h:47
checkasm_check_opusdsp
void checkasm_check_opusdsp(void)
Definition: opusdsp.c:86