[MPlayer-dev-eng] [PATCH] Color management filter [v2]

Diego Biurrun diego at biurrun.de
Mon Sep 1 20:46:30 CEST 2008


On Fri, Aug 29, 2008 at 03:20:04AM -0400, Yue Shi Lai wrote:
> Sorry, several tabs slipped in the last patch I sent out. This one is  
> with them removed.
>
> --- libmpcodecs/vf_cm.c	(revision 0)
> +++ libmpcodecs/vf_cm.c	(revision 0)
> @@ -0,0 +1,2856 @@
> +/*
> + * Color management filter
> + *
> + * Copyright (c) Yue Shi Lai 2008, licensed under GNU GPL v2 or later

Everything after the comma is redundant, you say the same thing below.

> +        /* The remaining two loops can be fused, sincen there are only

since

> --- libmpcodecs/vf_cm.h	(revision 0)
> +++ libmpcodecs/vf_cm.h	(revision 0)
> @@ -0,0 +1,35 @@
> +#ifndef MPLAYER_VF_CM_H
> +#define MPLAYER_VF_CM_H

This file is missing a license header.

> +#include "vf.h"
> + [...]
> +extern void vf_cm_clut_ycbcrf_to_rgb(
> +    uint8_t *buf, float y, float cb, float cr);

Add stdint.h to the list of #includes, you use typedefs from it.

> --- libmpcodecs/vf.c	(revision 27489)
> +++ libmpcodecs/vf.c	(working copy)
> @@ -48,6 +48,9 @@
>  extern const vf_info_t vf_info_lavcdeint;
>  extern const vf_info_t vf_info_eq;
>  extern const vf_info_t vf_info_eq2;
> +#ifdef LCMS
> +extern vf_info_t vf_info_cm;
> +#endif /* LCMS */

The #ifdef is useless.  Why is the declaration not const?

> @@ -7850,6 +7871,7 @@
>  FREETYPE = $_freetype
>  FTP = $_ftp
>  GIF = $_gif
> +LCMS = $_lcms
>  GUI = $_gui
>  GUI_GTK = $_gui_gtk
>  GUI_WIN32 = $_gui_win32

This is in alphabetical order, please keep it.

> --- DOCS/man/en/mplayer.1	(revision 27489)
> +++ DOCS/man/en/mplayer.1	(working copy)
> @@ -6218,6 +6218,146 @@
>  .
>  .TP
> +.B cm[=variable1=value1[:variable2=value2[:...]]]
> +Color management filter that transform between color spaces using ICC

colorspaces

> +profiles. Currently, Little CMS is the only supported color management
> +module (CMM). The parameter is a colon separated list of variable

colon-separated

> +assignments, except for "exact" that does not need an right handed

a right-handed

> +side expression. It accepts 4:2:0 YUV input and depending on the

and,

> +filter chain, produces either RGB or YUV output. ICC profiles can be
> +supplied either as file or for standard color spaces, generated on the

"as a file", "or,"

> +is used (see -vo gl:yuv=6), this filter supply the necessary, source

supplies the necessary source

> +color space YUV to destination color space RGB conversion texture and

colorspace

> +passing the image unmodified. In this case, the only meaningful place

passes

> +of the source profile. Only RGB profiles are supported. The filter
> +automatically search by the extensions by .icc, .icm, .ICC, .ICM. The

searches

Ummm, "by the extension by"?

> +profile path is searched according to
> +.sp 1
> +~/.local/share/color/icc
> +.br
> +~/color/icc
> +.br
> +~/.color/icc
> +.br
> +<datadir>/icc
> +.br
> +/usr/share/color/icc
> +.br
> +/usr/local/share/color/icc

according to?

> +source profile for the runtime profile generation. The string is
> +case insensitive and several alternatives are accepted. Note that

case-insensitive

> +.IPs src_trc=<string>
> +Specifies the type of the tone reproduction curve (TRC) of the source
> +profile for the runtime profile generation. Either a (case
> +insensitive) string is accepted, or a floating point gamma value can

ditto

Leave out the comma before the or.

> +.IPs dest=<string>
> +Same as src=, for the destination profile.

Lowercase, drop period, same below

> +the better choice). The media-relative and ICC-absolute colorimetric
> +intents reproduces the original color irrespective of the global image

reproduce

> +warning color for the proofing transform. If other than 3 values are
> +specified, the default gray (153, 153, 153) is used.

less than?

> +Switch for the black point compensation (BPC) algorithm. BPC is

Switch to

> +typically only needed for output devices with light leakage. When
> +using the colorimetric intents and without BPC, this typically removes

colorimetric intents without BPC

> +allows the use of a filter internal algorithm that is derived from the

filter-internal

> +small value will result in the BPC algorithm to over correct the black

overcorrect

> +This option ignores any right hand side expression. When specified,

right-hand

> +each entries of the color look up table is calculated directly by the

lookup table

> +delay of several seconds during start up.

startup


In the man page, you need to put new sentences on new lines.


You are not a German native speaker, are you? :)

Diego



More information about the MPlayer-dev-eng mailing list