Only used here; the vif.h header can then be removed.
Showing the changes to libavfilter (2 of 2 files). Show all
Unified · Split
| @@ -35,7 +35,6 @@ · 34 unmodified lines | ||
| 35 | 35 | #include "drawutils.h" |
| 36 | 36 | #include "formats.h" |
| 37 | 37 | #include "internal.h" |
| 38 | −#include "vif.h" | |
| 39 | 38 | #include "video.h" |
| 40 | 39 | |
| 41 | 40 | #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 | 284 | return 0; |
| 286 | 285 | } |
| 287 | 286 | |
| 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) | |
| 293 | 292 | { |
| 294 | 293 | ThreadData td; |
| 295 | 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 | 449 | offset_16bit(s, ref, main, s->width); |
| 451 | 450 | } |
| 452 | 451 | |
| 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); | |
| 458 | 455 | |
| 459 | 456 | set_meta(metadata, "lavfi.vif.scale.0", score[0]); |
| 460 | 457 | set_meta(metadata, "lavfi.vif.scale.1", score[1]); |
| @@ -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 */ | |