FFmpeg
|
#include "config.h"
#include "libavcodec/avfft.h"
#include "libavutil/avassert.h"
#include "libavutil/opt.h"
#include "libavutil/xga_font_data.h"
#include "libavutil/eval.h"
#include "libavutil/pixdesc.h"
#include "libavutil/time.h"
#include "avfilter.h"
#include "internal.h"
#include "lavfutils.h"
#include "lswsutils.h"
#include "avf_showcqt.h"
Go to the source code of this file.
Macros | |
#define | BASEFREQ 20.01523126408007475 |
#define | ENDFREQ 20495.59681441799654 |
#define | TLENGTH "384*tc/(384+tc*f)" |
#define | TLENGTH_MIN 0.001 |
#define | VOLUME_MAX 100.0 |
#define | FONTCOLOR |
#define | CSCHEME "1|0.5|0|0|0.5|1" |
#define | PTS_STEP 10 |
#define | PTS_TOLERANCE 1 |
#define | OFFSET(x) offsetof(ShowCQTContext, x) |
#define | FLAGS (AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM) |
#define | DRAW_BAR_WITH_CHROMA(x) |
#define | DRAW_BAR_WITHOUT_CHROMA(x) |
#define | BLEND_WITH_CHROMA(c) |
#define | BLEND_WITHOUT_CHROMA(c, alpha_inc) |
#define | BLEND_CHROMA2(c) |
#define | BLEND_CHROMA2x2(c) |
#define | UPDATE_TIME(t) |
Functions | |
AVFILTER_DEFINE_CLASS (showcqt) | |
static void | common_uninit (ShowCQTContext *s) |
static double * | create_freq_table (double base, double end, int n) |
static double | clip_with_log (void *log_ctx, const char *name, double val, double min, double max, double nan_replace, int idx) |
static double | a_weighting (void *p, double f) |
static double | b_weighting (void *p, double f) |
static double | c_weighting (void *p, double f) |
static int | init_volume (ShowCQTContext *s) |
static void | cqt_calc (FFTComplex *dst, const FFTComplex *src, const Coeffs *coeffs, int len, int fft_len) |
static int | init_cqt (ShowCQTContext *s) |
static AVFrame * | alloc_frame_empty (enum AVPixelFormat format, int w, int h) |
static enum AVPixelFormat | convert_axis_pixel_format (enum AVPixelFormat format) |
static int | init_axis_empty (ShowCQTContext *s) |
static int | init_axis_from_file (ShowCQTContext *s) |
static double | midi (void *p, double f) |
static double | r_func (void *p, double x) |
static double | g_func (void *p, double x) |
static double | b_func (void *p, double x) |
static int | init_axis_color (ShowCQTContext *s, AVFrame *tmp, int half) |
static int | render_freetype (ShowCQTContext *s, AVFrame *tmp, char *fontfile) |
static int | render_fontconfig (ShowCQTContext *s, AVFrame *tmp, char *font) |
static int | render_default_font (AVFrame *tmp) |
static int | init_axis_from_font (ShowCQTContext *s) |
static float | calculate_gamma (float v, float g) |
static void | rgb_from_cqt (ColorFloat *c, const FFTComplex *v, float g, int len, float cscheme[6]) |
static void | yuv_from_cqt (ColorFloat *c, const FFTComplex *v, float gamma, int len, float cm[3][3], float cscheme[6]) |
static void | draw_bar_rgb (AVFrame *out, const float *h, const float *rcp_h, const ColorFloat *c, int bar_h, float bar_t) |
static void | draw_bar_yuv (AVFrame *out, const float *h, const float *rcp_h, const ColorFloat *c, int bar_h, float bar_t) |
static void | draw_axis_rgb (AVFrame *out, AVFrame *axis, const ColorFloat *c, int off) |
static void | draw_axis_yuv (AVFrame *out, AVFrame *axis, const ColorFloat *c, int off) |
static void | draw_sono (AVFrame *out, AVFrame *sono, int off, int idx) |
static void | update_sono_rgb (AVFrame *sono, const ColorFloat *c, int idx) |
static void | update_sono_yuv (AVFrame *sono, const ColorFloat *c, int idx) |
static void | process_cqt (ShowCQTContext *s) |
static int | plot_cqt (AVFilterContext *ctx, AVFrame **frameout) |
static void | init_colormatrix (ShowCQTContext *s) |
static int | init_cscheme (ShowCQTContext *s) |
static av_cold int | init (AVFilterContext *ctx) |
static av_cold void | uninit (AVFilterContext *ctx) |
static int | query_formats (AVFilterContext *ctx) |
static int | config_output (AVFilterLink *outlink) |
static int | filter_frame (AVFilterLink *inlink, AVFrame *insamples) |
static int | request_frame (AVFilterLink *outlink) |
Variables | |
static const AVOption | showcqt_options [] |
static const AVFilterPad | showcqt_inputs [] |
static const AVFilterPad | showcqt_outputs [] |
AVFilter | ff_avf_showcqt |
#define BASEFREQ 20.01523126408007475 |
Definition at line 45 of file avf_showcqt.c.
#define ENDFREQ 20495.59681441799654 |
Definition at line 46 of file avf_showcqt.c.
Definition at line 47 of file avf_showcqt.c.
#define TLENGTH_MIN 0.001 |
Definition at line 48 of file avf_showcqt.c.
#define VOLUME_MAX 100.0 |
Definition at line 49 of file avf_showcqt.c.
#define FONTCOLOR |
Definition at line 50 of file avf_showcqt.c.
#define CSCHEME "1|0.5|0|0|0.5|1" |
Definition at line 53 of file avf_showcqt.c.
#define PTS_STEP 10 |
Definition at line 54 of file avf_showcqt.c.
#define PTS_TOLERANCE 1 |
Definition at line 55 of file avf_showcqt.c.
#define OFFSET | ( | x | ) | offsetof(ShowCQTContext, x) |
Definition at line 57 of file avf_showcqt.c.
#define FLAGS (AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM) |
Definition at line 58 of file avf_showcqt.c.
#define DRAW_BAR_WITH_CHROMA | ( | x | ) |
Definition at line 784 of file avf_showcqt.c.
#define DRAW_BAR_WITHOUT_CHROMA | ( | x | ) |
#define BLEND_WITH_CHROMA | ( | c | ) |
Definition at line 890 of file avf_showcqt.c.
#define BLEND_WITHOUT_CHROMA | ( | c, | |
alpha_inc | |||
) |
Definition at line 910 of file avf_showcqt.c.
#define BLEND_CHROMA2 | ( | c | ) |
Definition at line 924 of file avf_showcqt.c.
#define BLEND_CHROMA2x2 | ( | c | ) |
Definition at line 941 of file avf_showcqt.c.
#define UPDATE_TIME | ( | t | ) |
AVFILTER_DEFINE_CLASS | ( | showcqt | ) |
|
static |
Definition at line 108 of file avf_showcqt.c.
Referenced by config_output(), and uninit().
|
static |
Definition at line 165 of file avf_showcqt.c.
Referenced by config_output(), and init_axis_color().
|
static |
Definition at line 185 of file avf_showcqt.c.
Referenced by init_cqt(), and init_volume().
|
static |
Definition at line 206 of file avf_showcqt.c.
Referenced by init_volume().
|
static |
Definition at line 214 of file avf_showcqt.c.
Referenced by init_volume().
|
static |
Definition at line 221 of file avf_showcqt.c.
Referenced by init_volume().
|
static |
Definition at line 228 of file avf_showcqt.c.
Referenced by config_output().
|
static |
Definition at line 270 of file avf_showcqt.c.
Referenced by config_output().
|
static |
Definition at line 297 of file avf_showcqt.c.
Referenced by config_output().
|
static |
Definition at line 359 of file avf_showcqt.c.
Referenced by config_output(), init_axis_empty(), and init_axis_from_font().
|
static |
Definition at line 385 of file avf_showcqt.c.
Referenced by init_axis_empty(), init_axis_from_file(), and init_axis_from_font().
|
static |
Definition at line 396 of file avf_showcqt.c.
Referenced by config_output().
|
static |
Definition at line 403 of file avf_showcqt.c.
Referenced by config_output().
|
static |
Definition at line 435 of file avf_showcqt.c.
Referenced by init_axis_color().
|
static |
Definition at line 440 of file avf_showcqt.c.
Referenced by init_axis_color().
|
static |
Definition at line 446 of file avf_showcqt.c.
Referenced by init_axis_color().
|
static |
Definition at line 452 of file avf_showcqt.c.
Referenced by init_axis_color().
|
static |
Definition at line 458 of file avf_showcqt.c.
Referenced by init_axis_from_font().
|
static |
Definition at line 505 of file avf_showcqt.c.
Referenced by init_axis_from_font(), and render_fontconfig().
|
static |
Definition at line 589 of file avf_showcqt.c.
Referenced by init_axis_from_font().
Definition at line 653 of file avf_showcqt.c.
Referenced by init_axis_from_font().
|
static |
Definition at line 679 of file avf_showcqt.c.
Referenced by config_output().
|
static |
Definition at line 720 of file avf_showcqt.c.
Referenced by process_cqt(), rgb_from_cqt(), and yuv_from_cqt().
|
static |
Definition at line 733 of file avf_showcqt.c.
Referenced by process_cqt().
|
static |
Definition at line 743 of file avf_showcqt.c.
Referenced by process_cqt().
|
static |
Definition at line 757 of file avf_showcqt.c.
Referenced by config_output().
|
static |
Definition at line 810 of file avf_showcqt.c.
Referenced by config_output().
|
static |
Definition at line 861 of file avf_showcqt.c.
Referenced by config_output().
|
static |
Definition at line 963 of file avf_showcqt.c.
Referenced by config_output().
Definition at line 1028 of file avf_showcqt.c.
Referenced by config_output().
|
static |
Definition at line 1052 of file avf_showcqt.c.
Referenced by config_output().
|
static |
Definition at line 1064 of file avf_showcqt.c.
Referenced by config_output().
|
static |
Definition at line 1083 of file avf_showcqt.c.
Referenced by plot_cqt().
|
static |
Definition at line 1129 of file avf_showcqt.c.
Referenced by filter_frame().
|
static |
Definition at line 1199 of file avf_showcqt.c.
Referenced by init().
|
static |
Definition at line 1234 of file avf_showcqt.c.
Referenced by init().
|
static |
Definition at line 1256 of file avf_showcqt.c.
|
static |
Definition at line 1313 of file avf_showcqt.c.
|
static |
Definition at line 1318 of file avf_showcqt.c.
|
static |
Definition at line 1353 of file avf_showcqt.c.
|
static |
Definition at line 1481 of file avf_showcqt.c.
Referenced by request_frame().
|
static |
Definition at line 1562 of file avf_showcqt.c.
|
static |
Definition at line 60 of file avf_showcqt.c.
|
static |
Definition at line 1573 of file avf_showcqt.c.
|
static |
Definition at line 1582 of file avf_showcqt.c.
AVFilter ff_avf_showcqt |
Definition at line 1592 of file avf_showcqt.c.