]> git.sesse.net Git - ffmpeg/commit
swscale: Replace illegal vector keyword usage in altivec code
authorDaniel Kolesa <daniel@octaforge.org>
Wed, 7 Aug 2019 17:39:06 +0000 (19:39 +0200)
committerLauri Kasanen <cand@gmx.com>
Fri, 4 Oct 2019 05:58:17 +0000 (08:58 +0300)
commit1bdb47b73484dd21ee1bf493d79ac26384eda05e
tree197235255d7b34aba7f1a6ce76a33c5c1db03197
parent581419ea39de6619c3389b8d10ac2cbe212c62a0
swscale: Replace illegal vector keyword usage in altivec code

While this technically compiles in current ffmpeg, this is only
because ffmpeg is compiled in strict ISO C mode, which disables
the builtin 'vector' keyword for AltiVec/VSX. Instead this gets
replaced with a macro inside altivec.h, which defines vector to
be actually __vector, which accepts random types.

Normally, the vector keyword should be used only with plain
scalar non-typedef types, such as unsigned int. But we have the
vec_(s|u)(8|16|32) macros, which can be used in a portable manner,
in util_altivec.h in libavutil.

This is also consistent with other AltiVec/VSX code elsewhere in
the tree.

Fixes #7861.

Signed-off-by: Daniel Kolesa <daniel@octaforge.org>
Signed-off-by: Lauri Kasanen <cand@gmx.com>
libswscale/ppc/swscale_altivec.c
libswscale/ppc/swscale_vsx.c