On Wed, May 18, 2011 at 03:42:54PM +0100, Mans Rullgard wrote:
> This separation allows these functions to be used in a cleaner
> fashion from other codecs (e.g. qdm2) and simplifies creating
> optimised versions of them.
>
> --- a/configure
> +++ b/configure
> @@ -952,6 +952,7 @@ CONFIG_LIST="
> mlib
> + mpadsp
> network
> --- a/libavcodec/Makefile
> +++ b/libavcodec/Makefile
> @@ -40,6 +40,9 @@ OBJS-$(CONFIG_HUFFMAN) += huffman.o
> OBJS-$(CONFIG_MDCT) += mdct_fixed.o mdct_float.o
> +OBJS-$(CONFIG_MPADSP) += mpegaudiodsp.o \
> + mpegaudiodsp_fixed.o \
> + mpegaudiodsp_float.o
> RDFT-OBJS-$(CONFIG_HARDCODED_TABLES) += sin_tables.o
I'd prefer the option to be called mpegaudiodsp throughout the build
system. There are no space constraints that make the longer name
awkward, but it is easier to understand and matches the filename.
> --- /dev/null
> +++ b/libavcodec/mpegaudiodsp.h
> @@ -0,0 +1,63 @@
> +
> +#ifndef AVCODEC_MPEGAUDIODSP_H
> +#define AVCODEC_MPEGAUDIODSP_H
> +
> +#endif
nit: Please paste "/* AVCODEC_MPEGAUDIODSP_H */" at the end of that line.
> --- /dev/null
> +++ b/libavcodec/mpegaudiodsp_template.c
> @@ -0,0 +1,205 @@
> +
> +void RENAME(ff_mpadsp_apply_window)(MPA_INT *synth_buf, MPA_INT *window,
> + int *dither_state, OUT_INT *samples,
> + int incr)
> +{
> + register const MPA_INT *w, *w2, *p;
> + int j;
> + OUT_INT *samples2;
> +#if CONFIG_FLOAT
> + float sum, sum2;
> +#else
> + int64_t sum, sum2;
> +#endif
INTFLOAT or similar?
I realize you are only moving that code around, so this might be left
for a separate change, but I consider it worthwhile nonetheless.
Patch looks OK to me in general.
Diego
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel