mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-26 19:01:44 +02:00
aac_ltp: actually signal LTP as off during EIGHT_SHORT windows
This hugely reduces the echo which was introduced with the previous commit (though likely because previously everything was broken). Makes LTP actually worthwhile now. Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
This commit is contained in:
parent
1e5dbb3409
commit
f5b7a29ae8
@ -135,8 +135,10 @@ void ff_aac_adjust_common_ltp(AACEncContext *s, ChannelElement *cpe)
|
||||
|
||||
if (!cpe->common_window ||
|
||||
sce0->ics.window_sequence[0] == EIGHT_SHORT_SEQUENCE ||
|
||||
sce1->ics.window_sequence[0] == EIGHT_SHORT_SEQUENCE)
|
||||
sce1->ics.window_sequence[0] == EIGHT_SHORT_SEQUENCE) {
|
||||
sce0->ics.ltp.present = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
for (sfb = 0; sfb < FFMIN(sce0->ics.max_sfb, MAX_LTP_LONG_SFB); sfb++) {
|
||||
int sum = sce0->ics.ltp.used[sfb] + sce1->ics.ltp.used[sfb];
|
||||
|
Loading…
Reference in New Issue
Block a user