annotate tiff.h @ 4774:0860efc2f02b libavcodec

tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
author michael
date Tue, 03 Apr 2007 13:43:57 +0000
parents
children bca8924ed36c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4774
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
1 /*
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
2 * TIFF tables
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
3 * Copyright (c) 2006 Konstantin Shishkov
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
4 *
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
5 * This file is part of FFmpeg.
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
6 *
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
7 * FFmpeg is free software; you can redistribute it and/or
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
8 * modify it under the terms of the GNU Lesser General Public
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
9 * License as published by the Free Software Foundation; either
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
10 * version 2.1 of the License, or (at your option) any later version.
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
11 *
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
12 * FFmpeg is distributed in the hope that it will be useful,
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
15 * Lesser General Public License for more details.
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
16 *
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
17 * You should have received a copy of the GNU Lesser General Public
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
18 * License along with FFmpeg; if not, write to the Free Software
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
20 *
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
21 */
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
22
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
23 #ifndef TIFF_H
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
24 #define TIFF_H
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
25
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
26 /* abridged list of TIFF tags */
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
27 enum TiffTags{
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
28 TIFF_SUBFILE = 0xfe,
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
29 TIFF_WIDTH = 0x100,
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
30 TIFF_HEIGHT,
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
31 TIFF_BPP,
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
32 TIFF_COMPR,
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
33 TIFF_INVERT = 0x106,
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
34 TIFF_STRIP_OFFS = 0x111,
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
35 TIFF_SAMPLES_PER_PIXEL = 0x115,
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
36 TIFF_ROWSPERSTRIP = 0x116,
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
37 TIFF_STRIP_SIZE,
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
38 TIFF_XRES = 0x11A,
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
39 TIFF_YRES = 0x11B,
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
40 TIFF_PLANAR = 0x11C,
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
41 TIFF_XPOS = 0x11E,
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
42 TIFF_YPOS = 0x11F,
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
43 TIFF_RES_UNIT = 0x128,
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
44 TIFF_SOFTWARE_NAME = 0x131,
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
45 TIFF_PREDICTOR = 0x13D,
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
46 TIFF_PAL = 0x140,
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
47 TIFF_YCBCR_COEFFICIENTS = 0x211,
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
48 TIFF_YCBCR_SUBSAMPLING = 0x212,
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
49 TIFF_YCBCR_POSITIONING = 0x213,
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
50 TIFF_REFERENCE_BW = 0x214,
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
51 };
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
52
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
53 enum TiffCompr{
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
54 TIFF_RAW = 1,
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
55 TIFF_CCITT_RLE,
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
56 TIFF_G3,
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
57 TIFF_G4,
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
58 TIFF_LZW,
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
59 TIFF_JPEG,
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
60 TIFF_NEWJPEG,
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
61 TIFF_ADOBE_DEFLATE,
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
62 TIFF_PACKBITS = 0x8005,
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
63 TIFF_DEFLATE = 0x80B2
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
64 };
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
65
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
66 enum TiffTypes{
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
67 TIFF_BYTE = 1,
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
68 TIFF_STRING,
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
69 TIFF_SHORT,
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
70 TIFF_LONG,
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
71 TIFF_RATIONAL,
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
72 };
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
73
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
74 /** sizes of various TIFF field types (string size = 100)*/
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
75 static const uint8_t type_sizes[6] = {
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
76 0, 1, 100, 2, 4, 8
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
77 };
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
78
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
79 #endif /* TIFF_H */