[FFmpeg-cvslog] Merge commit '186bd30aa3b6c2b29b4dbf18278700b572068b1e'

James Almer git at videolan.org
Thu Mar 14 21:32:34 EET 2019


ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Thu Mar 14 16:29:41 2019 -0300| [92219ef4ac01b00e630b39cb19e8fbd17fdb63d0] | committer: James Almer

Merge commit '186bd30aa3b6c2b29b4dbf18278700b572068b1e'

* commit '186bd30aa3b6c2b29b4dbf18278700b572068b1e':
  h264/arm64: implement missing 4:2:2 chroma loop filter neon functions

Merged-by: James Almer <jamrial at gmail.com>

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

 libavcodec/aarch64/h264dsp_init_aarch64.c | 12 ++++++++++-
 libavcodec/aarch64/h264dsp_neon.S         | 36 ++++++++++++++++++++++++++-----
 2 files changed, 42 insertions(+), 6 deletions(-)

diff --git a/libavcodec/aarch64/h264dsp_init_aarch64.c b/libavcodec/aarch64/h264dsp_init_aarch64.c
index 649d2ab1d7..d5baccf235 100644
--- a/libavcodec/aarch64/h264dsp_init_aarch64.c
+++ b/libavcodec/aarch64/h264dsp_init_aarch64.c
@@ -37,10 +37,14 @@ void ff_h264_v_loop_filter_chroma_neon(uint8_t *pix, ptrdiff_t stride, int alpha
                                        int beta, int8_t *tc0);
 void ff_h264_h_loop_filter_chroma_neon(uint8_t *pix, ptrdiff_t stride, int alpha,
                                        int beta, int8_t *tc0);
+void ff_h264_h_loop_filter_chroma422_neon(uint8_t *pix, ptrdiff_t stride, int alpha,
+                                          int beta, int8_t *tc0);
 void ff_h264_v_loop_filter_chroma_intra_neon(uint8_t *pix, ptrdiff_t stride,
                                              int alpha, int beta);
 void ff_h264_h_loop_filter_chroma_intra_neon(uint8_t *pix, ptrdiff_t stride,
                                              int alpha, int beta);
+void ff_h264_h_loop_filter_chroma422_intra_neon(uint8_t *pix, ptrdiff_t stride,
+                                                int alpha, int beta);
 void ff_h264_h_loop_filter_chroma_mbaff_intra_neon(uint8_t *pix, ptrdiff_t stride,
                                                    int alpha, int beta);
 
@@ -91,12 +95,18 @@ av_cold void ff_h264dsp_init_aarch64(H264DSPContext *c, const int bit_depth,
         c->h264_h_loop_filter_luma_intra= ff_h264_h_loop_filter_luma_intra_neon;
 
         c->h264_v_loop_filter_chroma = ff_h264_v_loop_filter_chroma_neon;
+        c->h264_v_loop_filter_chroma_intra = ff_h264_v_loop_filter_chroma_intra_neon;
+
         if (chroma_format_idc <= 1) {
             c->h264_h_loop_filter_chroma = ff_h264_h_loop_filter_chroma_neon;
             c->h264_h_loop_filter_chroma_intra = ff_h264_h_loop_filter_chroma_intra_neon;
             c->h264_h_loop_filter_chroma_mbaff_intra = ff_h264_h_loop_filter_chroma_mbaff_intra_neon;
+        } else {
+            c->h264_h_loop_filter_chroma = ff_h264_h_loop_filter_chroma422_neon;
+            c->h264_h_loop_filter_chroma_mbaff = ff_h264_h_loop_filter_chroma_neon;
+            c->h264_h_loop_filter_chroma_intra = ff_h264_h_loop_filter_chroma422_intra_neon;
+            c->h264_h_loop_filter_chroma_mbaff_intra = ff_h264_h_loop_filter_chroma_intra_neon;
         }
-        c->h264_v_loop_filter_chroma_intra = ff_h264_v_loop_filter_chroma_intra_neon;
 
         c->weight_h264_pixels_tab[0] = ff_weight_h264_pixels_16_neon;
         c->weight_h264_pixels_tab[1] = ff_weight_h264_pixels_8_neon;
diff --git a/libavcodec/aarch64/h264dsp_neon.S b/libavcodec/aarch64/h264dsp_neon.S
index 80ac09d2be..fbb8ecc463 100644
--- a/libavcodec/aarch64/h264dsp_neon.S
+++ b/libavcodec/aarch64/h264dsp_neon.S
@@ -28,9 +28,9 @@
         ldr             w6,  [x4]
         ccmp            w3,  #0, #0, ne
         mov             v24.S[0], w6
-        and             w6,  w6,  w6,  lsl #16
+        and             w8,  w6,  w6,  lsl #16
         b.eq            1f
-        ands            w6,  w6,  w6,  lsl #8
+        ands            w8,  w8,  w8,  lsl #8
         b.ge            2f
 1:
         ret
@@ -394,10 +394,10 @@ endfunc
         usubw           v4.8H,  v4.8H,  v16.8B
         and             v26.8B, v26.8B, v30.8B
         shl             v4.8H,  v4.8H,  #2
-        mov             x2,  v26.d[0]
+        mov             x8,  v26.d[0]
         sli             v24.8H, v24.8H, #8
         uaddw           v4.8H,  v4.8H,  v18.8B
-        cbz             x2,  9f
+        cbz             x8,  9f
         usubw           v4.8H,  v4.8H,  v2.8B
         rshrn           v4.8B,  v4.8H,  #3
         smin            v4.8B,  v4.8B,  v24.8B
@@ -436,6 +436,7 @@ function ff_h264_h_loop_filter_chroma_neon, export=1
         sxtw            x1,  w1
 
         sub             x0,  x0,  #2
+h_loop_filter_chroma420:
         ld1             {v18.S}[0], [x0], x1
         ld1             {v16.S}[0], [x0], x1
         ld1             {v0.S}[0],  [x0], x1
@@ -464,6 +465,19 @@ function ff_h264_h_loop_filter_chroma_neon, export=1
         ret
 endfunc
 
+function ff_h264_h_loop_filter_chroma422_neon, export=1
+        sxtw            x1,  w1
+        h264_loop_filter_start
+        add             x5,  x0,  x1
+        sub             x0,  x0,  #2
+        add             x1,  x1,  x1
+        mov             x7,  x30
+        bl              h_loop_filter_chroma420
+        mov             x30, x7
+        sub             x0,  x5,  #2
+        mov             v24.s[0], w6
+        b               h_loop_filter_chroma420
+endfunc
 
 .macro h264_loop_filter_chroma_intra
     uabd            v26.8b, v16.8b, v17.8b  // abs(p0 - q0)
@@ -536,6 +550,7 @@ function ff_h264_h_loop_filter_chroma_intra_neon, export=1
 
     sub             x4,  x0,  #2
     sub             x0,  x0,  #1
+h_loop_filter_chroma420_intra:
     ld1             {v18.8b}, [x4], x1
     ld1             {v16.8b}, [x4], x1
     ld1             {v17.8b}, [x4], x1
@@ -543,7 +558,7 @@ function ff_h264_h_loop_filter_chroma_intra_neon, export=1
     ld1             {v18.s}[1], [x4], x1
     ld1             {v16.s}[1], [x4], x1
     ld1             {v17.s}[1], [x4], x1
-    ld1             {v19.s}[1], [x4]
+    ld1             {v19.s}[1], [x4], x1
 
     transpose_4x8B v18, v16, v17, v19, v26, v27, v28, v29
 
@@ -562,6 +577,17 @@ function ff_h264_h_loop_filter_chroma_intra_neon, export=1
     ret
 endfunc
 
+function ff_h264_h_loop_filter_chroma422_intra_neon, export=1
+    h264_loop_filter_start_intra
+    sub             x4,  x0,  #2
+    add             x5,  x0,  x1, lsl #3
+    sub             x0,  x0,  #1
+    mov             x7,  x30
+    bl              h_loop_filter_chroma420_intra
+    sub             x0,  x5,  #1
+    mov             x30, x7
+    b               h_loop_filter_chroma420_intra
+endfunc
 
 .macro  biweight_16     macs, macd
         dup             v0.16B,  w5


======================================================================

diff --cc libavcodec/aarch64/h264dsp_init_aarch64.c
index 649d2ab1d7,85fea8e040..d5baccf235
--- a/libavcodec/aarch64/h264dsp_init_aarch64.c
+++ b/libavcodec/aarch64/h264dsp_init_aarch64.c
@@@ -25,39 -25,43 +25,43 @@@
  #include "libavutil/aarch64/cpu.h"
  #include "libavcodec/h264dsp.h"
  
 -void ff_h264_v_loop_filter_luma_neon(uint8_t *pix, int stride, int alpha,
 +void ff_h264_v_loop_filter_luma_neon(uint8_t *pix, ptrdiff_t stride, int alpha,
                                       int beta, int8_t *tc0);
 -void ff_h264_h_loop_filter_luma_neon(uint8_t *pix, int stride, int alpha,
 +void ff_h264_h_loop_filter_luma_neon(uint8_t *pix, ptrdiff_t stride, int alpha,
                                       int beta, int8_t *tc0);
 -void ff_h264_v_loop_filter_luma_intra_neon(uint8_t *pix, int stride, int alpha,
 +void ff_h264_v_loop_filter_luma_intra_neon(uint8_t *pix, ptrdiff_t stride, int alpha,
                                             int beta);
 -void ff_h264_h_loop_filter_luma_intra_neon(uint8_t *pix, int stride, int alpha,
 +void ff_h264_h_loop_filter_luma_intra_neon(uint8_t *pix, ptrdiff_t stride, int alpha,
                                             int beta);
 -void ff_h264_v_loop_filter_chroma_neon(uint8_t *pix, int stride, int alpha,
 +void ff_h264_v_loop_filter_chroma_neon(uint8_t *pix, ptrdiff_t stride, int alpha,
                                         int beta, int8_t *tc0);
 -void ff_h264_h_loop_filter_chroma_neon(uint8_t *pix, int stride, int alpha,
 +void ff_h264_h_loop_filter_chroma_neon(uint8_t *pix, ptrdiff_t stride, int alpha,
                                         int beta, int8_t *tc0);
 -void ff_h264_h_loop_filter_chroma422_neon(uint8_t *pix, int stride, int alpha,
++void ff_h264_h_loop_filter_chroma422_neon(uint8_t *pix, ptrdiff_t stride, int alpha,
+                                           int beta, int8_t *tc0);
 -void ff_h264_v_loop_filter_chroma_intra_neon(uint8_t *pix, int stride,
 +void ff_h264_v_loop_filter_chroma_intra_neon(uint8_t *pix, ptrdiff_t stride,
                                               int alpha, int beta);
 -void ff_h264_h_loop_filter_chroma_intra_neon(uint8_t *pix, int stride,
 +void ff_h264_h_loop_filter_chroma_intra_neon(uint8_t *pix, ptrdiff_t stride,
                                               int alpha, int beta);
 -void ff_h264_h_loop_filter_chroma422_intra_neon(uint8_t *pix, int stride,
++void ff_h264_h_loop_filter_chroma422_intra_neon(uint8_t *pix, ptrdiff_t stride,
+                                                 int alpha, int beta);
 -void ff_h264_h_loop_filter_chroma_mbaff_intra_neon(uint8_t *pix, int stride,
 +void ff_h264_h_loop_filter_chroma_mbaff_intra_neon(uint8_t *pix, ptrdiff_t stride,
                                                     int alpha, int beta);
  
 -void ff_weight_h264_pixels_16_neon(uint8_t *dst, int stride, int height,
 +void ff_weight_h264_pixels_16_neon(uint8_t *dst, ptrdiff_t stride, int height,
                                     int log2_den, int weight, int offset);
 -void ff_weight_h264_pixels_8_neon(uint8_t *dst, int stride, int height,
 +void ff_weight_h264_pixels_8_neon(uint8_t *dst, ptrdiff_t stride, int height,
                                    int log2_den, int weight, int offset);
 -void ff_weight_h264_pixels_4_neon(uint8_t *dst, int stride, int height,
 +void ff_weight_h264_pixels_4_neon(uint8_t *dst, ptrdiff_t stride, int height,
                                    int log2_den, int weight, int offset);
  
 -void ff_biweight_h264_pixels_16_neon(uint8_t *dst, uint8_t *src, int stride,
 +void ff_biweight_h264_pixels_16_neon(uint8_t *dst, uint8_t *src, ptrdiff_t stride,
                                       int height, int log2_den, int weightd,
                                       int weights, int offset);
 -void ff_biweight_h264_pixels_8_neon(uint8_t *dst, uint8_t *src, int stride,
 +void ff_biweight_h264_pixels_8_neon(uint8_t *dst, uint8_t *src, ptrdiff_t stride,
                                      int height, int log2_den, int weightd,
                                      int weights, int offset);
 -void ff_biweight_h264_pixels_4_neon(uint8_t *dst, uint8_t *src, int stride,
 +void ff_biweight_h264_pixels_4_neon(uint8_t *dst, uint8_t *src, ptrdiff_t stride,
                                      int height, int log2_den, int weightd,
                                      int weights, int offset);
  



More information about the ffmpeg-cvslog mailing list