diff options
author | Vittorio Giovara <vittorio.giovara@gmail.com> | 2014-09-26 15:24:01 +0100 |
---|---|---|
committer | Vittorio Giovara <vittorio.giovara@gmail.com> | 2014-10-08 18:17:49 +0100 |
commit | 41e86146e7240f9d42e8cdb86a94bb3eb2bbe15f (patch) | |
tree | a5376b4d25931eceb65e3a7da7d1f862b40f3193 | |
parent | 20a5956b8daeee4cb59d6fa00ec809b02c04d7f8 (diff) | |
download | ffmpeg-41e86146e7240f9d42e8cdb86a94bb3eb2bbe15f.tar.gz |
dump: print detailed color space information
-rw-r--r-- | libavcodec/utils.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c index 4d097d45e8..9e8f541883 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -1926,6 +1926,23 @@ void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode) "%s", enc->pix_fmt == AV_PIX_FMT_NONE ? "none" : av_get_pix_fmt_name(enc->pix_fmt)); + if (enc->color_range != AVCOL_RANGE_UNSPECIFIED) + snprintf(buf + strlen(buf), buf_size - strlen(buf), ", %s", + av_color_range_name(enc->color_range)); + if (enc->colorspace != AVCOL_SPC_UNSPECIFIED || + enc->color_primaries != AVCOL_PRI_UNSPECIFIED || + enc->color_trc != AVCOL_TRC_UNSPECIFIED) { + new_line = 1; + snprintf(buf + strlen(buf), buf_size - strlen(buf), ", %s/%s/%s", + av_color_space_name(enc->colorspace), + av_color_primaries_name(enc->color_primaries), + av_color_transfer_name(enc->color_trc)); + } + if (av_log_get_level() >= AV_LOG_DEBUG && + enc->chroma_sample_location != AVCHROMA_LOC_UNSPECIFIED) + snprintf(buf + strlen(buf), buf_size - strlen(buf), ", %s", + av_chroma_location_name(enc->chroma_sample_location)); + if (enc->width) { av_strlcat(buf, new_line ? "\n " : ", ", buf_size); |