a64tables.h 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. /*
  2. * a64 video encoder - tables used by a64 encoders
  3. * Copyright (c) 2009 Tobias Bindhammer
  4. *
  5. * This file is part of FFmpeg.
  6. *
  7. * FFmpeg is free software; you can redistribute it and/or
  8. * modify it under the terms of the GNU Lesser General Public
  9. * License as published by the Free Software Foundation; either
  10. * version 2.1 of the License, or (at your option) any later version.
  11. *
  12. * FFmpeg is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  15. * Lesser General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU Lesser General Public
  18. * License along with FFmpeg; if not, write to the Free Software
  19. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  20. */
  21. /**
  22. * @file
  23. * a64 video encoder - tables used by a64 encoders
  24. */
  25. #ifndef AVCODEC_A64TABLES_H
  26. #define AVCODEC_A64TABLES_H
  27. #include <stdint.h>
  28. /**
  29. * dither patterns used vor rendering the multicolor charset
  30. */
  31. static const uint8_t multi_dither_patterns[9][4][4] = {
  32. {
  33. {0, 0, 0, 0},
  34. {0, 0, 0, 0},
  35. {0, 0, 0, 0},
  36. {0, 0, 0, 0}
  37. },
  38. {
  39. {1, 0, 0, 0},
  40. {0, 0, 0, 0},
  41. {0, 0, 1, 0},
  42. {0, 0, 0, 0}
  43. },
  44. {
  45. {1, 0, 0, 0},
  46. {0, 0, 1, 0},
  47. {0, 1, 0, 0},
  48. {0, 0, 0, 1}
  49. },
  50. {
  51. {1, 0, 0, 0},
  52. {0, 1, 0, 1},
  53. {0, 0, 1, 0},
  54. {0, 1, 0, 1}
  55. },
  56. {
  57. {1, 0, 1, 0},
  58. {0, 1, 0, 1},
  59. {1, 0, 1, 0},
  60. {0, 1, 0, 1}
  61. },
  62. {
  63. {1, 1, 1, 0},
  64. {0, 1, 0, 1},
  65. {1, 0, 1, 1},
  66. {0, 1, 0, 1}
  67. },
  68. {
  69. {0, 1, 1, 1},
  70. {1, 1, 0, 1},
  71. {1, 0, 1, 1},
  72. {1, 1, 1, 0}
  73. },
  74. {
  75. {0, 1, 1, 1},
  76. {1, 1, 1, 1},
  77. {1, 1, 0, 1},
  78. {1, 1, 1, 1}
  79. },
  80. {
  81. {1, 1, 1, 1},
  82. {1, 1, 1, 1},
  83. {1, 1, 1, 1},
  84. {1, 1, 1, 1}
  85. },
  86. };
  87. static const uint8_t interlaced_dither_patterns[9][8][4] = {
  88. {
  89. {0, 0, 0, 0}, {0, 0, 0, 0},
  90. {0, 0, 0, 0}, {0, 0, 0, 0},
  91. {0, 0, 0, 0}, {0, 0, 0, 0},
  92. {0, 0, 0, 0}, {0, 0, 0, 0},
  93. },
  94. {
  95. {1, 0, 1, 0}, {0, 0, 0, 0},
  96. {0, 0, 0, 0}, {0, 0, 0, 0},
  97. {1, 0, 1, 0}, {0, 0, 0, 0},
  98. {0, 0, 0, 0}, {0, 0, 0, 0},
  99. },
  100. {
  101. {1, 0, 1, 0}, {0, 0, 0, 0},
  102. {0, 0, 0, 0}, {0, 1, 0, 1},
  103. {1, 0, 1, 0}, {0, 0, 0, 0},
  104. {0, 0, 0, 0}, {0, 1, 0, 1},
  105. },
  106. {
  107. {1, 0, 1, 0}, {0, 1, 0, 1},
  108. {0, 1, 0, 1}, {0, 0, 0, 0},
  109. {1, 0, 1, 0}, {0, 1, 0, 1},
  110. {0, 1, 0, 1}, {0, 0, 0, 0},
  111. },
  112. {
  113. {1, 0, 1, 0}, {0, 1, 0, 1},
  114. {0, 1, 0, 1}, {1, 0, 1, 0},
  115. {1, 0, 1, 0}, {0, 1, 0, 1},
  116. {0, 1, 0, 1}, {1, 0, 1, 0},
  117. },
  118. {
  119. {1, 0, 1, 0}, {0, 1, 0, 1},
  120. {1, 1, 1, 1}, {1, 0, 1, 0},
  121. {1, 0, 1, 0}, {0, 1, 0, 1},
  122. {1, 1, 1, 1}, {1, 0, 1, 0},
  123. },
  124. {
  125. {1, 0, 1, 0}, {1, 1, 1, 1},
  126. {1, 1, 1, 1}, {0, 1, 0, 1},
  127. {1, 0, 1, 0}, {1, 1, 1, 1},
  128. {1, 1, 1, 1}, {0, 1, 0, 1},
  129. },
  130. {
  131. {1, 1, 1, 1}, {1, 1, 1, 1},
  132. {1, 1, 1, 1}, {0, 1, 0, 1},
  133. {1, 1, 1, 1}, {1, 1, 1, 1},
  134. {1, 1, 1, 1}, {0, 1, 0, 1},
  135. },
  136. {
  137. {1, 1, 1, 1}, {1, 1, 1, 1},
  138. {1, 1, 1, 1}, {1, 1, 1, 1},
  139. {1, 1, 1, 1}, {1, 1, 1, 1},
  140. {1, 1, 1, 1}, {1, 1, 1, 1},
  141. }
  142. };
  143. #endif /* AVCODEC_A64TABLES_H */