[domistream] Video packetizer: even FEC block split; control host: refused input names its type; PROTOCOL 5.2/5.3 host facts (S-26); version 0.2.2
This commit is contained in:
+10
-7
@@ -613,7 +613,7 @@ Each packet is `packetSize + 16` bytes, `packetSize` from ANNOUNCE (default 1024
|
||||
| 8 | 4 | SSRC, 0 [M] |
|
||||
| 12 | 4 | reserved [W5] |
|
||||
| 16 | 4 | stream packet index, LE (= RTP sequence << 8 [M]) |
|
||||
| 20 | 4 | frame index, LE [W5][M] |
|
||||
| 20 | 4 | frame index, LE [W5][M]; **starts at 1** in a fresh session (Moonshine's note on what Moonlight-family clients expect [M], S-26; a host that started at 0 crashed Arena Domi Remote at its first frame, L2 demo) |
|
||||
| 24 | 1 | flags: 0x01 picture data, 0x02 end of frame, 0x04 start of frame [W5] |
|
||||
| 25 | 1 | reserved [W5] |
|
||||
| 26 | 1 | multi-FEC flags, `0x10` [M] (UNKNOWN U15: meaning) |
|
||||
@@ -650,12 +650,15 @@ Reed-Solomon erasure code over GF(2^8), polynomial `0x11D` [F] [W5]:
|
||||
`P = [[8e f4 47 a7], [f4 8e a7 47]]`; `k = 3, m = 1`: `P = [[01 8e f4]]`.
|
||||
The capture settles it without any loss: parity packets are always sent, so our encoder must reproduce the
|
||||
captured parity bytes (offset 32 on) of every block.
|
||||
- **Host side (Lumen, `video::packetizer`).** Our own choices, not from a source, until a capture compares them
|
||||
with a real host: the fewest blocks (at most 4) in which every block can carry the requested parity within
|
||||
`k + m <= 255`, every block but the last carrying `k = ceil(n / blocks)` data shards; per block the least
|
||||
percentage, at or above the requested one, whose `m` reaches `minRequiredFecPackets`; a frame too big for that
|
||||
gets the most parity that still fits (counted in the packetizer's stats). Data shards in order, then the block's
|
||||
parity, block by block; RTP sequence numbers run on across frames, one per packet.
|
||||
- **Host side (Lumen, `video::packetizer`).** The fewest blocks (at most 4) in which every block can carry the
|
||||
requested parity within `k + m <= 255`, split **evenly**: sizes differ by at most one, the larger blocks first
|
||||
(RFC 5052 9.1, as Moonshine's host does it [M], S-26); per block the least percentage, at or above the requested
|
||||
one, whose `m` reaches `minRequiredFecPackets`; Moonshine computes the same raised percentage
|
||||
(`(minimum - 1) * 100 / k + 1`, e.g. 101 % for 1 shard, 51 % for 2, 34 % for 3 with a minimum of 2) [M]; a frame
|
||||
too big for that gets the most parity that still fits (counted in the packetizer's stats). Data shards in order,
|
||||
then the block's parity, block by block; RTP sequence numbers run on across frames, one per packet. A capture of a
|
||||
real host still has to confirm the parity header fields: Moonshine patches only the RTP sequence, frame index,
|
||||
multi-FEC blocks byte and FEC info of a parity packet [M]; we write all header fields.
|
||||
- The audio code is **not** this matrix (section 6.4).
|
||||
|
||||
### 5.4 Feedback
|
||||
|
||||
Reference in New Issue
Block a user