internal/rangecoding: add range encoder#112
Conversation
|
@thomas-vilte phenomenal PR! Would you mind squashing/update your PR message to be just like your GitHub PR? Are you planning on working on a full encoder. Very excited to see what you build :) I am here to support you in any way you need! |
fffdfcb to
aaedc57
Compare
|
yes. The plan is to implement a full celt encoder, the range encoder is the first building block once it's merged I'll start on the encoder core. Would love your input on the overall approach before diving in :D |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #112 +/- ##
==========================================
+ Coverage 82.73% 82.96% +0.23%
==========================================
Files 21 22 +1
Lines 4518 4697 +179
==========================================
+ Hits 3738 3897 +159
- Misses 598 609 +11
- Partials 182 191 +9
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Amazing! join the discord and would love to chat about it. You should also just say hi to everyone love to have people building great stuff in community I don’t have anything in particular. My goal is to keep to code as readable as possible. SILK decoder was hand written, trying to keep matching it. After this is done would love to build a server side AEC. Make it easier for people doing voice AI |
|
Also added you to pion org! When CI passes you can merge your code. Excited to work together |
aaedc57 to
4e44c42
Compare
4e44c42 to
61c517a
Compare
Description
Implements the range encoder defined in RFC 6716 Section 5.1.
This is the symmetric counterpart to the existing Decoder. It maintains
the four-tuple state (val, rng, rem, ext) described in the RFC and
implements carry propagation via the rem/extBytes buffer.
All operations are verified via round-trip tests against the existing
decoder. The RFC 5.1 invariant — that encoder.FinalRange() must equal
decoder.FinalRange() after the same symbol sequence — is explicitly
tested.
Reference issue
Related to #34