From e02775f59afb46e8d6a49b8ecf1071a88777aec0 Mon Sep 17 00:00:00 2001 From: michael Date: Thu, 27 Jun 2002 23:48:53 +0000 Subject: yvu9 -> yv12 unscaled converter with linear chroma scaling git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@6583 b3059339-0415-0410-9bf9-f77b7e298cf2 --- postproc/rgb2rgb_template.c | 89 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 89 insertions(+) (limited to 'postproc/rgb2rgb_template.c') diff --git a/postproc/rgb2rgb_template.c b/postproc/rgb2rgb_template.c index 015e7f2d56..b6c26a11ee 100644 --- a/postproc/rgb2rgb_template.c +++ b/postproc/rgb2rgb_template.c @@ -1295,6 +1295,95 @@ static inline void RENAME(yvu9toyv12)(const uint8_t *ysrc, const uint8_t *usrc, /* XXX: implement upscaling for U,V */ } +static inline void RENAME(planar2x)(const uint8_t *src, uint8_t *dst, int srcWidth, int srcHeight, int srcStride, int dstStride) +{ + int x,y; + + // first line + for(x=0; x>2; + dst[2*x+dstStride+2]= ( src[x+0] + 3*src[x+srcStride+1])>>2; + dst[2*x+dstStride+1]= ( src[x+1] + 3*src[x+srcStride ])>>2; + dst[2*x +2]= (3*src[x+1] + src[x+srcStride ])>>2; + } +#endif + dst[srcWidth*2 -1]= + dst[srcWidth*2 -1 + dstStride]= src[srcWidth-1]; + + dst+=dstStride*2; + src+=srcStride; + } + src-=srcStride; + + // last line + for(x=0; x