FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
avf_showcqt.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2015 Muhammad Faiz <mfcc64@gmail.com>
3  *
4  * This file is part of FFmpeg.
5  *
6  * FFmpeg is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * FFmpeg is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with FFmpeg; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19  */
20 
21 #ifndef AVFILTER_SHOWCQT_H
22 #define AVFILTER_SHOWCQT_H
23 
24 #include "libavcodec/avfft.h"
25 #include "avfilter.h"
26 #include "internal.h"
27 
28 typedef struct {
30  int start, len;
31 } Coeffs;
32 
33 enum CoeffsType {
36 };
37 
38 typedef struct {
39  float r, g, b;
40 } RGBFloat;
41 
42 typedef struct {
43  float y, u, v;
44 } YUVFloat;
45 
46 typedef union {
49 } ColorFloat;
50 
51 typedef struct {
52  const AVClass *class;
57  int sono_idx;
59  int step;
63  int64_t frame_count;
64  double *freq;
70  int fft_bits;
71  int fft_len;
72  int cqt_len;
73  int cqt_align;
74  enum CoeffsType cqt_coeffs_type;
76  float *h_buf;
77  float *rcp_h_buf;
78  float *sono_v_buf;
79  float *bar_v_buf;
80  /* callback */
81  void (*cqt_calc)(FFTComplex *dst, const FFTComplex *src, const Coeffs *coeffs,
82  int len, int fft_len);
83  void (*draw_bar)(AVFrame *out, const float *h, const float *rcp_h,
84  const ColorFloat *c, int bar_h);
85  void (*draw_axis)(AVFrame *out, AVFrame *axis, const ColorFloat *c, int off);
86  void (*draw_sono)(AVFrame *out, AVFrame *sono, int off, int idx);
87  void (*update_sono)(AVFrame *sono, const ColorFloat *c, int idx);
88  /* option */
89  int width, height;
91  int bar_h;
92  int axis_h;
93  int sono_h;
94  int fullhd; /* deprecated */
95  char *sono_v;
96  char *bar_v;
97  float sono_g;
98  float bar_g;
99  double timeclamp;
100  double basefreq;
101  double endfreq;
102  float coeffclamp; /* deprecated - ignored */
103  char *tlength;
104  int count;
105  int fcount;
106  char *fontfile;
107  char *fontcolor;
108  char *axisfile;
109  int axis;
111 
112 #endif
This structure describes decoded (raw) audio or video data.
Definition: frame.h:181
int start
Definition: avf_showcqt.h:30
Coeffs * coeffs
Definition: avf_showcqt.h:66
Main libavfilter public API header.
const char * g
Definition: vf_curves.c:108
YUVFloat yuv
Definition: avf_showcqt.h:48
const char * b
Definition: vf_curves.c:109
double timeclamp
Definition: avf_showcqt.h:99
CoeffsType
Definition: avf_showcqt.h:33
float * rcp_h_buf
Definition: avf_showcqt.h:77
AVRational step_frac
Definition: avf_showcqt.h:60
double * freq
Definition: avf_showcqt.h:64
FFTComplex * cqt_result
Definition: avf_showcqt.h:69
float * sono_v_buf
Definition: avf_showcqt.h:78
static void cqt_calc(FFTComplex *dst, const FFTComplex *src, const Coeffs *coeffs, int len, int fft_len)
Definition: avf_showcqt.c:226
float FFTSample
Definition: avfft.h:35
AVFrame * axis_frame
Definition: avf_showcqt.h:54
AVRational rate
Definition: avf_showcqt.h:90
Definition: fft.h:88
char * fontcolor
Definition: avf_showcqt.h:107
typedef void(APIENTRY *FF_PFNGLACTIVETEXTUREPROC)(GLenum texture)
FFTComplex * fft_data
Definition: avf_showcqt.h:67
#define src
Definition: vp9dsp.c:530
RGBFloat rgb
Definition: avf_showcqt.h:47
FILE * out
Definition: movenc-test.c:54
static void draw_sono(AVFrame *out, AVFrame *sono, int off, int idx)
Definition: avf_showcqt.c:891
FFTComplex * fft_result
Definition: avf_showcqt.h:68
FFT functions.
static const char * format
Definition: movenc-test.c:47
BYTE int const BYTE int int int height
Definition: avisynth_c.h:676
Describe the class of an AVClass context structure.
Definition: log.h:67
rational number numerator/denominator
Definition: rational.h:43
float * h_buf
Definition: avf_showcqt.h:76
FFTSample * val
Definition: avf_showcqt.h:29
int64_t frame_count
Definition: avf_showcqt.h:63
float * bar_v_buf
Definition: avf_showcqt.h:79
FFTContext * fft_ctx
Definition: avf_showcqt.h:65
static double c[64]
float y
Definition: avf_showcqt.h:43
AVFrame * sono_frame
Definition: avf_showcqt.h:55
float r
Definition: avf_showcqt.h:39
static const int16_t coeffs[]
int len
ColorFloat * c_buf
Definition: avf_showcqt.h:75
An instance of a filter.
Definition: avfilter.h:304
internal API functions
AVFilterContext * ctx
Definition: avf_showcqt.h:53
AVPixelFormat
Pixel format.
Definition: pixfmt.h:61