mirror of
https://mirror.skon.top/https://github.com/FFmpeg/FFmpeg
synced 2026-04-20 21:00:41 +08:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user