mirror of https://github.com/mpv-player/mpv
mp_image: dump all mp_colorspace members in verbose logging
Also extend the default buffer size for formatting this string, because it can get too damn long.
This commit is contained in:
parent
8b7f23129d
commit
8f1ec91b45
|
@ -513,9 +513,15 @@ char *mp_image_params_to_str_buf(char *b, size_t bs,
|
|||
mp_snprintf_cat(b, bs, " %s", mp_imgfmt_to_name(p->imgfmt));
|
||||
if (p->hw_subfmt)
|
||||
mp_snprintf_cat(b, bs, "[%s]", mp_imgfmt_to_name(p->hw_subfmt));
|
||||
mp_snprintf_cat(b, bs, " %s/%s",
|
||||
mp_snprintf_cat(b, bs, " %s/%s/%s/%s",
|
||||
m_opt_choice_str(mp_csp_names, p->color.space),
|
||||
m_opt_choice_str(mp_csp_prim_names, p->color.primaries),
|
||||
m_opt_choice_str(mp_csp_trc_names, p->color.gamma),
|
||||
m_opt_choice_str(mp_csp_levels_names, p->color.levels));
|
||||
if (p->color.nom_peak)
|
||||
mp_snprintf_cat(b, bs, " NP=%f", p->color.nom_peak);
|
||||
if (p->color.sig_peak)
|
||||
mp_snprintf_cat(b, bs, " SP=%f", p->color.sig_peak);
|
||||
mp_snprintf_cat(b, bs, " CL=%s",
|
||||
m_opt_choice_str(mp_chroma_names, p->chroma_location));
|
||||
if (p->rotate)
|
||||
|
|
|
@ -133,7 +133,7 @@ void mp_image_params_guess_csp(struct mp_image_params *params);
|
|||
|
||||
char *mp_image_params_to_str_buf(char *b, size_t bs,
|
||||
const struct mp_image_params *p);
|
||||
#define mp_image_params_to_str(p) mp_image_params_to_str_buf((char[80]){0}, 80, p)
|
||||
#define mp_image_params_to_str(p) mp_image_params_to_str_buf((char[99]){0}, 99, p)
|
||||
|
||||
bool mp_image_params_valid(const struct mp_image_params *p);
|
||||
bool mp_image_params_equal(const struct mp_image_params *p1,
|
||||
|
|
Loading…
Reference in New Issue