diff options
author | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2012-12-11 01:26:32 +0100 |
---|---|---|
committer | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2012-12-11 01:26:32 +0100 |
commit | 71b191296386921fffaa69ac1cedb73ed0c6f9b0 (patch) | |
tree | a2eb97c9b99a0381024a0933cfa27847cff9677e | |
parent | 8e9056559e11cd708c68bf8a50ab1c13395ae9b0 (diff) | |
download | ffmpeg-71b191296386921fffaa69ac1cedb73ed0c6f9b0.tar.gz |
Print bpc (for bits per component) with pixel format if it is smaller than expected.
-rw-r--r-- | libavcodec/utils.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c index d7b3f18cb1..0a0c446b8c 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -2059,6 +2059,10 @@ void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode) snprintf(buf + strlen(buf), buf_size - strlen(buf), ", %s", av_get_pix_fmt_name(enc->pix_fmt)); + if (enc->bits_per_raw_sample && + enc->bits_per_raw_sample <= av_pix_fmt_desc_get(enc->pix_fmt)->comp[0].depth_minus1) + snprintf(buf + strlen(buf), buf_size - strlen(buf), + " (%d bpc)", enc->bits_per_raw_sample); } if (enc->width) { snprintf(buf + strlen(buf), buf_size - strlen(buf), |