Browse Source

fix rgb/bgr for 15/16bpp

Originally committed as revision 2231 to svn://svn.mplayerhq.hu/mplayer/trunk/postproc
tags/v0.5
Felix Bünemann 24 years ago
parent
commit
d1530c6461
2 changed files with 8 additions and 8 deletions
  1. +4
    -4
      postproc/swscale.c
  2. +4
    -4
      postproc/swscale_template.c

+ 4
- 4
postproc/swscale.c View File

@@ -103,11 +103,11 @@ static int s_last_ypos;
dest[2]=clip_table[((Y + yuvtab_40cf[V]) >>13)];
#else
unsigned short *d=dest;
unsigned int r=clip_table[((Y + yuvtab_3343[U]) >>13)];
unsigned int b=clip_table[((Y + yuvtab_3343[U]) >>13)];
unsigned int g=clip_table[((Y + yuvtab_0c92[V] + yuvtab_1a1e[U]) >>13)];
unsigned int b=clip_table[((Y + yuvtab_40cf[V]) >>13)];
d[0]=((r>>3)<<10)|((g>>3)<<5)|((b>>3)); // 15bpp
// d[0]=((r>>3)<<11)|((g>>2)<<5)|((b>>3)); // 16bpp
unsigned int r=clip_table[((Y + yuvtab_40cf[V]) >>13)];
// d[0]=((r>>3)<<10)|((g>>3)<<5)|((b>>3)); // 15bpp
d[0]=((r>>3)<<11)|((g>>2)<<5)|((b>>3)); // 16bpp
#endif
dest+=dstbpp;
}


+ 4
- 4
postproc/swscale_template.c View File

@@ -103,11 +103,11 @@ static int s_last_ypos;
dest[2]=clip_table[((Y + yuvtab_40cf[V]) >>13)];
#else
unsigned short *d=dest;
unsigned int r=clip_table[((Y + yuvtab_3343[U]) >>13)];
unsigned int b=clip_table[((Y + yuvtab_3343[U]) >>13)];
unsigned int g=clip_table[((Y + yuvtab_0c92[V] + yuvtab_1a1e[U]) >>13)];
unsigned int b=clip_table[((Y + yuvtab_40cf[V]) >>13)];
d[0]=((r>>3)<<10)|((g>>3)<<5)|((b>>3)); // 15bpp
// d[0]=((r>>3)<<11)|((g>>2)<<5)|((b>>3)); // 16bpp
unsigned int r=clip_table[((Y + yuvtab_40cf[V]) >>13)];
// d[0]=((r>>3)<<10)|((g>>3)<<5)|((b>>3)); // 15bpp
d[0]=((r>>3)<<11)|((g>>2)<<5)|((b>>3)); // 16bpp
#endif
dest+=dstbpp;
}


Loading…
Cancel
Save