[FFmpeg-devel] [PATCH] Megalux Frame muxer and demuxer

Paul B Mahol onemda at gmail.com
Mon Jan 7 10:19:42 CET 2013


On 12/30/12, Peter Ross <pross at xvid.org> wrote:
> Signed-off-by: Peter Ross <pross at xvid.org>
> ---
> This is a bit of a toy. Gathering dust in my tree.
>
> Samples: /incoming/megalux-frame/
>
>  Changelog                |  1 +
>  doc/general.texi         |  2 +
>  libavformat/Makefile     |  2 +
>  libavformat/allformats.c |  1 +
>  libavformat/frm.c        | 35 ++++++++++++++++++
>  libavformat/frm.h        | 34 +++++++++++++++++
>  libavformat/frmdec.c     | 96
> ++++++++++++++++++++++++++++++++++++++++++++++++
>  libavformat/frmenc.c     | 64 ++++++++++++++++++++++++++++++++
>  8 files changed, 235 insertions(+)
>  create mode 100644 libavformat/frm.c
>  create mode 100644 libavformat/frm.h
>  create mode 100644 libavformat/frmdec.c
>  create mode 100644 libavformat/frmenc.c
>
> diff --git a/Changelog b/Changelog
> index 9eec45c..e809f26 100644
> --- a/Changelog
> +++ b/Changelog
> @@ -337,6 +337,7 @@ easier to use. The changes are:
>  - Simple segmenting muxer
>  - Indeo 4 decoder
>  - SMJPEG demuxer
> +- Megalux Frame muxer and demuxer

Wrong line.

>
>
>  version 0.8:
> diff --git a/doc/general.texi b/doc/general.texi
> index 5dc1954..de3c5e9 100644
> --- a/doc/general.texi
> +++ b/doc/general.texi
> @@ -253,6 +253,8 @@ library:
>      @tab Used in Sim City 3000; file extension .xa.
>  @item MD Studio                 @tab   @tab X
>  @item Metal Gear Solid: The Twin Snakes @tab @tab X
> + at item Megalux Frame             @tab X @tab X
> +    @tab Used by Megalux Ultimate Paint
>  @item Mobotix .mxg              @tab   @tab X
>  @item Monkey's Audio            @tab   @tab X
>  @item Motion Pixels MVI         @tab   @tab X
> diff --git a/libavformat/Makefile b/libavformat/Makefile
> index 13fbe7c..28ca9d3 100644
> --- a/libavformat/Makefile
> +++ b/libavformat/Makefile
> @@ -135,6 +135,8 @@ OBJS-$(CONFIG_FLV_MUXER)                 += flvenc.o
> avc.o
>  OBJS-$(CONFIG_FOURXM_DEMUXER)            += 4xm.o
>  OBJS-$(CONFIG_FRAMECRC_MUXER)            += framecrcenc.o framehash.o
>  OBJS-$(CONFIG_FRAMEMD5_MUXER)            += md5enc.o framehash.o
> +OBJS-$(CONFIG_FRM_DEMUXER)               += frm.o frmdec.o
> +OBJS-$(CONFIG_FRM_MUXER)                 += frm.o frmenc.o
>  OBJS-$(CONFIG_GIF_MUXER)                 += gif.o
>  OBJS-$(CONFIG_GIF_DEMUXER)               += gifdec.o
>  OBJS-$(CONFIG_GSM_DEMUXER)               += gsmdec.o
> diff --git a/libavformat/allformats.c b/libavformat/allformats.c
> index 739f5a1..2ecab5d 100644
> --- a/libavformat/allformats.c
> +++ b/libavformat/allformats.c
> @@ -123,6 +123,7 @@ void av_register_all(void)
>      REGISTER_DEMUXER (FOURXM,           fourxm);
>      REGISTER_MUXER   (FRAMECRC,         framecrc);
>      REGISTER_MUXER   (FRAMEMD5,         framemd5);
> +    REGISTER_MUXDEMUX(FRM,              frm);
>      REGISTER_MUXDEMUX(G722,             g722);
>      REGISTER_MUXDEMUX(G723_1,           g723_1);
>      REGISTER_DEMUXER (G729,             g729);
> diff --git a/libavformat/frm.c b/libavformat/frm.c
> new file mode 100644
> index 0000000..0ca6257
> --- /dev/null
> +++ b/libavformat/frm.c
> @@ -0,0 +1,35 @@
> +/*
> + * Megalux Frame common code
> + * Copyright (c) 2010 Peter Ross <pross at xvid.org>
> + *
> + * This file is part of FFmpeg.
> + *
> + * FFmpeg 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.
> + *
> + * FFmpeg 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 FFmpeg; if not, write to the Free Software
> + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
> USA
> + */
> +
> +/**
> + * @file
> + * Megalux Frame common code
> + */
> +
> +#include "frm.h"
> +
> +const AVCodecTag ff_frm_pix_fmt_tags[] = {
> +    { PIX_FMT_RGB555, 1 },
> +    { PIX_FMT_BGR32,  2 },

Wrong pix format, you should either use ABGR or RGBA.


More information about the ffmpeg-devel mailing list