[MPlayer-dev-eng] [PATCH] mga_vid scaler limits

Kalev Soikonen ksop at hot.ee
Sat Dec 16 18:24:25 CET 2006


On Sat, Dec 16, 2006 at 05:00:05PM +0200, Ville Syrjälä wrote:
...
> Disabling vertical filtering allows source widths up to 2048. Note that 
> this only applies to G450/G550. G200 and G400 can't handle it.

So G200/G400 cannot handle the case (sw > 1024 && sw == dw && sh == dh)
and both x/y filtering is off?

> > +	if(sw > 1023)
> > +		card->regs.besctl &= ~(1<<11);
> > +	if(sh > 1023)
> > +		card->regs.besctl &= ~(1<<10);
> 
> Shouldn't these be 1024?

I tested with sw==1024: upscaling is ok, but when downscaling, there's
a glitchy left edge (like 4 pixels wide?)

> 
> Did you actually try height > 1024 too? IIRC I didn't get it working 
> with the DirectFB driver.

You are right. It doesn't work. :-(

Alright, here's the new patch, still missing G200/G400 checks though.

-------------- next part --------------
diff -ur trunk/drivers/mga_vid.c main/drivers/mga_vid.c
--- trunk/drivers/mga_vid.c	2006-06-05 13:29:08.000000000 +0000
+++ main/drivers/mga_vid.c	2006-12-16 15:38:25.000000000 +0000
@@ -799,6 +799,10 @@
 	return -1;
 }
 
+	// hardware limitation?
+	if(sw > 1023)
+		card->regs.besctl &= ~(1<<11);
+
 	// setting black&white mode 
 	card->regs.besctl|=(card->regs.blackie<<20); 
 
diff -ur trunk/libvo/mga_common.c main/libvo/mga_common.c
--- trunk/libvo/mga_common.c	2006-08-01 13:58:19.000000000 +0000
+++ main/libvo/mga_common.c	2006-12-16 15:36:38.000000000 +0000
@@ -371,7 +371,7 @@
             return (-1);
         }
 
-	if(width>1023 || height >1023)
+	if(width>2048 || height>1024)
 	{
 		mp_msg(MSGT_VO,MSGL_ERR, MGSTR_LIBVO_MGA_ResolutionTooHigh);
 		return (-1);
diff -ur trunk/vidix/drivers/mga_vid.c main/vidix/drivers/mga_vid.c
--- trunk/vidix/drivers/mga_vid.c	2006-06-05 13:27:37.000000000 +0000
+++ main/vidix/drivers/mga_vid.c	2006-12-16 15:37:51.000000000 +0000
@@ -863,6 +863,10 @@
 
     }
 
+	// hardware limitation?
+	if(sw > 1023)
+		regs.besctl &= ~(1<<11);
+
 	//Disable contrast and brightness control
 	regs.besglobctl |= (1<<5) + (1<<7);
 	regs.beslumactl = (0x7f << 16) + (0x80<<0);


More information about the MPlayer-dev-eng mailing list