You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

110 lines
3.3KB

  1. /*
  2. * TIFF tables
  3. * Copyright (c) 2006 Konstantin Shishkov
  4. *
  5. * This file is part of Libav.
  6. *
  7. * Libav 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. * Libav 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 Libav; 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. * TIFF tables
  24. * @author Konstantin Shishkov
  25. */
  26. #ifndef AVCODEC_TIFF_H
  27. #define AVCODEC_TIFF_H
  28. #include <stdint.h>
  29. /** abridged list of TIFF tags */
  30. enum TiffTags {
  31. TIFF_SUBFILE = 0xfe,
  32. TIFF_WIDTH = 0x100,
  33. TIFF_HEIGHT,
  34. TIFF_BPP,
  35. TIFF_COMPR,
  36. TIFF_PHOTOMETRIC = 0x106,
  37. TIFF_FILL_ORDER = 0x10A,
  38. TIFF_STRIP_OFFS = 0x111,
  39. TIFF_SAMPLES_PER_PIXEL = 0x115,
  40. TIFF_ROWSPERSTRIP = 0x116,
  41. TIFF_STRIP_SIZE,
  42. TIFF_XRES = 0x11A,
  43. TIFF_YRES = 0x11B,
  44. TIFF_PLANAR = 0x11C,
  45. TIFF_XPOS = 0x11E,
  46. TIFF_YPOS = 0x11F,
  47. TIFF_T4OPTIONS = 0x124,
  48. TIFF_T6OPTIONS,
  49. TIFF_RES_UNIT = 0x128,
  50. TIFF_SOFTWARE_NAME = 0x131,
  51. TIFF_PREDICTOR = 0x13D,
  52. TIFF_PAL = 0x140,
  53. TIFF_YCBCR_COEFFICIENTS = 0x211,
  54. TIFF_YCBCR_SUBSAMPLING = 0x212,
  55. TIFF_YCBCR_POSITIONING = 0x213,
  56. TIFF_REFERENCE_BW = 0x214,
  57. };
  58. /** list of TIFF compression types */
  59. enum TiffCompr {
  60. TIFF_RAW = 1,
  61. TIFF_CCITT_RLE,
  62. TIFF_G3,
  63. TIFF_G4,
  64. TIFF_LZW,
  65. TIFF_JPEG,
  66. TIFF_NEWJPEG,
  67. TIFF_ADOBE_DEFLATE,
  68. TIFF_PACKBITS = 0x8005,
  69. TIFF_DEFLATE = 0x80B2,
  70. TIFF_LZMA = 0x886D,
  71. };
  72. enum TiffTypes {
  73. TIFF_BYTE = 1,
  74. TIFF_STRING,
  75. TIFF_SHORT,
  76. TIFF_LONG,
  77. TIFF_RATIONAL,
  78. };
  79. enum TiffPhotometric {
  80. TIFF_PHOTOMETRIC_NONE = -1,
  81. TIFF_PHOTOMETRIC_WHITE_IS_ZERO, /* mono or grayscale, 0 is white */
  82. TIFF_PHOTOMETRIC_BLACK_IS_ZERO, /* mono or grayscale, 0 is black */
  83. TIFF_PHOTOMETRIC_RGB, /* RGB or RGBA*/
  84. TIFF_PHOTOMETRIC_PALETTE, /* Uses a palette */
  85. TIFF_PHOTOMETRIC_ALPHA_MASK, /* Transparency mask */
  86. TIFF_PHOTOMETRIC_SEPARATED, /* CMYK or some other ink set */
  87. TIFF_PHOTOMETRIC_YCBCR, /* YCbCr */
  88. TIFF_PHOTOMETRIC_CIE_LAB = 8, /* 1976 CIE L*a*b* */
  89. TIFF_PHOTOMETRIC_ICC_LAB, /* ICC L*a*b* */
  90. TIFF_PHOTOMETRIC_ITU_LAB, /* ITU L*a*b* */
  91. TIFF_PHOTOMETRIC_CFA = 32803, /* Color Filter Array (DNG) */
  92. TIFF_PHOTOMETRIC_LOG_L = 32844, /* CIE Log2(L) */
  93. TIFF_PHOTOMETRIC_LOG_LUV, /* CIE Log L*u*v* */
  94. TIFF_PHOTOMETRIC_LINEAR_RAW = 34892, /* Linear Raw (DNG) */
  95. };
  96. /** sizes of various TIFF field types (string size = 100)*/
  97. static const uint8_t type_sizes[6] = {
  98. 0, 1, 100, 2, 4, 8
  99. };
  100. #endif /* AVCODEC_TIFF_H */