LIBJXL_DOC
jxl
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
{
46
JXL_TYPE_FLOAT
= 0,
47
50
JXL_TYPE_UINT8
= 2,
51
54
JXL_TYPE_UINT16
= 3,
55
57
JXL_TYPE_FLOAT16
= 5,
58
}
JxlDataType
;
59
62
typedef
enum
{
67
JXL_NATIVE_ENDIAN
= 0,
69
JXL_LITTLE_ENDIAN
= 1,
71
JXL_BIG_ENDIAN
= 2,
72
}
JxlEndianness
;
73
80
typedef
struct
{
89
uint32_t
num_channels
;
90
93
JxlDataType
data_type
;
94
98
JxlEndianness
endianness
;
99
103
size_t
align
;
104
}
JxlPixelFormat
;
105
109
typedef
enum
{
117
JXL_BIT_DEPTH_FROM_PIXEL_FORMAT
= 0,
118
124
JXL_BIT_DEPTH_FROM_CODESTREAM
= 1,
125
128
JXL_BIT_DEPTH_CUSTOM
= 2,
129
}
JxlBitDepthType
;
130
133
typedef
struct
{
135
JxlBitDepthType
type
;
136
138
uint32_t
bits_per_sample
;
139
141
uint32_t
exponent_bits_per_sample
;
142
}
JxlBitDepth
;
143
146
typedef
char
JxlBoxType
[4];
147
148
#ifdef __cplusplus
149
}
150
#endif
151
152
#endif
/* JXL_TYPES_H_ */
153
JxlBitDepthType
JxlBitDepthType
Definition:
types.h:109
JxlPixelFormat::endianness
JxlEndianness endianness
Definition:
types.h:98
JXL_TYPE_FLOAT
Definition:
types.h:46
JxlBitDepth
Definition:
types.h:133
JXL_BIG_ENDIAN
Definition:
types.h:71
JxlBitDepth::type
JxlBitDepthType type
Definition:
types.h:135
JxlPixelFormat::data_type
JxlDataType data_type
Definition:
types.h:93
JXL_BIT_DEPTH_CUSTOM
Definition:
types.h:128
JxlDataType
JxlDataType
Definition:
types.h:41
JXL_TYPE_UINT16
Definition:
types.h:54
JxlBoxType
char JxlBoxType[4]
Definition:
types.h:146
JXL_TYPE_FLOAT16
Definition:
types.h:57
JXL_BIT_DEPTH_FROM_CODESTREAM
Definition:
types.h:124
JXL_NATIVE_ENDIAN
Definition:
types.h:67
JxlPixelFormat
Definition:
types.h:80
JXL_LITTLE_ENDIAN
Definition:
types.h:69
JXL_TYPE_UINT8
Definition:
types.h:50
JXL_BIT_DEPTH_FROM_PIXEL_FORMAT
Definition:
types.h:117
JxlPixelFormat::align
size_t align
Definition:
types.h:103
JxlBitDepth::bits_per_sample
uint32_t bits_per_sample
Definition:
types.h:138
JxlEndianness
JxlEndianness
Definition:
types.h:62
JxlPixelFormat::num_channels
uint32_t num_channels
Definition:
types.h:89
JxlBitDepth::exponent_bits_per_sample
uint32_t exponent_bits_per_sample
Definition:
types.h:141
Generated by
1.8.14