mpv/video
wm4 083adf97e1 sws_utils: work around libswscale corrupting memory yet again
If the alignment is less than 16, certain libswscale code paths will
silently corrupt memory outside of the target buffer. This actually
affected the libmpv software rendering API (that was fun to debug).
Rather than passing this problem to the next API user, try to avoid it
within libmpv.

It's unclear which alignment libswscale requires for safe operation. I'm
picking 32 (one more than the observed safe value in the case I
experienced), because libavfilter mostly uses this value.

The way to work this around is slow: just make a full copy of the entire
input or output image. Possibly this could be optimized by using the
slice API, but that would be more effort, and would likely expose
further libswscale bugs. Hope that this is a rarely needed path.

The next commit will update the alignment requirement documentation
bits.
2020-09-17 15:24:27 +02:00
..
decode
filter
out vo_vdpau: remove an unused variable 2020-09-10 23:25:30 +02:00
csputils.c vo_gpu: reinterpret SDR white levels based on ITU-R BT.2408 2020-06-15 01:24:04 +02:00
csputils.h vo_gpu: reinterpret SDR white levels based on ITU-R BT.2408 2020-06-15 01:24:04 +02:00
cuda.c
d3d.c
d3d.h
fmt-conversion.c video: alias IMGFMT_RGB30 to AV_PIX_FMT_X2RGB10 2020-06-17 19:43:09 +02:00
fmt-conversion.h
hwdec.c
hwdec.h
image_loader.c
image_loader.h
image_writer.c video: clean up some imgfmt related stuff 2020-05-18 01:54:59 +02:00
image_writer.h
img_format.c video: some concessions to big endian hosts 2020-06-17 19:44:45 +02:00
img_format.h img_format: expose another helper 2020-05-21 02:29:05 +02:00
mp_image.c mp_image: add helper for clearing regions outside of a rectangle 2020-05-22 14:18:35 +02:00
mp_image.h mp_image: add helper for clearing regions outside of a rectangle 2020-05-22 14:18:35 +02:00
mp_image_pool.c
mp_image_pool.h
repack.c repack: handle endian in a more general way 2020-06-17 19:43:09 +02:00
repack.h
sws_utils.c sws_utils: work around libswscale corrupting memory yet again 2020-09-17 15:24:27 +02:00
sws_utils.h sws_utils: work around libswscale corrupting memory yet again 2020-09-17 15:24:27 +02:00
vaapi.c vaapi: correct broken NULL check 2020-06-03 15:12:08 +02:00
vaapi.h
vdpau.c
vdpau.h
vdpau_functions.inc
vdpau_mixer.c
vdpau_mixer.h
zimg.c zimg: add slice threading and use it by default 2020-07-15 22:59:17 +02:00
zimg.h zimg: add slice threading and use it by default 2020-07-15 22:59:17 +02:00