diff options
author | Jean-Marc Valin <jmvalin@jmvalin.ca> | 2012-04-24 17:00:54 -0400 |
---|---|---|
committer | Jean-Marc Valin <jmvalin@jmvalin.ca> | 2012-04-24 17:00:54 -0400 |
commit | b3deb5342f54a1b09a5d301ae937914320691f2c (patch) | |
tree | b4a046f4eb4e19f52e47d98b0490d10fa2d6ece2 /celt | |
parent | 4f0c07f640964ec75b6643fa09ca1290a01f1076 (diff) | |
download | libopus-b3deb5342f54a1b09a5d301ae937914320691f2c.tar.gz |
Prevents remove_doubling() from considering negative pitch gains
Diffstat (limited to 'celt')
-rw-r--r-- | celt/pitch.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/celt/pitch.c b/celt/pitch.c index 5b0cfb6f..29e4bd12 100644 --- a/celt/pitch.c +++ b/celt/pitch.c @@ -365,6 +365,7 @@ opus_val16 remove_doubling(opus_val16 *x, int maxperiod, int minperiod, g = g1; } } + best_xy = MAX32(0, best_xy); if (best_yy <= best_xy) pg = Q15ONE; else |