aboutsummaryrefslogtreecommitdiffstats
path: root/libswscale/swscale.c
diff options
context:
space:
mode:
authorJanusz Krzysztofik <jkrzyszt@tis.icnet.pl>2010-03-18 23:02:32 +0000
committerCarl Eugen Hoyos <cehoyos@rainbow.studorg.tuwien.ac.at>2010-03-18 23:02:32 +0000
commit22e8222fd25d1f6ba967abd687cb98fe244f6e3b (patch)
treee5945b23317f0d9a8fcd7d54c73ee882f452ec8f /libswscale/swscale.c
parentd343d59837bb5131054282248df7eaaaa8c9ba1a (diff)
downloadffmpeg-22e8222fd25d1f6ba967abd687cb98fe244f6e3b.tar.gz
Extend the generic path of the yuv2rgb converter with support for rgb444
output format. Patch by Janusz Krzysztofik, jkrzyszt A tis D icnet D pl Originally committed as revision 30934 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
Diffstat (limited to 'libswscale/swscale.c')
-rw-r--r--libswscale/swscale.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/libswscale/swscale.c b/libswscale/swscale.c
index 3c278d571b..de6eec6a2d 100644
--- a/libswscale/swscale.c
+++ b/libswscale/swscale.c
@@ -39,7 +39,7 @@
/*
tested special converters (most are tested actually, but I did not write it down ...)
- YV12 -> BGR16
+ YV12 -> BGR12/BGR16
YV12 -> YV12
BGR15 -> BGR16
BGR16 -> BGR16
@@ -805,6 +805,23 @@ static inline void yuv2nv12XinC(const int16_t *lumFilter, const int16_t **lumSrc
}\
}\
break;\
+ case PIX_FMT_RGB444BE:\
+ case PIX_FMT_RGB444LE:\
+ case PIX_FMT_BGR444BE:\
+ case PIX_FMT_BGR444LE:\
+ {\
+ const int dr1= dither_4x4_16[y&3 ][0];\
+ const int dg1= dither_4x4_16[y&3 ][1];\
+ const int db1= dither_4x4_16[(y&3)^3][0];\
+ const int dr2= dither_4x4_16[y&3 ][1];\
+ const int dg2= dither_4x4_16[y&3 ][0];\
+ const int db2= dither_4x4_16[(y&3)^3][1];\
+ func(uint16_t,0)\
+ ((uint16_t*)dest)[i2+0]= r[Y1+dr1] + g[Y1+dg1] + b[Y1+db1];\
+ ((uint16_t*)dest)[i2+1]= r[Y2+dr2] + g[Y2+dg2] + b[Y2+db2];\
+ }\
+ }\
+ break;\
case PIX_FMT_RGB8:\
case PIX_FMT_BGR8:\
{\