ffmpeg/libavcodec/x86
Andreas Rheinhardt 3144652588 avcodec/x86/lossless_videoencdsp_init: Don't read too often
sub_median_pred_mmxext() calculates a predictor from the left, top
and topleft pixel values. The topleft values need to be initialized
differently for the first loop initialization than for the others
in order to avoid reading ptr[-1]. So it has been initialized before
the loop and then read again at the end of the loop, so that the last
value read was never used. Yet this can lead to reads beyond the end
of the buffer, e.g. with
ffmpeg -cpuflags mmx+mmxext -f lavfi -i "color=size=64x4,format=yuv420p" \
-vf vflip -c:v ffvhuff -pred median -frames 1 -f null -

Fix this by not reading the value at the end of the loop.

Reviewed-by: Lynne <dev@lynne.ee>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-12-14 10:16:29 +01:00
..
h26x x86/vvcdec: sao, add avx2 support 2025-05-14 20:55:39 +08:00
hevc avcodec/x86/Makefile: Only compile ASM init files when X86ASM is enabled 2025-11-30 22:20:13 +01:00
vvc avcodec/x86/Makefile: Only compile ASM init files when X86ASM is enabled 2025-11-30 22:20:13 +01:00
aacencdsp.asm x86: aacencdsp: Fix negating signed values in aac_quantize_bands 2025-02-10 14:03:24 +02:00
aacencdsp_init.c
aacpsdsp.asm
aacpsdsp_init.c avcodec/aacpsdsp: add restrict to function pointers to match declarations 2025-10-25 01:01:14 +02:00
ac3dsp.asm
ac3dsp_downmix.asm
ac3dsp_init.c
alacdsp.asm
alacdsp_init.c avcodec/x86/Makefile: Only compile ASM init files when X86ASM is enabled 2025-11-30 22:20:13 +01:00
apv_dsp.asm avcodec/x86/apv_dsp: Don't export arrays unnecessarily 2025-09-24 01:21:32 +00:00
apv_dsp_init.c lavc/apv: AVX2 transquant for x86-64 2025-04-27 15:52:30 +01:00
audiodsp.asm
audiodsp_init.c
blockdsp.asm
blockdsp_init.c avcodec/x86/Makefile: Only compile ASM init files when X86ASM is enabled 2025-11-30 22:20:13 +01:00
bswapdsp.asm
bswapdsp_init.c
cabac.h
cavs_qpel.asm avcodec/x86/cavs_qpel: Add SSE2 vertical motion compensation 2025-10-08 20:40:08 +02:00
cavsdsp.c avcodec/x86/fpel: Port ff_put_pixels8_mmx() to SSE2 2025-10-17 13:27:56 +02:00
cavsidct.asm
celt_pvq_init.c lavc/opus*: move to opus/ subdir 2024-09-02 11:56:53 +02:00
celt_pvq_search.asm all: fix typos found by codespell 2025-08-03 13:48:47 +02:00
cfhddsp.asm
cfhddsp_init.c
cfhdencdsp.asm
cfhdencdsp_init.c
constants.c avcodec/x86/cavs_qpel: Add SSE2 vertical motion compensation 2025-10-08 20:40:08 +02:00
constants.h avcodec/x86/cavs_qpel: Add SSE2 vertical motion compensation 2025-10-08 20:40:08 +02:00
dcadsp.asm
dcadsp_init.c avcodec/dcadsp: constify lfe_samples parameter 2025-10-04 14:18:30 -03:00
dct32.asm
dirac_dwt.asm all: fix typos found by codespell 2025-08-03 13:48:47 +02:00
dirac_dwt_init.c avcodec/x86/Makefile: Only compile ASM init files when X86ASM is enabled 2025-11-30 22:20:13 +01:00
diracdsp.asm avcodec/x86/cavs_qpel: Add SSE2 vertical motion compensation 2025-10-08 20:40:08 +02:00
diracdsp_init.c avcodec/x86/Makefile: Only compile ASM init files when X86ASM is enabled 2025-11-30 22:20:13 +01:00
dnxhdenc.asm
dnxhdenc_init.c avcodec/pixblockdsp: be consistent about restrict use in ff_{get,diff}_pixels 2025-10-25 01:01:15 +02:00
exrdsp.asm
exrdsp_init.c
fdct.c avcodec/x86/fdct: Remove obsolete comment 2025-11-04 11:41:32 +01:00
fdct.h
fdctdsp_init.c avcodec/x86/fdct: guard usage of undefined functions with preprocessor 2025-07-25 21:10:16 +02:00
flac_dsp_gpl.asm
flacdsp.asm
flacdsp_init.c avcodec/x86/Makefile: Only compile ASM init files when X86ASM is enabled 2025-11-30 22:20:13 +01:00
flacencdsp_init.c avcodec/x86/Makefile: Only compile ASM init files when X86ASM is enabled 2025-11-30 22:20:13 +01:00
fmtconvert.asm all: fix whitespace/new-line issues 2025-08-03 13:48:47 +02:00
fmtconvert_init.c avcodec/x86/Makefile: Only compile ASM init files when X86ASM is enabled 2025-11-30 22:20:13 +01:00
fpel.asm avcodec/x86/fpel: Port ff_put_pixels8_mmx() to SSE2 2025-10-17 13:27:56 +02:00
fpel.h avcodec/x86/fpel: Port ff_put_pixels8_mmx() to SSE2 2025-10-17 13:27:56 +02:00
g722dsp.asm
g722dsp_init.c
h263_loopfilter.asm avcodec/x86/h263_loopfilter: Port loop filter to SSE2 2025-10-03 17:05:46 +00:00
h263dsp_init.c avcodec/x86/h263_loopfilter: Port loop filter to SSE2 2025-10-03 17:05:46 +00:00
h264_cabac.c
h264_chromamc.asm avcodec/x86/h264_chromamc: Use xmm regs in chroma_mc4 SSSE3 functions 2025-11-06 02:16:28 +01:00
h264_chromamc_10bit.asm
h264_deblock.asm
h264_deblock_10bit.asm
h264_idct.asm avcodec/x86/h264_idct: fix version check for NASM 3 and newer 2025-12-08 17:43:29 +00:00
h264_idct_10bit.asm
h264_intrapred.asm
h264_intrapred_10bit.asm
h264_intrapred_init.c
h264_qpel.c avcodec/x86/Makefile: Only compile ASM init files when X86ASM is enabled 2025-11-30 22:20:13 +01:00
h264_qpel_8bit.asm avcodec/x86/qpel: Add specializations for put_l2 functions 2025-11-01 15:17:05 +01:00
h264_qpel_10bit.asm avcodec/x86/h264_qpel_10bit: Remove SSE2 "cache64" duplicates 2025-10-04 07:06:33 +02:00
h264_weight.asm x86/h264_weight: don't do arithmetic right shift of a 32bit values in 64bit registers 2024-09-01 15:43:18 -03:00
h264_weight_10bit.asm
h264chroma_init.c avcodec/x86/h264_chromamc: Remove MMX(EXT) funcs overridden by SSSE3 2025-11-01 13:34:23 +01:00
h264dsp_init.c avcodec/x86/Makefile: Only compile ASM init files when X86ASM is enabled 2025-11-30 22:20:13 +01:00
hpeldsp.asm avcodec/x86/hpeldsp: Don't use PAVGB macro 2025-11-02 12:05:52 +01:00
hpeldsp.h avcodec/x86/rv40dsp_init: Remove MMX(EXT) funcs overridden by SSSE3 2025-09-26 06:21:23 +02:00
hpeldsp_init.c avcodec/x86/fpel: Port ff_put_pixels8_mmx() to SSE2 2025-10-17 13:27:56 +02:00
huffyuvdsp.asm
huffyuvdsp_init.c
huffyuvdsp_template.asm
huffyuvencdsp.asm
huffyuvencdsp_init.c
idctdsp.asm
idctdsp.h avcodec/x86/idctdsp: add restrict to match function pointer types 2025-10-25 01:01:15 +02:00
idctdsp_init.c All: Removed reliance on compiler performing dead code elimination, changed various macro constant checks from if() to #if 2025-11-28 19:52:51 +01:00
imdct36.asm
jpeg2000dsp.asm
jpeg2000dsp_init.c
lossless_audiodsp.asm
lossless_audiodsp_init.c avcodec/x86/Makefile: Only compile ASM init files when X86ASM is enabled 2025-11-30 22:20:13 +01:00
lossless_videodsp.asm
lossless_videodsp_init.c
lossless_videoencdsp.asm
lossless_videoencdsp_init.c avcodec/x86/lossless_videoencdsp_init: Don't read too often 2025-12-14 10:16:29 +01:00
lpc.asm x86/lpc: remove HAVE_AVX2_EXTERNAL checks 2024-10-06 01:32:49 +02:00
lpc_init.c
Makefile {lib{avcodec,swscale}/x86/,}Makefile: Kill MMX-OBJS 2025-11-30 22:20:13 +01:00
mathops.h
me_cmp.asm avcodec/x86/me_cmp: Avoid call on UNIX64 2025-11-26 00:01:09 +00:00
me_cmp_init.c avcodec/x86/Makefile: Only compile ASM init files when X86ASM is enabled 2025-11-30 22:20:13 +01:00
mlpdsp.asm
mlpdsp_init.c All: Removed reliance on compiler performing dead code elimination, changed various macro constant checks from if() to #if 2025-11-28 19:52:51 +01:00
mpeg4videodsp.c
mpegaudiodsp.c
mpegvideo.c avcodec/mpegvideo: Port dct_unquantize_mpeg2_intra_mmx to SSE2 2025-12-03 10:23:43 +01:00
mpegvideoenc.c avcodec/x86/mpegvideoenc_template: Reduce number of registers used 2025-11-18 20:41:13 +01:00
mpegvideoenc_template.c avcodec/x86/mpegvideoenc_template: Reduce number of registers used 2025-11-18 20:41:13 +01:00
mpegvideoencdsp.asm avcodec/x86/mpegvideoencdsp: Port add_8x8basis_ssse3() to ASM 2025-11-18 20:41:12 +01:00
mpegvideoencdsp_init.c avcodec/x86/mpegvideoencdsp: Port add_8x8basis_ssse3() to ASM 2025-11-18 20:41:12 +01:00
opusdsp.asm
opusdsp_init.c lavc/opus*: move to opus/ subdir 2024-09-02 11:56:53 +02:00
pixblockdsp.asm
pixblockdsp_init.c avcodec/pixblockdsp: be consistent about restrict use in ff_{get,diff}_pixels 2025-10-25 01:01:15 +02:00
pngdsp.asm avcodec/x86/pngdsp: add missing emms at the end of add_png_paeth_prediction 2025-09-15 22:18:52 -03:00
pngdsp_init.c
proresdsp.asm
proresdsp_init.c
qpel.asm avcodec/x86/h264_qpel: Add and use ff_{avg,put}_pixels16x16_l2_sse2() 2025-11-01 15:17:05 +01:00
qpel.h avcodec/x86/h264_qpel: Add and use ff_{avg,put}_pixels16x16_l2_sse2() 2025-11-01 15:17:05 +01:00
qpeldsp.asm avcodec/x86/qpel: Add specializations for put_l2 functions 2025-11-01 15:17:05 +01:00
qpeldsp_init.c avcodec/x86/Makefile: Only compile ASM init files when X86ASM is enabled 2025-11-30 22:20:13 +01:00
rv34dsp.asm
rv34dsp_init.c
rv40dsp.asm
rv40dsp_init.c avcodec/x86/Makefile: Only compile ASM init files when X86ASM is enabled 2025-11-30 22:20:13 +01:00
sbcdsp.asm
sbcdsp_init.c
sbrdsp.asm
sbrdsp_init.c
simple_idct.asm avcodec/x86/simple_idct: Port to SSE2 2025-11-08 18:48:54 +01:00
simple_idct.h avcodec/x86/simple_idct: Port to SSE2 2025-11-08 18:48:54 +01:00
simple_idct10.asm
simple_idct10_template.asm
snowdsp.c
svq1enc.asm
svq1enc_init.c
synth_filter.asm
synth_filter_init.c avcodec/x86/Makefile: Only compile ASM init files when X86ASM is enabled 2025-11-30 22:20:13 +01:00
takdsp.asm
takdsp_init.c avcodec/x86/Makefile: Only compile ASM init files when X86ASM is enabled 2025-11-30 22:20:13 +01:00
ttadsp.asm
ttadsp_init.c avcodec/x86/Makefile: Only compile ASM init files when X86ASM is enabled 2025-11-30 22:20:13 +01:00
ttaencdsp.asm
ttaencdsp_init.c avcodec/x86/Makefile: Only compile ASM init files when X86ASM is enabled 2025-11-30 22:20:13 +01:00
utvideodsp.asm
utvideodsp_init.c
v210-init.c avcodec/x86/Makefile: Only compile ASM init files when X86ASM is enabled 2025-11-30 22:20:13 +01:00
v210.asm
v210enc.asm
v210enc_init.c All: Removed reliance on compiler performing dead code elimination, changed various macro constant checks from if() to #if 2025-11-28 19:52:51 +01:00
vc1dsp.h avcodec/x86/vc1dsp: add missing header for HAVE_6REGS 2025-08-14 00:08:10 +00:00
vc1dsp_init.c avcodec/x86/Makefile: Only compile ASM init files when X86ASM is enabled 2025-11-30 22:20:13 +01:00
vc1dsp_loopfilter.asm
vc1dsp_mc.asm
vc1dsp_mmx.c
videodsp.asm lavc/x86/videodsp: Drop MMX usage 2024-12-01 13:26:34 +08:00
videodsp_init.c avcodec/x86/Makefile: Only compile ASM init files when X86ASM is enabled 2025-11-30 22:20:13 +01:00
vorbisdsp.asm
vorbisdsp_init.c
vp3dsp.asm avcodec/x86/vp3dsp: Remove remnants of MMX 2025-11-02 12:01:52 +01:00
vp3dsp_init.c avcodec/vp3dsp: Remove unused flags parameter from ff_vp3dsp_init() 2025-10-13 18:59:24 +02:00
vp6dsp.asm avcodec/x86/vp6dsp: Avoid packing+unpacking 2025-11-27 12:10:49 +01:00
vp6dsp_init.c avcodec/vp6dsp: Constify source in vp6_filter_diag4 2025-11-27 12:10:32 +01:00
vp8dsp.asm avcodec/x86/vp8dsp: Don't use saturated addition when unnecessary 2025-12-04 15:17:37 +01:00
vp8dsp_init.c avcodec/x86/vp8dsp_init: Remove unused macro 2025-12-04 15:17:37 +01:00
vp8dsp_loopfilter.asm
vp9dsp_init.c avcodec/vp9itxfm{,_16bpp}: Remove MMXEXT functions overridden by SSSE3 2025-12-08 19:27:51 +01:00
vp9dsp_init.h avcodec/vp9mc: Remove MMXEXT functions overridden by SSSE3 2025-12-08 19:27:05 +01:00
vp9dsp_init_10bpp.c
vp9dsp_init_12bpp.c
vp9dsp_init_16bpp.c avcodec/x86/Makefile: Only compile ASM init files when X86ASM is enabled 2025-11-30 22:20:13 +01:00
vp9dsp_init_16bpp_template.c avcodec/vp9itxfm{,_16bpp}: Remove MMXEXT functions overridden by SSSE3 2025-12-08 19:27:51 +01:00
vp9intrapred.asm avcodec/vp9intrapred: Remove MMXEXT functions overridden by SSSE3 2025-12-08 19:27:44 +01:00
vp9intrapred_16bpp.asm
vp9itxfm.asm avcodec/vp9itxfm{,_16bpp}: Remove MMXEXT functions overridden by SSSE3 2025-12-08 19:27:51 +01:00
vp9itxfm_16bpp.asm avcodec/vp9itxfm{,_16bpp}: Remove MMXEXT functions overridden by SSSE3 2025-12-08 19:27:51 +01:00
vp9itxfm_16bpp_avx512.asm all: fix typos found by codespell 2025-08-03 13:48:47 +02:00
vp9itxfm_avx2.asm vp9: Add 8bpc AVX2 asm for inverse transforms 2025-09-19 23:12:59 +00:00
vp9itxfm_avx512.asm avcodec/x86/vp9: Add AVX-512ICL for 16x16 and 32x32 8bpc inverse transforms 2025-05-19 15:56:27 +02:00
vp9itxfm_template.asm
vp9lpf.asm
vp9lpf_16bpp.asm
vp9mc.asm avcodec/x86/vp9mc: Reindent after the previous commit 2025-12-08 19:35:07 +01:00
vp9mc_16bpp.asm avcodec/x86/constants: add pd_64 2025-04-25 23:20:58 -03:00
vpx_arith.h
w64xmmtest.c
xvididct.asm avcodec/x86/xvididct: Remove remnants of MMX 2025-11-08 18:48:54 +01:00
xvididct.h
xvididct_init.c avcodec/x86/Makefile: Only compile ASM init files when X86ASM is enabled 2025-11-30 22:20:13 +01:00