jcolsamp.inc 2.6 KB

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