These are some preliminary comments, more to follow ...
On Wed, Apr 10, 2013 at 07:24:30PM +0300, Martin Storsjö wrote:
> --- a/libavcodec/hpeldsp.c
> +++ b/libavcodec/hpeldsp.c
> @@ -53,4 +53,6 @@ av_cold void ff_hpeldsp_init(HpelDSPContext *c, int flags)
> hpel_funcs(avg, [2], 4);
> hpel_funcs(avg, [3], 2);
> hpel_funcs(avg_no_rnd,, 16);
> +
> + if (ARCH_X86) ff_hpeldsp_init_x86 (c, flags);
Please break the line and eliminate the odd spacing.
> --- a/libavcodec/hpeldsp.h
> +++ b/libavcodec/hpeldsp.h
> @@ -94,4 +94,6 @@ typedef struct HpelDSPContext {
>
> void ff_hpeldsp_init(HpelDSPContext *c, int flags);
>
> +void ff_hpeldsp_init_x86(HpelDSPContext* c, int flags);
*c
> --- a/libavcodec/x86/Makefile
> +++ b/libavcodec/x86/Makefile
> @@ -44,9 +45,9 @@ YASM-OBJS-$(CONFIG_AAC_DECODER) += x86/sbrdsp.o
> YASM-OBJS-$(CONFIG_AC3DSP) += x86/ac3dsp.o
> YASM-OBJS-$(CONFIG_DCT) += x86/dct32.o
> YASM-OBJS-$(CONFIG_DSPUTIL) += x86/dsputil.o \
> - x86/hpeldsp.o \
> x86/mpeg4qpel.o \
> - x86/qpel.o
> + x86/qpel.o \
> + x86/fpel.o
order
> @@ -63,7 +64,10 @@ YASM-OBJS-$(CONFIG_H264PRED) +=
> x86/h264_intrapred.o \
> x86/h264_intrapred_10bit.o
> YASM-OBJS-$(CONFIG_H264QPEL) += x86/h264_qpel_8bit.o \
> x86/h264_qpel_10bit.o \
> - x86/qpel.o
> + x86/qpel.o \
> + x86/fpel.o
> +YASM-OBJS-$(CONFIG_HPELDSP) += x86/hpeldsp.o \
> + x86/fpel.o
order
Is fpel really required for both? The clean solution would be to add
a separate config option for it.
> --- /dev/null
> +++ b/libavcodec/x86/hpeldsp_init.c
> @@ -0,0 +1,415 @@
> +/*
> + * MMX optimized DSP utils
> + * Copyright (c) 2000, 2001 Fabrice Bellard
> + * Copyright (c) 2002-2004 Michael Niedermayer <[email protected]>
> + *
> + * This file is part of Libav.
> + *
> + * Libav is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU Lesser General Public
> + * License as published by the Free Software Foundation; either
> + * version 2.1 of the License, or (at your option) any later version.
> + *
> + * Libav is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
> + * Lesser General Public License for more details.
> + *
> + * You should have received a copy of the GNU Lesser General Public
> + * License along with Libav; if not, write to the Free Software
> + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
> USA
> + *
> + * MMX optimization by Nick Kurshev <[email protected]>
> + */
What does Nick do here? This must have been copypasted from some
weird place ...
> +#if HAVE_YASM
> +void ff_put_pixels8_x2_mmxext(uint8_t *block, const uint8_t *pixels,
> + ptrdiff_t line_size, int h);
> +[...]
> +void ff_avg_pixels8_xy2_3dnow(uint8_t *block, const uint8_t *pixels,
> + ptrdiff_t line_size, int h);
> +#endif /* HAVE_YASM */
There is no need to ifdef function declarations.
Diego
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel