summaryrefslogtreecommitdiff
path: root/libavutil/float_dsp.h
diff options
context:
space:
mode:
authorRonald S. Bultje <rsbultje@gmail.com>2013-01-20 15:41:52 -0800
committerRonald S. Bultje <rsbultje@gmail.com>2013-01-22 11:55:42 -0800
commitd56668bd80075615b89aff652fe8a576bf853ceb (patch)
tree9da3ed036b716dbaf33f5c9869578bedb6e393a2 /libavutil/float_dsp.h
parent5959bfaca396ecaf63a8123055f499688b79cae3 (diff)
floatdsp: move scalarproduct_float from dsputil to avfloatdsp.
This makes the aac decoder and all voice codecs independent of dsputil.
Diffstat (limited to 'libavutil/float_dsp.h')
-rw-r--r--libavutil/float_dsp.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/libavutil/float_dsp.h b/libavutil/float_dsp.h
index ec57b36f79..f2b90a4848 100644
--- a/libavutil/float_dsp.h
+++ b/libavutil/float_dsp.h
@@ -146,9 +146,31 @@ typedef struct AVFloatDSPContext {
* @param len length of vectors, multiple of 4
*/
void (*butterflies_float)(float *restrict v1, float *restrict v2, int len);
+
+ /**
+ * Calculate the scalar product of two vectors of floats.
+ *
+ * @param v1 first vector, 16-byte aligned
+ * @param v2 second vector, 16-byte aligned
+ * @param len length of vectors, multiple of 4
+ *
+ * @return sum of elementwise products
+ */
+ float (*scalarproduct_float)(const float *v1, const float *v2, int len);
} AVFloatDSPContext;
/**
+ * Return the scalar product of two vectors.
+ *
+ * @param v1 first input vector
+ * @param v2 first input vector
+ * @param len number of elements
+ *
+ * @return sum of elementwise products
+ */
+float avpriv_scalarproduct_float_c(const float *v1, const float *v2, int len);
+
+/**
* Initialize a float DSP context.
*
* @param fdsp float DSP context