Comments, low bit-rate busting avoidance

This commit is contained in:
Jean-Marc Valin 2010-12-16 14:11:48 -05:00
parent df6620eb0b
commit 5c80391b35
4 changed files with 7 additions and 7 deletions

View file

@ -822,7 +822,7 @@ int celt_encode_with_ec_float(CELTEncoder * restrict st, const celt_sig * pcm, i
} while (++c<C);
#ifdef ENABLE_POSTFILTER
if (LM != 0 && nbAvailableBytes>10)
if (LM != 0 && nbAvailableBytes>10*C)
{
VARDECL(celt_word16, pitch_buf);
ALLOC(pitch_buf, (COMBFILTER_MAXPERIOD+N)>>1, celt_word16);
@ -946,7 +946,7 @@ int celt_encode_with_ec_float(CELTEncoder * restrict st, const celt_sig * pcm, i
tf_encode(st->start, st->end, isTransient, tf_res, LM, tf_select, enc);
if (shortBlocks || st->complexity < 3)
if (shortBlocks || st->complexity < 3 || nbAvailableBytes < 10*C)
{
if (st->complexity == 0)
{