21#ifndef VLC_CHROMA_PROBE_H
22#define VLC_CHROMA_PROBE_H 1
40#define VLC_CHROMA_CONV_MAX_INDIRECT_STEPS 1
41#define VLC_CHROMA_CONV_CHAIN_COUNT_MAX (2 + VLC_CHROMA_CONV_MAX_INDIRECT_STEPS)
77#define VLC_CHROMA_CONV_FLAG_ONLY_YUV 0x1
79#define VLC_CHROMA_CONV_FLAG_ONLY_RGB 0x2
81#define VLC_CHROMA_CONV_FLAG_SORT_COST 0x4
104 unsigned width,
unsigned height,
105 unsigned max_indirect_steps,
int flags,
size_t *
count);
147#define set_callback_chroma_conv_probe(activate) \
149 vlc_chroma_conv_probe activate__ = activate; \
151 set_callback(activate) \
153 set_capability("chroma probe", 100)
202 for (
size_t i = 0; i < out_count; i++)
214#define vlc_chroma_conv_add_in_outlist(vec, cost_factor, in, ...) do { \
215 static const vlc_fourcc_t out_array[] = { __VA_ARGS__ }; \
216 size_t count = ARRAY_SIZE(out_array); \
217 vlc_chroma_conv_add_in_outarray(vec, cost_factor, in, out_array, count); \
236 for (
size_t i = 0; i < in_count; i++)
248#define vlc_chroma_conv_add_out_inlist(vec, cost_factor, out, ...) do { \
249 static const vlc_fourcc_t in_array[] = { __VA_ARGS__ }; \
250 size_t count = ARRAY_SIZE(in_array); \
251 vlc_chroma_conv_add_out_inarray(vec, cost_factor, out, in_array, count); \
size_t count
Definition core.c:403
#define VLC_API
Definition fourcc_gen.c:31
uint32_t vlc_fourcc_t
Definition fourcc_gen.c:33
struct vlc_chroma_conv_result * vlc_chroma_conv_Probe(vlc_fourcc_t in, vlc_fourcc_t out, unsigned width, unsigned height, unsigned max_indirect_steps, int flags, size_t *count)
Probe possible chroma conversions.
Definition chroma_probe.c:348
#define VLC_CHROMA_CONV_CHAIN_COUNT_MAX
Definition vlc_chroma_probe.h:42
char * vlc_chroma_conv_result_ToString(const struct vlc_chroma_conv_result *res)
Get a string representing the result.
Definition chroma_probe.c:459
static void vlc_chroma_conv_add_out_inarray(vlc_chroma_conv_vec *vec, float cost_factor, vlc_fourcc_t out, const vlc_fourcc_t *in_array, size_t in_count)
Helper that add an array of in chroma conversions.
Definition vlc_chroma_probe.h:233
static void vlc_chroma_conv_add_in_outarray(vlc_chroma_conv_vec *vec, float cost_factor, vlc_fourcc_t in, const vlc_fourcc_t *out_array, size_t out_count)
Helper that add an array of out chroma conversions.
Definition vlc_chroma_probe.h:199
void(* vlc_chroma_conv_probe)(vlc_chroma_conv_vec *vec)
Module probe function signature.
Definition vlc_chroma_probe.h:146
static void vlc_chroma_conv_add(vlc_chroma_conv_vec *vec, float cost_factor, vlc_fourcc_t in, vlc_fourcc_t out, bool twoway)
Helper that add a chroma conversion.
Definition vlc_chroma_probe.h:168
#define vlc_vector_push(pv, item)
Push an item at the end of the vector.
Definition vlc_vector.h:314
#define VLC_VECTOR(type)
Vector struct body.
Definition vlc_vector.h:66
Definition fourcc_gen.c:52
Chroma conversion entry structure.
Definition vlc_chroma_probe.h:130
vlc_fourcc_t out
output chroma
Definition vlc_chroma_probe.h:136
float cost_factor
Cost factor, 0.25 for GPU<->GPU conversions, 0.75 for SIMD, 1 for CPU.
Definition vlc_chroma_probe.h:132
vlc_fourcc_t in
input chroma
Definition vlc_chroma_probe.h:134
Chroma conversion result structure.
Definition vlc_chroma_probe.h:48
size_t chain_count
Number of chromas in the chain.
Definition vlc_chroma_probe.h:61
unsigned cost
Cost of the full conversion, lower is better.
Definition vlc_chroma_probe.h:66
vlc_fourcc_t chain[(2+1)]
Array of chromas used to achieve the conversion.
Definition vlc_chroma_probe.h:58
unsigned quality
Quality of the conversion, higher is better.
Definition vlc_chroma_probe.h:74
Definition vlc_chroma_probe.h:138
This file is a collection of common definitions and types.
This provides convenience helpers for vectors.