diff options
author | alex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-06-21 17:37:00 +0000 |
---|---|---|
committer | alex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-06-21 17:37:00 +0000 |
commit | b9cda2118464ce493e8280381c031bacd930b515 (patch) | |
tree | 7965e33618169e8e67094a5c94de56cca7f0495f /postproc/rgb2rgb_template.c | |
parent | fd68aff8f70065fbd8e35d85244c3806e243505d (diff) | |
download | mpv-b9cda2118464ce493e8280381c031bacd930b515.tar.bz2 mpv-b9cda2118464ce493e8280381c031bacd930b515.tar.xz |
pre-yvu9toyv12 converter, only grayscale Y-plane coping :)
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@6485 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'postproc/rgb2rgb_template.c')
-rw-r--r-- | postproc/rgb2rgb_template.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/postproc/rgb2rgb_template.c b/postproc/rgb2rgb_template.c index 9f0dc4e18c..9d59eabc70 100644 --- a/postproc/rgb2rgb_template.c +++ b/postproc/rgb2rgb_template.c @@ -244,6 +244,17 @@ static inline void RENAME(rgb15to16)(const uint8_t *src,uint8_t *dst,unsigned sr #endif } +static inline void RENAME(bgr24torgb24)(const uint8_t *src, uint8_t *dst, unsigned src_size) +{ + unsigned j,i,num_pixels=src_size/3; + for(i=0,j=0; j<num_pixels; i+=3,j+=3) + { + dst[j+0] = src[i+2]; + dst[j+1] = src[i+1]; + dst[j+2] = src[i+0]; + } +} + static inline void RENAME(rgb32to16)(const uint8_t *src, uint8_t *dst, unsigned src_size) { #ifdef HAVE_MMX @@ -853,6 +864,16 @@ asm volatile( EMMS" \n\t" #endif } +static inline void RENAME(yvu9toyv12)(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, + uint8_t *ydst, uint8_t *udst, uint8_t *vdst, + unsigned int width, unsigned int height, unsigned int lumStride, unsigned int chromStride) +{ + /* Y Plane */ + memcpy(ydst, ysrc, width*height); + + /* XXX: implement upscaling for U,V */ +} + /** * * height should be a multiple of 2 and width should be a multiple of 16 (if this is a |