LIBJXL_DOC
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 #ifdef __cplusplus
20 extern "C" {
21 #endif
22 
29 #define JXL_BOOL int
30 
31 #define JXL_TRUE 1
32 
33 #define JXL_FALSE 0
34 
35 #define TO_JXL_BOOL(C) (!!(C) ? JXL_TRUE : JXL_FALSE)
36 
37 #define FROM_JXL_BOOL(C) (static_cast<bool>(C))
38 
41 typedef enum {
47 
51 
55 
58 } JxlDataType;
59 
62 typedef enum {
73 
80 typedef struct {
89  uint32_t num_channels;
90 
94 
99 
103  size_t align;
105 
109 typedef enum {
118 
125 
130 
133 typedef struct {
136 
138  uint32_t bits_per_sample;
139 
142 } JxlBitDepth;
143 
146 typedef char JxlBoxType[4];
147 
148 #ifdef __cplusplus
149 }
150 #endif
151 
152 #endif /* JXL_TYPES_H_ */
153 
JxlBitDepthType
Definition: types.h:109
JxlEndianness endianness
Definition: types.h:98
Definition: types.h:46
Definition: types.h:133
Definition: types.h:71
JxlBitDepthType type
Definition: types.h:135
JxlDataType data_type
Definition: types.h:93
Definition: types.h:128
JxlDataType
Definition: types.h:41
Definition: types.h:54
char JxlBoxType[4]
Definition: types.h:146
Definition: types.h:57
Definition: types.h:124
Definition: types.h:67
Definition: types.h:80
Definition: types.h:69
Definition: types.h:50
Definition: types.h:117
size_t align
Definition: types.h:103
uint32_t bits_per_sample
Definition: types.h:138
JxlEndianness
Definition: types.h:62
uint32_t num_channels
Definition: types.h:89
uint32_t exponent_bits_per_sample
Definition: types.h:141