Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #98 +/- ##
==========================================
+ Coverage 80.98% 81.56% +0.58%
==========================================
Files 15 16 +1
Lines 2135 2224 +89
==========================================
+ Hits 1729 1814 +85
- Misses 341 343 +2
- Partials 65 67 +2
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:
|
There was a problem hiding this comment.
Pull request overview
Implements the initial CELT frame “side information” decoding slice (per RFC 6716 §4.3 / Table 56 order) and adds supporting range-coder functionality plus trace-based tests to validate range decoder state at key milestones.
Changes:
- Add
rangecoding.Decoder.DecodeUniform()to support RFC 6716ec_dec_uint()decoding (range-coded prefix + raw-bit suffix). - Introduce CELT frame config validation and side-info parsing through the intra-energy flag (silence, post-filter header, transient, intra-energy).
- Add CELT range-trace test harness and targeted unit tests for the new decoding path.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| internal/rangecoding/decoder.go | Adds uniform integer decoding (DecodeUniform) needed for CELT post-filter parsing. |
| internal/rangecoding/decoder_test.go | Adds unit tests covering DecodeUniform behavior (in-range, suffix combine, saturation, degenerate totals). |
| internal/celt/frame.go | Implements CELT side-info parsing and frame config validation. |
| internal/celt/frame_test.go | Adds tests for config validation, silence handling, post-filter decode, transient/intra flags, and range trace checkpoints. |
| internal/celt/trace_test.go | Adds a reusable trace helper for asserting range-decoder state at named checkpoints. |
| internal/celt/errors.go | Adds CELT-specific errors for invalid channel counts and range coder symbol issues. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| switch { | ||
| case tell >= info.totalBits: | ||
| info.silence = true | ||
| case tell == 1: |
There was a problem hiding this comment.
decodeSilenceFlag only decodes the silence symbol when tell == 1. That’s currently true immediately after rangeDecoder.Init(), but if the call site changes (or the decoder is reused without re-init) the function will silently skip decoding even when tell < totalBits, leaving silence at its zero value. Consider removing the tell == 1 guard (decode whenever tell < totalBits) or documenting/enforcing the precondition that this function must be called right after Init().
| case tell == 1: | |
| default: |
6848bcc to
9d9c788
Compare
Summary
This is the last piece before we get to "real meat" :) it's basically table 56 first eight columns.
Implements the first CELT frame side-info slice for RFC 6716 Section 4.3 work:
rangecoding.Decoder.DecodeUniformfor the RFC 6716 Section 4.1.5ec_dec_uint()path needed by the post-filter octaveTell,TellFrac, remaining bits, and final range at named decode milestones