1
/*****************************************************************
5
Copyright (c) 2001 by Burkhard Plaum - plaum@ipf.uni-stuttgart.de
7
http://gmerlin.sourceforge.net
9
This program is distributed in the hope that it will be useful,
10
but WITHOUT ANY WARRANTY; without even the implied warranty of
11
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
GNU General Public License for more details.
14
You should have received a copy of the GNU General Public License
15
along with this program; if not, write to the Free Software
16
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
18
*****************************************************************/
22
* this macro procudes another set of
23
* functions in ../mmxext
27
#define MOVQ_R2M(reg,mem) movntq_r2m(reg, mem)
29
#define MOVQ_R2M(reg,mem) movq_r2m(reg, mem)
33
/* Constants for YUV -> RGB conversion */
35
static mmx_t mmx_80w = { 0x0080008000800080LL };
38
static mmx_t mmx_U_green = { 0xf37df37df37df37dLL }; // U Green: -3203 (= -0.34414*255.0/224.0 * 8192)
39
static mmx_t mmx_U_blue = { 0x4093409340934093LL }; // U Blue: 16531 (= 1.77200*255.0/224.0 * 8192)
40
static mmx_t mmx_V_red = { 0x3312331233123312LL }; // V red: 13074 (= 1.40200*255.0/224.0 * 8192)
41
static mmx_t mmx_V_green = { 0xe5fce5fce5fce5fcLL }; // V Green: -6660 (= -0.71414*255.0/224.0 * 8192)
42
static mmx_t mmx_Y_coeff = { 0x253f253f253f253fLL }; // Y Coeff: 9535 (= 255.0/219.0 * 8192)
45
static mmx_t mmx_UJ_green = { 0xf4fdf4fdf4fdf4fdLL }; // U Green: -2819 (= -0.34414 * 8192)
46
static mmx_t mmx_UJ_blue = { 0x38b438b438b438b4LL }; // U Blue: 14516 (= 1.77200 * 8192)
47
static mmx_t mmx_VJ_red = { 0x2cdd2cdd2cdd2cddLL }; // V red: 11485 (= 1.40200 * 8192)
48
static mmx_t mmx_VJ_green = { 0xe926e926e926e926LL }; // V Green: -5850 (= -0.71414 * 8192)
49
static mmx_t mmx_YJ_coeff = { 0x2000200020002000LL }; // Y Coeff: 8192 (= 8192)
52
static mmx_t mmx_10w = { 0x1010101010101010LL };
53
static mmx_t mmx_00ffw = { 0x00ff00ff00ff00ffLL };
54
static mmx_t mmx_ff00w = { 0xff00ff00ff00ff00LL };
56
/* Macros for loading the YUV images into the MMX registers */
58
#define LOAD_YUV_PLANAR_2 movq_m2r (*src_y, mm6);\
59
movd_m2r (*src_u, mm0);\
60
movd_m2r (*src_v, mm1);\
63
#define INIT_YUV_PLANAR_4 int32_t i_tmp;
65
#define LOAD_YUV_PLANAR_4 movq_m2r (*src_y, mm6);\
66
i_tmp = (((int32_t)src_u[1])) << 8 | src_u[0];\
67
movd_m2r (i_tmp, mm0); \
68
i_tmp = (((int32_t)src_v[1])) << 8 | src_v[0];\
69
movd_m2r (i_tmp, mm1);\
71
punpcklbw_r2r(mm4, mm0);\
72
punpcklbw_r2r(mm4, mm1);\
80
#define LOAD_YUY2 movq_m2r(*src,mm0);/* mm0: V2 Y3 U2 Y2 V0 Y1 U0 Y0 */\
81
movq_m2r(*(src+8),mm1);/* mm1: V6 Y7 U6 Y6 V4 Y5 U4 Y4 */\
82
movq_r2r(mm0,mm2);/* mm2: V2 Y3 U2 Y2 V0 Y1 U0 Y0 */\
83
pand_m2r(mmx_00ffw,mm2);/* mm2: 00 Y3 00 Y2 00 Y1 00 Y0 */\
84
pxor_r2r(mm4, mm4);/* Zero mm4 */\
85
packuswb_r2r(mm4,mm2);/* mm2: 00 00 00 00 Y3 Y2 Y1 Y0 */\
86
movq_r2r(mm1,mm3);/* mm3: V6 Y7 U6 Y6 V4 Y5 U4 Y4 */\
87
pand_m2r(mmx_00ffw,mm3);/* mm3: 00 Y7 00 Y6 00 Y5 00 Y4 */\
88
pxor_r2r(mm6, mm6);/* Zero mm6 */\
89
packuswb_r2r(mm3,mm6);/* mm6: Y7 Y6 Y5 Y4 00 00 00 00 */\
90
por_r2r(mm2,mm6);/* mm6: Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0 */\
91
psrlw_i2r(8,mm0);/* mm0: 00 V2 00 U2 00 V0 00 U0 */\
92
psrlw_i2r(8,mm1);/* mm1: 00 V6 00 U6 00 V4 00 U4 */\
93
packuswb_r2r(mm1,mm0);/* mm0: V6 U6 V4 U4 V2 U2 V0 U0 */\
94
movq_r2r(mm0,mm1);/* mm1: V6 U6 V4 U4 V2 U2 V0 U0 */\
95
pand_m2r(mmx_00ffw,mm0);/* mm0: 00 U6 00 U4 00 U2 00 U0 */\
96
psrlw_i2r(8,mm1);/* mm1: 00 V6 00 V4 00 V2 00 V0 */\
97
packuswb_r2r(mm4,mm0);/* mm0: 00 00 00 00 U6 U4 U2 U0 */\
98
packuswb_r2r(mm4,mm1);/* mm1: 00 00 00 00 V6 V4 V2 V0 */
100
#define LOAD_UYVY movq_m2r(*src,mm0);/* mm0: Y3 V2 Y2 U2 Y1 V0 Y0 U0 */\
101
movq_m2r(*(src+8),mm1);/* mm1: Y7 V6 Y6 U6 Y5 V4 Y4 U4 */\
102
movq_r2r(mm0,mm2);/* mm2: Y3 V2 Y2 U2 Y1 V0 Y0 U0 */\
103
pand_m2r(mmx_ff00w,mm2);/* mm2: Y3 00 Y2 00 Y1 00 Y0 00 */\
104
psrlw_i2r(8,mm2);/* mm2: 00 Y3 00 Y2 00 Y1 00 Y0 */\
105
pxor_r2r(mm4, mm4);/* Zero mm4 */ \
106
packuswb_r2r(mm4,mm2);/* mm2: 00 00 00 00 Y3 Y2 Y1 Y0 */\
107
movq_r2r(mm1,mm3);/* mm3: Y7 V6 Y6 U6 Y5 V4 Y4 U4 */\
108
pand_m2r(mmx_ff00w,mm3);/* mm3: Y7 00 Y6 00 Y5 00 Y4 00 */\
109
psrlw_i2r(8,mm3);/* mm3: 00 Y7 00 Y6 00 Y5 00 Y4 */\
110
pxor_r2r(mm6, mm6);/* Zero mm6 */\
111
packuswb_r2r(mm3,mm6);/* mm6: Y7 Y6 Y5 Y4 00 00 00 00 */\
112
por_r2r(mm2,mm6);/* mm6: Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0 */\
113
pand_m2r(mmx_00ffw,mm0);/* mm0: 00 V2 00 U2 00 V0 00 U0 */\
114
pand_m2r(mmx_00ffw,mm1);/* mm1: 00 V6 00 U6 00 V4 00 U4 */\
115
packuswb_r2r(mm1,mm0);/* mm0: V6 U6 V4 U4 V2 U2 V0 U0 */\
116
movq_r2r(mm0,mm1);/* mm1: V6 U6 V4 U4 V2 U2 V0 U0 */\
117
pand_m2r(mmx_00ffw,mm0);/* mm0: 00 U6 00 U4 00 U2 00 U0 */\
118
psrlw_i2r(8,mm1);/* mm1: 00 V6 00 V4 00 V2 00 V0 */\
119
packuswb_r2r(mm4,mm0);/* mm0: 00 00 00 00 U6 U4 U2 U0 */\
120
packuswb_r2r(mm4,mm1);/* mm1: 00 00 00 00 V6 V4 V2 V0 */
122
/* This macro converts 8 Pixels at once (taken from mpeg2dec) */
125
* Before the conversion:
127
* mm0 = 00 00 00 00 u3 u2 u1 u0
128
* mm1 = 00 00 00 00 v3 v2 v1 v0
129
* mm6 = Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0
130
* mm4 = 00 00 00 00 00 00 00 00 (must be zerod before!)
131
* After the conversion:
133
* mm0 = B7 B6 B5 B4 B3 B2 B1 B0
134
* mm1 = R7 R6 R5 R4 R3 R2 R1 R0
135
* mm2 = G7 G6 G5 G4 G3 G2 G1 G0
139
#define YUV_2_RGB punpcklbw_r2r (mm4, mm0);/* mm0 = u3 u2 u1 u0 */\
140
punpcklbw_r2r (mm4, mm1);/* mm1 = v3 v2 v1 v0 */\
141
psubsw_m2r (mmx_80w, mm0);/* u -= 128 */\
142
psubsw_m2r (mmx_80w, mm1);/* v -= 128 */\
143
psllw_i2r (3, mm0);/* promote precision */\
144
psllw_i2r (3, mm1);/* promote precision */\
145
movq_r2r (mm0, mm2);/* mm2 = u3 u2 u1 u0 */\
146
movq_r2r (mm1, mm3);/* mm3 = v3 v2 v1 v0 */\
147
pmulhw_m2r (mmx_U_green, mm2);/* mm2 = u * u_green */\
148
pmulhw_m2r (mmx_V_green, mm3);/* mm3 = v * v_green */\
149
pmulhw_m2r (mmx_U_blue, mm0);/* mm0 = chroma_b */\
150
pmulhw_m2r (mmx_V_red, mm1);/* mm1 = chroma_r */\
151
paddsw_r2r (mm3, mm2);/* mm2 = chroma_g */\
152
psubusb_m2r (mmx_10w, mm6);/* Y -= 16 */\
153
movq_r2r (mm6, mm7);/* mm7 = Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0 */\
154
pand_m2r (mmx_00ffw, mm6);/* mm6 = Y6 Y4 Y2 Y0 */\
155
psrlw_i2r (8, mm7);/* mm7 = Y7 Y5 Y3 Y1 */\
156
psllw_i2r (3, mm6);/* promote precision */\
157
psllw_i2r (3, mm7);/* promote precision */\
158
pmulhw_m2r (mmx_Y_coeff, mm6);/* mm6 = luma_rgb even */\
159
pmulhw_m2r (mmx_Y_coeff, mm7);/* mm7 = luma_rgb odd */\
160
movq_r2r (mm0, mm3);/* mm3 = chroma_b */\
161
movq_r2r (mm1, mm4);/* mm4 = chroma_r */\
162
movq_r2r (mm2, mm5);/* mm5 = chroma_g */\
163
paddsw_r2r (mm6, mm0);/* mm0 = B6 B4 B2 B0 */\
164
paddsw_r2r (mm7, mm3);/* mm3 = B7 B5 B3 B1 */\
165
paddsw_r2r (mm6, mm1);/* mm1 = R6 R4 R2 R0 */\
166
paddsw_r2r (mm7, mm4);/* mm4 = R7 R5 R3 R1 */\
167
paddsw_r2r (mm6, mm2);/* mm2 = G6 G4 G2 G0 */\
168
paddsw_r2r (mm7, mm5);/* mm5 = G7 G5 G3 G1 */\
169
packuswb_r2r (mm0, mm0);/* saturate to 0-255 */\
170
packuswb_r2r (mm1, mm1);/* saturate to 0-255 */\
171
packuswb_r2r (mm2, mm2);/* saturate to 0-255 */\
172
packuswb_r2r (mm3, mm3);/* saturate to 0-255 */\
173
packuswb_r2r (mm4, mm4);/* saturate to 0-255 */\
174
packuswb_r2r (mm5, mm5);/* saturate to 0-255 */\
175
punpcklbw_r2r (mm3, mm0);/* mm0 = B7 B6 B5 B4 B3 B2 B1 B0 */\
176
punpcklbw_r2r (mm4, mm1);/* mm1 = R7 R6 R5 R4 R3 R2 R1 R0 */\
177
punpcklbw_r2r (mm5, mm2);/* mm2 = G7 G6 G5 G4 G3 G2 G1 G0 */
179
/* Same as above, but for JPEG quantization */
181
#define YUVJ_2_RGB punpcklbw_r2r (mm4, mm0);/* mm0 = u3 u2 u1 u0 */\
182
punpcklbw_r2r (mm4, mm1);/* mm1 = v3 v2 v1 v0 */\
183
psubsw_m2r (mmx_80w, mm0);/* u -= 128 */\
184
psubsw_m2r (mmx_80w, mm1);/* v -= 128 */\
185
psllw_i2r (3, mm0);/* promote precision */\
186
psllw_i2r (3, mm1);/* promote precision */\
187
movq_r2r (mm0, mm2);/* mm2 = u3 u2 u1 u0 */\
188
movq_r2r (mm1, mm3);/* mm3 = v3 v2 v1 v0 */\
189
pmulhw_m2r (mmx_UJ_green, mm2);/* mm2 = u * u_green */\
190
pmulhw_m2r (mmx_VJ_green, mm3);/* mm3 = v * v_green */\
191
pmulhw_m2r (mmx_UJ_blue, mm0);/* mm0 = chroma_b */\
192
pmulhw_m2r (mmx_VJ_red, mm1);/* mm1 = chroma_r */\
193
paddsw_r2r (mm3, mm2);/* mm2 = chroma_g */\
194
/* psubusb_m2r (mmx_10w, mm6); Y -= 16 */\
195
movq_r2r (mm6, mm7);/* mm7 = Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0 */\
196
pand_m2r (mmx_00ffw, mm6);/* mm6 = Y6 Y4 Y2 Y0 */\
197
psrlw_i2r (8, mm7);/* mm7 = Y7 Y5 Y3 Y1 */\
198
psllw_i2r (3, mm6);/* promote precision */\
199
psllw_i2r (3, mm7);/* promote precision */\
200
pmulhw_m2r (mmx_YJ_coeff, mm6);/* mm6 = luma_rgb even */\
201
pmulhw_m2r (mmx_YJ_coeff, mm7);/* mm7 = luma_rgb odd */\
202
movq_r2r (mm0, mm3);/* mm3 = chroma_b */\
203
movq_r2r (mm1, mm4);/* mm4 = chroma_r */\
204
movq_r2r (mm2, mm5);/* mm5 = chroma_g */\
205
paddsw_r2r (mm6, mm0);/* mm0 = B6 B4 B2 B0 */\
206
paddsw_r2r (mm7, mm3);/* mm3 = B7 B5 B3 B1 */\
207
paddsw_r2r (mm6, mm1);/* mm1 = R6 R4 R2 R0 */\
208
paddsw_r2r (mm7, mm4);/* mm4 = R7 R5 R3 R1 */\
209
paddsw_r2r (mm6, mm2);/* mm2 = G6 G4 G2 G0 */\
210
paddsw_r2r (mm7, mm5);/* mm5 = G7 G5 G3 G1 */\
211
packuswb_r2r (mm0, mm0);/* saturate to 0-255 */\
212
packuswb_r2r (mm1, mm1);/* saturate to 0-255 */\
213
packuswb_r2r (mm2, mm2);/* saturate to 0-255 */\
214
packuswb_r2r (mm3, mm3);/* saturate to 0-255 */\
215
packuswb_r2r (mm4, mm4);/* saturate to 0-255 */\
216
packuswb_r2r (mm5, mm5);/* saturate to 0-255 */\
217
punpcklbw_r2r (mm3, mm0);/* mm0 = B7 B6 B5 B4 B3 B2 B1 B0 */\
218
punpcklbw_r2r (mm4, mm1);/* mm1 = R7 R6 R5 R4 R3 R2 R1 R0 */\
219
punpcklbw_r2r (mm5, mm2);/* mm2 = G7 G6 G5 G4 G3 G2 G1 G0 */
222
/*******************************************
224
*******************************************/
227
* mm0 = B7 B6 B5 B4 B3 B2 B1 B0
228
* mm1 = R7 R6 R5 R4 R3 R2 R1 R0
229
* mm2 = G7 G6 G5 G4 G3 G2 G1 G0
232
#define OUTPUT_BGR_32 pxor_r2r (mm3, mm3);\
233
movq_r2r (mm0, mm6);\
234
punpcklbw_r2r (mm2, mm6);\
235
movq_r2r (mm1, mm7);\
236
punpcklbw_r2r (mm3, mm7);\
237
movq_r2r (mm0, mm4);\
238
punpcklwd_r2r (mm7, mm6);\
239
movq_r2r (mm1, mm5);\
240
MOVQ_R2M (mm6, *dst);\
241
movq_r2r (mm0, mm6);\
242
punpcklbw_r2r (mm2, mm6);\
243
punpckhwd_r2r (mm7, mm6);\
244
MOVQ_R2M (mm6, *(dst+8));\
245
punpckhbw_r2r (mm2, mm4);\
246
punpckhbw_r2r (mm3, mm5);\
247
punpcklwd_r2r (mm5, mm4);\
248
MOVQ_R2M (mm4, *(dst+16));\
249
movq_r2r (mm0, mm4);\
250
punpckhbw_r2r (mm2, mm4);\
251
punpckhwd_r2r (mm5, mm4);\
252
MOVQ_R2M (mm4, *(dst+24));
254
#define OUTPUT_RGB_32 pxor_r2r (mm3, mm3);\
255
movq_r2r (mm1, mm6);\
256
punpcklbw_r2r (mm2, mm6);\
257
movq_r2r (mm0, mm7);\
258
punpcklbw_r2r (mm3, mm7);\
259
movq_r2r (mm1, mm4);\
260
punpcklwd_r2r (mm7, mm6);\
261
movq_r2r (mm0, mm5);\
262
MOVQ_R2M (mm6, *dst);\
263
movq_r2r (mm1, mm6);\
264
punpcklbw_r2r (mm2, mm6);\
265
punpckhwd_r2r (mm7, mm6);\
266
MOVQ_R2M (mm6, *(dst+8));\
267
punpckhbw_r2r (mm2, mm4);\
268
punpckhbw_r2r (mm3, mm5);\
269
punpcklwd_r2r (mm5, mm4);\
270
MOVQ_R2M (mm4, *(dst+16));\
271
movq_r2r (mm1, mm4);\
272
punpckhbw_r2r (mm2, mm4);\
273
punpckhwd_r2r (mm5, mm4);\
274
MOVQ_R2M (mm4, *(dst+24));
276
static mmx_t yuv_rgb_lowest_word = { 0x000000000000FFFFLL };
277
static mmx_t yuv_rgb_lowest_byte = { 0x00000000000000FFLL };
280
* mm0 = B7 B6 B5 B4 B3 B2 B1 B0
281
* mm1 = R7 R6 R5 R4 R3 R2 R1 R0
282
* mm2 = G7 G6 G5 G4 G3 G2 G1 G0
285
#define OUTPUT_RGB_24 pxor_r2r(mm3, mm3);/* Zero -> mm3 */\
286
movq_r2r(mm2, mm4);/* mm4: G7 G6 G5 G4 G3 G2 G1 G0 */\
287
movq_r2r(mm1, mm5);/* mm5: R7 R6 R5 R4 R3 R2 R1 R0 */\
288
movq_r2r(mm1, mm5);/* mm5: R7 R6 R5 R4 R3 R2 R1 R0 */\
289
punpcklbw_r2r(mm3, mm5);/* mm5: 00 R3 00 R2 00 R1 00 R0 */\
290
punpcklbw_r2r(mm4, mm3);/* mm3: G3 00 G2 00 G1 00 G0 00 */\
291
por_r2r(mm5, mm3);/* mm3: G3 R3 G2 R2 G1 R1 G0 R0 */\
292
movq_r2r(mm0, mm5);/* mm5: B7 B6 B5 B4 B3 B2 B1 B0 */\
293
pand_m2r(yuv_rgb_lowest_byte, mm5);/* mm5: 00 00 00 00 00 00 00 B0 */\
294
movq_r2r(mm3, mm7);/* mm7: G3 R3 G2 R2 G1 R1 G0 R0 */\
295
pand_m2r(yuv_rgb_lowest_word, mm7);/* mm7: 00 00 00 00 00 00 G0 R0 */\
296
psllq_i2r(16, mm5);/* mm5: 00 00 00 00 00 B0 00 00 */\
297
por_r2r(mm5, mm7);/* mm7: 00 00 00 00 00 B0 G0 R0 */\
298
psrlq_i2r(16, mm3);/* mm3: 00 00 G3 R3 G2 R2 G1 R1 */\
299
psrlq_i2r(8, mm0);/* mm0: 00 B7 B6 B5 B4 B3 B2 B1 */\
300
movq_r2r(mm0, mm5);/* mm5: 00 B7 B6 B5 B4 B3 B2 B1 */\
301
pand_m2r(yuv_rgb_lowest_byte, mm5);/* mm5: 00 00 00 00 00 00 00 B1 */\
302
psllq_i2r(40, mm5);/* mm5: 00 00 B1 00 00 00 00 00 */\
303
por_r2r(mm5, mm7);/* mm7: 00 00 B1 00 00 B0 G0 R0 */\
304
movq_r2r(mm3, mm6);/* mm7: 00 00 G3 R3 G2 R2 G1 R1 */\
305
pand_m2r(yuv_rgb_lowest_word, mm6);/* mm6: 00 00 00 00 00 00 G1 R1 */\
306
psllq_i2r(24, mm6);/* mm6: 00 00 00 G1 R1 00 00 00 */\
307
por_r2r(mm6, mm7);/* mm7: 00 00 B1 G1 R1 B0 G0 R0 */\
308
psrlq_i2r(16, mm3);/* mm3: 00 00 00 00 G3 R3 G2 R2 */\
309
psrlq_i2r(8, mm0);/* mm0: 00 00 B7 B6 B5 B4 B3 B2 */\
310
movq_r2r(mm3, mm6);/* mm6: 00 00 00 00 G3 R3 G2 R2 */\
311
pand_m2r(yuv_rgb_lowest_word, mm6);/* mm6: 00 00 00 00 00 00 G2 R2 */\
312
psllq_i2r(48, mm6);/* mm6: G2 R2 00 00 00 00 00 00 */\
313
por_r2r(mm6, mm7);/* mm7: G2 R2 B1 G1 R1 B0 G0 R0 */\
314
MOVQ_R2M(mm7, *dst);\
315
movq_r2r(mm0, mm7);/* mm7: 00 00 B7 B6 B5 B4 B3 B2 */\
316
pand_m2r(yuv_rgb_lowest_byte, mm7);/* mm7: 00 00 00 00 00 00 00 B2 */\
317
psrlq_i2r(16, mm3);/* mm3: 00 00 00 00 00 00 G3 R3 */\
318
psllq_i2r(8, mm3);/* mm3: 00 00 00 00 00 G3 R3 00 */\
319
por_r2r(mm3, mm7);/* mm7: 00 00 00 00 00 G3 R3 B2 */\
320
psrlq_i2r(8, mm0);/* mm0: 00 00 00 B7 B6 B5 B4 B3 */\
321
movq_r2r(mm0, mm5);/* mm5: 00 00 00 B7 B6 B5 B4 B3 */\
322
pand_m2r(yuv_rgb_lowest_byte, mm5);/* mm5: 00 00 00 00 00 00 00 B3 */\
323
psllq_i2r(24, mm5);/* mm5: 00 00 00 00 B3 00 00 00 */\
324
por_r2r(mm5, mm7);/* mm7: 00 00 00 00 B3 G3 R3 B2 */\
325
psrlq_i2r(32, mm1);/* mm1: 00 00 00 00 R7 R6 R5 R4 */\
326
psrlq_i2r(32, mm2);/* mm2: 00 00 00 00 G7 G6 G5 G4 */\
327
psrlq_i2r(8, mm0);/* mm0: 00 00 00 00 B7 B6 B5 B4 */\
328
punpcklbw_r2r(mm0, mm2);/* mm2: B7 G7 B6 G6 B5 G5 B4 G4 */\
329
movq_r2r(mm1, mm5);/* mm5: 00 00 00 00 R7 R6 R5 R4 */\
330
pand_m2r(yuv_rgb_lowest_byte, mm5);/* mm5: 00 00 00 00 00 00 00 R4 */\
331
psllq_i2r(32, mm5);/* mm5: 00 00 00 R4 00 00 00 00 */\
332
por_r2r(mm5, mm7);/* mm7: 00 00 00 R4 B3 G3 R3 B2 */\
333
movq_r2r(mm2, mm6);/* mm6: B7 G7 B6 G6 B5 G5 B4 G4 */\
334
pand_m2r(yuv_rgb_lowest_word, mm6);/* mm6: 00 00 00 00 00 00 B4 G4 */\
335
psllq_i2r(40, mm6);/* mm6: 00 B4 G4 00 00 00 00 00 */\
336
por_r2r(mm6, mm7);/* mm7: 00 B4 G4 R4 B3 G3 R3 B2 */\
337
psrlq_i2r(8, mm1);/* mm1: 00 00 00 00 00 R7 R6 R5 */\
338
psrlq_i2r(16, mm2);/* mm2: 00 00 B7 G7 B6 G6 B5 G5 */\
339
movq_r2r(mm1, mm5);/* mm5: 00 00 00 00 00 R7 R6 R5 */\
340
psllq_i2r(56, mm5);/* mm5: R5 00 00 00 00 00 00 00 */\
341
por_r2r(mm5, mm7);/* mm7: R5 B4 G4 R4 B3 G3 R3 B2 */\
342
MOVQ_R2M(mm7, *(dst+8));\
343
movq_r2r(mm2, mm7);/* mm7: 00 00 B7 G7 B6 G6 B5 G5 */\
344
pand_m2r(yuv_rgb_lowest_word, mm7);/* mm7: 00 00 00 00 00 00 B5 G5 */\
345
psrlq_i2r(8, mm1);/* mm1: 00 00 00 00 00 00 R7 R6 */\
346
psrlq_i2r(16, mm2);/* mm2: 00 00 00 00 B7 G7 B6 G6 */\
347
movq_r2r(mm1, mm5);/* mm5: 00 00 00 00 00 00 R7 R6 */\
348
pand_m2r(yuv_rgb_lowest_byte, mm5);/* mm5: 00 00 00 00 00 00 00 R6 */\
349
psllq_i2r(16, mm5);/* mm5: 00 00 00 00 00 R6 00 00 */\
350
por_r2r(mm5, mm7);/* mm7: 00 00 00 00 00 R6 B5 G5 */\
351
movq_r2r(mm2, mm6);/* mm6: 00 00 00 00 B7 G7 B6 G6 */\
352
pand_m2r(yuv_rgb_lowest_word, mm6);/* mm6: 00 00 00 00 00 00 B6 G6 */\
353
psllq_i2r(24, mm6);/* mm5: 00 00 00 B6 G6 00 00 00 */\
354
por_r2r(mm6, mm7);/* mm7: 00 00 00 B6 G6 R6 B5 G5 */\
355
psrlq_i2r(8, mm1);/* mm1: 00 00 00 00 00 00 00 R7 */\
356
psrlq_i2r(16, mm2);/* mm2: 00 00 00 00 00 00 B7 G7 */\
357
psllq_i2r(40, mm1);/* mm1: 00 00 R7 00 00 00 00 00 */\
358
psllq_i2r(48, mm2);/* mm2: B7 G7 00 00 00 00 00 00 */\
361
MOVQ_R2M(mm7, *(dst+16));\
363
#define OUTPUT_BGR_24 pxor_r2r(mm3, mm3);/* Zero -> mm3 */\
364
movq_r2r(mm2, mm4);/* mm4: G7 G6 G5 G4 G3 G2 G1 G0 */\
365
movq_r2r(mm0, mm5);/* mm5: R7 R6 R5 R4 R3 R2 R1 R0 */\
366
movq_r2r(mm0, mm5);/* mm5: R7 R6 R5 R4 R3 R2 R1 R0 */\
367
punpcklbw_r2r(mm3, mm5);/* mm5: 00 R3 00 R2 00 R1 00 R0 */\
368
punpcklbw_r2r(mm4, mm3);/* mm3: G3 00 G2 00 G1 00 G0 00 */\
369
por_r2r(mm5, mm3);/* mm3: G3 R3 G2 R2 G1 R1 G0 R0 */\
370
movq_r2r(mm1, mm5);/* mm5: B7 B6 B5 B4 B3 B2 B1 B0 */\
371
pand_m2r(yuv_rgb_lowest_byte, mm5);/* mm5: 00 00 00 00 00 00 00 B0 */\
372
movq_r2r(mm3, mm7);/* mm7: G3 R3 G2 R2 G1 R1 G0 R0 */\
373
pand_m2r(yuv_rgb_lowest_word, mm7);/* mm7: 00 00 00 00 00 00 G0 R0 */\
374
psllq_i2r(16, mm5);/* mm5: 00 00 00 00 00 B0 00 00 */\
375
por_r2r(mm5, mm7);/* mm7: 00 00 00 00 00 B0 G0 R0 */\
376
psrlq_i2r(16, mm3);/* mm3: 00 00 G3 R3 G2 R2 G1 R1 */\
377
psrlq_i2r(8, mm1);/* mm1: 00 B7 B6 B5 B4 B3 B2 B1 */\
378
movq_r2r(mm1, mm5);/* mm5: 00 B7 B6 B5 B4 B3 B2 B1 */\
379
pand_m2r(yuv_rgb_lowest_byte, mm5);/* mm5: 00 00 00 00 00 00 00 B1 */\
380
psllq_i2r(40, mm5);/* mm5: 00 00 B1 00 00 00 00 00 */\
381
por_r2r(mm5, mm7);/* mm7: 00 00 B1 00 00 B0 G0 R0 */\
382
movq_r2r(mm3, mm6);/* mm7: 00 00 G3 R3 G2 R2 G1 R1 */\
383
pand_m2r(yuv_rgb_lowest_word, mm6);/* mm6: 00 00 00 00 00 00 G1 R1 */\
384
psllq_i2r(24, mm6);/* mm6: 00 00 00 G1 R1 00 00 00 */\
385
por_r2r(mm6, mm7);/* mm7: 00 00 B1 G1 R1 B0 G0 R0 */\
386
psrlq_i2r(16, mm3);/* mm3: 00 00 00 00 G3 R3 G2 R2 */\
387
psrlq_i2r(8, mm1);/* mm1: 00 00 B7 B6 B5 B4 B3 B2 */\
388
movq_r2r(mm3, mm6);/* mm6: 00 00 00 00 G3 R3 G2 R2 */\
389
pand_m2r(yuv_rgb_lowest_word, mm6);/* mm6: 00 00 00 00 00 00 G2 R2 */\
390
psllq_i2r(48, mm6);/* mm6: G2 R2 00 00 00 00 00 00 */\
391
por_r2r(mm6, mm7);/* mm7: G2 R2 B1 G1 R1 B0 G0 R0 */\
392
MOVQ_R2M(mm7, *dst);\
393
movq_r2r(mm1, mm7);/* mm7: 00 00 B7 B6 B5 B4 B3 B2 */\
394
pand_m2r(yuv_rgb_lowest_byte, mm7);/* mm7: 00 00 00 00 00 00 00 B2 */\
395
psrlq_i2r(16, mm3);/* mm3: 00 00 00 00 00 00 G3 R3 */\
396
psllq_i2r(8, mm3);/* mm3: 00 00 00 00 00 G3 R3 00 */\
397
por_r2r(mm3, mm7);/* mm7: 00 00 00 00 00 G3 R3 B2 */\
398
psrlq_i2r(8, mm1);/* mm1: 00 00 00 B7 B6 B5 B4 B3 */\
399
movq_r2r(mm1, mm5);/* mm5: 00 00 00 B7 B6 B5 B4 B3 */\
400
pand_m2r(yuv_rgb_lowest_byte, mm5);/* mm5: 00 00 00 00 00 00 00 B3 */\
401
psllq_i2r(24, mm5);/* mm5: 00 00 00 00 B3 00 00 00 */\
402
por_r2r(mm5, mm7);/* mm7: 00 00 00 00 B3 G3 R3 B2 */\
403
psrlq_i2r(32, mm0);/* mm0: 00 00 00 00 R7 R6 R5 R4 */\
404
psrlq_i2r(32, mm2);/* mm2: 00 00 00 00 G7 G6 G5 G4 */\
405
psrlq_i2r(8, mm1);/* mm1: 00 00 00 00 B7 B6 B5 B4 */\
406
punpcklbw_r2r(mm1, mm2);/* mm2: B7 G7 B6 G6 B5 G5 B4 G4 */\
407
movq_r2r(mm0, mm5);/* mm5: 00 00 00 00 R7 R6 R5 R4 */\
408
pand_m2r(yuv_rgb_lowest_byte, mm5);/* mm5: 00 00 00 00 00 00 00 R4 */\
409
psllq_i2r(32, mm5);/* mm5: 00 00 00 R4 00 00 00 00 */\
410
por_r2r(mm5, mm7);/* mm7: 00 00 00 R4 B3 G3 R3 B2 */\
411
movq_r2r(mm2, mm6);/* mm6: B7 G7 B6 G6 B5 G5 B4 G4 */\
412
pand_m2r(yuv_rgb_lowest_word, mm6);/* mm6: 00 00 00 00 00 00 B4 G4 */\
413
psllq_i2r(40, mm6);/* mm6: 00 B4 G4 00 00 00 00 00 */\
414
por_r2r(mm6, mm7);/* mm7: 00 B4 G4 R4 B3 G3 R3 B2 */\
415
psrlq_i2r(8, mm0);/* mm0: 00 00 00 00 00 R7 R6 R5 */\
416
psrlq_i2r(16, mm2);/* mm2: 00 00 B7 G7 B6 G6 B5 G5 */\
417
movq_r2r(mm0, mm5);/* mm5: 00 00 00 00 00 R7 R6 R5 */\
418
psllq_i2r(56, mm5);/* mm5: R5 00 00 00 00 00 00 00 */\
419
por_r2r(mm5, mm7);/* mm7: R5 B4 G4 R4 B3 G3 R3 B2 */\
420
MOVQ_R2M(mm7, *(dst+8));\
421
movq_r2r(mm2, mm7);/* mm7: 00 00 B7 G7 B6 G6 B5 G5 */\
422
pand_m2r(yuv_rgb_lowest_word, mm7);/* mm7: 00 00 00 00 00 00 B5 G5 */\
423
psrlq_i2r(8, mm0);/* mm0: 00 00 00 00 00 00 R7 R6 */\
424
psrlq_i2r(16, mm2);/* mm2: 00 00 00 00 B7 G7 B6 G6 */\
425
movq_r2r(mm0, mm5);/* mm5: 00 00 00 00 00 00 R7 R6 */\
426
pand_m2r(yuv_rgb_lowest_byte, mm5);/* mm5: 00 00 00 00 00 00 00 R6 */\
427
psllq_i2r(16, mm5);/* mm5: 00 00 00 00 00 R6 00 00 */\
428
por_r2r(mm5, mm7);/* mm7: 00 00 00 00 00 R6 B5 G5 */\
429
movq_r2r(mm2, mm6);/* mm6: 00 00 00 00 B7 G7 B6 G6 */\
430
pand_m2r(yuv_rgb_lowest_word, mm6);/* mm6: 00 00 00 00 00 00 B6 G6 */\
431
psllq_i2r(24, mm6);/* mm5: 00 00 00 B6 G6 00 00 00 */\
432
por_r2r(mm6, mm7);/* mm7: 00 00 00 B6 G6 R6 B5 G5 */\
433
psrlq_i2r(8, mm0);/* mm0: 00 00 00 00 00 00 00 R7 */\
434
psrlq_i2r(16, mm2);/* mm2: 00 00 00 00 00 00 B7 G7 */\
435
psllq_i2r(40, mm0);/* mm0: 00 00 R7 00 00 00 00 00 */\
436
psllq_i2r(48, mm2);/* mm2: B7 G7 00 00 00 00 00 00 */\
439
MOVQ_R2M(mm7, *(dst+16));\
443
static mmx_t rgba32_alphamask = {0xff000000ff000000LL};
445
#define OUTPUT_RGBA_32 pxor_r2r (mm3, mm3);\
446
movq_r2r (mm1, mm6);\
447
punpcklbw_r2r (mm2, mm6);\
448
movq_r2r (mm0, mm7);\
449
punpcklbw_r2r (mm3, mm7);\
450
movq_r2r (mm1, mm4);\
451
punpcklwd_r2r (mm7, mm6);\
452
movq_r2r (mm0, mm5);\
453
por_m2r (rgba32_alphamask, mm6);\
454
MOVQ_R2M (mm6, *dst);\
455
movq_r2r (mm1, mm6);\
456
punpcklbw_r2r (mm2, mm6);\
457
punpckhwd_r2r (mm7, mm6);\
458
por_m2r (rgba32_alphamask, mm6);\
459
MOVQ_R2M (mm6, *(dst+8));\
460
punpckhbw_r2r (mm2, mm4);\
461
punpckhbw_r2r (mm3, mm5);\
462
punpcklwd_r2r (mm5, mm4);\
463
por_m2r (rgba32_alphamask, mm4);\
464
MOVQ_R2M (mm4, *(dst+16));\
465
movq_r2r (mm1, mm4);\
466
punpckhbw_r2r (mm2, mm4);\
467
punpckhwd_r2r (mm5, mm4);\
468
por_m2r (rgba32_alphamask, mm4);\
469
MOVQ_R2M (mm4, *(dst+24));
471
static mmx_t rgb16_bluemask = {0xf8f8f8f8f8f8f8f8LL};
472
static mmx_t rgb16_greenmask = {0xfcfcfcfcfcfcfcfcLL};
473
static mmx_t rgb16_redmask = {0xf8f8f8f8f8f8f8f8LL};
475
#define OUTPUT_RGB_16 pand_m2r (rgb16_bluemask, mm0);/* mm0 = b7b6b5b4b3______ */\
476
pxor_r2r (mm4, mm4);/* mm4 = 0 */\
477
pand_m2r (rgb16_greenmask, mm2);/* mm2 = g7g6g5g4g3g2____ */\
478
psrlq_i2r (3, mm0);/* mm0 = ______b7b6b5b4b3 */\
479
movq_r2r (mm2, mm7);/* mm7 = g7g6g5g4g3g2____ */\
480
movq_r2r (mm0, mm5);/* mm5 = ______b7b6b5b4b3 */\
481
pand_m2r (rgb16_redmask, mm1);/* mm1 = r7r6r5r4r3______ */\
482
punpcklbw_r2r (mm4, mm2);\
483
punpcklbw_r2r (mm1, mm0);\
485
punpckhbw_r2r (mm4, mm7);\
488
MOVQ_R2M (mm0, *dst);\
489
punpckhbw_r2r (mm1, mm5);\
491
MOVQ_R2M (mm5, *(dst+8));
493
#define OUTPUT_BGR_16 pand_m2r (rgb16_bluemask, mm1);/* mm0 = b7b6b5b4b3______ */\
494
pxor_r2r (mm4, mm4);/* mm4 = 0 */\
495
pand_m2r (rgb16_greenmask, mm2);/* mm2 = g7g6g5g4g3g2____ */\
496
psrlq_i2r (3, mm1);/* mm0 = ______b7b6b5b4b3 */\
497
movq_r2r (mm2, mm7);/* mm7 = g7g6g5g4g3g2____ */\
498
movq_r2r (mm1, mm5);/* mm5 = ______b7b6b5b4b3 */\
499
pand_m2r (rgb16_redmask, mm0);/* mm1 = r7r6r5r4r3______ */\
500
punpcklbw_r2r (mm4, mm2);\
501
punpcklbw_r2r (mm0, mm1);\
503
punpckhbw_r2r (mm4, mm7);\
506
MOVQ_R2M (mm1, *dst);\
507
punpckhbw_r2r (mm0, mm5);\
509
MOVQ_R2M (mm5, *(dst+8));\
512
static mmx_t rgb15_bluemask = {0xf8f8f8f8f8f8f8f8LL};
513
static mmx_t rgb15_greenmask = {0xf8f8f8f8f8f8f8f8LL};
514
static mmx_t rgb15_redmask = {0xf8f8f8f8f8f8f8f8LL};
516
#define OUTPUT_RGB_15 pand_m2r (rgb15_bluemask, mm0);/* mm0 = b7b6b5b4b3______ */\
517
pxor_r2r (mm4, mm4);/* mm4 = 0 */\
518
pand_m2r (rgb15_greenmask, mm2);/* mm2 = g7g6g5g4g3g2____ */\
519
psrlq_i2r (3, mm0);/* mm0 = ______b7b6b5b4b3 */\
520
movq_r2r (mm2, mm7);/* mm7 = g7g6g5g4g3g2____ */\
521
movq_r2r (mm0, mm5);/* mm5 = ______b7b6b5b4b3 */\
522
pand_m2r (rgb15_redmask, mm1);/* mm1 = r7r6r5r4r3______ */\
523
punpcklbw_r2r (mm4, mm2);\
525
punpcklbw_r2r (mm1, mm0);\
527
punpckhbw_r2r (mm4, mm7);\
530
MOVQ_R2M(mm0, *dst);\
531
punpckhbw_r2r (mm1, mm5);\
533
MOVQ_R2M(mm5, *(dst+8));
535
#define OUTPUT_BGR_15 pand_m2r (rgb15_bluemask, mm1);/* mm0 = b7b6b5b4b3______ */\
536
pxor_r2r (mm4, mm4);/* mm4 = 0 */\
537
pand_m2r (rgb15_greenmask, mm2);/* mm2 = g7g6g5g4g3g2____ */\
538
psrlq_i2r (3, mm1);/* mm0 = ______b7b6b5b4b3 */\
539
movq_r2r (mm2, mm7);/* mm7 = g7g6g5g4g3g2____ */\
540
movq_r2r (mm1, mm5);/* mm5 = ______b7b6b5b4b3 */\
541
pand_m2r (rgb15_redmask, mm0);/* mm1 = r7r6r5r4r3______ */\
542
punpcklbw_r2r (mm4, mm2);\
544
punpcklbw_r2r (mm0, mm1);\
546
punpckhbw_r2r (mm4, mm7);\
549
MOVQ_R2M(mm1, *dst);\
550
punpckhbw_r2r (mm0, mm5);\
552
MOVQ_R2M(mm5, *(dst+8));
555
/***********************************************************
557
***********************************************************/
559
#define FUNC_NAME yuy2_to_rgb_15_mmx
560
#define IN_TYPE uint8_t
561
#define OUT_TYPE uint8_t
562
#define IN_ADVANCE 16
563
#define OUT_ADVANCE 16
570
#define CLEANUP emms();
574
#include "../csp_packed_packed.h"
576
#define FUNC_NAME yuy2_to_bgr_15_mmx
577
#define IN_TYPE uint8_t
578
#define OUT_TYPE uint8_t
579
#define IN_ADVANCE 16
580
#define OUT_ADVANCE 16
587
#define CLEANUP emms();
591
#include "../csp_packed_packed.h"
593
#define FUNC_NAME yuy2_to_rgb_16_mmx
594
#define IN_TYPE uint8_t
595
#define OUT_TYPE uint8_t
596
#define IN_ADVANCE 16
597
#define OUT_ADVANCE 16
604
#define CLEANUP emms();
608
#include "../csp_packed_packed.h"
611
#define FUNC_NAME yuy2_to_bgr_16_mmx
612
#define IN_TYPE uint8_t
613
#define OUT_TYPE uint8_t
614
#define IN_ADVANCE 16
615
#define OUT_ADVANCE 16
622
#define CLEANUP emms();
626
#include "../csp_packed_packed.h"
628
#define FUNC_NAME yuy2_to_rgb_24_mmx
629
#define IN_TYPE uint8_t
630
#define OUT_TYPE uint8_t
631
#define IN_ADVANCE 16
632
#define OUT_ADVANCE 24
639
#define CLEANUP emms();
643
#include "../csp_packed_packed.h"
645
#define FUNC_NAME yuy2_to_bgr_24_mmx
646
#define IN_TYPE uint8_t
647
#define OUT_TYPE uint8_t
648
#define IN_ADVANCE 16
649
#define OUT_ADVANCE 24
656
#define CLEANUP emms();
660
#include "../csp_packed_packed.h"
663
#define FUNC_NAME yuy2_to_rgb_32_mmx
664
#define IN_TYPE uint8_t
665
#define OUT_TYPE uint8_t
666
#define IN_ADVANCE 16
667
#define OUT_ADVANCE 32
674
#define CLEANUP emms();
678
#include "../csp_packed_packed.h"
680
#define FUNC_NAME yuy2_to_bgr_32_mmx
681
#define IN_TYPE uint8_t
682
#define OUT_TYPE uint8_t
683
#define IN_ADVANCE 16
684
#define OUT_ADVANCE 32
691
#define CLEANUP emms();
695
#include "../csp_packed_packed.h"
697
#define FUNC_NAME yuy2_to_rgba_32_mmx
698
#define IN_TYPE uint8_t
699
#define OUT_TYPE uint8_t
700
#define IN_ADVANCE 16
701
#define OUT_ADVANCE 32
708
#define CLEANUP emms();
712
#include "../csp_packed_packed.h"
714
/***********************************************************
716
***********************************************************/
718
#define FUNC_NAME uyvy_to_rgb_15_mmx
719
#define IN_TYPE uint8_t
720
#define OUT_TYPE uint8_t
721
#define IN_ADVANCE 16
722
#define OUT_ADVANCE 16
729
#define CLEANUP emms();
733
#include "../csp_packed_packed.h"
735
#define FUNC_NAME uyvy_to_bgr_15_mmx
736
#define IN_TYPE uint8_t
737
#define OUT_TYPE uint8_t
738
#define IN_ADVANCE 16
739
#define OUT_ADVANCE 16
746
#define CLEANUP emms();
750
#include "../csp_packed_packed.h"
752
#define FUNC_NAME uyvy_to_rgb_16_mmx
753
#define IN_TYPE uint8_t
754
#define OUT_TYPE uint8_t
755
#define IN_ADVANCE 16
756
#define OUT_ADVANCE 16
763
#define CLEANUP emms();
767
#include "../csp_packed_packed.h"
770
#define FUNC_NAME uyvy_to_bgr_16_mmx
771
#define IN_TYPE uint8_t
772
#define OUT_TYPE uint8_t
773
#define IN_ADVANCE 16
774
#define OUT_ADVANCE 16
781
#define CLEANUP emms();
785
#include "../csp_packed_packed.h"
787
#define FUNC_NAME uyvy_to_rgb_24_mmx
788
#define IN_TYPE uint8_t
789
#define OUT_TYPE uint8_t
790
#define IN_ADVANCE 16
791
#define OUT_ADVANCE 24
798
#define CLEANUP emms();
802
#include "../csp_packed_packed.h"
804
#define FUNC_NAME uyvy_to_bgr_24_mmx
805
#define IN_TYPE uint8_t
806
#define OUT_TYPE uint8_t
807
#define IN_ADVANCE 16
808
#define OUT_ADVANCE 24
815
#define CLEANUP emms();
819
#include "../csp_packed_packed.h"
822
#define FUNC_NAME uyvy_to_rgb_32_mmx
823
#define IN_TYPE uint8_t
824
#define OUT_TYPE uint8_t
825
#define IN_ADVANCE 16
826
#define OUT_ADVANCE 32
833
#define CLEANUP emms();
837
#include "../csp_packed_packed.h"
839
#define FUNC_NAME uyvy_to_bgr_32_mmx
840
#define IN_TYPE uint8_t
841
#define OUT_TYPE uint8_t
842
#define IN_ADVANCE 16
843
#define OUT_ADVANCE 32
850
#define CLEANUP emms();
854
#include "../csp_packed_packed.h"
856
#define FUNC_NAME uyvy_to_rgba_32_mmx
857
#define IN_TYPE uint8_t
858
#define OUT_TYPE uint8_t
859
#define IN_ADVANCE 16
860
#define OUT_ADVANCE 32
867
#define CLEANUP emms();
871
#include "../csp_packed_packed.h"
873
/***************************************************
875
***************************************************/
877
#define FUNC_NAME yuv_420_p_to_rgb_15_mmx
878
#define IN_TYPE uint8_t
879
#define OUT_TYPE uint8_t
880
#define IN_ADVANCE_Y 8
881
#define IN_ADVANCE_UV 4
882
#define OUT_ADVANCE 16
892
#define CLEANUP emms();
894
#include "../csp_planar_packed.h"
896
#define FUNC_NAME yuv_420_p_to_bgr_15_mmx
897
#define IN_TYPE uint8_t
898
#define OUT_TYPE uint8_t
899
#define IN_ADVANCE_Y 8
900
#define IN_ADVANCE_UV 4
901
#define OUT_ADVANCE 16
911
#define CLEANUP emms();
913
#include "../csp_planar_packed.h"
915
#define FUNC_NAME yuv_420_p_to_rgb_16_mmx
916
#define IN_TYPE uint8_t
917
#define OUT_TYPE uint8_t
918
#define IN_ADVANCE_Y 8
919
#define IN_ADVANCE_UV 4
920
#define OUT_ADVANCE 16
930
#define CLEANUP emms();
932
#include "../csp_planar_packed.h"
934
#define FUNC_NAME yuv_420_p_to_bgr_16_mmx
935
#define IN_TYPE uint8_t
936
#define OUT_TYPE uint8_t
937
#define IN_ADVANCE_Y 8
938
#define IN_ADVANCE_UV 4
939
#define OUT_ADVANCE 16
949
#define CLEANUP emms();
951
#include "../csp_planar_packed.h"
953
#define FUNC_NAME yuv_420_p_to_rgb_24_mmx
954
#define IN_TYPE uint8_t
955
#define OUT_TYPE uint8_t
956
#define IN_ADVANCE_Y 8
957
#define IN_ADVANCE_UV 4
958
#define OUT_ADVANCE 24
968
#define CLEANUP emms();
970
#include "../csp_planar_packed.h"
973
#define FUNC_NAME yuv_420_p_to_bgr_24_mmx
974
#define IN_TYPE uint8_t
975
#define OUT_TYPE uint8_t
976
#define IN_ADVANCE_Y 8
977
#define IN_ADVANCE_UV 4
978
#define OUT_ADVANCE 24
988
#define CLEANUP emms();
990
#include "../csp_planar_packed.h"
992
#define FUNC_NAME yuv_420_p_to_rgb_32_mmx
993
#define IN_TYPE uint8_t
994
#define OUT_TYPE uint8_t
995
#define IN_ADVANCE_Y 8
996
#define IN_ADVANCE_UV 4
997
#define OUT_ADVANCE 32
1004
#define CHROMA_SUB 2
1007
#define CLEANUP emms();
1009
#include "../csp_planar_packed.h"
1011
#define FUNC_NAME yuv_420_p_to_bgr_32_mmx
1012
#define IN_TYPE uint8_t
1013
#define OUT_TYPE uint8_t
1014
#define IN_ADVANCE_Y 8
1015
#define IN_ADVANCE_UV 4
1016
#define OUT_ADVANCE 32
1017
#define NUM_PIXELS 8
1023
#define CHROMA_SUB 2
1026
#define CLEANUP emms();
1028
#include "../csp_planar_packed.h"
1030
#define FUNC_NAME yuv_420_p_to_rgba_32_mmx
1031
#define IN_TYPE uint8_t
1032
#define OUT_TYPE uint8_t
1033
#define IN_ADVANCE_Y 8
1034
#define IN_ADVANCE_UV 4
1035
#define OUT_ADVANCE 32
1036
#define NUM_PIXELS 8
1042
#define CHROMA_SUB 2
1045
#define CLEANUP emms();
1047
#include "../csp_planar_packed.h"
1049
/***************************************************
1051
***************************************************/
1053
#define FUNC_NAME yuv_410_p_to_rgb_15_mmx
1054
#define IN_TYPE uint8_t
1055
#define OUT_TYPE uint8_t
1056
#define IN_ADVANCE_Y 8
1057
#define IN_ADVANCE_UV 2
1058
#define OUT_ADVANCE 16
1059
#define NUM_PIXELS 8
1065
#define CHROMA_SUB 4
1067
#define INIT INIT_YUV_PLANAR_4
1068
#define CLEANUP emms();
1070
#include "../csp_planar_packed.h"
1072
#define FUNC_NAME yuv_410_p_to_bgr_15_mmx
1073
#define IN_TYPE uint8_t
1074
#define OUT_TYPE uint8_t
1075
#define IN_ADVANCE_Y 8
1076
#define IN_ADVANCE_UV 2
1077
#define OUT_ADVANCE 16
1078
#define NUM_PIXELS 8
1084
#define CHROMA_SUB 4
1086
#define INIT INIT_YUV_PLANAR_4
1087
#define CLEANUP emms();
1089
#include "../csp_planar_packed.h"
1091
#define FUNC_NAME yuv_410_p_to_rgb_16_mmx
1092
#define IN_TYPE uint8_t
1093
#define OUT_TYPE uint8_t
1094
#define IN_ADVANCE_Y 8
1095
#define IN_ADVANCE_UV 2
1096
#define OUT_ADVANCE 16
1097
#define NUM_PIXELS 8
1103
#define CHROMA_SUB 4
1105
#define INIT INIT_YUV_PLANAR_4
1106
#define CLEANUP emms();
1108
#include "../csp_planar_packed.h"
1110
#define FUNC_NAME yuv_410_p_to_bgr_16_mmx
1111
#define IN_TYPE uint8_t
1112
#define OUT_TYPE uint8_t
1113
#define IN_ADVANCE_Y 8
1114
#define IN_ADVANCE_UV 2
1115
#define OUT_ADVANCE 16
1116
#define NUM_PIXELS 8
1122
#define CHROMA_SUB 4
1124
#define INIT INIT_YUV_PLANAR_4
1125
#define CLEANUP emms();
1127
#include "../csp_planar_packed.h"
1129
#define FUNC_NAME yuv_410_p_to_rgb_24_mmx
1130
#define IN_TYPE uint8_t
1131
#define OUT_TYPE uint8_t
1132
#define IN_ADVANCE_Y 8
1133
#define IN_ADVANCE_UV 2
1134
#define OUT_ADVANCE 24
1135
#define NUM_PIXELS 8
1141
#define CHROMA_SUB 4
1143
#define INIT INIT_YUV_PLANAR_4
1144
#define CLEANUP emms();
1146
#include "../csp_planar_packed.h"
1149
#define FUNC_NAME yuv_410_p_to_bgr_24_mmx
1150
#define IN_TYPE uint8_t
1151
#define OUT_TYPE uint8_t
1152
#define IN_ADVANCE_Y 8
1153
#define IN_ADVANCE_UV 2
1154
#define OUT_ADVANCE 24
1155
#define NUM_PIXELS 8
1161
#define CHROMA_SUB 4
1163
#define INIT INIT_YUV_PLANAR_4
1164
#define CLEANUP emms();
1166
#include "../csp_planar_packed.h"
1168
#define FUNC_NAME yuv_410_p_to_rgb_32_mmx
1169
#define IN_TYPE uint8_t
1170
#define OUT_TYPE uint8_t
1171
#define IN_ADVANCE_Y 8
1172
#define IN_ADVANCE_UV 2
1173
#define OUT_ADVANCE 32
1174
#define NUM_PIXELS 8
1180
#define CHROMA_SUB 4
1182
#define INIT INIT_YUV_PLANAR_4
1183
#define CLEANUP emms();
1185
#include "../csp_planar_packed.h"
1187
#define FUNC_NAME yuv_410_p_to_bgr_32_mmx
1188
#define IN_TYPE uint8_t
1189
#define OUT_TYPE uint8_t
1190
#define IN_ADVANCE_Y 8
1191
#define IN_ADVANCE_UV 2
1192
#define OUT_ADVANCE 32
1193
#define NUM_PIXELS 8
1199
#define CHROMA_SUB 4
1201
#define INIT INIT_YUV_PLANAR_4
1202
#define CLEANUP emms();
1204
#include "../csp_planar_packed.h"
1206
#define FUNC_NAME yuv_410_p_to_rgba_32_mmx
1207
#define IN_TYPE uint8_t
1208
#define OUT_TYPE uint8_t
1209
#define IN_ADVANCE_Y 8
1210
#define IN_ADVANCE_UV 2
1211
#define OUT_ADVANCE 32
1212
#define NUM_PIXELS 8
1218
#define CHROMA_SUB 4
1220
#define INIT INIT_YUV_PLANAR_4
1221
#define CLEANUP emms();
1223
#include "../csp_planar_packed.h"
1225
/********************************************************
1227
********************************************************/
1229
#define FUNC_NAME yuv_422_p_to_rgb_15_mmx
1230
#define IN_TYPE uint8_t
1231
#define OUT_TYPE uint8_t
1232
#define IN_ADVANCE_Y 8
1233
#define IN_ADVANCE_UV 4
1234
#define OUT_ADVANCE 16
1235
#define NUM_PIXELS 8
1241
#define CHROMA_SUB 1
1244
#define CLEANUP emms();
1246
#include "../csp_planar_packed.h"
1248
#define FUNC_NAME yuv_422_p_to_bgr_15_mmx
1249
#define IN_TYPE uint8_t
1250
#define OUT_TYPE uint8_t
1251
#define IN_ADVANCE_Y 8
1252
#define IN_ADVANCE_UV 4
1253
#define OUT_ADVANCE 16
1254
#define NUM_PIXELS 8
1260
#define CHROMA_SUB 1
1263
#define CLEANUP emms();
1265
#include "../csp_planar_packed.h"
1267
#define FUNC_NAME yuv_422_p_to_rgb_16_mmx
1268
#define IN_TYPE uint8_t
1269
#define OUT_TYPE uint8_t
1270
#define IN_ADVANCE_Y 8
1271
#define IN_ADVANCE_UV 4
1272
#define OUT_ADVANCE 16
1273
#define NUM_PIXELS 8
1279
#define CHROMA_SUB 1
1282
#define CLEANUP emms();
1284
#include "../csp_planar_packed.h"
1286
#define FUNC_NAME yuv_422_p_to_bgr_16_mmx
1287
#define IN_TYPE uint8_t
1288
#define OUT_TYPE uint8_t
1289
#define IN_ADVANCE_Y 8
1290
#define IN_ADVANCE_UV 4
1291
#define OUT_ADVANCE 16
1292
#define NUM_PIXELS 8
1298
#define CHROMA_SUB 1
1301
#define CLEANUP emms();
1303
#include "../csp_planar_packed.h"
1305
#define FUNC_NAME yuv_422_p_to_rgb_24_mmx
1306
#define IN_TYPE uint8_t
1307
#define OUT_TYPE uint8_t
1308
#define IN_ADVANCE_Y 8
1309
#define IN_ADVANCE_UV 4
1310
#define OUT_ADVANCE 24
1311
#define NUM_PIXELS 8
1317
#define CHROMA_SUB 1
1320
#define CLEANUP emms();
1322
#include "../csp_planar_packed.h"
1325
#define FUNC_NAME yuv_422_p_to_bgr_24_mmx
1326
#define IN_TYPE uint8_t
1327
#define OUT_TYPE uint8_t
1328
#define IN_ADVANCE_Y 8
1329
#define IN_ADVANCE_UV 4
1330
#define OUT_ADVANCE 24
1331
#define NUM_PIXELS 8
1337
#define CHROMA_SUB 1
1340
#define CLEANUP emms();
1342
#include "../csp_planar_packed.h"
1344
#define FUNC_NAME yuv_422_p_to_rgb_32_mmx
1345
#define IN_TYPE uint8_t
1346
#define OUT_TYPE uint8_t
1347
#define IN_ADVANCE_Y 8
1348
#define IN_ADVANCE_UV 4
1349
#define OUT_ADVANCE 32
1350
#define NUM_PIXELS 8
1356
#define CHROMA_SUB 1
1359
#define CLEANUP emms();
1361
#include "../csp_planar_packed.h"
1363
#define FUNC_NAME yuv_422_p_to_bgr_32_mmx
1364
#define IN_TYPE uint8_t
1365
#define OUT_TYPE uint8_t
1366
#define IN_ADVANCE_Y 8
1367
#define IN_ADVANCE_UV 4
1368
#define OUT_ADVANCE 32
1369
#define NUM_PIXELS 8
1375
#define CHROMA_SUB 1
1378
#define CLEANUP emms();
1380
#include "../csp_planar_packed.h"
1382
#define FUNC_NAME yuv_422_p_to_rgba_32_mmx
1383
#define IN_TYPE uint8_t
1384
#define OUT_TYPE uint8_t
1385
#define IN_ADVANCE_Y 8
1386
#define IN_ADVANCE_UV 4
1387
#define OUT_ADVANCE 32
1388
#define NUM_PIXELS 8
1394
#define CHROMA_SUB 1
1397
#define CLEANUP emms();
1399
#include "../csp_planar_packed.h"
1401
/********************************************************
1403
********************************************************/
1405
#define FUNC_NAME yuv_411_p_to_rgb_15_mmx
1406
#define IN_TYPE uint8_t
1407
#define OUT_TYPE uint8_t
1408
#define IN_ADVANCE_Y 8
1409
#define IN_ADVANCE_UV 2
1410
#define OUT_ADVANCE 16
1411
#define NUM_PIXELS 8
1417
#define CHROMA_SUB 1
1418
#define INIT INIT_YUV_PLANAR_4
1420
#define CLEANUP emms();
1422
#include "../csp_planar_packed.h"
1424
#define FUNC_NAME yuv_411_p_to_bgr_15_mmx
1425
#define IN_TYPE uint8_t
1426
#define OUT_TYPE uint8_t
1427
#define IN_ADVANCE_Y 8
1428
#define IN_ADVANCE_UV 2
1429
#define OUT_ADVANCE 16
1430
#define NUM_PIXELS 8
1436
#define CHROMA_SUB 1
1437
#define INIT INIT_YUV_PLANAR_4
1440
#define CLEANUP emms();
1442
#include "../csp_planar_packed.h"
1444
#define FUNC_NAME yuv_411_p_to_rgb_16_mmx
1445
#define IN_TYPE uint8_t
1446
#define OUT_TYPE uint8_t
1447
#define IN_ADVANCE_Y 8
1448
#define IN_ADVANCE_UV 2
1449
#define OUT_ADVANCE 16
1450
#define NUM_PIXELS 8
1456
#define CHROMA_SUB 1
1457
#define INIT INIT_YUV_PLANAR_4
1460
#define CLEANUP emms();
1462
#include "../csp_planar_packed.h"
1464
#define FUNC_NAME yuv_411_p_to_bgr_16_mmx
1465
#define IN_TYPE uint8_t
1466
#define OUT_TYPE uint8_t
1467
#define IN_ADVANCE_Y 8
1468
#define IN_ADVANCE_UV 2
1469
#define OUT_ADVANCE 16
1470
#define NUM_PIXELS 8
1476
#define CHROMA_SUB 1
1477
#define INIT INIT_YUV_PLANAR_4
1480
#define CLEANUP emms();
1482
#include "../csp_planar_packed.h"
1484
#define FUNC_NAME yuv_411_p_to_rgb_24_mmx
1485
#define IN_TYPE uint8_t
1486
#define OUT_TYPE uint8_t
1487
#define IN_ADVANCE_Y 8
1488
#define IN_ADVANCE_UV 2
1489
#define OUT_ADVANCE 24
1490
#define NUM_PIXELS 8
1496
#define CHROMA_SUB 1
1497
#define INIT INIT_YUV_PLANAR_4
1500
#define CLEANUP emms();
1502
#include "../csp_planar_packed.h"
1505
#define FUNC_NAME yuv_411_p_to_bgr_24_mmx
1506
#define IN_TYPE uint8_t
1507
#define OUT_TYPE uint8_t
1508
#define IN_ADVANCE_Y 8
1509
#define IN_ADVANCE_UV 2
1510
#define OUT_ADVANCE 24
1511
#define NUM_PIXELS 8
1517
#define CHROMA_SUB 1
1518
#define INIT INIT_YUV_PLANAR_4
1521
#define CLEANUP emms();
1523
#include "../csp_planar_packed.h"
1525
#define FUNC_NAME yuv_411_p_to_rgb_32_mmx
1526
#define IN_TYPE uint8_t
1527
#define OUT_TYPE uint8_t
1528
#define IN_ADVANCE_Y 8
1529
#define IN_ADVANCE_UV 2
1530
#define OUT_ADVANCE 32
1531
#define NUM_PIXELS 8
1537
#define CHROMA_SUB 1
1538
#define INIT INIT_YUV_PLANAR_4
1541
#define CLEANUP emms();
1543
#include "../csp_planar_packed.h"
1545
#define FUNC_NAME yuv_411_p_to_bgr_32_mmx
1546
#define IN_TYPE uint8_t
1547
#define OUT_TYPE uint8_t
1548
#define IN_ADVANCE_Y 8
1549
#define IN_ADVANCE_UV 2
1550
#define OUT_ADVANCE 32
1551
#define NUM_PIXELS 8
1557
#define CHROMA_SUB 1
1558
#define INIT INIT_YUV_PLANAR_4
1561
#define CLEANUP emms();
1563
#include "../csp_planar_packed.h"
1565
#define FUNC_NAME yuv_411_p_to_rgba_32_mmx
1566
#define IN_TYPE uint8_t
1567
#define OUT_TYPE uint8_t
1568
#define IN_ADVANCE_Y 8
1569
#define IN_ADVANCE_UV 2
1570
#define OUT_ADVANCE 32
1571
#define NUM_PIXELS 8
1577
#define CHROMA_SUB 1
1578
#define INIT INIT_YUV_PLANAR_4
1581
#define CLEANUP emms();
1583
#include "../csp_planar_packed.h"
1587
/***************************************************
1589
***************************************************/
1591
#define FUNC_NAME yuvj_420_p_to_rgb_15_mmx
1592
#define IN_TYPE uint8_t
1593
#define OUT_TYPE uint8_t
1594
#define IN_ADVANCE_Y 8
1595
#define IN_ADVANCE_UV 4
1596
#define OUT_ADVANCE 16
1597
#define NUM_PIXELS 8
1603
#define CHROMA_SUB 2
1606
#define CLEANUP emms();
1608
#include "../csp_planar_packed.h"
1610
#define FUNC_NAME yuvj_420_p_to_bgr_15_mmx
1611
#define IN_TYPE uint8_t
1612
#define OUT_TYPE uint8_t
1613
#define IN_ADVANCE_Y 8
1614
#define IN_ADVANCE_UV 4
1615
#define OUT_ADVANCE 16
1616
#define NUM_PIXELS 8
1622
#define CHROMA_SUB 2
1625
#define CLEANUP emms();
1627
#include "../csp_planar_packed.h"
1629
#define FUNC_NAME yuvj_420_p_to_rgb_16_mmx
1630
#define IN_TYPE uint8_t
1631
#define OUT_TYPE uint8_t
1632
#define IN_ADVANCE_Y 8
1633
#define IN_ADVANCE_UV 4
1634
#define OUT_ADVANCE 16
1635
#define NUM_PIXELS 8
1641
#define CHROMA_SUB 2
1644
#define CLEANUP emms();
1646
#include "../csp_planar_packed.h"
1648
#define FUNC_NAME yuvj_420_p_to_bgr_16_mmx
1649
#define IN_TYPE uint8_t
1650
#define OUT_TYPE uint8_t
1651
#define IN_ADVANCE_Y 8
1652
#define IN_ADVANCE_UV 4
1653
#define OUT_ADVANCE 16
1654
#define NUM_PIXELS 8
1660
#define CHROMA_SUB 2
1663
#define CLEANUP emms();
1665
#include "../csp_planar_packed.h"
1667
#define FUNC_NAME yuvj_420_p_to_rgb_24_mmx
1668
#define IN_TYPE uint8_t
1669
#define OUT_TYPE uint8_t
1670
#define IN_ADVANCE_Y 8
1671
#define IN_ADVANCE_UV 4
1672
#define OUT_ADVANCE 24
1673
#define NUM_PIXELS 8
1679
#define CHROMA_SUB 2
1682
#define CLEANUP emms();
1684
#include "../csp_planar_packed.h"
1687
#define FUNC_NAME yuvj_420_p_to_bgr_24_mmx
1688
#define IN_TYPE uint8_t
1689
#define OUT_TYPE uint8_t
1690
#define IN_ADVANCE_Y 8
1691
#define IN_ADVANCE_UV 4
1692
#define OUT_ADVANCE 24
1693
#define NUM_PIXELS 8
1699
#define CHROMA_SUB 2
1702
#define CLEANUP emms();
1704
#include "../csp_planar_packed.h"
1706
#define FUNC_NAME yuvj_420_p_to_rgb_32_mmx
1707
#define IN_TYPE uint8_t
1708
#define OUT_TYPE uint8_t
1709
#define IN_ADVANCE_Y 8
1710
#define IN_ADVANCE_UV 4
1711
#define OUT_ADVANCE 32
1712
#define NUM_PIXELS 8
1718
#define CHROMA_SUB 2
1721
#define CLEANUP emms();
1723
#include "../csp_planar_packed.h"
1725
#define FUNC_NAME yuvj_420_p_to_bgr_32_mmx
1726
#define IN_TYPE uint8_t
1727
#define OUT_TYPE uint8_t
1728
#define IN_ADVANCE_Y 8
1729
#define IN_ADVANCE_UV 4
1730
#define OUT_ADVANCE 32
1731
#define NUM_PIXELS 8
1737
#define CHROMA_SUB 2
1740
#define CLEANUP emms();
1742
#include "../csp_planar_packed.h"
1744
#define FUNC_NAME yuvj_420_p_to_rgba_32_mmx
1745
#define IN_TYPE uint8_t
1746
#define OUT_TYPE uint8_t
1747
#define IN_ADVANCE_Y 8
1748
#define IN_ADVANCE_UV 4
1749
#define OUT_ADVANCE 32
1750
#define NUM_PIXELS 8
1756
#define CHROMA_SUB 2
1759
#define CLEANUP emms();
1761
#include "../csp_planar_packed.h"
1763
/********************************************************
1765
********************************************************/
1767
#define FUNC_NAME yuvj_422_p_to_rgb_15_mmx
1768
#define IN_TYPE uint8_t
1769
#define OUT_TYPE uint8_t
1770
#define IN_ADVANCE_Y 8
1771
#define IN_ADVANCE_UV 4
1772
#define OUT_ADVANCE 16
1773
#define NUM_PIXELS 8
1779
#define CHROMA_SUB 1
1782
#define CLEANUP emms();
1784
#include "../csp_planar_packed.h"
1786
#define FUNC_NAME yuvj_422_p_to_bgr_15_mmx
1787
#define IN_TYPE uint8_t
1788
#define OUT_TYPE uint8_t
1789
#define IN_ADVANCE_Y 8
1790
#define IN_ADVANCE_UV 4
1791
#define OUT_ADVANCE 16
1792
#define NUM_PIXELS 8
1798
#define CHROMA_SUB 1
1801
#define CLEANUP emms();
1803
#include "../csp_planar_packed.h"
1805
#define FUNC_NAME yuvj_422_p_to_rgb_16_mmx
1806
#define IN_TYPE uint8_t
1807
#define OUT_TYPE uint8_t
1808
#define IN_ADVANCE_Y 8
1809
#define IN_ADVANCE_UV 4
1810
#define OUT_ADVANCE 16
1811
#define NUM_PIXELS 8
1817
#define CHROMA_SUB 1
1820
#define CLEANUP emms();
1822
#include "../csp_planar_packed.h"
1824
#define FUNC_NAME yuvj_422_p_to_bgr_16_mmx
1825
#define IN_TYPE uint8_t
1826
#define OUT_TYPE uint8_t
1827
#define IN_ADVANCE_Y 8
1828
#define IN_ADVANCE_UV 4
1829
#define OUT_ADVANCE 16
1830
#define NUM_PIXELS 8
1836
#define CHROMA_SUB 1
1839
#define CLEANUP emms();
1841
#include "../csp_planar_packed.h"
1843
#define FUNC_NAME yuvj_422_p_to_rgb_24_mmx
1844
#define IN_TYPE uint8_t
1845
#define OUT_TYPE uint8_t
1846
#define IN_ADVANCE_Y 8
1847
#define IN_ADVANCE_UV 4
1848
#define OUT_ADVANCE 24
1849
#define NUM_PIXELS 8
1855
#define CHROMA_SUB 1
1858
#define CLEANUP emms();
1860
#include "../csp_planar_packed.h"
1863
#define FUNC_NAME yuvj_422_p_to_bgr_24_mmx
1864
#define IN_TYPE uint8_t
1865
#define OUT_TYPE uint8_t
1866
#define IN_ADVANCE_Y 8
1867
#define IN_ADVANCE_UV 4
1868
#define OUT_ADVANCE 24
1869
#define NUM_PIXELS 8
1875
#define CHROMA_SUB 1
1878
#define CLEANUP emms();
1880
#include "../csp_planar_packed.h"
1882
#define FUNC_NAME yuvj_422_p_to_rgb_32_mmx
1883
#define IN_TYPE uint8_t
1884
#define OUT_TYPE uint8_t
1885
#define IN_ADVANCE_Y 8
1886
#define IN_ADVANCE_UV 4
1887
#define OUT_ADVANCE 32
1888
#define NUM_PIXELS 8
1894
#define CHROMA_SUB 1
1897
#define CLEANUP emms();
1899
#include "../csp_planar_packed.h"
1901
#define FUNC_NAME yuvj_422_p_to_bgr_32_mmx
1902
#define IN_TYPE uint8_t
1903
#define OUT_TYPE uint8_t
1904
#define IN_ADVANCE_Y 8
1905
#define IN_ADVANCE_UV 4
1906
#define OUT_ADVANCE 32
1907
#define NUM_PIXELS 8
1913
#define CHROMA_SUB 1
1916
#define CLEANUP emms();
1918
#include "../csp_planar_packed.h"
1920
#define FUNC_NAME yuvj_422_p_to_rgba_32_mmx
1921
#define IN_TYPE uint8_t
1922
#define OUT_TYPE uint8_t
1923
#define IN_ADVANCE_Y 8
1924
#define IN_ADVANCE_UV 4
1925
#define OUT_ADVANCE 32
1926
#define NUM_PIXELS 8
1932
#define CHROMA_SUB 1
1935
#define CLEANUP emms();
1937
#include "../csp_planar_packed.h"
1943
void gavl_init_yuv_rgb_funcs_mmxext(gavl_pixelformat_function_table_t * tab,
1944
int width, const gavl_video_options_t * opt)
1948
void gavl_init_yuv_rgb_funcs_mmx(gavl_pixelformat_function_table_t * tab,
1949
int width, const gavl_video_options_t * opt)
1957
if(opt->quality && (opt->quality >= 3))
1960
tab->yuy2_to_rgb_15 = yuy2_to_rgb_15_mmx;
1961
tab->yuy2_to_bgr_15 = yuy2_to_bgr_15_mmx;
1962
tab->yuy2_to_rgb_16 = yuy2_to_rgb_16_mmx;
1963
tab->yuy2_to_bgr_16 = yuy2_to_bgr_16_mmx;
1964
tab->yuy2_to_rgb_24 = yuy2_to_rgb_24_mmx;
1965
tab->yuy2_to_bgr_24 = yuy2_to_bgr_24_mmx;
1966
tab->yuy2_to_rgb_32 = yuy2_to_rgb_32_mmx;
1967
tab->yuy2_to_bgr_32 = yuy2_to_bgr_32_mmx;
1968
tab->yuy2_to_rgba_32 = yuy2_to_rgba_32_mmx;
1970
tab->uyvy_to_rgb_15 = uyvy_to_rgb_15_mmx;
1971
tab->uyvy_to_bgr_15 = uyvy_to_bgr_15_mmx;
1972
tab->uyvy_to_rgb_16 = uyvy_to_rgb_16_mmx;
1973
tab->uyvy_to_bgr_16 = uyvy_to_bgr_16_mmx;
1974
tab->uyvy_to_rgb_24 = uyvy_to_rgb_24_mmx;
1975
tab->uyvy_to_bgr_24 = uyvy_to_bgr_24_mmx;
1976
tab->uyvy_to_rgb_32 = uyvy_to_rgb_32_mmx;
1977
tab->uyvy_to_bgr_32 = uyvy_to_bgr_32_mmx;
1978
tab->uyvy_to_rgba_32 = uyvy_to_rgba_32_mmx;
1980
tab->yuv_420_p_to_rgb_15 = yuv_420_p_to_rgb_15_mmx;
1981
tab->yuv_420_p_to_bgr_15 = yuv_420_p_to_bgr_15_mmx;
1982
tab->yuv_420_p_to_rgb_16 = yuv_420_p_to_rgb_16_mmx;
1983
tab->yuv_420_p_to_bgr_16 = yuv_420_p_to_bgr_16_mmx;
1984
tab->yuv_420_p_to_rgb_24 = yuv_420_p_to_rgb_24_mmx;
1985
tab->yuv_420_p_to_bgr_24 = yuv_420_p_to_bgr_24_mmx;
1986
tab->yuv_420_p_to_rgb_32 = yuv_420_p_to_rgb_32_mmx;
1987
tab->yuv_420_p_to_bgr_32 = yuv_420_p_to_bgr_32_mmx;
1988
tab->yuv_420_p_to_rgba_32 = yuv_420_p_to_rgba_32_mmx;
1990
tab->yuv_410_p_to_rgb_15 = yuv_410_p_to_rgb_15_mmx;
1991
tab->yuv_410_p_to_bgr_15 = yuv_410_p_to_bgr_15_mmx;
1992
tab->yuv_410_p_to_rgb_16 = yuv_410_p_to_rgb_16_mmx;
1993
tab->yuv_410_p_to_bgr_16 = yuv_410_p_to_bgr_16_mmx;
1994
tab->yuv_410_p_to_rgb_24 = yuv_410_p_to_rgb_24_mmx;
1995
tab->yuv_410_p_to_bgr_24 = yuv_410_p_to_bgr_24_mmx;
1996
tab->yuv_410_p_to_rgb_32 = yuv_410_p_to_rgb_32_mmx;
1997
tab->yuv_410_p_to_bgr_32 = yuv_410_p_to_bgr_32_mmx;
1998
tab->yuv_410_p_to_rgba_32 = yuv_410_p_to_rgba_32_mmx;
2001
tab->yuv_422_p_to_rgb_15 = yuv_422_p_to_rgb_15_mmx;
2002
tab->yuv_422_p_to_bgr_15 = yuv_422_p_to_bgr_15_mmx;
2003
tab->yuv_422_p_to_rgb_16 = yuv_422_p_to_rgb_16_mmx;
2004
tab->yuv_422_p_to_bgr_16 = yuv_422_p_to_bgr_16_mmx;
2005
tab->yuv_422_p_to_rgb_24 = yuv_422_p_to_rgb_24_mmx;
2006
tab->yuv_422_p_to_bgr_24 = yuv_422_p_to_bgr_24_mmx;
2007
tab->yuv_422_p_to_rgb_32 = yuv_422_p_to_rgb_32_mmx;
2008
tab->yuv_422_p_to_bgr_32 = yuv_422_p_to_bgr_32_mmx;
2009
tab->yuv_422_p_to_rgba_32 = yuv_422_p_to_rgba_32_mmx;
2011
tab->yuv_411_p_to_rgb_15 = yuv_411_p_to_rgb_15_mmx;
2012
tab->yuv_411_p_to_bgr_15 = yuv_411_p_to_bgr_15_mmx;
2013
tab->yuv_411_p_to_rgb_16 = yuv_411_p_to_rgb_16_mmx;
2014
tab->yuv_411_p_to_bgr_16 = yuv_411_p_to_bgr_16_mmx;
2015
tab->yuv_411_p_to_rgb_24 = yuv_411_p_to_rgb_24_mmx;
2016
tab->yuv_411_p_to_bgr_24 = yuv_411_p_to_bgr_24_mmx;
2017
tab->yuv_411_p_to_rgb_32 = yuv_411_p_to_rgb_32_mmx;
2018
tab->yuv_411_p_to_bgr_32 = yuv_411_p_to_bgr_32_mmx;
2019
tab->yuv_411_p_to_rgba_32 = yuv_411_p_to_rgba_32_mmx;
2022
tab->yuvj_420_p_to_rgb_15 = yuvj_420_p_to_rgb_15_mmx;
2023
tab->yuvj_420_p_to_bgr_15 = yuvj_420_p_to_bgr_15_mmx;
2024
tab->yuvj_420_p_to_rgb_16 = yuvj_420_p_to_rgb_16_mmx;
2025
tab->yuvj_420_p_to_bgr_16 = yuvj_420_p_to_bgr_16_mmx;
2026
tab->yuvj_420_p_to_rgb_24 = yuvj_420_p_to_rgb_24_mmx;
2027
tab->yuvj_420_p_to_bgr_24 = yuvj_420_p_to_bgr_24_mmx;
2028
tab->yuvj_420_p_to_rgb_32 = yuvj_420_p_to_rgb_32_mmx;
2029
tab->yuvj_420_p_to_bgr_32 = yuvj_420_p_to_bgr_32_mmx;
2030
tab->yuvj_420_p_to_rgba_32 = yuvj_420_p_to_rgba_32_mmx;
2032
tab->yuvj_422_p_to_rgb_15 = yuvj_422_p_to_rgb_15_mmx;
2033
tab->yuvj_422_p_to_bgr_15 = yuvj_422_p_to_bgr_15_mmx;
2034
tab->yuvj_422_p_to_rgb_16 = yuvj_422_p_to_rgb_16_mmx;
2035
tab->yuvj_422_p_to_bgr_16 = yuvj_422_p_to_bgr_16_mmx;
2036
tab->yuvj_422_p_to_rgb_24 = yuvj_422_p_to_rgb_24_mmx;
2037
tab->yuvj_422_p_to_bgr_24 = yuvj_422_p_to_bgr_24_mmx;
2038
tab->yuvj_422_p_to_rgb_32 = yuvj_422_p_to_rgb_32_mmx;
2039
tab->yuvj_422_p_to_bgr_32 = yuvj_422_p_to_bgr_32_mmx;
2040
tab->yuvj_422_p_to_rgba_32 = yuvj_422_p_to_rgba_32_mmx;