[FFmpeg-devel] Fwd: [PATCH] Psygnosis YOP demuxer

Mohamed Naufal naufal11
Sat Dec 26 09:56:38 CET 2009


2009/12/17 Michael Niedermayer <michaelni at gmx.at>

> On Mon, Dec 14, 2009 at 10:15:26PM +0530, Yadu Nand wrote:
> >  Hi,
> >
> > Attached patch is a cleaned up variant of the one submitted by Thomas
> > Higdon [1] and includes the demuxer only. The decoder patch will
> > follow once (hopefully) this is in.
> > Comments appreciated.
> >
> > [1]
> http://thread.gmane.org/gmane.comp.video.ffmpeg.devel/95133/focus=95474
> >
> > --
> > Regards,
> > Yadu Nand B
>
> >  Changelog                |    2
> >  doc/general.texi         |    1
> >  libavformat/Makefile     |    1
> >  libavformat/allformats.c |    1
> >  libavformat/avformat.h   |    2
> >  libavformat/yopdec.c     |  170
> +++++++++++++++++++++++++++++++++++++++++++++++
> >  6 files changed, 175 insertions(+), 2 deletions(-)
> > 4252696146e0252db08ba75036d1c3bad50ceb23  yop-demux.patch
> > Index: Changelog
> > ===================================================================
> > --- Changelog (revision 20110)
> > +++ Changelog (working copy)
> > @@ -40,9 +40,9 @@
> >  - Core Audio Format demuxer
> >  - Atrac1 decoder
> >  - MD STUDIO audio demuxer
> > +- Psygnosis YOP demuxer
> >
> >
> > -
> >  version 0.5:
> >
> >  - DV50 AKA DVCPRO50 encoder, decoder, muxer and demuxer
> > Index: doc/general.texi
> > ===================================================================
> > --- doc/general.texi  (revision 20110)
> > +++ doc/general.texi  (working copy)
> > @@ -231,6 +231,7 @@
> >      @tab Multimedia format used in Westwood Studios games.
> >  @item Westwood Studios VQA      @tab   @tab X
> >      @tab Multimedia format used in Westwood Studios games.
> > + at item Psygnosis YOP      @tab   @tab X
> >  @item YUV4MPEG pipe             @tab X @tab X
> >  @end multitable
> >
> > Index: libavformat/avformat.h
> > ===================================================================
> > --- libavformat/avformat.h    (revision 20110)
> > +++ libavformat/avformat.h    (working copy)
> > @@ -22,7 +22,7 @@
> >  #define AVFORMAT_AVFORMAT_H
> >
> >  #define LIBAVFORMAT_VERSION_MAJOR 52
> > -#define LIBAVFORMAT_VERSION_MINOR 39
> > +#define LIBAVFORMAT_VERSION_MINOR 40
> >  #define LIBAVFORMAT_VERSION_MICRO  0
> >
> >  #define LIBAVFORMAT_VERSION_INT
> AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
> > Index: libavformat/yopdec.c
> > ===================================================================
> > --- libavformat/yopdec.c      (revision 0)
> > +++ libavformat/yopdec.c      (revision 0)
> > @@ -0,0 +1,170 @@
> > +/**
> > + * @file libavformat/yopdec.c
> > + * Psygnosis YOP demuxer
> > + *
> > + * Copyright (C) 2009 Thomas P. Higdon <thomas.p.higdon at gmail.com>
> > + *
> > + * 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
> > + */
> > +
> > +#include "libavutil/intreadwrite.h"
> > +#include "avformat.h"
> > +
> > +typedef struct yop_dec_context {
>
> > +    AVPacket sound_packet;
> > +    AVPacket video_packet;
>
> Is there some code that frees these if one is left at eof?
>
>
> > +
> > +    int frame_size;
>
> > +    int sound_data_length;
>
> constant thus redundant
>
>
> > +    int sound_chunk_length;
> > +    int stream;
> > +    int num_pal_colors;
> > +} YopDecContext;
> > +
>
> > +static int yop_probe(AVProbeData *probe_packet)
> > +{
> > +     if ((AV_RB16(probe_packet->buf) == AV_RB16("YO"))
> > +              && !(AV_RL16(probe_packet->buf + 8) & 1) &&
> !(AV_RL16(probe_packet->buf + 10) & 1))
> > +        return AVPROBE_SCORE_MAX/2 + 1;
> > +
> > +    return 0;
> > +}
>
> tabs
>
[...]

Yadu and I are working together. Thought I'd submit the patch this time.
Have fixed the pointed out issues.
Waiting for comments.

Naufal
-------------- next part --------------
A non-text attachment was scrubbed...
Name: yop_demux.patch
Type: text/x-patch
Size: 7682 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20091226/8900f8bd/attachment.bin>



More information about the ffmpeg-devel mailing list