[FFmpeg-devel] [PATCH] vf_ssim: print per-channel dB values.

Ronald S. Bultje rsbultje at gmail.com
Thu Oct 22 20:51:19 CEST 2015


---
 libavfilter/vf_ssim.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavfilter/vf_ssim.c b/libavfilter/vf_ssim.c
index 5cd9361..e7a64f7 100644
--- a/libavfilter/vf_ssim.c
+++ b/libavfilter/vf_ssim.c
@@ -346,7 +346,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));
-- 
2.1.2



More information about the ffmpeg-devel mailing list