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