Mercurial > mplayer.hg
diff postproc/rgb2rgb_template.c @ 5588:f0fa3373f616
yuv422p -> yuy2 (untested)
author | michael |
---|---|
date | Sat, 13 Apr 2002 02:21:12 +0000 |
parents | 21bd4b32abb4 |
children | f4f3cfcd0d64 |
line wrap: on
line diff
--- a/postproc/rgb2rgb_template.c Sat Apr 13 02:17:43 2002 +0000 +++ b/postproc/rgb2rgb_template.c Sat Apr 13 02:21:12 2002 +0000 @@ -638,14 +638,9 @@ } } -/** - * - * 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) - */ -static inline void RENAME(yv12toyuy2)(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *dst, +static inline void RENAME(yuvPlanartoyuy2)(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *dst, unsigned int width, unsigned int height, - unsigned int lumStride, unsigned int chromStride, unsigned int dstStride) + unsigned int lumStride, unsigned int chromStride, unsigned int dstStride, int vertLumPerChroma) { int y; const int chromWidth= width>>1; @@ -696,7 +691,7 @@ dst[4*i+3] = vsrc[i]; } #endif - if(y&1) + if((y&(vertLumPerChroma-1))==(vertLumPerChroma-1) ) { usrc += chromStride; vsrc += chromStride; @@ -716,6 +711,30 @@ * 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) */ +static inline void RENAME(yv12toyuy2)(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *dst, + unsigned int width, unsigned int height, + unsigned int lumStride, unsigned int chromStride, unsigned int dstStride) +{ + //FIXME interpolate chroma + RENAME(yuvPlanartoyuy2)(ysrc, usrc, vsrc, dst, width, height, lumStride, chromStride, dstStride, 2); +} + +/** + * + * width should be a multiple of 16 + */ +static inline void RENAME(yuv422ptoyuy2)(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *dst, + unsigned int width, unsigned int height, + unsigned int lumStride, unsigned int chromStride, unsigned int dstStride) +{ + RENAME(yuvPlanartoyuy2)(ysrc, usrc, vsrc, dst, width, height, lumStride, chromStride, dstStride, 1); +} + +/** + * + * 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) + */ static inline void RENAME(yuy2toyv12)(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)