On Sunday 10 Jul 2005 21:55, John Harvey wrote:
> With this patch the YUV picture should now be scaled & positioned correctly
> as requested by the caller (ie Xv).

Here's an additional patch that fixes the misaligned frames experienced by 
NTSC users. Thanks to Adam Forsyth for testing this patch.

-- 
Ian
--- ivtv-0.3.6y/driver/ivtv-ioctl.c.org	2005-07-11 09:59:54.000000000 +0100
+++ ivtv-0.3.6y/driver/ivtv-ioctl.c	2005-07-11 10:22:18.000000000 +0100
@@ -871,10 +871,15 @@
 		reg_2954 = 0x00020001 + y_offset_major + args->src_y;
 		reg_295c = 0x00020001 + ((y_offset_major + args->src_y) >> 1);
 
+		if (decode_height == 480)
+		  reg_289c = 0x011e0000;
+		else
+		  reg_289c = 0x01500000;
+
 		if (args->dst_y < 0)
-	          reg_289c = (0x01500000 - ((y_offset_minor & ~1)<<15))+(0x017-(y_offset_minor >>1));
+		  reg_289c = (reg_289c - ((y_offset_minor & ~1)<<15))+(0x017-(y_offset_minor >>1));
 		else
-		  reg_289c = (0x01500000 + ((y_offset_minor & ~1)<<15))+(0x017+(y_offset_minor >>1));
+		  reg_289c = (reg_289c + ((y_offset_minor & ~1)<<15))+(0x017+(y_offset_minor >>1));
 
 		// These two help prevent some 'rogue' lines when up-scaling
 		// More work is needed to find the correct values

Reply via email to