[x264-devel] [PATCH] x264_denoise_dct_neon
George Stephanos
gaf.stephanos at gmail.com
Thu Feb 9 00:53:07 CET 2012
---
common/arm/quant-a.S | 28 ++++++++++++++++++++++++++++
common/arm/quant.h | 2 ++
common/quant.c | 1 +
3 files changed, 31 insertions(+), 0 deletions(-)
diff --git a/common/arm/quant-a.S b/common/arm/quant-a.S
index 3d435cf..2b23604 100644
--- a/common/arm/quant-a.S
+++ b/common/arm/quant-a.S
@@ -680,3 +680,31 @@ function x264_decimate_score64_neon
bx lr
.endfunc
+function x264_denoise_dct_neon
+1:
+ vld1.64 {d0-d3}, [r0,:128]
+ vshr.s16 q8, q0, #15
+ vshr.s16 q9, q1, #15
+ vabs.s16 q0, q0
+ vabs.s16 q1, q1
+ vld1.64 {d4-d7}, [r1,:128]!
+ vld1.64 {d20-d23}, [r1,:128]
+ vaddw.s16 q2, d0
+ vaddw.s16 q3, d1
+ sub r1, #32
+ vaddw.s16 q10, d2
+ vaddw.s16 q11, d3
+ vst1.64 {d4-d7}, [r1,:128]!
+ vld1.64 {d4-d7}, [r2,:128]!
+ vst1.64 {d20-d23}, [r1,:128]!
+ vqsub.u16 q0, q2
+ vqsub.u16 q1, q3
+ veor q0, q8
+ veor q1, q9
+ vsub.s16 q0, q8
+ vsub.s16 q1, q9
+ subs r3, #16
+ vst1.64 {d0-d3}, [r0,:128]!
+ bgt 1b
+ bx lr
+.endfunc
diff --git a/common/arm/quant.h b/common/arm/quant.h
index ee78d1c..2079abc 100644
--- a/common/arm/quant.h
+++ b/common/arm/quant.h
@@ -51,4 +51,6 @@ int x264_decimate_score15_neon( int16_t * );
int x264_decimate_score16_neon( int16_t * );
int x264_decimate_score64_neon( int16_t * );
+void x264_denoise_dct_neon( int16_t *, uint32_t *, udctcoef *offset, int size );
+
#endif
diff --git a/common/quant.c b/common/quant.c
index 5d85c81..a986666 100644
--- a/common/quant.c
+++ b/common/quant.c
@@ -713,6 +713,7 @@ void x264_quant_init( x264_t *h, int cpu, x264_quant_function_t *pf )
pf->decimate_score15 = x264_decimate_score15_neon;
pf->decimate_score16 = x264_decimate_score16_neon;
pf->decimate_score64 = x264_decimate_score64_neon;
+ pf->denoise_dct = x264_denoise_dct_neon;
}
#endif
#endif // HIGH_BIT_DEPTH
--
1.7.4.1
More information about the x264-devel
mailing list