Minor simplification to the transient code
This commit is contained in:
parent
0dd2cd4958
commit
2014ca380e
1 changed files with 25 additions and 32 deletions
|
@ -568,9 +568,11 @@ int celt_encode_float(CELTEncoder * restrict st, const celt_sig_t * pcm, celt_si
|
||||||
CELT_COPY(st->in_mem, in+C*(2*N-2*N4-st->overlap), C*st->overlap);
|
CELT_COPY(st->in_mem, in+C*(2*N-2*N4-st->overlap), C*st->overlap);
|
||||||
|
|
||||||
/* Transient handling */
|
/* Transient handling */
|
||||||
if (st->mode->nbShortMdcts > 1)
|
transient_time = -1;
|
||||||
{
|
transient_shift = 0;
|
||||||
if (transient_analysis(in, N+st->overlap, C, &transient_time, &transient_shift))
|
shortBlocks = 0;
|
||||||
|
|
||||||
|
if (st->mode->nbShortMdcts > 1 && transient_analysis(in, N+st->overlap, C, &transient_time, &transient_shift))
|
||||||
{
|
{
|
||||||
#ifndef FIXED_POINT
|
#ifndef FIXED_POINT
|
||||||
float gain_1;
|
float gain_1;
|
||||||
|
@ -597,15 +599,6 @@ int celt_encode_float(CELTEncoder * restrict st, const celt_sig_t * pcm, celt_si
|
||||||
}
|
}
|
||||||
shortBlocks = 1;
|
shortBlocks = 1;
|
||||||
has_fold = 1;
|
has_fold = 1;
|
||||||
} else {
|
|
||||||
transient_time = -1;
|
|
||||||
transient_shift = 0;
|
|
||||||
shortBlocks = 0;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
transient_time = -1;
|
|
||||||
transient_shift = 0;
|
|
||||||
shortBlocks = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ALLOC(freq, C*N, celt_sig_t); /**< Interleaved signal MDCTs */
|
ALLOC(freq, C*N, celt_sig_t); /**< Interleaved signal MDCTs */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue