FFmpeg
vf_gblur_init.c
Go to the documentation of this file.
1 /*
2  *
3  * This file is part of FFmpeg.
4  *
5  * FFmpeg is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * FFmpeg is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with FFmpeg; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18  */
19 
20 #include "config.h"
21 
22 #include "libavutil/attributes.h"
23 #include "libavutil/cpu.h"
24 #include "libavutil/x86/cpu.h"
25 #include "libavfilter/gblur.h"
26 
27 void ff_horiz_slice_sse4(float *ptr, int width, int height, int steps, float nu, float bscale);
28 void ff_horiz_slice_avx2(float *ptr, int width, int height, int steps, float nu, float bscale);
29 
30 void ff_postscale_slice_sse(float *ptr, int length, float postscale, float min, float max);
31 void ff_postscale_slice_avx2(float *ptr, int length, float postscale, float min, float max);
32 
34 {
36 
37  if (EXTERNAL_SSE(cpu_flags)) {
39  }
40  if (EXTERNAL_AVX2_FAST(cpu_flags)) {
42  }
43 #if ARCH_X86_64
44  if (EXTERNAL_SSE4(cpu_flags)) {
46  }
47  if (EXTERNAL_AVX2(cpu_flags)) {
49  }
50 #endif
51 }
av_cold void ff_gblur_init_x86(GBlurContext *s)
Definition: vf_gblur_init.c:33
void ff_horiz_slice_avx2(float *ptr, int width, int height, int steps, float nu, float bscale)
static atomic_int cpu_flags
Definition: cpu.c:50
#define EXTERNAL_SSE(flags)
Definition: cpu.h:58
Macro definitions for various function/variable attributes.
#define EXTERNAL_SSE4(flags)
Definition: cpu.h:68
#define av_cold
Definition: attributes.h:88
#define height
#define max(a, b)
Definition: cuda_runtime.h:33
void(* horiz_slice)(float *buffer, int width, int height, int steps, float nu, float bscale)
Definition: gblur.h:52
#define EXTERNAL_AVX2_FAST(flags)
Definition: cpu.h:79
static const FLOAT postscale[64]
Definition: faandct.c:54
GLsizei GLsizei * length
Definition: opengl_enc.c:114
void ff_postscale_slice_sse(float *ptr, int length, float postscale, float min, float max)
#define width
#define s(width, name)
Definition: cbs_vp9.c:257
int av_get_cpu_flags(void)
Return the flags which specify extensions supported by the CPU.
Definition: cpu.c:95
#define EXTERNAL_AVX2(flags)
Definition: cpu.h:78
void ff_horiz_slice_sse4(float *ptr, int width, int height, int steps, float nu, float bscale)
void(* postscale_slice)(float *buffer, int length, float postscale, float min, float max)
Definition: gblur.h:53
float min
void ff_postscale_slice_avx2(float *ptr, int length, float postscale, float min, float max)