History

avfilter/vf_vif: Make ff_compute_vif2 static

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

Andreas Rheinhardt committed 5 years ago

Commit 465ddcb1 parent 71eb8f82 files · +8 −43Browse files

Showing the changes to libavfilter (2 of 2 files). Show all

Unified · Split

2 files
  1. libavfilter/vf_vif.c +8 −11
  2. libavfilter/vif.h +0 −32
libavfilter/vf_vif.c+8−11
@@ -35,7 +35,6 @@ · 34 unmodified lines
3535 #include "drawutils.h"
3636 #include "formats.h"
3737 #include "internal.h"
38−#include "vif.h"
3938 #include "video.h"
4039
4140 #define NUM_DATA_BUFS 13
@@ -285,11 +284,11 @@ static int vif_filter1d(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs) · 243 unmodified lines
285284 return 0;
286285 }
287286
288−int ff_compute_vif2(AVFilterContext *ctx,
289− const float *ref, const float *main, int w, int h,
290− int ref_stride, int main_stride, float *score,
291− float *data_buf[NUM_DATA_BUFS], float **temp,
292− int gnb_threads)
287+static int compute_vif2(AVFilterContext *ctx,
288+ const float *ref, const float *main, int w, int h,
289+ int ref_stride, int main_stride, float *score,
290+ float *const data_buf[NUM_DATA_BUFS], float **temp,
291+ int gnb_threads)
293292 {
294293 ThreadData td;
295294 float *ref_scale = data_buf[0];
@@ -450,11 +449,9 @@ static AVFrame *do_vif(AVFilterContext *ctx, AVFrame *main, const AVFrame *ref) · 154 unmodified lines
450449 offset_16bit(s, ref, main, s->width);
451450 }
452451
453− ff_compute_vif2(ctx,
454− s->ref_data, s->main_data, s->width,
455− s->height, s->width, s->width,
456− score, s->data_buf, s->temp,
457− s->nb_threads);
452+ compute_vif2(ctx, s->ref_data, s->main_data,
453+ s->width, s->height, s->width, s->width,
454+ score, s->data_buf, s->temp, s->nb_threads);
458455
459456 set_meta(metadata, "lavfi.vif.scale.0", score[0]);
460457 set_meta(metadata, "lavfi.vif.scale.1", score[1]);
libavfilter/vif.h+0−32
@@ -1,32 +0,0 @@
1−/*
2− * Copyright (c) 2017 Ronald S. Bultje <rsbultje@gmail.com>
3− * Copyright (c) 2017 Ashish Pratap Singh <ashk43712@gmail.com>
4− *
5− * This file is part of FFmpeg.
6− *
7− * FFmpeg is free software; you can redistribute it and/or
8− * modify it under the terms of the GNU Lesser General Public
9− * License as published by the Free Software Foundation; either
10− * version 2.1 of the License, or (at your option) any later version.
11− *
12− * FFmpeg is distributed in the hope that it will be useful,
13− * but WITHOUT ANY WARRANTY; without even the implied warranty of
14− * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15− * Lesser General Public License for more details.
16− *
17− * You should have received a copy of the GNU Lesser General Public
18− * License along with FFmpeg; if not, write to the Free Software
19− * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20− */
21−
22−#ifndef AVFILTER_VIF_H
23−#define AVFILTER_VIF_H
24−
25−#include "avfilter.h"
26−
27−int ff_compute_vif2(AVFilterContext *ctx,
28− const float *ref, const float *main, int w, int h,
29− int ref_stride, int main_stride, float *score,
30− float *data_buf[13], float **temp, int nb_threads);
31−
32−#endif /* AVFILTER_VIF_H */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t