shithub: opus

Download patch

ref: b4d0df8ddee3b555369c571a60d76360e1ecfd86
parent: adf94f2c6135f3e891bf0bd110f673ca46c42cc3
author: Jean-Marc Valin <[email protected]>
date: Mon Aug 15 15:19:47 EDT 2016

Oops, fixes the sign in dc_reject()

Thanks to Mark Harris for pointing it out.

--- a/src/opus_encoder.c
+++ b/src/opus_encoder.c
@@ -422,8 +422,8 @@
          /* First stage */
          tmp0 = x0-m0;
          tmp1 = x1-m2;
-         m0 = coef*x0 + VERY_SMALL - coef2*m0;
-         m2 = coef*x1 + VERY_SMALL - coef2*m2;
+         m0 = coef*x0 + VERY_SMALL + coef2*m0;
+         m2 = coef*x1 + VERY_SMALL + coef2*m2;
          /* Second stage */
          y0 = tmp0 - m1;
          y1 = tmp1 - m3;
@@ -446,7 +446,7 @@
          x = in[i];
          /* First stage */
          tmp = x-m0;
-         m0 = coef*x + VERY_SMALL - coef2*m0;
+         m0 = coef*x + VERY_SMALL + coef2*m0;
          /* Second stage */
          y = tmp - m1;
          m1 = coef*tmp + VERY_SMALL + coef2*m1;