types.h
Go to the documentation of this file.
/* Copyright (c) the JPEG XL Project Authors. All rights reserved.
*
* Use of this source code is governed by a BSD-style
* license that can be found in the LICENSE file.
*/
#ifndef JXL_TYPES_H_
#define JXL_TYPES_H_
#include <stddef.h>
#include <stdint.h>
#include "jxl/jxl_export.h"
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
#endif
#define JXL_BOOL int
#define JXL_TRUE 1
#define JXL_FALSE 0
typedef enum {
JXL_TYPE_FLOAT = 0,
JXL_TYPE_UINT8 = 2,
JXL_TYPE_UINT16 = 3,
JXL_TYPE_FLOAT16 = 5,
} JxlDataType;
/* DEPRECATED: bit-packed 1-bit data type. Use JXL_TYPE_UINT8 instead.
*/
static const int JXL_DEPRECATED JXL_TYPE_BOOLEAN = 1;
/* DEPRECATED: uint32_t data type. Use JXL_TYPE_FLOAT instead.
*/
static const int JXL_DEPRECATED JXL_TYPE_UINT32 = 4;
typedef enum {
JXL_NATIVE_ENDIAN = 0,
JXL_LITTLE_ENDIAN = 1,
JXL_BIG_ENDIAN = 2,
} JxlEndianness;
typedef struct {
uint32_t num_channels;
JxlDataType data_type;
JxlEndianness endianness;
size_t align;
} JxlPixelFormat;
typedef char JxlBoxType[4];
typedef enum {
// after completed kRegularFrames
kFrames = 0,
// after completed DC (1:8)
kDC = 1,
// after completed AC passes that are the last pass for their resolution
// target.
kLastPasses = 2,
// after completed AC passes that are not the last pass for their resolution
// target.
kPasses = 3,
// during DC frame when lower resolution are completed (1:32, 1:16)
kDCProgressive = 4,
// after completed groups
kDCGroups = 5,
// after completed groups
kGroups = 6,
} JxlProgressiveDetail;
#if defined(__cplusplus) || defined(c_plusplus)
}
#endif
#endif /* JXL_TYPES_H_ */
JxlBoxType
char JxlBoxType[4]
Definition: types.h:116
JxlDataType
JxlDataType
Definition: types.h:39
JxlEndianness
JxlEndianness
Definition: types.h:68
JxlProgressiveDetail
JxlProgressiveDetail
Definition: types.h:126
JXL_TYPE_UINT16
@ JXL_TYPE_UINT16
Definition: types.h:52
JXL_TYPE_FLOAT
@ JXL_TYPE_FLOAT
Definition: types.h:44
JXL_TYPE_FLOAT16
@ JXL_TYPE_FLOAT16
Definition: types.h:55
JXL_TYPE_UINT8
@ JXL_TYPE_UINT8
Definition: types.h:48
JXL_BIG_ENDIAN
@ JXL_BIG_ENDIAN
Definition: types.h:77
JXL_LITTLE_ENDIAN
@ JXL_LITTLE_ENDIAN
Definition: types.h:75
JXL_NATIVE_ENDIAN
@ JXL_NATIVE_ENDIAN
Definition: types.h:73
JxlPixelFormat
Definition: types.h:87
JxlPixelFormat::align
size_t align
Definition: types.h:111
JxlPixelFormat::num_channels
uint32_t num_channels
Definition: types.h:96
JxlPixelFormat::data_type
JxlDataType data_type
Definition: types.h:100
JxlPixelFormat::endianness
JxlEndianness endianness
Definition: types.h:106