diff x86/dsputil_mmx.c @ 10964:abb3b23bda35 libavcodec

Implement an sse version of scalarproduct_float().
author alexc
date Fri, 22 Jan 2010 23:07:58 +0000
parents 34a65026fa06
children 001eb7e3e2d3
line wrap: on
line diff
--- a/x86/dsputil_mmx.c	Fri Jan 22 19:07:44 2010 +0000
+++ b/x86/dsputil_mmx.c	Fri Jan 22 23:07:58 2010 +0000
@@ -2510,6 +2510,8 @@
                                   int src_x, int src_y, int src_stride, slice_buffer * sb, int add, uint8_t * dst8);
 
 
+float ff_scalarproduct_float_sse(const float *v1, const float *v2, int order);
+
 void dsputil_init_mmx(DSPContext* c, AVCodecContext *avctx)
 {
     mm_flags = mm_support();
@@ -2965,6 +2967,9 @@
             c->vector_clipf = vector_clipf_sse;
             c->float_to_int16 = float_to_int16_sse;
             c->float_to_int16_interleave = float_to_int16_interleave_sse;
+#if HAVE_YASM
+            c->scalarproduct_float = ff_scalarproduct_float_sse;
+#endif
         }
         if(mm_flags & FF_MM_3DNOW)
             c->vector_fmul_add = vector_fmul_add_3dnow; // faster than sse