vf_ssim: print per-channel dB values.
authorRonald S. Bultje <rsbultje@gmail.com>
Thu, 22 Oct 2015 18:51:11 +0000 (14:51 -0400)
committerRonald S. Bultje <rsbultje@gmail.com>
Thu, 22 Oct 2015 21:18:40 +0000 (17:18 -0400)
libavfilter/vf_ssim.c

index b23d447..4dc96a7 100644 (file)
@@ -348,7 +348,8 @@ static av_cold void uninit(AVFilterContext *ctx)
         buf[0] = 0;
         for (i = 0; i < s->nb_components; i++) {
             int c = s->is_rgb ? s->rgba_map[i] : i;
-            av_strlcatf(buf, sizeof(buf), " %c:%f", s->comps[i], s->ssim[c] / s->nb_frames);
+            av_strlcatf(buf, sizeof(buf), " %c:%f (%f)", s->comps[i], s->ssim[c] / s->nb_frames,
+                        ssim_db(s->ssim[c], s->nb_frames));
         }
         av_log(ctx, AV_LOG_INFO, "SSIM%s All:%f (%f)\n", buf,
                s->ssim_total / s->nb_frames, ssim_db(s->ssim_total, s->nb_frames));