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>
... | ... |
@@ -135,8 +135,10 @@ void ff_aac_adjust_common_ltp(AACEncContext *s, ChannelElement *cpe) |
135 | 135 |
|
136 | 136 |
if (!cpe->common_window || |
137 | 137 |
sce0->ics.window_sequence[0] == EIGHT_SHORT_SEQUENCE || |
138 |
- sce1->ics.window_sequence[0] == EIGHT_SHORT_SEQUENCE) |
|
138 |
+ sce1->ics.window_sequence[0] == EIGHT_SHORT_SEQUENCE) { |
|
139 |
+ sce0->ics.ltp.present = 0; |
|
139 | 140 |
return; |
141 |
+ } |
|
140 | 142 |
|
141 | 143 |
for (sfb = 0; sfb < FFMIN(sce0->ics.max_sfb, MAX_LTP_LONG_SFB); sfb++) { |
142 | 144 |
int sum = sce0->ics.ltp.used[sfb] + sce1->ics.ltp.used[sfb]; |