1;
2; jcolsamp.inc - private declarations for color conversion & up/downsampling
3;
4; Copyright 2009 Pierre Ossman <ossman@cendio.se> for Cendio AB
5; Copyright (C) 2015, Intel Corporation.
6;
7; Based on the x86 SIMD extension for IJG JPEG library
8; Copyright (C) 1999-2006, MIYASAKA Masaru.
9; For conditions of distribution and use, see copyright notice in jsimdext.inc
10;
11; [TAB8]
12
13; --------------------------------------------------------------------------
14
15; pseudo-resisters to make ordering of RGB configurable
16;
17%if RGB_RED == 0
18%define mmA  mm0
19%define mmB  mm1
20%define xmmA  xmm0
21%define xmmB  xmm1
22%define ymmA  ymm0
23%define ymmB  ymm1
24%elif RGB_GREEN == 0
25%define mmA  mm2
26%define mmB  mm3
27%define xmmA  xmm2
28%define xmmB  xmm3
29%define ymmA  ymm2
30%define ymmB  ymm3
31%elif RGB_BLUE == 0
32%define mmA  mm4
33%define mmB  mm5
34%define xmmA  xmm4
35%define xmmB  xmm5
36%define ymmA  ymm4
37%define ymmB  ymm5
38%else
39%define mmA  mm6
40%define mmB  mm7
41%define xmmA  xmm6
42%define xmmB  xmm7
43%define ymmA  ymm6
44%define ymmB  ymm7
45%endif
46
47%if RGB_RED == 1
48%define mmC  mm0
49%define mmD  mm1
50%define xmmC  xmm0
51%define xmmD  xmm1
52%define ymmC  ymm0
53%define ymmD  ymm1
54%elif RGB_GREEN == 1
55%define mmC  mm2
56%define mmD  mm3
57%define xmmC  xmm2
58%define xmmD  xmm3
59%define ymmC  ymm2
60%define ymmD  ymm3
61%elif RGB_BLUE == 1
62%define mmC  mm4
63%define mmD  mm5
64%define xmmC  xmm4
65%define xmmD  xmm5
66%define ymmC  ymm4
67%define ymmD  ymm5
68%else
69%define mmC  mm6
70%define mmD  mm7
71%define xmmC  xmm6
72%define xmmD  xmm7
73%define ymmC  ymm6
74%define ymmD  ymm7
75%endif
76
77%if RGB_RED == 2
78%define mmE  mm0
79%define mmF  mm1
80%define xmmE  xmm0
81%define xmmF  xmm1
82%define ymmE  ymm0
83%define ymmF  ymm1
84%elif RGB_GREEN == 2
85%define mmE  mm2
86%define mmF  mm3
87%define xmmE  xmm2
88%define xmmF  xmm3
89%define ymmE  ymm2
90%define ymmF  ymm3
91%elif RGB_BLUE == 2
92%define mmE  mm4
93%define mmF  mm5
94%define xmmE  xmm4
95%define xmmF  xmm5
96%define ymmE  ymm4
97%define ymmF  ymm5
98%else
99%define mmE  mm6
100%define mmF  mm7
101%define xmmE  xmm6
102%define xmmF  xmm7
103%define ymmE  ymm6
104%define ymmF  ymm7
105%endif
106
107%if RGB_RED == 3
108%define mmG  mm0
109%define mmH  mm1
110%define xmmG  xmm0
111%define xmmH  xmm1
112%define ymmG  ymm0
113%define ymmH  ymm1
114%elif RGB_GREEN == 3
115%define mmG  mm2
116%define mmH  mm3
117%define xmmG  xmm2
118%define xmmH  xmm3
119%define ymmG  ymm2
120%define ymmH  ymm3
121%elif RGB_BLUE == 3
122%define mmG  mm4
123%define mmH  mm5
124%define xmmG  xmm4
125%define xmmH  xmm5
126%define ymmG  ymm4
127%define ymmH  ymm5
128%else
129%define mmG  mm6
130%define mmH  mm7
131%define xmmG  xmm6
132%define xmmH  xmm7
133%define ymmG  ymm6
134%define ymmH  ymm7
135%endif
136
137; --------------------------------------------------------------------------
138