2 * This file is part of FFmpeg.
4 * FFmpeg is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * FFmpeg is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with FFmpeg; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 #ifndef AVCODEC_CBS_JPEG_H
20 #define AVCODEC_CBS_JPEG_H
25 #include "libavutil/buffer.h"
29 JPEG_MARKER_SOF0 = 0xc0,
30 JPEG_MARKER_SOF1 = 0xc1,
31 JPEG_MARKER_SOF2 = 0xc2,
32 JPEG_MARKER_SOF3 = 0xc3,
34 JPEG_MARKER_DHT = 0xc4,
35 JPEG_MARKER_SOI = 0xd8,
36 JPEG_MARKER_EOI = 0xd9,
37 JPEG_MARKER_SOS = 0xda,
38 JPEG_MARKER_DQT = 0xdb,
40 JPEG_MARKER_APPN = 0xe0,
41 JPEG_MARKER_JPGN = 0xf0,
42 JPEG_MARKER_COM = 0xfe,
46 JPEG_MAX_COMPONENTS = 255,
48 JPEG_MAX_HEIGHT = 65535,
49 JPEG_MAX_WIDTH = 65535,
53 typedef struct JPEGRawFrameHeader {
60 uint8_t C [JPEG_MAX_COMPONENTS];
61 uint8_t H [JPEG_MAX_COMPONENTS];
62 uint8_t V [JPEG_MAX_COMPONENTS];
63 uint8_t Tq[JPEG_MAX_COMPONENTS];
66 typedef struct JPEGRawScanHeader {
70 uint8_t Cs[JPEG_MAX_COMPONENTS];
71 uint8_t Td[JPEG_MAX_COMPONENTS];
72 uint8_t Ta[JPEG_MAX_COMPONENTS];
80 typedef struct JPEGRawScan {
81 JPEGRawScanHeader header;
83 AVBufferRef *data_ref;
87 typedef struct JPEGRawQuantisationTable {
91 } JPEGRawQuantisationTable;
93 typedef struct JPEGRawQuantisationTableSpecification {
95 JPEGRawQuantisationTable table[4];
96 } JPEGRawQuantisationTableSpecification;
98 typedef struct JPEGRawHuffmanTable {
103 } JPEGRawHuffmanTable;
105 typedef struct JPEGRawHuffmanTableSpecification {
107 JPEGRawHuffmanTable table[8];
108 } JPEGRawHuffmanTableSpecification;
110 typedef struct JPEGRawApplicationData {
114 } JPEGRawApplicationData;
116 typedef struct JPEGRawComment {
123 #endif /* AVCODEC_CBS_JPEG_H */