mirror of https://github.com/mpv-player/mpv
add IMGFMT_RGB8 palette init code what moron actually added init code just for half of the formats?!
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22243 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
29aefa57b4
commit
6b328af8eb
|
@ -249,6 +249,17 @@ static int config(struct vf_instance_s* vf,
|
|||
vf->priv->palette=NULL;
|
||||
}
|
||||
switch(best){
|
||||
case IMGFMT_RGB8: {
|
||||
/* set 332 palette for 8 bpp */
|
||||
int i;
|
||||
vf->priv->palette=malloc(4*256);
|
||||
for(i=0; i<256; i++){
|
||||
vf->priv->palette[4*i+0]=4*(i>>6)*21;
|
||||
vf->priv->palette[4*i+1]=4*((i>>3)&7)*9;
|
||||
vf->priv->palette[4*i+2]=4*((i&7)&7)*9;
|
||||
vf->priv->palette[4*i+3]=0;
|
||||
}
|
||||
break; }
|
||||
case IMGFMT_BGR8: {
|
||||
/* set 332 palette for 8 bpp */
|
||||
int i;
|
||||
|
@ -442,6 +453,8 @@ static int query_format(struct vf_instance_s* vf, unsigned int fmt){
|
|||
case IMGFMT_411P:
|
||||
case IMGFMT_BGR8:
|
||||
case IMGFMT_RGB8:
|
||||
case IMGFMT_BG4B:
|
||||
case IMGFMT_RG4B:
|
||||
{
|
||||
unsigned int best=find_best_out(vf);
|
||||
int flags;
|
||||
|
|
Loading…
Reference in New Issue