diff options
author | Ronald S. Bultje <rsbultje@gmail.com> | 2015-07-11 11:21:17 -0400 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2015-07-11 19:13:57 +0200 |
commit | 3bb58c377b4544b6025a2314209bc5efd6bda061 (patch) | |
tree | 814ebb427716e43535432f0f72362e3c3568c2f6 /libavfilter/vf_psnr.c | |
parent | 9879421f1ac1427efd5448772f7a58de1ae09872 (diff) | |
download | ffmpeg-3bb58c377b4544b6025a2314209bc5efd6bda061.tar.gz |
vf_psnr: fix rgb channel order mixup in final log message.
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavfilter/vf_psnr.c')
-rw-r--r-- | libavfilter/vf_psnr.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libavfilter/vf_psnr.c b/libavfilter/vf_psnr.c index cc4546a164..74afdaa505 100644 --- a/libavfilter/vf_psnr.c +++ b/libavfilter/vf_psnr.c @@ -327,9 +327,11 @@ static av_cold void uninit(AVFilterContext *ctx) char buf[256]; buf[0] = 0; - for (j = 0; j < s->nb_components; j++) + for (j = 0; j < s->nb_components; j++) { + int c = s->is_rgb ? s->rgba_map[j] : j; av_strlcatf(buf, sizeof(buf), " %c:%0.2f", s->comps[j], - get_psnr(s->mse_comp[j], s->nb_frames, s->max[j])); + get_psnr(s->mse_comp[c], s->nb_frames, s->max[c])); + } av_log(ctx, AV_LOG_INFO, "PSNR%s average:%0.2f min:%0.2f max:%0.2f\n", buf, get_psnr(s->mse, s->nb_frames, s->average_max), |