|
FFmpeg
|
EBU R.128 implementation. More...
#include <float.h>#include <math.h>#include "libavutil/avassert.h"#include "libavutil/channel_layout.h"#include "libavutil/dict.h"#include "libavutil/ffmath.h"#include "libavutil/mem.h"#include "libavutil/xga_font_data.h"#include "libavutil/opt.h"#include "libavutil/timestamp.h"#include "libswresample/swresample.h"#include "avfilter.h"#include "filters.h"#include "formats.h"#include "video.h"#include "f_ebur128.h"Go to the source code of this file.
Data Structures | |
| struct | hist_entry |
| A histogram is an array of HIST_SIZE hist_entry storing all the energies recorded (with an accuracy of 1/HIST_GRAIN) of the loudnesses from ABS_THRES (at 0) to ABS_UP_THRES (at HIST_SIZE-1). More... | |
| struct | integrator |
| struct | rect |
| struct | EBUR128Context |
Macros | |
| #define | ABS_THRES -70 |
| silence gate: we discard anything below this absolute (LUFS) threshold | |
| #define | ABS_UP_THRES 10 |
| upper loud limit to consider (ABS_THRES being the minimum) | |
| #define | HIST_GRAIN 100 |
| defines histogram precision | |
| #define | HIST_SIZE ((ABS_UP_THRES - ABS_THRES) * HIST_GRAIN + 1) |
| #define | OFFSET(x) |
| #define | A AV_OPT_FLAG_AUDIO_PARAM |
| #define | V AV_OPT_FLAG_VIDEO_PARAM |
| #define | F AV_OPT_FLAG_FILTERING_PARAM |
| #define | X AV_OPT_FLAG_EXPORT |
| #define | R AV_OPT_FLAG_READONLY |
| #define | FONT8 0 |
| #define | FONT16 1 |
| #define | PAD 8 |
| #define | DRAW_RECT(r) |
| #define | WEIGHT_1_41_MASK |
| #define | I400_BINS(x) |
| #define | I3000_BINS(x) |
| #define | ENERGY(loudness) |
| #define | LOUDNESS(energy) |
| #define | DBFS(energy) |
| #define | HIST_POS(power) |
| #define | FILTER(DST, SRC, FILT) |
| #define | COMPUTE_LOUDNESS(m, time) |
| #define | I_GATE_THRES -10 |
| #define | LRA_GATE_THRES -20 |
| #define | LRA_LOWER_PRC 10 |
| #define | LRA_HIGHER_PRC 95 |
| #define | LOG_FMT "TARGET:%d LUFS M:%6.1f S:%6.1f I:%6.1f %s LRA:%6.1f LU" |
| #define | META_PREFIX "lavfi.r128." |
| #define | SET_META(name, var) |
| #define | SET_META_PEAK(name, ptype) |
| #define | PRINT_PEAKS(str, sp, ptype) |
| #define | PRINT_PEAK_SUMMARY(str, value, ptype) |
Enumerations | |
| enum | { PEAK_MODE_NONE = 0 , PEAK_MODE_SAMPLES_PEAKS = 1<<1 , PEAK_MODE_TRUE_PEAKS = 1<<2 } |
| enum | { GAUGE_TYPE_MOMENTARY = 0 , GAUGE_TYPE_SHORTTERM = 1 } |
| enum | { SCALE_TYPE_ABSOLUTE = 0 , SCALE_TYPE_RELATIVE = 1 } |
Functions | |
| AVFILTER_DEFINE_CLASS (ebur128) | |
| static const uint8_t * | get_graph_color (const EBUR128Context *ebur128, int v, int y) |
| static int | lu_to_y (const EBUR128Context *ebur128, double v) |
| static void | drawtext (AVFrame *pic, int x, int y, int ftid, const uint8_t *color, const char *fmt,...) |
| static void | drawline (AVFrame *pic, int x, int y, int len, int step) |
| static int | config_video_output (AVFilterLink *outlink) |
| static int | config_audio_input (AVFilterLink *inlink) |
| static int | config_audio_output (AVFilterLink *outlink) |
| static struct hist_entry * | get_histogram (void) |
| static av_cold int | init (AVFilterContext *ctx) |
| static int | gate_update (struct integrator *integ, double power, double loudness, int gate_thres) |
| void | ff_ebur128_filter_channels_c (const EBUR128DSPContext *dsp, const double *restrict samples, double *restrict cache_400, double *restrict cache_3000, double *restrict sum_400, double *restrict sum_3000, const int nb_channels) |
| double | ff_ebur128_find_peak_c (double *restrict ch_peaks, const int nb_channels, const double *samples, const int nb_samples) |
| static int | filter_frame (AVFilterLink *inlink, AVFrame *insamples) |
| static int | activate (AVFilterContext *ctx) |
| static int | query_formats (const AVFilterContext *ctx, AVFilterFormatsConfig **cfg_in, AVFilterFormatsConfig **cfg_out) |
| static av_cold void | uninit (AVFilterContext *ctx) |
Variables | |
| static const AVOption | ebur128_options [] |
| static const uint8_t | graph_colors [] |
| static const uint8_t | font_colors [] |
| static const AVFilterPad | ebur128_inputs [] |
| const FFFilter | ff_af_ebur128 |
EBU R.128 implementation.
Definition in file f_ebur128.c.
| #define ABS_THRES -70 |
silence gate: we discard anything below this absolute (LUFS) threshold
Definition at line 48 of file f_ebur128.c.
Referenced by filter_frame(), get_histogram(), and init().
| #define ABS_UP_THRES 10 |
upper loud limit to consider (ABS_THRES being the minimum)
Definition at line 49 of file f_ebur128.c.
| #define HIST_GRAIN 100 |
defines histogram precision
Definition at line 50 of file f_ebur128.c.
Referenced by get_histogram().
| #define HIST_SIZE ((ABS_UP_THRES - ABS_THRES) * HIST_GRAIN + 1) |
Definition at line 51 of file f_ebur128.c.
Referenced by color_inc(), config_props(), config_props(), do_slice(), filter(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), frame_sum_square_err(), frame_sum_square_err(), gate_update(), get_best_frame(), get_best_frame(), get_histogram(), init(), load_color_refs(), and uninit().
| #define OFFSET | ( | x | ) |
Definition at line 153 of file f_ebur128.c.
| #define A AV_OPT_FLAG_AUDIO_PARAM |
Definition at line 154 of file f_ebur128.c.
| #define V AV_OPT_FLAG_VIDEO_PARAM |
Definition at line 155 of file f_ebur128.c.
| #define F AV_OPT_FLAG_FILTERING_PARAM |
Definition at line 156 of file f_ebur128.c.
| #define X AV_OPT_FLAG_EXPORT |
Definition at line 157 of file f_ebur128.c.
Referenced by addroi_config_input(), addroi_filter_frame(), body(), celt_alg_quant(), celt_alg_unquant(), celt_calc_theta(), celt_deinterleave_hadamard(), celt_exp_rotation(), celt_exp_rotation_impl(), celt_haar1(), celt_interleave_hadamard(), celt_normalize_residual(), celt_renormalize_vector(), celt_stereo_is_decouple(), celt_stereo_merge(), celt_stereo_ms_decouple(), check_mvset(), check_mvset(), color_graticule(), color_graticule16(), compute_band_corr(), compute_band_energy(), compute_frame_features(), DECL_FUNC(), DECL_FUNC(), DECL_FUNC(), DECL_FUNC(), DECL_FUNC(), DECL_FUNC(), DECL_FUNC(), DECL_FUNC(), DECL_FUNC(), DECL_FUNC(), DECL_FUNC(), DECL_READ(), DECL_READ(), DECL_READ(), DECL_READ(), DECL_WRITE(), DECL_WRITE(), derive_temporal_colocated_mvs(), derive_temporal_colocated_mvs(), displace_packed(), displace_planar(), ff_celt_quant_bands(), ff_pvq_search_approx_sse2(), ff_pvq_search_approx_sse4(), ff_pvq_search_exact_avx(), ff_sbc_enc_process_input_4s_neon(), ff_sbc_enc_process_input_8s_neon(), ff_sws_rgb2xyz(), ff_vc1_pred_b_mv(), ff_vc1_pred_mv(), filter_frame(), frame_analysis(), frame_header(), get_rgb2xyz_matrix(), green_graticule(), green_graticule16(), invert_graticule(), invert_graticule16(), MDS_mul(), none_graticule(), pitch_filter(), pixscope_filter_frame(), predictor_decode_stereo_3800(), predictor_decode_stereo_3930(), process_anticollapse(), pvq_band_cost(), quant_band_template(), QUANT_FN(), QUANT_FN(), rnnoise_channel(), sb_temproal_luma_motion(), sbc_enc_process_input_4s(), sbc_enc_process_input_8s(), sbr_qmf_synthesis(), sbr_x_gen(), temporal_luma_motion_vector(), temporal_luma_motion_vector(), and tf_h().
| #define R AV_OPT_FLAG_READONLY |
Definition at line 158 of file f_ebur128.c.
| #define FONT8 0 |
Definition at line 233 of file f_ebur128.c.
Referenced by config_video_output(), and drawtext().
| #define FONT16 1 |
Definition at line 234 of file f_ebur128.c.
Referenced by drawtext(), and filter_frame().
| #define PAD 8 |
Referenced by config_video_output(), and filter_frame().
| #define DRAW_RECT | ( | r | ) |
Referenced by config_video_output().
| #define WEIGHT_1_41_MASK |
Referenced by config_audio_output().
| #define I400_BINS | ( | x | ) |
Referenced by config_audio_output().
| #define I3000_BINS | ( | x | ) |
Referenced by config_audio_output().
| #define ENERGY | ( | loudness | ) |
Definition at line 519 of file f_ebur128.c.
Referenced by get_histogram().
| #define LOUDNESS | ( | energy | ) |
Definition at line 520 of file f_ebur128.c.
Referenced by filter_frame(), gate_update(), and sbc_unpack_frame().
| #define DBFS | ( | energy | ) |
Definition at line 521 of file f_ebur128.c.
Referenced by filter_frame().
| #define HIST_POS | ( | power | ) |
Definition at line 598 of file f_ebur128.c.
Referenced by gate_update().
Referenced by ff_ebur128_filter_channels_c().
| #define COMPUTE_LOUDNESS | ( | m, | |
| time ) |
Referenced by filter_frame().
| #define I_GATE_THRES -10 |
Referenced by filter_frame().
| #define LRA_GATE_THRES -20 |
Referenced by filter_frame().
| #define LRA_LOWER_PRC 10 |
Referenced by filter_frame().
| #define LRA_HIGHER_PRC 95 |
Referenced by filter_frame().
Referenced by filter_frame().
| #define META_PREFIX "lavfi.r128." |
Referenced by filter_frame().
| #define SET_META | ( | name, | |
| var ) |
Referenced by filter_frame().
| #define SET_META_PEAK | ( | name, | |
| ptype ) |
Referenced by filter_frame().
| #define PRINT_PEAKS | ( | str, | |
| sp, | |||
| ptype ) |
Referenced by filter_frame().
| #define PRINT_PEAK_SUMMARY | ( | str, | |
| value, | |||
| ptype ) |
| anonymous enum |
| Enumerator | |
|---|---|
| PEAK_MODE_NONE | |
| PEAK_MODE_SAMPLES_PEAKS | |
| PEAK_MODE_TRUE_PEAKS | |
Definition at line 137 of file f_ebur128.c.
| anonymous enum |
| Enumerator | |
|---|---|
| GAUGE_TYPE_MOMENTARY | |
| GAUGE_TYPE_SHORTTERM | |
Definition at line 143 of file f_ebur128.c.
| anonymous enum |
| Enumerator | |
|---|---|
| SCALE_TYPE_ABSOLUTE | |
| SCALE_TYPE_RELATIVE | |
Definition at line 148 of file f_ebur128.c.
| AVFILTER_DEFINE_CLASS | ( | ebur128 | ) |
|
static |
Definition at line 215 of file f_ebur128.c.
Referenced by config_video_output(), and filter_frame().
|
inlinestatic |
Definition at line 225 of file f_ebur128.c.
Referenced by config_video_output(), and filter_frame().
|
static |
Definition at line 241 of file f_ebur128.c.
Referenced by config_video_output(), and filter_frame().
|
static |
Definition at line 274 of file f_ebur128.c.
|
static |
Definition at line 285 of file f_ebur128.c.
|
static |
Definition at line 384 of file f_ebur128.c.
|
static |
Definition at line 429 of file f_ebur128.c.
Referenced by init().
|
static |
Definition at line 523 of file f_ebur128.c.
Referenced by init().
|
static |
Definition at line 537 of file f_ebur128.c.
|
static |
Definition at line 602 of file f_ebur128.c.
Referenced by filter_frame().
| void ff_ebur128_filter_channels_c | ( | const EBUR128DSPContext * | dsp, |
| const double *restrict | samples, | ||
| double *restrict | cache_400, | ||
| double *restrict | cache_3000, | ||
| double *restrict | sum_400, | ||
| double *restrict | sum_3000, | ||
| const int | nb_channels ) |
Definition at line 625 of file f_ebur128.c.
Referenced by init().
| double ff_ebur128_find_peak_c | ( | double *restrict | ch_peaks, |
| const int | nb_channels, | ||
| const double * | samples, | ||
| const int | nb_samples ) |
Definition at line 661 of file f_ebur128.c.
Referenced by init().
|
static |
Definition at line 678 of file f_ebur128.c.
Referenced by activate().
|
static |
Definition at line 982 of file f_ebur128.c.
|
static |
Definition at line 1019 of file f_ebur128.c.
|
static |
Definition at line 1050 of file f_ebur128.c.
|
static |
Definition at line 159 of file f_ebur128.c.
|
static |
Definition at line 196 of file f_ebur128.c.
Referenced by get_graph_color().
|
static |
Definition at line 236 of file f_ebur128.c.
Referenced by config_video_output(), and filter_frame().
|
static |
Definition at line 1108 of file f_ebur128.c.
| const FFFilter ff_af_ebur128 |
Definition at line 1116 of file f_ebur128.c.