1
mirror of https://github.com/mpv-player/mpv synced 2025-01-01 04:36:24 +01:00

palette init code for IMGFMT_RGB4 and IMGFMT_RG4B

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22245 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
michael 2007-02-17 11:40:01 +00:00
parent 2a0c4363cf
commit 8fd50571b0

View File

@ -282,6 +282,17 @@ static int config(struct vf_instance_s* vf,
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)){