[FFmpeg-cvslog] lavfi/psnr: rename 's' parameter to match documentation

Paul B Mahol git at videolan.org
Tue Jul 9 11:43:07 CEST 2013


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Tue Jul  9 09:38:47 2013 +0000| [3c5071db88b215d79a0b0f5b447d987b667e8817] | committer: Paul B Mahol

lavfi/psnr: rename 's' parameter to match documentation

Also removes some irrelevant lines in documentation.

Signed-off-by: Paul B Mahol <onemda at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3c5071db88b215d79a0b0f5b447d987b667e8817
---

 doc/filters.texi      |    9 ++-------
 libavfilter/vf_psnr.c |    6 +++---
 2 files changed, 5 insertions(+), 10 deletions(-)

diff --git a/doc/filters.texi b/doc/filters.texi
index 27fe084..234ff2e 100644
--- a/doc/filters.texi
+++ b/doc/filters.texi
@@ -5864,9 +5864,6 @@ PSNR = 10*log10(MAX^2/MSE)
 Where MAX is the average of the maximum values of each component of the
 image.
 
-The filter accepts parameters as a list of @var{key}=@var{value} pairs,
-separated by ":".
-
 The description of the accepted parameters follows.
 
 @table @option
@@ -5879,15 +5876,13 @@ The file printed if @var{stats_file} is selected, contains a sequence of
 key/value pairs of the form @var{key}:@var{value} for each compared
 couple of frames.
 
-The shown line contains .
-
 A description of each shown parameter follows:
 
 @table @option
 @item n
 sequential number of the input frame, starting from 1
 
- at item mse_average
+ at item mse_avg
 Mean Square Error pixel-by-pixel average difference of the compared
 frames, averaged over all the image components.
 
@@ -5895,7 +5890,7 @@ frames, averaged over all the image components.
 Mean Square Error pixel-by-pixel average difference of the compared
 frames for the component specified by the suffix.
 
- at item psnr_y, psnr_u, psnr_v, psnr_r, psnr_g, psnr_g, psnr_a
+ at item psnr_y, psnr_u, psnr_v, psnr_r, psnr_g, psnr_b, psnr_a
 Peak Signal to Noise ratio of the compared frames for the component
 specified by the suffix.
 @end table
diff --git a/libavfilter/vf_psnr.c b/libavfilter/vf_psnr.c
index 37bfde4..6bc866f 100644
--- a/libavfilter/vf_psnr.c
+++ b/libavfilter/vf_psnr.c
@@ -137,8 +137,8 @@ static AVFrame *do_psnr(AVFilterContext *ctx, AVFrame *main,
         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.s.", s->comps[j], get_psnr(comp_mse[c], 1, s->max[c]));
-        set_meta(metadata, "lavfi.psnr.s_avg", 0, get_psnr(mse, 1, s->average_max));
+        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));
     }
 
     if (s->stats_file) {
@@ -149,7 +149,7 @@ static AVFrame *do_psnr(AVFilterContext *ctx, AVFrame *main,
         }
         for (j = 0; j < s->desc->nb_components; j++) {
             c = s->is_rgb ? s->rgba_map[j] : j;
-            fprintf(s->stats_file, "s%c:%0.2f ", s->comps[j],
+            fprintf(s->stats_file, "psnr_%c:%0.2f ", s->comps[j],
                     get_psnr(comp_mse[c], 1, s->max[c]));
         }
         fprintf(s->stats_file, "\n");



More information about the ffmpeg-cvslog mailing list