[FFmpeg-devel] [PATCH] Apple RPZA encoder

Diego Biurrun diego
Tue Mar 24 08:48:47 CET 2009


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.

> +/**
> + * @file rpzaenc.c

missing directory prefix

> + * QT RPZA Video Encoder

QuickTime RPZA video encoder

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

indentation

> +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

> +/**
> + * 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

> +    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

> +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

Diego



More information about the ffmpeg-devel mailing list