FFmpeg
Data Structures | Macros | Enumerations | Functions | Variables
avf_showcwt.c File Reference
#include <float.h>
#include <math.h>
#include "libavutil/tx.h"
#include "libavutil/avassert.h"
#include "libavutil/avstring.h"
#include "libavutil/channel_layout.h"
#include "libavutil/cpu.h"
#include "libavutil/opt.h"
#include "libavutil/parseutils.h"
#include "audio.h"
#include "video.h"
#include "avfilter.h"
#include "filters.h"
#include "internal.h"

Go to the source code of this file.

Data Structures

struct  ShowCWTContext
 

Macros

#define OFFSET(x)   offsetof(ShowCWTContext, x)
 
#define FLAGS   AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM
 

Enumerations

enum  FrequencyScale {
  FSCALE_LINEAR, FSCALE_LOG2, FSCALE_BARK, FSCALE_MEL,
  FSCALE_ERBS, NB_FSCALE, FS_LINEAR, FS_LOG,
  FS_RLOG, NB_FSCALES, F_LINEAR, F_LOG,
  NB_FSCALES
}
 
enum  DirectionMode {
  DIRECTION_LR, DIRECTION_RL, DIRECTION_UD, DIRECTION_DU,
  NB_DIRECTION
}
 
enum  SlideMode {
  REPLACE, SCROLL, NB_SLIDES, SLIDE_REPLACE,
  SLIDE_SCROLL, SLIDE_FRAME, NB_SLIDE, REPLACE,
  SCROLL, FULLFRAME, RSCROLL, LREPLACE,
  NB_SLIDES, REPLACE, SCROLL, FULLFRAME,
  RSCROLL, NB_SLIDES
}
 

Functions

 AVFILTER_DEFINE_CLASS (showcwt)
 
static av_cold void uninit (AVFilterContext *ctx)
 
static int query_formats (AVFilterContext *ctx)
 
static void frequency_band (float *frequency_band, int frequency_band_count, float frequency_range, float frequency_offset, int frequency_scale, float deviation)
 
static float remap_log (float value, float log_factor)
 
static int run_channel_cwt_prepare (AVFilterContext *ctx, void *arg, int jobnr, int ch)
 
static int draw (AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
 
static int run_channel_cwt (AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
 
static void compute_kernel (AVFilterContext *ctx)
 
static int config_output (AVFilterLink *outlink)
 
static int output_frame (AVFilterContext *ctx)
 
static int run_channels_cwt_prepare (AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
 
static int activate (AVFilterContext *ctx)
 

Variables

static const AVOption showcwt_options []
 
static const AVFilterPad showcwt_inputs []
 
static const AVFilterPad showcwt_outputs []
 
const AVFilter ff_avf_showcwt
 

Macro Definition Documentation

◆ OFFSET

#define OFFSET (   x)    offsetof(ShowCWTContext, x)

Definition at line 116 of file avf_showcwt.c.

◆ FLAGS

Definition at line 117 of file avf_showcwt.c.

Enumeration Type Documentation

◆ FrequencyScale

Enumerator
FSCALE_LINEAR 
FSCALE_LOG2 
FSCALE_BARK 
FSCALE_MEL 
FSCALE_ERBS 
NB_FSCALE 
FS_LINEAR 
FS_LOG 
FS_RLOG 
NB_FSCALES 
F_LINEAR 
F_LOG 
NB_FSCALES 

Definition at line 37 of file avf_showcwt.c.

◆ DirectionMode

Enumerator
DIRECTION_LR 
DIRECTION_RL 
DIRECTION_UD 
DIRECTION_DU 
NB_DIRECTION 

Definition at line 46 of file avf_showcwt.c.

◆ SlideMode

enum SlideMode
Enumerator
REPLACE 
SCROLL 
NB_SLIDES 
SLIDE_REPLACE 
SLIDE_SCROLL 
SLIDE_FRAME 
NB_SLIDE 
REPLACE 
SCROLL 
FULLFRAME 
RSCROLL 
LREPLACE 
NB_SLIDES 
REPLACE 
SCROLL 
FULLFRAME 
RSCROLL 
NB_SLIDES 

Definition at line 54 of file avf_showcwt.c.

Function Documentation

◆ AVFILTER_DEFINE_CLASS()

AVFILTER_DEFINE_CLASS ( showcwt  )

◆ uninit()

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 155 of file avf_showcwt.c.

Referenced by config_output().

◆ query_formats()

static int query_formats ( AVFilterContext ctx)
static

Definition at line 187 of file avf_showcwt.c.

◆ frequency_band()

static void frequency_band ( float frequency_band,
int  frequency_band_count,
float  frequency_range,
float  frequency_offset,
int  frequency_scale,
float  deviation 
)
static

Definition at line 216 of file avf_showcwt.c.

Referenced by config_output().

◆ remap_log()

static float remap_log ( float  value,
float  log_factor 
)
static

Definition at line 251 of file avf_showcwt.c.

Referenced by draw().

◆ run_channel_cwt_prepare()

static int run_channel_cwt_prepare ( AVFilterContext ctx,
void *  arg,
int  jobnr,
int  ch 
)
static

Definition at line 260 of file avf_showcwt.c.

Referenced by run_channels_cwt_prepare().

◆ draw()

static int draw ( AVFilterContext ctx,
void *  arg,
int  jobnr,
int  nb_jobs 
)
static

◆ run_channel_cwt()

static int run_channel_cwt ( AVFilterContext ctx,
void *  arg,
int  jobnr,
int  nb_jobs 
)
static

Definition at line 460 of file avf_showcwt.c.

Referenced by activate().

◆ compute_kernel()

static void compute_kernel ( AVFilterContext ctx)
static

Definition at line 498 of file avf_showcwt.c.

Referenced by config_output().

◆ config_output()

static int config_output ( AVFilterLink outlink)
static

Definition at line 542 of file avf_showcwt.c.

◆ output_frame()

static int output_frame ( AVFilterContext ctx)
static

Definition at line 721 of file avf_showcwt.c.

Referenced by activate().

◆ run_channels_cwt_prepare()

static int run_channels_cwt_prepare ( AVFilterContext ctx,
void *  arg,
int  jobnr,
int  nb_jobs 
)
static

Definition at line 905 of file avf_showcwt.c.

Referenced by activate().

◆ activate()

static int activate ( AVFilterContext ctx)
static

Definition at line 918 of file avf_showcwt.c.

Variable Documentation

◆ showcwt_options

const AVOption showcwt_options[]
static

Definition at line 119 of file avf_showcwt.c.

◆ showcwt_inputs

const AVFilterPad showcwt_inputs[]
static
Initial value:
= {
{
.name = "default",
},
}

Definition at line 1002 of file avf_showcwt.c.

◆ showcwt_outputs

const AVFilterPad showcwt_outputs[]
static
Initial value:
= {
{
.name = "default",
.config_props = config_output,
},
}

Definition at line 1009 of file avf_showcwt.c.

◆ ff_avf_showcwt

const AVFilter ff_avf_showcwt
Initial value:
= {
.name = "showcwt",
.description = NULL_IF_CONFIG_SMALL("Convert input audio to a CWT (Continuous Wavelet Transform) spectrum video output."),
.uninit = uninit,
.priv_size = sizeof(ShowCWTContext),
.activate = activate,
.priv_class = &showcwt_class,
}

Definition at line 1017 of file avf_showcwt.c.

FILTER_QUERY_FUNC
#define FILTER_QUERY_FUNC(func)
Definition: internal.h:167
uninit
static av_cold void uninit(AVFilterContext *ctx)
Definition: avf_showcwt.c:155
AVMEDIA_TYPE_AUDIO
@ AVMEDIA_TYPE_AUDIO
Definition: avutil.h:202
ShowCWTContext
Definition: avf_showcwt.c:61
FILTER_INPUTS
#define FILTER_INPUTS(array)
Definition: internal.h:190
NULL_IF_CONFIG_SMALL
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition: internal.h:115
query_formats
static int query_formats(AVFilterContext *ctx)
Definition: avf_showcwt.c:187
showcwt_inputs
static const AVFilterPad showcwt_inputs[]
Definition: avf_showcwt.c:1002
activate
static int activate(AVFilterContext *ctx)
Definition: avf_showcwt.c:918
config_output
static int config_output(AVFilterLink *outlink)
Definition: avf_showcwt.c:542
AVFILTER_FLAG_SLICE_THREADS
#define AVFILTER_FLAG_SLICE_THREADS
The filter supports multithreading by splitting frames into multiple parts and processing them concur...
Definition: avfilter.h:127
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
FILTER_OUTPUTS
#define FILTER_OUTPUTS(array)
Definition: internal.h:191
showcwt_outputs
static const AVFilterPad showcwt_outputs[]
Definition: avf_showcwt.c:1009