FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
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 {
33 
39 
43 };
44 
45 enum {
47 
48  JPEG_MAX_HEIGHT = 65535,
49  JPEG_MAX_WIDTH = 65535,
50 };
51 
52 
53 typedef struct JPEGRawFrameHeader {
54  uint16_t Lf;
56  uint16_t Y;
57  uint16_t X;
58  uint16_t Nf;
59 
65 
66 typedef struct JPEGRawScanHeader {
67  uint16_t Ls;
69 
73 
79 
80 typedef struct JPEGRawScan {
83  size_t data_size;
85 } JPEGRawScan;
86 
87 typedef struct JPEGRawQuantisationTable {
90  uint16_t Q[64];
92 
94  uint16_t Lq;
97 
98 typedef struct JPEGRawHuffmanTable {
101  uint8_t L[16];
102  uint8_t V[224];
104 
106  uint16_t Lh;
109 
110 typedef struct JPEGRawApplicationData {
111  uint16_t Lp;
115 
116 typedef struct JPEGRawComment {
117  uint16_t Lc;
121 
122 
124  // Write buffer.
128 
129 
130 #endif /* AVCODEC_CBS_JPEG_H */
uint8_t Td[JPEG_MAX_COMPONENTS]
Definition: cbs_jpeg.h:71
AVBufferRef * data_ref
Definition: cbs_jpeg.h:84
size_t data_size
Definition: cbs_jpeg.h:83
uint8_t
uint8_t V[224]
Definition: cbs_jpeg.h:102
AVBufferRef * Ap_ref
Definition: cbs_jpeg.h:113
uint16_t Lc
Definition: cbs_jpeg.h:117
uint8_t L[16]
Definition: cbs_jpeg.h:101
uint8_t * Cm
Definition: cbs_jpeg.h:118
JPEGRawScanHeader header
Definition: cbs_jpeg.h:81
uint8_t V[JPEG_MAX_COMPONENTS]
Definition: cbs_jpeg.h:62
uint8_t Cs[JPEG_MAX_COMPONENTS]
Definition: cbs_jpeg.h:70
uint8_t C[JPEG_MAX_COMPONENTS]
Definition: cbs_jpeg.h:60
JPEGRawQuantisationTable table[4]
Definition: cbs_jpeg.h:95
uint8_t H[JPEG_MAX_COMPONENTS]
Definition: cbs_jpeg.h:61
refcounted data buffer API
A reference to a data buffer.
Definition: buffer.h:81
uint16_t Ls
Definition: cbs_jpeg.h:67
uint8_t * data
Definition: cbs_jpeg.h:82
uint8_t Ta[JPEG_MAX_COMPONENTS]
Definition: cbs_jpeg.h:72
uint8_t Tq[JPEG_MAX_COMPONENTS]
Definition: cbs_jpeg.h:63
JPEGRawHuffmanTable table[8]
Definition: cbs_jpeg.h:107
AVBufferRef * Cm_ref
Definition: cbs_jpeg.h:119