mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-30 19:32:13 +00:00
fa4d900c27
Changes: - strongly prefer dual filters to a single filter - less strict about using 2 filters w.r.t. energy - scrap the usage of threshold and spread, useless - use odd-shaped windows to set the filter direction - use 4 bits instead of 3 bits for short windows - simplify and reduce the main loop to a single level - add stricter regulations for short windows All of this now makes the TNS implementation operate as good as it can and it definitely shows. The frequency thresholds are now even better defined by looking at the spectrals and the overall sound has been improved at the price of just a few bits that are well worth it.
38 lines
1.2 KiB
C
38 lines
1.2 KiB
C
/*
|
|
* AAC encoder TNS
|
|
* Copyright (C) 2015 Rostislav Pehlivanov
|
|
*
|
|
* This file is part of FFmpeg.
|
|
*
|
|
* FFmpeg is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
* License as published by the Free Software Foundation; either
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
*
|
|
* FFmpeg is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
* Lesser General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
* License along with FFmpeg; if not, write to the Free Software
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
*/
|
|
|
|
/**
|
|
* @file
|
|
* AAC encoder temporal noise shaping
|
|
* @author Rostislav Pehlivanov ( atomnuker gmail com )
|
|
*/
|
|
|
|
#ifndef AVCODEC_AACENC_TNS_H
|
|
#define AVCODEC_AACENC_TNS_H
|
|
|
|
#include "aacenc.h"
|
|
|
|
void ff_aac_encode_tns_info(AACEncContext *s, SingleChannelElement *sce);
|
|
void ff_aac_apply_tns(AACEncContext *s, SingleChannelElement *sce);
|
|
void ff_aac_search_for_tns(AACEncContext *s, SingleChannelElement *sce);
|
|
|
|
#endif /* AVCODEC_AACENC_TNS_H */
|