[FFmpeg-cvslog] Print bpc (for bits per component) with pixel format if it is smaller than expected.
Carl Eugen Hoyos
git at videolan.org
Tue Dec 11 01:27:57 CET 2012
ffmpeg | branch: master | Carl Eugen Hoyos <cehoyos at ag.or.at> | Tue Dec 11 01:26:32 2012 +0100| [71b191296386921fffaa69ac1cedb73ed0c6f9b0] | committer: Carl Eugen Hoyos
Print bpc (for bits per component) with pixel format if it is smaller than expected.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=71b191296386921fffaa69ac1cedb73ed0c6f9b0
---
libavcodec/utils.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index d7b3f18..0a0c446 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),
More information about the ffmpeg-cvslog
mailing list