On Wed, Mar 29, 2017 at 02:02:30PM +0300, Martin Storsjö wrote:
> --- 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);

We have to resort to these manual memsets in many other places. I think
the proper solution would be to add LOCAL_ALIGNEDZ macros that include
a zero initialization.

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

Reply via email to