On Mon, Oct 21, 2013 at 09:30:23AM -0400, Daniel Kang wrote:
> --- a/libavfilter/x86/Makefile
> +++ b/libavfilter/x86/Makefile
> @@ -3,6 +3,7 @@ OBJS-$(CONFIG_HQDN3D_FILTER) +=
> x86/vf_hqdn3d_init.o
> OBJS-$(CONFIG_VOLUME_FILTER) += x86/af_volume_init.o
> OBJS-$(CONFIG_YADIF_FILTER) += x86/vf_yadif_init.o
>
> +YASM-OBJS-$(CONFIG_GRADFUN_FILTER) += x86/vf_gradfun_yasm.o
> YASM-OBJS-$(CONFIG_HQDN3D_FILTER) += x86/vf_hqdn3d.o
> YASM-OBJS-$(CONFIG_VOLUME_FILTER) += x86/af_volume.o
> YASM-OBJS-$(CONFIG_YADIF_FILTER) += x86/vf_yadif.o
The file with the init code should be renamed to vf_gradfun_init.c instead
and vf_gradfun.asm should contain the assembly.
> --- a/libavfilter/x86/vf_gradfun.c
> +++ b/libavfilter/x86/vf_gradfun.c
> @@ -41,72 +39,13 @@ static void gradfun_filter_line_mmxext(uint8_t *dst,
> uint8_t *src, uint16_t *dc,
> width = x;
> }
> x = -width;
> + ff_gradfun_filter_line_mmxext(x, dst+width, src+width, dc+width/2,
> + thresh, dithers);
spaces around operators
> @@ -117,100 +56,33 @@ static void gradfun_filter_line_ssse3(uint8_t *dst,
> uint8_t *src, uint16_t *dc,
> width = x;
> }
> x = -width;
> + ff_gradfun_filter_line_ssse3(x, dst+width, src+width, dc+width/2,
> + thresh, dithers);
same
> av_cold void ff_gradfun_init_x86(GradFunContext *gf)
> {
> -#if HAVE_MMXEXT_INLINE
> +#if HAVE_YASM
> int cpu_flags = av_get_cpu_flags();
> -
> if (cpu_flags & AV_CPU_FLAG_MMXEXT)
Keep the empty line.
> gf->filter_line = gradfun_filter_line_mmxext;
> -#endif
> -#if HAVE_SSSE3_INLINE
> if (cpu_flags & AV_CPU_FLAG_SSSE3)
> gf->filter_line = gradfun_filter_line_ssse3;
> -#endif
> -#if HAVE_SSE2_INLINE
> if (cpu_flags & AV_CPU_FLAG_SSE2)
> gf->blur_line = gradfun_blur_line_sse2;
> #endif
Please comment the #endif.
Look at vf_yadif_init.c to see how to replace the ifdefs with the
right macros.
Diego
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel