On Sun, Oct 16, 2016 at 08:10:51PM +0200, Janne Grunau wrote:
> --- a/libavfilter/vf_yadif.c
> +++ b/libavfilter/vf_yadif.c
> @@ -473,10 +473,10 @@ static int config_props(AVFilterLink *link)
>      } else {
>          s->filter_line  = filter_line_c;
>          s->filter_edges = filter_edges;
> +    }
>  
>          if (ARCH_X86)
>              ff_yadif_init_x86(s);
> -    }

Please fix the indentation.

> --- a/libavfilter/x86/vf_yadif_init.c
> +++ b/libavfilter/x86/vf_yadif_init.c
> @@ -35,10 +35,36 @@ void ff_yadif_filter_line_ssse3(void *dst, void *prev, 
> void *cur,
>  av_cold void ff_yadif_init_x86(YADIFContext *yadif)
>  {
>      int cpu_flags = av_get_cpu_flags();
> +    int bit_depth = (!yadif->csp) ? 8 : yadif->csp->comp[0].depth;

nit: pointless ()

> --- a/libavfilter/x86/Makefile
> +++ b/libavfilter/x86/Makefile
> @@ -8,4 +8,4 @@ YASM-OBJS-$(CONFIG_GRADFUN_FILTER)           += 
> x86/vf_gradfun.o
>  YASM-OBJS-$(CONFIG_HQDN3D_FILTER)            += x86/vf_hqdn3d.o
>  YASM-OBJS-$(CONFIG_INTERLACE_FILTER)         += x86/vf_interlace.o
>  YASM-OBJS-$(CONFIG_VOLUME_FILTER)            += x86/af_volume.o
> -YASM-OBJS-$(CONFIG_YADIF_FILTER)             += x86/vf_yadif.o
> +YASM-OBJS-$(CONFIG_YADIF_FILTER)             += x86/vf_yadif.o x86/yadif-16.o

IMO this should be called vf_yadif-16.c to match the name of the file with
the 8-bit optimizations.

> --- /dev/null
> +++ b/libavfilter/x86/yadif-16.asm
> @@ -0,0 +1,349 @@
> +;*****************************************************************************
> +;* x86-optimized functions for yadif filter

Maybe mention the bitdepth.

> +%macro PABS 2
> +%if cpuflag(ssse3)
> +    pabsd %1, %1
> +%else
> +    pxor    %2, %2
> +    pcmpgtd %2, %1
> +    pxor    %1, %2
> +    psubd   %1, %2
> +%endif
> +%endmacro

Not sure how this can be replaced with PABSW from x86util.asm.

> +%macro PMINSD 3
> +%if cpuflag(sse4)
> +    pminsd %1, %2
> +%else
> +    mova    %3, %2
> +    pcmpgtd %3, %1
> +    pand    %1, %3
> +    pandn   %3, %2
> +    por     %1, %3
> +%endif
> +%endmacro
> +
> +%macro PMAXSD 3
> +%if cpuflag(sse4)
> +    pmaxsd %1, %2
> +%else
> +    mova    %3, %1
> +    pcmpgtd %3, %2
> +    pand    %1, %3
> +    pandn   %3, %2
> +    por     %1, %3
> +%endif
> +%endmacro

These duplicate similar macros in x86util.asm.

Diego
_______________________________________________
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to