diff options
author | Jean-Marc Valin <jmvalin@jmvalin.ca> | 2013-11-13 22:58:10 -0500 |
---|---|---|
committer | Jean-Marc Valin <jmvalin@jmvalin.ca> | 2013-11-13 22:58:10 -0500 |
commit | 87ca6c08eae6b5353c451775528d3f4bcf2cc91a (patch) | |
tree | b830c4feaa6191a6c2b68b8e5e3f0b1578921ac2 /src/opus_multistream_encoder.c | |
parent | 0d584b905a89405b6cfc8c3f8d74e3a5b9976639 (diff) | |
download | opus-87ca6c08eae6b5353c451775528d3f4bcf2cc91a.tar.gz |
Increase surround allocation offset for smaller frame sizes
Diffstat (limited to 'src/opus_multistream_encoder.c')
-rw-r--r-- | src/opus_multistream_encoder.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/opus_multistream_encoder.c b/src/opus_multistream_encoder.c index d062d7ad..25ba0edd 100644 --- a/src/opus_multistream_encoder.c +++ b/src/opus_multistream_encoder.c @@ -613,10 +613,11 @@ static void surround_rate_allocation( stream_offset = 20000; else stream_offset = st->bitrate_bps/st->layout.nb_channels/2; + stream_offset += 60*(Fs/frame_size-50); /* We start by giving each stream (coupled or uncoupled) the same bitrate. This models the main saving of coupled channels over uncoupled. */ /* The LFE stream is an exception to the above and gets fewer bits. */ - lfe_offset = 3500; + lfe_offset = 3500 + 60*(Fs/frame_size-50); /* Coupled streams get twice the mono rate after the first 20 kb/s. */ coupled_ratio = 512; /* Should depend on the bitrate, for now we assume LFE gets 1/8 the bits of mono */ |