[MPlayer-dev-eng] [PATCH] -vf combdetect: crude detection of interlaced sources

Diego Biurrun diego at biurrun.de
Mon Aug 2 18:51:21 CEST 2010


On Mon, Aug 02, 2010 at 03:50:30PM +0100, Christopher Key wrote:
> 
> --- libmpcodecs/vf_combdetect.c	(revision 0)
> +++ libmpcodecs/vf_combdetect.c	(revision 5746)
> @@ -0,0 +1,160 @@
> +/*
> + * This file is part of MPlayer.

You can add your name here.

> +static int getpixel(unsigned char* src, int bpp){
> +
> +    switch(bpp){
> +    case 1:
> +        return src[0];
> +    case 3:
> +    case 4:
> +        return (src[0]+src[1]+src[2])/3;
> +    }
> +
> +    return 0;
> +}

Please use K&R style for new files.

> --- Makefile	(revision 5734)
> +++ Makefile	(revision 5746)
> @@ -408,6 +408,7 @@
>                libmpcodecs/vf_crop.c \
>                libmpcodecs/vf_cropdetect.c \
> +              libmpcodecs/vf_combdetect.c \

alphabetical order

> --- DOCS/man/en/mplayer.1	(revision 5734)
> +++ DOCS/man/en/mplayer.1	(revision 5746)
> @@ -5900,6 +5900,18 @@
>  .
>  .TP
> +.B combdetect[=limit]
> +Counts the number of pixels that show combing on each frame and
> +prints statistics to stdout.  Recommends whether to deinterlace.

New sentences on new lines in the man page.

> +.IPs <limit>
> +Threshold difference between pixel and its neighbours, which can be optionally specified from nothing (0) to

long line

> --- help/help_mp-en.h	(revision 5734)
> +++ help/help_mp-en.h	(revision 5746)
> @@ -1674,6 +1674,11 @@
>  
> +// libmpcodecs/vf_combdetect.c
> +#define MSGTR_MPCODECS_CombArea "[COMB] Combed pixels: %ld/%ld (%.2f%%).  Combed frames: %d/%d (%.2f%%).  %s.\n"
> +#define MSGTR_MPCODECS_CombArea_Deinterlace "Recommend deinterlacing"
> +#define MSGTR_MPCODECS_CombArea_NoDeinterlace "Don't recommend deinterlacing"

"Deinterlacing (not) recommended." sounds better to me.

Diego


More information about the MPlayer-dev-eng mailing list