FFmpeg/libavcodec/arm
James Cowgill c1b8ffbed8 avcodec/arm/sbcenc: avoid callee preserved vfp registers
When compiling FFmpeg with GCC-9, some very random segfaults were
observed in code which had previously called down into the SBC encoder
NEON assembly routines. This was caused by these functions clobbering
some of the vfp callee saved registers (d8 - d15 aka q4 - q7). GCC was
using these registers to save local variables, but after these
functions returned, they would contain garbage.

Fix by reallocating the registers in the two affected functions in
the following way:
 ff_sbc_analyze_4_neon: q2-q5 => q8-q11, then q1-q4 => q8-q11
 ff_sbc_analyze_8_neon: q2-q9 => q8-q15

The reason for using these replacements is to keep closely related
sets of registers consecutively numbered which hopefully makes the
code more easy to follow. Since this commit only reallocates
registers, it should have no performance impact.

Signed-off-by: James Cowgill <jcowgill@debian.org>
Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit 50a4dff69f)
Signed-off-by: Martin Storsjö <martin@martin.st>
2022-09-20 11:21:45 +03:00
..
aac.h
aacpsdsp_init_arm.c
aacpsdsp_neon.S
ac3dsp_arm.S
ac3dsp_armv6.S
ac3dsp_init_arm.c ac3enc_fixed: drop unnecessary fixed-point DSP code 2021-01-14 01:44:20 +01:00
ac3dsp_neon.S
asm-offsets.h
audiodsp_arm.h
audiodsp_init_arm.c
audiodsp_init_neon.c
audiodsp_neon.S
blockdsp_arm.h
blockdsp_init_arm.c
blockdsp_init_neon.c
blockdsp_neon.S
cabac.h
dca.h
fft_init_arm.c
fft_neon.S
fft_vfp.S
flacdsp_arm.S
flacdsp_init_arm.c Include attributes.h directly 2021-04-19 14:34:10 +02:00
fmtconvert_init_arm.c
fmtconvert_neon.S
fmtconvert_vfp.S
g722dsp_init_arm.c
g722dsp_neon.S
h264chroma_init_arm.c
h264cmc_neon.S
h264dsp_init_arm.c avcodec/h264dsp, h264idct: Fix lengths of array parameters 2021-08-08 17:44:57 +02:00
h264dsp_neon.S Merge commit '0676de935b' 2019-03-22 16:06:04 -03:00
h264idct_neon.S
h264pred_init_arm.c
h264pred_neon.S
h264qpel_init_arm.c
h264qpel_neon.S arm/aarch64: Improve scheduling in the avg form of h264_qpel 2021-10-18 14:27:36 +03:00
hevcdsp_arm.h
hevcdsp_deblock_neon.S
hevcdsp_idct_neon.S
hevcdsp_init_arm.c
hevcdsp_init_neon.c
hevcdsp_qpel_neon.S arm: hevc_qpel: Fix the assembly to work with non-multiple of 8 widths 2021-08-25 23:24:49 +03:00
hevcdsp_sao_neon.S lavc/hevcdec: fix the HEVC decoder crash when memory over-read 2020-04-20 10:28:04 +08:00
hpeldsp_arm.h
hpeldsp_arm.S
hpeldsp_armv6.S
hpeldsp_init_arm.c
hpeldsp_init_armv6.c
hpeldsp_init_neon.c
hpeldsp_neon.S
idct.h
idctdsp_arm.h Merge commit 'e3fcb14347' 2014-07-01 15:22:11 +02:00
idctdsp_arm.S
idctdsp_armv6.S
idctdsp_init_arm.c
idctdsp_init_armv5te.c
idctdsp_init_armv6.c
idctdsp_init_neon.c
idctdsp_neon.S
int_neon.S
jrevdct_arm.S
lossless_audiodsp_init_arm.c
lossless_audiodsp_neon.S
Makefile fft: remove 16-bit FFT and MDCT code 2021-01-14 01:44:21 +01:00
mathops.h
mdct_neon.S
mdct_vfp.S
me_cmp_armv6.S
me_cmp_init_arm.c
mlpdsp_armv5te.S
mlpdsp_armv6.S
mlpdsp_init_arm.c
mpegaudiodsp_fixed_armv6.S
mpegaudiodsp_init_arm.c
mpegvideo_arm.c Include attributes.h directly 2021-04-19 14:34:10 +02:00
mpegvideo_arm.h
mpegvideo_armv5te.c
mpegvideo_armv5te_s.S
mpegvideo_neon.S
mpegvideoencdsp_armv6.S
mpegvideoencdsp_init_arm.c Include attributes.h directly 2021-04-19 14:34:10 +02:00
neon.S
neontest.c avcodec: Remove deprecated old encode/decode APIs 2021-04-27 10:43:12 -03:00
pixblockdsp_armv6.S
pixblockdsp_init_arm.c libavcodec: arm: Add a NEON implementation of pixblockdsp 2020-05-15 23:37:43 +03:00
pixblockdsp_neon.S libavcodec: arm: Add a NEON implementation of pixblockdsp 2020-05-15 23:37:43 +03:00
rdft_init_arm.c
rdft_neon.S
rv34dsp_init_arm.c
rv34dsp_neon.S
rv40dsp_init_arm.c
rv40dsp_neon.S
sbcdsp_armv6.S
sbcdsp_init_arm.c Include attributes.h directly 2021-04-19 14:34:10 +02:00
sbcdsp_neon.S avcodec/arm/sbcenc: avoid callee preserved vfp registers 2022-09-20 11:21:45 +03:00
sbrdsp_init_arm.c
sbrdsp_neon.S
simple_idct_arm.S
simple_idct_armv5te.S
simple_idct_armv6.S Merge commit '2ec9fa5ec6' 2017-03-21 14:29:52 -03:00
simple_idct_neon.S
startcode.h
startcode_armv6.S
synth_filter_init_arm.c
synth_filter_neon.S
synth_filter_vfp.S
vc1dsp.h
vc1dsp_init_arm.c
vc1dsp_init_neon.c
vc1dsp_neon.S
videodsp_arm.h
videodsp_armv5te.S
videodsp_init_arm.c
videodsp_init_armv5te.c
vorbisdsp_init_arm.c
vorbisdsp_neon.S
vp3dsp_init_arm.c
vp3dsp_neon.S
vp6dsp_init_arm.c
vp6dsp_neon.S
vp8.h
vp8_armv6.S
vp8dsp.h
vp8dsp_armv6.S
vp8dsp_init_arm.c
vp8dsp_init_armv6.c
vp8dsp_init_neon.c
vp8dsp_neon.S Merge commit 'cef914e083' 2019-03-14 16:19:41 -03:00
vp9dsp_init.h
vp9dsp_init_10bpp_arm.c
vp9dsp_init_12bpp_arm.c
vp9dsp_init_16bpp_arm_template.c lavu: move LOCAL_ALIGNED from internal.h to mem_internal.h 2021-01-01 14:11:01 +01:00
vp9dsp_init_arm.c lavu: move LOCAL_ALIGNED from internal.h to mem_internal.h 2021-01-01 14:11:01 +01:00
vp9itxfm_16bpp_neon.S
vp9itxfm_neon.S
vp9lpf_16bpp_neon.S
vp9lpf_neon.S
vp9mc_16bpp_neon.S arm: Add NEON optimizations for 10 and 12 bit vp9 MC 2017-01-24 22:35:50 +02:00
vp9mc_neon.S
vp56_arith.h