FFmpeg
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/float_dsp.h"
25 #include "libavutil/frame.h"
26 #include "libavutil/rational.h"
27 #include "libavutil/tx.h"
28 #include "avfilter.h"
29 #include "af_afirdsp.h"
30 
31 #define MAX_IR_STREAMS 32
32 
33 typedef struct AudioFIRSegment {
35  int part_size;
41 
43  int *part_index;
44 
54 
55  AVTXContext **ctx, **tx, **itx;
58 
59 typedef struct AudioFIRContext {
60  const AVClass *class;
61 
62  float wet_gain;
63  float dry_gain;
64  float length;
65  int gtype;
66  float ir_norm;
67  float ir_link;
68  float ir_gain;
69  int ir_format;
70  int ir_load;
71  float max_ir_len;
72  int response;
73  int w, h;
76  int minp;
77  int maxp;
78  int nb_irs;
80  int selir;
81  int precision;
82  int format;
83 
90  int one2many;
92  int *loading;
93  double *ch_gain;
94 
96 
105 
109 
110 #endif /* AVFILTER_AFIR_H */
AudioFIRContext::ir
AVFrame * ir[MAX_IR_STREAMS]
Definition: af_afir.h:100
AudioFIRContext::nb_segments
int nb_segments[MAX_IR_STREAMS]
Definition: af_afir.h:87
AudioFIRContext::frame_rate
AVRational frame_rate
Definition: af_afir.h:74
AudioFIRSegment::block_size
int block_size
Definition: af_afir.h:36
AudioFIRContext::ir_format
int ir_format
Definition: af_afir.h:69
AudioFIRContext::format
int format
Definition: af_afir.h:82
AVTXContext
Definition: tx_priv.h:235
AudioFIRContext::in
AVFrame * in
Definition: af_afir.h:97
rational.h
int64_t
long long int64_t
Definition: coverity.c:34
AVFrame
This structure describes decoded (raw) audio or video data.
Definition: frame.h:344
AudioFIRSegment::buffer
AVFrame * buffer
Definition: af_afir.h:50
AudioFIRContext::wet_gain
float wet_gain
Definition: af_afir.h:62
AudioFIRSegment::input_offset
int input_offset
Definition: af_afir.h:40
AudioFIRSegment::tx_fn
av_tx_fn tx_fn
Definition: af_afir.h:56
AudioFIRContext::ir_load
int ir_load
Definition: af_afir.h:70
AudioFIRContext::ir_gain
float ir_gain
Definition: af_afir.h:68
AudioFIRSegment::part_size
int part_size
Definition: af_afir.h:35
AudioFIRSegment::input_size
int input_size
Definition: af_afir.h:39
AudioFIRContext::nb_channels
int nb_channels
Definition: af_afir.h:89
AudioFIRSegment::ctx_fn
av_tx_fn ctx_fn
Definition: af_afir.h:56
AudioFIRSegment::coeff
AVFrame * coeff
Definition: af_afir.h:51
af_afirdsp.h
AudioFIRContext::min_part_size
int min_part_size
Definition: af_afir.h:102
AudioFIRSegment::blockout
AVFrame * blockout
Definition: af_afir.h:47
AudioFIRSegment
Definition: af_afir.h:33
AudioFIRSegment::tx
AVTXContext ** tx
Definition: af_afir.h:55
AudioFIRContext::maxp
int maxp
Definition: af_afir.h:77
av_tx_fn
void(* av_tx_fn)(AVTXContext *s, void *out, void *in, ptrdiff_t stride)
Function pointer to a function to perform the transform.
Definition: tx.h:151
AudioFIRContext::response
int response
Definition: af_afir.h:72
AudioFIRContext::fadein
AVFrame * fadein[2]
Definition: af_afir.h:99
AudioFIRContext::nb_irs
int nb_irs
Definition: af_afir.h:78
AudioFIRContext::gtype
int gtype
Definition: af_afir.h:65
AudioFIRContext::minp
int minp
Definition: af_afir.h:76
AudioFIRContext::max_offset
int max_offset[MAX_IR_STREAMS]
Definition: af_afir.h:88
AVClass
Describe the class of an AVClass context structure.
Definition: log.h:66
AudioFIRContext::prev_selir
int prev_selir
Definition: af_afir.h:79
AudioFIRContext::have_coeffs
int have_coeffs[MAX_IR_STREAMS]
Definition: af_afir.h:85
AVRational
Rational number (pair of numerator and denominator).
Definition: rational.h:58
AudioFIRContext::eof_coeffs
int eof_coeffs[MAX_IR_STREAMS]
Definition: af_afir.h:84
AudioFIRSegment::itx_fn
av_tx_fn itx_fn
Definition: af_afir.h:56
AudioFIRContext::seg
AudioFIRSegment seg[MAX_IR_STREAMS][1024]
Definition: af_afir.h:95
AudioFIRContext::max_part_size
int max_part_size
Definition: af_afir.h:103
float_dsp.h
AudioFIRSegment::output
AVFrame * output
Definition: af_afir.h:53
AudioFIRContext::ch_gain
double * ch_gain
Definition: af_afir.h:93
AudioFIRContext::norm_ir
AVFrame * norm_ir[MAX_IR_STREAMS]
Definition: af_afir.h:101
AudioFIRSegment::tempout
AVFrame * tempout
Definition: af_afir.h:49
MAX_IR_STREAMS
#define MAX_IR_STREAMS
Definition: af_afir.h:31
AudioFIRContext::max_ir_len
float max_ir_len
Definition: af_afir.h:71
AudioFIRContext::fdsp
AVFloatDSPContext * fdsp
Definition: af_afir.h:107
AudioFIRSegment::sumin
AVFrame * sumin
Definition: af_afir.h:45
AudioFIRContext::prev_is_disabled
int prev_is_disabled
Definition: af_afir.h:91
AudioFIRDSPContext
Definition: af_afirdsp.h:29
AVFloatDSPContext
Definition: float_dsp.h:22
frame.h
AudioFIRContext::w
int w
Definition: af_afir.h:73
AudioFIRContext::length
float length
Definition: af_afir.h:64
AudioFIRSegment::tempin
AVFrame * tempin
Definition: af_afir.h:48
AudioFIRSegment::ctx
AVTXContext ** ctx
Definition: af_afir.h:55
AudioFIRContext::h
int h
Definition: af_afir.h:73
AudioFIRContext::one2many
int one2many
Definition: af_afir.h:90
AudioFIRContext::ir_norm
float ir_norm
Definition: af_afir.h:66
AudioFIRSegment::input
AVFrame * input
Definition: af_afir.h:52
AudioFIRSegment::coeff_size
int coeff_size
Definition: af_afir.h:38
AudioFIRSegment::nb_partitions
int nb_partitions
Definition: af_afir.h:34
AudioFIRContext::precision
int precision
Definition: af_afir.h:81
AudioFIRContext::ir_link
float ir_link
Definition: af_afir.h:67
AudioFIRContext::nb_taps
int nb_taps[MAX_IR_STREAMS]
Definition: af_afir.h:86
AudioFIRSegment::itx
AVTXContext ** itx
Definition: af_afir.h:55
AudioFIRContext::afirdsp
AudioFIRDSPContext afirdsp
Definition: af_afir.h:106
AudioFIRSegment::fft_length
int fft_length
Definition: af_afir.h:37
AudioFIRContext::ir_channel
int ir_channel
Definition: af_afir.h:75
AudioFIRSegment::sumout
AVFrame * sumout
Definition: af_afir.h:46
AudioFIRContext
Definition: af_afir.h:59
avfilter.h
AudioFIRContext::loading
int * loading
Definition: af_afir.h:92
AudioFIRContext::dry_gain
float dry_gain
Definition: af_afir.h:63
AudioFIRContext::xfade
AVFrame * xfade[2]
Definition: af_afir.h:98
AudioFIRContext::selir
int selir
Definition: af_afir.h:80
AudioFIRContext::pts
int64_t pts
Definition: af_afir.h:104
AudioFIRSegment::output_offset
int * output_offset
Definition: af_afir.h:42
tx.h
AudioFIRSegment::part_index
int * part_index
Definition: af_afir.h:43