Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.xiph.org/xiph/opus.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Graczyk <mgraczyk@google.com>2016-09-08 01:26:51 +0300
committerJean-Marc Valin <jmvalin@jmvalin.ca>2016-09-08 18:34:42 +0300
commitfa2578bf4791be31b67748ce6a815829d9a6f175 (patch)
treecb173dae64ff571b7636bb10dd4c93454971bbde
parentac9fabc7be6576dc9fed463eeda0c6c3574aa9c9 (diff)
Fix ambisonics bitrate when bitrate_bps is OPUS_AUTO
Change-Id: I16bd4cd990d8ad5888c9e30016218ac25242ecb5 Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
-rw-r--r--src/opus_multistream_encoder.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/opus_multistream_encoder.c b/src/opus_multistream_encoder.c
index 30cafe11..c07132f1 100644
--- a/src/opus_multistream_encoder.c
+++ b/src/opus_multistream_encoder.c
@@ -747,7 +747,8 @@ static void ambisonics_rate_allocation(
if (st->bitrate_bps==OPUS_AUTO)
{
- total_rate = num_channels * (20000 + st->layout.nb_streams*(Fs+60*Fs/frame_size));
+ total_rate = (st->layout.nb_coupled_streams + st->layout.nb_streams) *
+ (Fs+60*Fs/frame_size) + st->layout.nb_streams * 15000;
} else if (st->bitrate_bps==OPUS_BITRATE_MAX)
{
total_rate = num_channels * 320000;