Warning: This is a development version. The latest stable version is Version 7.0.0.

Definitions

The following defines the various terms used in Rely.

Payload

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.

Source symbol

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.

Repair symbol

The result of performing encoding over the set of available Source symbols. Used by the decoder to reconstruct lost source symbols.

Stream

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.

Maximum stream size

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.

Maximum payload bytes

The maximum size of the Payload, consumed by the encoder and later reconstructed by the decoder.

The maximum size equals 65536 bytes.

Packet

A packet is the output of the encoder and later the input of the decoder. A packet can contain either a Source symbol or a Repair symbol.

Maximum packet bytes

The maximum size of a Packet in bytes. Specified with the max_packet_bytes parameter in rely::encoder::configure() and rely::decoder::configure(). An encoder and its corresponding decoder should be configured with the same max_packet_bytes value.

Source symbol repair count

The number of times a specific Source symbol was included in a Repair symbol.

Source symbol timestamp

The timestamp associated with each Source symbol.

Source symbol timeout

The timeout of a specific Source symbol. This is based on the timeout parameter given in rely::encoder::configure() and rely::decoder::configure(), and the latest seen argument for the now parameter.

Expired source symbol

If a source symbol’s Source symbol timeout is less than or 0 the source symbol is expired.

Protected source symbol

A Source symbol is protected if it has been part of one or more Repair phases.

Unprotected source symbol

A Source symbol is unprotected if it has not been part of a repair symbol.

Decoded source symbol

Source symbols are implicitly decoded, Repair symbols are decoded once the internal sliding window decoder has converted it into a missing Source symbol.

Released source symbol

A Source symbol is said to be released when:

  1. the source symbol has been decoded and forwarded to the defragmentation component,
  2. the decoder has given up decoding the source symbol and will not forward the source symbol to the defragmentation component.

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.

Repair trigger interval

The repair trigger interval (repair_interval) is the number of source symbols added between each Repair phase.

The following values are valid for the repair_interval:

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.

Repair trigger position

Tracks the position in the Repair trigger interval, i.e., how many source symbols have been added since the last Repair phase. It’s reset after each Repair phase.

Repair trigger target

The number of Repair symbols that will be produced when the Repair trigger position reaches the Repair trigger interval.

The following condition must hold: 0 <= repair_target

repair_target == 0 is equivalent to Repair trigger disabled.

Repair rate

The rate of Repair symbols equal:

repair_rate = repair_target / (repair_interval + repair_target)

Repair phase

The encoder enters the repair phase if one of the following conditions are satisfied:

  1. The Repair trigger position reaches the Repair trigger interval.
  2. The Repair trigger interval is changed to be less than or equal to the Repair trigger position.
  3. An Unprotected source symbol expires.

When the encoder enters the repair phase, a number of Repair symbols are produced and the Repair trigger position is reset.

The following calculation can be used for determining the number of Repair symbols produced:

repair_produced = ceil(repair_position / (1 - repair_rate)) - repair_position

Example:

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 enabled

Repair trigger is enabled when repair_rate > 0, i.e., Repair symbols for protection against packet loss are automatically produced.

Repair trigger disabled

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 rely::encoder::generate_repair().

Systematic mode

A strategy used in ECC/FEC schemes. When enabled the encoder will always produce each Source symbol once before generating Repair symbols. The class encoder is a systematic encoder.

Coding window

The number of source symbols that is being included in the produced repair symbols(s). The coding window of the class encoder will always follow the size of the Stream.