FFmpeg
convolution.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2012-2013 Oka Motofumi (chikuzen.mo at gmail dot com)
3  * Copyright (c) 2015 Paul B Mahol
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 #ifndef AVFILTER_CONVOLUTION_H
22 #define AVFILTER_CONVOLUTION_H
23 #include "avfilter.h"
24 
25 enum MatrixMode {
30 };
31 
32 typedef struct ConvolutionContext {
33  const AVClass *class;
34 
35  char *matrix_str[4];
36  float rdiv[4];
37  float bias[4];
38  int mode[4];
39  float scale;
40  float delta;
41  int planes;
42 
43  int size[4];
44  int depth;
45  int max;
46  int bpc;
47  int nb_planes;
49  int planewidth[4];
50  int planeheight[4];
51  int matrix[4][49];
52  int matrix_length[4];
53  int copy[4];
54 
55  void (*setup[4])(int radius, const uint8_t *c[], const uint8_t *src, int stride,
56  int x, int width, int y, int height, int bpc);
57  void (*filter[4])(uint8_t *dst, int width,
58  float rdiv, float bias, const int *const matrix,
59  const uint8_t *c[], int peak, int radius,
60  int dstride, int stride, int size);
62 
64 #endif
stride
int stride
Definition: mace.c:144
ConvolutionContext::max
int max
Definition: convolution.h:45
ConvolutionContext::rdiv
float rdiv[4]
Definition: convolution.h:36
ConvolutionContext::copy
int copy[4]
Definition: convolution.h:53
ConvolutionContext::matrix
int matrix[4][49]
Definition: convolution.h:51
ConvolutionContext::bias
float bias[4]
Definition: convolution.h:37
ConvolutionContext::nb_threads
int nb_threads
Definition: convolution.h:48
ConvolutionContext::planewidth
int planewidth[4]
Definition: convolution.h:49
MATRIX_NBMODES
@ MATRIX_NBMODES
Definition: convolution.h:29
width
#define width
s
#define s(width, name)
Definition: cbs_vp9.c:257
MATRIX_SQUARE
@ MATRIX_SQUARE
Definition: convolution.h:26
ConvolutionContext::planeheight
int planeheight[4]
Definition: convolution.h:50
AVClass
Describe the class of an AVClass context structure.
Definition: log.h:67
MATRIX_ROW
@ MATRIX_ROW
Definition: convolution.h:27
src
#define src
Definition: vp8dsp.c:255
ConvolutionContext::matrix_str
char * matrix_str[4]
Definition: convolution.h:35
ConvolutionContext::depth
int depth
Definition: convolution.h:44
ConvolutionContext
Definition: convolution.h:32
c
Undefined Behavior In the C some operations are like signed integer dereferencing freed accessing outside allocated Undefined Behavior must not occur in a C it is not safe even if the output of undefined operations is unused The unsafety may seem nit picking but Optimizing compilers have in fact optimized code on the assumption that no undefined Behavior occurs Optimizing code based on wrong assumptions can and has in some cases lead to effects beyond the output of computations The signed integer overflow problem in speed critical code Code which is highly optimized and works with signed integers sometimes has the problem that often the output of the computation does not c
Definition: undefined.txt:32
ConvolutionContext::scale
float scale
Definition: convolution.h:39
height
#define height
ConvolutionContext::nb_planes
int nb_planes
Definition: convolution.h:47
ConvolutionContext::size
int size[4]
Definition: convolution.h:43
MatrixMode
MatrixMode
Definition: convolution.h:25
ConvolutionContext::bpc
int bpc
Definition: convolution.h:46
mode
mode
Definition: ebur128.h:83
avfilter.h
ConvolutionContext::filter
void(* filter[4])(uint8_t *dst, int width, float rdiv, float bias, const int *const matrix, const uint8_t *c[], int peak, int radius, int dstride, int stride, int size)
Definition: convolution.h:57
ConvolutionContext::setup
void(* setup[4])(int radius, const uint8_t *c[], const uint8_t *src, int stride, int x, int width, int y, int height, int bpc)
Definition: convolution.h:55
MATRIX_COLUMN
@ MATRIX_COLUMN
Definition: convolution.h:28
ConvolutionContext::delta
float delta
Definition: convolution.h:40
ff_convolution_init_x86
void ff_convolution_init_x86(ConvolutionContext *s)
Definition: vf_convolution_init.c:32
ConvolutionContext::matrix_length
int matrix_length[4]
Definition: convolution.h:52
ConvolutionContext::planes
int planes
Definition: convolution.h:41