diff options
author | Jean-Marc Valin <jmvalin@jmvalin.ca> | 2013-11-25 21:24:30 -0500 |
---|---|---|
committer | Jean-Marc Valin <jmvalin@jmvalin.ca> | 2013-11-25 21:24:30 -0500 |
commit | 2924af4db0898e3bdb4572432bf9dcc69ca975c3 (patch) | |
tree | e5792cb86b75cbe41b6e2a0ac968a5907b82a6a7 | |
parent | 93e1096093b219e41835866a904d8ebc6a43a0ee (diff) | |
download | opus-2924af4db0898e3bdb4572432bf9dcc69ca975c3.tar.gz |
Merges surround and stereo intensity stereo thresholds again.
The different results for surround were mostly due to a bug in squishyball.
-rw-r--r-- | celt/celt_encoder.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/celt/celt_encoder.c b/celt/celt_encoder.c index a424aae6..bbd30e9e 100644 --- a/celt/celt_encoder.c +++ b/celt/celt_encoder.c @@ -1804,11 +1804,9 @@ int celt_encode_with_ec(CELTEncoder * OPUS_RESTRICT st, const opus_val16 * pcm, if (C==2) { - int surround; - static const opus_val16 intensity_thresholds[2][21]= + static const opus_val16 intensity_thresholds[21]= /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 off*/ - {{ 1, 2, 3, 4, 5, 6, 7,20,26,30,36,44,50,56,62,67,72,79,88,106,134}, - { 1, 2, 3, 4, 5, 6, 7,12,16,18,24,30,36,42,48,54,60,66,80, 98,120}}; + { 1, 2, 3, 4, 5, 6, 7, 8,16,24,36,44,50,56,62,67,72,79,88,106,134}; static const opus_val16 intensity_histeresis[21]= { 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 3, 3, 4, 5, 6, 8, 8}; @@ -1816,9 +1814,8 @@ int celt_encode_with_ec(CELTEncoder * OPUS_RESTRICT st, const opus_val16 * pcm, if (LM!=0) dual_stereo = stereo_analysis(mode, X, LM, N); - surround = st->energy_mask!=NULL; st->intensity = hysteresis_decision((opus_val16)equiv_rate/1000, - intensity_thresholds[surround], intensity_histeresis, 21, st->intensity); + intensity_thresholds, intensity_histeresis, 21, st->intensity); st->intensity = IMIN(st->end,IMAX(st->start, st->intensity)); } |