Struct ebur128::EbuR128[][src]

pub struct EbuR128 { /* fields omitted */ }
Expand description

EBU R128 loudness analyzer.

Implementations

Create a new instance with the given configuration.

Get the configured mode.

Get the configured number of channels.

Get the configured sample rate.

Get the configured channel types.

Get the configured maximum window duration in ms.

Get the configured maximum history in ms.

Set channel type.

The default is:

  • 0 -> Left
  • 1 -> Right
  • 2 -> Center
  • 3 -> Unused
  • 4 -> LeftSurround
  • 5 -> RightSurround
  • _ -> Unused

Set channel types.

The default is:

  • 0 -> Left
  • 1 -> Right
  • 2 -> Center
  • 3 -> Unused
  • 4 -> LeftSurround
  • 5 -> RightSurround
  • _ -> Unused

Change library parameters.

Note that the channel map will be reset when setting a different number of channels. The current unfinished block will be lost.

Set the maximum window duration.

Set the maximum duration in ms that will be used for EbuR128::loudness_window. Note that this destroys the current content of the audio buffer.

Set the maximum history.

Set the maximum history in ms that will be stored for loudness integration. More history provides more accurate results, but requires more resources.

Applies to EbuR128::loudness_range and EbuR128::loudness_global when Mode::HISTOGRAM is not set.

Default is ULONG_MAX (at least ~50 days). Minimum is 3000ms for Mode::LRA and 400ms for Mode::M.

Resets the current state.

Add interleaved frames to be processed.

Add interleaved frames to be processed.

Add interleaved frames to be processed.

Add interleaved frames to be processed.

Add planar frames to be processed.

Add planar frames to be processed.

Add planar frames to be processed.

Add planar frames to be processed.

Add interleaved frames to warmup filters, but not be considered for measurements. See EbuR128::loudness_global_multiple for example usage.

Add interleaved frames to warmup filters, but not be considered for measurements. See EbuR128::loudness_global_multiple for example usage.

Add interleaved frames to warmup filters, but not be considered for measurements. See EbuR128::loudness_global_multiple for example usage.

Add interleaved frames to warmup filters, but not be considered for measurements. See EbuR128::loudness_global_multiple for example usage.

Add planar frames to warmup filters, but not be considered for measurements. See EbuR128::loudness_global_multiple for example usage.

Add planar frames to warmup filters, but not be considered for measurements. See EbuR128::loudness_global_multiple for example usage.

Add planar frames to warmup filters, but not be considered for measurements. See EbuR128::loudness_global_multiple for example usage.

Add planar frames to warmup filters, but not be considered for measurements. See EbuR128::loudness_global_multiple for example usage.

Get global integrated loudness in LUFS.

Get global integrated loudness in LUFS across multiple instances.

This can be used to allow parallel iteration of long signals, assuming some care is taken:

  1. Divide input-signal up in “chunks” of even 100ms samples. Make chunks overlap by 400ms, for example (0-10s, 9.6-20s, 19.6-30s, …)
  2. The first chunk is processed as normal. Then in parallel, for each remaining chunk, create a new instance of EbuR128, and in parallel:
    1. Feed the first 100ms of the chunk (these are samples overlapping with last chunk) through seed_frames_* function. This is sufficient to make filter-states in each instance what they would have been if a single analyzer would have reached this point.
    2. Process the remaining samples of each chunk through the analyzer
  3. Call EbuR128::loudness_global_multiple over all the chunks to get the global loudness

Get momentary loudness (last 400ms) in LUFS.

Get short-term loudness (last 3s) in LUFS.

Get loudness of the specified window in LUFS.

window must not be larger than the current window. The current window can be changed by calling EbuR128::set_max_window.

Get loudness range (LRA) of programme in LU.

Calculates loudness range according to EBU 3342.

Get loudness range (LRA) of programme in LU across multiple instances.

Calculates loudness range according to EBU 3342.

Get maximum sample peak from all frames that have been processed.

The equation to convert to dBFS is: 20 * log10(out)

Get maximum sample peak from the last call to EbuR128::add_frames.

The equation to convert to dBFS is: 20 * log10(out)

Get maximum true peak from all frames that have been processed.

Uses an implementation defined algorithm to calculate the true peak. Do not try to compare resulting values across different versions of the library, as the algorithm may change.

The current implementation uses a custom polyphase FIR interpolator to calculate true peak. Will oversample 4x for sample rates < 96000 Hz, 2x for sample rates < 192000 Hz and leave the signal unchanged for 192000 Hz.

The equation to convert to dBTP is: 20 * log10(out)

Get maximum true peak from the last call to EbuR128::add_frames.

Uses an implementation defined algorithm to calculate the true peak. Do not try to compare resulting values across different versions of the library, as the algorithm may change.

The current implementation uses a custom polyphase FIR interpolator to calculate true peak. Will oversample 4x for sample rates < 96000 Hz, 2x for sample rates < 192000 Hz and leave the signal unchanged for 192000 Hz.

The equation to convert to dBTP is: 20 * log10(out)

Get relative threshold in LUFS.

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.