]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/opusdsp.c
avformat/http: Remove deprecated "user-agent" option
[ffmpeg] / libavcodec / opusdsp.c
index 615e7d681670a416a0b07c3f8c03cf2b2f89bc91..08df87ffbe958fc301fdc945679f641b7773dd84 100644 (file)
@@ -43,19 +43,20 @@ static void postfilter_c(float *data, int period, float *gains, int len)
 
 static float deemphasis_c(float *y, float *x, float coeff, int len)
 {
-    float state = coeff;
+    for (int i = 0; i < len; i++)
+        coeff = y[i] = x[i] + coeff*CELT_EMPH_COEFF;
 
-    for (int i = 0; i < len; i++) {
-        const float tmp = x[i] + state;
-        state = tmp * CELT_EMPH_COEFF;
-        y[i] = tmp;
-    }
-
-    return state;
+    return coeff;
 }
 
 av_cold void ff_opus_dsp_init(OpusDSP *ctx)
 {
     ctx->postfilter = postfilter_c;
     ctx->deemphasis = deemphasis_c;
+
+    if (ARCH_X86)
+        ff_opus_dsp_init_x86(ctx);
+
+    if (ARCH_AARCH64)
+        ff_opus_dsp_init_aarch64(ctx);
 }