]> git.sesse.net Git - ffmpeg/blob - libavcodec/tiff.h
Merge remote-tracking branch 'qatar/master'
[ffmpeg] / libavcodec / tiff.h
1 /*
2  * Copyright (c) 2006 Konstantin Shishkov
3  *
4  * This file is part of FFmpeg.
5  *
6  * FFmpeg is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * FFmpeg is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with FFmpeg; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19  */
20
21 /**
22  * @file
23  * TIFF tables
24  *
25  * For more information about the TIFF format, check the official docs at:
26  * http://partners.adobe.com/public/developer/tiff/index.html
27  * @author Konstantin Shishkov
28  */
29
30 #ifndef AVCODEC_TIFF_H
31 #define AVCODEC_TIFF_H
32
33 #include <stdint.h>
34
35 /** abridged list of TIFF tags */
36 enum TiffTags{
37     TIFF_SUBFILE = 0xfe,
38     TIFF_WIDTH = 0x100,
39     TIFF_HEIGHT,
40     TIFF_BPP,
41     TIFF_COMPR,
42     TIFF_INVERT = 0x106,
43     TIFF_FILL_ORDER = 0x10A,
44     TIFF_STRIP_OFFS = 0x111,
45     TIFF_SAMPLES_PER_PIXEL = 0x115,
46     TIFF_ROWSPERSTRIP = 0x116,
47     TIFF_STRIP_SIZE,
48     TIFF_XRES = 0x11A,
49     TIFF_YRES = 0x11B,
50     TIFF_PLANAR = 0x11C,
51     TIFF_XPOS = 0x11E,
52     TIFF_YPOS = 0x11F,
53     TIFF_T4OPTIONS = 0x124,
54     TIFF_T6OPTIONS,
55     TIFF_RES_UNIT = 0x128,
56     TIFF_SOFTWARE_NAME = 0x131,
57     TIFF_PREDICTOR = 0x13D,
58     TIFF_PAL = 0x140,
59     TIFF_TILE_WIDTH = 0x142,
60     TIFF_TILE_LENGTH = 0x143,
61     TIFF_TILE_OFFSETS = 0x144,
62     TIFF_TILE_BYTE_COUNTS = 0x145,
63     TIFF_YCBCR_COEFFICIENTS = 0x211,
64     TIFF_YCBCR_SUBSAMPLING = 0x212,
65     TIFF_YCBCR_POSITIONING = 0x213,
66     TIFF_REFERENCE_BW = 0x214,
67 };
68
69 /** list of TIFF compression types */
70 enum TiffCompr{
71     TIFF_RAW = 1,
72     TIFF_CCITT_RLE,
73     TIFF_G3,
74     TIFF_G4,
75     TIFF_LZW,
76     TIFF_JPEG,
77     TIFF_NEWJPEG,
78     TIFF_ADOBE_DEFLATE,
79     TIFF_PACKBITS = 0x8005,
80     TIFF_DEFLATE = 0x80B2
81 };
82
83 enum TiffTypes{
84     TIFF_BYTE = 1,
85     TIFF_STRING,
86     TIFF_SHORT,
87     TIFF_LONG,
88     TIFF_RATIONAL,
89 };
90
91 /** sizes of various TIFF field types (string size = 100)*/
92 static const uint8_t type_sizes[6] = {
93     0, 1, 100, 2, 4, 8
94 };
95
96 #endif /* AVCODEC_TIFF_H */