patch proably OK

On Tue, Jan 10, 2017 at 11:12:07AM +0100, Anton Khirnov wrote:
> --- a/libavcodec/mpegaudiodsp_template.c
> +++ b/libavcodec/mpegaudiodsp_template.c
> @@ -73,7 +73,177 @@ static inline int round_sample(int64_t *sum)
>      [MDCT_BUF_SIZE/2, MDCT_BUF_SIZE/2 + 17] are actually used. The rest
>      is just to preserve alignment for SIMD implementations.
>  */
> -DECLARE_ALIGNED(16, INTFLOAT, RENAME(ff_mdct_win))[8][MDCT_BUF_SIZE];
> +// the tables are generated by the following code

Keeping the comment belonging to the table above the generator code is
a tad confusing. IMO just say

  // the foo and bar tables below are generated by the following code

and move the comment below the generator code.

> +#if 0
> +{
> +    int i, j;

I suggest keeping the function name.

> +            RENAME(mdct_win)[j + 4][i + 1] = -RENAME(mdct_win)[j][i + 1];
> +        }
> +    }
> +}
> +#endif
> +DECLARE_ALIGNED(16, const INTFLOAT, RENAME(ff_mdct_win))[8][MDCT_BUF_SIZE] = 
> {

An empty line after the #endif would help readability IMO.

> +#if CONFIG_FLOAT
> +    {
> +        0.00100882596, 0.00335019873, 0.00629419601,  0.0101755112,  
> 0.015625,
> +        0.0239929594,  0.0387882143,  0.0728734732,   0.242004707, 
> -0.264101803,
> +        -0.0949705616, -0.0608853027, -0.0460900478, -0.0377220884,
> +        -0.0322725996, -0.028391283,  -0.0254472848, -0.0231059138, 0, 0,
> +        -0.0211726688, -0.0195263885, -0.0180872418,  -0.0168000516, 
> -0.015625,
> +        -0.0145321358, -0.0134979468, -0.0125031117,  -0.011530933,
> +        -0.0105661536, -0.0095939748, -0.00859914068, -0.0075649512,
> +        -0.006472087,  -0.00529703591, -0.0040098452, -0.0025706978,
> +        -0.00092441868,
> +    },

more compact:

  { 0.00100882596, 0.00335019873, 0.00629419601,  0.0101755112,  0.015625,
    0.0239929594,  0.0387882143,  0.0728734732,   0.242004707, -0.264101803,
    -0.0949705616, -0.0608853027, -0.0460900478, -0.0377220884,
    -0.0322725996, -0.028391283,  -0.0254472848, -0.0231059138, 0, 0,
    -0.0211726688, -0.0195263885, -0.0180872418,  -0.0168000516, -0.015625,
    -0.0145321358, -0.0134979468, -0.0125031117,  -0.011530933,
    -0.0105661536, -0.0095939748, -0.00859914068, -0.0075649512,
    -0.006472087,  -0.00529703591, -0.0040098452, -0.0025706978,
    -0.00092441868, },

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

Reply via email to