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
35#include "drawutils.h"35#include "drawutils.h"
36#include "formats.h"36#include "formats.h"
37#include "internal.h"37#include "internal.h"
38#include "vif.h"
39#include "video.h"38#include "video.h"
40 39
41#define NUM_DATA_BUFS 1340#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
285 return 0;284 return 0;
286}285}
287 286
288int ff_compute_vif2(AVFilterContext *ctx,287static int compute_vif2(AVFilterContext *ctx,
289 const float *ref, const float *main, int w, int h,288 const float *ref, const float *main, int w, int h,
290 int ref_stride, int main_stride, float *score,289 int ref_stride, int main_stride, float *score,
291 float *data_buf[NUM_DATA_BUFS], float **temp,290 float *const data_buf[NUM_DATA_BUFS], float **temp,
292 int gnb_threads)291 int gnb_threads)
293{292{
294 ThreadData td;293 ThreadData td;
295 float *ref_scale = data_buf[0];294 float *ref_scale = data_buf[0];
@@ -450,11 +449,9 @@ static AVFrame *do_vif(AVFilterContext *ctx, AVFrame *main, const AVFrame *ref) · 154 unmodified lines
450 offset_16bit(s, ref, main, s->width);449 offset_16bit(s, ref, main, s->width);
451 }450 }
452 451
453 ff_compute_vif2(ctx,452 compute_vif2(ctx, s->ref_data, s->main_data,
454 s->ref_data, s->main_data, s->width,453 s->width, s->height, s->width, s->width,
455 s->height, s->width, s->width,454 score, s->data_buf, s->temp, s->nb_threads);
456 score, s->data_buf, s->temp,
457 s->nb_threads);
458 455
459 set_meta(metadata, "lavfi.vif.scale.0", score[0]);456 set_meta(metadata, "lavfi.vif.scale.0", score[0]);
460 set_meta(metadata, "lavfi.vif.scale.1", score[1]);457 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
27int 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