Commit 4dc2dd80 authored by Paul B Mahol's avatar Paul B Mahol

avutil/float_dsp: add vector_dmac_scalar()

Signed-off-by: 's avatarPaul B Mahol <onemda@gmail.com>
parent 9cd44e64
......@@ -40,6 +40,14 @@ static void vector_fmac_scalar_c(float *dst, const float *src, float mul,
dst[i] += src[i] * mul;
}
static void vector_dmac_scalar_c(double *dst, const double *src, double mul,
int len)
{
int i;
for (i = 0; i < len; i++)
dst[i] += src[i] * mul;
}
static void vector_fmul_scalar_c(float *dst, const float *src, float mul,
int len)
{
......@@ -125,6 +133,7 @@ av_cold AVFloatDSPContext *avpriv_float_dsp_alloc(int bit_exact)
fdsp->vector_fmul = vector_fmul_c;
fdsp->vector_fmac_scalar = vector_fmac_scalar_c;
fdsp->vector_fmul_scalar = vector_fmul_scalar_c;
fdsp->vector_dmac_scalar = vector_dmac_scalar_c;
fdsp->vector_dmul_scalar = vector_dmul_scalar_c;
fdsp->vector_fmul_window = vector_fmul_window_c;
fdsp->vector_fmul_add = vector_fmul_add_c;
......
......@@ -54,6 +54,22 @@ typedef struct AVFloatDSPContext {
void (*vector_fmac_scalar)(float *dst, const float *src, float mul,
int len);
/**
* Multiply a vector of doubles by a scalar double and add to
* destination vector. Source and destination vectors must
* overlap exactly or not at all.
*
* @param dst result vector
* constraints: 32-byte aligned
* @param src input vector
* constraints: 32-byte aligned
* @param mul scalar value
* @param len length of vector
* constraints: multiple of 16
*/
void (*vector_dmac_scalar)(double *dst, const double *src, double mul,
int len);
/**
* Multiply a vector of floats by a scalar float. Source and
* destination vectors must overlap exactly or not at all.
......
......@@ -80,7 +80,7 @@
#define LIBAVUTIL_VERSION_MAJOR 55
#define LIBAVUTIL_VERSION_MINOR 60
#define LIBAVUTIL_VERSION_MICRO 100
#define LIBAVUTIL_VERSION_MICRO 101
#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
LIBAVUTIL_VERSION_MINOR, \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment