summaryrefslogtreecommitdiffstats
path: root/libmpcodecs
diff options
context:
space:
mode:
authormichael <michael@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-02-17 11:34:25 +0000
committermichael <michael@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-02-17 11:34:25 +0000
commit6b328af8ebf4a6bc6d67b663fd164a1f1a51e612 (patch)
treea6e076d5f5a1f809f47faef23e88d84d0fc224f8 /libmpcodecs
parent29aefa57b43b45bfabc356d2a162aeeeb4a6e3bb (diff)
downloadmpv-6b328af8ebf4a6bc6d67b663fd164a1f1a51e612.tar.bz2
mpv-6b328af8ebf4a6bc6d67b663fd164a1f1a51e612.tar.xz
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
Diffstat (limited to 'libmpcodecs')
-rw-r--r--libmpcodecs/vf_scale.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/libmpcodecs/vf_scale.c b/libmpcodecs/vf_scale.c
index 8d786e771c..9e3a0eb2dd 100644
--- a/libmpcodecs/vf_scale.c
+++ b/libmpcodecs/vf_scale.c
@@ -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;