[FFmpeg-devel] [PATCH] avfilter: Add max stats to PSNR log

Michael Niedermayer michael at niedermayer.cc
Tue Jul 19 02:02:31 EEST 2016


On Fri, Jul 15, 2016 at 11:31:35AM -0700, Lucas Cooper wrote:
> 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]);
> +        }

the argument types dont match the format string

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

It is dangerous to be right in matters on which the established authorities
are wrong. -- Voltaire
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20160719/22c3acd0/attachment.sig>


More information about the ffmpeg-devel mailing list