FFmpeg
|
libebur128 - a library for loudness measurement according to the EBU R128 standard. More...
#include <stddef.h>
Go to the source code of this file.
Data Structures | |
struct | FFEBUR128State |
Contains information about the state of a loudness measurement. More... | |
Functions | |
FFEBUR128State * | ff_ebur128_init (unsigned int channels, unsigned long samplerate, unsigned long window, int mode) |
Initialize library state. More... | |
void | ff_ebur128_destroy (FFEBUR128State **st) |
Destroy library state. More... | |
int | ff_ebur128_set_channel (FFEBUR128State *st, unsigned int channel_number, int value) |
Set channel type. More... | |
void | ff_ebur128_add_frames_double (FFEBUR128State *st, const double *src, size_t frames) |
Add frames to be processed. More... | |
int | ff_ebur128_loudness_global (FFEBUR128State *st, double *out) |
Get global integrated loudness in LUFS. More... | |
int | ff_ebur128_loudness_shortterm (FFEBUR128State *st, double *out) |
Get short-term loudness (last 3s) in LUFS. More... | |
int | ff_ebur128_loudness_range (FFEBUR128State *st, double *out) |
Get loudness range (LRA) of programme in LU. More... | |
int | ff_ebur128_loudness_range_multiple (FFEBUR128State **sts, size_t size, double *out) |
Get loudness range (LRA) in LU across multiple instances. More... | |
int | ff_ebur128_sample_peak (FFEBUR128State *st, unsigned int channel_number, double *out) |
Get maximum sample peak of selected channel in float format. More... | |
int | ff_ebur128_relative_threshold (FFEBUR128State *st, double *out) |
Get relative threshold in LUFS. More... | |
libebur128 - a library for loudness measurement according to the EBU R128 standard.
Definition in file ebur128.h.
enum channel |
Use these values when setting the channel map with ebur128_set_channel(). See definitions in ITU R-REC-BS 1770-4
enum mode |
Use these values in ebur128_init (or'ed). Try to use the lowest possible modes that suit your needs, as performance will be better.
FFEBUR128State* ff_ebur128_init | ( | unsigned int | channels, |
unsigned long | samplerate, | ||
unsigned long | window, | ||
int | mode | ||
) |
Initialize library state.
channels | the number of channels. |
samplerate | the sample rate. |
window | set the maximum window size in ms, set to 0 for auto. |
mode | see the mode enum for possible values. |
Definition at line 219 of file ebur128.c.
Referenced by config_input().
void ff_ebur128_destroy | ( | FFEBUR128State ** | st | ) |
int ff_ebur128_set_channel | ( | FFEBUR128State * | st, |
unsigned int | channel_number, | ||
int | value | ||
) |
Set channel type.
The default is:
st | library state. |
channel_number | zero based channel index. |
value | channel type from the "channel" enum. |
Definition at line 445 of file ebur128.c.
Referenced by config_input().
void ff_ebur128_add_frames_double | ( | FFEBUR128State * | st, |
const double * | src, | ||
size_t | frames | ||
) |
Add frames to be processed.
st | library state. |
src | array of source frames. Channels must be interleaved. |
frames | number of frames. Not number of samples! |
Referenced by filter_frame().
int ff_ebur128_loudness_global | ( | FFEBUR128State * | st, |
double * | out | ||
) |
Get global integrated loudness in LUFS.
st | library state. |
out | integrated loudness in LUFS. -HUGE_VAL if result is negative infinity. |
Definition at line 596 of file ebur128.c.
Referenced by filter_frame(), and uninit().
int ff_ebur128_loudness_shortterm | ( | FFEBUR128State * | st, |
double * | out | ||
) |
Get short-term loudness (last 3s) in LUFS.
st | library state. |
out | short-term loudness in LUFS. -HUGE_VAL if result is negative infinity. |
Definition at line 617 of file ebur128.c.
Referenced by filter_frame().
int ff_ebur128_loudness_range | ( | FFEBUR128State * | st, |
double * | out | ||
) |
Get loudness range (LRA) of programme in LU.
Calculates loudness range according to EBU 3342.
st | library state. |
out | loudness range (LRA) in LU. Will not be changed in case of error. AVERROR(EINVAL) will be returned in this case. |
Definition at line 709 of file ebur128.c.
Referenced by filter_frame(), and uninit().
int ff_ebur128_loudness_range_multiple | ( | FFEBUR128State ** | sts, |
size_t | size, | ||
double * | out | ||
) |
Get loudness range (LRA) in LU across multiple instances.
Calculates loudness range according to EBU 3342.
sts | array of library states. |
size | length of sts |
out | loudness range (LRA) in LU. Will not be changed in case of error. AVERROR(EINVAL) will be returned in this case. |
Definition at line 632 of file ebur128.c.
Referenced by ff_ebur128_loudness_range().
int ff_ebur128_sample_peak | ( | FFEBUR128State * | st, |
unsigned int | channel_number, | ||
double * | out | ||
) |
Get maximum sample peak of selected channel in float format.
st | library state |
channel_number | channel to analyse |
out | maximum sample peak in float format (1.0 is 0 dBFS) |
Definition at line 714 of file ebur128.c.
Referenced by filter_frame(), and uninit().
int ff_ebur128_relative_threshold | ( | FFEBUR128State * | st, |
double * | out | ||
) |
Get relative threshold in LUFS.
st | library state |
out | relative threshold in LUFS. |
Definition at line 580 of file ebur128.c.
Referenced by filter_frame(), and uninit().