aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/lossless_audiodsp.c
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2016-04-13 20:36:26 +0200
committerPaul B Mahol <onemda@gmail.com>2016-04-13 22:56:53 +0200
commit56759f69a6015b3ce6bdf4b7ae441bb44b097e5e (patch)
tree08849c551b51e1646d9bc1dc41dcc96c9c12ce8b /libavcodec/lossless_audiodsp.c
parent5ac71e9db84c83d5b52904c6910bb4a52d184931 (diff)
downloadffmpeg-56759f69a6015b3ce6bdf4b7ae441bb44b097e5e.tar.gz
avcodec/wmalosslessdec: improve 24bit support
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavcodec/lossless_audiodsp.c')
-rw-r--r--libavcodec/lossless_audiodsp.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/libavcodec/lossless_audiodsp.c b/libavcodec/lossless_audiodsp.c
index 32f4c9e856..55495d00e1 100644
--- a/libavcodec/lossless_audiodsp.c
+++ b/libavcodec/lossless_audiodsp.c
@@ -36,9 +36,23 @@ static int32_t scalarproduct_and_madd_int16_c(int16_t *v1, const int16_t *v2,
return res;
}
+static int32_t scalarproduct_and_madd_int32_c(int32_t *v1, const int32_t *v2,
+ const int32_t *v3,
+ int order, int mul)
+{
+ int res = 0;
+
+ while (order--) {
+ res += *v1 * *v2++;
+ *v1++ += mul * *v3++;
+ }
+ return res;
+}
+
av_cold void ff_llauddsp_init(LLAudDSPContext *c)
{
c->scalarproduct_and_madd_int16 = scalarproduct_and_madd_int16_c;
+ c->scalarproduct_and_madd_int32 = scalarproduct_and_madd_int32_c;
if (ARCH_ARM)
ff_llauddsp_init_arm(c);