[FFmpeg-devel] [PATCH] fix libswscale crash with contrast 0

Michael Niedermayer michaelni
Sun Jan 31 17:16:57 CET 2010

On Sun, Jan 31, 2010 at 03:52:44PM +0100, Reimar D?ffinger wrote:
> On Sun, Jan 31, 2010 at 01:29:50AM +0100, Michael Niedermayer wrote:
> > On Sun, Jan 31, 2010 at 12:57:08AM +0100, Reimar D?ffinger wrote:
> > > Hello,
> > > with contrast 0 (or only if lower?) there is a division by 0
> > > Here's a quick hack, no idea if it's correct, but I suspect
> > > it might be more correct even ignoring the crash.
> > 
> > the correct thing is likely what sws_setColorspaceDetails() does
> Which would be? Not doing the division at all?
> Also is there some kind of standard how all those controls are
> supposed to work together?
> E.g. is 0 contrast supposed to give a black image regardless of
> brightness?

0  should give constant color
-x should give inverted image

> Why does contrast also apply to saturation?

because its supposed to behave like
red  *= contrast
green*= contrast
blue *= contrast

i dont mind at all if people change this
iam fine with both blue or green bikes

Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Thouse who are best at talking, realize last or never when they are wrong.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100131/8f2879f9/attachment.pgp>

More information about the ffmpeg-devel mailing list