On Wed, 26 Apr 2017, Martin Storsjö wrote:

On Wed, 26 Apr 2017, Alexandra Hájková wrote:

From: Seppo Tomperi <[email protected]>

Optimized by Alexandra Hájková.
---
libavcodec/arm/hevc_idct.S | 86
+++++++++++++++++++++++++++++++++++++++
libavcodec/arm/hevcdsp_init_arm.c | 15 +++++++
2 files changed, 101 insertions(+)

diff --git a/libavcodec/arm/hevc_idct.S b/libavcodec/arm/hevc_idct.S
index 41b1b29..833c3fe 100644
--- a/libavcodec/arm/hevc_idct.S
+++ b/libavcodec/arm/hevc_idct.S
@@ -30,6 +30,92 @@ const trans, align=4
        .short 57, 43, 25, 9
endconst

+function ff_hevc_add_residual_4x4_8_neon, export=1
+        vld1.16         {q0-q1}, [r1, :128]
+        vld1.32         d4[0], [r0, :32], r2
+        vld1.32         d4[1], [r0, :32], r2
+        vld1.32         d5[0], [r0, :32], r2
+        vld1.32         d5[1], [r0, :32], r2
+        sub             r0, r0, r2, lsl #2
+        vmovl.u8        q8, d4
+        vmovl.u8        q9, d5
+        vqadd.s16       q0, q0, q8
+        vqadd.s16       q1, q1, q9
+        vqmovun.s16     d0, q0
+        vqmovun.s16     d1, q1
+        vst1.32         d0[0], [r0], r2
+        vst1.32         d0[1], [r0], r2
+        vst1.32         d1[0], [r0], r2
+        vst1.32         d1[1], [r0], r2

Add :32 alignment here as well

+        bx              lr
+endfunc
+
+function ff_hevc_add_residual_8x8_8_neon, export=1
+        mov             r3,   #8
+1:      subs            r3,   #2
+        vld1.16         {q0-q1}, [r1, :128]!
+        vld1.8          {q8},    [r0, :128]

You can't do this; this loads two rows from the output, which actually are r2 bytes apart. This only happens to work in checkasm since checkasm has a tightly packed buffer for the image data. You need to load d16 and d17 separately.

To make it clear - you don't notice this issue in checkasm, but if you run "make fate-hevc", you'll notice. Try to remember to test that before submitting patches - checkasm testing isn't perfect.

// Martin
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to