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
175 DECLARE_ALIGNED(32, float, synth_buf)[MPA_MAX_CHANNELS][512*2];175 DECLARE_ALIGNED(32, float, synth_buf)[MPA_MAX_CHANNELS][512*2];
176 int synth_buf_offset[MPA_MAX_CHANNELS];176 int synth_buf_offset[MPA_MAX_CHANNELS];
177 DECLARE_ALIGNED(32, float, sb_samples)[MPA_MAX_CHANNELS][128][SBLIMIT];177 DECLARE_ALIGNED(32, float, sb_samples)[MPA_MAX_CHANNELS][128][SBLIMIT];
178 DECLARE_ALIGNED(32, float, samples)[MPA_MAX_CHANNELS * MPA_FRAME_SIZE];
178 179
179 /// Mixed temporary data used in decoding180 /// Mixed temporary data used in decoding
180 float tone_level[MPA_MAX_CHANNELS][30][64];181 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
1598 */1599 */
1599static void qdm2_synthesis_filter (QDM2Context *q, int index)1600static void qdm2_synthesis_filter (QDM2Context *q, int index)
1600{1601{
1601 float samples[MPA_MAX_CHANNELS * MPA_FRAME_SIZE];
1602 int i, k, ch, sb_used, sub_sampling, dither_state = 0;1602 int i, k, ch, sb_used, sub_sampling, dither_state = 0;
1603 1603
1604 /* copy sb_samples */1604 /* copy sb_samples */
@@ -1610,7 +1610,7 @@ static void qdm2_synthesis_filter (QDM2Context *q, int index) · 5 unmodified lines
1610 q->sb_samples[ch][(8 * index) + i][k] = 0;1610 q->sb_samples[ch][(8 * index) + i][k] = 0;
1611 1611
1612 for (ch = 0; ch < q->nb_channels; ch++) {1612 for (ch = 0; ch < q->nb_channels; ch++) {
1613 float *samples_ptr = samples + ch;1613 float *samples_ptr = q->samples + ch;
1614 1614
1615 for (i = 0; i < 8; i++) {1615 for (i = 0; i < 8; i++) {
1616 ff_mpa_synth_filter_float(&q->mpadsp,1616 ff_mpa_synth_filter_float(&q->mpadsp,
@@ -1627,7 +1627,7 @@ static void qdm2_synthesis_filter (QDM2Context *q, int index) · 10 unmodified lines
1627 1627
1628 for (ch = 0; ch < q->channels; ch++)1628 for (ch = 0; ch < q->channels; ch++)
1629 for (i = 0; i < q->frame_size; i++)1629 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];
1631}1631}
1632 1632
1633 1633

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