Documentation
¶
Index ¶
- func Compress(iniq, outpacked []int16) (int, error)
- func CompressI16(in, out sdr.SamplesI16) (int, error)
- func CompressReader(in sdr.Reader) (sdr.Reader, error)
- func CompressWriter(out sdr.Writer) (sdr.Writer, error)
- func Decompress(inpacked, outiq []int16) (int, error)
- func DecompressI16(in, out sdr.SamplesI16) (int, error)
- func DecompressReader(in sdr.Reader) (sdr.Reader, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Compress ¶
Compress will write the IQ samples in the "iniq" buffer, and smear every fourth int16 (really int12) into the other 3 int12 values. The output will be written to the output buffer.
func CompressI16 ¶
func CompressI16(in, out sdr.SamplesI16) (int, error)
CompressI16 will take our sdr.SamplesI16 type, and take every other imaginary value, and smear the 12 bits of goodness across the other 3 values. This is then repackaged and sent out as if everything is totally normal, totally fine.
func CompressReader ¶
CompressReader will read an int16 stream of packed 12 bit ints and unpack them into real IQ data.
func CompressWriter ¶
CompressWriter will write out int16 (really int12) values packed into int16 values.
func Decompress ¶
Decompress will read the input packed int12 values (packed as per the 'Compress' routine in this same package) and unpack the 4th int16 (really int12) value as its own phasor.
func DecompressI16 ¶
func DecompressI16(in, out sdr.SamplesI16) (int, error)
DecompressI16 will take our sdr.SamplesI16 type (under the hood it's a [2]int16 since it contains both the real and imaginary components) and perform a decompression. Every 4th IQ value (which is to say, the last imaginary part) is smeared across the LSB of the other values (assuming this is an int12). This will unpack that last component and re-create well-formed IQ data.
Types ¶
This section is empty.