Warning: This is a development version. The latest stable version is Version 4.0.1.
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.
A unit of data that is used as input to the sliding window encoder and output of the sliding window decoder. One Payload may be fragmented into multiple source symbols.
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
decoder::configure(...). An encoder and its corresponding decoder should
be configured with the same
The timestamp associated with each source symbol.
The timeout of a specific source symbol. This is based on the
decoder::configure(...), and the
latest seen argument for the
If a source symbol’s Source symbol timeout is less than or 0 the source symbol is expired.
A source symbol is protected if it has been part of one or more Repair phases.
A source symbol is unprotected if it has never been part of a Repair phase. One exception to this statement is if the repair target is 0, i.e., if Repair disabled. If so the source symbol is marked protected immediately.
Source symbols are implicitly decoded, Repair symbols are decoded once the internal sliding window decoder has converted it into a missing Source 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 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 interval before being popped off the Stream.
Tracks the position in the Repair interval, i.e., how many source symbols have been added so far.
This number will never exceed the
repair_interval, as it’s reset after each
The following condition must hold:
0 <= repair_target
repair_target == 0 is equivalent to repair 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
Repair is enabled when
repair_rate > 0, i.e., repair symbols for protection
against packet loss are being produced.
When repair is disabled no repair symbols are produced to protect against
packet loss, i.e. only Source symbols are produced. This happens when
repair_target == 0 and thus
repair_rate == 0.
A strategy used in ECC/FEC schemes. When enabled the encoder will always initially produce each source symbols as a Source packet. The class encoder is a systematic encoder.