[MPlayer-dev-eng] Video vilters

Diego Biurrun diego at biurrun.de
Tue Oct 14 02:00:29 CEST 2003


Torinthiel writes:
 > I'm just reading the video filter eq2 on the manpage and found something
 > interesting. It says:
 > <quote>
 > Alternative software equalizer that uses lookup tables (very slow),
 > allowing gamma correction in addition to simple brightness,
 > contrast and saturation adjustment.
 > </quote>
 > 
 > Ok, but the eq filter only has parameters for contrast and brightness,
 > so it's slightly out of sync ;)

Yup, that's a bug, thanks, fixed.

 > BTW wouldn't it be better if the parameters passed were at least in the
 > same order? I mean in eq brightness is before contrast and in eq2 the
 > other way round.
 > Torinthiel

You mean it should be

 eq[=bright:cont]

and

 eq2[=brightness:contrast:gamma:saturation:rg:gg:bg]

instead of

 eq2[=gamma:contrast:brightness:saturation:rg:gg:bg]

?

I made a patch for this with a little help from iive, it works for me.
I think the added consistency is worth the change.  Can I apply it?
I'm too lazy to include the man page changes, but I guess you will
trust me that I will do that, too.  Any glaring mistakes?

Diego



Index: libmpcodecs/vf_eq2.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vf_eq2.c,v
retrieving revision 1.6
diff -u -r1.6 vf_eq2.c
--- libmpcodecs/vf_eq2.c	15 Mar 2003 18:01:02 -0000	1.6
+++ libmpcodecs/vf_eq2.c	13 Oct 2003 23:44:51 -0000
@@ -428,9 +428,9 @@
   eq2->bgamma = 1.0;
 
   if (args != NULL) {
-    par[0] = 1.0;
+    par[0] = 0.0;
     par[1] = 1.0;
-    par[2] = 0.0;
+    par[2] = 1.0;
     par[3] = 1.0;
     par[4] = 1.0;
     par[5] = 1.0;
@@ -449,9 +449,9 @@
     eq2->ggamma = par[5];
     eq2->bgamma = par[6];
 
-    set_gamma (eq2, par[0]);
+    set_brightness (eq2, par[0]);
     set_contrast (eq2, par[1]);
-    set_brightness (eq2, par[2]);
+    set_gamma (eq2, par[2]);
     set_saturation (eq2, par[3]);
   }
 



More information about the MPlayer-dev-eng mailing list