From 81c0590e6c88b6c0752e52ef77e003cef3eaadf5 Mon Sep 17 00:00:00 2001 From: Arpi Date: Sat, 10 Nov 2001 23:28:10 +0000 Subject: [PATCH] uyvy->uv12 added Originally committed as revision 2802 to svn://svn.mplayerhq.hu/mplayer/trunk/postproc --- postproc/rgb2rgb.c | 38 +++++++++++++++++++++++++++++++++++++ postproc/rgb2rgb_template.c | 38 +++++++++++++++++++++++++++++++++++++ 2 files changed, 76 insertions(+) diff --git a/postproc/rgb2rgb.c b/postproc/rgb2rgb.c index 67f33de38b..2157de908f 100644 --- a/postproc/rgb2rgb.c +++ b/postproc/rgb2rgb.c @@ -813,3 +813,41 @@ asm( EMMS" \n\t" :::"memory"); #endif } + +/** + * + * height should be a multiple of 2 and width should be a multiple of 16 (if this is a + * problem for anyone then tell me, and ill fix it) + */ +void uyvytoyv12(const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst, + unsigned int width, unsigned int height, + unsigned int lumStride, unsigned int chromStride, unsigned int srcStride) +{ + int y; + const int chromWidth= width>>1; + for(y=0; y>1; + for(y=0; y