[FFmpeg-cvslog] r18333 - in trunk/libavcodec/arm: dsputil_neon.c dsputil_neon_s.S

conrad subversion
Sat Apr 4 23:02:49 CEST 2009


Author: conrad
Date: Sat Apr  4 23:02:48 2009
New Revision: 18333

Log:
ARM: NEON optimized put_signed_pixels_clamped

Modified:
   trunk/libavcodec/arm/dsputil_neon.c
   trunk/libavcodec/arm/dsputil_neon_s.S

Modified: trunk/libavcodec/arm/dsputil_neon.c
==============================================================================
--- trunk/libavcodec/arm/dsputil_neon.c	Sat Apr  4 22:18:58 2009	(r18332)
+++ trunk/libavcodec/arm/dsputil_neon.c	Sat Apr  4 23:02:48 2009	(r18333)
@@ -42,6 +42,7 @@ void ff_put_pixels8_xy2_no_rnd_neon(uint
 void ff_avg_pixels16_neon(uint8_t *, const uint8_t *, int, int);
 
 void ff_add_pixels_clamped_neon(const DCTELEM *, uint8_t *, int);
+void ff_put_signed_pixels_clamped_neon(const DCTELEM *, uint8_t *, int);
 
 void ff_put_h264_qpel16_mc00_neon(uint8_t *, uint8_t *, int);
 void ff_put_h264_qpel16_mc10_neon(uint8_t *, uint8_t *, int);
@@ -179,6 +180,7 @@ void ff_dsputil_init_neon(DSPContext *c,
     c->avg_pixels_tab[0][0] = ff_avg_pixels16_neon;
 
     c->add_pixels_clamped = ff_add_pixels_clamped_neon;
+    c->put_signed_pixels_clamped = ff_put_signed_pixels_clamped_neon;
 
     c->put_h264_chroma_pixels_tab[0] = ff_put_h264_chroma_mc8_neon;
     c->put_h264_chroma_pixels_tab[1] = ff_put_h264_chroma_mc4_neon;

Modified: trunk/libavcodec/arm/dsputil_neon_s.S
==============================================================================
--- trunk/libavcodec/arm/dsputil_neon_s.S	Sat Apr  4 22:18:58 2009	(r18332)
+++ trunk/libavcodec/arm/dsputil_neon_s.S	Sat Apr  4 23:02:48 2009	(r18333)
@@ -273,6 +273,43 @@ function ff_put_h264_qpel8_mc00_neon, ex
         pixfunc2 put_ pixels8_y2,   _no_rnd, vhadd.u8
         pixfunc2 put_ pixels8_xy2,  _no_rnd, vshrn.u16, 1
 
+function ff_put_signed_pixels_clamped_neon, export=1
+        vmov.u8         d31, #128
+        vld1.64         {d16-d17}, [r0,:128]!
+        vqmovn.s16      d0, q8
+        vld1.64         {d18-d19}, [r0,:128]!
+        vqmovn.s16      d1, q9
+        vld1.64         {d16-d17}, [r0,:128]!
+        vqmovn.s16      d2, q8
+        vld1.64         {d18-d19}, [r0,:128]!
+        vadd.u8         d0, d0, d31
+        vld1.64         {d20-d21}, [r0,:128]!
+        vadd.u8         d1, d1, d31
+        vld1.64         {d22-d23}, [r0,:128]!
+        vadd.u8         d2, d2, d31
+        vst1.64         {d0},      [r1,:64], r2
+        vqmovn.s16      d3, q9
+        vst1.64         {d1},      [r1,:64], r2
+        vqmovn.s16      d4, q10
+        vst1.64         {d2},      [r1,:64], r2
+        vqmovn.s16      d5, q11
+        vld1.64         {d24-d25}, [r0,:128]!
+        vadd.u8         d3, d3, d31
+        vld1.64         {d26-d27}, [r0,:128]!
+        vadd.u8         d4, d4, d31
+        vadd.u8         d5, d5, d31
+        vst1.64         {d3},      [r1,:64], r2
+        vqmovn.s16      d6, q12
+        vst1.64         {d4},      [r1,:64], r2
+        vqmovn.s16      d7, q13
+        vst1.64         {d5},      [r1,:64], r2
+        vadd.u8         d6, d6, d31
+        vadd.u8         d7, d7, d31
+        vst1.64         {d6},      [r1,:64], r2
+        vst1.64         {d7},      [r1,:64], r2
+        bx              lr
+        .endfunc
+
 function ff_add_pixels_clamped_neon, export=1
         mov             r3, r1
         vld1.64         {d16},   [r1,:64], r2



More information about the ffmpeg-cvslog mailing list