Warning: This is a development version. The latest stable version is Version 7.0.0.
The following defines the various terms used in Rely.
A unit of data originating from the source that is used as input to to the Rely encoder. Conversely it is also the output of the Rely decoder. Examples of this could be video/audio data or similar.
The result of performing encoding over the set of available Source symbols. Used by the decoder to reconstruct lost source symbols.
The stream queue that controls the memory held by either the encoder or decoder. Source symbols can be pushed and popped from the stream. Each symbol is assigned a unique position in the stream.
The maximum size (
max_stream_size) of the stream directly corresponds to the
maximum number of Source symbols stored in the stream.
A higher value will result in a more effective codec, whereas a lower value will
result in a lower memory footprint.
The maximum size of the Payload, consumed by the encoder and later reconstructed by the decoder.
The maximum size equals 65536 bytes.
The maximum size of a Packet in bytes. Specified with
max_packet_bytes parameter in
An encoder and its corresponding decoder should be configured with the same
If a source symbol’s Source symbol timeout is less than or 0 the source symbol is expired.
A Source symbol is unprotected if it has not been part of a repair symbol.
A Source symbol is said to be released when:
A released source symbol may still be used by the decoder to continue decoding of other source symbols.
Source symbol are always released in-order.
The repair trigger interval (
repair_interval) is the number of
source symbols added between each Repair phase.
The following values are valid for the
1 <= repair_interval <= max_stream_size
This can ensure that all source symbols are part of minimum one repair trigger interval before being popped off the Stream.
The following condition must hold:
0 <= repair_target
repair_target == 0 is equivalent to
Repair trigger disabled.
The rate of Repair symbols equal:
repair_rate = repair_target / (repair_interval + repair_target)
The encoder enters the repair phase if one of the following conditions are satisfied:
The following calculation can be used for determining the number of Repair symbols produced:
repair_produced = ceil(repair_position / (1 - repair_rate)) - repair_position
repair_interval = 10 repair_target = 2 repair_rate = 2 / 12 = 0.166 repair_position = 1 repair_produced = ceil(1 / (1 - 0.166)) - 1 = 1 repair_position = 3 repair_produced = ceil(3 / (1 - 0.166)) - 3 = 1 repair_position = 6 repair_produced = ceil(6 / (1 - 0.166)) - 6 = 2 repair_position = 10 repair_produced = ceil(10 / (1 - 0.166)) - 10 = 2
Additionally a repair phase can be initiated manually if the user calls- rely::encoder::generate_repair().
Repair trigger is enabled when
repair_rate > 0, i.e.,
Repair symbols for protection against packet loss are
When the repair trigger is disabled, Repair symbols are no
longer produced automatically.
Only Source symbols are produced. This happens when
repair_target == 0 and thus
repair_rate == 0.
Repair can still be generated manually using