diff options
author | nick <nick@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2001-10-28 10:17:57 +0000 |
---|---|---|
committer | nick <nick@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2001-10-28 10:17:57 +0000 |
commit | d6bed371d7742c5f9a3f934540212875d0e3bc4c (patch) | |
tree | bb6247639ac56326a4232fe325e646132755c01c /postproc | |
parent | 8bf53f6ddb006195ab10d918d5395e5b0e1eacbd (diff) | |
download | mpv-d6bed371d7742c5f9a3f934540212875d0e3bc4c.tar.bz2 mpv-d6bed371d7742c5f9a3f934540212875d0e3bc4c.tar.xz |
vo_vesa: rgb2rgb support
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@2505 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'postproc')
-rw-r--r-- | postproc/Makefile | 2 | ||||
-rw-r--r-- | postproc/rgb2rgb.c | 18 | ||||
-rw-r--r-- | postproc/rgb2rgb.h | 12 | ||||
-rw-r--r-- | postproc/rgb2rgb_template.c | 18 |
4 files changed, 49 insertions, 1 deletions
diff --git a/postproc/Makefile b/postproc/Makefile index 0bf51b6ff1..8d16b53650 100644 --- a/postproc/Makefile +++ b/postproc/Makefile @@ -3,7 +3,7 @@ include ../config.mak LIBNAME = libpostproc.a -SRCS=postprocess.c swscale.c +SRCS=postprocess.c swscale.c rgb2rgb.c OBJS=$(SRCS:.c=.o) CFLAGS = $(OPTFLAGS) -I. -I.. -Wall diff --git a/postproc/rgb2rgb.c b/postproc/rgb2rgb.c new file mode 100644 index 0000000000..1a71ba9dce --- /dev/null +++ b/postproc/rgb2rgb.c @@ -0,0 +1,18 @@ +#include <inttypes.h> +#include "../config.h" +#include "rgb2rgb.h" + +void rgb24to32(uint8_t *src,uint8_t *dst,uint32_t src_size) +{ + uint32_t *dest = (uint32_t *)dst; + uint8_t *s = src; + uint8_t *end; + end = s + src_size; + while(s < end) + { + uint32_t rgb0; + rgb0 = *(uint32_t *)s; + *dest++ = rgb0 & 0xFFFFFFUL; + s += 3; + } +} diff --git a/postproc/rgb2rgb.h b/postproc/rgb2rgb.h new file mode 100644 index 0000000000..4224487d32 --- /dev/null +++ b/postproc/rgb2rgb.h @@ -0,0 +1,12 @@ +/* + * + * rgb2rgb.h, Software RGB to RGB coverter + * + */ + +#ifndef RGB2RGB_INCLUDED +#define RGB2RGB_INCLUDED + +extern void rgb24to32(uint8_t *src,uint8_t *dst,uint32_t src_size); + +#endif diff --git a/postproc/rgb2rgb_template.c b/postproc/rgb2rgb_template.c new file mode 100644 index 0000000000..1a71ba9dce --- /dev/null +++ b/postproc/rgb2rgb_template.c @@ -0,0 +1,18 @@ +#include <inttypes.h> +#include "../config.h" +#include "rgb2rgb.h" + +void rgb24to32(uint8_t *src,uint8_t *dst,uint32_t src_size) +{ + uint32_t *dest = (uint32_t *)dst; + uint8_t *s = src; + uint8_t *end; + end = s + src_size; + while(s < end) + { + uint32_t rgb0; + rgb0 = *(uint32_t *)s; + *dest++ = rgb0 & 0xFFFFFFUL; + s += 3; + } +} |