Print bpc (for bits per component) with pixel format if it is smaller than expected.

This commit is contained in:
Carl Eugen Hoyos 2012-12-11 01:26:32 +01:00
parent 8e9056559e
commit 71b1912963

View File

@ -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),