Prevents LFE from busting at really low bitrate
authorJean-Marc Valin <jmvalin@jmvalin.ca>
Thu, 14 Nov 2013 03:42:04 +0000 (22:42 -0500)
committerJean-Marc Valin <jmvalin@jmvalin.ca>
Thu, 14 Nov 2013 03:42:04 +0000 (22:42 -0500)
celt/celt_encoder.c

index 6949adb..5bb86c5 100644 (file)
@@ -1462,7 +1462,7 @@ int celt_encode_with_ec(CELTEncoder * OPUS_RESTRICT st, const opus_val16 * pcm,
    {
       int enabled;
       int qg;
-      enabled = (st->lfe || nbAvailableBytes>12*C) && st->start==0 && !silence && !st->disable_pf
+      enabled = ((st->lfe&&nbAvailableBytes>3) || nbAvailableBytes>12*C) && st->start==0 && !silence && !st->disable_pf
             && st->complexity >= 5 && !(st->consec_transient && LM!=3 && st->variable_duration==OPUS_FRAMESIZE_VARIABLE);
 
       prefilter_tapset = st->tapset_decision;