History

qdm2: Fix alignment of local array.

Fixes ticket270

Michael Niedermayer committed 15 years ago

Commit 3a07f5a1 parent 5a0a6ae1 file · +3 −3Browse files

Unified · Split

libavcodec/qdm2.c+3−3
@@ -175,6 +175,7 @@ typedef struct { · 174 unmodified lines
175175 DECLARE_ALIGNED(32, float, synth_buf)[MPA_MAX_CHANNELS][512*2];
176176 int synth_buf_offset[MPA_MAX_CHANNELS];
177177 DECLARE_ALIGNED(32, float, sb_samples)[MPA_MAX_CHANNELS][128][SBLIMIT];
178+ DECLARE_ALIGNED(32, float, samples)[MPA_MAX_CHANNELS * MPA_FRAME_SIZE];
178179
179180 /// Mixed temporary data used in decoding
180181 float tone_level[MPA_MAX_CHANNELS][30][64];
@@ -1598,7 +1599,6 @@ static void qdm2_calculate_fft (QDM2Context *q, int channel, int sub_packet) · 1417 unmodified lines
15981599 */
15991600 static void qdm2_synthesis_filter (QDM2Context *q, int index)
16001601 {
1601− float samples[MPA_MAX_CHANNELS * MPA_FRAME_SIZE];
16021602 int i, k, ch, sb_used, sub_sampling, dither_state = 0;
16031603
16041604 /* copy sb_samples */
@@ -1610,7 +1610,7 @@ static void qdm2_synthesis_filter (QDM2Context *q, int index) · 5 unmodified lines
16101610 q->sb_samples[ch][(8 * index) + i][k] = 0;
16111611
16121612 for (ch = 0; ch < q->nb_channels; ch++) {
1613− float *samples_ptr = samples + ch;
1613+ float *samples_ptr = q->samples + ch;
16141614
16151615 for (i = 0; i < 8; i++) {
16161616 ff_mpa_synth_filter_float(&q->mpadsp,
@@ -1627,7 +1627,7 @@ static void qdm2_synthesis_filter (QDM2Context *q, int index) · 10 unmodified lines
16271627
16281628 for (ch = 0; ch < q->channels; ch++)
16291629 for (i = 0; i < q->frame_size; i++)
1630− q->output_buffer[q->channels * i + ch] += (1 << 23) * samples[q->nb_channels * sub_sampling * i + ch];
1630+ q->output_buffer[q->channels * i + ch] += (1 << 23) * q->samples[q->nb_channels * sub_sampling * i + ch];
16311631 }
16321632
16331633

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