LIBJXL: jxl/butteraugli.h Source File

LIBJXL

Loading...
Searching...
No Matches
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
13#ifndef JXL_BUTTERAUGLI_H_
14#define JXL_BUTTERAUGLI_H_
15
16#if defined(__cplusplus) || defined(c_plusplus)
17extern "C" {
18#endif
19
20#include "jxl/jxl_export.h"
21#include "jxl/memory_manager.h"
22#include "jxl/parallel_runner.h"
23#include "jxl/types.h"
24
31 typedef struct JxlButteraugliApiStruct JxlButteraugliApi;
32
39 typedef struct JxlButteraugliResultStruct JxlButteraugliResult;
40
46JXL_EXPORT void JxlButteraugliResultDestroy(JxlButteraugliResult* result);
47
60JXL_EXPORT JxlButteraugliApi* JxlButteraugliApiCreate(
61 const JxlMemoryManager* memory_manager);
62
71JXL_EXPORT void JxlButteraugliApiSetParallelRunner(
72 JxlButteraugliApi* api, JxlParallelRunner parallel_runner,
73 void* parallel_runner_opaque);
74
81JXL_EXPORT void JxlButteraugliApiSetHFAsymmetry(JxlButteraugliApi* api,
82 float v);
83
90JXL_EXPORT void JxlButteraugliApiSetIntensityTarget(JxlButteraugliApi* api,
91 float v);
92
98JXL_EXPORT void JxlButteraugliApiDestroy(JxlButteraugliApi* api);
99
116JXL_EXPORT JxlButteraugliResult* JxlButteraugliCompute(
117 const JxlButteraugliApi* api, uint32_t xsize, uint32_t ysize,
118 const JxlPixelFormat* pixel_format_orig, const void* buffer_orig,
119 size_t size_orig, const JxlPixelFormat* pixel_format_dist,
120 const void* buffer_dist, size_t size_dist);
121
129JXL_EXPORT float JxlButteraugliResultGetMaxDistance(
130 const JxlButteraugliResult* result);
131
139JXL_EXPORT float JxlButteraugliResultGetDistance(
140 const JxlButteraugliResult* result, float pnorm);
141
150JXL_EXPORT void JxlButteraugliResultGetDistmap(
151 const JxlButteraugliResult* result, const float** buffer,
152 uint32_t* row_stride);
153
154#if defined(__cplusplus) || defined(c_plusplus)
155}
156#endif
157
158#endif /* JXL_BUTTERAUGLI_H_ */
159
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:39
JxlButteraugliApi
struct JxlButteraugliApiStruct JxlButteraugliApi
Definition: butteraugli.h:31
JxlButteraugliApiSetParallelRunner
JXL_EXPORT void JxlButteraugliApiSetParallelRunner(JxlButteraugliApi *api, JxlParallelRunner parallel_runner, void *parallel_runner_opaque)
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:119
memory_manager.h
Abstraction functions used by JPEG XL to allocate memory.
parallel_runner.h
JxlMemoryManagerStruct
Definition: memory_manager.h:51
JxlPixelFormat
Definition: types.h:86
types.h
Data types for the JPEG XL API, for both encoding and decoding.