On Sat, Feb 11, 2012 at 09:25:33PM +0100, Anton Khirnov wrote:
>
> --- a/libavcodec/Makefile
> +++ b/libavcodec/Makefile
> @@ -80,10 +80,10 @@ OBJS-$(CONFIG_ANSI_DECODER) += ansi.o
> cga_data.o
> OBJS-$(CONFIG_ASS_ENCODER) += assenc.o ass.o
> -OBJS-$(CONFIG_ASV1_DECODER) += asv1.o mpeg12data.o
> -OBJS-$(CONFIG_ASV1_ENCODER) += asv1.o mpeg12data.o
> -OBJS-$(CONFIG_ASV2_DECODER) += asv1.o mpeg12data.o
> -OBJS-$(CONFIG_ASV2_ENCODER) += asv1.o mpeg12data.o
> +OBJS-$(CONFIG_ASV1_DECODER) += asv1dec.o asv1.o mpeg12data.o
> +OBJS-$(CONFIG_ASV1_ENCODER) += asv1enc.o asv1.o mpeg12data.o
> +OBJS-$(CONFIG_ASV2_DECODER) += asv1dec.o asv1.o mpeg12data.o
> +OBJS-$(CONFIG_ASV2_ENCODER) += asv1enc.o asv1.o mpeg12data.o
> OBJS-$(CONFIG_ATRAC1_DECODER) += atrac1.o atrac.o
The names could either drop the version number or add '2' to it since
they are for both asv1 and asv2.
> --- /dev/null
> +++ b/libavcodec/asv1.h
> @@ -0,0 +1,63 @@
> +
> +#ifndef AVCODEC_ASV1_H
> +#define AVCODEC_ASV1_H
> +
> +#include "avcodec.h"
> +#include "dsputil.h"
> +#include "get_bits.h"
> +#include "put_bits.h"
> +
> +#include "libavutil/mem.h"
stdint.h is missing and please move the libavutil #include before the
more local ones.
> +#endif
Please comment the #endif.
> --- /dev/null
> +++ b/libavcodec/asv1dec.c
> @@ -0,0 +1,328 @@
> +
> +#include "asv1.h"
> +#include "avcodec.h"
> +#include "dsputil.h"
> +#include "get_bits.h"
> +#include "mpeg12data.h"
> +
> +#include "libavutil/mem.h"
ditto
> -AVCodec ff_asv1_decoder = {
> - .name = "asv1",
> - .type = AVMEDIA_TYPE_VIDEO,
> - .id = CODEC_ID_ASV1,
> - .priv_data_size = sizeof(ASV1Context),
> - .init = decode_init,
> - .close = decode_end,
> - .decode = decode_frame,
> - .capabilities = CODEC_CAP_DR1,
> - .long_name= NULL_IF_CONFIG_SMALL("ASUS V1"),
> -};
> -
> -AVCodec ff_asv2_decoder = {
> - .name = "asv2",
> - .type = AVMEDIA_TYPE_VIDEO,
> - .id = CODEC_ID_ASV2,
> - .priv_data_size = sizeof(ASV1Context),
> - .init = decode_init,
> - .close = decode_end,
> - .decode = decode_frame,
> - .capabilities = CODEC_CAP_DR1,
> - .long_name= NULL_IF_CONFIG_SMALL("ASUS V2"),
> -};
> +#if CONFIG_ASV1_DECODER
> +AVCodec ff_asv1_decoder = {
> + .name = "asv1",
> + .type = AVMEDIA_TYPE_VIDEO,
> + .id = CODEC_ID_ASV1,
> + .priv_data_size = sizeof(ASV1Context),
> + .init = decode_init,
> + .close = decode_end,
> + .decode = decode_frame,
> + .capabilities = CODEC_CAP_DR1,
> + .long_name = NULL_IF_CONFIG_SMALL("ASUS V1"),
> +};
> +#endif
> +
> +#if CONFIG_ASV2_DECODER
> +AVCodec ff_asv2_decoder = {
> + .name = "asv2",
> + .type = AVMEDIA_TYPE_VIDEO,
> + .id = CODEC_ID_ASV2,
> + .priv_data_size = sizeof(ASV1Context),
> + .init = decode_init,
> + .close = decode_end,
> + .decode = decode_frame,
> + .capabilities = CODEC_CAP_DR1,
> + .long_name = NULL_IF_CONFIG_SMALL("ASUS V2"),
> +};
> +#endif
The idea of cleaning up formatting is neat in principle, but when you
split files, I think it will throw off the detection for renames and
moving of code blocks. So please either don't do it or leave it for
a subequent patch. The same applies to any other bits you prettyprinted.
Diego
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel