summaryrefslogtreecommitdiff
path: root/libavcodec/dsputil.h
diff options
context:
space:
mode:
authorMåns Rullgård <mans@mansr.com>2009-09-22 00:48:41 +0000
committerMåns Rullgård <mans@mansr.com>2009-09-22 00:48:41 +0000
commit53b572118ed9f88219e94f08ef7bff79882247ae (patch)
tree91e0243c0e2240e183fdabee2591970faea918dd /libavcodec/dsputil.h
parent9caab878292b61cb2325dc3caa8e426df0e762ea (diff)
Add some dsputil functions useful for AAC decoder
Originally committed as revision 19955 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/dsputil.h')
-rw-r--r--libavcodec/dsputil.h50
1 files changed, 50 insertions, 0 deletions
diff --git a/libavcodec/dsputil.h b/libavcodec/dsputil.h
index 88a0ee8662..58d5b49bd5 100644
--- a/libavcodec/dsputil.h
+++ b/libavcodec/dsputil.h
@@ -397,6 +397,56 @@ typedef struct DSPContext {
/* assume len is a multiple of 8, and arrays are 16-byte aligned */
void (*int32_to_float_fmul_scalar)(float *dst, const int *src, float mul, int len);
void (*vector_clipf)(float *dst /* align 16 */, const float *src /* align 16 */, float min, float max, int len /* align 16 */);
+ /**
+ * Multiply a vector of floats by a scalar float. Source and
+ * destination vectors must overlap exactly or not at all.
+ * @param dst result vector, 16-byte aligned
+ * @param src input vector, 16-byte aligned
+ * @param mul scalar value
+ * @param len length of vector, multiple of 4
+ */
+ void (*vector_fmul_scalar)(float *dst, const float *src, float mul,
+ int len);
+ /**
+ * Multiply a vector of floats by concatenated short vectors of
+ * floats and by a scalar float. Source and destination vectors
+ * must overlap exactly or not at all.
+ * [0]: short vectors of length 2, 8-byte aligned
+ * [1]: short vectors of length 4, 16-byte aligned
+ * @param dst output vector, 16-byte aligned
+ * @param src input vector, 16-byte aligned
+ * @param sv array of pointers to short vectors
+ * @param mul scalar value
+ * @param len number of elements in src and dst, multiple of 4
+ */
+ void (*vector_fmul_sv_scalar[2])(float *dst, const float *src,
+ const float **sv, float mul, int len);
+ /**
+ * Multiply short vectors of floats by a scalar float, store
+ * concatenated result.
+ * [0]: short vectors of length 2, 8-byte aligned
+ * [1]: short vectors of length 4, 16-byte aligned
+ * @param dst output vector, 16-byte aligned
+ * @param sv array of pointers to short vectors
+ * @param mul scalar value
+ * @param len number of output elements, multiple of 4
+ */
+ void (*sv_fmul_scalar[2])(float *dst, const float **sv,
+ float mul, 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
+ */
+ float (*scalarproduct_float)(const float *v1, const float *v2, int len);
+ /**
+ * Calculate the sum and difference of two vectors of floats.
+ * @param v1 first input vector, sum output, 16-byte aligned
+ * @param v2 second input vector, difference output, 16-byte aligned
+ * @param len length of vectors, multiple of 4
+ */
+ void (*butterflies_float)(float *restrict v1, float *restrict v2, int len);
/* C version: convert floats from the range [384.0,386.0] to ints in [-32768,32767]
* simd versions: convert floats from [-32768.0,32767.0] without rescaling and arrays are 16byte aligned */