summaryrefslogtreecommitdiff
path: root/libavcodec/fmtconvert.c
diff options
context:
space:
mode:
authorHendrik Leppkes <h.leppkes@gmail.com>2016-01-02 13:08:29 +0100
committerHendrik Leppkes <h.leppkes@gmail.com>2016-01-02 13:08:29 +0100
commitaf1238f863fda4a1a6fc00525b651a3d9b31eccd (patch)
tree52f1c7491bf534916c297e3ceaead865b6ad3335 /libavcodec/fmtconvert.c
parenta51c2fcdc15dd37a2d95265a5b74d522b0b0b232 (diff)
parentaebf07075f4244caf591a3af71e5872fe314e87b (diff)
downloadffmpeg-af1238f863fda4a1a6fc00525b651a3d9b31eccd.tar.gz
Merge commit 'aebf07075f4244caf591a3af71e5872fe314e87b'
* commit 'aebf07075f4244caf591a3af71e5872fe314e87b': dca: change the core to work with integer coefficients. Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
Diffstat (limited to 'libavcodec/fmtconvert.c')
-rw-r--r--libavcodec/fmtconvert.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/libavcodec/fmtconvert.c b/libavcodec/fmtconvert.c
index 88ffcb00e7..3b33af61ef 100644
--- a/libavcodec/fmtconvert.c
+++ b/libavcodec/fmtconvert.c
@@ -32,6 +32,14 @@ static void int32_to_float_fmul_scalar_c(float *dst, const int32_t *src,
dst[i] = src[i] * mul;
}
+static void int32_to_float_c(float *dst, const int32_t *src, intptr_t len)
+{
+ int i;
+
+ for (i = 0; i < len; i++)
+ dst[i] = (float)src[i];
+}
+
static void int32_to_float_fmul_array8_c(FmtConvertContext *c, float *dst,
const int32_t *src, const float *mul,
int len)
@@ -43,6 +51,7 @@ static void int32_to_float_fmul_array8_c(FmtConvertContext *c, float *dst,
av_cold void ff_fmt_convert_init(FmtConvertContext *c, AVCodecContext *avctx)
{
+ c->int32_to_float = int32_to_float_c;
c->int32_to_float_fmul_scalar = int32_to_float_fmul_scalar_c;
c->int32_to_float_fmul_array8 = int32_to_float_fmul_array8_c;