diff options
author | Arpi <arpi@thot.banki.hu> | 2001-10-16 23:58:17 +0000 |
---|---|---|
committer | Arpi <arpi@thot.banki.hu> | 2001-10-16 23:58:17 +0000 |
commit | 62ac0b014df4df46bfc0169a718c8d3a1b585a83 (patch) | |
tree | fe73f735c7a14f3a29355e9f645eb9a751b92d86 | |
parent | 79e7b305577acb4af65ab8f80e71fb0f744e92f6 (diff) | |
download | ffmpeg-62ac0b014df4df46bfc0169a718c8d3a1b585a83.tar.gz |
16bpp code for atmos
Originally committed as revision 2230 to svn://svn.mplayerhq.hu/mplayer/trunk/postproc
-rw-r--r-- | postproc/swscale.c | 10 | ||||
-rw-r--r-- | postproc/swscale_template.c | 10 |
2 files changed, 20 insertions, 0 deletions
diff --git a/postproc/swscale.c b/postproc/swscale.c index b761564aa5..20eaa675b7 100644 --- a/postproc/swscale.c +++ b/postproc/swscale.c @@ -96,9 +96,19 @@ static int s_last_ypos; int Y=yuvtab_2568[((buf0[i]*yalpha1+buf1[i]*yalpha)>>16)]; int U=((uvbuf0[i]*uvalpha1+uvbuf1[i]*uvalpha)>>16); int V=((uvbuf0[i+2048]*uvalpha1+uvbuf1[i+2048]*uvalpha)>>16); +#if 1 + // 24/32 bpp dest[0]=clip_table[((Y + yuvtab_3343[U]) >>13)]; dest[1]=clip_table[((Y + yuvtab_0c92[V] + yuvtab_1a1e[U]) >>13)]; 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 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 +#endif dest+=dstbpp; } diff --git a/postproc/swscale_template.c b/postproc/swscale_template.c index b761564aa5..20eaa675b7 100644 --- a/postproc/swscale_template.c +++ b/postproc/swscale_template.c @@ -96,9 +96,19 @@ static int s_last_ypos; int Y=yuvtab_2568[((buf0[i]*yalpha1+buf1[i]*yalpha)>>16)]; int U=((uvbuf0[i]*uvalpha1+uvbuf1[i]*uvalpha)>>16); int V=((uvbuf0[i+2048]*uvalpha1+uvbuf1[i+2048]*uvalpha)>>16); +#if 1 + // 24/32 bpp dest[0]=clip_table[((Y + yuvtab_3343[U]) >>13)]; dest[1]=clip_table[((Y + yuvtab_0c92[V] + yuvtab_1a1e[U]) >>13)]; 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 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 +#endif dest+=dstbpp; } |