3
* Copyright � 2001 Lutz M�ller <lutz@users.sourceforge.net>
5
* This library is free software; you can redistribute it and/or
6
* modify it under the terms of the GNU Lesser General Public
7
* License as published by the Free Software Foundation; either
8
* version 2 of the License, or (at your option) any later version.
10
* This library is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
* Lesser General Public License for more details.
15
* You should have received a copy of the GNU Lesser General Public
16
* License along with this library; if not, write to the
17
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18
* Boston, MA 02111-1307, USA.
20
#include "jpeg-marker.h"
27
const char *description;
28
} JPEGMarkerTable[] = {
29
{JPEG_MARKER_SOF0, "SOF0", "Encoding (baseline)"},
30
{JPEG_MARKER_SOF1, "SOF1", "Encoding (extended sequential)"},
31
{JPEG_MARKER_SOF2, "SOF2", "Encoding (progressive)"},
32
{JPEG_MARKER_SOF3, "SOF3", "Encoding (lossless)"},
33
{JPEG_MARKER_SOF5, "SOF5", "Encoding (differential sequential)"},
34
{JPEG_MARKER_SOF6, "SOF6", "Encoding (differential progressive)"},
35
{JPEG_MARKER_SOF7, "SOF7", "Encoding (differential lossless)"},
36
{JPEG_MARKER_SOF9, "SOF9",
37
"Encoding (extended sequential, arithmetic)"},
38
{JPEG_MARKER_SOF10, "SOF10", "Encoding (progressive, arithmetic)"},
39
{JPEG_MARKER_SOF11, "SOF11", "Encoding (lossless, arithmetic)"},
40
{JPEG_MARKER_SOF13, "SOF13",
41
"Encoding (differential sequential, arithmetic)"},
42
{JPEG_MARKER_SOF14, "SOF14",
43
"Encoding (differential progressive, arithmetic)"},
44
{JPEG_MARKER_SOF15, "SOF15",
45
"Encoding (differential lossless, arithmetic)"},
46
{JPEG_MARKER_SOI, "SOI", "Start of image"},
47
{JPEG_MARKER_EOI, "EOI", "End of image"},
48
{JPEG_MARKER_SOS, "SOS", "Start of scan"},
49
{JPEG_MARKER_COM, "COM", "Comment"},
50
{JPEG_MARKER_DHT, "DHT", "Define Huffman table"},
51
{JPEG_MARKER_JPG, "JPG", "Extension"},
52
{JPEG_MARKER_DAC, "DAC", "Define arithmetic coding conditioning"},
53
{JPEG_MARKER_RST1, "RST1", "Restart 1"},
54
{JPEG_MARKER_RST2, "RST2", "Restart 2"},
55
{JPEG_MARKER_RST3, "RST3", "Restart 3"},
56
{JPEG_MARKER_RST4, "RST4", "Restart 4"},
57
{JPEG_MARKER_RST5, "RST5", "Restart 5"},
58
{JPEG_MARKER_RST6, "RST6", "Restart 6"},
59
{JPEG_MARKER_RST7, "RST7", "Restart 7"},
60
{JPEG_MARKER_DQT, "DQT", "Define quantization table"},
61
{JPEG_MARKER_DNL, "DNL", "Define number of lines"},
62
{JPEG_MARKER_DRI, "DRI", "Define restart interval"},
63
{JPEG_MARKER_DHP, "DHP", "Define hierarchical progression"},
64
{JPEG_MARKER_EXP, "EXP", "Expand reference component"},
65
{JPEG_MARKER_APP0, "APP0", "Application segment 0"},
66
{JPEG_MARKER_APP1, "APP1", "Application segment 1"},
67
{JPEG_MARKER_APP2, "APP2", "Application segment 2"},
68
{JPEG_MARKER_APP3, "APP3", "Application segment 3"},
69
{JPEG_MARKER_APP4, "APP4", "Application segment 4"},
70
{JPEG_MARKER_APP5, "APP5", "Application segment 5"},
71
{JPEG_MARKER_APP6, "APP6", "Application segment 6"},
72
{JPEG_MARKER_APP7, "APP7", "Application segment 7"},
73
{JPEG_MARKER_APP8, "APP8", "Application segment 8"},
74
{JPEG_MARKER_APP9, "APP9", "Application segment 9"},
75
{JPEG_MARKER_APP10, "APP10", "Application segment 10"},
76
{JPEG_MARKER_APP11, "APP11", "Application segment 11"},
77
{JPEG_MARKER_APP12, "APP12", "Application segment 12"},
78
{JPEG_MARKER_APP13, "APP13", "Application segment 13"},
79
{JPEG_MARKER_APP14, "APP14", "Application segment 14"},
80
{JPEG_MARKER_APP15, "APP15", "Application segment 15"},
81
{JPEG_MARKER_JPG0, "JPG0", "Extension 0"},
82
{JPEG_MARKER_JPG1, "JPG1", "Extension 1"},
83
{JPEG_MARKER_JPG2, "JPG2", "Extension 2"},
84
{JPEG_MARKER_JPG3, "JPG3", "Extension 3"},
85
{JPEG_MARKER_JPG4, "JPG4", "Extension 4"},
86
{JPEG_MARKER_JPG5, "JPG5", "Extension 5"},
87
{JPEG_MARKER_JPG6, "JPG6", "Extension 6"},
88
{JPEG_MARKER_JPG7, "JPG7", "Extension 7"},
89
{JPEG_MARKER_JPG8, "JPG8", "Extension 8"},
90
{JPEG_MARKER_JPG9, "JPG9", "Extension 9"},
91
{JPEG_MARKER_JPG10, "JPG10", "Extension 10"},
92
{JPEG_MARKER_JPG11, "JPG11", "Extension 11"},
93
{JPEG_MARKER_JPG12, "JPG12", "Extension 12"},
94
{JPEG_MARKER_JPG13, "JPG13", "Extension 13"},
99
jpeg_marker_get_name (JPEGMarker marker)
103
for (i = 0; JPEGMarkerTable[i].name; i++)
104
if (JPEGMarkerTable[i].marker == marker)
107
return (JPEGMarkerTable[i].name);
111
jpeg_marker_get_description (JPEGMarker marker)
115
for (i = 0; JPEGMarkerTable[i].description; i++)
116
if (JPEGMarkerTable[i].marker == marker)
119
return (JPEGMarkerTable[i].description);