imgconvert: remove PixFmtInfo use from avg_bits_per_pixel()
authorMichael Niedermayer <michaelni@gmx.at>
Wed, 21 Nov 2012 15:47:02 +0000 (16:47 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 21 Nov 2012 16:06:11 +0000 (17:06 +0100)
This fixes several inconsistencies with YUV >8bit formats caused
due to missing information in the PixFmtInfo table.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/imgconvert.c

index 38bf2e7..3353481 100644 (file)
@@ -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