[FFmpeg-devel] [PATCH] vF_psnr: move set_meta() calls out of loop.

Michael Niedermayer michael at niedermayer.cc
Sat Jul 11 12:56:46 CEST 2015


On Sat, Jul 11, 2015 at 05:01:03AM +0000, Paul B Mahol wrote:
> Dana 11. 7. 2015. 04:47 osoba "Ronald S. Bultje" <rsbultje at gmail.com>
> napisala je:
> >
> > ---
> >  libavfilter/vf_psnr.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/libavfilter/vf_psnr.c b/libavfilter/vf_psnr.c
> > index b2c6531..0c2c950 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);
> > --
> > 2.1.2
> >
> 
> Oops, LGTM.

applied

thanks

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

In fact, the RIAA has been known to suggest that students drop out
of college or go to community college in order to be able to afford
settlements. -- The RIAA
-------------- 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/20150711/f068a760/attachment.sig>


More information about the ffmpeg-devel mailing list