aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMåns Rullgård <mans@mansr.com>2008-12-15 22:12:54 +0000
committerMåns Rullgård <mans@mansr.com>2008-12-15 22:12:54 +0000
commit1bf98d19d57b082387a4e939f90c385e28511fc6 (patch)
tree8127b2bb4609f9cf4bff78383fec915e06c69a3e /libavcodec
parentc598cf25f4bdeca0616018399a38b0087f63f634 (diff)
downloadffmpeg-1bf98d19d57b082387a4e939f90c385e28511fc6.tar.gz
ARM: NEON optimised h264_idct_dc_add
Originally committed as revision 16151 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/armv4l/dsputil_neon.c2
-rw-r--r--libavcodec/armv4l/h264idct_neon.S19
2 files changed, 21 insertions, 0 deletions
diff --git a/libavcodec/armv4l/dsputil_neon.c b/libavcodec/armv4l/dsputil_neon.c
index 4fe5d0f4d3..5204c50e37 100644
--- a/libavcodec/armv4l/dsputil_neon.c
+++ b/libavcodec/armv4l/dsputil_neon.c
@@ -93,6 +93,7 @@ void ff_h264_h_loop_filter_chroma_neon(uint8_t *pix, int stride, int alpha,
int beta, int8_t *tc0);
void ff_h264_idct_add_neon(uint8_t *dst, DCTELEM *block, int stride);
+void ff_h264_idct_dc_add_neon(uint8_t *dst, DCTELEM *block, int stride);
void ff_dsputil_init_neon(DSPContext *c, AVCodecContext *avctx)
{
@@ -164,4 +165,5 @@ void ff_dsputil_init_neon(DSPContext *c, AVCodecContext *avctx)
c->h264_h_loop_filter_chroma = ff_h264_h_loop_filter_chroma_neon;
c->h264_idct_add = ff_h264_idct_add_neon;
+ c->h264_idct_dc_add = ff_h264_idct_dc_add_neon;
}
diff --git a/libavcodec/armv4l/h264idct_neon.S b/libavcodec/armv4l/h264idct_neon.S
index 3484ca9610..b7ef2f4519 100644
--- a/libavcodec/armv4l/h264idct_neon.S
+++ b/libavcodec/armv4l/h264idct_neon.S
@@ -75,3 +75,22 @@ function ff_h264_idct_add_neon, export=1
bx lr
.endfunc
+
+function ff_h264_idct_dc_add_neon, export=1
+ vld1.16 {d2[],d3[]}, [r1,:16]
+ vrshr.s16 q1, q1, #6
+ vld1.32 {d0[0]}, [r0,:32], r2
+ vld1.32 {d0[1]}, [r0,:32], r2
+ vaddw.u8 q2, q1, d0
+ vld1.32 {d1[0]}, [r0,:32], r2
+ vld1.32 {d1[1]}, [r0,:32], r2
+ vaddw.u8 q1, q1, d1
+ vqmovun.s16 d0, q2
+ vqmovun.s16 d1, q1
+ sub r0, r0, r2, lsl #2
+ vst1.32 {d0[0]}, [r0,:32], r2
+ vst1.32 {d0[1]}, [r0,:32], r2
+ vst1.32 {d1[0]}, [r0,:32], r2
+ vst1.32 {d1[1]}, [r0,:32], r2
+ bx lr
+ .endfunc