diff options
author | Jean-Marc Valin <jmvalin@jmvalin.ca> | 2012-08-14 00:37:47 -0400 |
---|---|---|
committer | Jean-Marc Valin <jmvalin@jmvalin.ca> | 2012-08-14 00:37:47 -0400 |
commit | dc4f83bef59b66608b4274c229dedf21b3fa6ecb (patch) | |
tree | 670cd5d26a8f37aeacfd5cc9677e32c64f487fc3 /celt/celt.c | |
parent | c4a95d16cf16574299a1800e2007ec3f02a7ae5a (diff) | |
download | opus-dc4f83bef59b66608b4274c229dedf21b3fa6ecb.tar.gz |
Fixes a silly bug where only the left channel was used for depth estimation
Result was that stereo files with silence on the left would result in an
extremely low bitrate
Diffstat (limited to 'celt/celt.c')
-rw-r--r-- | celt/celt.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/celt/celt.c b/celt/celt.c index f3db223a..b3d3508f 100644 --- a/celt/celt.c +++ b/celt/celt.c @@ -1470,7 +1470,7 @@ int celt_encode_with_ec(CELTEncoder * restrict st, const opus_val16 * pcm, int f +QCONST16(.5f,DB_SHIFT)+SHL16(9-st->lsb_depth,DB_SHIFT)-SHL16(eMeans[i],6) +MULT16_16(QCONST16(.0062,DB_SHIFT),(i+5)*(i+5)); follower[c*st->mode->nbEBands+i] = MAX16(follower[c*st->mode->nbEBands+i], noise_floor); - maxDepth = MAX16(maxDepth, bandLogE[i]-noise_floor); + maxDepth = MAX16(maxDepth, bandLogE[c*st->mode->nbEBands+i]-noise_floor); } } while (++c<C); if (C==2) |