aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-11-21 20:13:45 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-11-21 20:25:30 +0100
commitb93c933cd25346bd0737cbe1e54358b5005492c0 (patch)
tree57f4c9bee5214e4347144df94b24d099dd656689 /libavcodec
parentfb1bb97d875e0a97e01a1228bf76d8792856bfb4 (diff)
downloadffmpeg-b93c933cd25346bd0737cbe1e54358b5005492c0.tar.gz
imgconvert-test: count the number of unused pixel format values.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/imgconvert.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/libavcodec/imgconvert.c b/libavcodec/imgconvert.c
index 1d9db31fd3..e74232ec50 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");