FFmpeg
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
Examples
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Groups
Pages
libavfilter
vf_noise.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2002 Michael Niedermayer <michaelni@gmx.at>
3
* Copyright (c) 2013 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
22
#ifndef AVFILTER_NOISE_H
23
#define AVFILTER_NOISE_H
24
25
#include "
libavutil/lfg.h
"
26
#include "
avfilter.h
"
27
28
#define MAX_NOISE 5120
29
#define MAX_SHIFT 1024
30
#define MAX_RES (MAX_NOISE-MAX_SHIFT)
31
32
#define NOISE_UNIFORM 1
33
#define NOISE_TEMPORAL 2
34
#define NOISE_AVERAGED 8
35
#define NOISE_PATTERN 16
36
37
typedef
struct
FilterParams
{
38
int
strength
;
39
unsigned
flags
;
40
AVLFG
lfg
;
41
int
seed
;
42
int8_t *
noise
;
43
int8_t *
prev_shift
[
MAX_RES
][3];
44
int
rand_shift
[
MAX_RES
];
45
int
rand_shift_init
;
46
}
FilterParams
;
47
48
typedef
struct
NoiseContext
{
49
const
AVClass
*
class
;
50
int
nb_planes
;
51
int
bytewidth
[4];
52
int
height
[4];
53
FilterParams
all
;
54
FilterParams
param
[4];
55
void
(*
line_noise
)(
uint8_t
*dst,
const
uint8_t
*
src
,
const
int8_t *
noise
,
int
len
,
int
shift
);
56
void
(*
line_noise_avg
)(
uint8_t
*dst,
const
uint8_t
*
src
,
int
len
,
const
int8_t *
const
*
shift
);
57
}
NoiseContext
;
58
59
void
ff_line_noise_c
(
uint8_t
*dst,
const
uint8_t
*
src
,
const
int8_t *
noise
,
int
len
,
int
shift
);
60
void
ff_line_noise_avg_c
(
uint8_t
*dst,
const
uint8_t
*
src
,
int
len
,
const
int8_t *
const
*
shift
);
61
62
void
ff_noise_init_x86
(
NoiseContext
*
n
);
63
64
#endif
/* AVFILTER_NOISE_H */
AVLFG
Definition:
lfg.h:27
shift
static int shift(int a, int b)
Definition:
sonic.c:82
NoiseContext::param
FilterParams param[4]
Definition:
vf_noise.h:54
NoiseContext::height
int height[4]
Definition:
vf_noise.h:52
NoiseContext::nb_planes
int nb_planes
Definition:
vf_noise.h:50
avfilter.h
Main libavfilter public API header.
FilterParams::lfg
AVLFG lfg
Definition:
vf_noise.h:40
NoiseContext::all
FilterParams all
Definition:
vf_noise.h:53
src
#define src
Definition:
vp8dsp.c:254
FilterParams::rand_shift_init
int rand_shift_init
Definition:
vf_noise.h:45
uint8_t
uint8_t
Definition:
audio_convert.c:194
FilterParams::strength
int strength
Definition:
vf_noise.h:38
NoiseContext
Definition:
noise_bsf.c:31
FilterParams::flags
unsigned flags
Definition:
vf_noise.h:39
void
typedef void(APIENTRY *FF_PFNGLACTIVETEXTUREPROC)(GLenum texture)
n
int n
Definition:
avisynth_c.h:684
FilterParams::prev_shift
int8_t * prev_shift[MAX_RES][3]
Definition:
vf_noise.h:43
lfg.h
FilterParams::noise
int8_t * noise
Definition:
vf_noise.h:42
FilterParams::seed
int seed
Definition:
vf_noise.h:41
NoiseContext::bytewidth
int bytewidth[4]
Definition:
vf_noise.h:51
ff_noise_init_x86
void ff_noise_init_x86(NoiseContext *n)
Definition:
vf_noise.c:129
FilterParams
filter data
Definition:
mlp.h:74
ff_line_noise_avg_c
void ff_line_noise_avg_c(uint8_t *dst, const uint8_t *src, int len, const int8_t *const *shift)
Definition:
vf_noise.c:178
AVClass
Describe the class of an AVClass context structure.
Definition:
log.h:67
MAX_RES
#define MAX_RES
Definition:
vf_noise.h:30
noise
static int noise(AVBSFContext *ctx, AVPacket *pkt)
Definition:
noise_bsf.c:38
NoiseContext::line_noise_avg
void(* line_noise_avg)(uint8_t *dst, const uint8_t *src, int len, const int8_t *const *shift)
Definition:
vf_noise.h:56
NoiseContext::line_noise
void(* line_noise)(uint8_t *dst, const uint8_t *src, const int8_t *noise, int len, int shift)
Definition:
vf_noise.h:55
FilterParams::rand_shift
int rand_shift[MAX_RES]
Definition:
vf_noise.h:44
ff_line_noise_c
void ff_line_noise_c(uint8_t *dst, const uint8_t *src, const int8_t *noise, int len, int shift)
Definition:
vf_noise.c:165
len
int len
Definition:
vorbis_enc_data.h:452
Generated on Tue Nov 6 2018 18:11:23 for FFmpeg by
1.8.6