[FFmpeg-user] hue filter set brightness broken?

Karl Kiniger karl.kiniger at med.ge.com
Fri Oct 17 15:18:36 CEST 2014


On Mon 141013, Karl Kiniger wrote:

> -vf hue=b=-10 does not result in black images depending
> on colors. 
> 

-vf  mp=eq2=1.0:1.0:-1:1.0 gives  the very same result like hue=b=-10

e.g:

red,green,blue colors from testsrc when saved w/o filter as png are exactly 
#ff0000, #00ff00, #0000ff as expected.

going thru hue=b=0 or mp=eq2=1.0:1.0:0.0:1.0 the colors are:
#fe0000, #00ff01, #0000ff

however when setting brightness to minimum: (hue=b=-10 or
                                             mp=eq2=1.0:1.0:-1.0:1.0)

the resulting colors (rgb) are:

#a00000, #005700, #0000cf

Is this really the expected behaviour? Simply-minded I expected the
brightness value to act like the brigthness control on a color TV...

Going into YUV vs RGB  pm weekend if time permits..

have a nice weekend,
Karl

eq2 testing fragment:

#!/bin/bash
a2z=($(echo {a..z}))
for i in $(seq -10 10);do
     b=$(bc -l <<< "scale=1;$i/10.")
     t=${a2z[$i+10]}
     fn=$(printf "eq2test-%c-%d.png" $t $i)
     ffmpeg -f lavfi -i testsrc -an -vf mp=eq2=1.0:1.0:$b:1.0 -frames 1 -y $fn
done



More information about the ffmpeg-user mailing list