VLC 4.0.0-dev
Loading...
Searching...
No Matches
Collaboration diagram for Chroma probing API:

Data Structures

struct  vlc_chroma_conv_result
 Chroma conversion result structure. More...
 

Macros

#define VLC_CHROMA_CONV_MAX_INDIRECT_STEPS   1
 
#define VLC_CHROMA_CONV_CHAIN_COUNT_MAX   (2 /* in + out */ + VLC_CHROMA_CONV_MAX_INDIRECT_STEPS)
 
#define VLC_CHROMA_CONV_FLAG_ONLY_YUV   0x1
 Only accept YUV output chromas (the input chroma can be RGB)
 
#define VLC_CHROMA_CONV_FLAG_ONLY_RGB   0x2
 Only accept RGB output chromas (the input chroma can be YUV)
 
#define VLC_CHROMA_CONV_FLAG_SORT_COST   0x4
 Sort results by cost instead of quality.
 

Functions

struct vlc_chroma_conv_resultvlc_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.
 
char * vlc_chroma_conv_result_ToString (const struct vlc_chroma_conv_result *res)
 Get a string representing the result.
 

Detailed Description

Macro Definition Documentation

◆ VLC_CHROMA_CONV_CHAIN_COUNT_MAX

#define VLC_CHROMA_CONV_CHAIN_COUNT_MAX   (2 /* in + out */ + VLC_CHROMA_CONV_MAX_INDIRECT_STEPS)

◆ VLC_CHROMA_CONV_FLAG_ONLY_RGB

#define VLC_CHROMA_CONV_FLAG_ONLY_RGB   0x2

Only accept RGB output chromas (the input chroma can be YUV)

◆ VLC_CHROMA_CONV_FLAG_ONLY_YUV

#define VLC_CHROMA_CONV_FLAG_ONLY_YUV   0x1

Only accept YUV output chromas (the input chroma can be RGB)

◆ VLC_CHROMA_CONV_FLAG_SORT_COST

#define VLC_CHROMA_CONV_FLAG_SORT_COST   0x4

Sort results by cost instead of quality.

◆ VLC_CHROMA_CONV_MAX_INDIRECT_STEPS

#define VLC_CHROMA_CONV_MAX_INDIRECT_STEPS   1

Function Documentation

◆ vlc_chroma_conv_Probe()

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.

Results are sorted by quality, unless VLC_CHROMA_CONV_FLAG_SORT_COST is specified in flags.

Parameters
inthe input chroma to convert from, must be valid
outthe output chroma to convert to, if 0, the function will find all possible conversion from in to x
widthvideo width, used for finer cost calculation, can be 0
heightvideo height, used for finer cost calculation, can be 0
max_indirect_stepsmaximum number of indirect conversion steps, must be lower or equal to VLC_CHROMA_CONV_MAX_INDIRECT_STEPS, if in and out chromas are CPU chromas, the steps will be automatically lowered to 0
flagsbitwise flags, cf. VLC_CHROMA_CONV_FLAG_*
countpointer to the number of results, must be valid
Returns
a pointer to an array of results, must be released with free(), can be NULL

References bfs_node_IsResult(), bfs_Run(), vlc_chroma_conv_result::cost, count, bfs_queue_vec::data, modules_Probe(), vlc_chroma_conv_vec::size, bfs_queue_vec::size, SortResults(), unlikely, VLC_CHROMA_CONV_FLAG_SORT_COST, VLC_CHROMA_CONV_MAX_INDIRECT_STEPS, vlc_chroma_conv_result_Equals(), vlc_chroma_conv_result_FromNode(), vlc_fourcc_GetChromaBPP(), vlc_qsort(), VLC_VECTOR, vlc_vector_destroy, vlc_vector_init, VLC_VECTOR_INITIALIZER, vlc_vector_push_hole, and vlc_vector_remove.

Referenced by GetFallback().

◆ vlc_chroma_conv_result_ToString()

char * vlc_chroma_conv_result_ToString ( const struct vlc_chroma_conv_result res)

Get a string representing the result.

Parameters
respointer to a valid result
Returns
a string or NULL, must be released with free()

References vlc_chroma_conv_result::chain, vlc_chroma_conv_result::chain_count, vlc_chroma_conv_result::cost, vlc_memstream::ptr, vlc_chroma_conv_result::quality, vlc_memstream_close(), vlc_memstream_open(), vlc_memstream_printf(), and vlc_memstream_puts().