FFmpeg
Macros | Enumerations | Functions
window_func.h File Reference
#include <math.h>
#include "libavutil/avassert.h"
#include "libavutil/common.h"

Go to the source code of this file.

Macros

#define WIN_FUNC_OPTION(win_func_opt_name, win_func_offset, flag, default_window_func)
 
#define SINC(x)   (!(x)) ? 1 : sin(M_PI * (x))/(M_PI * (x));
 
#define SQR(x)   ((x)*(x))
 

Enumerations

enum  WindowFunc {
  WFUNC_RECTANGULAR, WFUNC_HANN, WFUNC_HAMMING, WFUNC_BLACKMAN,
  WFUNC_NUTTALL3, WFUNC_MNUTTALL3, WFUNC_NUTTALL, WFUNC_BNUTTALL,
  WFUNC_BHARRIS, WFUNC_TUKEY, NB_WFUNC, WFUNC_RECT,
  WFUNC_HANNING, WFUNC_HAMMING, WFUNC_BLACKMAN, WFUNC_BARTLETT,
  WFUNC_WELCH, WFUNC_FLATTOP, WFUNC_BHARRIS, WFUNC_BNUTTALL,
  WFUNC_SINE, WFUNC_NUTTALL, WFUNC_BHANN, WFUNC_LANCZOS,
  WFUNC_GAUSS, WFUNC_TUKEY, WFUNC_DOLPH, WFUNC_CAUCHY,
  WFUNC_PARZEN, WFUNC_POISSON, WFUNC_BOHMAN, WFUNC_KAISER,
  NB_WFUNC
}
 

Functions

static void generate_window_func (float *lut, int N, int win_func, float *overlap)
 

Macro Definition Documentation

◆ WIN_FUNC_OPTION

#define WIN_FUNC_OPTION (   win_func_opt_name,
  win_func_offset,
  flag,
  default_window_func 
)
Value:
{ win_func_opt_name, "set window function", win_func_offset, AV_OPT_TYPE_INT, {.i64 = default_window_func}, 0, NB_WFUNC-1, flag, .unit = "win_func" }, \
{ "rect", "Rectangular", 0, AV_OPT_TYPE_CONST, {.i64=WFUNC_RECT}, 0, 0, flag, .unit = "win_func" }, \
{ "bartlett", "Bartlett", 0, AV_OPT_TYPE_CONST, {.i64=WFUNC_BARTLETT}, 0, 0, flag, .unit = "win_func" }, \
{ "hann", "Hann", 0, AV_OPT_TYPE_CONST, {.i64=WFUNC_HANNING}, 0, 0, flag, .unit = "win_func" }, \
{ "hanning", "Hanning", 0, AV_OPT_TYPE_CONST, {.i64=WFUNC_HANNING}, 0, 0, flag, .unit = "win_func" }, \
{ "hamming", "Hamming", 0, AV_OPT_TYPE_CONST, {.i64=WFUNC_HAMMING}, 0, 0, flag, .unit = "win_func" }, \
{ "blackman", "Blackman", 0, AV_OPT_TYPE_CONST, {.i64=WFUNC_BLACKMAN}, 0, 0, flag, .unit = "win_func" }, \
{ "welch", "Welch", 0, AV_OPT_TYPE_CONST, {.i64=WFUNC_WELCH}, 0, 0, flag, .unit = "win_func" }, \
{ "flattop", "Flat-top", 0, AV_OPT_TYPE_CONST, {.i64=WFUNC_FLATTOP}, 0, 0, flag, .unit = "win_func" }, \
{ "bharris", "Blackman-Harris", 0, AV_OPT_TYPE_CONST, {.i64=WFUNC_BHARRIS}, 0, 0, flag, .unit = "win_func" }, \
{ "bnuttall", "Blackman-Nuttall", 0, AV_OPT_TYPE_CONST, {.i64=WFUNC_BNUTTALL}, 0, 0, flag, .unit = "win_func" }, \
{ "bhann", "Bartlett-Hann", 0, AV_OPT_TYPE_CONST, {.i64=WFUNC_BHANN}, 0, 0, flag, .unit = "win_func" }, \
{ "sine", "Sine", 0, AV_OPT_TYPE_CONST, {.i64=WFUNC_SINE}, 0, 0, flag, .unit = "win_func" }, \
{ "nuttall", "Nuttall", 0, AV_OPT_TYPE_CONST, {.i64=WFUNC_NUTTALL}, 0, 0, flag, .unit = "win_func" }, \
{ "lanczos", "Lanczos", 0, AV_OPT_TYPE_CONST, {.i64=WFUNC_LANCZOS}, 0, 0, flag, .unit = "win_func" }, \
{ "gauss", "Gauss", 0, AV_OPT_TYPE_CONST, {.i64=WFUNC_GAUSS}, 0, 0, flag, .unit = "win_func" }, \
{ "tukey", "Tukey", 0, AV_OPT_TYPE_CONST, {.i64=WFUNC_TUKEY}, 0, 0, flag, .unit = "win_func" }, \
{ "dolph", "Dolph-Chebyshev", 0, AV_OPT_TYPE_CONST, {.i64=WFUNC_DOLPH}, 0, 0, flag, .unit = "win_func" }, \
{ "cauchy", "Cauchy", 0, AV_OPT_TYPE_CONST, {.i64=WFUNC_CAUCHY}, 0, 0, flag, .unit = "win_func" }, \
{ "parzen", "Parzen", 0, AV_OPT_TYPE_CONST, {.i64=WFUNC_PARZEN}, 0, 0, flag, .unit = "win_func" }, \
{ "poisson", "Poisson", 0, AV_OPT_TYPE_CONST, {.i64=WFUNC_POISSON}, 0, 0, flag, .unit = "win_func" }, \
{ "bohman", "Bohman", 0, AV_OPT_TYPE_CONST, {.i64=WFUNC_BOHMAN}, 0, 0, flag, .unit = "win_func" }, \
{ "kaiser", "Kaiser", 0, AV_OPT_TYPE_CONST, {.i64=WFUNC_KAISER}, 0, 0, flag, .unit = "win_func" }

Definition at line 37 of file window_func.h.

◆ SINC

#define SINC (   x)    (!(x)) ? 1 : sin(M_PI * (x))/(M_PI * (x));

◆ SQR

#define SQR (   x)    ((x)*(x))

Enumeration Type Documentation

◆ WindowFunc

enum WindowFunc
Enumerator
WFUNC_RECTANGULAR 
WFUNC_HANN 
WFUNC_HAMMING 
WFUNC_BLACKMAN 
WFUNC_NUTTALL3 
WFUNC_MNUTTALL3 
WFUNC_NUTTALL 
WFUNC_BNUTTALL 
WFUNC_BHARRIS 
WFUNC_TUKEY 
NB_WFUNC 
WFUNC_RECT 
WFUNC_HANNING 
WFUNC_HAMMING 
WFUNC_BLACKMAN 
WFUNC_BARTLETT 
WFUNC_WELCH 
WFUNC_FLATTOP 
WFUNC_BHARRIS 
WFUNC_BNUTTALL 
WFUNC_SINE 
WFUNC_NUTTALL 
WFUNC_BHANN 
WFUNC_LANCZOS 
WFUNC_GAUSS 
WFUNC_TUKEY 
WFUNC_DOLPH 
WFUNC_CAUCHY 
WFUNC_PARZEN 
WFUNC_POISSON 
WFUNC_BOHMAN 
WFUNC_KAISER 
NB_WFUNC 

Definition at line 29 of file window_func.h.

Function Documentation

◆ generate_window_func()

static void generate_window_func ( float lut,
int  N,
int  win_func,
float overlap 
)
inlinestatic

Definition at line 63 of file window_func.h.

Referenced by config_input(), config_output(), config_props(), ff_opus_psy_init(), and init().

WFUNC_BNUTTALL
@ WFUNC_BNUTTALL
Definition: window_func.h:31
WFUNC_KAISER
@ WFUNC_KAISER
Definition: window_func.h:34
WFUNC_FLATTOP
@ WFUNC_FLATTOP
Definition: window_func.h:30
WFUNC_HAMMING
@ WFUNC_HAMMING
Definition: window_func.h:29
WFUNC_PARZEN
@ WFUNC_PARZEN
Definition: window_func.h:33
WFUNC_TUKEY
@ WFUNC_TUKEY
Definition: window_func.h:32
WFUNC_BHANN
@ WFUNC_BHANN
Definition: window_func.h:32
WFUNC_DOLPH
@ WFUNC_DOLPH
Definition: window_func.h:33
WFUNC_BHARRIS
@ WFUNC_BHARRIS
Definition: window_func.h:31
WFUNC_LANCZOS
@ WFUNC_LANCZOS
Definition: window_func.h:32
WFUNC_RECT
@ WFUNC_RECT
Definition: window_func.h:29
NB_WFUNC
@ NB_WFUNC
Definition: window_func.h:35
WFUNC_HANNING
@ WFUNC_HANNING
Definition: window_func.h:29
WFUNC_BARTLETT
@ WFUNC_BARTLETT
Definition: window_func.h:30
WFUNC_BOHMAN
@ WFUNC_BOHMAN
Definition: window_func.h:34
flag
#define flag(name)
Definition: cbs_av1.c:474
WFUNC_SINE
@ WFUNC_SINE
Definition: window_func.h:31
WFUNC_CAUCHY
@ WFUNC_CAUCHY
Definition: window_func.h:33
AV_OPT_TYPE_INT
@ AV_OPT_TYPE_INT
Definition: opt.h:235
WFUNC_GAUSS
@ WFUNC_GAUSS
Definition: window_func.h:32
WFUNC_NUTTALL
@ WFUNC_NUTTALL
Definition: window_func.h:31
WFUNC_POISSON
@ WFUNC_POISSON
Definition: window_func.h:33
AV_OPT_TYPE_CONST
@ AV_OPT_TYPE_CONST
Definition: opt.h:244
WFUNC_BLACKMAN
@ WFUNC_BLACKMAN
Definition: window_func.h:29
WFUNC_WELCH
@ WFUNC_WELCH
Definition: window_func.h:30