[FFmpeg-devel] [PATCH] libavfilter: created a new filter that obtains the average peak signal-to-noise ratio (PSNR) of two input video files in YUV format.
Stefano Sabatini
stefano.sabatini-lala at poste.it
Fri Jun 10 01:24:05 CEST 2011
On date Tuesday 2011-06-07 17:16:42 +0100, Mark Himsley encoded:
> On 07/06/11 13:03, Roger Pau Monné wrote:
[...]
> >+ if (psnr->vstats_file) {
> >+ if(psnr->is_yuv)
> >+ fprintf(psnr->vstats_file,
> >+ "Frame:%d Y:%0.2fdB Cb:%0.2fdB Cr:%0.2fdB PSNR:%0.2fdB\n",
> >+ psnr->nb_frames,
> >+ get_psnr(mse[0], 1, psnr->max[0]),
> >+ get_psnr(mse[1], 1, psnr->max[1]),
> >+ get_psnr(mse[2], 1, psnr->max[2]),
> >+ get_psnr(mse_t, 1, psnr->average_max));
> >+ if(psnr->is_rgb) {
> >+ fprintf(psnr->vstats_file,
> >+ "Frame:%d R:%0.2fdB G:%0.2fdB B:%0.2fdB ",
> >+ psnr->nb_frames,
> >+ get_psnr(mse[0], 1, psnr->max[0]),
> >+ get_psnr(mse[1], 1, psnr->max[1]),
> >+ get_psnr(mse[2], 1, psnr->max[2]));
> >+ if(av_pix_fmt_descriptors[inlink->format].nb_components> 3)
> >+ fprintf(psnr->vstats_file,
> >+ "A:%0.2fdB ",
> >+ get_psnr(mse[3], 1, psnr->max[3]));
> >+ fprintf(psnr->vstats_file,
> >+ "PSNR:%0.2fdB\n",
> >+ get_psnr(mse_t, 1, psnr->average_max));
> >+ }
> >+ }
> >+ }
>
> Would it be possible to output as a csv, similar to qpsnr, so it
Here's the link:
http://qpsnr.youlink.org/
Mark, can you show a sample so we don't have to download and compile
it to check?
> could be quickly imported into a spreadsheet and a graph drawn
> without the need to pre-process your output file ?
Maybe psnr=vstats_file:fmt=qpsnr
we may add an optional argument for setting the output driver (note
this can be done as a separate patch, so no need to block this one if
the contributor don't want to implement it).
--
FFmpeg = Fascinating and Formidable MultiPurpose Elaborated Goblin
More information about the ffmpeg-devel
mailing list