[MPlayer-dev-eng] [PATCH] vf_eq2 default parameter fix

Diego Biurrun diego at biurrun.de
Sun Oct 19 20:19:13 CEST 2003


Arpi writes:
 > >  > I changed the order of parameters from gamma:contrast:brightness to
 > >  > gamma:brightness:contrast. I think that's the best solution.
 > > 
 > > Umm, I beg to differ ;-)
 > > 
 > > The best solution would be brightness:contrast:gamma IMHO in order to
 > > be consistent with -vf eq.  If you only want to specify gamma you will
 > > have to use -vf eq2=::XX, but that is only a small inconvenience for
 > > you resulting in a big gain in usability and consistence for the rest,
 > > so please consider making that change.
 > 
 > I disagree.
 > for brightness/contrast changes you should not use eq2, but eq.
 > eq2 uses table lookup, which is a lot slower than mmx for simple
 > transformations like the ones needed for bri/contrast change.

Huh?  From the man page:

  eq2[=gamma:contrast:brightness:saturation:rg:gg:bg]
    Alternative software equalizer that uses lookup ta bles (very
    slow), allowing gamma correction in ad dition to simple brightness
    and contrast adjust ment.  Note that it uses the same MMX
    optimized code as -vf eq if all gamma values are 1.0.  The

So there should be no speed penalty when preferring vf_eq2 over vf_eq
as long as you don't change gamma, 1.0 is the default.

 > but LUT is needed for gamma, which is the primary goal of eq2.
 > so you use eq2 only if you want gamma transform, and you may
 > optinally also set brightness/contrast too with it (to avoid
 > using 2 filters, both eq + eq2).

If the parameter order is b/c/g you can use it as a replacement for
vf_eq as long as you don't change gamma, unless the above paragraph is
false or I am misunderstanding it completely.

I maintain that b/c/g is the best order for consistency reasons.  If
you only want to change gamma then typing eq2=::XXX should not be too
hard.

 > anyway since a while the vf_scale filter can do bri/contrast
 > changes too so 'eq' is getting outdated/redundant.

How can vf_scale do b/c changes?  It's not documented..

BTW, maybe we should compile a list of outdated/redundant things and
remove them before 1.0.

Diego



More information about the MPlayer-dev-eng mailing list