Fix ambisonics bitrate when bitrate_bps is OPUS_AUTO

Change-Id: I16bd4cd990d8ad5888c9e30016218ac25242ecb5

Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
This commit is contained in:
Michael Graczyk 2016-09-07 15:26:51 -07:00 committed by Jean-Marc Valin
parent ac9fabc7be
commit fa2578bf47
No known key found for this signature in database
GPG key ID: 5E5DD9A36F9189C8

View file

@ -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;