10l: Forgot to adjust deinterleave for new location of incoming samples in 7946a5a. This produced incorrect, but surprisingly listenable results. Thanks to Justin Ruggles for the report.
Unified · Split
| @@ -487,10 +487,10 @@ static void deinterleave_input_samples(AACEncContext *s, · 486 unmodified lines | |||
| 487 | const float *sptr = samples + channel_map[ch]; | 487 | const float *sptr = samples + channel_map[ch]; |
| 488 | 488 | ||
| 489 | /* copy last 1024 samples of previous frame to the start of the current frame */ | 489 | /* copy last 1024 samples of previous frame to the start of the current frame */ |
| 490 | memcpy(&s->planar_samples[ch][0], &s->planar_samples[ch][1024], 1024 * sizeof(s->planar_samples[0][0])); | 490 | memcpy(&s->planar_samples[ch][1024], &s->planar_samples[ch][2048], 1024 * sizeof(s->planar_samples[0][0])); |
| 491 | 491 | ||
| 492 | /* deinterleave */ | 492 | /* deinterleave */ |
| 493 | for (i = 1024; i < 1024 * 2; i++) { | 493 | for (i = 2048; i < 3072; i++) { |
| 494 | s->planar_samples[ch][i] = *sptr; | 494 | s->planar_samples[ch][i] = *sptr; |
| 495 | sptr += sinc; | 495 | sptr += sinc; |
| 496 | } | 496 | } |