LIBJXL

butteraugli.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_BUTTERAUGLI_H_
12#define JXL_BUTTERAUGLI_H_
13
14#if defined(__cplusplus) || defined(c_plusplus)
15 extern "C" {
16#endif
17
18#include "jxl/jxl_export.h"
19#include "jxl/memory_manager.h"
20#include "jxl/parallel_runner.h"
21#include "jxl/types.h"
22
29 typedef struct JxlButteraugliApiStruct JxlButteraugliApi;
30
37 typedef struct JxlButteraugliResultStruct JxlButteraugliResult;
38
44JXL_EXPORT void JxlButteraugliResultDestroy(JxlButteraugliResult* result);
45
58JXL_EXPORT JxlButteraugliApi* JxlButteraugliApiCreate(
59 const JxlMemoryManager* memory_manager);
60
69JXL_EXPORT void JxlButteraugliApiSetParallelRunner(
70 JxlButteraugliApi* api, JxlParallelRunner parallel_runner,
71 void* parallel_runner_opaque);
72
79JXL_EXPORT void JxlButteraugliApiSetHFAsymmetry(JxlButteraugliApi* api,
80 float v);
81
88JXL_EXPORT void JxlButteraugliApiSetIntensityTarget(JxlButteraugliApi* api,
89 float v);
90
96JXL_EXPORT void JxlButteraugliApiDestroy(JxlButteraugliApi* api);
97
114JXL_EXPORT JxlButteraugliResult* JxlButteraugliCompute(
115 const JxlButteraugliApi* api, uint32_t xsize, uint32_t ysize,
116 const JxlPixelFormat* pixel_format_orig, const void* buffer_orig,
117 size_t size_orig, const JxlPixelFormat* pixel_format_dist,
118 const void* buffer_dist, size_t size_dist);
119
127JXL_EXPORT float JxlButteraugliResultGetMaxDistance(
128 const JxlButteraugliResult* result);
129
137JXL_EXPORT float JxlButteraugliResultGetDistance(
138 const JxlButteraugliResult* result, float pnorm);
139
148JXL_EXPORT void JxlButteraugliResultGetDistmap(
149 const JxlButteraugliResult* result, const float** buffer,
150 uint32_t* row_stride);
151
152#if defined(__cplusplus) || defined(c_plusplus)
153}
154#endif
155
156#endif /* JXL_BUTTERAUGLI_H_ */
JxlButteraugliResultGetMaxDistance
JXL_EXPORT float JxlButteraugliResultGetMaxDistance(const JxlButteraugliResult *result)
JxlButteraugliResultGetDistance
JXL_EXPORT float JxlButteraugliResultGetDistance(const JxlButteraugliResult *result, float pnorm)
JxlButteraugliCompute
JXL_EXPORT JxlButteraugliResult * JxlButteraugliCompute(const JxlButteraugliApi *api, uint32_t xsize, uint32_t ysize, const JxlPixelFormat *pixel_format_orig, const void *buffer_orig, size_t size_orig, const JxlPixelFormat *pixel_format_dist, const void *buffer_dist, size_t size_dist)
JxlButteraugliResultDestroy
JXL_EXPORT void JxlButteraugliResultDestroy(JxlButteraugliResult *result)
JxlButteraugliApiSetIntensityTarget
JXL_EXPORT void JxlButteraugliApiSetIntensityTarget(JxlButteraugliApi *api, float v)
JxlButteraugliApiCreate
JXL_EXPORT JxlButteraugliApi * JxlButteraugliApiCreate(const JxlMemoryManager *memory_manager)
JxlButteraugliApiDestroy
JXL_EXPORT void JxlButteraugliApiDestroy(JxlButteraugliApi *api)
JxlButteraugliResultGetDistmap
JXL_EXPORT void JxlButteraugliResultGetDistmap(const JxlButteraugliResult *result, const float **buffer, uint32_t *row_stride)
JxlButteraugliApiSetHFAsymmetry
JXL_EXPORT void JxlButteraugliApiSetHFAsymmetry(JxlButteraugliApi *api, float v)
JxlButteraugliResult
struct JxlButteraugliResultStruct JxlButteraugliResult
Definition: butteraugli.h:37
JxlButteraugliApi
struct JxlButteraugliApiStruct JxlButteraugliApi
Definition: butteraugli.h:29
JxlButteraugliApiSetParallelRunner
JXL_EXPORT void JxlButteraugliApiSetParallelRunner(JxlButteraugliApi *api, JxlParallelRunner parallel_runner, void *parallel_runner_opaque)
memory_manager.h
Abstraction functions used by JPEG XL to allocate memory.
parallel_runner.h
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:116
JxlMemoryManagerStruct
Definition: memory_manager.h:48
JxlPixelFormat
Definition: types.h:85
types.h
Data types for the JPEG XL API, for both encoding and decoding.