|
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_short (FFEBUR128State *st, const short *src, size_t frames) |
| Add frames to be processed. More... | |
| void | ff_ebur128_add_frames_int (FFEBUR128State *st, const int *src, size_t frames) |
| See ebur128_add_frames_short. More... | |
| void | ff_ebur128_add_frames_float (FFEBUR128State *st, const float *src, size_t frames) |
| See ebur128_add_frames_short. More... | |
| void | ff_ebur128_add_frames_double (FFEBUR128State *st, const double *src, size_t frames) |
| See ebur128_add_frames_short. More... | |
| void | ff_ebur128_add_frames_planar_short (FFEBUR128State *st, const short **srcs, size_t frames, int stride) |
| Add frames to be processed. More... | |
| void | ff_ebur128_add_frames_planar_int (FFEBUR128State *st, const int **srcs, size_t frames, int stride) |
| See ebur128_add_frames_planar_short. More... | |
| void | ff_ebur128_add_frames_planar_float (FFEBUR128State *st, const float **srcs, size_t frames, int stride) |
| See ebur128_add_frames_planar_short. More... | |
| void | ff_ebur128_add_frames_planar_double (FFEBUR128State *st, const double **srcs, size_t frames, int stride) |
| See ebur128_add_frames_planar_short. More... | |
| int | ff_ebur128_loudness_global (FFEBUR128State *st, double *out) |
| Get global integrated loudness in LUFS. More... | |
| int | ff_ebur128_loudness_global_multiple (FFEBUR128State **sts, size_t size, double *out) |
| Get global integrated loudness in LUFS across multiple instances. More... | |
| int | ff_ebur128_loudness_momentary (FFEBUR128State *st, double *out) |
| Get momentary loudness (last 400ms) 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_window (FFEBUR128State *st, unsigned long window, double *out) |
| Get loudness of the specified window 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 217 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 446 of file ebur128.c.
Referenced by config_input().
| void ff_ebur128_add_frames_short | ( | FFEBUR128State * | st, |
| const short * | 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! |
| void ff_ebur128_add_frames_int | ( | FFEBUR128State * | st, |
| const int * | src, | ||
| size_t | frames | ||
| ) |
See ebur128_add_frames_short.
| void ff_ebur128_add_frames_float | ( | FFEBUR128State * | st, |
| const float * | src, | ||
| size_t | frames | ||
| ) |
See ebur128_add_frames_short.
| void ff_ebur128_add_frames_double | ( | FFEBUR128State * | st, |
| const double * | src, | ||
| size_t | frames | ||
| ) |
See ebur128_add_frames_short.
Referenced by filter_frame().
| void ff_ebur128_add_frames_planar_short | ( | FFEBUR128State * | st, |
| const short ** | srcs, | ||
| size_t | frames, | ||
| int | stride | ||
| ) |
Add frames to be processed.
| st | library state. |
| srcs | array of source frame channel data pointers |
| frames | number of frames. Not number of samples! |
| stride | number of samples to skip to for the next sample of the same channel |
| void ff_ebur128_add_frames_planar_int | ( | FFEBUR128State * | st, |
| const int ** | srcs, | ||
| size_t | frames, | ||
| int | stride | ||
| ) |
See ebur128_add_frames_planar_short.
| void ff_ebur128_add_frames_planar_float | ( | FFEBUR128State * | st, |
| const float ** | srcs, | ||
| size_t | frames, | ||
| int | stride | ||
| ) |
See ebur128_add_frames_planar_short.
| void ff_ebur128_add_frames_planar_double | ( | FFEBUR128State * | st, |
| const double ** | srcs, | ||
| size_t | frames, | ||
| int | stride | ||
| ) |
See ebur128_add_frames_planar_short.
| 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 603 of file ebur128.c.
Referenced by filter_frame(), and uninit().
| int ff_ebur128_loudness_global_multiple | ( | FFEBUR128State ** | sts, |
| size_t | size, | ||
| double * | out | ||
| ) |
Get global integrated loudness in LUFS across multiple instances.
| sts | array of library states. |
| size | length of sts |
| out | integrated loudness in LUFS. -HUGE_VAL if result is negative infinity. |
| int ff_ebur128_loudness_momentary | ( | FFEBUR128State * | st, |
| double * | out | ||
| ) |
| 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 645 of file ebur128.c.
Referenced by filter_frame().
| int ff_ebur128_loudness_window | ( | FFEBUR128State * | st, |
| unsigned long | window, | ||
| double * | out | ||
| ) |
Get loudness of the specified window in LUFS.
window must not be larger than the current window set in st.
| st | library state. |
| window | window in ms to calculate loudness. |
| out | loudness in LUFS. -HUGE_VAL if result is negative infinity. |
| 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 753 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 676 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 758 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 587 of file ebur128.c.
Referenced by filter_frame(), and uninit().
1.8.17