FFmpeg
libavcodec
cbs_jpeg.h
Go to the documentation of this file.
1
/*
2
* This file is part of FFmpeg.
3
*
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.
8
*
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.
13
*
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
17
*/
18
19
#ifndef AVCODEC_CBS_JPEG_H
20
#define AVCODEC_CBS_JPEG_H
21
22
#include <stddef.h>
23
#include <stdint.h>
24
25
#include "
libavutil/buffer.h
"
26
27
28
enum
{
29
JPEG_MARKER_SOF0
= 0xc0,
30
JPEG_MARKER_SOF1
= 0xc1,
31
JPEG_MARKER_SOF2
= 0xc2,
32
JPEG_MARKER_SOF3
= 0xc3,
33
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,
39
40
JPEG_MARKER_APPN
= 0xe0,
41
JPEG_MARKER_JPGN
= 0xf0,
42
JPEG_MARKER_COM
= 0xfe,
43
};
44
45
enum
{
46
JPEG_MAX_COMPONENTS
= 255,
47
48
JPEG_MAX_HEIGHT
= 65535,
49
JPEG_MAX_WIDTH
= 65535,
50
};
51
52
53
typedef
struct
JPEGRawFrameHeader
{
54
uint16_t
Lf
;
55
uint8_t
P
;
56
uint16_t
Y
;
57
uint16_t
X
;
58
uint16_t
Nf
;
59
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
];
64
}
JPEGRawFrameHeader
;
65
66
typedef
struct
JPEGRawScanHeader
{
67
uint16_t
Ls
;
68
uint8_t
Ns
;
69
70
uint8_t
Cs
[
JPEG_MAX_COMPONENTS
];
71
uint8_t
Td
[
JPEG_MAX_COMPONENTS
];
72
uint8_t
Ta
[
JPEG_MAX_COMPONENTS
];
73
74
uint8_t
Ss
;
75
uint8_t
Se
;
76
uint8_t
Ah
;
77
uint8_t
Al
;
78
}
JPEGRawScanHeader
;
79
80
typedef
struct
JPEGRawScan
{
81
JPEGRawScanHeader
header
;
82
uint8_t *
data
;
83
AVBufferRef
*
data_ref
;
84
size_t
data_size
;
85
}
JPEGRawScan
;
86
87
typedef
struct
JPEGRawQuantisationTable
{
88
uint8_t
Pq
;
89
uint8_t
Tq
;
90
uint16_t
Q
[64];
91
}
JPEGRawQuantisationTable
;
92
93
typedef
struct
JPEGRawQuantisationTableSpecification
{
94
uint16_t
Lq
;
95
JPEGRawQuantisationTable
table
[4];
96
}
JPEGRawQuantisationTableSpecification
;
97
98
typedef
struct
JPEGRawHuffmanTable
{
99
uint8_t
Tc
;
100
uint8_t
Th
;
101
uint8_t
L
[16];
102
uint8_t
V
[224];
103
}
JPEGRawHuffmanTable
;
104
105
typedef
struct
JPEGRawHuffmanTableSpecification
{
106
uint16_t
Lh
;
107
JPEGRawHuffmanTable
table
[8];
108
}
JPEGRawHuffmanTableSpecification
;
109
110
typedef
struct
JPEGRawApplicationData
{
111
uint16_t
Lp
;
112
uint8_t *
Ap
;
113
AVBufferRef
*
Ap_ref
;
114
}
JPEGRawApplicationData
;
115
116
typedef
struct
JPEGRawComment
{
117
uint16_t
Lc
;
118
uint8_t *
Cm
;
119
AVBufferRef
*
Cm_ref
;
120
}
JPEGRawComment
;
121
122
123
#endif
/* AVCODEC_CBS_JPEG_H */
JPEGRawApplicationData::Lp
uint16_t Lp
Definition:
cbs_jpeg.h:111
JPEG_MARKER_DHT
@ JPEG_MARKER_DHT
Definition:
cbs_jpeg.h:34
JPEG_MAX_WIDTH
@ JPEG_MAX_WIDTH
Definition:
cbs_jpeg.h:49
JPEGRawHuffmanTableSpecification::table
JPEGRawHuffmanTable table[8]
Definition:
cbs_jpeg.h:107
JPEGRawFrameHeader::Y
uint16_t Y
Definition:
cbs_jpeg.h:56
JPEGRawHuffmanTable::L
uint8_t L[16]
Definition:
cbs_jpeg.h:101
JPEGRawScan::data_ref
AVBufferRef * data_ref
Definition:
cbs_jpeg.h:83
JPEGRawScan::data
uint8_t * data
Definition:
cbs_jpeg.h:82
JPEGRawScanHeader::Ah
uint8_t Ah
Definition:
cbs_jpeg.h:76
JPEGRawQuantisationTable::Tq
uint8_t Tq
Definition:
cbs_jpeg.h:89
JPEG_MARKER_DQT
@ JPEG_MARKER_DQT
Definition:
cbs_jpeg.h:38
JPEGRawQuantisationTable
Definition:
cbs_jpeg.h:87
JPEGRawScan::data_size
size_t data_size
Definition:
cbs_jpeg.h:84
JPEGRawQuantisationTableSpecification::Lq
uint16_t Lq
Definition:
cbs_jpeg.h:94
JPEGRawQuantisationTableSpecification
Definition:
cbs_jpeg.h:93
JPEGRawApplicationData::Ap_ref
AVBufferRef * Ap_ref
Definition:
cbs_jpeg.h:113
JPEGRawFrameHeader::Tq
uint8_t Tq[JPEG_MAX_COMPONENTS]
Definition:
cbs_jpeg.h:63
JPEG_MARKER_COM
@ JPEG_MARKER_COM
Definition:
cbs_jpeg.h:42
JPEG_MARKER_SOF1
@ JPEG_MARKER_SOF1
Definition:
cbs_jpeg.h:30
JPEG_MARKER_EOI
@ JPEG_MARKER_EOI
Definition:
cbs_jpeg.h:36
JPEGRawScanHeader::Al
uint8_t Al
Definition:
cbs_jpeg.h:77
JPEGRawHuffmanTable::Th
uint8_t Th
Definition:
cbs_jpeg.h:100
JPEG_MARKER_SOI
@ JPEG_MARKER_SOI
Definition:
cbs_jpeg.h:35
JPEGRawQuantisationTableSpecification::table
JPEGRawQuantisationTable table[4]
Definition:
cbs_jpeg.h:95
JPEGRawScanHeader::Ns
uint8_t Ns
Definition:
cbs_jpeg.h:68
JPEG_MARKER_SOS
@ JPEG_MARKER_SOS
Definition:
cbs_jpeg.h:37
JPEGRawFrameHeader::H
uint8_t H[JPEG_MAX_COMPONENTS]
Definition:
cbs_jpeg.h:61
JPEGRawQuantisationTable::Pq
uint8_t Pq
Definition:
cbs_jpeg.h:88
JPEGRawHuffmanTable::Tc
uint8_t Tc
Definition:
cbs_jpeg.h:99
JPEGRawFrameHeader::P
uint8_t P
Definition:
cbs_jpeg.h:55
JPEG_MARKER_SOF3
@ JPEG_MARKER_SOF3
Definition:
cbs_jpeg.h:32
JPEGRawHuffmanTableSpecification
Definition:
cbs_jpeg.h:105
JPEGRawFrameHeader::X
uint16_t X
Definition:
cbs_jpeg.h:57
JPEG_MARKER_JPGN
@ JPEG_MARKER_JPGN
Definition:
cbs_jpeg.h:41
JPEGRawScanHeader::Ss
uint8_t Ss
Definition:
cbs_jpeg.h:74
JPEGRawComment::Lc
uint16_t Lc
Definition:
cbs_jpeg.h:117
buffer.h
JPEGRawScanHeader::Cs
uint8_t Cs[JPEG_MAX_COMPONENTS]
Definition:
cbs_jpeg.h:70
JPEG_MAX_COMPONENTS
@ JPEG_MAX_COMPONENTS
Definition:
cbs_jpeg.h:46
JPEGRawScanHeader::Ls
uint16_t Ls
Definition:
cbs_jpeg.h:67
JPEGRawScanHeader::Td
uint8_t Td[JPEG_MAX_COMPONENTS]
Definition:
cbs_jpeg.h:71
JPEGRawScan::header
JPEGRawScanHeader header
Definition:
cbs_jpeg.h:81
JPEGRawQuantisationTable::Q
uint16_t Q[64]
Definition:
cbs_jpeg.h:90
JPEGRawFrameHeader::Nf
uint16_t Nf
Definition:
cbs_jpeg.h:58
JPEGRawApplicationData
Definition:
cbs_jpeg.h:110
JPEGRawScan
Definition:
cbs_jpeg.h:80
JPEGRawComment::Cm_ref
AVBufferRef * Cm_ref
Definition:
cbs_jpeg.h:119
JPEGRawFrameHeader::C
uint8_t C[JPEG_MAX_COMPONENTS]
Definition:
cbs_jpeg.h:60
JPEGRawFrameHeader::V
uint8_t V[JPEG_MAX_COMPONENTS]
Definition:
cbs_jpeg.h:62
JPEG_MARKER_SOF0
@ JPEG_MARKER_SOF0
Definition:
cbs_jpeg.h:29
JPEGRawHuffmanTableSpecification::Lh
uint16_t Lh
Definition:
cbs_jpeg.h:106
AVBufferRef
A reference to a data buffer.
Definition:
buffer.h:82
JPEGRawFrameHeader
Definition:
cbs_jpeg.h:53
JPEG_MAX_HEIGHT
@ JPEG_MAX_HEIGHT
Definition:
cbs_jpeg.h:48
JPEGRawComment
Definition:
cbs_jpeg.h:116
JPEGRawFrameHeader::Lf
uint16_t Lf
Definition:
cbs_jpeg.h:54
JPEGRawHuffmanTable
Definition:
cbs_jpeg.h:98
JPEG_MARKER_SOF2
@ JPEG_MARKER_SOF2
Definition:
cbs_jpeg.h:31
JPEGRawApplicationData::Ap
uint8_t * Ap
Definition:
cbs_jpeg.h:112
JPEGRawScanHeader::Ta
uint8_t Ta[JPEG_MAX_COMPONENTS]
Definition:
cbs_jpeg.h:72
JPEGRawHuffmanTable::V
uint8_t V[224]
Definition:
cbs_jpeg.h:102
JPEGRawComment::Cm
uint8_t * Cm
Definition:
cbs_jpeg.h:118
JPEGRawScanHeader::Se
uint8_t Se
Definition:
cbs_jpeg.h:75
JPEGRawScanHeader
Definition:
cbs_jpeg.h:66
JPEG_MARKER_APPN
@ JPEG_MARKER_APPN
Definition:
cbs_jpeg.h:40
Generated on Wed Aug 24 2022 21:37:29 for FFmpeg by
1.8.17