Commit 420fbbbf authored by nick's avatar nick

vo_vesa: more rgb2rgb support


git-svn-id: file:///var/local/repositories/mplayer/trunk/postproc@2506 b3059339-0415-0410-9bf9-f77b7e298cf2
parent 79547bbf
......@@ -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++;
}
}
/*
*
* rgb2rgb.h, Software RGB to RGB coverter
* rgb2rgb.h, Software RGB to RGB converter
*
*/
......@@ -8,5 +8,6 @@
#define RGB2RGB_INCLUDED
extern void rgb24to32(uint8_t *src,uint8_t *dst,uint32_t src_size);
extern void rgb32to24(uint8_t *src,uint8_t *dst,uint32_t src_size);
#endif
......@@ -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++;
}
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment