On Sat, Jul 30, 2016 at 10:02:51PM +0200, Anton Khirnov wrote:
> --- a/libavcodec/x86/vp9dsp_init.c
> +++ b/libavcodec/x86/vp9dsp_init.c
> @@ -54,18 +58,19 @@ ff_vp9_ ## avg ## _8tap_1d_ ## dir ## _ ## sz ## _ ## 
> opt(uint8_t *dst,
>  
> -#define mc_funcs(sz)            \
> -    mc_func(put, sz, h, ssse3); \
> -    mc_func(avg, sz, h, ssse3); \
> -    mc_func(put, sz, v, ssse3); \
> -    mc_func(avg, sz, v, ssse3)
> +#define mc_funcs(sz, opt)     \
> +    mc_func(put, sz, h, opt); \
> +    mc_func(avg, sz, h, opt); \
> +    mc_func(put, sz, v, opt); \
> +    mc_func(avg, sz, v, opt)

There are a lot of similar changes throughout the patch. I think it
would be more readable with the macro generalizations split out. Maybe
I'll do it myself.

> @@ -244,6 +267,26 @@ av_cold void ff_vp9dsp_init_x86(VP9DSPContext *dsp)
> +    if (EXTERNAL_AVX2(cpu_flags)) {
> +        init_fpel(1, 1, 32, avg, avx2);
> +        init_fpel(0, 1, 64, avg, avx2);
> +        if (ARCH_X86_64) {
> +#if ARCH_X86_64 && HAVE_AVX2_EXTERNAL
> +            init_subpel2_32_64(0, 1, 1, hv, put, avx2);
> +            init_subpel2_32_64(0, 0, 1, v,  put, avx2);
> +            init_subpel2_32_64(0, 1, 0, h,  put, avx2);
> +            init_subpel2_32_64(1, 1, 1, hv, avg, avx2);
> +            init_subpel2_32_64(1, 0, 1, v,  avg, avx2);
> +            init_subpel2_32_64(1, 1, 0, h,  avg, avx2);
> +#endif

You don't need both the ifdef and the if-condition. Just the ifdef
should be enough. Extra good karma for commenting the #endif.


The init part LGTM, the asm I cannot say for sure, but it's probably OK.

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

Reply via email to