From f7813a5324be39d13ab536c245d15dfc602a7849 Mon Sep 17 00:00:00 2001 From: Tim Redfern Date: Sun, 29 Dec 2013 12:19:38 +0000 Subject: basic type mechanism working --- ffmpeg/libswscale/x86/rgb2rgb_template.c | 89 ++++++++++++++++++++++---------- 1 file changed, 62 insertions(+), 27 deletions(-) (limited to 'ffmpeg/libswscale/x86/rgb2rgb_template.c') diff --git a/ffmpeg/libswscale/x86/rgb2rgb_template.c b/ffmpeg/libswscale/x86/rgb2rgb_template.c index d802ab4..d58219b 100644 --- a/ffmpeg/libswscale/x86/rgb2rgb_template.c +++ b/ffmpeg/libswscale/x86/rgb2rgb_template.c @@ -26,6 +26,8 @@ #include +#include "libavutil/attributes.h" + #undef PREFETCH #undef MOVNTQ #undef EMMS @@ -1610,10 +1612,15 @@ static inline void RENAME(uyvytoyv12)(const uint8_t *src, uint8_t *ydst, uint8_t * others are ignored in the C version. * FIXME: Write HQ version. */ +#if HAVE_7REGS static inline void RENAME(rgb24toyv12)(const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst, int width, int height, - int lumStride, int chromStride, int srcStride) + int lumStride, int chromStride, int srcStride, + int32_t *rgb2yuv) { +#define BGR2Y_IDX "16*4+16*32" +#define BGR2U_IDX "16*4+16*33" +#define BGR2V_IDX "16*4+16*34" int y; const x86_reg chromWidth= width>>1; for (y=0; y>1); + const int chromWidth = FF_CEIL_RSHIFT(width, 1); for (y=0; y>1); + const int chromWidth = FF_CEIL_RSHIFT(width, 1); for (y=0; y>1); + const int chromWidth = FF_CEIL_RSHIFT(width, 1); for (y=0; y>1); + const int chromWidth = FF_CEIL_RSHIFT(width, 1); for (y=0; y