ffmpeg/tests
Rémi Denis-Courmont 378d1b06c3 riscv: probe for Zbb extension at load time
Due to hysterical raisins, most RISC-V Linux distributions target a
RV64GC baseline excluding the Bit-manipulation ISA extensions, most
notably:
- Zba: address generation extension and
- Zbb: basic bit manipulation extension.
Most CPUs that would make sense to run FFmpeg on support Zba and Zbb
(including the current FATE runner), so it makes sense to optimise for
them. In fact a large chunk of existing assembler optimisations relies
on Zba and/or Zbb.

Since we cannot patch shared library code, the next best thing is to
carry a flag initialised at load-time and check it on need basis.
This results in 3 instructions overhead on isolated use, e.g.:
1:  AUIPC rd, %pcrel_hi(ff_rv_zbb_supported)
    LBU   rd, %pcrel_lo(1b)(rd)
    BEQZ  rd, non_Zbb_fallback_code
    // Zbb code here

The C compiler will typically load the flag ahead of time to reducing
latency, and can also keep it around if Zbb is used multiple times in a
single optimisation scope. For this to work, the flag symbol must be
hidden; otherwise the optimisation degrades with a GOT look-up to
support interposition:
1:  AUIPC rd, GOT_OFFSET_HI
    LD    rd, GOT_OFFSET_LO(rd)
    LBU   rd, (rd)
    BEQZ  rd, non_Zbb_fallback_code
    // Zbb code here

This patch adds code to provision the flag in libraries using bit
manipulation functions from libavutil: byte-swap, bit-weight and
counting leading or trailing zeroes.
2024-06-11 20:12:37 +03:00
..
api avutil/common: Don't auto-include mem.h 2024-03-31 00:08:43 +01:00
checkasm checkasm/lls: adjust buffer sizes and alignments 2024-06-11 20:07:55 +03:00
fate fate: add tests for xHE-AAC 2024-06-02 18:34:46 +02:00
filtergraphs fate/scale2ref_keep_aspect: switch to vf_scale ref_* 2024-05-03 14:23:23 +02:00
maps fate: Add fsync filter tests 2024-01-05 09:29:05 +01:00
ref riscv: probe for Zbb extension at load time 2024-06-11 20:12:37 +03:00
streamgroups fate/iamf: add an ambisonic test 2024-01-23 13:35:28 -03:00
.gitignore Merge commit '257f00ec1a' 2016-06-22 11:28:51 +02:00
audiogen.c tests/audiogen: Fix total RIFF chunk size 2024-03-28 11:54:41 +01:00
audiomatch.c tests/audiomatch: add free to make static analysis tools happy 2020-12-10 19:38:32 +08:00
base64.c
copycooker.sh
extended.ffconcat lavf/concat: deprecate file_packet_metadata 2021-09-16 10:17:59 +02:00
fate-run.sh configure, etc: switch to shebang without space 2024-04-09 16:01:24 +02:00
fate-valgrind.supp
fate.sh fate: allow https for git URLs 2024-04-27 23:24:58 +02:00
Makefile fate/ffprobe: Fix test requirements 2024-04-03 19:10:24 +02:00
md5.sh
refcmp-metadata.awk fate/filter-refcmp-*: make refcmp_metadata fail on empty or truncated input 2022-04-10 20:12:23 +02:00
reference.pnm
rotozoom.c
simple1.ffconcat lavf/concat: deprecate file_packet_metadata 2021-09-16 10:17:59 +02:00
simple2.ffconcat tests/concat-demuxer: add stream_meta test 2021-09-16 10:17:59 +02:00
test.ffmeta
tiny_psnr.c Drop pointless assert.h #includes 2016-05-03 15:45:10 +02:00
tiny_ssim.c test: tiny_ssim: Don't include config.h 2022-03-30 14:56:07 +03:00
utils.c
videogen.c