ffmpeg/libswscale
Andreas Rheinhardt f570fa787a swscale/swscale_internal: Move altivec parts to ppc/
Up until now, several altivec-specific fields are directly
put into SwsInternal #if HAVE_ALTIVEC is true. These fields
are of altivec-specific vector types and therefore
require altivec specific headers to be included.

Unfortunately, said altivec specific headers redefine
bool in a manner that is incompatible with stdbool.
swscale/ops.h uses bool and this led graph.c and ops.c
to disagree about the layout of structures from ops.h,
leading to heap corruption [1], [2] in the sws-unscaled
FATE test.

Fix this by moving the altivec-specific parts out of SwsInternal
and into a structure that extends SwsInternal and is allocated
jointly with it. Said structure is local to yuv2rgb_altivec.c,
because this is the only file accessing said fields. Should
more files need them, an altivec-specific swscale header would
need to be added.

Thanks to jfiusdq <jfiusdq@proton.me> for analyzing the issue.

[1]: https://fate.ffmpeg.org/report.cgi?slot=ppc64-linux-gcc-14.3-asan&time=20260224065643
[2]: https://fate.ffmpeg.org/report.cgi?slot=ppc64-linux-gcc-14.3&time=20260224051615

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2026-02-28 09:56:01 +01:00
..
aarch64 swscale: Add AArch64 Neon path for xyz12Torgb48 LE 2025-12-05 10:28:18 +00:00
arm all: fix typos found by codespell 2025-08-03 13:48:47 +02:00
loongarch swscale: Fix out-of-bounds write errors in yuv2rgb_lasx.c file. 2025-11-28 03:40:47 +00:00
ppc swscale/swscale_internal: Move altivec parts to ppc/ 2026-02-28 09:56:01 +01:00
riscv swscale/range_convert: saturate output instead of limiting input 2024-12-05 21:10:29 +01:00
tests swscale/format: pass SwsFormat by ref instead of by value where possible 2026-02-26 18:08:49 +00:00
vulkan swscale/vulkan: initialize GLSL compilation and shader execution 2026-02-26 14:10:22 +01:00
x86 swscale/ops: add subsampling shift to SwsOpExec 2026-02-27 16:18:34 +00:00
alphablend.c swscale/alphablend: don't overread alpha plane on subsampled odd size 2025-07-31 11:32:20 +00:00
bayer_template.c swscale/internal: constify SwsFunc 2024-10-07 19:51:34 +02:00
cms.c all: fix typos found by codespell 2025-08-03 13:48:47 +02:00
cms.h swscale/utils: split off format code into new file 2025-03-14 19:50:44 +01:00
csputils.c swscale/csputils: Remove unused ff_sws_matrix3x3_rmul() 2025-04-03 06:04:57 +02:00
csputils.h swscale/csputils: Remove unused ff_sws_matrix3x3_rmul() 2025-04-03 06:04:57 +02:00
format.c swscale/format: add assertion to guard UB 2026-02-26 18:08:49 +00:00
format.h swscale/format: pass SwsFormat by ref instead of by value where possible 2026-02-26 18:08:49 +00:00
gamma.c swscale: rename SwsContext to SwsInternal 2024-10-24 22:50:00 +02:00
graph.c swscale/graph: nuke SwsImg 2026-02-27 16:18:34 +00:00
graph.h swscale/graph: nuke SwsImg 2026-02-27 16:18:34 +00:00
half2float.c swscale/input: add rgbaf16 input support 2022-08-19 22:09:36 +02:00
hscale.c swscale/range_convert: fix mpeg ranges in yuv range conversion for non-8-bit pixel formats 2024-12-05 21:10:29 +01:00
hscale_fast_bilinear.c swscale: rename SwsContext to SwsInternal 2024-10-24 22:50:00 +02:00
input.c Revert "swscale: add support for 10/12-bit grayscale MSB pixfmts" 2025-11-06 21:46:41 +01:00
libswscale.v build: Change structure of the linker version script templates 2016-05-29 16:43:11 +02:00
log2_tab.c lsws: duplicate ff_log2_tab 2014-08-12 20:52:21 +02:00
lut3d.c swscale/lut3d: remove unused function 2025-07-22 19:56:34 +02:00
lut3d.h swscale/utils: split off format code into new file 2025-03-14 19:50:44 +01:00
Makefile swscale: add a Vulkan backend for ops.c 2026-02-26 14:10:22 +01:00
ops.c swscale/graph: nuke SwsImg 2026-02-27 16:18:34 +00:00
ops.h swscale/ops: reorder fields in SwsOpList 2026-02-26 18:08:49 +00:00
ops_backend.c swscale/ops_backend: mark unreachable branch 2026-02-27 16:44:19 +00:00
ops_backend.h swscale/ops_backend: allocate block storage up-front 2026-02-19 19:44:46 +00:00
ops_chain.c swscale/ops_chain: add ability to match fixed scale factor 2026-02-26 10:15:52 +00:00
ops_chain.h swscale/x86/ops: add support for optional dither indices 2026-02-26 13:09:14 +00:00
ops_internal.h swscale/ops: add subsampling shift to SwsOpExec 2026-02-27 16:18:34 +00:00
ops_memcpy.c swscale/ops: add SwsOpBackend.hw_format 2026-02-26 14:10:22 +01:00
ops_optimizer.c swscale/ops_optimizer: eliminate unnecessary dither indices 2026-02-26 13:09:14 +00:00
ops_tmpl_common.c swscale/ops_backend: avoid UB from incorrect function signature 2026-02-26 10:15:52 +00:00
ops_tmpl_float.c swscale/ops_backend: implement support for optional dither indices 2026-02-26 13:09:14 +00:00
ops_tmpl_int.c swscale/ops_backend: allocate block storage up-front 2026-02-19 19:44:46 +00:00
options.c swscale: add SWS_UNSTABLE flag 2025-09-01 19:28:35 +02:00
output.c swscale/output: Fix some integer overflows in yuv2rgba64_full*() 2026-02-26 17:21:46 +00:00
rgb2rgb.c swscale/swscale_unscaled: add unscaled x2rgb10le to packed RGB 2024-11-06 17:34:32 -03:00
rgb2rgb.h swscale/swscale_unscaled: add unscaled x2rgb10le to packed RGB 2024-11-06 17:34:32 -03:00
rgb2rgb_template.c swscale/rgb2rgb_template: fix signed shift into sign bit 2026-02-15 19:26:27 +00:00
slice.c swscale/slice: fix init of 32 bpc planes 2024-12-16 12:21:55 +01:00
swscale.c swscale/graph: move frame->field init logic to SwsGraph 2026-02-27 16:18:34 +00:00
swscale.h swscale/swscale: fix typos 2026-02-26 18:36:46 +00:00
swscale_internal.h swscale/swscale_internal: Move altivec parts to ppc/ 2026-02-28 09:56:01 +01:00
swscale_unscaled.c swscale/unscaled: fix rgbToRgbWrapper for YUVX 2026-02-26 10:15:52 +00:00
swscaleres.rc
utils.c swscale/swscale_internal: Move altivec parts to ppc/ 2026-02-28 09:56:01 +01:00
version.c lib*/version: Use static_assert for static asserts 2024-03-31 00:08:42 +01:00
version.h swscale: add sws_test_hw_format() 2026-02-26 14:09:46 +01:00
version_major.h libs: bump major version for all libraries 2025-03-28 14:44:34 -03:00
vscale.c swscale/internal: group user-facing options together 2024-11-21 12:49:56 +01:00
yuv2rgb.c ALL: move av_unused to conform with standard requirement 2025-09-26 16:15:46 +00:00