blob: 79751b7c72828bd37679bbcee7e1d7c031d18e6a [file] [log] [blame]
Pierre Ossman5eb84ff2009-03-09 13:25:30 +00001;
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
Pierre Ossmaneea72152009-03-09 13:34:17 +000020%define xmmA xmm0
21%define xmmB xmm1
Pierre Ossman5eb84ff2009-03-09 13:25:30 +000022%elif RGB_GREEN == 0
23%define mmA mm2
24%define mmB mm3
Pierre Ossmaneea72152009-03-09 13:34:17 +000025%define xmmA xmm2
26%define xmmB xmm3
Pierre Ossman5eb84ff2009-03-09 13:25:30 +000027%elif RGB_BLUE == 0
28%define mmA mm4
29%define mmB mm5
Pierre Ossmaneea72152009-03-09 13:34:17 +000030%define xmmA xmm4
31%define xmmB xmm5
Pierre Ossman5eb84ff2009-03-09 13:25:30 +000032%else
33%define mmA mm6
34%define mmB mm7
Pierre Ossmaneea72152009-03-09 13:34:17 +000035%define xmmA xmm6
36%define xmmB xmm7
Pierre Ossman5eb84ff2009-03-09 13:25:30 +000037%endif
38
39%if RGB_RED == 1
40%define mmC mm0
41%define mmD mm1
Pierre Ossmaneea72152009-03-09 13:34:17 +000042%define xmmC xmm0
43%define xmmD xmm1
Pierre Ossman5eb84ff2009-03-09 13:25:30 +000044%elif RGB_GREEN == 1
45%define mmC mm2
46%define mmD mm3
Pierre Ossmaneea72152009-03-09 13:34:17 +000047%define xmmC xmm2
48%define xmmD xmm3
Pierre Ossman5eb84ff2009-03-09 13:25:30 +000049%elif RGB_BLUE == 1
50%define mmC mm4
51%define mmD mm5
Pierre Ossmaneea72152009-03-09 13:34:17 +000052%define xmmC xmm4
53%define xmmD xmm5
Pierre Ossman5eb84ff2009-03-09 13:25:30 +000054%else
55%define mmC mm6
56%define mmD mm7
Pierre Ossmaneea72152009-03-09 13:34:17 +000057%define xmmC xmm6
58%define xmmD xmm7
Pierre Ossman5eb84ff2009-03-09 13:25:30 +000059%endif
60
61%if RGB_RED == 2
62%define mmE mm0
63%define mmF mm1
Pierre Ossmaneea72152009-03-09 13:34:17 +000064%define xmmE xmm0
65%define xmmF xmm1
Pierre Ossman5eb84ff2009-03-09 13:25:30 +000066%elif RGB_GREEN == 2
67%define mmE mm2
68%define mmF mm3
Pierre Ossmaneea72152009-03-09 13:34:17 +000069%define xmmE xmm2
70%define xmmF xmm3
Pierre Ossman5eb84ff2009-03-09 13:25:30 +000071%elif RGB_BLUE == 2
72%define mmE mm4
73%define mmF mm5
Pierre Ossmaneea72152009-03-09 13:34:17 +000074%define xmmE xmm4
75%define xmmF xmm5
Pierre Ossman5eb84ff2009-03-09 13:25:30 +000076%else
77%define mmE mm6
78%define mmF mm7
Pierre Ossmaneea72152009-03-09 13:34:17 +000079%define xmmE xmm6
80%define xmmF xmm7
Pierre Ossman5eb84ff2009-03-09 13:25:30 +000081%endif
82
83%if RGB_RED == 3
84%define mmG mm0
85%define mmH mm1
Pierre Ossmaneea72152009-03-09 13:34:17 +000086%define xmmG xmm0
87%define xmmH xmm1
Pierre Ossman5eb84ff2009-03-09 13:25:30 +000088%elif RGB_GREEN == 3
89%define mmG mm2
90%define mmH mm3
Pierre Ossmaneea72152009-03-09 13:34:17 +000091%define xmmG xmm2
92%define xmmH xmm3
Pierre Ossman5eb84ff2009-03-09 13:25:30 +000093%elif RGB_BLUE == 3
94%define mmG mm4
95%define mmH mm5
Pierre Ossmaneea72152009-03-09 13:34:17 +000096%define xmmG xmm4
97%define xmmH xmm5
Pierre Ossman5eb84ff2009-03-09 13:25:30 +000098%else
99%define mmG mm6
100%define mmH mm7
Pierre Ossmaneea72152009-03-09 13:34:17 +0000101%define xmmG xmm6
102%define xmmH xmm7
Pierre Ossman5eb84ff2009-03-09 13:25:30 +0000103%endif
104
105; --------------------------------------------------------------------------