changeset 2230:3f7a5bf1f9f4

fix rgb/bgr for 15/16bpp
author atmos4
date Wed, 17 Oct 2001 00:29:07 +0000
parents ad393ff770f4
children 440b15b32181
files postproc/swscale.c postproc/swscale_template.c
diffstat 2 files changed, 8 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/postproc/swscale.c	Tue Oct 16 23:58:17 2001 +0000
+++ b/postproc/swscale.c	Wed Oct 17 00:29:07 2001 +0000
@@ -103,11 +103,11 @@
 	dest[2]=clip_table[((Y + yuvtab_40cf[V]) >>13)];
 #else
 	unsigned short *d=dest;
-	unsigned int r=clip_table[((Y + yuvtab_3343[U]) >>13)];
+	unsigned int b=clip_table[((Y + yuvtab_3343[U]) >>13)];
 	unsigned int g=clip_table[((Y + yuvtab_0c92[V] + yuvtab_1a1e[U]) >>13)];
-	unsigned int b=clip_table[((Y + yuvtab_40cf[V]) >>13)];
-	d[0]=((r>>3)<<10)|((g>>3)<<5)|((b>>3)); // 15bpp
-//	d[0]=((r>>3)<<11)|((g>>2)<<5)|((b>>3)); // 16bpp
+	unsigned int r=clip_table[((Y + yuvtab_40cf[V]) >>13)];
+//	d[0]=((r>>3)<<10)|((g>>3)<<5)|((b>>3)); // 15bpp
+	d[0]=((r>>3)<<11)|((g>>2)<<5)|((b>>3)); // 16bpp
 #endif
 	dest+=dstbpp;
     }
--- a/postproc/swscale_template.c	Tue Oct 16 23:58:17 2001 +0000
+++ b/postproc/swscale_template.c	Wed Oct 17 00:29:07 2001 +0000
@@ -103,11 +103,11 @@
 	dest[2]=clip_table[((Y + yuvtab_40cf[V]) >>13)];
 #else
 	unsigned short *d=dest;
-	unsigned int r=clip_table[((Y + yuvtab_3343[U]) >>13)];
+	unsigned int b=clip_table[((Y + yuvtab_3343[U]) >>13)];
 	unsigned int g=clip_table[((Y + yuvtab_0c92[V] + yuvtab_1a1e[U]) >>13)];
-	unsigned int b=clip_table[((Y + yuvtab_40cf[V]) >>13)];
-	d[0]=((r>>3)<<10)|((g>>3)<<5)|((b>>3)); // 15bpp
-//	d[0]=((r>>3)<<11)|((g>>2)<<5)|((b>>3)); // 16bpp
+	unsigned int r=clip_table[((Y + yuvtab_40cf[V]) >>13)];
+//	d[0]=((r>>3)<<10)|((g>>3)<<5)|((b>>3)); // 15bpp
+	d[0]=((r>>3)<<11)|((g>>2)<<5)|((b>>3)); // 16bpp
 #endif
 	dest+=dstbpp;
     }