Increase the floor on nb_compr_bytes when we enable redundancy.
authorJean-Marc Valin <jmvalin@jmvalin.ca>
Sun, 9 Oct 2011 02:45:19 +0000 (22:45 -0400)
committerJean-Marc Valin <jmvalin@jmvalin.ca>
Sun, 9 Oct 2011 02:45:19 +0000 (22:45 -0400)
src/opus_encoder.c

index 8be64fb..c188fbb 100644 (file)
@@ -864,6 +864,8 @@ int opus_encode_float(OpusEncoder *st, const opus_val16 *pcm, int frame_size,
             int len;
 
             len = (ec_tell(&enc)+7)>>3;
+            if (redundancy)
+               len += st->mode == MODE_HYBRID ? 3 : 1;
             if( st->use_vbr ) {
                 nb_compr_bytes = len + bytes_target - (st->silk_mode.bitRate * frame_size) / (8 * st->Fs);
             } else {