butteraugli.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_BUTTERAUGLI_H_
#define JXL_BUTTERAUGLI_H_
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
#endif
#include "jxl/jxl_export.h"
#include "jxl/memory_manager.h"
#include "jxl/parallel_runner.h"
#include "jxl/types.h"
typedef struct JxlButteraugliApiStruct JxlButteraugliApi;
typedef struct JxlButteraugliResultStruct JxlButteraugliResult;
JXL_EXPORT void JxlButteraugliResultDestroy(JxlButteraugliResult* result);
JXL_EXPORT JxlButteraugliApi* JxlButteraugliApiCreate(
const JxlMemoryManager* memory_manager);
JXL_EXPORT void JxlButteraugliApiSetParallelRunner(
JxlButteraugliApi* api, JxlParallelRunner parallel_runner,
void* parallel_runner_opaque);
JXL_EXPORT void JxlButteraugliApiSetHFAsymmetry(JxlButteraugliApi* api,
float v);
JXL_EXPORT void JxlButteraugliApiSetIntensityTarget(JxlButteraugliApi* api,
float v);
JXL_EXPORT void JxlButteraugliApiDestroy(JxlButteraugliApi* api);
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);
JXL_EXPORT float JxlButteraugliResultGetMaxDistance(
const JxlButteraugliResult* result);
JXL_EXPORT float JxlButteraugliResultGetDistance(
const JxlButteraugliResult* result, float pnorm);
JXL_EXPORT void JxlButteraugliResultGetDistmap(
const JxlButteraugliResult* result, const float** buffer,
uint32_t* row_stride);
#if defined(__cplusplus) || defined(c_plusplus)
}
#endif
#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: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:87
types.h
Data types for the JPEG XL API, for both encoding and decoding.