FFmpeg
4.4.4
libavfilter
af_afir.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2017 Paul B Mahol
3
*
4
* This file is part of FFmpeg.
5
*
6
* FFmpeg is free software; you can redistribute it and/or
7
* modify it under the terms of the GNU Lesser General Public
8
* License as published by the Free Software Foundation; either
9
* version 2.1 of the License, or (at your option) any later version.
10
*
11
* FFmpeg is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
* Lesser General Public License for more details.
15
*
16
* You should have received a copy of the GNU Lesser General Public
17
* License along with FFmpeg; if not, write to the Free Software
18
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19
*/
20
21
#ifndef AVFILTER_AFIR_H
22
#define AVFILTER_AFIR_H
23
24
#include "
libavutil/common.h
"
25
#include "
libavutil/float_dsp.h
"
26
#include "
libavutil/opt.h
"
27
#include "
libavcodec/avfft.h
"
28
29
#include "
audio.h
"
30
#include "
avfilter.h
"
31
#include "
formats.h
"
32
#include "
internal.h
"
33
34
typedef
struct
AudioFIRSegment
{
35
int
nb_partitions
;
36
int
part_size
;
37
int
block_size
;
38
int
fft_length
;
39
int
coeff_size
;
40
int
input_size
;
41
int
input_offset
;
42
43
int
*
output_offset
;
44
int
*
part_index
;
45
46
AVFrame
*
sum
;
47
AVFrame
*
block
;
48
AVFrame
*
buffer
;
49
AVFrame
*
coeff
;
50
AVFrame
*
input
;
51
AVFrame
*
output
;
52
53
RDFTContext
**
rdft
, **
irdft
;
54
}
AudioFIRSegment
;
55
56
typedef
struct
AudioFIRDSPContext
{
57
void
(*
fcmul_add
)(
float
*sum,
const
float
*t,
const
float
*
c
,
58
ptrdiff_t
len
);
59
}
AudioFIRDSPContext
;
60
61
typedef
struct
AudioFIRContext
{
62
const
AVClass
*
class
;
63
64
float
wet_gain
;
65
float
dry_gain
;
66
float
length
;
67
int
gtype
;
68
float
ir_gain
;
69
int
ir_format
;
70
float
max_ir_len
;
71
int
response
;
72
int
w
,
h
;
73
AVRational
frame_rate
;
74
int
ir_channel
;
75
int
minp
;
76
int
maxp
;
77
int
nb_irs
;
78
int
selir
;
79
80
float
gain
;
81
82
int
eof_coeffs
[32];
83
int
have_coeffs
;
84
int
nb_taps
;
85
int
nb_channels
;
86
int
nb_coef_channels
;
87
int
one2many
;
88
89
AudioFIRSegment
seg
[1024];
90
int
nb_segments
;
91
92
AVFrame
*
in
;
93
AVFrame
*
ir
[32];
94
AVFrame
*
video
;
95
int
min_part_size
;
96
int64_t
pts
;
97
98
AudioFIRDSPContext
afirdsp
;
99
AVFloatDSPContext
*
fdsp
;
100
101
}
AudioFIRContext
;
102
103
void
ff_afir_init
(
AudioFIRDSPContext
*
s
);
104
void
ff_afir_init_x86
(
AudioFIRDSPContext
*
s
);
105
106
#endif
/* AVFILTER_AFIR_H */
ff_afir_init
void ff_afir_init(AudioFIRDSPContext *s)
Definition:
af_afir.c:826
ff_afir_init_x86
void ff_afir_init_x86(AudioFIRDSPContext *s)
Definition:
af_afir_init.c:30
audio.h
avfft.h
FFT functions.
avfilter.h
Main libavfilter public API header.
s
#define s(width, name)
Definition:
cbs_vp9.c:257
common.h
common internal and external API header
float_dsp.h
formats.h
internal.h
common internal API header
opt.h
AVOptions.
void
typedef void(RENAME(mix_any_func_type))
Definition:
rematrix_template.c:52
AVClass
Describe the class of an AVClass context structure.
Definition:
log.h:67
AVFloatDSPContext
Definition:
float_dsp.h:24
AVFrame
This structure describes decoded (raw) audio or video data.
Definition:
frame.h:318
AVRational
Rational number (pair of numerator and denominator).
Definition:
rational.h:58
AudioFIRContext
Definition:
af_afir.h:61
AudioFIRContext::max_ir_len
float max_ir_len
Definition:
af_afir.h:70
AudioFIRContext::frame_rate
AVRational frame_rate
Definition:
af_afir.h:73
AudioFIRContext::seg
AudioFIRSegment seg[1024]
Definition:
af_afir.h:89
AudioFIRContext::have_coeffs
int have_coeffs
Definition:
af_afir.h:83
AudioFIRContext::ir_format
int ir_format
Definition:
af_afir.h:69
AudioFIRContext::gtype
int gtype
Definition:
af_afir.h:67
AudioFIRContext::min_part_size
int min_part_size
Definition:
af_afir.h:95
AudioFIRContext::nb_irs
int nb_irs
Definition:
af_afir.h:77
AudioFIRContext::w
int w
Definition:
af_afir.h:72
AudioFIRContext::nb_segments
int nb_segments
Definition:
af_afir.h:90
AudioFIRContext::fdsp
AVFloatDSPContext * fdsp
Definition:
af_afir.h:99
AudioFIRContext::nb_channels
int nb_channels
Definition:
af_afir.h:85
AudioFIRContext::selir
int selir
Definition:
af_afir.h:78
AudioFIRContext::afirdsp
AudioFIRDSPContext afirdsp
Definition:
af_afir.h:98
AudioFIRContext::in
AVFrame * in
Definition:
af_afir.h:92
AudioFIRContext::nb_coef_channels
int nb_coef_channels
Definition:
af_afir.h:86
AudioFIRContext::nb_taps
int nb_taps
Definition:
af_afir.h:84
AudioFIRContext::maxp
int maxp
Definition:
af_afir.h:76
AudioFIRContext::dry_gain
float dry_gain
Definition:
af_afir.h:65
AudioFIRContext::video
AVFrame * video
Definition:
af_afir.h:94
AudioFIRContext::h
int h
Definition:
af_afir.h:72
AudioFIRContext::ir_channel
int ir_channel
Definition:
af_afir.h:74
AudioFIRContext::one2many
int one2many
Definition:
af_afir.h:87
AudioFIRContext::gain
float gain
Definition:
af_afir.h:80
AudioFIRContext::length
float length
Definition:
af_afir.h:66
AudioFIRContext::pts
int64_t pts
Definition:
af_afir.h:96
AudioFIRContext::ir_gain
float ir_gain
Definition:
af_afir.h:68
AudioFIRContext::minp
int minp
Definition:
af_afir.h:75
AudioFIRContext::wet_gain
float wet_gain
Definition:
af_afir.h:64
AudioFIRContext::ir
AVFrame * ir[32]
Definition:
af_afir.h:93
AudioFIRContext::response
int response
Definition:
af_afir.h:71
AudioFIRContext::eof_coeffs
int eof_coeffs[32]
Definition:
af_afir.h:82
AudioFIRDSPContext
Definition:
af_afir.h:56
AudioFIRDSPContext::fcmul_add
void(* fcmul_add)(float *sum, const float *t, const float *c, ptrdiff_t len)
Definition:
af_afir.h:57
AudioFIRSegment
Definition:
af_afir.h:34
AudioFIRSegment::sum
AVFrame * sum
Definition:
af_afir.h:46
AudioFIRSegment::buffer
AVFrame * buffer
Definition:
af_afir.h:48
AudioFIRSegment::part_size
int part_size
Definition:
af_afir.h:36
AudioFIRSegment::input_offset
int input_offset
Definition:
af_afir.h:41
AudioFIRSegment::block_size
int block_size
Definition:
af_afir.h:37
AudioFIRSegment::part_index
int * part_index
Definition:
af_afir.h:44
AudioFIRSegment::block
AVFrame * block
Definition:
af_afir.h:47
AudioFIRSegment::rdft
RDFTContext ** rdft
Definition:
af_afir.h:53
AudioFIRSegment::coeff_size
int coeff_size
Definition:
af_afir.h:39
AudioFIRSegment::irdft
RDFTContext ** irdft
Definition:
af_afir.h:53
AudioFIRSegment::input
AVFrame * input
Definition:
af_afir.h:50
AudioFIRSegment::output
AVFrame * output
Definition:
af_afir.h:51
AudioFIRSegment::coeff
AVFrame * coeff
Definition:
af_afir.h:49
AudioFIRSegment::output_offset
int * output_offset
Definition:
af_afir.h:43
AudioFIRSegment::nb_partitions
int nb_partitions
Definition:
af_afir.h:35
AudioFIRSegment::input_size
int input_size
Definition:
af_afir.h:40
AudioFIRSegment::fft_length
int fft_length
Definition:
af_afir.h:38
RDFTContext
Definition:
rdft.h:28
len
int len
Definition:
vorbis_enc_data.h:452
c
static double c[64]
Definition:
vsrc_mptestsrc.c:92
Generated on Sun Feb 25 2024 16:38:44 for FFmpeg by
1.9.1