[MPlayer-dev-eng] old libcaca API

Reimar Döffinger Reimar.Doeffinger at gmx.de
Sun Feb 28 16:31:01 CET 2010


On Sun, Feb 28, 2010 at 02:16:58PM +0000, Paul B Mahol wrote:
> On 2/27/10, Diego Biurrun <diego at biurrun.de> wrote:
> > On Thu, Feb 25, 2010 at 11:29:05PM +0100, Paul B Mahol wrote:
> >>
> >> OT: both aa and caca overwrite user configured keys, but problem is such
> >> keys do work only sometimes, eg. 'a' key in aa:curses.
> >>
> >> Better to remove such keys and use options instead ?

For first patch I'd do whichever makes the patch simplest.
For the future, those keys probably will work reliably in any
mode that uses a separate window instead of the terminal.

> > I'd have to look in more detail, but I think the answer is yes.
> 
> There is one more bug, better to know if somebody can reproduce it:
> Changing contrast to 0 will crash mplayer.

Yes, that is due to a bug in the software scaler.
I created patch below some time ago, but I have no idea if it is correct.
Index: libswscale/yuv2rgb.c
===================================================================
--- libswscale/yuv2rgb.c	(revision 30796)
+++ libswscale/yuv2rgb.c	(working copy)
@@ -635,12 +635,6 @@
     cgv = (cgv*contrast * saturation) >> 32;
     oy -= 256*brightness;
 
-    //scale coefficients by cy
-    crv = ((crv << 16) + 0x8000) / cy;
-    cbu = ((cbu << 16) + 0x8000) / cy;
-    cgu = ((cgu << 16) + 0x8000) / cy;
-    cgv = ((cgv << 16) + 0x8000) / cy;
-
     av_free(c->yuvTable);
 
     switch (bpp) {



More information about the MPlayer-dev-eng mailing list