Files
ffmpeg/libavcodec
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
..
2025-12-13 18:45:17 -03:00
2025-12-13 18:45:17 -03:00
2025-11-26 15:16:42 +01:00
2025-11-26 15:16:43 +01:00
2025-12-13 18:45:17 -03:00
2025-12-13 18:45:17 -03:00
2025-12-13 18:45:17 -03:00
2025-11-27 11:34:25 +01:00