[MPlayer-dev-eng] [PATCH] Three new filters and performance

Arpi arpi at thot.banki.hu
Wed Jan 29 23:01:33 CET 2003


Hi,

> * eq: provides brightness and contrast
> * eq2: provides brightness, contrast and global gamma
> * gamma: (one of my patches) provides independent gamma using exactly 
> the same method that eq2
> * saturation: can be implemented in all of the above.
> 
> Wouldn't it make sense to have just one filter that would do all this at 
> once?  :-m  (in fact... I don't understand why does mplayer have both eq 
> and eq2, when eq2 is "a superset" of eq. :-m)

not really.
eq is doing simple (add/mul) math for each pixel, (can be) optimized for mmx.
eq2 is doing complex math, so it uses LUT (table), so it cannot use mmx.

for gamma you need LUT table (ok there is some polinomial gamma hack for mmx
somewhere, STFA it was discussed). if you don't need gamma, then using
add/mul mmx optimized is faster, but it's limited to simple functions like
contrast, brightness, saturation.

imho you shouldn't add new filters but extend eq by saturation and change
eq2 to use 3 tables, one for each component.


A'rpi / Astral & ESP-team

--
Developer of MPlayer, the Movie Player for Linux - http://www.MPlayerHQ.hu
    "However, many people beg for its inclusion in Debian. Why?" - Gabucino
  "Because having new software in Debian is good." - Josselin Mouette
"Because having good software in Debian is new." - Gabucino


More information about the MPlayer-dev-eng mailing list