]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/lossless_audiodsp.c
Merge commit '527bf5f7c6890664b0f1dccd42397f4d204659fe'
[ffmpeg] / libavcodec / lossless_audiodsp.c
index 32f4c9e856550f14d710a83a4f5776f05f9dd875..55495d00e19b03c66090d94c7f1782fe040fb9cc 100644 (file)
@@ -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);