[FFmpeg-cvslog] ARM: NEON optimised apply_window_int16()
Mans Rullgard
git at videolan.org
Fri Mar 25 03:13:36 CET 2011
ffmpeg | branch: master | Mans Rullgard <mans at mansr.com> | Wed Mar 23 01:45:43 2011 +0000| [2d3b21ffb91610f806a6c550dc142520d7a11e50] | committer: Mans Rullgard
ARM: NEON optimised apply_window_int16()
Signed-off-by: Mans Rullgard <mans at mansr.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2d3b21ffb91610f806a6c550dc142520d7a11e50
---
libavcodec/arm/dsputil_init_neon.c | 5 +++++
libavcodec/arm/dsputil_neon.S | 23 +++++++++++++++++++++++
2 files changed, 28 insertions(+), 0 deletions(-)
diff --git a/libavcodec/arm/dsputil_init_neon.c b/libavcodec/arm/dsputil_init_neon.c
index 2b283c4..eb0bc57 100644
--- a/libavcodec/arm/dsputil_init_neon.c
+++ b/libavcodec/arm/dsputil_init_neon.c
@@ -168,6 +168,9 @@ int32_t ff_scalarproduct_int16_neon(const int16_t *v1, const int16_t *v2, int le
int32_t ff_scalarproduct_and_madd_int16_neon(int16_t *v1, const int16_t *v2,
const int16_t *v3, int len, int mul);
+void ff_apply_window_int16_neon(int16_t *dst, const int16_t *src,
+ const int16_t *window, int n);
+
void ff_dsputil_init_neon(DSPContext *c, AVCodecContext *avctx)
{
if (!avctx->lowres) {
@@ -319,4 +322,6 @@ void ff_dsputil_init_neon(DSPContext *c, AVCodecContext *avctx)
c->scalarproduct_int16 = ff_scalarproduct_int16_neon;
c->scalarproduct_and_madd_int16 = ff_scalarproduct_and_madd_int16_neon;
+
+ c->apply_window_int16 = ff_apply_window_int16_neon;
}
diff --git a/libavcodec/arm/dsputil_neon.S b/libavcodec/arm/dsputil_neon.S
index 140f5a0..5b80e40 100644
--- a/libavcodec/arm/dsputil_neon.S
+++ b/libavcodec/arm/dsputil_neon.S
@@ -789,3 +789,26 @@ NOVFP ldr r2, [sp]
vst1.f32 {q9},[r0,:128]!
bx lr
endfunc
+
+function ff_apply_window_int16_neon, export=1
+ push {r4,lr}
+ add r4, r1, r3, lsl #1
+ add lr, r0, r3, lsl #1
+ sub r4, r4, #16
+ sub lr, lr, #16
+ mov r12, #-16
+1:
+ vld1.16 {q0}, [r1,:128]!
+ vld1.16 {q2}, [r2,:128]!
+ vld1.16 {q1}, [r4,:128], r12
+ vrev64.16 q3, q2
+ vqrdmulh.s16 q0, q0, q2
+ vqrdmulh.s16 d2, d2, d7
+ vqrdmulh.s16 d3, d3, d6
+ vst1.16 {q0}, [r0,:128]!
+ vst1.16 {q1}, [lr,:128], r12
+ subs r3, r3, #16
+ bgt 1b
+
+ pop {r4,pc}
+endfunc
More information about the ffmpeg-cvslog
mailing list