This fixes warnings like these with ARMCC:
alignment for an auto object may not be larger than 8
---
 libavcodec/atrac3plusdsp.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/libavcodec/atrac3plusdsp.c b/libavcodec/atrac3plusdsp.c
index 468f098..c1a54ae 100644
--- a/libavcodec/atrac3plusdsp.c
+++ b/libavcodec/atrac3plusdsp.c
@@ -177,12 +177,14 @@ static void waves_synth(Atrac3pWaveSynthParams 
*synth_param,
 void ff_atrac3p_generate_tones(Atrac3pChanUnitCtx *ch_unit, AVFloatDSPContext 
*fdsp,
                                int ch_num, int sb, float *out)
 {
-    DECLARE_ALIGNED(32, float, wavreg1)[128] = { 0 };
-    DECLARE_ALIGNED(32, float, wavreg2)[128] = { 0 };
+    LOCAL_ALIGNED_32(float, wavreg1, [128]);
+    LOCAL_ALIGNED_32(float, wavreg2, [128]);
     int i, reg1_env_nonzero, reg2_env_nonzero;
     Atrac3pWavesData *tones_now  = 
&ch_unit->channels[ch_num].tones_info_prev[sb];
     Atrac3pWavesData *tones_next = &ch_unit->channels[ch_num].tones_info[sb];
 
+    memset(wavreg1, 0, sizeof(float) * 128);
+    memset(wavreg2, 0, sizeof(float) * 128);
     /* reconstruct full envelopes for both overlapping regions
      * from truncated bitstream data */
     if (tones_next->pend_env.has_start_point &&
@@ -599,8 +601,8 @@ void ff_atrac3p_ipqf(FFTContext *dct_ctx, 
Atrac3pIPQFChannelCtx *hist,
                      const float *in, float *out)
 {
     int i, s, sb, t, pos_now, pos_next;
-    DECLARE_ALIGNED(32, float, idct_in)[ATRAC3P_SUBBANDS];
-    DECLARE_ALIGNED(32, float, idct_out)[ATRAC3P_SUBBANDS];
+    LOCAL_ALIGNED_32(float, idct_in,  [ATRAC3P_SUBBANDS]);
+    LOCAL_ALIGNED_32(float, idct_out, [ATRAC3P_SUBBANDS]);
 
     memset(out, 0, ATRAC3P_FRAME_SAMPLES * sizeof(*out));
 
-- 
2.7.4

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to