[FFmpeg-devel] [PATCH] Lego Mindstorms RSO de/muxer (copied from au.c)

Michael Niedermayer michaelni
Fri Jul 16 22:52:14 CEST 2010


On Fri, Jul 16, 2010 at 04:07:55PM +0200, Rafa?l Carr? wrote:
> On Fri, 16 Jul 2010 15:59:11 +0200
> Rafa?l Carr? <rafael.carre at gmail.com> wrote:
> 
> > On Fri, 16 Jul 2010 05:22:46 +0200
> > Michael Niedermayer <michaelni at gmx.at> wrote:
> > 
> > > On Thu, Jul 15, 2010 at 04:44:49PM +0200, Rafa?l Carr? wrote:
> > 
> > > > +    st->duration = size << 3 / bpp;
> > > 
> > > is this correct?
> > 
> > changed variable name to bps and use >> av_log2(bps)
> > it doesn't make it more correct or less correct, but it's still

st->duration = size << (3 / bpp);
was correct?

[...]
> Also update the description in the patch (probe func was removed)
> 
> -- 
> ? Rafa?l Carr? ?

>  Changelog                |    1 
>  doc/general.texi         |    1 
>  libavformat/Makefile     |    2 
>  libavformat/allformats.c |    1 
>  libavformat/avformat.h   |    2 
>  libavformat/rso.h        |   36 ++++++++++++++
>  libavformat/rsodec.c     |   99 +++++++++++++++++++++++++++++++++++++++++
>  libavformat/rsoenc.c     |  113 +++++++++++++++++++++++++++++++++++++++++++++++
>  8 files changed, 254 insertions(+), 1 deletion(-)
> e8de0b3d3a9bd294d7ea851ba03056c2f69774a6  0001-Lego-Mindstorms-RSO-de-muxer-copied-from-au.c.patch
> From cc1c8077f673a170a5e196b708f56ecf91c9fcc8 Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?Rafa=C3=ABl=20Carr=C3=A9?= <rafael.carre at gmail.com>
> Date: Wed, 14 Jul 2010 21:36:33 +0200
> Subject: [PATCH] Lego Mindstorms RSO de/muxer (copied from au.c)
> 
> - format from http://bricxcc.sourceforge.net/
> 
> - TODO: IMA ADPCM, it seems to be the CODEC_ID_ADPCM_IMA_WAV codec, but
>   predictor/step are not passed in the bitstream.
>   I sent a sample to Kostya, if he finds the (fixed for RSO) parameters,
>   we could put them in extradata and check if extradata is present in
>   the decoder.
> 
> - Totally untested on reference implementation (i didn't have/play Lego
>   for years), but demuxing/remuxing gives the same output.
> 
> Note: file size is limited to 65535 bytes + 8 bytes header (output is
> stored on a ~128kB flash, probably together with code)
> ---
>  Changelog                |    1 +
>  doc/general.texi         |    1 +
>  libavformat/Makefile     |    2 +
>  libavformat/allformats.c |    1 +
>  libavformat/avformat.h   |    2 +-
>  libavformat/rso.h        |   36 +++++++++++++++
>  libavformat/rsodec.c     |   99 ++++++++++++++++++++++++++++++++++++++++
>  libavformat/rsoenc.c     |  113 ++++++++++++++++++++++++++++++++++++++++++++++

missing regtest


[...]
>  #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
> diff --git a/libavformat/rso.h b/libavformat/rso.h
> new file mode 100644
> index 0000000..6e1a313
> --- /dev/null
> +++ b/libavformat/rso.h
> @@ -0,0 +1,36 @@
> +/*
> + * RSO format common data
> + * Copyright (c) 2010 Rafael Carre
> + *
> + * 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
> + */
> +
> +#ifndef AVFORMAT_RSO_H
> +#define AVFORMAT_RSO_H
> +
> +#include "avformat.h"
> +
> +#define RSO_HEADER_SIZE 8
> +
> +/* The ffmpeg codecs we support, and the IDs they have in the file */
> +static const AVCodecTag codec_rso_tags[] = {
> +    { CODEC_ID_PCM_U8,          0x0100 },
> +    { CODEC_ID_ADPCM_IMA_WAV,   0x0101 },
> +    { CODEC_ID_NONE, 0 },
> +};

duplicated 

[..]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Frequently ignored awnser#1 FFmpeg bugs should be sent to our bugtracker. User
questions about the command line tools should be sent to the ffmpeg-user ML.
And questions about how to use libav* should be sent to the libav-user ML.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100716/c80c286d/attachment.pgp>



More information about the ffmpeg-devel mailing list