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 <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 */
60static const int JXL_DEPRECATED JXL_TYPE_BOOLEAN = 1;
61
62/* DEPRECATED: uint32_t data type. Use JXL_TYPE_FLOAT instead.
63 */
64static const int JXL_DEPRECATED JXL_TYPE_UINT32 = 4;
65
68typedef enum {
79
87typedef struct {
96 uint32_t num_channels;
97
101
107
111 size_t align;
113
116typedef char JxlBoxType[4];
117
126typedef enum {
127 // after completed kRegularFrames
128 kFrames = 0,
129 // after completed DC (1:8)
130 kDC = 1,
131 // after completed AC passes that are the last pass for their resolution
132 // target.
133 kLastPasses = 2,
134 // after completed AC passes that are not the last pass for their resolution
135 // target.
136 kPasses = 3,
137 // during DC frame when lower resolution are completed (1:32, 1:16)
138 kDCProgressive = 4,
139 // after completed groups
140 kDCGroups = 5,
141 // after completed groups
142 kGroups = 6,
144
145#if defined(__cplusplus) || defined(c_plusplus)
146}
147#endif
148
149#endif /* JXL_TYPES_H_ */
150
char JxlBoxType[4]
Definition: types.h:116
JxlDataType
Definition: types.h:39
JxlEndianness
Definition: types.h:68
JxlProgressiveDetail
Definition: types.h:126
@ 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:87
size_t align
Definition: types.h:111
uint32_t num_channels
Definition: types.h:96
JxlDataType data_type
Definition: types.h:100
JxlEndianness endianness
Definition: types.h:106