History

aacenc: Fix a bug where deinterleaved samples were stored in the wrong place.

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.

Nathan Caldwell committed 14 years ago

Commit dc7e7d41 parent 91b3bfb1 file · +2 −2Browse files

Unified · Split

libavcodec/aacenc.c+2−2
@@ -487,10 +487,10 @@ static void deinterleave_input_samples(AACEncContext *s, · 486 unmodified lines
487487 const float *sptr = samples + channel_map[ch];
488488
489489 /* 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]));
491491
492492 /* deinterleave */
493− for (i = 1024; i < 1024 * 2; i++) {
493+ for (i = 2048; i < 3072; i++) {
494494 s->planar_samples[ch][i] = *sptr;
495495 sptr += sinc;
496496 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t