[FFmpeg-cvslog] avfilter/vf_vif: Make ff_compute_vif2 static

Andreas Rheinhardt git at videolan.org
Sun Aug 8 19:39:20 EEST 2021


ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Fri Aug  6 17:38:22 2021 +0200| [465ddcb6009a79654769d36c840591cbcc65da10] | committer: Andreas Rheinhardt

avfilter/vf_vif: Make ff_compute_vif2 static

Only used here; the vif.h header can then be removed.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>

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

 libavfilter/vf_vif.c | 19 ++++++++-----------
 libavfilter/vif.h    | 32 --------------------------------
 2 files changed, 8 insertions(+), 43 deletions(-)

diff --git a/libavfilter/vf_vif.c b/libavfilter/vf_vif.c
index bb949649e4..c21bd40f44 100644
--- a/libavfilter/vf_vif.c
+++ b/libavfilter/vf_vif.c
@@ -35,7 +35,6 @@
 #include "drawutils.h"
 #include "formats.h"
 #include "internal.h"
-#include "vif.h"
 #include "video.h"
 
 #define NUM_DATA_BUFS 13
@@ -285,11 +284,11 @@ static int vif_filter1d(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
     return 0;
 }
 
-int ff_compute_vif2(AVFilterContext *ctx,
-                    const float *ref, const float *main, int w, int h,
-                    int ref_stride, int main_stride, float *score,
-                    float *data_buf[NUM_DATA_BUFS], float **temp,
-                    int gnb_threads)
+static int compute_vif2(AVFilterContext *ctx,
+                        const float *ref, const float *main, int w, int h,
+                        int ref_stride, int main_stride, float *score,
+                        float *const data_buf[NUM_DATA_BUFS], float **temp,
+                        int gnb_threads)
 {
     ThreadData td;
     float *ref_scale = data_buf[0];
@@ -450,11 +449,9 @@ static AVFrame *do_vif(AVFilterContext *ctx, AVFrame *main, const AVFrame *ref)
         offset_16bit(s, ref, main, s->width);
     }
 
-    ff_compute_vif2(ctx,
-                    s->ref_data, s->main_data, s->width,
-                    s->height, s->width, s->width,
-                    score, s->data_buf, s->temp,
-                    s->nb_threads);
+    compute_vif2(ctx, s->ref_data, s->main_data,
+                 s->width, s->height, s->width, s->width,
+                 score, s->data_buf, s->temp, s->nb_threads);
 
     set_meta(metadata, "lavfi.vif.scale.0", score[0]);
     set_meta(metadata, "lavfi.vif.scale.1", score[1]);
diff --git a/libavfilter/vif.h b/libavfilter/vif.h
deleted file mode 100644
index 5b0d86da00..0000000000
--- a/libavfilter/vif.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Copyright (c) 2017 Ronald S. Bultje <rsbultje at gmail.com>
- * Copyright (c) 2017 Ashish Pratap Singh <ashk43712 at gmail.com>
- *
- * This file is part of FFmpeg.
- *
- * FFmpeg is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * FFmpeg is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with FFmpeg; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef AVFILTER_VIF_H
-#define AVFILTER_VIF_H
-
-#include "avfilter.h"
-
-int ff_compute_vif2(AVFilterContext *ctx,
-                    const float *ref, const float *main, int w, int h,
-                    int ref_stride, int main_stride, float *score,
-                    float *data_buf[13], float **temp, int nb_threads);
-
-#endif /* AVFILTER_VIF_H */



More information about the ffmpeg-cvslog mailing list