jcolsamp.inc 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  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 the x86 SIMD extension for IJG JPEG library
  7. ; Copyright (C) 1999-2006, MIYASAKA Masaru.
  8. ; For conditions of distribution and use, see copyright notice in jsimdext.inc
  9. ;
  10. ; [TAB8]
  11. ; --------------------------------------------------------------------------
  12. ; pseudo-resisters to make ordering of RGB configurable
  13. ;
  14. %if RGB_RED == 0
  15. %define mmA mm0
  16. %define mmB mm1
  17. %define xmmA xmm0
  18. %define xmmB xmm1
  19. %elif RGB_GREEN == 0
  20. %define mmA mm2
  21. %define mmB mm3
  22. %define xmmA xmm2
  23. %define xmmB xmm3
  24. %elif RGB_BLUE == 0
  25. %define mmA mm4
  26. %define mmB mm5
  27. %define xmmA xmm4
  28. %define xmmB xmm5
  29. %else
  30. %define mmA mm6
  31. %define mmB mm7
  32. %define xmmA xmm6
  33. %define xmmB xmm7
  34. %endif
  35. %if RGB_RED == 1
  36. %define mmC mm0
  37. %define mmD mm1
  38. %define xmmC xmm0
  39. %define xmmD xmm1
  40. %elif RGB_GREEN == 1
  41. %define mmC mm2
  42. %define mmD mm3
  43. %define xmmC xmm2
  44. %define xmmD xmm3
  45. %elif RGB_BLUE == 1
  46. %define mmC mm4
  47. %define mmD mm5
  48. %define xmmC xmm4
  49. %define xmmD xmm5
  50. %else
  51. %define mmC mm6
  52. %define mmD mm7
  53. %define xmmC xmm6
  54. %define xmmD xmm7
  55. %endif
  56. %if RGB_RED == 2
  57. %define mmE mm0
  58. %define mmF mm1
  59. %define xmmE xmm0
  60. %define xmmF xmm1
  61. %elif RGB_GREEN == 2
  62. %define mmE mm2
  63. %define mmF mm3
  64. %define xmmE xmm2
  65. %define xmmF xmm3
  66. %elif RGB_BLUE == 2
  67. %define mmE mm4
  68. %define mmF mm5
  69. %define xmmE xmm4
  70. %define xmmF xmm5
  71. %else
  72. %define mmE mm6
  73. %define mmF mm7
  74. %define xmmE xmm6
  75. %define xmmF xmm7
  76. %endif
  77. %if RGB_RED == 3
  78. %define mmG mm0
  79. %define mmH mm1
  80. %define xmmG xmm0
  81. %define xmmH xmm1
  82. %elif RGB_GREEN == 3
  83. %define mmG mm2
  84. %define mmH mm3
  85. %define xmmG xmm2
  86. %define xmmH xmm3
  87. %elif RGB_BLUE == 3
  88. %define mmG mm4
  89. %define mmH mm5
  90. %define xmmG xmm4
  91. %define xmmH xmm5
  92. %else
  93. %define mmG mm6
  94. %define mmH mm7
  95. %define xmmG xmm6
  96. %define xmmH xmm7
  97. %endif
  98. ; --------------------------------------------------------------------------