This allows retroactive aggregation of the PSNR statistics (e.g. calculating average PSNR for entire video or a segment of the video). --- libavfilter/vf_psnr.c | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/libavfilter/vf_psnr.c b/libavfilter/vf_psnr.c index 89acd3c..fd9019e 100644 --- a/libavfilter/vf_psnr.c +++ b/libavfilter/vf_psnr.c @@ -180,6 +180,11 @@ static AVFrame *do_psnr(AVFilterContext *ctx, AVFrame *main, fprintf(s->stats_file, "psnr_%c:%0.2f ", s->comps[j], get_psnr(comp_mse[c], 1, s->max[c])); } + fprintf(s->stats_file, "max_avg:%0.2f ", s->average_max); + for (j = 0; j < s->nb_components; j++) { + c = s->is_rgb ? s->rgba_map[j] : j; + fprintf(s->stats_file, "max_%c:%0.2f ", s->comps[j], s->max[c]); + } fprintf(s->stats_file, "\n"); } -- 2.8.0.rc3.226.g39d4020 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel