[FFmpeg-devel] [PATCH] y41p encoder and decoder
Michael Niedermayer
michaelni at gmx.at
Sun Jan 1 21:43:04 CET 2012
On Sun, Jan 01, 2012 at 03:20:46PM +0000, Paul B Mahol wrote:
> y41p is a packed 12-bit 4:1:1 YUV format used by Brooktree.
>
> Fixes issue 1123 / ticket #102.
> ---
> Changelog | 1 +
> doc/general.texi | 1 +
> libavcodec/Makefile | 2 +
> libavcodec/allcodecs.c | 1 +
> libavcodec/avcodec.h | 1 +
> libavcodec/version.h | 2 +-
> libavcodec/y41pdec.c | 116 ++++++++++++++++++++++++++++++++++++++++++++++++
> libavcodec/y41penc.c | 101 +++++++++++++++++++++++++++++++++++++++++
> libavformat/isom.c | 1 +
> libavformat/riff.c | 1 +
> 10 files changed, 226 insertions(+), 1 deletions(-)
> create mode 100644 libavcodec/y41pdec.c
> create mode 100644 libavcodec/y41penc.c
>
> diff --git a/Changelog b/Changelog
> index da179db..7b5d277 100644
> --- a/Changelog
> +++ b/Changelog
> @@ -16,6 +16,7 @@ version next:
> - Indeo 4 decoder
> - SMJPEG demuxer
> - Automatic thread count based on detection number of (available) CPU cores
> +- y41p Brooktree Uncompressed 4:1:1 12-bit encoder and decoder
>
>
> version 0.9:
> diff --git a/doc/general.texi b/doc/general.texi
> index b04d7d7..8ca34f9 100644
> --- a/doc/general.texi
> +++ b/doc/general.texi
> @@ -445,6 +445,7 @@ following image formats are supported:
> @tab Used in some games from Bethesda Softworks.
> @item Bink Video @tab @tab X
> @item Bitmap Brothers JV video @tab @tab X
> + at item y41p Brooktree uncompressed 4:1:1 12-bit @tab X @tab X
> @item Brute Force & Ignorance @tab @tab X
> @tab Used in the game Flash Traffic: City of Angels.
> @item C93 video @tab @tab X
> diff --git a/libavcodec/Makefile b/libavcodec/Makefile
> index 2b7a8c7..cff8885 100644
> --- a/libavcodec/Makefile
> +++ b/libavcodec/Makefile
> @@ -102,6 +102,8 @@ OBJS-$(CONFIG_BMP_DECODER) += bmp.o msrledec.o
> OBJS-$(CONFIG_BMP_ENCODER) += bmpenc.o
> OBJS-$(CONFIG_BMV_VIDEO_DECODER) += bmv.o
> OBJS-$(CONFIG_BMV_AUDIO_DECODER) += bmv.o
> +OBJS-$(CONFIG_Y41P_DECODER) += y41pdec.o
> +OBJS-$(CONFIG_Y41P_ENCODER) += y41penc.o
> OBJS-$(CONFIG_C93_DECODER) += c93.o
> OBJS-$(CONFIG_CAVS_DECODER) += cavs.o cavsdec.o cavsdsp.o \
> mpeg12data.o mpegvideo.o
> diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c
> index 1f47aee..7582d3e 100644
> --- a/libavcodec/allcodecs.c
> +++ b/libavcodec/allcodecs.c
> @@ -85,6 +85,7 @@ void avcodec_register_all(void)
> REGISTER_DECODER (BINK, bink);
> REGISTER_ENCDEC (BMP, bmp);
> REGISTER_DECODER (BMV_VIDEO, bmv_video);
> + REGISTER_ENCDEC (Y41P, y41p);
> REGISTER_DECODER (C93, c93);
nit: they are alphabetically ordered
> REGISTER_DECODER (CAVS, cavs);
> REGISTER_DECODER (CDGRAPHICS, cdgraphics);
> diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
> index 690ea38..c306933 100644
> --- a/libavcodec/avcodec.h
> +++ b/libavcodec/avcodec.h
> @@ -255,6 +255,7 @@ enum CodecID {
> CODEC_ID_VBLE,
> CODEC_ID_DXTORY,
> CODEC_ID_V410,
> + CODEC_ID_Y41P,
> CODEC_ID_UTVIDEO = 0x800,
> CODEC_ID_ESCAPE130 = MKBETAG('E','1','3','0'),
please use MKBETAG('Y','4','1','P'), so we can keep ABI compatibility
with forks that append different codecs there.
>
> diff --git a/libavcodec/version.h b/libavcodec/version.h
> index 1a6e330..064da05 100644
> --- a/libavcodec/version.h
> +++ b/libavcodec/version.h
> @@ -21,7 +21,7 @@
> #define AVCODEC_VERSION_H
>
> #define LIBAVCODEC_VERSION_MAJOR 53
> -#define LIBAVCODEC_VERSION_MINOR 49
> +#define LIBAVCODEC_VERSION_MINOR 50
> #define LIBAVCODEC_VERSION_MICRO 101
^
when increasing minor, micro should be reset to the base (100)
rest LGTM
Thanks
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
There seems to be only one solution to NIH syndrom, ... a shooting squad
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120101/643f33ac/attachment.asc>
More information about the ffmpeg-devel
mailing list