[FFmpeg-cvslog] sws/aarch64: restore ff_hscale_8_to_15_neon()

Clément Bœsch git at videolan.org
Tue Apr 5 12:30:22 CEST 2016


ffmpeg | branch: master | Clément Bœsch <clement at stupeflix.com> | Tue Apr  5 10:16:32 2016 +0200| [040598218f48274a6780ab9059faedbb3db77cb5] | committer: Clément Bœsch

sws/aarch64: restore ff_hscale_8_to_15_neon()

Fix final scaling and required filter alignment. Pass FATE.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=040598218f48274a6780ab9059faedbb3db77cb5
---

 libswscale/aarch64/hscale.S  |    2 +-
 libswscale/aarch64/swscale.c |    2 +-
 libswscale/utils.c           |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/libswscale/aarch64/hscale.S b/libswscale/aarch64/hscale.S
index c32394c..cc78c19 100644
--- a/libswscale/aarch64/hscale.S
+++ b/libswscale/aarch64/hscale.S
@@ -51,7 +51,7 @@ function ff_hscale_8_to_15_neon, export=1
         add                 x10, x10, w6, UXTW #1       // filter2 += filterSize*2
         addp                v4.4S, v4.4S, v5.4S         // horizontal pair adding of the 8x32-bit sums into 4x32-bit
         addp                v4.4S, v4.4S, v4.4S         // horizontal pair adding of the 4x32-bit sums into 2x32-bit
-        sqrshrun            v4.4H, v4.4S, #7            // shift and clip the 2x16-bit final values
+        sqshrn              v4.4H, v4.4S, #7            // shift and clip the 2x16-bit final values
         st1                 {v4.S}[0], [x1], #4         // write to destination
         subs                w2, w2, #2                  // dstW -= 2
         b.gt                1b                          // loop until end of line
diff --git a/libswscale/aarch64/swscale.c b/libswscale/aarch64/swscale.c
index ebf76a5..6b9b046 100644
--- a/libswscale/aarch64/swscale.c
+++ b/libswscale/aarch64/swscale.c
@@ -31,7 +31,7 @@ av_cold void ff_sws_init_swscale_aarch64(SwsContext *c)
 
     if (have_neon(cpu_flags)) {
         if (c->srcBpc == 8 && c->dstBpc <= 14) {
-            //c->hyScale = c->hcScale = ff_hscale_8_to_15_neon;
+            c->hyScale = c->hcScale = ff_hscale_8_to_15_neon;
         }
     }
 }
diff --git a/libswscale/utils.c b/libswscale/utils.c
index 2507195..08937fe 100644
--- a/libswscale/utils.c
+++ b/libswscale/utils.c
@@ -1629,7 +1629,7 @@ av_cold int sws_init_context(SwsContext *c, SwsFilter *srcFilter,
         {
             const int filterAlign = X86_MMX(cpu_flags)     ? 4 :
                                     PPC_ALTIVEC(cpu_flags) ? 8 :
-                                    have_neon(cpu_flags)   ? 4 : 1;
+                                    have_neon(cpu_flags)   ? 8 : 1;
 
             if ((ret = initFilter(&c->hLumFilter, &c->hLumFilterPos,
                            &c->hLumFilterSize, c->lumXInc,



More information about the ffmpeg-cvslog mailing list