LIBJXL

Loading...
Searching...
No Matches
encode.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_ENCODE_H_
14#define JXL_ENCODE_H_
15
16#include <jxl/cms_interface.h>
17#include <jxl/codestream_header.h>
18#include <jxl/color_encoding.h>
19#include <jxl/jxl_export.h>
20#include <jxl/memory_manager.h>
21#include <jxl/parallel_runner.h>
22#include <jxl/stats.h>
23#include <jxl/types.h>
24#include <jxl/version.h> // TODO(eustas): remove before v1.0
25#include <stddef.h>
26#include <stdint.h>
27
28#ifdef __cplusplus
29 extern "C" {
30#endif
31
39JXL_EXPORT uint32_t JxlEncoderVersion(void);
40
47 typedef struct JxlEncoderStruct JxlEncoder;
48
57 typedef struct JxlEncoderFrameSettingsStruct JxlEncoderFrameSettings;
58
62 typedef enum {
66 JXL_ENC_SUCCESS = 0,
67
70 JXL_ENC_ERROR = 1,
71
74 JXL_ENC_NEED_MORE_OUTPUT = 2,
75
76} JxlEncoderStatus;
77
83 typedef enum {
86 JXL_ENC_ERR_OK = 0,
87
90 JXL_ENC_ERR_GENERIC = 1,
91
95 JXL_ENC_ERR_OOM = 2,
96
100 JXL_ENC_ERR_JBRD = 3,
101
104 JXL_ENC_ERR_BAD_INPUT = 4,
105
110 JXL_ENC_ERR_NOT_SUPPORTED = 0x80,
111
116 JXL_ENC_ERR_API_USAGE = 0x81,
117
118} JxlEncoderError;
119
126 typedef enum {
132 JXL_ENC_FRAME_SETTING_EFFORT = 0,
133
138 JXL_ENC_FRAME_SETTING_DECODING_SPEED = 1,
139
146 JXL_ENC_FRAME_SETTING_RESAMPLING = 2,
147
153 JXL_ENC_FRAME_SETTING_EXTRA_CHANNEL_RESAMPLING = 3,
154
164 JXL_ENC_FRAME_SETTING_ALREADY_DOWNSAMPLED = 4,
165
171 JXL_ENC_FRAME_SETTING_PHOTON_NOISE = 5,
172
177 JXL_ENC_FRAME_SETTING_NOISE = 6,
178
182 JXL_ENC_FRAME_SETTING_DOTS = 7,
183
187 JXL_ENC_FRAME_SETTING_PATCHES = 8,
188
192 JXL_ENC_FRAME_SETTING_EPF = 9,
193
197 JXL_ENC_FRAME_SETTING_GABORISH = 10,
198
203 JXL_ENC_FRAME_SETTING_MODULAR = 11,
204
208 JXL_ENC_FRAME_SETTING_KEEP_INVISIBLE = 12,
209
214 JXL_ENC_FRAME_SETTING_GROUP_ORDER = 13,
215
220 JXL_ENC_FRAME_SETTING_GROUP_ORDER_CENTER_X = 14,
221
225 JXL_ENC_FRAME_SETTING_GROUP_ORDER_CENTER_Y = 15,
226
230 JXL_ENC_FRAME_SETTING_RESPONSIVE = 16,
231
236 JXL_ENC_FRAME_SETTING_PROGRESSIVE_AC = 17,
237
242 JXL_ENC_FRAME_SETTING_QPROGRESSIVE_AC = 18,
243
248 JXL_ENC_FRAME_SETTING_PROGRESSIVE_DC = 19,
249
254 JXL_ENC_FRAME_SETTING_CHANNEL_COLORS_GLOBAL_PERCENT = 20,
255
260 JXL_ENC_FRAME_SETTING_CHANNEL_COLORS_GROUP_PERCENT = 21,
261
265 JXL_ENC_FRAME_SETTING_PALETTE_COLORS = 22,
266
270 JXL_ENC_FRAME_SETTING_LOSSY_PALETTE = 23,
271
277 JXL_ENC_FRAME_SETTING_COLOR_TRANSFORM = 24,
278
286 JXL_ENC_FRAME_SETTING_MODULAR_COLOR_SPACE = 25,
287
290 JXL_ENC_FRAME_SETTING_MODULAR_GROUP_SIZE = 26,
291
297 JXL_ENC_FRAME_SETTING_MODULAR_PREDICTOR = 27,
298
303 JXL_ENC_FRAME_SETTING_MODULAR_MA_TREE_LEARNING_PERCENT = 28,
304
311 JXL_ENC_FRAME_SETTING_MODULAR_NB_PREV_CHANNELS = 29,
312
316 JXL_ENC_FRAME_SETTING_JPEG_RECON_CFL = 30,
317
327 JXL_ENC_FRAME_INDEX_BOX = 31,
328
334 JXL_ENC_FRAME_SETTING_BROTLI_EFFORT = 32,
335
341 JXL_ENC_FRAME_SETTING_JPEG_COMPRESS_BOXES = 33,
342
357 JXL_ENC_FRAME_SETTING_BUFFERING = 34,
358
366 JXL_ENC_FRAME_SETTING_JPEG_KEEP_EXIF = 35,
367
374 JXL_ENC_FRAME_SETTING_JPEG_KEEP_XMP = 36,
375
381 JXL_ENC_FRAME_SETTING_JPEG_KEEP_JUMBF = 37,
382
389 JXL_ENC_FRAME_SETTING_USE_FULL_IMAGE_HEURISTICS = 38,
390
394 JXL_ENC_FRAME_SETTING_DISABLE_PERCEPTUAL_HEURISTICS = 39,
395
399 JXL_ENC_FRAME_SETTING_FILL_ENUM = 65535,
400
401} JxlEncoderFrameSettingId;
402
415JXL_EXPORT JxlEncoder* JxlEncoderCreate(const JxlMemoryManager* memory_manager);
416
424JXL_EXPORT void JxlEncoderReset(JxlEncoder* enc);
425
431JXL_EXPORT void JxlEncoderDestroy(JxlEncoder* enc);
432
442JXL_EXPORT void JxlEncoderSetCms(JxlEncoder* enc, JxlCmsInterface cms);
443
456JXL_EXPORT JxlEncoderStatus
457 JxlEncoderSetParallelRunner(JxlEncoder* enc, JxlParallelRunner parallel_runner,
458 void* parallel_runner_opaque);
459
467JXL_EXPORT JxlEncoderError JxlEncoderGetError(JxlEncoder* enc);
468
499JXL_EXPORT JxlEncoderStatus JxlEncoderProcessOutput(JxlEncoder* enc,
500 uint8_t** next_out,
501 size_t* avail_out);
502
537JXL_EXPORT JxlEncoderStatus
538 JxlEncoderSetFrameHeader(JxlEncoderFrameSettings* frame_settings,
539 const JxlFrameHeader* frame_header);
540
552JXL_EXPORT JxlEncoderStatus JxlEncoderSetExtraChannelBlendInfo(
553 JxlEncoderFrameSettings* frame_settings, size_t index,
554 const JxlBlendInfo* blend_info);
555
576JXL_EXPORT JxlEncoderStatus JxlEncoderSetFrameName(
577 JxlEncoderFrameSettings* frame_settings, const char* frame_name);
578
594JXL_EXPORT JxlEncoderStatus JxlEncoderSetFrameBitDepth(
595 JxlEncoderFrameSettings* frame_settings, const JxlBitDepth* bit_depth);
596
627JXL_EXPORT JxlEncoderStatus
628 JxlEncoderAddJPEGFrame(const JxlEncoderFrameSettings* frame_settings,
629 const uint8_t* buffer, size_t size);
630
699JXL_EXPORT JxlEncoderStatus JxlEncoderAddImageFrame(
700 const JxlEncoderFrameSettings* frame_settings,
701 const JxlPixelFormat* pixel_format, const void* buffer, size_t size);
702
732 struct JxlEncoderOutputProcessor {
738 void* opaque;
739
757 void* (*get_buffer)(void* opaque, size_t* size);
758
768 void (*release_buffer)(void* opaque, size_t written_bytes);
769
780 void (*seek)(void* opaque, uint64_t position);
781
793 void (*set_finalized_position)(void* opaque, uint64_t finalized_position);
794};
795
808JXL_EXPORT JxlEncoderStatus JxlEncoderSetOutputProcessor(
809 JxlEncoder* enc, struct JxlEncoderOutputProcessor output_processor);
810
824JXL_EXPORT JxlEncoderStatus JxlEncoderFlushInput(JxlEncoder* enc);
825
830 struct JxlChunkedFrameInputSource {
835 void* opaque;
836
849 void (*get_color_channels_pixel_format)(void* opaque,
850 JxlPixelFormat* pixel_format);
851
875 const void* (*get_color_channel_data_at)(void* opaque, size_t xpos,
876 size_t ypos, size_t xsize,
877 size_t ysize, size_t* row_offset);
878
892 void (*get_extra_channel_pixel_format)(void* opaque, size_t ec_index,
893 JxlPixelFormat* pixel_format);
894
919 const void* (*get_extra_channel_data_at)(void* opaque, size_t ec_index,
920 size_t xpos, size_t ypos,
921 size_t xsize, size_t ysize,
922 size_t* row_offset);
923
934 void (*release_buffer)(void* opaque, const void* buf);
935};
936
957JXL_EXPORT JxlEncoderStatus JxlEncoderAddChunkedFrame(
958 const JxlEncoderFrameSettings* frame_settings, JXL_BOOL is_last_frame,
959 struct JxlChunkedFrameInputSource chunked_frame_input);
960
984JXL_EXPORT JxlEncoderStatus JxlEncoderSetExtraChannelBuffer(
985 const JxlEncoderFrameSettings* frame_settings,
986 const JxlPixelFormat* pixel_format, const void* buffer, size_t size,
987 uint32_t index);
988
1057JXL_EXPORT JxlEncoderStatus JxlEncoderAddBox(JxlEncoder* enc,
1058 const JxlBoxType type,
1059 const uint8_t* contents,
1060 size_t size,
1061 JXL_BOOL compress_box);
1062
1074JXL_EXPORT JxlEncoderStatus JxlEncoderUseBoxes(JxlEncoder* enc);
1075
1091JXL_EXPORT void JxlEncoderCloseBoxes(JxlEncoder* enc);
1092
1105JXL_EXPORT void JxlEncoderCloseFrames(JxlEncoder* enc);
1106
1121JXL_EXPORT void JxlEncoderCloseInput(JxlEncoder* enc);
1122
1136JXL_EXPORT JxlEncoderStatus
1137 JxlEncoderSetColorEncoding(JxlEncoder* enc, const JxlColorEncoding* color);
1138
1152JXL_EXPORT JxlEncoderStatus JxlEncoderSetICCProfile(JxlEncoder* enc,
1153 const uint8_t* icc_profile,
1154 size_t size);
1155
1165JXL_EXPORT void JxlEncoderInitBasicInfo(JxlBasicInfo* info);
1166
1177JXL_EXPORT void JxlEncoderInitFrameHeader(JxlFrameHeader* frame_header);
1178
1186JXL_EXPORT void JxlEncoderInitBlendInfo(JxlBlendInfo* blend_info);
1187
1203JXL_EXPORT JxlEncoderStatus JxlEncoderSetBasicInfo(JxlEncoder* enc,
1204 const JxlBasicInfo* info);
1205
1222JXL_EXPORT JxlEncoderStatus JxlEncoderSetUpsamplingMode(JxlEncoder* enc,
1223 int64_t factor,
1224 int64_t mode);
1225
1236JXL_EXPORT void JxlEncoderInitExtraChannelInfo(JxlExtraChannelType type,
1237 JxlExtraChannelInfo* info);
1238
1249JXL_EXPORT JxlEncoderStatus JxlEncoderSetExtraChannelInfo(
1250 JxlEncoder* enc, size_t index, const JxlExtraChannelInfo* info);
1251
1267JXL_EXPORT JxlEncoderStatus JxlEncoderSetExtraChannelName(JxlEncoder* enc,
1268 size_t index,
1269 const char* name,
1270 size_t size);
1271
1287JXL_EXPORT JxlEncoderStatus JxlEncoderFrameSettingsSetOption(
1288 JxlEncoderFrameSettings* frame_settings, JxlEncoderFrameSettingId option,
1289 int64_t value);
1290
1306JXL_EXPORT JxlEncoderStatus JxlEncoderFrameSettingsSetFloatOption(
1307 JxlEncoderFrameSettings* frame_settings, JxlEncoderFrameSettingId option,
1308 float value);
1309
1328JXL_EXPORT JxlEncoderStatus JxlEncoderUseContainer(JxlEncoder* enc,
1329 JXL_BOOL use_container);
1330
1345JXL_EXPORT JxlEncoderStatus
1346 JxlEncoderStoreJPEGMetadata(JxlEncoder* enc, JXL_BOOL store_jpeg_metadata);
1347
1382JXL_EXPORT JxlEncoderStatus JxlEncoderSetCodestreamLevel(JxlEncoder* enc,
1383 int level);
1384
1405JXL_EXPORT int JxlEncoderGetRequiredCodestreamLevel(const JxlEncoder* enc);
1406
1425JXL_EXPORT JxlEncoderStatus JxlEncoderSetFrameLossless(
1426 JxlEncoderFrameSettings* frame_settings, JXL_BOOL lossless);
1427
1442JXL_EXPORT JxlEncoderStatus JxlEncoderSetFrameDistance(
1443 JxlEncoderFrameSettings* frame_settings, float distance);
1444
1459JXL_EXPORT JxlEncoderStatus JxlEncoderSetExtraChannelDistance(
1460 JxlEncoderFrameSettings* frame_settings, size_t index, float distance);
1461
1497JXL_EXPORT float JxlEncoderDistanceFromQuality(float quality);
1498
1514JXL_EXPORT JxlEncoderFrameSettings* JxlEncoderFrameSettingsCreate(
1515 JxlEncoder* enc, const JxlEncoderFrameSettings* source);
1516
1523JXL_EXPORT void JxlColorEncodingSetToSRGB(JxlColorEncoding* color_encoding,
1524 JXL_BOOL is_gray);
1525
1532JXL_EXPORT void JxlColorEncodingSetToLinearSRGB(
1533 JxlColorEncoding* color_encoding, JXL_BOOL is_gray);
1534
1543JXL_EXPORT void JxlEncoderAllowExpertOptions(JxlEncoder* enc);
1544
1561 typedef void (*JxlDebugImageCallback)(void* opaque, const char* label,
1562 size_t xsize, size_t ysize,
1563 const JxlColorEncoding* color,
1564 const uint16_t* pixels);
1565
1578JXL_EXPORT void JxlEncoderSetDebugImageCallback(
1579 JxlEncoderFrameSettings* frame_settings, JxlDebugImageCallback callback,
1580 void* opaque);
1581
1593JXL_EXPORT void JxlEncoderCollectStats(JxlEncoderFrameSettings* frame_settings,
1594 JxlEncoderStats* stats);
1595
1596#ifdef __cplusplus
1597}
1598#endif
1599
1600#endif /* JXL_ENCODE_H_ */
1601
cms_interface.h
Interface to allow the injection of different color management systems (CMSes, also called color mana...
codestream_header.h
Definitions of structs and enums for the metadata from the JPEG XL codestream headers (signature,...
color_encoding.h
Color Encoding definitions used by JPEG XL. All CIE units are for the standard 1931 2 degree observer...
JxlBoxType
char JxlBoxType[4]
Definition types.h:146
JXL_BOOL
#define JXL_BOOL
Definition types.h:29
JxlEncoderGetRequiredCodestreamLevel
JXL_EXPORT int JxlEncoderGetRequiredCodestreamLevel(const JxlEncoder *enc)
JxlEncoderSetCodestreamLevel
JXL_EXPORT JxlEncoderStatus JxlEncoderSetCodestreamLevel(JxlEncoder *enc, int level)
JxlEncoderAddJPEGFrame
JXL_EXPORT JxlEncoderStatus JxlEncoderAddJPEGFrame(const JxlEncoderFrameSettings *frame_settings, const uint8_t *buffer, size_t size)
JxlDebugImageCallback
void(* JxlDebugImageCallback)(void *opaque, const char *label, size_t xsize, size_t ysize, const JxlColorEncoding *color, const uint16_t *pixels)
Definition encode.h:1561
JxlEncoderInitBlendInfo
JXL_EXPORT void JxlEncoderInitBlendInfo(JxlBlendInfo *blend_info)
JxlEncoderCloseInput
JXL_EXPORT void JxlEncoderCloseInput(JxlEncoder *enc)
JxlEncoderSetParallelRunner
JXL_EXPORT JxlEncoderStatus JxlEncoderSetParallelRunner(JxlEncoder *enc, JxlParallelRunner parallel_runner, void *parallel_runner_opaque)
JxlEncoderCollectStats
JXL_EXPORT void JxlEncoderCollectStats(JxlEncoderFrameSettings *frame_settings, JxlEncoderStats *stats)
JxlEncoderStats
struct JxlEncoderStatsStruct JxlEncoderStats
Definition stats.h:29
JxlEncoderFrameSettingsSetOption
JXL_EXPORT JxlEncoderStatus JxlEncoderFrameSettingsSetOption(JxlEncoderFrameSettings *frame_settings, JxlEncoderFrameSettingId option, int64_t value)
JxlEncoder
struct JxlEncoderStruct JxlEncoder
Definition encode.h:47
JxlEncoderCreate
JXL_EXPORT JxlEncoder * JxlEncoderCreate(const JxlMemoryManager *memory_manager)
JxlEncoderSetExtraChannelBuffer
JXL_EXPORT JxlEncoderStatus JxlEncoderSetExtraChannelBuffer(const JxlEncoderFrameSettings *frame_settings, const JxlPixelFormat *pixel_format, const void *buffer, size_t size, uint32_t index)
JxlEncoderProcessOutput
JXL_EXPORT JxlEncoderStatus JxlEncoderProcessOutput(JxlEncoder *enc, uint8_t **next_out, size_t *avail_out)
JxlEncoderUseContainer
JXL_EXPORT JxlEncoderStatus JxlEncoderUseContainer(JxlEncoder *enc, JXL_BOOL use_container)
JxlColorEncodingSetToSRGB
JXL_EXPORT void JxlColorEncodingSetToSRGB(JxlColorEncoding *color_encoding, JXL_BOOL is_gray)
JxlEncoderSetCms
JXL_EXPORT void JxlEncoderSetCms(JxlEncoder *enc, JxlCmsInterface cms)
JxlEncoderSetFrameBitDepth
JXL_EXPORT JxlEncoderStatus JxlEncoderSetFrameBitDepth(JxlEncoderFrameSettings *frame_settings, const JxlBitDepth *bit_depth)
JxlEncoderInitFrameHeader
JXL_EXPORT void JxlEncoderInitFrameHeader(JxlFrameHeader *frame_header)
JxlEncoderDistanceFromQuality
JXL_EXPORT float JxlEncoderDistanceFromQuality(float quality)
JxlEncoderReset
JXL_EXPORT void JxlEncoderReset(JxlEncoder *enc)
JxlEncoderSetFrameLossless
JXL_EXPORT JxlEncoderStatus JxlEncoderSetFrameLossless(JxlEncoderFrameSettings *frame_settings, JXL_BOOL lossless)
JxlEncoderFrameSettingsSetFloatOption
JXL_EXPORT JxlEncoderStatus JxlEncoderFrameSettingsSetFloatOption(JxlEncoderFrameSettings *frame_settings, JxlEncoderFrameSettingId option, float value)
JxlEncoderUseBoxes
JXL_EXPORT JxlEncoderStatus JxlEncoderUseBoxes(JxlEncoder *enc)
JxlEncoderSetOutputProcessor
JXL_EXPORT JxlEncoderStatus JxlEncoderSetOutputProcessor(JxlEncoder *enc, struct JxlEncoderOutputProcessor output_processor)
JxlEncoderInitBasicInfo
JXL_EXPORT void JxlEncoderInitBasicInfo(JxlBasicInfo *info)
JxlEncoderSetBasicInfo
JXL_EXPORT JxlEncoderStatus JxlEncoderSetBasicInfo(JxlEncoder *enc, const JxlBasicInfo *info)
JxlEncoderSetColorEncoding
JXL_EXPORT JxlEncoderStatus JxlEncoderSetColorEncoding(JxlEncoder *enc, const JxlColorEncoding *color)
JxlEncoderSetExtraChannelBlendInfo
JXL_EXPORT JxlEncoderStatus JxlEncoderSetExtraChannelBlendInfo(JxlEncoderFrameSettings *frame_settings, size_t index, const JxlBlendInfo *blend_info)
JxlEncoderCloseBoxes
JXL_EXPORT void JxlEncoderCloseBoxes(JxlEncoder *enc)
JxlEncoderSetFrameDistance
JXL_EXPORT JxlEncoderStatus JxlEncoderSetFrameDistance(JxlEncoderFrameSettings *frame_settings, float distance)
JxlEncoderStatus
JxlEncoderStatus
Definition encode.h:62
JxlEncoderSetUpsamplingMode
JXL_EXPORT JxlEncoderStatus JxlEncoderSetUpsamplingMode(JxlEncoder *enc, int64_t factor, int64_t mode)
JxlEncoderAllowExpertOptions
JXL_EXPORT void JxlEncoderAllowExpertOptions(JxlEncoder *enc)
JxlEncoderSetFrameHeader
JXL_EXPORT JxlEncoderStatus JxlEncoderSetFrameHeader(JxlEncoderFrameSettings *frame_settings, const JxlFrameHeader *frame_header)
JxlColorEncodingSetToLinearSRGB
JXL_EXPORT void JxlColorEncodingSetToLinearSRGB(JxlColorEncoding *color_encoding, JXL_BOOL is_gray)
JxlEncoderInitExtraChannelInfo
JXL_EXPORT void JxlEncoderInitExtraChannelInfo(JxlExtraChannelType type, JxlExtraChannelInfo *info)
JxlEncoderSetExtraChannelDistance
JXL_EXPORT JxlEncoderStatus JxlEncoderSetExtraChannelDistance(JxlEncoderFrameSettings *frame_settings, size_t index, float distance)
JxlEncoderCloseFrames
JXL_EXPORT void JxlEncoderCloseFrames(JxlEncoder *enc)
JxlEncoderAddImageFrame
JXL_EXPORT JxlEncoderStatus JxlEncoderAddImageFrame(const JxlEncoderFrameSettings *frame_settings, const JxlPixelFormat *pixel_format, const void *buffer, size_t size)
JxlEncoderSetICCProfile
JXL_EXPORT JxlEncoderStatus JxlEncoderSetICCProfile(JxlEncoder *enc, const uint8_t *icc_profile, size_t size)
JxlEncoderSetFrameName
JXL_EXPORT JxlEncoderStatus JxlEncoderSetFrameName(JxlEncoderFrameSettings *frame_settings, const char *frame_name)
JxlEncoderSetDebugImageCallback
JXL_EXPORT void JxlEncoderSetDebugImageCallback(JxlEncoderFrameSettings *frame_settings, JxlDebugImageCallback callback, void *opaque)
JxlEncoderVersion
JXL_EXPORT uint32_t JxlEncoderVersion(void)
JxlEncoderFrameSettingsCreate
JXL_EXPORT JxlEncoderFrameSettings * JxlEncoderFrameSettingsCreate(JxlEncoder *enc, const JxlEncoderFrameSettings *source)
JxlEncoderGetError
JXL_EXPORT JxlEncoderError JxlEncoderGetError(JxlEncoder *enc)
JxlEncoderSetExtraChannelName
JXL_EXPORT JxlEncoderStatus JxlEncoderSetExtraChannelName(JxlEncoder *enc, size_t index, const char *name, size_t size)
JxlEncoderFrameSettings
struct JxlEncoderFrameSettingsStruct JxlEncoderFrameSettings
Definition encode.h:57
JxlEncoderAddBox
JXL_EXPORT JxlEncoderStatus JxlEncoderAddBox(JxlEncoder *enc, const JxlBoxType type, const uint8_t *contents, size_t size, JXL_BOOL compress_box)
JxlEncoderFlushInput
JXL_EXPORT JxlEncoderStatus JxlEncoderFlushInput(JxlEncoder *enc)
JxlEncoderError
JxlEncoderError
Definition encode.h:83
JxlEncoderFrameSettingId
JxlEncoderFrameSettingId
Definition encode.h:126
JxlEncoderDestroy
JXL_EXPORT void JxlEncoderDestroy(JxlEncoder *enc)
JxlEncoderSetExtraChannelInfo
JXL_EXPORT JxlEncoderStatus JxlEncoderSetExtraChannelInfo(JxlEncoder *enc, size_t index, const JxlExtraChannelInfo *info)
JxlEncoderStoreJPEGMetadata
JXL_EXPORT JxlEncoderStatus JxlEncoderStoreJPEGMetadata(JxlEncoder *enc, JXL_BOOL store_jpeg_metadata)
JxlEncoderAddChunkedFrame
JXL_EXPORT JxlEncoderStatus JxlEncoderAddChunkedFrame(const JxlEncoderFrameSettings *frame_settings, JXL_BOOL is_last_frame, struct JxlChunkedFrameInputSource chunked_frame_input)
Adds a frame to the encoder using a chunked input source.
JXL_ENC_ERROR
@ JXL_ENC_ERROR
Definition encode.h:70
JXL_ENC_NEED_MORE_OUTPUT
@ JXL_ENC_NEED_MORE_OUTPUT
Definition encode.h:74
JXL_ENC_SUCCESS
@ JXL_ENC_SUCCESS
Definition encode.h:66
JXL_ENC_ERR_NOT_SUPPORTED
@ JXL_ENC_ERR_NOT_SUPPORTED
Definition encode.h:110
JXL_ENC_ERR_JBRD
@ JXL_ENC_ERR_JBRD
Definition encode.h:100
JXL_ENC_ERR_API_USAGE
@ JXL_ENC_ERR_API_USAGE
Definition encode.h:116
JXL_ENC_ERR_OOM
@ JXL_ENC_ERR_OOM
Definition encode.h:95
JXL_ENC_ERR_OK
@ JXL_ENC_ERR_OK
Definition encode.h:86
JXL_ENC_ERR_GENERIC
@ JXL_ENC_ERR_GENERIC
Definition encode.h:90
JXL_ENC_ERR_BAD_INPUT
@ JXL_ENC_ERR_BAD_INPUT
Definition encode.h:104
JXL_ENC_FRAME_SETTING_DECODING_SPEED
@ JXL_ENC_FRAME_SETTING_DECODING_SPEED
Definition encode.h:138
JXL_ENC_FRAME_SETTING_JPEG_COMPRESS_BOXES
@ JXL_ENC_FRAME_SETTING_JPEG_COMPRESS_BOXES
Definition encode.h:341
JXL_ENC_FRAME_SETTING_MODULAR_GROUP_SIZE
@ JXL_ENC_FRAME_SETTING_MODULAR_GROUP_SIZE
Definition encode.h:290
JXL_ENC_FRAME_SETTING_PROGRESSIVE_DC
@ JXL_ENC_FRAME_SETTING_PROGRESSIVE_DC
Definition encode.h:248
JXL_ENC_FRAME_SETTING_DISABLE_PERCEPTUAL_HEURISTICS
@ JXL_ENC_FRAME_SETTING_DISABLE_PERCEPTUAL_HEURISTICS
Definition encode.h:394
JXL_ENC_FRAME_SETTING_EXTRA_CHANNEL_RESAMPLING
@ JXL_ENC_FRAME_SETTING_EXTRA_CHANNEL_RESAMPLING
Definition encode.h:153
JXL_ENC_FRAME_SETTING_GROUP_ORDER_CENTER_X
@ JXL_ENC_FRAME_SETTING_GROUP_ORDER_CENTER_X
Definition encode.h:220
JXL_ENC_FRAME_SETTING_USE_FULL_IMAGE_HEURISTICS
@ JXL_ENC_FRAME_SETTING_USE_FULL_IMAGE_HEURISTICS
Definition encode.h:389
JXL_ENC_FRAME_SETTING_JPEG_KEEP_XMP
@ JXL_ENC_FRAME_SETTING_JPEG_KEEP_XMP
Definition encode.h:374
JXL_ENC_FRAME_SETTING_NOISE
@ JXL_ENC_FRAME_SETTING_NOISE
Definition encode.h:177
JXL_ENC_FRAME_SETTING_ALREADY_DOWNSAMPLED
@ JXL_ENC_FRAME_SETTING_ALREADY_DOWNSAMPLED
Definition encode.h:164
JXL_ENC_FRAME_SETTING_RESPONSIVE
@ JXL_ENC_FRAME_SETTING_RESPONSIVE
Definition encode.h:230
JXL_ENC_FRAME_SETTING_JPEG_RECON_CFL
@ JXL_ENC_FRAME_SETTING_JPEG_RECON_CFL
Definition encode.h:316
JXL_ENC_FRAME_SETTING_PATCHES
@ JXL_ENC_FRAME_SETTING_PATCHES
Definition encode.h:187
JXL_ENC_FRAME_SETTING_JPEG_KEEP_JUMBF
@ JXL_ENC_FRAME_SETTING_JPEG_KEEP_JUMBF
Definition encode.h:381
JXL_ENC_FRAME_SETTING_GROUP_ORDER
@ JXL_ENC_FRAME_SETTING_GROUP_ORDER
Definition encode.h:214
JXL_ENC_FRAME_SETTING_EPF
@ JXL_ENC_FRAME_SETTING_EPF
Definition encode.h:192
JXL_ENC_FRAME_SETTING_CHANNEL_COLORS_GLOBAL_PERCENT
@ JXL_ENC_FRAME_SETTING_CHANNEL_COLORS_GLOBAL_PERCENT
Definition encode.h:254
JXL_ENC_FRAME_SETTING_RESAMPLING
@ JXL_ENC_FRAME_SETTING_RESAMPLING
Definition encode.h:146
JXL_ENC_FRAME_SETTING_DOTS
@ JXL_ENC_FRAME_SETTING_DOTS
Definition encode.h:182
JXL_ENC_FRAME_SETTING_COLOR_TRANSFORM
@ JXL_ENC_FRAME_SETTING_COLOR_TRANSFORM
Definition encode.h:277
JXL_ENC_FRAME_SETTING_EFFORT
@ JXL_ENC_FRAME_SETTING_EFFORT
Definition encode.h:132
JXL_ENC_FRAME_SETTING_MODULAR
@ JXL_ENC_FRAME_SETTING_MODULAR
Definition encode.h:203
JXL_ENC_FRAME_SETTING_MODULAR_COLOR_SPACE
@ JXL_ENC_FRAME_SETTING_MODULAR_COLOR_SPACE
Definition encode.h:286
JXL_ENC_FRAME_SETTING_KEEP_INVISIBLE
@ JXL_ENC_FRAME_SETTING_KEEP_INVISIBLE
Definition encode.h:208
JXL_ENC_FRAME_SETTING_PHOTON_NOISE
@ JXL_ENC_FRAME_SETTING_PHOTON_NOISE
Definition encode.h:171
JXL_ENC_FRAME_SETTING_BUFFERING
@ JXL_ENC_FRAME_SETTING_BUFFERING
Definition encode.h:357
JXL_ENC_FRAME_SETTING_BROTLI_EFFORT
@ JXL_ENC_FRAME_SETTING_BROTLI_EFFORT
Definition encode.h:334
JXL_ENC_FRAME_SETTING_GROUP_ORDER_CENTER_Y
@ JXL_ENC_FRAME_SETTING_GROUP_ORDER_CENTER_Y
Definition encode.h:225
JXL_ENC_FRAME_SETTING_GABORISH
@ JXL_ENC_FRAME_SETTING_GABORISH
Definition encode.h:197
JXL_ENC_FRAME_SETTING_QPROGRESSIVE_AC
@ JXL_ENC_FRAME_SETTING_QPROGRESSIVE_AC
Definition encode.h:242
JXL_ENC_FRAME_SETTING_MODULAR_NB_PREV_CHANNELS
@ JXL_ENC_FRAME_SETTING_MODULAR_NB_PREV_CHANNELS
Definition encode.h:311
JXL_ENC_FRAME_SETTING_JPEG_KEEP_EXIF
@ JXL_ENC_FRAME_SETTING_JPEG_KEEP_EXIF
Definition encode.h:366
JXL_ENC_FRAME_SETTING_FILL_ENUM
@ JXL_ENC_FRAME_SETTING_FILL_ENUM
Definition encode.h:399
JXL_ENC_FRAME_SETTING_PROGRESSIVE_AC
@ JXL_ENC_FRAME_SETTING_PROGRESSIVE_AC
Definition encode.h:236
JXL_ENC_FRAME_SETTING_MODULAR_MA_TREE_LEARNING_PERCENT
@ JXL_ENC_FRAME_SETTING_MODULAR_MA_TREE_LEARNING_PERCENT
Definition encode.h:303
JXL_ENC_FRAME_SETTING_LOSSY_PALETTE
@ JXL_ENC_FRAME_SETTING_LOSSY_PALETTE
Definition encode.h:270
JXL_ENC_FRAME_SETTING_MODULAR_PREDICTOR
@ JXL_ENC_FRAME_SETTING_MODULAR_PREDICTOR
Definition encode.h:297
JXL_ENC_FRAME_SETTING_PALETTE_COLORS
@ JXL_ENC_FRAME_SETTING_PALETTE_COLORS
Definition encode.h:265
JXL_ENC_FRAME_SETTING_CHANNEL_COLORS_GROUP_PERCENT
@ JXL_ENC_FRAME_SETTING_CHANNEL_COLORS_GROUP_PERCENT
Definition encode.h:260
JXL_ENC_FRAME_INDEX_BOX
@ JXL_ENC_FRAME_INDEX_BOX
Definition encode.h:327
JxlExtraChannelType
JxlExtraChannelType
Definition codestream_header.h:44
JxlParallelRunner
JxlParallelRetCode(* JxlParallelRunner)(void *runner_opaque, void *jpegxl_opaque, JxlParallelRunInit init, JxlParallelRunFunction func, uint32_t start_range, uint32_t end_range)
Definition parallel_runner.h:127
memory_manager.h
Abstraction functions used by JPEG XL to allocate memory.
parallel_runner.h
stats.h
API to collect various statistics from JXL encoder.
JxlBasicInfo
Definition codestream_header.h:95
JxlBitDepth
Definition types.h:133
JxlBlendInfo
Definition codestream_header.h:330
JxlChunkedFrameInputSource
Definition encode.h:830
JxlChunkedFrameInputSource::release_buffer
void(* release_buffer)(void *opaque, const void *buf)
Definition encode.h:934
JxlChunkedFrameInputSource::get_color_channels_pixel_format
void(* get_color_channels_pixel_format)(void *opaque, JxlPixelFormat *pixel_format)
Definition encode.h:849
JxlChunkedFrameInputSource::get_extra_channel_pixel_format
void(* get_extra_channel_pixel_format)(void *opaque, size_t ec_index, JxlPixelFormat *pixel_format)
Definition encode.h:892
JxlChunkedFrameInputSource::opaque
void * opaque
Definition encode.h:835
JxlCmsInterface
Definition cms_interface.h:227
JxlColorEncoding
Definition color_encoding.h:114
JxlEncoderOutputProcessor
Definition encode.h:732
JxlEncoderOutputProcessor::opaque
void * opaque
Definition encode.h:738
JxlEncoderOutputProcessor::seek
void(* seek)(void *opaque, uint64_t position)
Definition encode.h:780
JxlEncoderOutputProcessor::set_finalized_position
void(* set_finalized_position)(void *opaque, uint64_t finalized_position)
Definition encode.h:793
JxlEncoderOutputProcessor::release_buffer
void(* release_buffer)(void *opaque, size_t written_bytes)
Definition encode.h:768
JxlExtraChannelInfo
Definition codestream_header.h:265
JxlFrameHeader
Definition codestream_header.h:391
JxlMemoryManagerStruct
Definition memory_manager.h:51
JxlPixelFormat
Definition types.h:80
types.h
Data types for the JPEG XL API, for both encoding and decoding.