Mercurial > mplayer.hg
annotate libswscale/x86/yuv2rgb_template2.c @ 31124:b11e3ae960ac
13% faster yuv420 to rgb15 mmx.
It is now faster than the old gpl version on conroe.
author | lorenm |
---|---|
date | Wed, 19 May 2010 13:31:11 +0000 |
parents | b3c85aa7adbf |
children |
rev | line source |
---|---|
31078
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
1 /* |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
2 * software YUV to RGB converter |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
3 * |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
4 * Copyright (C) 2001-2007 Michael Niedermayer |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
5 * (c) 2010 Konstantin Shishkov |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
6 * |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
7 * This file is part of FFmpeg. |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
8 * |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
9 * FFmpeg is free software; you can redistribute it and/or |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
10 * modify it under the terms of the GNU Lesser General Public |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
11 * License as published by the Free Software Foundation; either |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
12 * version 2.1 of the License, or (at your option) any later version. |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
13 * |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
14 * FFmpeg is distributed in the hope that it will be useful, |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
17 * Lesser General Public License for more details. |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
18 * |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
19 * You should have received a copy of the GNU Lesser General Public |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
20 * License along with FFmpeg; if not, write to the Free Software |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
22 */ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
23 |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
24 #undef MOVNTQ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
25 #undef EMMS |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
26 #undef SFENCE |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
27 |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
28 #if HAVE_AMD3DNOW |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
29 /* On K6 femms is faster than emms. On K7 femms is directly mapped to emms. */ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
30 #define EMMS "femms" |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
31 #else |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
32 #define EMMS "emms" |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
33 #endif |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
34 |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
35 #if HAVE_MMX2 |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
36 #define MOVNTQ "movntq" |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
37 #define SFENCE "sfence" |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
38 #else |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
39 #define MOVNTQ "movq" |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
40 #define SFENCE " # nop" |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
41 #endif |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
42 |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
43 #define REG_BLUE "0" |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
44 #define REG_RED "1" |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
45 #define REG_GREEN "2" |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
46 #define REG_ALPHA "3" |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
47 |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
48 #define YUV2RGB_LOOP(depth) \ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
49 h_size = (c->dstW + 7) & ~7; \ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
50 if (h_size * depth > FFABS(dstStride[0])) \ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
51 h_size -= 8; \ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
52 \ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
53 if (c->srcFormat == PIX_FMT_YUV422P) { \ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
54 srcStride[1] *= 2; \ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
55 srcStride[2] *= 2; \ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
56 } \ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
57 \ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
58 __asm__ volatile ("pxor %mm4, %mm4\n\t"); \ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
59 for (y = 0; y < srcSliceH; y++) { \ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
60 uint8_t *image = dst[0] + (y + srcSliceY) * dstStride[0]; \ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
61 const uint8_t *py = src[0] + y * srcStride[0]; \ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
62 const uint8_t *pu = src[1] + (y >> 1) * srcStride[1]; \ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
63 const uint8_t *pv = src[2] + (y >> 1) * srcStride[2]; \ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
64 x86_reg index = -h_size / 2; \ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
65 |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
66 #define YUV2RGB_INITIAL_LOAD \ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
67 __asm__ volatile ( \ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
68 "movq (%5, %0, 2), %%mm6\n\t" \ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
69 "movd (%2, %0), %%mm0\n\t" \ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
70 "movd (%3, %0), %%mm1\n\t" \ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
71 "1: \n\t" \ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
72 |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
73 /* YUV2RGB core |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
74 * Conversion is performed in usual way: |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
75 * R = Y' * Ycoef + Vred * V' |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
76 * G = Y' * Ycoef + Vgreen * V' + Ugreen * U' |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
77 * B = Y' * Ycoef + Ublue * U' |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
78 * |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
79 * where X' = X * 8 - Xoffset (multiplication is performed to increase |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
80 * precision a bit). |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
81 * Since it operates in YUV420 colorspace, Y component is additionally |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
82 * split into Y1 and Y2 for even and odd pixels. |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
83 * |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
84 * Input: |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
85 * mm0 - U (4 elems), mm1 - V (4 elems), mm6 - Y (8 elems), mm4 - zero register |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
86 * Output: |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
87 * mm1 - R, mm2 - G, mm0 - B |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
88 */ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
89 #define YUV2RGB \ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
90 /* convert Y, U, V into Y1', Y2', U', V' */ \ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
91 "movq %%mm6, %%mm7\n\t" \ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
92 "punpcklbw %%mm4, %%mm0\n\t" \ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
93 "punpcklbw %%mm4, %%mm1\n\t" \ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
94 "pand "MANGLE(mmx_00ffw)", %%mm6\n\t" \ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
95 "psrlw $8, %%mm7\n\t" \ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
96 "psllw $3, %%mm0\n\t" \ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
97 "psllw $3, %%mm1\n\t" \ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
98 "psllw $3, %%mm6\n\t" \ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
99 "psllw $3, %%mm7\n\t" \ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
100 "psubsw "U_OFFSET"(%4), %%mm0\n\t" \ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
101 "psubsw "V_OFFSET"(%4), %%mm1\n\t" \ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
102 "psubw "Y_OFFSET"(%4), %%mm6\n\t" \ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
103 "psubw "Y_OFFSET"(%4), %%mm7\n\t" \ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
104 \ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
105 /* multiply by coefficients */ \ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
106 "movq %%mm0, %%mm2\n\t" \ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
107 "movq %%mm1, %%mm3\n\t" \ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
108 "pmulhw "UG_COEFF"(%4), %%mm2\n\t" \ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
109 "pmulhw "VG_COEFF"(%4), %%mm3\n\t" \ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
110 "pmulhw "Y_COEFF" (%4), %%mm6\n\t" \ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
111 "pmulhw "Y_COEFF" (%4), %%mm7\n\t" \ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
112 "pmulhw "UB_COEFF"(%4), %%mm0\n\t" \ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
113 "pmulhw "VR_COEFF"(%4), %%mm1\n\t" \ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
114 "paddsw %%mm3, %%mm2\n\t" \ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
115 /* now: mm0 = UB, mm1 = VR, mm2 = CG */ \ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
116 /* mm6 = Y1, mm7 = Y2 */ \ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
117 \ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
118 /* produce RGB */ \ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
119 "movq %%mm7, %%mm3\n\t" \ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
120 "movq %%mm7, %%mm5\n\t" \ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
121 "paddsw %%mm0, %%mm3\n\t" \ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
122 "paddsw %%mm1, %%mm5\n\t" \ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
123 "paddsw %%mm2, %%mm7\n\t" \ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
124 "paddsw %%mm6, %%mm0\n\t" \ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
125 "paddsw %%mm6, %%mm1\n\t" \ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
126 "paddsw %%mm6, %%mm2\n\t" \ |
31123 | 127 |
128 #define RGB_PACK_INTERLEAVE \ | |
31078
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
129 /* pack and interleave even/odd pixels */ \ |
31123 | 130 "packuswb %%mm1, %%mm0\n\t" \ |
131 "packuswb %%mm5, %%mm3\n\t" \ | |
31078
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
132 "packuswb %%mm2, %%mm2\n\t" \ |
31123 | 133 "movq %%mm0, %%mm1\n\n" \ |
31078
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
134 "packuswb %%mm7, %%mm7\n\t" \ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
135 "punpcklbw %%mm3, %%mm0\n\t" \ |
31123 | 136 "punpckhbw %%mm3, %%mm1\n\t" \ |
31078
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
137 "punpcklbw %%mm7, %%mm2\n\t" \ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
138 |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
139 #define YUV2RGB_ENDLOOP(depth) \ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
140 "movq 8 (%5, %0, 2), %%mm6\n\t" \ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
141 "movd 4 (%3, %0), %%mm1\n\t" \ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
142 "movd 4 (%2, %0), %%mm0\n\t" \ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
143 "add $"AV_STRINGIFY(depth * 8)", %1\n\t" \ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
144 "add $4, %0\n\t" \ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
145 "js 1b\n\t" \ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
146 |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
147 #define YUV2RGB_OPERANDS \ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
148 : "+r" (index), "+r" (image) \ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
149 : "r" (pu - index), "r" (pv - index), "r"(&c->redDither), \ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
150 "r" (py - 2*index) \ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
151 ); \ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
152 } \ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
153 |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
154 #define YUV2RGB_OPERANDS_ALPHA \ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
155 : "+r" (index), "+r" (image) \ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
156 : "r" (pu - index), "r" (pv - index), "r"(&c->redDither), \ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
157 "r" (py - 2*index), "r" (pa - 2*index) \ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
158 ); \ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
159 } \ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
160 |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
161 #define YUV2RGB_ENDFUNC \ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
162 __asm__ volatile (SFENCE"\n\t"EMMS); \ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
163 return srcSliceH; \ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
164 |
31124 | 165 #define IF0(x) |
166 #define IF1(x) x | |
31078
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
167 |
31124 | 168 #define RGB_PACK16(gmask, is15) \ |
31078
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
169 "pand "MANGLE(mmx_redmask)", %%mm0\n\t" \ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
170 "pand "MANGLE(mmx_redmask)", %%mm1\n\t" \ |
31124 | 171 "movq %%mm2, %%mm3\n\t" \ |
172 "psllw $"AV_STRINGIFY(3-is15)", %%mm2\n\t" \ | |
173 "psrlw $"AV_STRINGIFY(5+is15)", %%mm3\n\t" \ | |
31078
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
174 "psrlw $3, %%mm0\n\t" \ |
31124 | 175 IF##is15("psrlw $1, %%mm1\n\t") \ |
176 "pand "MANGLE(pb_e0)", %%mm2\n\t" \ | |
177 "pand "MANGLE(gmask)", %%mm3\n\t" \ | |
31078
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
178 "por %%mm2, %%mm0\n\t" \ |
31124 | 179 "por %%mm3, %%mm1\n\t" \ |
180 "movq %%mm0, %%mm2\n\t" \ | |
181 "punpcklbw %%mm1, %%mm0\n\t" \ | |
182 "punpckhbw %%mm1, %%mm2\n\t" \ | |
31078
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
183 MOVNTQ " %%mm0, (%1)\n\t" \ |
31124 | 184 MOVNTQ " %%mm2, 8(%1)\n\t" \ |
31078
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
185 |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
186 #define DITHER_RGB \ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
187 "paddusb "BLUE_DITHER"(%4), %%mm0\n\t" \ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
188 "paddusb "GREEN_DITHER"(%4), %%mm2\n\t" \ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
189 "paddusb "RED_DITHER"(%4), %%mm1\n\t" \ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
190 |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
191 static inline int RENAME(yuv420_rgb15)(SwsContext *c, const uint8_t *src[], |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
192 int srcStride[], |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
193 int srcSliceY, int srcSliceH, |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
194 uint8_t *dst[], int dstStride[]) |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
195 { |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
196 int y, h_size; |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
197 |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
198 YUV2RGB_LOOP(2) |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
199 |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
200 #ifdef DITHER1XBPP |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
201 c->blueDither = ff_dither8[y & 1]; |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
202 c->greenDither = ff_dither8[y & 1]; |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
203 c->redDither = ff_dither8[(y + 1) & 1]; |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
204 #endif |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
205 |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
206 YUV2RGB_INITIAL_LOAD |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
207 YUV2RGB |
31123 | 208 RGB_PACK_INTERLEAVE |
31078
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
209 #ifdef DITHER1XBPP |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
210 DITHER_RGB |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
211 #endif |
31124 | 212 RGB_PACK16(pb_03, 1) |
31078
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
213 |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
214 YUV2RGB_ENDLOOP(2) |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
215 YUV2RGB_OPERANDS |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
216 YUV2RGB_ENDFUNC |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
217 } |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
218 |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
219 static inline int RENAME(yuv420_rgb16)(SwsContext *c, const uint8_t *src[], |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
220 int srcStride[], |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
221 int srcSliceY, int srcSliceH, |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
222 uint8_t *dst[], int dstStride[]) |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
223 { |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
224 int y, h_size; |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
225 |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
226 YUV2RGB_LOOP(2) |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
227 |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
228 #ifdef DITHER1XBPP |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
229 c->blueDither = ff_dither8[y & 1]; |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
230 c->greenDither = ff_dither4[y & 1]; |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
231 c->redDither = ff_dither8[(y + 1) & 1]; |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
232 #endif |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
233 |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
234 YUV2RGB_INITIAL_LOAD |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
235 YUV2RGB |
31123 | 236 RGB_PACK_INTERLEAVE |
31078
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
237 #ifdef DITHER1XBPP |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
238 DITHER_RGB |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
239 #endif |
31124 | 240 RGB_PACK16(pb_07, 0) |
31078
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
241 |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
242 YUV2RGB_ENDLOOP(2) |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
243 YUV2RGB_OPERANDS |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
244 YUV2RGB_ENDFUNC |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
245 } |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
246 |
31123 | 247 #define RGB_PACK24(blue, red)\ |
248 "packuswb %%mm3, %%mm0 \n" /* R0 R2 R4 R6 R1 R3 R5 R7 */\ | |
249 "packuswb %%mm5, %%mm1 \n" /* B0 B2 B4 B6 B1 B3 B5 B7 */\ | |
250 "packuswb %%mm7, %%mm2 \n" /* G0 G2 G4 G6 G1 G3 G5 G7 */\ | |
251 "movq %%mm"red", %%mm3 \n"\ | |
252 "movq %%mm"blue", %%mm6 \n"\ | |
253 "psrlq $32, %%mm"red" \n" /* R1 R3 R5 R7 */\ | |
254 "punpcklbw %%mm2, %%mm3 \n" /* R0 G0 R2 G2 R4 G4 R6 G6 */\ | |
255 "punpcklbw %%mm"red", %%mm6 \n" /* B0 R1 B2 R3 B4 R5 B6 R7 */\ | |
256 "movq %%mm3, %%mm5 \n"\ | |
257 "punpckhbw %%mm"blue", %%mm2 \n" /* G1 B1 G3 B3 G5 B5 G7 B7Â */\ | |
258 "punpcklwd %%mm6, %%mm3 \n" /* R0 G0 B0 R1 R2 G2 B2 R3 */\ | |
259 "punpckhwd %%mm6, %%mm5 \n" /* R4 G4 B4 R5 R6 G6 B6 R7 */\ | |
260 RGB_PACK24_B | |
31078
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
261 |
31123 | 262 #if HAVE_MMX2 |
263 DECLARE_ASM_CONST(8, int16_t, mask1101[4]) = {-1,-1, 0,-1}; | |
264 DECLARE_ASM_CONST(8, int16_t, mask0010[4]) = { 0, 0,-1, 0}; | |
265 DECLARE_ASM_CONST(8, int16_t, mask0110[4]) = { 0,-1,-1, 0}; | |
266 DECLARE_ASM_CONST(8, int16_t, mask1001[4]) = {-1, 0, 0,-1}; | |
267 DECLARE_ASM_CONST(8, int16_t, mask0100[4]) = { 0,-1, 0, 0}; | |
268 #undef RGB_PACK24_B | |
269 #define RGB_PACK24_B\ | |
270 "pshufw $0xc6, %%mm2, %%mm1 \n"\ | |
271 "pshufw $0x84, %%mm3, %%mm6 \n"\ | |
272 "pshufw $0x38, %%mm5, %%mm7 \n"\ | |
273 "pand "MANGLE(mask1101)", %%mm6 \n" /* R0 G0 B0 R1 -- -- R2 G2 */\ | |
274 "movq %%mm1, %%mm0 \n"\ | |
275 "pand "MANGLE(mask0110)", %%mm7 \n" /* -- -- R6 G6 B6 R7 -- -- */\ | |
276 "movq %%mm1, %%mm2 \n"\ | |
277 "pand "MANGLE(mask0100)", %%mm1 \n" /* -- -- G3 B3 -- -- -- -- */\ | |
278 "psrlq $48, %%mm3 \n" /* B2 R3 -- -- -- -- -- -- */\ | |
279 "pand "MANGLE(mask0010)", %%mm0 \n" /* -- -- -- -- G1 B1 -- -- */\ | |
280 "psllq $32, %%mm5 \n" /* -- -- -- -- R4 G4 B4 R5 */\ | |
281 "pand "MANGLE(mask1001)", %%mm2 \n" /* G5 B5 -- -- -- -- G7 B7 */\ | |
282 "por %%mm3, %%mm1 \n"\ | |
283 "por %%mm6, %%mm0 \n"\ | |
284 "por %%mm5, %%mm1 \n"\ | |
285 "por %%mm7, %%mm2 \n"\ | |
286 MOVNTQ" %%mm0, (%1) \n"\ | |
287 MOVNTQ" %%mm1, 8(%1) \n"\ | |
288 MOVNTQ" %%mm2, 16(%1) \n"\ | |
289 | |
290 #else | |
291 #undef RGB_PACK24_B | |
292 #define RGB_PACK24_B\ | |
293 "movd %%mm3, (%1) \n" /* R0 G0 B0 R1 */\ | |
294 "movd %%mm2, 4(%1) \n" /* G1 B1 */\ | |
295 "psrlq $32, %%mm3 \n"\ | |
296 "psrlq $16, %%mm2 \n"\ | |
297 "movd %%mm3, 6(%1) \n" /* R2 G2 B2 R3 */\ | |
298 "movd %%mm2, 10(%1) \n" /* G3 B3 */\ | |
299 "psrlq $16, %%mm2 \n"\ | |
300 "movd %%mm5, 12(%1) \n" /* R4 G4 B4 R5 */\ | |
301 "movd %%mm2, 16(%1) \n" /* G5 B5 */\ | |
302 "psrlq $32, %%mm5 \n"\ | |
303 "movd %%mm2, 20(%1) \n" /* -- -- G7 B7 */\ | |
304 "movd %%mm5, 18(%1) \n" /* R6 G6 B6 R7 */\ | |
305 | |
306 #endif | |
31078
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
307 |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
308 static inline int RENAME(yuv420_rgb24)(SwsContext *c, const uint8_t *src[], |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
309 int srcStride[], |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
310 int srcSliceY, int srcSliceH, |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
311 uint8_t *dst[], int dstStride[]) |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
312 { |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
313 int y, h_size; |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
314 |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
315 YUV2RGB_LOOP(3) |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
316 |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
317 YUV2RGB_INITIAL_LOAD |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
318 YUV2RGB |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
319 RGB_PACK24(REG_BLUE, REG_RED) |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
320 |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
321 YUV2RGB_ENDLOOP(3) |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
322 YUV2RGB_OPERANDS |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
323 YUV2RGB_ENDFUNC |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
324 } |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
325 |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
326 static inline int RENAME(yuv420_bgr24)(SwsContext *c, const uint8_t *src[], |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
327 int srcStride[], |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
328 int srcSliceY, int srcSliceH, |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
329 uint8_t *dst[], int dstStride[]) |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
330 { |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
331 int y, h_size; |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
332 |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
333 YUV2RGB_LOOP(3) |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
334 |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
335 YUV2RGB_INITIAL_LOAD |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
336 YUV2RGB |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
337 RGB_PACK24(REG_RED, REG_BLUE) |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
338 |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
339 YUV2RGB_ENDLOOP(3) |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
340 YUV2RGB_OPERANDS |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
341 YUV2RGB_ENDFUNC |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
342 } |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
343 |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
344 |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
345 #define SET_EMPTY_ALPHA \ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
346 "pcmpeqd %%mm"REG_ALPHA", %%mm"REG_ALPHA"\n\t" /* set alpha to 0xFF */ \ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
347 |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
348 #define LOAD_ALPHA \ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
349 "movq (%6, %0, 2), %%mm"REG_ALPHA"\n\t" \ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
350 |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
351 #define RGB_PACK32(red, green, blue, alpha) \ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
352 "movq %%mm"blue", %%mm5\n\t" \ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
353 "movq %%mm"red", %%mm6\n\t" \ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
354 "punpckhbw %%mm"green", %%mm5\n\t" \ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
355 "punpcklbw %%mm"green", %%mm"blue"\n\t" \ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
356 "punpckhbw %%mm"alpha", %%mm6\n\t" \ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
357 "punpcklbw %%mm"alpha", %%mm"red"\n\t" \ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
358 "movq %%mm"blue", %%mm"green"\n\t" \ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
359 "movq %%mm5, %%mm"alpha"\n\t" \ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
360 "punpcklwd %%mm"red", %%mm"blue"\n\t" \ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
361 "punpckhwd %%mm"red", %%mm"green"\n\t" \ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
362 "punpcklwd %%mm6, %%mm5\n\t" \ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
363 "punpckhwd %%mm6, %%mm"alpha"\n\t" \ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
364 MOVNTQ " %%mm"blue", 0(%1)\n\t" \ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
365 MOVNTQ " %%mm"green", 8(%1)\n\t" \ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
366 MOVNTQ " %%mm5, 16(%1)\n\t" \ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
367 MOVNTQ " %%mm"alpha", 24(%1)\n\t" \ |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
368 |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
369 static inline int RENAME(yuv420_rgb32)(SwsContext *c, const uint8_t *src[], |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
370 int srcStride[], |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
371 int srcSliceY, int srcSliceH, |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
372 uint8_t *dst[], int dstStride[]) |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
373 { |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
374 int y, h_size; |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
375 |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
376 YUV2RGB_LOOP(4) |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
377 |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
378 YUV2RGB_INITIAL_LOAD |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
379 YUV2RGB |
31123 | 380 RGB_PACK_INTERLEAVE |
31078
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
381 SET_EMPTY_ALPHA |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
382 RGB_PACK32(REG_RED, REG_GREEN, REG_BLUE, REG_ALPHA) |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
383 |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
384 YUV2RGB_ENDLOOP(4) |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
385 YUV2RGB_OPERANDS |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
386 YUV2RGB_ENDFUNC |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
387 } |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
388 |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
389 static inline int RENAME(yuva420_rgb32)(SwsContext *c, const uint8_t *src[], |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
390 int srcStride[], |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
391 int srcSliceY, int srcSliceH, |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
392 uint8_t *dst[], int dstStride[]) |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
393 { |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
394 #if HAVE_7REGS |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
395 int y, h_size; |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
396 |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
397 YUV2RGB_LOOP(4) |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
398 |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
399 const uint8_t *pa = src[3] + y * srcStride[3]; |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
400 YUV2RGB_INITIAL_LOAD |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
401 YUV2RGB |
31123 | 402 RGB_PACK_INTERLEAVE |
31078
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
403 LOAD_ALPHA |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
404 RGB_PACK32(REG_RED, REG_GREEN, REG_BLUE, REG_ALPHA) |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
405 |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
406 YUV2RGB_ENDLOOP(4) |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
407 YUV2RGB_OPERANDS_ALPHA |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
408 YUV2RGB_ENDFUNC |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
409 #endif |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
410 } |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
411 |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
412 static inline int RENAME(yuv420_bgr32)(SwsContext *c, const uint8_t *src[], |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
413 int srcStride[], |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
414 int srcSliceY, int srcSliceH, |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
415 uint8_t *dst[], int dstStride[]) |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
416 { |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
417 int y, h_size; |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
418 |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
419 YUV2RGB_LOOP(4) |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
420 |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
421 YUV2RGB_INITIAL_LOAD |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
422 YUV2RGB |
31123 | 423 RGB_PACK_INTERLEAVE |
31078
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
424 SET_EMPTY_ALPHA |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
425 RGB_PACK32(REG_BLUE, REG_GREEN, REG_RED, REG_ALPHA) |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
426 |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
427 YUV2RGB_ENDLOOP(4) |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
428 YUV2RGB_OPERANDS |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
429 YUV2RGB_ENDFUNC |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
430 } |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
431 |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
432 static inline int RENAME(yuva420_bgr32)(SwsContext *c, const uint8_t *src[], |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
433 int srcStride[], |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
434 int srcSliceY, int srcSliceH, |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
435 uint8_t *dst[], int dstStride[]) |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
436 { |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
437 #if HAVE_7REGS |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
438 int y, h_size; |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
439 |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
440 YUV2RGB_LOOP(4) |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
441 |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
442 const uint8_t *pa = src[3] + y * srcStride[3]; |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
443 YUV2RGB_INITIAL_LOAD |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
444 YUV2RGB |
31123 | 445 RGB_PACK_INTERLEAVE |
31078
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
446 LOAD_ALPHA |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
447 RGB_PACK32(REG_BLUE, REG_GREEN, REG_RED, REG_ALPHA) |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
448 |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
449 YUV2RGB_ENDLOOP(4) |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
450 YUV2RGB_OPERANDS_ALPHA |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
451 YUV2RGB_ENDFUNC |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
452 #endif |
6502a6b24f9b
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
diego
parents:
diff
changeset
|
453 } |