From 2f599efbff7285921d6c7b369a1e6309803f196d Mon Sep 17 00:00:00 2001 From: michael Date: Fri, 8 Feb 2002 01:24:02 +0000 Subject: faster bgr16 input git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@4580 b3059339-0415-0410-9bf9-f77b7e298cf2 --- postproc/swscale_template.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/postproc/swscale_template.c b/postproc/swscale_template.c index d7173b4fe1..3129c48369 100644 --- a/postproc/swscale_template.c +++ b/postproc/swscale_template.c @@ -1685,7 +1685,20 @@ static inline void RENAME(bgr16ToUV)(uint8_t *dstU, uint8_t *dstV, uint8_t *src1 int i; for(i=0; i>5)&0x07C0F83F) + ((d1>>5)&0x07C0F83F); + + int dh2= (dh>>11) + (dh<<21); + int d= dh2 + dl; + + int b= d&0x7F; + int r= (d>>11)&0x7F; + int g= d>>21; +#else int d0= src1[i*4] + (src1[i*4+1]<<8); int b0= d0&0x1F; int g0= (d0>>5)&0x3F; @@ -1709,7 +1722,7 @@ static inline void RENAME(bgr16ToUV)(uint8_t *dstU, uint8_t *dstV, uint8_t *src1 int b= b0 + b1 + b2 + b3; int g= g0 + g1 + g2 + g3; int r= r0 + r1 + r2 + r3; - +#endif dstU[i]= ((2*RU*r + GU*g + 2*BU*b)>>(RGB2YUV_SHIFT+2-2)) + 128; dstV[i]= ((2*RV*r + GV*g + 2*BV*b)>>(RGB2YUV_SHIFT+2-2)) + 128; } -- cgit v1.2.3