• 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;
6; Based on
7; 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%elif RGB_GREEN == 0
23%define  mmA  mm2
24%define  mmB  mm3
25%define xmmA xmm2
26%define xmmB xmm3
27%elif RGB_BLUE == 0
28%define  mmA  mm4
29%define  mmB  mm5
30%define xmmA xmm4
31%define xmmB xmm5
32%else
33%define  mmA  mm6
34%define  mmB  mm7
35%define xmmA xmm6
36%define xmmB xmm7
37%endif
38
39%if RGB_RED == 1
40%define  mmC  mm0
41%define  mmD  mm1
42%define xmmC xmm0
43%define xmmD xmm1
44%elif RGB_GREEN == 1
45%define  mmC  mm2
46%define  mmD  mm3
47%define xmmC xmm2
48%define xmmD xmm3
49%elif RGB_BLUE == 1
50%define  mmC  mm4
51%define  mmD  mm5
52%define xmmC xmm4
53%define xmmD xmm5
54%else
55%define  mmC  mm6
56%define  mmD  mm7
57%define xmmC xmm6
58%define xmmD xmm7
59%endif
60
61%if RGB_RED == 2
62%define  mmE  mm0
63%define  mmF  mm1
64%define xmmE xmm0
65%define xmmF xmm1
66%elif RGB_GREEN == 2
67%define  mmE  mm2
68%define  mmF  mm3
69%define xmmE xmm2
70%define xmmF xmm3
71%elif RGB_BLUE == 2
72%define  mmE  mm4
73%define  mmF  mm5
74%define xmmE xmm4
75%define xmmF xmm5
76%else
77%define  mmE  mm6
78%define  mmF  mm7
79%define xmmE xmm6
80%define xmmF xmm7
81%endif
82
83%if RGB_RED == 3
84%define  mmG  mm0
85%define  mmH  mm1
86%define xmmG xmm0
87%define xmmH xmm1
88%elif RGB_GREEN == 3
89%define  mmG  mm2
90%define  mmH  mm3
91%define xmmG xmm2
92%define xmmH xmm3
93%elif RGB_BLUE == 3
94%define  mmG  mm4
95%define  mmH  mm5
96%define xmmG xmm4
97%define xmmH xmm5
98%else
99%define  mmG  mm6
100%define  mmH  mm7
101%define xmmG xmm6
102%define xmmH xmm7
103%endif
104
105; --------------------------------------------------------------------------
106