summaryrefslogtreecommitdiffstats
path: root/postproc/swscale.c
diff options
context:
space:
mode:
authormichael <michael@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-02-09 17:03:53 +0000
committermichael <michael@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-02-09 17:03:53 +0000
commit5fb0523722a970d05f3ae89908c4af452210cfdf (patch)
tree19e9ebbea8973c42703c990b33ecabf72d1a455e /postproc/swscale.c
parent78e63e9314cfbdd5c9bc6c694c84df43db8e6098 (diff)
downloadmpv-5fb0523722a970d05f3ae89908c4af452210cfdf.tar.bz2
mpv-5fb0523722a970d05f3ae89908c4af452210cfdf.tar.xz
bgr24toY in MMX
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@4613 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'postproc/swscale.c')
-rw-r--r--postproc/swscale.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/postproc/swscale.c b/postproc/swscale.c
index 511b10c317..dbd381c943 100644
--- a/postproc/swscale.c
+++ b/postproc/swscale.c
@@ -68,6 +68,8 @@ untested special converters
//#undef ARCH_X86
#define DITHER1XBPP
+#define FAST_BGR2YV12 // use 7 bit coeffs instead of 15bit
+
#define RET 0xC3 //near return opcode for X86
#ifdef MP_DEBUG
@@ -178,6 +180,14 @@ static uint64_t __attribute__((aligned(8))) M24A= 0x00FF0000FF0000FFLL;
static uint64_t __attribute__((aligned(8))) M24B= 0xFF0000FF0000FF00LL;
static uint64_t __attribute__((aligned(8))) M24C= 0x0000FF0000FF0000LL;
+#ifdef FAST_BGR2YV12
+static const uint64_t bgr2YCoeff __attribute__((aligned(8))) = 0x000000210041000DULL;
+#else
+static const uint64_t bgr2YCoeff __attribute__((aligned(8))) = 0x000020E540830C8BULL;
+#endif
+static const uint64_t bgr2YOffset __attribute__((aligned(8))) = 0x1010101010101010ULL;
+static const uint64_t w1111 __attribute__((aligned(8))) = 0x0001000100010001ULL;
+
// FIXME remove
static uint64_t __attribute__((aligned(8))) asm_yalpha1;
static uint64_t __attribute__((aligned(8))) asm_uvalpha1;