FFmpeg
|
#include <math.h>
#include <stdlib.h>
#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 "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 | OFFSET(x) offsetof(ShowCQTContext, x) |
#define | FLAGS (AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM) |
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) |
static int | render_freetype (ShowCQTContext *s, AVFrame *tmp) |
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) |
static void | yuv_from_cqt (ColorFloat *c, const FFTComplex *v, float gamma, int len) |
static void | draw_bar_rgb (AVFrame *out, const float *h, const float *rcp_h, const ColorFloat *c, int bar_h) |
static void | draw_bar_yuv (AVFrame *out, const float *h, const float *rcp_h, const ColorFloat *c, int bar_h) |
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) |
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 43 of file avf_showcqt.c.
Referenced by init_axis_color().
#define ENDFREQ 20495.59681441799654 |
Definition at line 44 of file avf_showcqt.c.
Referenced by init_axis_color().
#define TLENGTH "384*tc/(384+tc*f)" |
Definition at line 45 of file avf_showcqt.c.
#define TLENGTH_MIN 0.001 |
Definition at line 46 of file avf_showcqt.c.
Referenced by init_cqt().
#define VOLUME_MAX 100.0 |
Definition at line 47 of file avf_showcqt.c.
Referenced by init_volume().
#define FONTCOLOR |
Definition at line 48 of file avf_showcqt.c.
#define OFFSET | ( | x | ) | offsetof(ShowCQTContext, x) |
Definition at line 52 of file avf_showcqt.c.
#define FLAGS (AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM) |
Definition at line 53 of file avf_showcqt.c.
AVFILTER_DEFINE_CLASS | ( | showcqt | ) |
|
static |
Definition at line 91 of file avf_showcqt.c.
Referenced by config_output(), and uninit().
|
static |
Definition at line 121 of file avf_showcqt.c.
Referenced by config_output(), and init_axis_color().
|
static |
Definition at line 141 of file avf_showcqt.c.
Referenced by init_cqt(), and init_volume().
|
static |
Definition at line 162 of file avf_showcqt.c.
Referenced by init_volume().
|
static |
Definition at line 170 of file avf_showcqt.c.
Referenced by init_volume().
|
static |
Definition at line 177 of file avf_showcqt.c.
Referenced by init_volume().
|
static |
Definition at line 184 of file avf_showcqt.c.
Referenced by config_output().
|
static |
Definition at line 226 of file avf_showcqt.c.
Referenced by config_output().
|
static |
Definition at line 289 of file avf_showcqt.c.
Referenced by config_output().
|
static |
Definition at line 361 of file avf_showcqt.c.
Referenced by config_output(), init_axis_empty(), and init_axis_from_font().
|
static |
Definition at line 387 of file avf_showcqt.c.
Referenced by init_axis_empty(), init_axis_from_file(), and init_axis_from_font().
|
static |
Definition at line 398 of file avf_showcqt.c.
Referenced by config_output().
|
static |
Definition at line 405 of file avf_showcqt.c.
Referenced by config_output().
|
static |
Definition at line 437 of file avf_showcqt.c.
Referenced by init_axis_color().
|
static |
Definition at line 442 of file avf_showcqt.c.
Referenced by init_axis_color().
|
static |
Definition at line 448 of file avf_showcqt.c.
Referenced by init_axis_color().
|
static |
Definition at line 454 of file avf_showcqt.c.
Referenced by init_axis_color().
|
static |
Definition at line 460 of file avf_showcqt.c.
Referenced by init_axis_from_font().
|
static |
Definition at line 506 of file avf_showcqt.c.
Referenced by init_axis_from_font().
|
static |
Definition at line 590 of file avf_showcqt.c.
Referenced by init_axis_from_font().
|
static |
Definition at line 617 of file avf_showcqt.c.
Referenced by config_output().
|
static |
Definition at line 651 of file avf_showcqt.c.
Referenced by process_cqt(), rgb_from_cqt(), and yuv_from_cqt().
|
static |
Definition at line 664 of file avf_showcqt.c.
Referenced by process_cqt().
|
static |
Definition at line 674 of file avf_showcqt.c.
Referenced by process_cqt().
|
static |
Definition at line 688 of file avf_showcqt.c.
Referenced by config_output().
|
static |
Definition at line 714 of file avf_showcqt.c.
Referenced by config_output().
|
static |
Definition at line 812 of file avf_showcqt.c.
Referenced by config_output().
|
static |
Definition at line 831 of file avf_showcqt.c.
Referenced by config_output().
Definition at line 891 of file avf_showcqt.c.
Referenced by config_output().
|
static |
Definition at line 915 of file avf_showcqt.c.
Referenced by config_output().
|
static |
Definition at line 927 of file avf_showcqt.c.
Referenced by config_output().
|
static |
Definition at line 946 of file avf_showcqt.c.
Referenced by plot_cqt().
|
static |
Definition at line 992 of file avf_showcqt.c.
Referenced by filter_frame().
|
static |
Definition at line 1027 of file avf_showcqt.c.
|
static |
Definition at line 1082 of file avf_showcqt.c.
|
static |
Definition at line 1087 of file avf_showcqt.c.
|
static |
Definition at line 1122 of file avf_showcqt.c.
|
static |
Definition at line 1232 of file avf_showcqt.c.
Referenced by request_frame().
|
static |
Definition at line 1290 of file avf_showcqt.c.
|
static |
Definition at line 55 of file avf_showcqt.c.
|
static |
Definition at line 1301 of file avf_showcqt.c.
|
static |
Definition at line 1310 of file avf_showcqt.c.
AVFilter ff_avf_showcqt |
Definition at line 1320 of file avf_showcqt.c.