shithub: opus

Download patch

ref: 87ca6c08eae6b5353c451775528d3f4bcf2cc91a
parent: 0d584b905a89405b6cfc8c3f8d74e3a5b9976639
author: Jean-Marc Valin <[email protected]>
date: Wed Nov 13 17:58:10 EST 2013

Increase surround allocation offset for smaller frame sizes

--- a/src/opus_multistream_encoder.c
+++ b/src/opus_multistream_encoder.c
@@ -613,10 +613,11 @@
       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 */