[FFmpeg-devel] [PATCH] vf_psnr: fix rgb channel order mixup in final log message.
Michael Niedermayer
michael at niedermayer.cc
Sat Jul 11 19:14:10 CEST 2015
On Sat, Jul 11, 2015 at 03:59:28PM +0000, Paul B Mahol wrote:
> Dana 11. 7. 2015. 17:21 osoba "Ronald S. Bultje" <rsbultje at gmail.com>
> napisala je:
> >
> > ---
> > libavfilter/vf_psnr.c | 6 ++++--
> > 1 file changed, 4 insertions(+), 2 deletions(-)
> >
> > diff --git a/libavfilter/vf_psnr.c b/libavfilter/vf_psnr.c
> > index 63baddd..9390f7c 100644
> > --- a/libavfilter/vf_psnr.c
> > +++ b/libavfilter/vf_psnr.c
> > @@ -319,9 +319,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),
> > --
> > 2.1.2
> >
> >
>
> LGTM
applied
thanks
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
I have often repented speaking, but never of holding my tongue.
-- Xenocrates
-------------- 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/2a394aa7/attachment.sig>
More information about the ffmpeg-devel
mailing list