LIBJXL
Loading...
Searching...
No Matches
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 <stddef.h>
17#include <stdint.h>
18
19#include "jxl/jxl_export.h"
20
21#if defined(__cplusplus) || defined(c_plusplus)
22extern "C" {
23#endif
24
31#define JXL_BOOL int
33#define JXL_TRUE 1
35#define JXL_FALSE 0
36
39typedef enum {
45
49
53
57
58/* DEPRECATED: bit-packed 1-bit data type. Use JXL_TYPE_UINT8 instead.
59 */
60JXL_DEPRECATED static const int JXL_TYPE_BOOLEAN = 1;
61
62/* DEPRECATED: uint32_t data type. Use JXL_TYPE_FLOAT instead.
63 */
64JXL_DEPRECATED static const int JXL_TYPE_UINT32 = 4;
65
68typedef enum {
79
86typedef struct {
95 uint32_t num_channels;
96
100
106
110 size_t align;
112
115typedef enum {
124
131
136
139typedef struct {
142
145
149
152typedef char JxlBoxType[4];
153
162typedef enum {
163 // after completed kRegularFrames
164 kFrames = 0,
165 // after completed DC (1:8)
166 kDC = 1,
167 // after completed AC passes that are the last pass for their resolution
168 // target.
169 kLastPasses = 2,
170 // after completed AC passes that are not the last pass for their resolution
171 // target.
172 kPasses = 3,
173 // during DC frame when lower resolution are completed (1:32, 1:16)
174 kDCProgressive = 4,
175 // after completed groups
176 kDCGroups = 5,
177 // after completed groups
178 kGroups = 6,
180
181#if defined(__cplusplus) || defined(c_plusplus)
182}
183#endif
184
185#endif /* JXL_TYPES_H_ */
186
char JxlBoxType[4]
Definition types.h:152
JxlBitDepthType
Definition types.h:115
JxlDataType
Definition types.h:39
JxlEndianness
Definition types.h:68
JxlProgressiveDetail
Definition types.h:162
@ JXL_BIT_DEPTH_FROM_PIXEL_FORMAT
Definition types.h:123
@ JXL_BIT_DEPTH_FROM_CODESTREAM
Definition types.h:130
@ JXL_BIT_DEPTH_CUSTOM
Definition types.h:134
@ JXL_TYPE_UINT16
Definition types.h:52
@ JXL_TYPE_FLOAT
Definition types.h:44
@ JXL_TYPE_FLOAT16
Definition types.h:55
@ JXL_TYPE_UINT8
Definition types.h:48
@ JXL_BIG_ENDIAN
Definition types.h:77
@ JXL_LITTLE_ENDIAN
Definition types.h:75
@ JXL_NATIVE_ENDIAN
Definition types.h:73
Definition types.h:139
uint32_t bits_per_sample
Definition types.h:144
JxlBitDepthType type
Definition types.h:141
uint32_t exponent_bits_per_sample
Definition types.h:147
Definition types.h:86
size_t align
Definition types.h:110
uint32_t num_channels
Definition types.h:95
JxlDataType data_type
Definition types.h:99
JxlEndianness endianness
Definition types.h:105