summaryrefslogtreecommitdiff
path: root/libavfilter
diff options
context:
space:
mode:
authorRonald S. Bultje <rsbultje@gmail.com>2015-07-10 22:47:24 -0400
committerMichael Niedermayer <michael@niedermayer.cc>2015-07-11 12:48:58 +0200
commitc381af77c5a9581750b2534a95a1249c8f8953d3 (patch)
treef3acd2d0d10f8862c3defbb736e48c4e6d8a441b /libavfilter
parente76c34d08c6f90ed3d6402fa800081e20ddbc012 (diff)
vF_psnr: move set_meta() calls out of loop.
Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavfilter')
-rw-r--r--libavfilter/vf_psnr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavfilter/vf_psnr.c b/libavfilter/vf_psnr.c
index b2c6531621..0c2c9501f3 100644
--- a/libavfilter/vf_psnr.c
+++ b/libavfilter/vf_psnr.c
@@ -173,10 +173,10 @@ static AVFrame *do_psnr(AVFilterContext *ctx, AVFrame *main,
for (j = 0; j < s->nb_components; j++) {
c = s->is_rgb ? s->rgba_map[j] : j;
set_meta(metadata, "lavfi.psnr.mse.", s->comps[j], comp_mse[c]);
- set_meta(metadata, "lavfi.psnr.mse_avg", 0, mse);
set_meta(metadata, "lavfi.psnr.psnr.", s->comps[j], get_psnr(comp_mse[c], 1, s->max[c]));
- set_meta(metadata, "lavfi.psnr.psnr_avg", 0, get_psnr(mse, 1, s->average_max));
}
+ set_meta(metadata, "lavfi.psnr.mse_avg", 0, mse);
+ set_meta(metadata, "lavfi.psnr.psnr_avg", 0, get_psnr(mse, 1, s->average_max));
if (s->stats_file) {
fprintf(s->stats_file, "n:%"PRId64" mse_avg:%0.2f ", s->nb_frames, mse);