pion/opus

Implement the RangeCoder

lu-zero opened this issue · 4 comments

  • Implement/use a bitstream reader
  • Implement/use a reverse bitstream reader
  • Implement the actual RangeCoder

@lu-zero This is fantastic! I am going to start here tonight.

Do you know of any tests/data I could run against the RangeDecoder? Just to make sure it works as expected.

If not I will just dump some input/output results from ffmpeg's implementation.

here there are two unit tests that I used, if you want to extend them it is relatively easy to produce them and possibly a good idea :)

@lu-zero I just pushed a basic range decoder! I mostly learned from reading yours and the ffmpeg implementation (and have some questions)

ffmpeg and your implementation mostly uses the cdf decode method for decode, and then logp. Is that the right way to go?

Yes, rawbits and the other methods are for celt.