mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-02-04 06:08:26 +02:00
remove the need of one extra shift in rgb16ToUV
Originally committed as revision 23281 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
This commit is contained in:
parent
686dcc1167
commit
fa88429489
@ -2229,13 +2229,10 @@ static inline void RENAME(rgb16ToUV)(uint8_t *dstU, uint8_t *dstV, uint8_t *src1
|
|||||||
int d0= ((uint32_t*)src1)[i];
|
int d0= ((uint32_t*)src1)[i];
|
||||||
|
|
||||||
int dl= (d0&0x07E0F81F);
|
int dl= (d0&0x07E0F81F);
|
||||||
int dh= ((d0>>5)&0x07C0F83F);
|
int d= dl + (((d0>>16) + (d0<<16))&0x07E0F81F);
|
||||||
|
|
||||||
int dh2= (dh>>11) + (dh<<21);
|
int r= d&0x3F;
|
||||||
int d= dh2 + dl;
|
int b= (d>>11)&0x3F;
|
||||||
|
|
||||||
int r= d&0x7F;
|
|
||||||
int b= (d>>11)&0x7F;
|
|
||||||
int g= d>>21;
|
int g= d>>21;
|
||||||
dstU[i]= ((2*RU*r + GU*g + 2*BU*b)>>(RGB2YUV_SHIFT+1-2)) + 128;
|
dstU[i]= ((2*RU*r + GU*g + 2*BU*b)>>(RGB2YUV_SHIFT+1-2)) + 128;
|
||||||
dstV[i]= ((2*RV*r + GV*g + 2*BV*b)>>(RGB2YUV_SHIFT+1-2)) + 128;
|
dstV[i]= ((2*RV*r + GV*g + 2*BV*b)>>(RGB2YUV_SHIFT+1-2)) + 128;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user