mirror of
https://github.com/xiph/opus.git
synced 2025-06-03 00:57:43 +00:00
Running transient_analysis() even for 2.5 ms frames
This means 2.5 ms frames can now use a higher bitrate for transients.
This commit is contained in:
parent
48ac122141
commit
2a5f0565b8
1 changed files with 9 additions and 7 deletions
|
@ -1298,16 +1298,18 @@ int celt_encode_with_ec(CELTEncoder * OPUS_RESTRICT st, const opus_val16 * pcm,
|
|||
|
||||
isTransient = 0;
|
||||
shortBlocks = 0;
|
||||
if (st->complexity >= 1)
|
||||
{
|
||||
isTransient = transient_analysis(in, N+st->overlap, CC,
|
||||
&tf_estimate, &tf_chan);
|
||||
}
|
||||
if (LM>0 && ec_tell(enc)+3<=total_bits)
|
||||
{
|
||||
if (st->complexity >= 1)
|
||||
{
|
||||
isTransient = transient_analysis(in, N+st->overlap, CC,
|
||||
&tf_estimate, &tf_chan);
|
||||
if (isTransient)
|
||||
shortBlocks = M;
|
||||
}
|
||||
if (isTransient)
|
||||
shortBlocks = M;
|
||||
ec_enc_bit_logp(enc, isTransient, 3);
|
||||
} else {
|
||||
isTransient = 0;
|
||||
}
|
||||
|
||||
ALLOC(freq, CC*N, celt_sig); /**< Interleaved signal MDCTs */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue