[FFmpeg-cvslog] imgconvert: remove PixFmtInfo use from avg_bits_per_pixel()

Michael Niedermayer git at videolan.org
Wed Nov 21 17:11:37 CET 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Nov 21 16:47:02 2012 +0100| [f6c439537486e09997661c10edd739561af1e331] | committer: 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: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f6c439537486e09997661c10edd739561af1e331
---

 libavcodec/imgconvert.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/libavcodec/imgconvert.c b/libavcodec/imgconvert.c
index 38bf2e7..3353481 100644
--- a/libavcodec/imgconvert.c
+++ b/libavcodec/imgconvert.c
@@ -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



More information about the ffmpeg-cvslog mailing list