[FFmpeg-devel] [PATCH] MS Video 1 encoder, take 2

Diego Biurrun diego
Wed Mar 11 10:48:43 CET 2009


On Wed, Mar 11, 2009 at 08:11:39AM +0200, Kostya wrote:
> $subj
> 
> --- libavcodec/msvideo1enc.c	(revision 0)
> +++ libavcodec/msvideo1enc.c	(revision 0)
> @@ -0,0 +1,297 @@
> +/*
> + * Microsoft Video-1 Encoder

nit: encoder

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

Use the full filename, i.e. libavcodec/msvideo1enc.c.

> +                score += 6;
> +                if(score < bestscore){
> +                    bestscore = score;
> +                    bestmode = MODE_2COL;
> +                }
> +                score += 18;
> +                if(score < bestscore){
> +                    bestscore = score;
> +                    bestmode = MODE_8COL;

align

> +static av_cold int encode_init(AVCodecContext *avctx)
> +{
> +    Msvideo1EncContext * const c = avctx->priv_data;
> +
> +    if (!(avctx->flags&CODEC_FLAG_QSCALE)) {

Sometimes you use K&R-style if/for, sometimes you don't.  I would suggest
K&R-style, i.e. space after if/for and before the opening {.

Diego




More information about the ffmpeg-devel mailing list