mirror of https://git.ffmpeg.org/ffmpeg.git
aacenc_tns: do not limit the filter size
This was copied from the decoder, but is unneeded for the encoder. tns_max_bands is unused and set to zero which zeroed out start, end and size and thus no filter was actually applied. Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
This commit is contained in:
parent
141d80ded7
commit
21bfeec27f
|
@ -119,7 +119,6 @@ static void process_tns_coeffs(TemporalNoiseShaping *tns, double *coef_raw,
|
||||||
/* Apply TNS filter */
|
/* Apply TNS filter */
|
||||||
void ff_aac_apply_tns(SingleChannelElement *sce)
|
void ff_aac_apply_tns(SingleChannelElement *sce)
|
||||||
{
|
{
|
||||||
const int mmm = FFMIN(sce->ics.tns_max_bands, sce->ics.max_sfb);
|
|
||||||
float *coef = sce->pcoeffs;
|
float *coef = sce->pcoeffs;
|
||||||
TemporalNoiseShaping *tns = &sce->tns;
|
TemporalNoiseShaping *tns = &sce->tns;
|
||||||
int w, filt, m, i;
|
int w, filt, m, i;
|
||||||
|
@ -136,8 +135,8 @@ void ff_aac_apply_tns(SingleChannelElement *sce)
|
||||||
if (!order)
|
if (!order)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
start = sce->ics.swb_offset[FFMIN(bottom, mmm)];
|
start = sce->ics.swb_offset[bottom];
|
||||||
end = sce->ics.swb_offset[FFMIN( top, mmm)];
|
end = sce->ics.swb_offset[top];
|
||||||
if ((size = end - start) <= 0)
|
if ((size = end - start) <= 0)
|
||||||
continue;
|
continue;
|
||||||
if (tns->direction[w][filt]) {
|
if (tns->direction[w][filt]) {
|
||||||
|
|
Loading…
Reference in New Issue