[MPlayer-cvslog] r22245 - trunk/libmpcodecs/vf_scale.c

michael subversion at mplayerhq.hu
Sat Feb 17 12:40:01 CET 2007


Author: michael
Date: Sat Feb 17 12:40:01 2007
New Revision: 22245

Modified:
   trunk/libmpcodecs/vf_scale.c

Log:
palette init code for IMGFMT_RGB4 and IMGFMT_RG4B


Modified: trunk/libmpcodecs/vf_scale.c
==============================================================================
--- trunk/libmpcodecs/vf_scale.c	(original)
+++ trunk/libmpcodecs/vf_scale.c	Sat Feb 17 12:40:01 2007
@@ -282,6 +282,17 @@
             vf->priv->palette[4*i+3]=0;
 	}
 	break; }
+    case IMGFMT_RGB4: 
+    case IMGFMT_RG4B: {
+	int i;
+	vf->priv->palette=malloc(4*16);
+	for(i=0; i<16; i++){
+	    vf->priv->palette[4*i+0]=4*(i>>3)*63;
+	    vf->priv->palette[4*i+1]=4*((i>>1)&3)*21;
+	    vf->priv->palette[4*i+2]=4*((i&1)&1)*63;
+            vf->priv->palette[4*i+3]=0;
+	}
+	break; }
     }
 
     if(!opt_screen_size_x && !opt_screen_size_y && !(screen_size_xy >= 0.001)){



More information about the MPlayer-cvslog mailing list