annotate libswscale/x86/yuv2rgb_template.c @ 31493:0a7222a42a70

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