diff libswscale/swscale_template.c @ 22976:d581a6ba2d9c

improve horizontal chroma resolution with pal
author michael
date Sun, 15 Apr 2007 01:27:34 +0000
parents c91bb8f1cd85
children 9528d1ebe68f
line wrap: on
line diff
--- a/libswscale/swscale_template.c	Sun Apr 15 00:53:32 2007 +0000
+++ b/libswscale/swscale_template.c	Sun Apr 15 01:27:34 2007 +0000
@@ -2296,12 +2296,10 @@
         assert(src1 == src2);
 	for(i=0; i<width; i++)
 	{
-		int d0= src1[2*i  ];
-		int d1= src1[2*i+1];
-                int p = (pal[d0]&0xFF00FF) + (pal[d1]&0xFF00FF);
+		int p= pal[src1[i]];
 
-		dstU[i]= (pal[d0]+pal[d1]-p)>>9;
-		dstV[i]= p>>17;
+		dstU[i]= p>>8;
+		dstV[i]= p>>16;
 	}
 }