LIBJXL
types.h
Go to the documentation of this file.
1/* Copyright (c) the JPEG XL Project Authors. All rights reserved.
2 *
3 * Use of this source code is governed by a BSD-style
4 * license that can be found in the LICENSE file.
5 */
6
13#ifndef JXL_TYPES_H_
14#define JXL_TYPES_H_
15
16#include <jxl/jxl_export.h>
17#include <stddef.h>
18#include <stdint.h>
19
20#if defined(__cplusplus) || defined(c_plusplus)
21extern "C" {
22#endif
23
30#define JXL_BOOL int
32#define JXL_TRUE 1
34#define JXL_FALSE 0
35
38typedef enum {
44
48
52
56
57/* DEPRECATED: bit-packed 1-bit data type. Use JXL_TYPE_UINT8 instead.
58 */
59JXL_DEPRECATED static const int JXL_TYPE_BOOLEAN = 1;
60
61/* DEPRECATED: uint32_t data type. Use JXL_TYPE_FLOAT instead.
62 */
63JXL_DEPRECATED static const int JXL_TYPE_UINT32 = 4;
64
67typedef enum {
78
85typedef struct {
94 uint32_t num_channels;
95
99
105
109 size_t align;
111
114typedef enum {
123
130
135
138typedef struct {
141
144
148
151typedef char JxlBoxType[4];
152
161typedef enum {
162 // after completed kRegularFrames
163 kFrames = 0,
164 // after completed DC (1:8)
165 kDC = 1,
166 // after completed AC passes that are the last pass for their resolution
167 // target.
168 kLastPasses = 2,
169 // after completed AC passes that are not the last pass for their resolution
170 // target.
171 kPasses = 3,
172 // during DC frame when lower resolution are completed (1:32, 1:16)
173 kDCProgressive = 4,
174 // after completed groups
175 kDCGroups = 5,
176 // after completed groups
177 kGroups = 6,
179
180#if defined(__cplusplus) || defined(c_plusplus)
181}
182#endif
183
184#endif /* JXL_TYPES_H_ */
185
char JxlBoxType[4]
Definition: types.h:151
JxlBitDepthType
Definition: types.h:114
JxlDataType
Definition: types.h:38
JxlEndianness
Definition: types.h:67
JxlProgressiveDetail
Definition: types.h:161
@ JXL_BIT_DEPTH_FROM_PIXEL_FORMAT
Definition: types.h:122
@ JXL_BIT_DEPTH_FROM_CODESTREAM
Definition: types.h:129
@ JXL_BIT_DEPTH_CUSTOM
Definition: types.h:133
@ JXL_TYPE_UINT16
Definition: types.h:51
@ JXL_TYPE_FLOAT
Definition: types.h:43
@ JXL_TYPE_FLOAT16
Definition: types.h:54
@ JXL_TYPE_UINT8
Definition: types.h:47
@ JXL_BIG_ENDIAN
Definition: types.h:76
@ JXL_LITTLE_ENDIAN
Definition: types.h:74
@ JXL_NATIVE_ENDIAN
Definition: types.h:72
Definition: types.h:138
uint32_t bits_per_sample
Definition: types.h:143
JxlBitDepthType type
Definition: types.h:140
uint32_t exponent_bits_per_sample
Definition: types.h:146
Definition: types.h:85
size_t align
Definition: types.h:109
uint32_t num_channels
Definition: types.h:94
JxlDataType data_type
Definition: types.h:98
JxlEndianness endianness
Definition: types.h:104