Commit f6c43953 authored by Michael Niedermayer's avatar Michael Niedermayer

imgconvert: remove PixFmtInfo use from avg_bits_per_pixel()

This fixes several inconsistencies with YUV >8bit formats caused
due to missing information in the PixFmtInfo table.
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 0880f26b
......@@ -520,11 +520,9 @@ int avcodec_get_pix_fmt_loss(enum AVPixelFormat dst_pix_fmt, enum AVPixelFormat
static int avg_bits_per_pixel(enum AVPixelFormat pix_fmt)
{
const PixFmtInfo *info = &pix_fmt_info[pix_fmt];
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt);
return info->padded_size ?
info->padded_size : av_get_bits_per_pixel(desc);
return av_get_padded_bits_per_pixel(desc);
}
#if FF_API_FIND_BEST_PIX_FMT
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment