[FFmpeg-devel] [PATCH 1/2] swscale/ppc: Clean up some mixed decl warnings

Lauri Kasanen cand at gmx.com
Mon Mar 18 13:56:30 EET 2019


Signed-off-by: Lauri Kasanen <cand at gmx.com>
---
 libswscale/ppc/swscale_altivec.c      | 6 +++---
 libswscale/ppc/swscale_ppc_template.c | 9 +++++----
 libswscale/ppc/swscale_vsx.c          | 6 +++---
 3 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/libswscale/ppc/swscale_altivec.c b/libswscale/ppc/swscale_altivec.c
index d72ed1e..3cd9782 100644
--- a/libswscale/ppc/swscale_altivec.c
+++ b/libswscale/ppc/swscale_altivec.c
@@ -43,10 +43,10 @@
 
 #define yuv2planeX_8(d1, d2, l1, src, x, perm, filter) do {\
         vector signed short ls;\
+        vector signed int   vf1, vf2, i1, i2;\
         GET_LS(l1, x, perm, src);\
-        vector signed int   i1  = vec_mule(filter, ls);\
-        vector signed int   i2  = vec_mulo(filter, ls);\
-        vector signed int   vf1, vf2;\
+        i1  = vec_mule(filter, ls);\
+        i2  = vec_mulo(filter, ls);\
         vf1 = vec_mergeh(i1, i2);\
         vf2 = vec_mergel(i1, i2);\
         d1 = vec_add(d1, vf1);\
diff --git a/libswscale/ppc/swscale_ppc_template.c b/libswscale/ppc/swscale_ppc_template.c
index 11decab..3964a7a 100644
--- a/libswscale/ppc/swscale_ppc_template.c
+++ b/libswscale/ppc/swscale_ppc_template.c
@@ -184,16 +184,17 @@ static void FUNC(hScale_real)(SwsContext *c, int16_t *dst, int dstW,
 
                 for (j = 0; j < filterSize - 15; j += 16) {
                     vector unsigned char src_v1, src_vF;
-                    vector signed short filter_v1R, filter_v2R, filter_v0, filter_v1;
+                    vector signed short filter_v1R, filter_v2R, filter_v0, filter_v1, src_vA, src_vB;
+                    vector signed int val_acc;
                     LOAD_SRCV(srcPos, j, src, permS, src_v0, src_v1, src_vF);
-                    vector signed short src_vA = // vec_unpackh sign-extends...
+                    src_vA = // vec_unpackh sign-extends...
                                                  (vector signed short)(VEC_MERGEH((vector unsigned char)vzero, src_vF));
-                    vector signed short src_vB = // vec_unpackh sign-extends...
+                    src_vB = // vec_unpackh sign-extends...
                                                  (vector signed short)(VEC_MERGEL((vector unsigned char)vzero, src_vF));
                     GET_VFD(i, j, filter, filter_v0R, filter_v1R, permF, filter_v0, 0);
                     GET_VFD(i, j, filter, filter_v1R, filter_v2R, permF, filter_v1, 16);
 
-                    vector signed int val_acc = vec_msums(src_vA, filter_v0, val_v);
+                    val_acc = vec_msums(src_vA, filter_v0, val_v);
                     val_v = vec_msums(src_vB, filter_v1, val_acc);
                     UPDATE_PTR(filter_v2R, filter_v0R, src_v1, src_v0);
                 }
diff --git a/libswscale/ppc/swscale_vsx.c b/libswscale/ppc/swscale_vsx.c
index f6c7f1d..01eb46c 100644
--- a/libswscale/ppc/swscale_vsx.c
+++ b/libswscale/ppc/swscale_vsx.c
@@ -42,10 +42,10 @@
 
 #define yuv2planeX_8(d1, d2, l1, src, x, perm, filter) do {\
         vector signed short ls;\
+        vector signed int   vf1, vf2, i1, i2;\
         GET_LS(l1, x, perm, src);\
-        vector signed int   i1  = vec_mule(filter, ls);\
-        vector signed int   i2  = vec_mulo(filter, ls);\
-        vector signed int   vf1, vf2;\
+        i1  = vec_mule(filter, ls);\
+        i2  = vec_mulo(filter, ls);\
         vf1 = vec_mergeh(i1, i2);\
         vf2 = vec_mergel(i1, i2);\
         d1 = vec_add(d1, vf1);\
-- 
2.6.2



More information about the ffmpeg-devel mailing list