LIBJXL: /build/libjxl/src/libjxl/lib/include/jxl/types.h Source File

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
11#ifndef JXL_TYPES_H_
12#define JXL_TYPES_H_
13
14#include <stddef.h>
15#include <stdint.h>
16
17#if defined(__cplusplus) || defined(c_plusplus)
18extern "C" {
19#endif
20
27#define JXL_BOOL int
29#define JXL_TRUE 1
31#define JXL_FALSE 0
32
35 typedef enum {
40 JXL_TYPE_FLOAT = 0,
41
46 JXL_TYPE_BOOLEAN,
47
50 JXL_TYPE_UINT8,
51
54 JXL_TYPE_UINT16,
55
58 JXL_TYPE_UINT32,
59
61 JXL_TYPE_FLOAT16,
62} JxlDataType;
63
66 typedef enum {
71 JXL_NATIVE_ENDIAN = 0,
73 JXL_LITTLE_ENDIAN = 1,
75 JXL_BIG_ENDIAN = 2,
76} JxlEndianness;
77
85 typedef struct {
94 uint32_t num_channels;
95
98 JxlDataType data_type;
99
104 JxlEndianness endianness;
105
109 size_t align;
110} JxlPixelFormat;
111
112#if defined(__cplusplus) || defined(c_plusplus)
113}
114#endif
115
116#endif /* JXL_TYPES_H_ */
JxlPixelFormat
Definition: types.h:85
JxlPixelFormat::align
size_t align
Definition: types.h:109
JxlPixelFormat::num_channels
uint32_t num_channels
Definition: types.h:94
JxlPixelFormat::data_type
JxlDataType data_type
Definition: types.h:98
JxlPixelFormat::endianness
JxlEndianness endianness
Definition: types.h:104
JxlDataType
JxlDataType
Definition: types.h:35
JXL_TYPE_UINT16
@ JXL_TYPE_UINT16
Definition: types.h:54
JXL_TYPE_FLOAT
@ JXL_TYPE_FLOAT
Definition: types.h:40
JXL_TYPE_FLOAT16
@ JXL_TYPE_FLOAT16
Definition: types.h:61
JXL_TYPE_BOOLEAN
@ JXL_TYPE_BOOLEAN
Definition: types.h:46
JXL_TYPE_UINT8
@ JXL_TYPE_UINT8
Definition: types.h:50
JXL_TYPE_UINT32
@ JXL_TYPE_UINT32
Definition: types.h:58
JxlEndianness
JxlEndianness
Definition: types.h:66
JXL_BIG_ENDIAN
@ JXL_BIG_ENDIAN
Definition: types.h:75
JXL_LITTLE_ENDIAN
@ JXL_LITTLE_ENDIAN
Definition: types.h:73
JXL_NATIVE_ENDIAN
@ JXL_NATIVE_ENDIAN
Definition: types.h:71