summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-11-12 19:30:34 +0100
committerwm4 <wm4@nowhere>2014-11-12 19:30:59 +0100
commite9792326e396f4575941cb381c8bad9c9221e50a (patch)
tree94741b2d200d028b4450f31c4752fdb4e5cb9d21 /video
parent41365313433875b0ac2f1fa0e6d14ffa4f5e4e8d (diff)
downloadmpv-e9792326e396f4575941cb381c8bad9c9221e50a.tar.bz2
mpv-e9792326e396f4575941cb381c8bad9c9221e50a.tar.xz
mp_image: slightly better image params verbose info
Diffstat (limited to 'video')
-rw-r--r--video/csputils.h2
-rw-r--r--video/mp_image.c7
-rw-r--r--video/mp_image.h2
3 files changed, 9 insertions, 2 deletions
diff --git a/video/csputils.h b/video/csputils.h
index a494a06b28..33bac87f64 100644
--- a/video/csputils.h
+++ b/video/csputils.h
@@ -96,6 +96,8 @@ extern const char *const mp_stereo3d_names[MP_STEREO3D_COUNT];
#define MP_STEREO3D_NAME(x) \
((x) >= 0 && (x) < MP_STEREO3D_COUNT ? (char *)mp_stereo3d_names[(x)] : NULL)
+#define MP_STEREO3D_NAME_DEF(x, def) \
+ (MP_STEREO3D_NAME(x) ? MP_STEREO3D_NAME(x) : (def))
struct mp_csp_details {
enum mp_csp format;
diff --git a/video/mp_image.c b/video/mp_image.c
index d041b9e385..440e3ff5dc 100644
--- a/video/mp_image.c
+++ b/video/mp_image.c
@@ -465,11 +465,16 @@ char *mp_image_params_to_str_buf(char *b, size_t bs,
mp_snprintf_cat(b, bs, " %s", mp_imgfmt_to_name(p->imgfmt));
mp_snprintf_cat(b, bs, " %s/%s", mp_csp_names[p->colorspace],
mp_csp_levels_names[p->colorlevels]);
- mp_snprintf_cat(b, bs, " CL=%d", (int)p->chroma_location);
+ mp_snprintf_cat(b, bs, " CL=%s", mp_chroma_names[p->chroma_location]);
if (p->outputlevels)
mp_snprintf_cat(b, bs, " out=%s", mp_csp_levels_names[p->outputlevels]);
if (p->rotate)
mp_snprintf_cat(b, bs, " rot=%d", p->rotate);
+ if (p->stereo_in > 0 || p->stereo_out > 0) {
+ mp_snprintf_cat(b, bs, " stereo=%s/%s",
+ MP_STEREO3D_NAME_DEF(p->stereo_in, "?"),
+ MP_STEREO3D_NAME_DEF(p->stereo_out, "?"));
+ }
} else {
snprintf(b, bs, "???");
}
diff --git a/video/mp_image.h b/video/mp_image.h
index feedd24174..24e9b8d885 100644
--- a/video/mp_image.h
+++ b/video/mp_image.h
@@ -144,7 +144,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[64]){0}, 64, p)
+#define mp_image_params_to_str(p) mp_image_params_to_str_buf((char[80]){0}, 80, p)
bool mp_image_params_valid(const struct mp_image_params *p);
bool mp_image_params_equal(const struct mp_image_params *p1,