summaryrefslogtreecommitdiff
path: root/libswscale
diff options
context:
space:
mode:
authorDaniel Kolesa <daniel@octaforge.org>2019-08-07 19:39:07 +0200
committerLauri Kasanen <cand@gmx.com>2019-10-04 08:58:17 +0300
commite6625ca41f85ed10b3108d37bd897f0ae063250e (patch)
tree5abb277cef34b5a6bfb278e1dff783a99afce5c2 /libswscale
parent1bdb47b73484dd21ee1bf493d79ac26384eda05e (diff)
downloadffmpeg-e6625ca41f85ed10b3108d37bd897f0ae063250e.tar.gz
swscale: Fix AltiVec/VSX build with recent GCC
The argument to vec_splat_u16 must be a literal. By making the function always inline and marking the arguments const, gcc can turn those into literals, and avoid build errors like: swscale_vsx.c:165:53: error: argument 1 must be a 5-bit signed literal Fixes #7861. Signed-off-by: Daniel Kolesa <daniel@octaforge.org> Signed-off-by: Lauri Kasanen <cand@gmx.com>
Diffstat (limited to 'libswscale')
-rw-r--r--libswscale/ppc/swscale_vsx.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/libswscale/ppc/swscale_vsx.c b/libswscale/ppc/swscale_vsx.c
index e6a35d3f78..af8b0e1fa3 100644
--- a/libswscale/ppc/swscale_vsx.c
+++ b/libswscale/ppc/swscale_vsx.c
@@ -154,8 +154,10 @@ static void yuv2plane1_nbps_u(const int16_t *src, uint16_t *dest, int dstW,
}
}
-static void yuv2plane1_nbps_vsx(const int16_t *src, uint16_t *dest, int dstW,
- int big_endian, int output_bits)
+static av_always_inline void yuv2plane1_nbps_vsx(const int16_t *src,
+ uint16_t *dest, int dstW,
+ const int big_endian,
+ const int output_bits)
{
const int dst_u = -(uintptr_t)dest & 7;
const int shift = 15 - output_bits;
@@ -273,8 +275,10 @@ static void yuv2plane1_16_u(const int32_t *src, uint16_t *dest, int dstW,
}
}
-static void yuv2plane1_16_vsx(const int32_t *src, uint16_t *dest, int dstW,
- int big_endian, int output_bits)
+static av_always_inline void yuv2plane1_16_vsx(const int32_t *src,
+ uint16_t *dest, int dstW,
+ const int big_endian,
+ int output_bits)
{
const int dst_u = -(uintptr_t)dest & 7;
const int shift = 3;