annotate tiff.h @ 8376:e1b242224970 libavcodec

Use the new idct functions (except chroma as it was slower in benchmarks) cathedral +0.5% speed aladin +0.6% speed [note aladin has been cat-ed 10 times to reduce the influence of init time] Speedup also verified via START/STOP_TIMER (difference was very significant for the changed parts)
author michael
date Thu, 18 Dec 2008 02:53:18 +0000
parents c4a4495715dd
children b8d72c9851c7
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
4782
bca8924ed36c Add some Doxygen comments, by Kamil Nowosad, k.nowosad students.mimuw.edu pl.
diego
parents: 4774
diff changeset
22 /**
bca8924ed36c Add some Doxygen comments, by Kamil Nowosad, k.nowosad students.mimuw.edu pl.
diego
parents: 4774
diff changeset
23 * TIFF tables
bca8924ed36c Add some Doxygen comments, by Kamil Nowosad, k.nowosad students.mimuw.edu pl.
diego
parents: 4774
diff changeset
24 * @file tiff.h
bca8924ed36c Add some Doxygen comments, by Kamil Nowosad, k.nowosad students.mimuw.edu pl.
diego
parents: 4774
diff changeset
25 * @author Konstantin Shishkov
bca8924ed36c Add some Doxygen comments, by Kamil Nowosad, k.nowosad students.mimuw.edu pl.
diego
parents: 4774
diff changeset
26 */
7760
c4a4495715dd Globally rename the header inclusion guard names.
stefano
parents: 5830
diff changeset
27 #ifndef AVCODEC_TIFF_H
c4a4495715dd Globally rename the header inclusion guard names.
stefano
parents: 5830
diff changeset
28 #define AVCODEC_TIFF_H
4774
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
29
5162
4394344397d8 include all prerequisites in header files
mru
parents: 4782
diff changeset
30 #include <stdint.h>
4394344397d8 include all prerequisites in header files
mru
parents: 4782
diff changeset
31
4782
bca8924ed36c Add some Doxygen comments, by Kamil Nowosad, k.nowosad students.mimuw.edu pl.
diego
parents: 4774
diff changeset
32 /** abridged list of TIFF tags */
4774
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
33 enum TiffTags{
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
34 TIFF_SUBFILE = 0xfe,
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
35 TIFF_WIDTH = 0x100,
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
36 TIFF_HEIGHT,
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
37 TIFF_BPP,
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
38 TIFF_COMPR,
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
39 TIFF_INVERT = 0x106,
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
40 TIFF_STRIP_OFFS = 0x111,
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
41 TIFF_SAMPLES_PER_PIXEL = 0x115,
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
42 TIFF_ROWSPERSTRIP = 0x116,
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
43 TIFF_STRIP_SIZE,
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
44 TIFF_XRES = 0x11A,
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
45 TIFF_YRES = 0x11B,
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
46 TIFF_PLANAR = 0x11C,
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
47 TIFF_XPOS = 0x11E,
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
48 TIFF_YPOS = 0x11F,
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
49 TIFF_RES_UNIT = 0x128,
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
50 TIFF_SOFTWARE_NAME = 0x131,
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
51 TIFF_PREDICTOR = 0x13D,
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
52 TIFF_PAL = 0x140,
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
53 TIFF_YCBCR_COEFFICIENTS = 0x211,
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
54 TIFF_YCBCR_SUBSAMPLING = 0x212,
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
55 TIFF_YCBCR_POSITIONING = 0x213,
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
56 TIFF_REFERENCE_BW = 0x214,
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
57 };
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
58
4782
bca8924ed36c Add some Doxygen comments, by Kamil Nowosad, k.nowosad students.mimuw.edu pl.
diego
parents: 4774
diff changeset
59 /** list of TIFF compression types */
4774
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
60 enum TiffCompr{
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
61 TIFF_RAW = 1,
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
62 TIFF_CCITT_RLE,
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
63 TIFF_G3,
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
64 TIFF_G4,
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
65 TIFF_LZW,
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
66 TIFF_JPEG,
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
67 TIFF_NEWJPEG,
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
68 TIFF_ADOBE_DEFLATE,
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
69 TIFF_PACKBITS = 0x8005,
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
70 TIFF_DEFLATE = 0x80B2
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
71 };
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 enum TiffTypes{
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
74 TIFF_BYTE = 1,
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
75 TIFF_STRING,
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
76 TIFF_SHORT,
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
77 TIFF_LONG,
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
78 TIFF_RATIONAL,
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
79 };
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
80
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
81 /** 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
82 static const uint8_t type_sizes[6] = {
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
83 0, 1, 100, 2, 4, 8
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
84 };
0860efc2f02b tiff encoder by (Bartlomiej Wolowiec b.wolowiec students mimuw edu pl)
michael
parents:
diff changeset
85
7760
c4a4495715dd Globally rename the header inclusion guard names.
stefano
parents: 5830
diff changeset
86 #endif /* AVCODEC_TIFF_H */