ref: fa2578bf4791be31b67748ce6a815829d9a6f175
parent: ac9fabc7be6576dc9fed463eeda0c6c3574aa9c9
author: Michael Graczyk <[email protected]>
date: Wed Sep 7 11:26:51 EDT 2016
Fix ambisonics bitrate when bitrate_bps is OPUS_AUTO Change-Id: I16bd4cd990d8ad5888c9e30016218ac25242ecb5 Signed-off-by: Jean-Marc Valin <[email protected]>
--- a/src/opus_multistream_encoder.c
+++ b/src/opus_multistream_encoder.c
@@ -747,7 +747,8 @@
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;