• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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; --------------------------------------------------------------------------
12
13; pseudo-resisters to make ordering of RGB configurable
14;
15%if RGB_RED == 0
16%define mmA  mm0
17%define mmB  mm1
18%define xmmA  xmm0
19%define xmmB  xmm1
20%define ymmA  ymm0
21%define ymmB  ymm1
22%elif RGB_GREEN == 0
23%define mmA  mm2
24%define mmB  mm3
25%define xmmA  xmm2
26%define xmmB  xmm3
27%define ymmA  ymm2
28%define ymmB  ymm3
29%elif RGB_BLUE == 0
30%define mmA  mm4
31%define mmB  mm5
32%define xmmA  xmm4
33%define xmmB  xmm5
34%define ymmA  ymm4
35%define ymmB  ymm5
36%else
37%define mmA  mm6
38%define mmB  mm7
39%define xmmA  xmm6
40%define xmmB  xmm7
41%define ymmA  ymm6
42%define ymmB  ymm7
43%endif
44
45%if RGB_RED == 1
46%define mmC  mm0
47%define mmD  mm1
48%define xmmC  xmm0
49%define xmmD  xmm1
50%define ymmC  ymm0
51%define ymmD  ymm1
52%elif RGB_GREEN == 1
53%define mmC  mm2
54%define mmD  mm3
55%define xmmC  xmm2
56%define xmmD  xmm3
57%define ymmC  ymm2
58%define ymmD  ymm3
59%elif RGB_BLUE == 1
60%define mmC  mm4
61%define mmD  mm5
62%define xmmC  xmm4
63%define xmmD  xmm5
64%define ymmC  ymm4
65%define ymmD  ymm5
66%else
67%define mmC  mm6
68%define mmD  mm7
69%define xmmC  xmm6
70%define xmmD  xmm7
71%define ymmC  ymm6
72%define ymmD  ymm7
73%endif
74
75%if RGB_RED == 2
76%define mmE  mm0
77%define mmF  mm1
78%define xmmE  xmm0
79%define xmmF  xmm1
80%define ymmE  ymm0
81%define ymmF  ymm1
82%elif RGB_GREEN == 2
83%define mmE  mm2
84%define mmF  mm3
85%define xmmE  xmm2
86%define xmmF  xmm3
87%define ymmE  ymm2
88%define ymmF  ymm3
89%elif RGB_BLUE == 2
90%define mmE  mm4
91%define mmF  mm5
92%define xmmE  xmm4
93%define xmmF  xmm5
94%define ymmE  ymm4
95%define ymmF  ymm5
96%else
97%define mmE  mm6
98%define mmF  mm7
99%define xmmE  xmm6
100%define xmmF  xmm7
101%define ymmE  ymm6
102%define ymmF  ymm7
103%endif
104
105%if RGB_RED == 3
106%define mmG  mm0
107%define mmH  mm1
108%define xmmG  xmm0
109%define xmmH  xmm1
110%define ymmG  ymm0
111%define ymmH  ymm1
112%elif RGB_GREEN == 3
113%define mmG  mm2
114%define mmH  mm3
115%define xmmG  xmm2
116%define xmmH  xmm3
117%define ymmG  ymm2
118%define ymmH  ymm3
119%elif RGB_BLUE == 3
120%define mmG  mm4
121%define mmH  mm5
122%define xmmG  xmm4
123%define xmmH  xmm5
124%define ymmG  ymm4
125%define ymmH  ymm5
126%else
127%define mmG  mm6
128%define mmH  mm7
129%define xmmG  xmm6
130%define xmmH  xmm7
131%define ymmG  ymm6
132%define ymmH  ymm7
133%endif
134
135; --------------------------------------------------------------------------
136