summaryrefslogtreecommitdiff
path: root/libswscale/x86/rgb2rgb.c
diff options
context:
space:
mode:
authorThemaister <maister@archlinux.us>2011-11-08 16:16:59 +0100
committerMichael Niedermayer <michaelni@gmx.at>2011-11-09 01:58:22 +0100
commit0827222b9cecc3bb07b07059716b81f644db9dcc (patch)
tree5171580dccdbe06adcfb5724f8e799999c964a86 /libswscale/x86/rgb2rgb.c
parent3bdfef31ac135add243f9ddde99d6b3cee953833 (diff)
downloadffmpeg-0827222b9cecc3bb07b07059716b81f644db9dcc.tar.gz
Use more accurate conversion for rgb15/16 to rgb24/32 (C/MMX).
Fate update by michael. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libswscale/x86/rgb2rgb.c')
-rw-r--r--libswscale/x86/rgb2rgb.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libswscale/x86/rgb2rgb.c b/libswscale/x86/rgb2rgb.c
index ed7f5adb74..9359f0b1f3 100644
--- a/libswscale/x86/rgb2rgb.c
+++ b/libswscale/x86/rgb2rgb.c
@@ -68,6 +68,9 @@ DECLARE_ASM_CONST(8, uint64_t, blue_16mask) = 0x0000001f0000001fULL;
DECLARE_ASM_CONST(8, uint64_t, red_15mask) = 0x00007c0000007c00ULL;
DECLARE_ASM_CONST(8, uint64_t, green_15mask) = 0x000003e0000003e0ULL;
DECLARE_ASM_CONST(8, uint64_t, blue_15mask) = 0x0000001f0000001fULL;
+DECLARE_ASM_CONST(8, uint64_t, mul15_mid) = 0x4200420042004200ULL;
+DECLARE_ASM_CONST(8, uint64_t, mul15_hi) = 0x0210021002100210ULL;
+DECLARE_ASM_CONST(8, uint64_t, mul16_mid) = 0x2080208020802080ULL;
#define RGB2YUV_SHIFT 8
#define BY ((int)( 0.098*(1<<RGB2YUV_SHIFT)+0.5))