summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-08-27 22:04:38 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-08-31 17:22:04 +0200
commit8da23be458f4249f8e4348fea775c12cb3da241c (patch)
tree215ae189d6f9e097b2d76c4aba84cd009c1a01db /libavcodec
parentea07dbdeaa664994dfda5814d19161f2dc9c214c (diff)
avcodec/utils: avcodec_string: print colorspace type
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/utils.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index adcb9cd74f..4e510e69e4 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -2601,6 +2601,21 @@ void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode)
if (enc->color_range != AVCOL_RANGE_UNSPECIFIED)
av_strlcatf(detail, sizeof(detail),
enc->color_range == AVCOL_RANGE_MPEG ? "tv, ": "pc, ");
+ if (enc->colorspace<9U) {
+ static const char *name[] = {
+ "GBR",
+ "bt709",
+ NULL,
+ NULL,
+ "fcc",
+ "bt470bg",
+ "smpte170m",
+ "smpte240m",
+ "YCgCo",
+ };
+ if (name[enc->colorspace])
+ av_strlcatf(detail, sizeof(detail), "%s, ", name[enc->colorspace]);
+ }
if (strlen(detail) > 1) {
detail[strlen(detail) - 2] = 0;
av_strlcatf(buf, buf_size, "%s)", detail);