Mercurial > mplayer.hg
changeset 22227:cec1eb5be9e4
palette init code for IMGFMT_RGB4 and IMGFMT_RG4B
author | michael |
---|---|
date | Sat, 17 Feb 2007 11:40:01 +0000 |
parents | 1b1286436771 |
children | 55aeb86425cb |
files | libmpcodecs/vf_scale.c |
diffstat | 1 files changed, 11 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/libmpcodecs/vf_scale.c Sat Feb 17 11:36:02 2007 +0000 +++ b/libmpcodecs/vf_scale.c Sat Feb 17 11:40:01 2007 +0000 @@ -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)){