[FFmpeg-devel] [PATCH] Apple RPZA encoder

Jai Menon jmenon86
Tue Mar 24 09:38:44 CET 2009


On 3/24/09, Diego Biurrun <diego at biurrun.de> wrote:
> On Tue, Mar 24, 2009 at 10:33:19AM +0530, Jai Menon wrote:
>  >
>  > Attached patch is a cleaned up version of the original one posted by
>  > Todd Kirby [1].
>  > And, yeah, its a gsoc qualification task :)
>  >
>  > [1] http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2005-June/001673.html
>  >
>
> > --- libavcodec/rpzaenc.c      (revision 0)
>  > +++ libavcodec/rpzaenc.c      (revision 0)
>  > @@ -0,0 +1,848 @@
>  > +/*
>  > + * Quicktime RPZA Video Encoder.
>
>  QuickTime RPZA video encoder
>
>  > + * Copyright (C) 2005 Todd Kirby <doubleshot at pacbell.net> and David Adler
>  > + *
>  > + * This library 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 of the License, or (at your option) any later version.
>  > + *
>  > + * This library 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 this library; if not, write to the Free Software
>  > + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
>  > + *
>  > + */
>
>  This license header is wrong.

fixed

>
>  > +/**
>  > + * @file rpzaenc.c
>
>  missing directory prefix

fixed

>  > + * QT RPZA Video Encoder
>
>  QuickTime RPZA video encoder

fixed

>
>  > +typedef struct {
>  > +  uint8_t r;
>  > +  uint8_t g;
>  > +  uint8_t b;
>  > +} rgb;
>
>  indentation

fixed

>
>  > +typedef enum { BLUE,
>  > +               GREEN,
>  > +               RED,
>  > +} channel_offset;
>
>  ditto
>
>  > +    if (r > 31) {
>  > +        r = 31;
>  > +    }
>  > +    if (g > 31) {
>  > +        g = 31;
>  > +    }
>  > +    if (b > 31) {
>  > +        b = 31;
>  > +    }
>
>  useless {}, same below

removed

>
>  > +/**
>  > + * Returns the total difference between two 24 bit color values
>
>  .
>
>  same below
>
>  > + */
>  > +static int diff_colors(uint8_t *colorA, uint8_t *colorB)
>  > +
>  > +{
>
>  stray empty line

removed

>
>  > +    bi.image_width = s->frame_width;
>  > +    bi.image_height = s->frame_height;
>  > +    bi.rowstride = pict->linesize[0];
>  > +
>  > +    bi.blocks_per_row = (s->frame_width + 3) >> 2;
>
>  align

aligned

>
>  > +AVCodec rpza_encoder = {
>  > +    "rpza",
>  > +    CODEC_TYPE_VIDEO,
>  > +    CODEC_ID_RPZA,
>  > +    sizeof(RpzaContext),
>  > +    rpza_encode_init,
>  > +    rpza_encode_frame,
>  > +    rpza_encode_end,
>  > +    .pix_fmts= (enum PixelFormat[]){PIX_FMT_RGB24, -1},
>  > +};
>
>  codec long name missing

added

>  Diego

revised patch attached


-- 
Regards,

Jai
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rpzaenc.patch
Type: text/x-patch
Size: 30350 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090324/250101e3/attachment.bin>



More information about the ffmpeg-devel mailing list