Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion options/m_option.c
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,7 @@ const char *m_opt_choice_str(const struct m_opt_choice_alternatives *choices,
const char *val = m_opt_choice_str_def(choices, value, NULL);
if (val)
return val;
mp_require(false && "Invalid choice value!");
return "<unknown>";
}

const char *m_opt_choice_str_def(const struct m_opt_choice_alternatives *choices,
Expand Down
4 changes: 4 additions & 0 deletions video/csputils.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ const struct m_opt_choice_alternatives pl_csp_names[] = {
{"rgb", PL_COLOR_SYSTEM_RGB},
{"xyz", PL_COLOR_SYSTEM_XYZ},
{"ycgco", PL_COLOR_SYSTEM_YCGCO},
#if PL_API_VER >= 358
{"ycgco-re", PL_COLOR_SYSTEM_YCGCO_RE},
{"ycgco-ro", PL_COLOR_SYSTEM_YCGCO_RO},
#endif
{0}
};

Expand Down
8 changes: 6 additions & 2 deletions video/mp_image.c
Original file line number Diff line number Diff line change
Expand Up @@ -964,8 +964,12 @@ void mp_image_params_guess_csp(struct mp_image_params *params)
params->repr.sys != PL_COLOR_SYSTEM_BT_2100_HLG &&
params->repr.sys != PL_COLOR_SYSTEM_DOLBYVISION &&
params->repr.sys != PL_COLOR_SYSTEM_SMPTE_240M &&
params->repr.sys != PL_COLOR_SYSTEM_YCGCO)
{
params->repr.sys != PL_COLOR_SYSTEM_YCGCO
#if PL_API_VER >= 358
&& params->repr.sys != PL_COLOR_SYSTEM_YCGCO_RE
&& params->repr.sys != PL_COLOR_SYSTEM_YCGCO_RO
#endif
) {
// Makes no sense, so guess instead
// YCGCO should be separate, but libavcodec disagrees
params->repr.sys = PL_COLOR_SYSTEM_UNKNOWN;
Expand Down
Loading