Replies: 4 comments
-
I am not sure how fec even works when using different values for the last "sz" param in tx and rx but aparently the magic math behind doesn't care (probably due to the 'zeroing' trick) |
Beta Was this translation helpful? Give feedback.
-
FEC needs that all packets are with equal size. When tx we known all packet sizes and send first K packets with their original sizes (to reduce bandwidth), but when calculating FEC, we pad them to max(size_of_first_k_packets). So only (n-k) (i.e. only FEC packets) will be large size. But when rx we don't known max_packet_size (because we can miss one of first K packets) so we can use MAC_FEC_PAYLOAD for zero padding and fec decoding. Yes, you can optimize it and use size of FEC packets. I don't remember why I use MAC_FEC_PAYLOAD instead of it. |
Beta Was this translation helpful? Give feedback.
-
See https://github.com/tahoe-lafs/zfec for FEC docs |
Beta Was this translation helpful? Give feedback.
-
For some reason applyFec() can be called even though no fec packets are available. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
In your rx implementation you use MAX_FEC_PAYLOAD when reconstructing primary FEC fragments with secondary fragments:
https://github.com/svpcom/wifibroadcast/blob/master/src/rx.cpp#L616
However, I am wondering if it wouldn't be better to use the same size that was used on the tx.
Since each FEC secondary packet has the size of max_packet_size (as calculated on tx for this block) the information should be available in the apply_fec step.
I'd use omething like this (hope this example makes my intentions clearer:
https://github.com/Consti10/wifibroadcast/blob/master/src/FEC.hpp#L196
Beta Was this translation helpful? Give feedback.
All reactions