summaryrefslogtreecommitdiff
path: root/postproc/rgb2rgb.c
diff options
context:
space:
mode:
authorNick Kurshev <nickols_k@mail.ru>2001-10-28 10:28:08 +0000
committerNick Kurshev <nickols_k@mail.ru>2001-10-28 10:28:08 +0000
commit59ac5a936ca7eab31c8422b934f1872e61612f6a (patch)
tree6eaea72d4015e1a28bd58c5ef933ab6bc663927d /postproc/rgb2rgb.c
parentb234ae818baabca22afed95b70fb5a3607dac0cc (diff)
vo_vesa: more rgb2rgb support
Originally committed as revision 2506 to svn://svn.mplayerhq.hu/mplayer/trunk/postproc
Diffstat (limited to 'postproc/rgb2rgb.c')
-rw-r--r--postproc/rgb2rgb.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/postproc/rgb2rgb.c b/postproc/rgb2rgb.c
index 1a71ba9dce..7e0a1e9917 100644
--- a/postproc/rgb2rgb.c
+++ b/postproc/rgb2rgb.c
@@ -2,6 +2,8 @@
#include "../config.h"
#include "rgb2rgb.h"
+/* TODO: MMX optimization */
+
void rgb24to32(uint8_t *src,uint8_t *dst,uint32_t src_size)
{
uint32_t *dest = (uint32_t *)dst;
@@ -16,3 +18,18 @@ void rgb24to32(uint8_t *src,uint8_t *dst,uint32_t src_size)
s += 3;
}
}
+
+void rgb32to24(uint8_t *src,uint8_t *dst,uint32_t src_size)
+{
+ uint8_t *dest = dst;
+ uint8_t *s = src;
+ uint8_t *end;
+ end = s + src_size;
+ while(s < end)
+ {
+ *dest++ = *s++;
+ *dest++ = *s++;
+ *dest++ = *s++;
+ s++;
+ }
+}