FFmpeg
Loading...
Searching...
No Matches
silenceremove_template.c File Reference

Go to the source code of this file.

Macros

#define SAMPLE_FORMAT   dbl
 
#define SQRT   sqrt
 
#define FMAX   fmax
 
#define FABS   fabs
 
#define ftype   double
 
#define ZERO   0.0
 
#define ONE   1.0
 
#define TMIN   -DBL_MAX
 
#define fn3(a, b)
 
#define fn2(a, b)
 
#define fn(a)
 
#define PEAKS(empty_value, op, sample, psample)
 

Functions

static void fn flush (ftype *dst, const ftype *src, int src_pos, int nb_channels, int count, int src_nb_samples, int *out_nb_samples)
 
static void fn queue_sample (AVFilterContext *ctx, const ftype *src, ftype *queue, int *queue_pos, int *queue_size, int *window_pos, int *window_size, const int nb_channels, const int nb_samples, const int window_nb_samples)
 
static ftype fn compute_avg (ftype *cache, ftype x, ftype px, int window_size, int *unused, int *unused2)
 
static ftype fn compute_median (ftype *ss, ftype x, ftype px, int n, int *ffront, int *bback)
 
static ftype fn compute_peak (ftype *ss, ftype x, ftype px, int n, int *ffront, int *bback)
 
static ftype fn compute_ptp (ftype *ss, ftype x, ftype px, int n, int *ffront, int *bback)
 
static ftype fn compute_rms (ftype *cache, ftype x, ftype px, int window_size, int *unused, int *unused2)
 
static ftype fn compute_dev (ftype *ss, ftype x, ftype px, int n, int *unused, int *unused2)
 
static void fn filter_start (AVFilterContext *ctx, const ftype *src, ftype *dst, int *nb_out_samples, const int nb_channels)
 
static void fn filter_stop (AVFilterContext *ctx, const ftype *src, ftype *dst, int *nb_out_samples, const int nb_channels)
 

Macro Definition Documentation

◆ SAMPLE_FORMAT

#define SAMPLE_FORMAT   dbl

Definition at line 37 of file silenceremove_template.c.

◆ SQRT

#define SQRT   sqrt

Definition at line 38 of file silenceremove_template.c.

Referenced by compute_dev(), and compute_rms().

◆ FMAX

#define FMAX   fmax

Definition at line 39 of file silenceremove_template.c.

Referenced by compute_avg(), compute_dev(), and compute_rms().

◆ FABS

#define FABS   fabs

Definition at line 40 of file silenceremove_template.c.

Referenced by compute_avg(), compute_median(), compute_peak(), and compute_ptp().

◆ ftype

#define ftype   double

Definition at line 41 of file silenceremove_template.c.

◆ ZERO

#define ZERO   0.0

Definition at line 42 of file silenceremove_template.c.

◆ ONE

#define ONE   1.0

Definition at line 43 of file silenceremove_template.c.

◆ TMIN

#define TMIN   -DBL_MAX

Definition at line 44 of file silenceremove_template.c.

Referenced by compute_ptp().

◆ fn3

#define fn3 ( a,
b )
Value:
a##_##b
#define _
int a
#define b
Definition input.c:43

Definition at line 47 of file silenceremove_template.c.

◆ fn2

#define fn2 ( a,
b )
Value:
#define fn3(a, b)

Definition at line 48 of file silenceremove_template.c.

◆ fn

#define fn ( a)
Value:
#define SAMPLE_FORMAT
#define fn2(a, b)

Definition at line 49 of file silenceremove_template.c.

Referenced by filter_start(), and filter_stop().

◆ PEAKS

#define PEAKS ( empty_value,
op,
sample,
psample )

Definition at line 120 of file silenceremove_template.c.

Referenced by compute_median(), compute_peak(), and compute_ptp().

Function Documentation

◆ flush()

static void fn flush ( ftype * dst,
const ftype * src,
int src_pos,
int nb_channels,
int count,
int src_nb_samples,
int * out_nb_samples )
static

Definition at line 51 of file silenceremove_template.c.

◆ queue_sample()

static void fn queue_sample ( AVFilterContext * ctx,
const ftype * src,
ftype * queue,
int * queue_pos,
int * queue_size,
int * window_pos,
int * window_size,
const int nb_channels,
const int nb_samples,
const int window_nb_samples )
static

Definition at line 77 of file silenceremove_template.c.

◆ compute_avg()

static ftype fn compute_avg ( ftype * cache,
ftype x,
ftype px,
int window_size,
int * unused,
int * unused2 )
static

Definition at line 108 of file silenceremove_template.c.

Referenced by compute_avg().

◆ compute_median()

static ftype fn compute_median ( ftype * ss,
ftype x,
ftype px,
int n,
int * ffront,
int * bback )
static

Definition at line 161 of file silenceremove_template.c.

Referenced by compute_median().

◆ compute_peak()

static ftype fn compute_peak ( ftype * ss,
ftype x,
ftype px,
int n,
int * ffront,
int * bback )
static

Definition at line 185 of file silenceremove_template.c.

Referenced by compute_peak().

◆ compute_ptp()

static ftype fn compute_ptp ( ftype * ss,
ftype x,
ftype px,
int n,
int * ffront,
int * bback )
static

Definition at line 204 of file silenceremove_template.c.

Referenced by compute_ptp().

◆ compute_rms()

static ftype fn compute_rms ( ftype * cache,
ftype x,
ftype px,
int window_size,
int * unused,
int * unused2 )
static

Definition at line 225 of file silenceremove_template.c.

◆ compute_dev()

static ftype fn compute_dev ( ftype * ss,
ftype x,
ftype px,
int n,
int * unused,
int * unused2 )
static

Definition at line 237 of file silenceremove_template.c.

Referenced by compute_dev().

◆ filter_start()

static void fn filter_start ( AVFilterContext * ctx,
const ftype * src,
ftype * dst,
int * nb_out_samples,
const int nb_channels )
static

Definition at line 254 of file silenceremove_template.c.

Referenced by filter_start().

◆ filter_stop()

static void fn filter_stop ( AVFilterContext * ctx,
const ftype * src,
ftype * dst,
int * nb_out_samples,
const int nb_channels )
static

Definition at line 351 of file silenceremove_template.c.

Referenced by filter_stop().