opus/dec_celt: avoid emph_coeff becoming a subnormal

This happens for silence frames, which on many CPUs massively slows down
processing the decoded output.

Cf. https://github.com/Genymobile/scrcpy/issues/6715

(cherry picked from commit 5b112b17c0)
This commit is contained in:
Anton Khirnov
2026-03-14 20:29:36 +01:00
committed by Lynne
parent 8a8881d226
commit 43a4771cd0

View File

@@ -463,6 +463,8 @@ int ff_celt_decode_frame(CeltFrame *f, OpusRangeCoder *rc,
block->emph_coeff,
ff_opus_deemph_weights,
frame_size);
if (!isnormal(block->emph_coeff))
block->emph_coeff = 0.0;
}
if (channels == 1)