ref: 1b61303fc7e61f87539d3398c8c5ed3343b60b8d
parent: b2e19ecd0cd94539ed31d394aa693b7703972d53
author: Jean-Marc Valin <[email protected]>
date: Tue Oct 9 16:18:28 EDT 2012
Fixes a bug in the LSB_DEPTH code introduced in cf1053dc
--- a/celt/celt.c
+++ b/celt/celt.c
@@ -1174,8 +1174,8 @@
ALLOC(in, CC*(N+st->overlap), celt_sig);
- sample_max=MAX16(st->overlap_max, celt_maxabs16(pcm, C*(N-st->mode->overlap)));
- st->overlap_max=celt_maxabs16(pcm+C*(N-st->mode->overlap), C*st->mode->overlap);
+ sample_max=MAX16(st->overlap_max, celt_maxabs16(pcm, C*(N-st->mode->overlap)/st->upsample));
+ st->overlap_max=celt_maxabs16(pcm+C*(N-st->mode->overlap)/st->upsample, C*st->mode->overlap/st->upsample);
sample_max=MAX16(sample_max, st->overlap_max);
/* Find pitch period and gain */
{