Skip to content

RFC 6330 RaptorQ FEC scheme (not 3GPP-mandated, offered as reference work) - #64

Open
jordijoangimenez wants to merge 3 commits into
5G-MAG:feature/raptor-raptorq-fecfrom
jordijoangimenez:feature/raptorq-support
Open

RFC 6330 RaptorQ FEC scheme (not 3GPP-mandated, offered as reference work)#64
jordijoangimenez wants to merge 3 commits into
5G-MAG:feature/raptor-raptorq-fecfrom
jordijoangimenez:feature/raptorq-support

Conversation

@jordijoangimenez

@jordijoangimenez jordijoangimenez commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Base branch. This pull request is based on feature/raptor-raptorq-fec, the head of #61, not on
development, because it builds on that scheme's codec abstraction. The diff therefore shows only this
pull request's own commits. GitHub will retarget it when #61 merges.

Addresses part of #1.

Dependencies and issues

Depends on: #61, and is based on its branch; #61 in turn depends on #62. Merge order is #62, then
#61, then this one.
Paired with: #65, #68 and #98, independent of this one, either order.
Closes on merge: nothing on its own. Completes #1 together with #61. #1 needs closing by hand once both are in, since neither pull request delivers it alone.

What is in this pull request

Three commits, and the diff shows only those: this pull request is based on #61's branch, not on
development, so #62's and #61's work does not appear here.

  1. fec: reinstate RaptorQ as this branch's delta — RaptorQ alongside Raptor, sharing the same codec
    interface, with its own scheme-specific OTI layout, which differs from Raptor's for the same values.
    Its repair-symbol coverage is in this commit rather than a follow-up, for the reason given on RFC 5053 Raptor FEC scheme: codec, FLUTE integration, and the missing-symbol accessor #61.
  2. examples: select the FDT schema, the FEC scheme and the redundancy level — adds -S, -F and -L
    to the example transmitter, which is how both schemes and the profiled schema were driven against a
    real receiver.

Not mandated by 3GPP

TS 26.346 V18.2.0 clause L.4.7 names Compact No-Code and Raptor for the MBMS Download Profile. RaptorQ is
neither required nor forbidden there. It is not the default, and nothing in the profile path selects it.

Verification

T1: 110 cases passing. T2: an object received byte-identical over real multicast with
FEC-OTI-FEC-Encoding-ID="6", and recovered at a 7.6% datagram loss rate where Raptor's smaller default
budget does not.

Merge order

After #62, then #61.

@jordijoangimenez jordijoangimenez self-assigned this Aug 11, 2026
@jordijoangimenez jordijoangimenez added the enhancement New feature or request label Aug 11, 2026
@dsilhavy dsilhavy added this to the v1.0.0 milestone Aug 13, 2026
@jordijoangimenez
jordijoangimenez marked this pull request as draft August 14, 2026 10:28
@jordijoangimenez
jordijoangimenez force-pushed the feature/raptorq-support branch from 7bbb1e1 to 77b7f86 Compare August 22, 2026 12:57
@jordijoangimenez jordijoangimenez changed the title RFC 6330 RaptorQ FEC (not 3GPP-mandated — reference/future work, depends on #61) RFC 6330 RaptorQ FEC scheme (not 3GPP-mandated) Aug 22, 2026
@jordijoangimenez
jordijoangimenez changed the base branch from development to feature/raptor-raptorq-fec August 22, 2026 12:59
@jordijoangimenez
jordijoangimenez force-pushed the feature/raptorq-support branch from 77b7f86 to 61ae0ae Compare August 22, 2026 13:16
@jordijoangimenez
jordijoangimenez force-pushed the feature/raptor-raptorq-fec branch from 5e2e338 to f43eca6 Compare August 22, 2026 13:16
@jordijoangimenez
jordijoangimenez deleted the feature/raptorq-support branch August 22, 2026 13:22
@github-project-automation github-project-automation Bot moved this from In Progress to Done in MBMS: Support for FLUTE Aug 22, 2026
@jordijoangimenez
jordijoangimenez restored the feature/raptorq-support branch August 22, 2026 13:24
@jordijoangimenez
jordijoangimenez changed the base branch from feature/rfc5053-raptor-fec to development August 22, 2026 13:24
@jordijoangimenez jordijoangimenez changed the title RFC 6330 RaptorQ FEC scheme (not 3GPP-mandated) RFC 6330 RaptorQ FEC scheme (not 3GPP-mandated, offered as reference work) Aug 22, 2026
@jordijoangimenez
jordijoangimenez changed the base branch from development to feature/raptor-raptorq-fec August 22, 2026 15:25
@jordijoangimenez
jordijoangimenez marked this pull request as ready for review August 22, 2026 15:38
@jordijoangimenez
jordijoangimenez force-pushed the feature/raptor-raptorq-fec branch from f43eca6 to aa36087 Compare August 22, 2026 15:50
@jordijoangimenez
jordijoangimenez force-pushed the feature/raptorq-support branch from 61ae0ae to 9ae681a Compare August 22, 2026 15:51
@jordijoangimenez
jordijoangimenez force-pushed the feature/raptor-raptorq-fec branch from aa36087 to 2007684 Compare August 22, 2026 16:03
@jordijoangimenez
jordijoangimenez force-pushed the feature/raptorq-support branch from 9ae681a to 3d25c37 Compare August 22, 2026 16:04
@jordijoangimenez
jordijoangimenez force-pushed the feature/raptor-raptorq-fec branch from 7e84d2c to f9e1bc2 Compare August 22, 2026 18:51
@jordijoangimenez
jordijoangimenez force-pushed the feature/raptorq-support branch from 85cda93 to 1035bb2 Compare August 22, 2026 18:53
@jordijoangimenez
jordijoangimenez force-pushed the feature/raptor-raptorq-fec branch from f9e1bc2 to ee706fd Compare August 22, 2026 19:08
@jordijoangimenez
jordijoangimenez force-pushed the feature/raptorq-support branch 2 times, most recently from cb7942e to 472cdcd Compare August 22, 2026 19:45
@jordijoangimenez
jordijoangimenez force-pushed the feature/raptor-raptorq-fec branch from 2621a6b to 4f0fe34 Compare August 22, 2026 19:53
@jordijoangimenez
jordijoangimenez force-pushed the feature/raptorq-support branch from 472cdcd to a34419d Compare August 22, 2026 19:54
@jordijoangimenez
jordijoangimenez force-pushed the feature/raptor-raptorq-fec branch 2 times, most recently from c22c465 to 9f9087e Compare August 22, 2026 20:05
@jordijoangimenez
jordijoangimenez force-pushed the feature/raptorq-support branch from a34419d to 36ed59d Compare August 22, 2026 20:06
@jordijoangimenez
jordijoangimenez force-pushed the feature/raptor-raptorq-fec branch from 9f9087e to 050f116 Compare August 22, 2026 20:45
@jordijoangimenez
jordijoangimenez force-pushed the feature/raptorq-support branch from 36ed59d to bdac74e Compare August 22, 2026 20:46
@jordijoangimenez
jordijoangimenez force-pushed the feature/raptor-raptorq-fec branch from 050f116 to 25094a6 Compare August 22, 2026 21:16
@jordijoangimenez
jordijoangimenez force-pushed the feature/raptorq-support branch from bdac74e to a8b2cf2 Compare August 22, 2026 21:17
@jordijoangimenez
jordijoangimenez force-pushed the feature/raptor-raptorq-fec branch from 25094a6 to 6e55625 Compare August 23, 2026 07:08
@jordijoangimenez
jordijoangimenez force-pushed the feature/raptorq-support branch from a8b2cf2 to 470df62 Compare August 23, 2026 07:10
@jordijoangimenez
jordijoangimenez force-pushed the feature/raptor-raptorq-fec branch from 6e55625 to f9ad94d Compare August 23, 2026 07:36
@jordijoangimenez
jordijoangimenez force-pushed the feature/raptorq-support branch from 470df62 to db452b7 Compare August 23, 2026 07:45
@jordijoangimenez
jordijoangimenez force-pushed the feature/raptor-raptorq-fec branch from f9ad94d to bf6b1a9 Compare August 23, 2026 12:11
@jordijoangimenez
jordijoangimenez force-pushed the feature/raptorq-support branch from db452b7 to 5252e03 Compare August 23, 2026 12:13
@jordijoangimenez
jordijoangimenez force-pushed the feature/raptor-raptorq-fec branch from bf6b1a9 to ee01d44 Compare August 23, 2026 12:22
@jordijoangimenez
jordijoangimenez force-pushed the feature/raptorq-support branch from 5252e03 to d25ff1d Compare August 23, 2026 12:25
@jordijoangimenez
jordijoangimenez force-pushed the feature/raptor-raptorq-fec branch from ee01d44 to 929741f Compare August 23, 2026 12:37
@jordijoangimenez
jordijoangimenez force-pushed the feature/raptorq-support branch from d25ff1d to 59d12c7 Compare August 23, 2026 12:38
@jordijoangimenez
jordijoangimenez force-pushed the feature/raptor-raptorq-fec branch from 929741f to 3d5abc0 Compare August 23, 2026 14:31
…ecific OTI layout

Change type
  New feature, not 3GPP. This branch is the RaptorQ delta on top of the Raptor branch and nothing
  else.

Basis
  RaptorQ is outside the set of FEC schemes 3GPP references, which is why it lives here and not on
  the compliant branches.
  TS 26.346 V18.2.0 clause L.4.7: "Regarding Application Layer FEC support, the two FEC schemes
  referenced in this specification, the Compact No-Code FEC scheme as specified in RFC 3695 [13],
  and the Raptor FEC scheme as specified in RFC 5053 [91] are optional to implement by the BM-SC
  and mandatory to support by the UE."
  RaptorQ and RFC 6330 appear nowhere in TS 26.346: zero occurrences. Not forbidden, just outside
  the referenced set.

  RFC 6330: "This document describes a Fully-Specified Forward Error Correction" scheme
  "corresponding to FEC Encoding ID 6", so its Codepoint value is 6 under the identity mapping the
  rest of this library uses.

Corrected while reinstating it
  The previous version of this branch was an unexplained revert of the removal commit, and it
  brought back the three invented FDT attribute names the Raptor branch had already replaced with
  the schema-defined FEC-OTI-Scheme-Specific-Info. Reinstating it that way would have undone a
  conformance fix.

  Worse, it shared one encoder between the two schemes, which is wrong: the same four octets carry
  DIFFERENT field widths, with Z and N the opposite way round, so encoding one scheme with the
  other's layout silently corrupts both values.

  RFC 5053 clause 3.2.3, Raptor: "a 4-octet field consisting of the parameters Z (2 octets),
  N (1 octet), and Al (1 octet)"

  RFC 6330 clause 3.3.3, RaptorQ, the Scheme-Specific parameter list:
  "The number of source blocks (Z): 8-bit unsigned integer."
  "The number of sub-blocks (N): 16-bit unsigned integer."

Change
  Reinstates RaptorQCodec, RaptorQMath, RaptorQTables and GF256LinearSystem with their headers and
  test binary, and the FecScheme::RaptorQ dispatch branches. Replaces the single encoder with one
  that selects the octet layout from the scheme, on both the encode and decode sides and at both
  the FDT-Instance and File levels, keeping the schema-defined attribute the Raptor branch
  introduced.

  Rebuilt on the Raptor branch rather than on the old lineage, so it is exactly one delta above it
  and the two non-3GPP features, this and FLUTE version 2, are now separate from each other as
  well as from the compliant core.

Verification
  T1: builds clean, ctest at the build root 35/35, the 25 from the Raptor branch plus the RaptorQ
  suite and 2 new cases. The layout difference is asserted rather than assumed: identical inputs
  Z=1, N=0x0203, Al=4 encode to AQIDBA== under RaptorQ and AAEDBA== under Raptor, and each is
  checked absent from the other's output. A round trip with N=0x0140, a value a shared one-octet
  layout would truncate, recovers all three parameters. Quotations checked with
  tools/verify-citations.py in --strict mode.

Not in this change
  No claim that RaptorQ is 3GPP conformant, because it is not in the referenced set at this
  baseline. The Raptor paths below are untouched.

Carries its own repair-symbol coverage rather than leaving it to a follow-up, for
the reason given on the Raptor commit this builds on: a fountain code that
transmits no repair symbol protects nothing, and the object-level tests that pull
every symbol in one call cannot see it. RaptorQRepairTransmissionTest drives one
datagram at a time and acknowledges each, and two of its four cases fail if the
completion condition is reverted, emitting 79 symbols instead of 90 and no repair
symbol instead of 11.

T2 for this scheme: an object recovered byte-identically over real multicast at a
7.6% datagram loss rate, where Raptor with its smaller default budget does not.
Problem
  The example transmitter drove one FDT schema, one FEC scheme and a fixed
  redundancy level, so the profiled-schema, Raptor and RaptorQ paths could not be
  exercised against a real receiver over a real socket without editing and
  rebuilding it. Code-derived, no spec claim.

Raised by
  looking for a way to drive the FEC and FDT schema paths end to end

Change
  Adds -S/--fdt-schema (draft2005, rfc3926, profiled), -F/--fec (compact, raptor,
  raptorq) and -L/--fec-redundancy-level, each mapping its argument onto the
  enumeration or value the Transmitter constructor already accepts. Defaults
  reproduce the previous behaviour, so an existing command line is unaffected.

Verification
  T2: used to capture the FDT off the wire per schema, and to run Raptor and
  RaptorQ end to end over multicast including under datagram loss. The RaptorQ
  run's FDT carries FEC-OTI-FEC-Encoding-ID="6" and the RaptorQ scheme-specific
  layout, captured by a sniffer that links no library code.

Not in this change
  Any library behaviour. This only exposes choices the library already offered.
Problem
  A caller could select RaptorQ for a session running the MBMS Download Profile. The profile names
  the FEC schemes it admits and RaptorQ is not one of them, so a receiver operating the profile has
  no obligation to decode it and in general will not. The session would transmit and no receiver
  would recover anything.   [source-derived]

Basis
  TS 26.346 V18.2.0 clause L.4.7: "Regarding Application Layer FEC support, the two FEC schemes
  referenced in this specification, the Compact No-Code FEC scheme as specified in RFC 3695 [13],
  and the Raptor FEC scheme as specified in RFC 5053 [91] are optional to implement by the BM-SC
  and mandatory to support by the UE."

  RaptorQ is RFC 6330, which TS 26.346 does not reference at any point.

Raised by
  reading the authority during this work

Change
  Transmitter holds the profile and the content FEC OTI, so the check belongs there. Under
  Profile::Mbms3gpp a content FEC OTI naming RaptorQ is refused at construction. Raptor and Compact
  No-Code are unaffected, and RaptorQ stays available outside the profile, which is what this branch
  offers it for.

  The end-to-end test that drives a real RaptorQ transfer over a socket was relying on the default
  profile, so it now asks for Profile::GeneralFlute explicitly. That is the correct description of
  what it exercises: a RaptorQ session is by definition not an MBMS Download Profile session.

Verification
  T1: 96 cases pass, 3 new. ProfileFecSchemeTest covers refusal of RaptorQ under the profile, its
  acceptance outside it, and that Raptor is still accepted under the profile. The RaptorQ end-to-end
  case still passes and now says which profile it runs under.

Not in this change
  Nothing on the receive side. A receiver decodes whatever scheme the FDT declares, which is correct
  regardless of profile: refusing to decode a scheme a sender chose would lose data for no gain.
@jordijoangimenez
jordijoangimenez force-pushed the feature/raptorq-support branch from 59d12c7 to e8adab8 Compare August 23, 2026 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Development

Successfully merging this pull request may close these issues.

2 participants