frame:
- Rename EncType to PredMethod since it is used to specify the prediction
method.
- Rename Order PredOrder since it is used to specify the predictor order.
- Correct the comment for DecodeConstant.
- Add comments for DecodeRice, DecodeRice2.
meta: Minor alteration of comment.
rsf: Start using frame.NewFrame.
The changes to frame are as follows:
* Frame struct no longer contains Footer. Instead NewFrame returns an error
if the CRC-16 verification fails.
* Implement NewFrame which parses audio frames. Each audio frame consists of
a frame header, one subframe per channel and a footer containing a CRC-16
checksum.
* Initial implementation of NewSubFrame which parses subframes. Currently
only the easiest case is fully supported.
- Constant encoding is fully supported.
- Fixed encoding can currently decode the "warm-up" samples. Rice0 and
rice1 still have to be implemented for full support.
- LPC - not yet implemented.
- Verbatim - not yet implemented. This one should be easy though.
* NewSubHeader has almost been fully implemented. Only
"wasted-bits-per-sample" remains.
Note: This code uses the bitstream Reader from "github.com/mewkiz/pkg/bit",
which is convenient but also inefficient. When decoding has been fully
implemented we should use profiling to find the bottlenecks.
- Renamed Decode to NewHeader and modified it so it only parses the frame header data.
- Implemented decoding of "UTF-8" coded integers.
- Use CRC-8 to verify the header data (hashutil/crc8).
- Removed CRC field from Header structure, since it should be enough to only return an error if the verification fails.
- Renamed BlockSizeInterChannelSamples to BlockSize, err on the side of brevity.
- Renamed ChannelAssignment to ChannelOrder and add corresponding iota constants.
rsf: Decode frame header using NewHeader.