[FFmpeg-cvslog] imgconvert-test: count the number of unused pixel format values.
Michael Niedermayer
git at videolan.org
Wed Nov 21 20:26:19 CET 2012
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Nov 21 20:13:45 2012 +0100| [b93c933cd25346bd0737cbe1e54358b5005492c0] | committer: Michael Niedermayer
imgconvert-test: count the number of unused pixel format values.
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b93c933cd25346bd0737cbe1e54358b5005492c0
---
libavcodec/imgconvert.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/libavcodec/imgconvert.c b/libavcodec/imgconvert.c
index 1d9db31..e74232e 100644
--- a/libavcodec/imgconvert.c
+++ b/libavcodec/imgconvert.c
@@ -634,11 +634,18 @@ int avpicture_deinterlace(AVPicture *dst, const AVPicture *src,
int main(void){
int i;
int err=0;
+ int skip = 0;
for (i=0; i<AV_PIX_FMT_NB*2; i++) {
AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(i);
- if(!desc || !desc->name)
+ if(!desc || !desc->name) {
+ skip ++;
continue;
+ }
+ if (skip) {
+ av_log(0, AV_LOG_INFO, "%3d unused pixel format values\n", skip);
+ skip = 0;
+ }
av_log(0, AV_LOG_INFO, "pix fmt %s yuv_plan:%d avg_bpp:%d colortype:%d\n", desc->name, is_yuv_planar(desc), av_get_padded_bits_per_pixel(desc), get_color_type(desc));
if ((!(desc->flags & PIX_FMT_ALPHA)) != (desc->nb_components != 2 && desc->nb_components != 4)) {
av_log(0, AV_LOG_ERROR, "Alpha flag mismatch\n");
More information about the ffmpeg-cvslog
mailing list