FFmpeg
|
#include <float.h>
#include <math.h>
#include "libavutil/mem.h"
#include "libavutil/opt.h"
#include "libavutil/tx.h"
#include "audio.h"
#include "avfilter.h"
#include "filters.h"
#include "window_func.h"
Go to the source code of this file.
Data Structures | |
struct | ChannelSpectralStats |
struct | AudioSpectralStatsContext |
Macros | |
#define | MEASURE_ALL UINT_MAX |
#define | MEASURE_NONE 0 |
#define | MEASURE_MEAN (1 << 0) |
#define | MEASURE_VARIANCE (1 << 1) |
#define | MEASURE_CENTROID (1 << 2) |
#define | MEASURE_SPREAD (1 << 3) |
#define | MEASURE_SKEWNESS (1 << 4) |
#define | MEASURE_KURTOSIS (1 << 5) |
#define | MEASURE_ENTROPY (1 << 6) |
#define | MEASURE_FLATNESS (1 << 7) |
#define | MEASURE_CREST (1 << 8) |
#define | MEASURE_FLUX (1 << 9) |
#define | MEASURE_SLOPE (1 << 10) |
#define | MEASURE_DECREASE (1 << 11) |
#define | MEASURE_ROLLOFF (1 << 12) |
#define | OFFSET(x) offsetof(AudioSpectralStatsContext, x) |
#define | A AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_FILTERING_PARAM |
Functions | |
AVFILTER_DEFINE_CLASS (aspectralstats) | |
static int | config_output (AVFilterLink *outlink) |
static void | set_meta (AVDictionary **metadata, int chan, const char *key, const char *fmt, float val) |
static void | set_metadata (AudioSpectralStatsContext *s, AVDictionary **metadata) |
static float | spectral_mean (const float *const spectral, int size, int max_freq) |
static float | sqrf (float a) |
static float | spectral_variance (const float *const spectral, int size, int max_freq, float mean) |
static float | spectral_centroid (const float *const spectral, int size, int max_freq) |
static float | spectral_spread (const float *const spectral, int size, int max_freq, float centroid) |
static float | cbrf (float a) |
static float | spectral_skewness (const float *const spectral, int size, int max_freq, float centroid, float spread) |
static float | spectral_kurtosis (const float *const spectral, int size, int max_freq, float centroid, float spread) |
static float | spectral_entropy (const float *const spectral, int size, int max_freq) |
static float | spectral_flatness (const float *const spectral, int size, int max_freq) |
static float | spectral_crest (const float *const spectral, int size, int max_freq) |
static float | spectral_flux (const float *const spectral, const float *const prev_spectral, int size, int max_freq) |
static float | spectral_slope (const float *const spectral, int size, int max_freq) |
static float | spectral_decrease (const float *const spectral, int size, int max_freq) |
static float | spectral_rolloff (const float *const spectral, int size, int max_freq) |
static int | filter_channel (AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs) |
static int | filter_frame (AVFilterLink *inlink, AVFrame *in) |
static int | activate (AVFilterContext *ctx) |
static av_cold void | uninit (AVFilterContext *ctx) |
Variables | |
static const AVOption | aspectralstats_options [] |
static const AVFilterPad | aspectralstats_outputs [] |
const AVFilter | ff_af_aspectralstats |
#define MEASURE_ALL UINT_MAX |
Definition at line 32 of file af_aspectralstats.c.
#define MEASURE_NONE 0 |
Definition at line 33 of file af_aspectralstats.c.
#define MEASURE_MEAN (1 << 0) |
Definition at line 34 of file af_aspectralstats.c.
#define MEASURE_VARIANCE (1 << 1) |
Definition at line 35 of file af_aspectralstats.c.
#define MEASURE_CENTROID (1 << 2) |
Definition at line 36 of file af_aspectralstats.c.
#define MEASURE_SPREAD (1 << 3) |
Definition at line 37 of file af_aspectralstats.c.
#define MEASURE_SKEWNESS (1 << 4) |
Definition at line 38 of file af_aspectralstats.c.
#define MEASURE_KURTOSIS (1 << 5) |
Definition at line 39 of file af_aspectralstats.c.
#define MEASURE_ENTROPY (1 << 6) |
Definition at line 40 of file af_aspectralstats.c.
#define MEASURE_FLATNESS (1 << 7) |
Definition at line 41 of file af_aspectralstats.c.
#define MEASURE_CREST (1 << 8) |
Definition at line 42 of file af_aspectralstats.c.
#define MEASURE_FLUX (1 << 9) |
Definition at line 43 of file af_aspectralstats.c.
#define MEASURE_SLOPE (1 << 10) |
Definition at line 44 of file af_aspectralstats.c.
#define MEASURE_DECREASE (1 << 11) |
Definition at line 45 of file af_aspectralstats.c.
#define MEASURE_ROLLOFF (1 << 12) |
Definition at line 46 of file af_aspectralstats.c.
#define OFFSET | ( | x | ) | offsetof(AudioSpectralStatsContext, x) |
Definition at line 83 of file af_aspectralstats.c.
Definition at line 84 of file af_aspectralstats.c.
AVFILTER_DEFINE_CLASS | ( | aspectralstats | ) |
|
static |
Definition at line 111 of file af_aspectralstats.c.
|
static |
Definition at line 183 of file af_aspectralstats.c.
Referenced by do_vif(), and set_metadata().
|
static |
Definition at line 197 of file af_aspectralstats.c.
Referenced by filter_frame().
Definition at line 231 of file af_aspectralstats.c.
Referenced by filter_channel().
Definition at line 241 of file af_aspectralstats.c.
Referenced by spectral_flux(), spectral_kurtosis(), spectral_slope(), spectral_spread(), and spectral_variance().
|
static |
Definition at line 246 of file af_aspectralstats.c.
Referenced by filter_channel().
Definition at line 256 of file af_aspectralstats.c.
Referenced by filter_channel().
|
static |
Definition at line 271 of file af_aspectralstats.c.
Referenced by filter_channel().
Definition at line 286 of file af_aspectralstats.c.
Referenced by spectral_skewness().
|
static |
Definition at line 291 of file af_aspectralstats.c.
Referenced by filter_channel().
|
static |
Definition at line 307 of file af_aspectralstats.c.
Referenced by filter_channel().
Definition at line 323 of file af_aspectralstats.c.
Referenced by filter_channel().
Definition at line 337 of file af_aspectralstats.c.
Referenced by filter_channel().
Definition at line 355 of file af_aspectralstats.c.
Referenced by filter_channel().
|
static |
Definition at line 370 of file af_aspectralstats.c.
Referenced by filter_channel().
Definition at line 381 of file af_aspectralstats.c.
Referenced by filter_channel().
Definition at line 400 of file af_aspectralstats.c.
Referenced by filter_channel().
Definition at line 414 of file af_aspectralstats.c.
Referenced by filter_channel().
|
static |
Definition at line 435 of file af_aspectralstats.c.
Referenced by filter_frame().
|
static |
Definition at line 506 of file af_aspectralstats.c.
Referenced by activate().
|
static |
Definition at line 546 of file af_aspectralstats.c.
|
static |
Definition at line 575 of file af_aspectralstats.c.
|
static |
Definition at line 86 of file af_aspectralstats.c.
|
static |
Definition at line 603 of file af_aspectralstats.c.
const AVFilter ff_af_aspectralstats |
Definition at line 611 of file af_aspectralstats.c.