mirror of https://github.com/FFmpeg/FFmpeg.git
Originally committed as revision 2505 to svn://svn.mplayerhq.hu/mplayer/trunk/postprocpull/126/head
parent
390b20a6c9
commit
b234ae818b
4 changed files with 49 additions and 1 deletions
@ -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; |
||||
} |
||||
} |
@ -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 |
@ -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; |
||||
} |
||||
} |
Loading…
Reference in new issue