FFmpeg
gblur.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2011 Pascal Getreuer
3  * Copyright (c) 2016 Paul B Mahol
4  *
5  * Redistribution and use in source and binary forms, with or without modification,
6  * are permitted provided that the following conditions are met:
7  *
8  * * Redistributions of source code must retain the above copyright
9  * notice, this list of conditions and the following disclaimer.
10  * * Redistributions in binary form must reproduce the above
11  * copyright notice, this list of conditions and the following
12  * disclaimer in the documentation and/or other materials provided
13  * with the distribution.
14  *
15  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
16  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
17  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
18  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
19  * HOLDER BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
20  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
21  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
22  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
23  * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
24  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26  */
27 
28 #ifndef AVFILTER_GBLUR_H
29 #define AVFILTER_GBLUR_H
30 #include "avfilter.h"
31 
32 typedef struct GBlurContext {
33  const AVClass *class;
34 
35  float sigma;
36  float sigmaV;
37  int steps;
38  int planes;
39 
40  int flt;
41  int depth;
42  int stride;
43  int planewidth[4];
44  int planeheight[4];
45  float *buffer;
46  float *localbuf; ///< temporary buffer for horiz_slice. NULL if not used
49  float postscale;
50  float postscaleV;
51  float nu;
52  float nuV;
53  int nb_planes;
54  void (*horiz_slice)(float *buffer, int width, int height, int steps, float nu, float bscale, float *localbuf);
55  void (*verti_slice)(float *buffer, int width, int height, int slice_start, int slice_end, int steps,
56  float nu, float bscale);
57  void (*postscale_slice)(float *buffer, int length, float postscale, float min, float max);
58 } GBlurContext;
59 
61 #endif
GBlurContext::nuV
float nuV
Definition: gblur.h:52
GBlurContext::sigma
float sigma
Definition: gblur.h:35
GBlurContext::planeheight
int planeheight[4]
Definition: gblur.h:44
GBlurContext::localbuf
float * localbuf
temporary buffer for horiz_slice. NULL if not used
Definition: gblur.h:46
GBlurContext::nb_planes
int nb_planes
Definition: gblur.h:53
GBlurContext::verti_slice
void(* verti_slice)(float *buffer, int width, int height, int slice_start, int slice_end, int steps, float nu, float bscale)
Definition: gblur.h:55
GBlurContext::postscale
float postscale
Definition: gblur.h:49
max
#define max(a, b)
Definition: cuda_runtime.h:33
GBlurContext::sigmaV
float sigmaV
Definition: gblur.h:36
GBlurContext::depth
int depth
Definition: gblur.h:41
GBlurContext::buffer
float * buffer
Definition: gblur.h:45
width
#define width
s
#define s(width, name)
Definition: cbs_vp9.c:256
GBlurContext::postscaleV
float postscaleV
Definition: gblur.h:50
slice_end
static int slice_end(AVCodecContext *avctx, AVFrame *pict)
Handle slice ends.
Definition: mpeg12dec.c:2006
GBlurContext::nu
float nu
Definition: gblur.h:51
GBlurContext::planes
int planes
Definition: gblur.h:38
AVClass
Describe the class of an AVClass context structure.
Definition: log.h:66
GBlurContext::horiz_slice
void(* horiz_slice)(float *buffer, int width, int height, int steps, float nu, float bscale, float *localbuf)
Definition: gblur.h:54
GBlurContext::postscale_slice
void(* postscale_slice)(float *buffer, int length, float postscale, float min, float max)
Definition: gblur.h:57
ff_gblur_init_x86
void ff_gblur_init_x86(GBlurContext *s)
Definition: vf_gblur_init.c:40
GBlurContext::boundaryscale
float boundaryscale
Definition: gblur.h:47
GBlurContext::planewidth
int planewidth[4]
Definition: gblur.h:43
height
#define height
GBlurContext::stride
int stride
Definition: gblur.h:42
GBlurContext::steps
int steps
Definition: gblur.h:37
avfilter.h
GBlurContext::flt
int flt
Definition: gblur.h:40
GBlurContext::boundaryscaleV
float boundaryscaleV
Definition: gblur.h:48
GBlurContext
Definition: gblur.h:32
min
float min
Definition: vorbis_enc_data.h:429