pax_global_header00006660000000000000000000000064141666417510014525gustar00rootroot0000000000000052 comment=cf0017bf035901e058ceb6e90e42af0d765dfdfa g711-1.2/000077500000000000000000000000001416664175100120465ustar00rootroot00000000000000g711-1.2/LICENSE000066400000000000000000000027421416664175100130600ustar00rootroot00000000000000Copyright (c) 2016-2017, Eleftherios (Lefteris) Zafiris All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. g711-1.2/Readme.md000066400000000000000000000077411416664175100135760ustar00rootroot00000000000000# g711 -- import "github.com/zaf/g711" Package g711 implements encoding and decoding of G711 PCM sound data. G.711 is an ITU-T standard for audio companding. For usage details please see the code snippets in the cmd folder. ## Usage ```go const ( // Input and output formats Alaw = iota // Alaw G711 encoded PCM data Ulaw // Ulaw G711 encoded PCM data Lpcm // Lpcm 16bit signed linear data ) ``` #### func Alaw2Ulaw ```go func Alaw2Ulaw(alaw []byte) []byte ``` Alaw2Ulaw performs direct A-law to u-law data conversion #### func Alaw2UlawFrame ```go func Alaw2UlawFrame(frame uint8) uint8 ``` Alaw2UlawFrame directly converts an A-law frame to u-law #### func DecodeAlaw ```go func DecodeAlaw(pcm []byte) []byte ``` DecodeAlaw decodes A-law PCM data to 16bit LPCM #### func DecodeAlawFrame ```go func DecodeAlawFrame(frame uint8) int16 ``` DecodeAlawFrame decodes an A-law PCM frame to 16bit LPCM #### func DecodeUlaw ```go func DecodeUlaw(pcm []byte) []byte ``` DecodeUlaw decodes u-law PCM data to 16bit LPCM #### func DecodeUlawFrame ```go func DecodeUlawFrame(frame uint8) int16 ``` DecodeUlawFrame decodes a u-law PCM frame to 16bit LPCM #### func EncodeAlaw ```go func EncodeAlaw(lpcm []byte) []byte ``` EncodeAlaw encodes 16bit LPCM data to G711 A-law PCM #### func EncodeAlawFrame ```go func EncodeAlawFrame(frame int16) uint8 ``` EncodeAlawFrame encodes a 16bit LPCM frame to G711 A-law PCM #### func EncodeUlaw ```go func EncodeUlaw(lpcm []byte) []byte ``` EncodeUlaw encodes 16bit LPCM data to G711 u-law PCM #### func EncodeUlawFrame ```go func EncodeUlawFrame(frame int16) uint8 ``` EncodeUlawFrame encodes a 16bit LPCM frame to G711 u-law PCM #### func Ulaw2Alaw ```go func Ulaw2Alaw(ulaw []byte) []byte ``` Ulaw2Alaw performs direct u-law to A-law data conversion #### func Ulaw2AlawFrame ```go func Ulaw2AlawFrame(frame uint8) uint8 ``` Ulaw2AlawFrame directly converts a u-law frame to A-law #### type Decoder ```go type Decoder struct { } ``` Decoder reads G711 PCM data and decodes it to 16bit 8000Hz LPCM #### func NewAlawDecoder ```go func NewAlawDecoder(reader io.Reader) (*Decoder, error) ``` NewAlawDecoder returns a pointer to a Decoder that implements an io.Reader. It takes as input the source data Reader. #### func NewUlawDecoder ```go func NewUlawDecoder(reader io.Reader) (*Decoder, error) ``` NewUlawDecoder returns a pointer to a Decoder that implements an io.Reader. It takes as input the source data Reader. #### func (*Decoder) Read ```go func (r *Decoder) Read(p []byte) (i int, err error) ``` Read decodes G711 data. Reads up to len(p) bytes into p, returns the number of bytes read and any error encountered. #### func (*Decoder) Reset ```go func (r *Decoder) Reset(reader io.Reader) error ``` Reset discards the Decoder state. This permits reusing a Decoder rather than allocating a new one. #### type Encoder ```go type Encoder struct { } ``` Encoder encodes 16bit 8000Hz LPCM data to G711 PCM or directly transcodes between A-law and u-law #### func NewAlawEncoder ```go func NewAlawEncoder(writer io.Writer, input int) (*Encoder, error) ``` NewAlawEncoder returns a pointer to an Encoder that implements an io.Writer. It takes as input the destination data Writer and the input encoding format. #### func NewUlawEncoder ```go func NewUlawEncoder(writer io.Writer, input int) (*Encoder, error) ``` NewUlawEncoder returns a pointer to an Encoder that implements an io.Writer. It takes as input the destination data Writer and the input encoding format. #### func (*Encoder) Reset ```go func (w *Encoder) Reset(writer io.Writer) error ``` Reset discards the Encoder state. This permits reusing an Encoder rather than allocating a new one. #### func (*Encoder) Write ```go func (w *Encoder) Write(p []byte) (i int, err error) ``` Write encodes G711 Data. Writes len(p) bytes from p to the underlying data stream, returns the number of bytes written from p (0 <= n <= len(p)) and any error encountered that caused the write to stop early. g711-1.2/alaw.go000066400000000000000000000143111416664175100133210ustar00rootroot00000000000000/* Copyright (C) 2016 - 2017, Lefteris Zafiris This program is free software, distributed under the terms of the BSD 3-Clause License. See the LICENSE file at the top of the source tree. Package g711 implements encoding and decoding of G711 PCM sound data. G.711 is an ITU-T standard for audio companding. */ package g711 const alawClip = 0x7F7B var ( // A-law quantization segment lookup table alawSegment = [128]uint8{ 1, 1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, } // A-law to LPCM conversion lookup table alaw2lpcm = [256]int16{ -5504, -5248, -6016, -5760, -4480, -4224, -4992, -4736, -7552, -7296, -8064, -7808, -6528, -6272, -7040, -6784, -2752, -2624, -3008, -2880, -2240, -2112, -2496, -2368, -3776, -3648, -4032, -3904, -3264, -3136, -3520, -3392, -22016, -20992, -24064, -23040, -17920, -16896, -19968, -18944, -30208, -29184, -32256, -31232, -26112, -25088, -28160, -27136, -11008, -10496, -12032, -11520, -8960, -8448, -9984, -9472, -15104, -14592, -16128, -15616, -13056, -12544, -14080, -13568, -344, -328, -376, -360, -280, -264, -312, -296, -472, -456, -504, -488, -408, -392, -440, -424, -88, -72, -120, -104, -24, -8, -56, -40, -216, -200, -248, -232, -152, -136, -184, -168, -1376, -1312, -1504, -1440, -1120, -1056, -1248, -1184, -1888, -1824, -2016, -1952, -1632, -1568, -1760, -1696, -688, -656, -752, -720, -560, -528, -624, -592, -944, -912, -1008, -976, -816, -784, -880, -848, 5504, 5248, 6016, 5760, 4480, 4224, 4992, 4736, 7552, 7296, 8064, 7808, 6528, 6272, 7040, 6784, 2752, 2624, 3008, 2880, 2240, 2112, 2496, 2368, 3776, 3648, 4032, 3904, 3264, 3136, 3520, 3392, 22016, 20992, 24064, 23040, 17920, 16896, 19968, 18944, 30208, 29184, 32256, 31232, 26112, 25088, 28160, 27136, 11008, 10496, 12032, 11520, 8960, 8448, 9984, 9472, 15104, 14592, 16128, 15616, 13056, 12544, 14080, 13568, 344, 328, 376, 360, 280, 264, 312, 296, 472, 456, 504, 488, 408, 392, 440, 424, 88, 72, 120, 104, 24, 8, 56, 40, 216, 200, 248, 232, 152, 136, 184, 168, 1376, 1312, 1504, 1440, 1120, 1056, 1248, 1184, 1888, 1824, 2016, 1952, 1632, 1568, 1760, 1696, 688, 656, 752, 720, 560, 528, 624, 592, 944, 912, 1008, 976, 816, 784, 880, 848, } // A-law to u-law conversion lookup table based on the ITU-T G.711 specification alaw2ulaw = [256]uint8{ 42, 43, 40, 41, 46, 47, 44, 45, 34, 35, 32, 33, 38, 39, 36, 37, 57, 58, 55, 56, 61, 62, 59, 60, 49, 50, 47, 48, 53, 54, 51, 52, 10, 11, 8, 9, 14, 15, 12, 13, 2, 3, 0, 1, 6, 7, 4, 5, 26, 27, 24, 25, 30, 31, 28, 29, 18, 19, 16, 17, 22, 23, 20, 21, 98, 99, 96, 97, 102, 103, 100, 101, 93, 93, 92, 92, 95, 95, 94, 94, 116, 118, 112, 114, 124, 126, 120, 122, 106, 107, 104, 105, 110, 111, 108, 109, 72, 73, 70, 71, 76, 77, 74, 75, 64, 65, 63, 63, 68, 69, 66, 67, 86, 87, 84, 85, 90, 91, 88, 89, 79, 79, 78, 78, 82, 83, 80, 81, 170, 171, 168, 169, 174, 175, 172, 173, 162, 163, 160, 161, 166, 167, 164, 165, 185, 186, 183, 184, 189, 190, 187, 188, 177, 178, 175, 176, 181, 182, 179, 180, 138, 139, 136, 137, 142, 143, 140, 141, 130, 131, 128, 129, 134, 135, 132, 133, 154, 155, 152, 153, 158, 159, 156, 157, 146, 147, 144, 145, 150, 151, 148, 149, 226, 227, 224, 225, 230, 231, 228, 229, 221, 221, 220, 220, 223, 223, 222, 222, 244, 246, 240, 242, 252, 254, 248, 250, 234, 235, 232, 233, 238, 239, 236, 237, 200, 201, 198, 199, 204, 205, 202, 203, 192, 193, 191, 191, 196, 197, 194, 195, 214, 215, 212, 213, 218, 219, 216, 217, 207, 207, 206, 206, 210, 211, 208, 209, } ) // EncodeAlaw encodes 16bit LPCM data to G711 A-law PCM func EncodeAlaw(lpcm []byte) []byte { if len(lpcm) < 2 { return []byte{} } alaw := make([]byte, len(lpcm)/2) for i, j := 0, 0; j <= len(lpcm)-2; i, j = i+1, j+2 { alaw[i] = EncodeAlawFrame(int16(lpcm[j]) | int16(lpcm[j+1])<<8) } return alaw } // EncodeAlawFrame encodes a 16bit LPCM frame to G711 A-law PCM func EncodeAlawFrame(frame int16) uint8 { /* The algorithm first stores off the sign. Then the code branches. If the absolute value of the source sample is less than 256, the 16-bit sample is simply shifted down 4 bits and converted to an 8-bit value, thus losing the top 4 bits in the process. However, if it is more than 256, a logarithmic algorithm is applied to the sample to determine the precision to keep. In that case, the sample is shifted down to access the seven most significant bits of the sample. Those seven bits are then used to determine the precision of the bottom 4 bits (segment). Finally, the top seven bits are shifted back up four bits to make room for the bottom 4 bits. The two are then logically OR'd together to create the eight bit compressed sample. The sign is then applied, and the entire compressed sample is logically XOR'd for transmission. */ sign := ((^frame) >> 8) & 0x80 if sign == 0 { frame = -frame } if frame > alawClip { frame = alawClip } var compressedByte uint8 if frame >= 256 { segment := alawSegment[(frame>>8)&0x7F] bottom := (frame >> (segment + 3)) & 0x0F compressedByte = uint8(((int16(segment) << 4) | bottom)) } else { compressedByte = uint8(frame >> 4) } return compressedByte ^ uint8(sign^0x55) } // DecodeAlaw decodes A-law PCM data to 16bit LPCM func DecodeAlaw(pcm []byte) []byte { lpcm := make([]byte, len(pcm)*2) for i, j := 0, 0; i < len(pcm); i, j = i+1, j+2 { frame := alaw2lpcm[pcm[i]] lpcm[j] = byte(frame) lpcm[j+1] = byte(frame >> 8) } return lpcm } // DecodeAlawFrame decodes an A-law PCM frame to 16bit LPCM func DecodeAlawFrame(frame uint8) int16 { return alaw2lpcm[frame] } // Alaw2Ulaw performs direct A-law to u-law data conversion func Alaw2Ulaw(alaw []byte) []byte { ulaw := make([]byte, len(alaw)) for i := 0; i < len(alaw); i++ { ulaw[i] = alaw2ulaw[alaw[i]] } return ulaw } // Alaw2UlawFrame directly converts an A-law frame to u-law func Alaw2UlawFrame(frame uint8) uint8 { return alaw2ulaw[frame] } g711-1.2/alaw_test.go000066400000000000000000000023521416664175100143620ustar00rootroot00000000000000/* Copyright (C) 2016 - 2017, Lefteris Zafiris This program is free software, distributed under the terms of the BSD 3-Clause License. See the LICENSE file at the top of the source tree. Package g711 implements encoding and decoding of G711 PCM sound data. G.711 is an ITU-T standard for audio companding. */ package g711 import ( "io/ioutil" "testing" ) // Benchmark EncodeAlaw func BenchmarkEncodeAlaw(b *testing.B) { rawData, err := ioutil.ReadFile("testing/speech.raw") if err != nil { b.Fatalf("Failed to read test data: %s\n", err) } b.SetBytes(int64(len(rawData))) b.ResetTimer() for i := 0; i < b.N; i++ { EncodeAlaw(rawData) } } // Benchmark DecodeAlaw func BenchmarkDecodeAlaw(b *testing.B) { aData, err := ioutil.ReadFile("testing/speech.alaw") if err != nil { b.Fatalf("Failed to read test data: %s\n", err) } b.SetBytes(int64(len(aData))) b.ResetTimer() for i := 0; i < b.N; i++ { DecodeAlaw(aData) } } // Benchmark Alaw2Ulaw func BenchmarkAlaw2Ulaw(b *testing.B) { aData, err := ioutil.ReadFile("testing/speech.alaw") if err != nil { b.Fatalf("Failed to read test data: %s\n", err) } b.SetBytes(int64(len(aData))) b.ResetTimer() for i := 0; i < b.N; i++ { Alaw2Ulaw(aData) } } g711-1.2/cmd/000077500000000000000000000000001416664175100126115ustar00rootroot00000000000000g711-1.2/cmd/g711dec/000077500000000000000000000000001416664175100137445ustar00rootroot00000000000000g711-1.2/cmd/g711dec/g711dec.go000066400000000000000000000032561416664175100154340ustar00rootroot00000000000000/* Copyright (C) 2016 - 2017, Lefteris Zafiris This program is free software, distributed under the terms of the BSD 3-Clause License. See the LICENSE file at the top of the source tree. g711dec decodes 8bit G711 PCM data to 16 Bit signed LPCM raw data */ package main import ( "fmt" "io" "os" "path/filepath" "strings" "github.com/zaf/g711" ) func main() { if len(os.Args) == 1 || os.Args[1] == "help" || os.Args[1] == "--help" { fmt.Printf("%s Decodes 8bit G711 PCM data to raw 16 Bit signed LPCM\n", os.Args[0]) fmt.Println("The program takes as input a list A-law or u-law encoded files") fmt.Println("decodes them to LPCM and saves the files with a \".raw\" extension.") fmt.Printf("\nUsage: %s [files]\n", os.Args[0]) os.Exit(1) } var exitCode int for _, file := range os.Args[1:] { err := decodeG711(file) if err != nil { fmt.Println(err) exitCode = 1 } } os.Exit(exitCode) } func decodeG711(file string) error { input, err := os.Open(file) if err != nil { return err } defer input.Close() extension := strings.ToLower(filepath.Ext(file)) decoder := new(g711.Decoder) if extension == ".alaw" || extension == ".al" { decoder, err = g711.NewAlawDecoder(input) if err != nil { return err } } else if extension == ".ulaw" || extension == ".ul" { decoder, err = g711.NewUlawDecoder(input) if err != nil { return err } } else { err = fmt.Errorf("Unrecognised format for file: %s", file) return err } outName := strings.TrimSuffix(file, filepath.Ext(file)) + ".raw" outFile, err := os.Create(outName) if err != nil { return err } defer outFile.Close() _, err = io.Copy(outFile, decoder) return err } g711-1.2/cmd/g711enc/000077500000000000000000000000001416664175100137565ustar00rootroot00000000000000g711-1.2/cmd/g711enc/g711enc.go000066400000000000000000000037301416664175100154550ustar00rootroot00000000000000/* Copyright (C) 2016 - 2017, Lefteris Zafiris This program is free software, distributed under the terms of the BSD 3-Clause License. See the LICENSE file at the top of the source tree. g711enc encodes 16bit 8kHz LPCM data to 8bit G711 PCM. It works with wav or raw files as input. */ package main import ( "fmt" "io/ioutil" "os" "path/filepath" "strings" "github.com/zaf/g711" ) func main() { if len(os.Args) < 3 || os.Args[1] == "help" || os.Args[1] == "--help" || (os.Args[1] != "ulaw" && os.Args[1] != "alaw") { fmt.Printf("%s Encodes 16bit 8kHz LPCM data to 8bit G711 PCM\n", os.Args[0]) fmt.Println("The program takes as input a list or wav or raw files, encodes them") fmt.Println("to G711 PCM and saves them with the proper extension.") fmt.Printf("\nUsage: %s [encoding format] [files]\n", os.Args[0]) fmt.Println("encoding format can be either alaw or ulaw") os.Exit(1) } var exitCode int format := os.Args[1] for _, file := range os.Args[2:] { err := encodeG711(file, format) if err != nil { fmt.Println(err) exitCode = 1 } } os.Exit(exitCode) } func encodeG711(file, format string) error { input, err := ioutil.ReadFile(file) if err != nil { return err } extension := strings.ToLower(filepath.Ext(file)) if extension != ".wav" && extension != ".raw" && extension != ".sln" { err = fmt.Errorf("Unrecognised format for input file: %s", file) return err } outName := strings.TrimSuffix(file, filepath.Ext(file)) + "." + format outFile, err := os.Create(outName) if err != nil { return err } defer outFile.Close() encoder := new(g711.Encoder) if format == "alaw" { encoder, err = g711.NewAlawEncoder(outFile, g711.Lpcm) if err != nil { return err } } else { encoder, err = g711.NewUlawEncoder(outFile, g711.Lpcm) if err != nil { return err } } if extension == ".wav" { _, err = encoder.Write(input[44:]) // Skip WAV header return err } _, err = encoder.Write(input) return err } g711-1.2/g711.go000066400000000000000000000103661416664175100130620ustar00rootroot00000000000000/* Copyright (C) 2016 - 2017, Lefteris Zafiris This program is free software, distributed under the terms of the BSD 3-Clause License. See the LICENSE file at the top of the source tree. */ /* Package g711 implements encoding and decoding of G711 PCM sound data. G.711 is an ITU-T standard for audio companding. For usage details please see the code snippets in the cmd folder. */ package g711 import ( "errors" "io" ) const ( // Input and output formats Alaw = iota // Alaw G711 encoded PCM data Ulaw // Ulaw G711 encoded PCM data Lpcm // Lpcm 16bit signed linear data ) // Decoder reads G711 PCM data and decodes it to 16bit 8000Hz LPCM type Decoder struct { decode func([]byte) []byte // decoding function source io.Reader // source data } // Encoder encodes 16bit 8000Hz LPCM data to G711 PCM or // directly transcodes between A-law and u-law type Encoder struct { input int // input format encode func([]byte) []byte // encoding function transcode func([]byte) []byte // transcoding function destination io.Writer // output data } // NewAlawDecoder returns a pointer to a Decoder that implements an io.Reader. // It takes as input the source data Reader. func NewAlawDecoder(reader io.Reader) (*Decoder, error) { if reader == nil { return nil, errors.New("io.Reader is nil") } r := Decoder{ decode: DecodeAlaw, source: reader, } return &r, nil } // NewUlawDecoder returns a pointer to a Decoder that implements an io.Reader. // It takes as input the source data Reader. func NewUlawDecoder(reader io.Reader) (*Decoder, error) { if reader == nil { return nil, errors.New("io.Reader is nil") } r := Decoder{ decode: DecodeUlaw, source: reader, } return &r, nil } // NewAlawEncoder returns a pointer to an Encoder that implements an io.Writer. // It takes as input the destination data Writer and the input encoding format. func NewAlawEncoder(writer io.Writer, input int) (*Encoder, error) { if writer == nil { return nil, errors.New("io.Writer is nil") } if input != Ulaw && input != Lpcm { return nil, errors.New("Invalid input format") } w := Encoder{ input: input, encode: EncodeAlaw, transcode: Ulaw2Alaw, destination: writer, } return &w, nil } // NewUlawEncoder returns a pointer to an Encoder that implements an io.Writer. // It takes as input the destination data Writer and the input encoding format. func NewUlawEncoder(writer io.Writer, input int) (*Encoder, error) { if writer == nil { return nil, errors.New("io.Writer is nil") } if input != Alaw && input != Lpcm { return nil, errors.New("Invalid input format") } w := Encoder{ input: input, encode: EncodeUlaw, transcode: Alaw2Ulaw, destination: writer, } return &w, nil } // Reset discards the Decoder state. This permits reusing a Decoder rather than allocating a new one. func (r *Decoder) Reset(reader io.Reader) error { if reader == nil { return errors.New("io.Reader is nil") } r.source = reader return nil } // Reset discards the Encoder state. This permits reusing an Encoder rather than allocating a new one. func (w *Encoder) Reset(writer io.Writer) error { if writer == nil { return errors.New("io.Writer is nil") } w.destination = writer return nil } // Read decodes G711 data. Reads up to len(p) bytes into p, returns the number // of bytes read and any error encountered. func (r *Decoder) Read(p []byte) (i int, err error) { if len(p) == 0 { return } b := make([]byte, len(p)/2) i, err = r.source.Read(b) copy(p, r.decode(b)) i *= 2 // Report back the correct number of bytes return } // Write encodes G711 Data. Writes len(p) bytes from p to the underlying data stream, // returns the number of bytes written from p (0 <= n <= len(p)) and any error encountered // that caused the write to stop early. func (w *Encoder) Write(p []byte) (i int, err error) { if len(p) == 0 { return } if w.input == Lpcm { // Encode LPCM data to G711 i, err = w.destination.Write(w.encode(p)) if err == nil && len(p)%2 != 0 { err = errors.New("Odd number of LPCM bytes, incomplete frame") } i *= 2 // Report back the correct number of bytes written from p } else { // Trans-code i, err = w.destination.Write(w.transcode(p)) } return } g711-1.2/g711_test.go000066400000000000000000000127751416664175100141270ustar00rootroot00000000000000/* Copyright (C) 2016 - 2017, Lefteris Zafiris This program is free software, distributed under the terms of the BSD 3-Clause License. See the LICENSE file at the top of the source tree. Package g711 implements encoding and decoding of G711 PCM sound data. G.711 is an ITU-T standard for audio companding. */ package g711 import ( "bytes" "io" "io/ioutil" "testing" "testing/iotest" ) var EncoderTest = []struct { data []byte expected int }{ {[]byte{}, 0}, {[]byte{0x01, 0x00}, 2}, {[]byte{0x01, 0x00, 0x7c, 0x7f, 0xd1, 0xd0, 0xd3, 0xd2, 0xdd, 0xdc, 0xdf, 0xde}, 12}, {[]byte{0x01, 0x00, 0x7c, 0x7f, 0xd1, 0xd0, 0xd3, 0xd2, 0xdd, 0xdc, 0xdf, 0xde, 0xd9}, 12}, } var DecoderTest = []struct { data []byte expected int }{ {[]byte{}, 0}, {[]byte{0x01, 0x00}, 4}, {[]byte{0x01, 0x00, 0x7c, 0x7f, 0xd1, 0xd0, 0xd3, 0xd2, 0xdd, 0xdc, 0xdf, 0xde}, 24}, {[]byte{0x01, 0x00, 0xdc, 0x7f, 0xd1, 0xd0, 0xd3, 0xd2, 0xdd, 0xdc, 0xdf, 0xde, 0xd9}, 26}, } var TranscoderTest = []struct { data []byte expected int }{ {[]byte{}, 0}, {[]byte{0x01, 0x00}, 2}, {[]byte{0x01, 0x00, 0x7c, 0x7f, 0xd1, 0xd0, 0xd3, 0xd2, 0xdd, 0xdc, 0xdf, 0xde}, 12}, {[]byte{0x01, 0x00, 0x7c, 0x7f, 0xd1, 0xd0, 0xd3, 0xd2, 0xdd, 0xdc, 0xdf, 0xde, 0xd9}, 13}, } // Test Encoding func TestEncode(t *testing.T) { aenc, _ := NewAlawEncoder(ioutil.Discard, Lpcm) for _, tc := range EncoderTest { i, _ := aenc.Write(tc.data) if i != tc.expected { t.Errorf("Alaw Encode: expected: %d , actual: %d", tc.expected, i) } } uenc, _ := NewUlawEncoder(ioutil.Discard, Lpcm) for _, tc := range EncoderTest { i, _ := uenc.Write(tc.data) if i != tc.expected { t.Errorf("ulaw Encode: expected: %d , actual: %d", tc.expected, i) } } utrans, _ := NewUlawEncoder(ioutil.Discard, Alaw) for _, tc := range TranscoderTest { i, _ := utrans.Write(tc.data) if i != tc.expected { t.Errorf("ulaw Transcode: expected: %d , actual: %d", tc.expected, i) } } } // Test Decoding func TestDecode(t *testing.T) { b := new(bytes.Buffer) adec, _ := NewAlawDecoder(b) for _, tc := range DecoderTest { b.Write(tc.data) p := make([]byte, 16) var err error var i, n int for err == nil { n, err = adec.Read(p) i += n } if i != tc.expected { t.Errorf("Alaw Decode: expected: %d , actual: %d", tc.expected, i) } } b.Reset() udec, _ := NewUlawDecoder(b) for _, tc := range DecoderTest { b.Write(tc.data) p := make([]byte, 16) var err error var i, n int for err == nil { n, err = udec.Read(p) i += n } if i != tc.expected { t.Errorf("ulaw Decode: expected: %d , actual: %d", tc.expected, i) } } b.Reset() // Edge Case udec, _ = NewUlawDecoder(iotest.TimeoutReader(b)) for _, tc := range DecoderTest { b.Write(tc.data) p := make([]byte, 16) var err error var i, n int for err == nil || err.Error() == "timeout" { n, err = udec.Read(p) i += n } if i != tc.expected { t.Errorf("ulaw Decode: expected: %d , actual: %d", tc.expected, i) } } } // Benchmark Encoding data to Alaw func BenchmarkAEncode(b *testing.B) { rawData, err := ioutil.ReadFile("testing/speech.raw") if err != nil { b.Fatalf("Failed to read test data: %s\n", err) } b.SetBytes(int64(len(rawData))) b.ResetTimer() for i := 0; i < b.N; i++ { encoder, err := NewAlawEncoder(ioutil.Discard, Lpcm) if err != nil { b.Fatalf("Failed to create Writer: %s\n", err) } _, err = encoder.Write(rawData) if err != nil { b.Fatalf("Encoding failed: %s\n", err) } } } // Benchmark Encoding data to Ulaw func BenchmarkUEncode(b *testing.B) { rawData, err := ioutil.ReadFile("testing/speech.raw") if err != nil { b.Fatalf("Failed to read test data: %s\n", err) } b.SetBytes(int64(len(rawData))) b.ResetTimer() for i := 0; i < b.N; i++ { encoder, err := NewUlawEncoder(ioutil.Discard, Lpcm) if err != nil { b.Fatalf("Failed to create Writer: %s\n", err) } _, err = encoder.Write(rawData) if err != nil { b.Fatalf("Encoding failed: %s\n", err) } } } // Benchmark transcoding g711 data func BenchmarkTranscode(b *testing.B) { alawData, err := ioutil.ReadFile("testing/speech.alaw") if err != nil { b.Fatalf("Failed to read test data: %s\n", err) } b.SetBytes(int64(len(alawData))) b.ResetTimer() for i := 0; i < b.N; i++ { transcoder, err := NewAlawEncoder(ioutil.Discard, Ulaw) if err != nil { b.Fatalf("Failed to create Writer: %s\n", err) } _, err = transcoder.Write(alawData) if err != nil { b.Fatalf("Transcoding failed: %s\n", err) } } } // Benchmark Decoding Ulaw data func BenchmarkUDecode(b *testing.B) { ulawData, err := ioutil.ReadFile("testing/speech.ulaw") if err != nil { b.Fatalf("Failed to read test data: %s\n", err) } b.SetBytes(int64(len(ulawData))) b.ResetTimer() for i := 0; i < b.N; i++ { decoder, err := NewUlawDecoder(bytes.NewReader(ulawData)) if err != nil { b.Fatalf("Failed to create Reader: %s\n", err) } _, err = io.Copy(ioutil.Discard, decoder) if err != nil { b.Fatalf("Decoding failed: %s\n", err) } } } // Benchmark Decoding Alaw data func BenchmarkADecode(b *testing.B) { alawData, err := ioutil.ReadFile("testing/speech.alaw") if err != nil { b.Fatalf("Failed to read test data: %s\n", err) } b.SetBytes(int64(len(alawData))) b.ResetTimer() for i := 0; i < b.N; i++ { decoder, err := NewAlawDecoder(bytes.NewReader(alawData)) if err != nil { b.Fatalf("Failed to create Reader: %s\n", err) } _, err = io.Copy(ioutil.Discard, decoder) if err != nil { b.Fatalf("Decoding failed: %s\n", err) } } } g711-1.2/go.mod000066400000000000000000000000441416664175100131520ustar00rootroot00000000000000module github.com/zaf/g711 go 1.17 g711-1.2/test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TG rKz+d ㅾVm)}UN6ݩʥ GI %w2JӭxLL!Ӥ \5G,`k ;? &A#b;IUkEG+ R!F3c@G ;xD S^B!<@=/KϐlDS/- տ ,(;aFBjY: b׻}؝+,)̏@n8T=D_'(vA=@>г|(E`6z ܭl_KO;!R0% U)ʪ4LV-~pcn 3 -"XC&T2wH3}&B7ėS35G.dKel*FPG3|T$!?2B!J=! "ŋ%STQ*{ Hb,tUILP&/ΗԩhLT=r.B-8 =FK&Nri_/5KR>TĆ)a2U%Nyz,2WIq' }!*l-( SK|ClE4@Y!sݪsDB S >Q2kEЬ p00/ 2I?FY\>oxI2($&m6rVB% &ʈݮ%uy9M:څM77+ 0l,T bI ZpstBg711-1.2/testing/silence-1s.raw000066400000000000000000000372001416664175100162030ustar00rootroot00000000000000g711-1.2/testing/sine-440Hz-1s.raw000066400000000000000000000372001416664175100163260ustar00rootroot00000000000000"EA#Xd"eYC%5^;jTג0{Vce;[F(olKԜ Wd_w9RRb6f]J|. Ơ254NV`jfU`N4/5Ǡ%ɧ |.J]2fXbR9t^fԘYќNnp(F=[ecxV>QEGٚnקK"HA!Xd!eYC%8[<kRה0{Vce:[F(itS͜U`cr9RWb2f]J~. ɠ00$4N]`efX`N400̠ɫ |.J]3fUbR9zYkԓ\ ќQsi(FB[ecuV>QFFܚiާT"DA$Xd$eYC%4_9lQז4sVce@[F(lrU˜VjX{9RYb/f]J. ͠-24NY`ef[`N45-ʠ!ɩ |.J]1fXbR9t_dԛUΜOkr(F<[ecuV>OFGښjާR"IAXdeYC%6]<hĤW׏.wVce;[F(tiNϜTb`v9RVb0f]J~. ɠ024NX`gfY`N"4/-Π ɬ .J]2fUbR9x]gԗY ќOlq(F=[ecoV>NEGܚg⧴V"AA%XdeYC%0c7lPז4uVce:[F(uiKԜ Ycat9RZb.f]J. %ʠ2. 4NW`hfY`N"4-3Ƞ%ɧ .J]2fVbR9sacԜSΜPoo(F;[ectV>PFFۚjܧN"HA!Xd!eYC%7\<lW׍,xVce;[F(n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2?>f32<]S13? JFDn43>3􄄁kY`u 7280 k{z 42>0䆌zi53>2󁁍DBowz 397 h~d{4<=c5ܘbcbt6?>g 6floɑWm3>8N56Vfs0?960 jv0365낆sa턞g4=1 } kȀufyn5 3f5vNܔOh57>7n싋Msn`o=21r4 lmdS\䖒gz702i4lbdqd047 ǝnMK혜^g 2eVTtqrPޝFUd~ 9k5`boVxmwunHc4>녁7kaZKdNbLT72<5ᄈ񄑟z@xIl 75=惄 4~Elޝ랐Bf\D56 D5ojbZ斅Fkf`541 4oB甑OnSx˗5715󙄃~v[h{Vco447}✎lEꅖsiev 4f goq嗞ySa 4rlQnҐFNheE 5 ㆄ AExd퓕{k{ᖙa 絜q5dnjq{lB✄J Hr|ꃇag_m텃E D ]raGjnf  tD g}m[Ho~k@蘁klp gcb~r}hʓ 흃jnkydTǖb5hÇm}v{zzx υ`w쑆WU`fYEXZ` hLH~qll셀{kohd⒙d|Ni rvKÖlbVZqzsto|Smjo{Аgv뚅^ve~EmxyF胒afe⚄Owg}\ang^ϒIkjy瓚rĕ^xbyWTꑝKniha}CPדwmlDG焓^dhn흄DEmW_OřꗟuoorVbşIa`EOq`nh{㑞GTElaq@gmkieroxPd\}nhaXg酟|cNLg~bcgb蔛oyːmaQre|bzaje锚Top坟clgrfuHe{monv엙XmKTퟞf`x|~BG|egddG鑜BcoE\[ddvwLAu~ezeq픒TzwP풞fstNIVVpz~|s\葒Jb`qAR}vDXZDA|~qKR픓]ea}TꐖQ_USRAtruuR闖vmof~VPGKt@FU압vbmd|QS[CIC\PIzllgeOUTVQ\qebno`gsVTZqzfmijjkcexqYVAsefbnhhklg{|NWRGIsefacmba{rpOWUW[ur|yefadys}tZTPDKuup|}ptwwuG\PWRY[ALOIuKuRUUUUUTTUUTTWWVVQQVQVVWTTTTTUTUUTTTWTWVVQQPPSRRRRRRRR]]\\___YYYXXYY^____\\\]]RSSPQQVVWTTTUUUUUUUUUUUUUUUUUUUUUUUTTTTTWWWWWWWVVVVVVVVVVVVWVWWTWTTTTUUUU|RTAw@T^sakxꓖ@RMs@a}pamnmyQr`O}bodZy otN|m`fvo~ĝbd閑  m퇎~ik`闗  b|䄉T`kb 5d^ꄊIaklya74l䝏engdSj64bAs~`knDf755 m~G{hibel055 au矃\Lcspx37{EWzdKsEf70 5|wu[F~f 1 7x隂QUQb65`f㚄u6 ef훇]d4  `@h5`HJ腛y  nY휚zl𔓜lscjv㖓Drllg㕐I}`Ll`pⓖsUvg^i`~흖VENww}fibeJZAR[rfdimfdwuL^A]VppgfadYvASVAFFyKvruT\QU^ZX]JXRYSQP[FDGEIZSWWPYPVUWRTY]XVW_SU_P\YGZDWDP\_CYSTYDwLRKT]NF\MREWU@]^QTX__S]FU[V]FTMQW[SWXYGWDFKD_]@WOTPIG[_Z]\GJ_TESVLD\BUuRRUTUUQGQUVTRVTVVUVPYPW\]PU\PDVU_R_CECQCQ[MZCXDRPS\STYWAFL[WW[WE]QGTUUX@DZV[QGPUYX]X_rVALENP_pvYNttArqX[FYJGqPqq[G\XPFUT_K\Axrffebv}}scnD生AdiZ柚MkvំF`V\m  pۖ_bsҖ_XOJuH 5]郌eggq[IT 5i򔍋nhyrwb5ck`kerUNn  hꂈ^jolKI^zo햆PjkFSZ`  ꞌg`Sd c㑆XlfEfn cᔆrak@⒐x aꛏenhzSm f픅Cxpfs푐tbr랅VQ_╕|l흟디Kah\_헐ufihsMB锗@NCgokhjhjbxtCF}acckkmfIS\SSLwtpecmoknba|\@wsdmlliho`zwPLEtdzec`bc{ezA_SU\}p~fd`cxddKIBP_]Ms}dag`cde~JBURCvyeg`bbcadzqC[O@^}ebhnkilcdyuKylkjih`^wBBmjk~C@tah`P@OfmK䒒zdᒇu㑐` mĒyw唑u5 hNRbeT蓘54muGtvq77 dxmhz_ 17 t⚎lvy437 Tj⛀` 634 򑃈UVa634 \iX㄃l624 אqwꄁo724 D냌ohr⅀{76 Ԓ_``^뛆d57kQIc}h54Xd{gb r֗^zL퐟y`jjeAUKeClylw~}e[LAtN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AA.o"=/  Q<~  \R]# k  sQ r`:)82`  v (|,}DT^"3L "_k v xg 81.ZFz>. !Od W  Z\ [ o>BX7g ۿ_H*-   0  P>Jkcp]PeR[  2gT z !\=ZM&j 3  0  N E;VU,v2riw( RI v vu:  IFe  ~  *uXAa: N N ^z  y$LTC}  mk M g  )PlVEۉ _M8 U l +RM!PKptl }>R_ 6@id/%8M|[# C U =\!ܸZ׳ ,|p s V '.opX"<U B\ +6` a w =ңӻԮPvn KL>$ ~O#' ( m ` ؃PԄ)L 0F؅EeQ C&ԕŬD>"C AW~Bdee  IՏ;u٭" <7ٗT jH K_٨*h  _` |b>n vHVRIƉ B ] ލy ^T v ; ѭ2:$w xWI  ,  pt n95nv = %7©D/ / %O "/6*7!ȦԈ   pyN GFe5 M3T sl>Q H%4'ͦ} D +J lsHZ(fTtϐ͎6 p eYOWn ДN˲ v"Mjg([!^QE M{6ruZz .+x ө;D2 bl iN s;{QgN6 nfADʭѦlMcH +s } +DVhޔO0mT r oCvx   ^߹6qY 2 zf _o, C RP -}YKig{@ +R  m ө|/Rl  ` t 8 J GB6   V,_ 7  zR؅rlX Z  #? 1 70 /"J KR L R =u زFYz  X s p +ivTIxv) /  =aLrX l  !Y A  ':f"2G 0 r _F zo7 <b y%O n0%|l  $lL e 9lQM Q ) @1 LZHi  -A   gR>5  =^8 zf - YKYW :5 ~L|3  Rfa8Ux>  Y-{&n  , v; "{O" Q n 4h% m׾n'Wm%e H 3~m!^ %FY& L#٦ƚCf I %jFNy ! }[ =PѩV 9Ij J KdO!"F3 ?TŊL ~ [U& V!(NЉαGA+ 5ik M } #Wg6tg    w >) ?  _@M% d; 0g̔YgL P&zP A F~B i ?tMm~ 2 n W 4erYDͷy [ AZ a I1 1¸ q \   l,̾[ aB  g  g>  kX  q~ 0]Gɹ> l [   GN+t q M]`V G s ? nV Π¤oe + +L  * x / ;àk  O < # hy 9!SX:  X;I> ]_ @  f˶b w 5 n P ] g:H >cOE/ % G v i{ qS ;p]V dJ4hl #BI vK9n͚jN}0'DPo!  4'<(Ʊ 5 g ~ {lz 'hрUɥw?bS 0a& d R͖ T #Z \- x;fVNי< M   k 7Z]J3=?z*} P,u '1۫Й ԧPA &JP c {_ +}ܧȝ=& Ev`+VJ߫uɩh?5 |k9H fc b7~H<KUǃڱniad5 {  )# :\!7=< v I}"'S#!x>:~_%EZ"+#~fWK_Y/ !lT F&ҸG%I %!QއمF$D0 0 "԰َd(/&"h%!fp  , u^ئp#s!b!$ ~nz 4UPR ) ^fO^ݺ$Ei#^'Zw5-sUn p^  $a4Bq0 ~ j>*E  [%Q/4?R culڽT qRtlB}*EOgoK)EQ LU> v"ac` ;L VjBa՞u(oo8 3  cIqo @  zJ%ۙpW 0 #+ z#m ;q;-X7')}i O%NN Jhf' | +H }Fpz{J qUނ}GoK!KQ h i3%xlɎST0'ڼx"" V 26[@i `PM  c8Y& n=X92 N g sIW9 = μ|~) `z0M | (  is@n y0ت  8 _Sމ!a_j K ^~  @5 E. ;Mט Z$ h#. TQpv|7  V!X? +,". /{X0#j A fx\ s &tfPDݞg ~,]s] "rF~ N6"1(r-zL 8b!sTie ;E  ?o6Ci i ma~`| $ v \m  t nr>L la  r=PZ8 zrn6EJU`. 4la6l oJb!  d ]-[i 44w)e +b  ^! xv],QST[f1qtHJv f IuL em~<hBPTnU$3'Y@? J cc< CP,SX bk e^ 8 .'Fub*U[pwK w nAx8D Z@Z  f NYhR=Q  6Vl#& 8 ubkB: `B) z ]q[VޥsJlq  "L " Ta Y( + ME\"X 8mcw LJ `$ [B; 5(jDDzyj)z2pwmWi  \8 H\^ d ] (?.   ` - >  ]  ; a(~Wf OTO(U * e }CM kl  q ~ ;:0w>k xv XUvo  R\ V  / sfv. I am.jAR 'x@0DG`J G VoB ~ NWm"; %qR| o c5M}) iEb51;R5p"  ZBY] \+W%? " /{cpwN  wkrAnKgb  BDyaxQ/>E%, OppaQ c $'9`x s[}m CI"O1.Ui ` @ T0fIJ +u'%C6~^ CT l^   J5(2 ] HMRv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x#i6)HY:Ka!?P\| 7>(Bj-^U! Ti { d V+ I_G(k9qLy ~iU3ke_0wXwr iN07Q0$f!^Vx{H,%Bk?H;7)c]=S#vT> EA{~\vi"oWc ozk"w!I[PN~?t4 {1xKCSt~JnImGKIy[Ju&[3y fu = o E$,}/ `' +2Tl`  W9`@ $ 0jM3H U RqCo 5DC K" Q6/b' g Q #އn(V= JWm7}g 1R Aڒw <WE& 1N V % OYk֐vCG UY~p 2zr c))tڴ2-: 0e6&+$5s U& ru~ oWbPqh WY:l}Y  %k "a@'IO? |N5"! sF;nj vMF ;kхݷ&G[$HF.^ks@!S uB$ kGI8./Db PF9޵ۚA b Bfv5(*^^))Cp ,V1YGx1("_&zOi9x]!w[o BhC1Z,fk, QP3l|M ; k$Xx;m _IR;P4,T#uS.a>khi5lW%s||S91/lIhEjjjS;InGIUCX+nPv ;cf5V+?!i;66?OC={rv(M#(Y'[1Ur06BIn14?}*i=bsz@ u J K } 6JL R1 0 >+/1l;NIsgUDQsb\C/$ #oDHi4q &cI8Bsed$KBQ"i!yEGv P 2 $v U %W,d j';G@ 5 J.!^n[!Ec M iLFvR BXfL+> # $l4@W+kcn5c3'c~se?43(' .t5R/f_ S |X 5WO]>![J:#-Tnx # 8 { 49Q c r LD- qR~ F E<PVuR&Z 8_Sycgy YP6_0h[.ke<E)B,hdqiw@h-zr|+]?X4x:e0C z#tQ$/mGybAr> TucT/QY!r4R)PwARyqeP~5\D KYb X,.XK j@N<- \6 %{h ( H^C @Hd{7A_t  u'fg  M +yw|V , 9  =O />p#r " '-X h|\)ucm Xo  /2wf!*W~ U]D 1*H;kH  5pq=fefd  i R * "c^i}U N (  ],%c}k   1P1cfa N 0 Xx&ܾ<r@ Fj j{[Dآw;Sc>A y(n6@m /iSؚ+f HQbS 0YnoPCս&l #V m "/# x hi}8` S | E- ^ n-HM]Na 3QG]CHA=6'=ےr }  "NmyB  - @\@ 9\~#L) Q030xZ Lޔ$mS FY/]R + ?pxhmh> e B] :8 NlނV } 5  u݁#X ?r1VN"?^? /JD iqfT 6] Q  N1^ h Ka C5ۿq m unh wq ֙z;# NvK3B^zqӪMg  c)! \Bn v =\%$,6yMd C|3?) &wMZX p  Q' A2eO7td533 K U <P%g G;$!a"#]*mJ- U:-'|8r<6 u kC;G -0&07 7<8^O\k  '~fVPyU _k H:Tc 4cE@  xJ[`  Hi  { @ (r;ܐ}   PXr3 @X V!j;-IKqTKt9_ WI /q  S n@$ >u!toycX_v\jQ^,ruMOu) C_4Bm/_GZJG[vMrQX1yR`bKi<1B w'm>%0UAZ}T~;p. 0WcyD5$=},2110".sV(JYdj> -1 JZ%5Mk{y`Q>%1<BQPXO<,$)4663""9?<??IC725CPU[`lxx{v{kd\TLEBHMIl#+>&oG +5346Fg3nSsBrZ<;@J[hbx/#pFS rjEtRmm%<q\g+I'zHWpWne7xp}3K,uI&>h !<-mT-zr)_I n7 ),!rZ YH Nhf`<SS9rL"6_'uf=4T\L)xt}j?g"{7`='*|fR?0j\ocL `hrg(k'iOz$myR)ust--mNIx2E"*]Q3@ZYUBPDg?ZFQ8p U2IzrRZXt%zF:D*'laTC97f8%]2.\sKcC[0Iefr wsKj`Gm3 MlH I4njCE%i|> % p+r0$}43t   Q &U:K(7%D` A i M z. pA~tz$  G 6 Z;CWE%' { & *w r DGZ!C- &) Gc5 d Y;q%XokS q=F g ! LEt7-o ~>I /F,uv[3mM R8;j" {rp_6 >` >{ !&fA b d sp1{`B-yxTh ^[u0*|xU + n+ '[+R d. 2/ D|q ]"0 m3j NTqpZ 9Zߒۭ@dHqe KJx  oY Se3me%  8 :, nj9 ) F#رŹ B\' {CRy d*6q(x  OA Sr {1ګae@ 0hZ!R ,/vB' T %.3 )Z~BB 3_}KOgHJ d g#ڦͰA&C5E{ak: Ph A(Q| gT0aK_C12]3I% jJ E }KD `_(wm;&| 6y] K # :Sv Y Qlb0:!%DDH,Q>  cDe  Cy5N#rםR" L!Fc^z"n  G@mZԸ'~' Ss~>e;x    D )58mܑi)h79y /i * {m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|vlouons}od|}iovojjqenqljnwjdovlhmrjd}zal}iptmtmk|ju{qwwzkw}uqglr}uquptwonxzqm|gzuwyhc~omqolupmtknxuomy{fstsmkzogxonlkyliunmllyjlponkoyhoqpokvuivrpom}olysrpomq{tspukx{uup}{l}ytuqsn~wttsnr}usrv~kwzqsozvkyvorn{nmyrnpnzkowonopvjqtmontpjtrlonvmlvompowlowooqswmuxotsxvozyryv}uv~yw|zv{z{~~xz}~{z}|}~{}~{}{{|||z{|y{z{yzzzyzyzxyzyyyzyyyzyzzzzzzzzzz{z{{{{{|{|{||||||}}}}~~~~~~~~~~~~}}}}}}||{{{{zzzyyyyyyyyyyxyyyyyyyyyyyyyyzzz{{{{||}}}~~~~~~||{zzyxxwwvvvuuuuttssssssssssssssssssssssssrssrrrrrrrrrrrrrqqqrqqqrqqqrrrsssstttuuuuuuuuuututttttttttutttttutttttsssssrrqrrqrrrqqrrrrqqqqrrqrqrrprqrqqtstuuttvvvxxvv|qrvuvoyzwyzvw~vsv||tzurxnoupuop|xsmozousnr~ojonsonnrq|rwl{knejwigk|fqhjxt[lr]b`g\ypqo~|xqj}ur|w{ffmvedoqc^_h{qe`duzus{|oq|pvomuuwvo|vnwqsuw}j~t|uzlhjzmgejxuxnrexmqlzu|wutqytqmnjsobl`ie\oi_ofyxx~lf|optqyhrkp}~pqrge~gaetcjbnawd__hbubzbzuunVjd^]enxn{vmmj_ai`urwznlp^Yfa^_nnnk^ejc`mrguhqjhm_jh_ih`oktrppohru`gv`ro^ijckjareujsyhmsgwj{inpgmll~hiim}ohejkvjm~msvvruotiuzr{oyxxvu{n~~uo{qlyknwvxvwonxtnjkledgbgmkomvqm|ttx~u}~}y{|z{~{}~||~}{vx~~{{|uyyuy{{~zsqoonnmntwzvvvmmlhhjmnoruqmmlkkjlkknonmmolknorsprnlnnmnorttvuqonnlklllopooortoonmmmosrqqooooonopoonnoopqooooqstuuqqqoqtqrrrrswwwzy|~~z|}y{zxzwuwusvyxy|yxxwvtrqnmmlmnoqsv{{yyxwx{{|}~|||{{}~~}}{zzxwwwvvvuwwvyzywvvtssuvvwwvvvxwwwxyyz{z{yxxxyyz{{|}~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~g711-1.2/ulaw.go000066400000000000000000000143001416664175100133430ustar00rootroot00000000000000/* Copyright (C) 2016 - 2017, Lefteris Zafiris This program is free software, distributed under the terms of the BSD 3-Clause License. See the LICENSE file at the top of the source tree. Package g711 implements encoding and decoding of G711 PCM sound data. G.711 is an ITU-T standard for audio companding. */ package g711 const ( uLawBias = 0x84 uLawClip = 0x7F7B ) var ( // u-law quantization segment lookup table ulawSegment = [256]uint8{ 0, 0, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, } // u-law to LPCM conversion lookup table ulaw2lpcm = [256]int16{ -32124, -31100, -30076, -29052, -28028, -27004, -25980, -24956, -23932, -22908, -21884, -20860, -19836, -18812, -17788, -16764, -15996, -15484, -14972, -14460, -13948, -13436, -12924, -12412, -11900, -11388, -10876, -10364, -9852, -9340, -8828, -8316, -7932, -7676, -7420, -7164, -6908, -6652, -6396, -6140, -5884, -5628, -5372, -5116, -4860, -4604, -4348, -4092, -3900, -3772, -3644, -3516, -3388, -3260, -3132, -3004, -2876, -2748, -2620, -2492, -2364, -2236, -2108, -1980, -1884, -1820, -1756, -1692, -1628, -1564, -1500, -1436, -1372, -1308, -1244, -1180, -1116, -1052, -988, -924, -876, -844, -812, -780, -748, -716, -684, -652, -620, -588, -556, -524, -492, -460, -428, -396, -372, -356, -340, -324, -308, -292, -276, -260, -244, -228, -212, -196, -180, -164, -148, -132, -120, -112, -104, -96, -88, -80, -72, -64, -56, -48, -40, -32, -24, -16, -8, 0, 32124, 31100, 30076, 29052, 28028, 27004, 25980, 24956, 23932, 22908, 21884, 20860, 19836, 18812, 17788, 16764, 15996, 15484, 14972, 14460, 13948, 13436, 12924, 12412, 11900, 11388, 10876, 10364, 9852, 9340, 8828, 8316, 7932, 7676, 7420, 7164, 6908, 6652, 6396, 6140, 5884, 5628, 5372, 5116, 4860, 4604, 4348, 4092, 3900, 3772, 3644, 3516, 3388, 3260, 3132, 3004, 2876, 2748, 2620, 2492, 2364, 2236, 2108, 1980, 1884, 1820, 1756, 1692, 1628, 1564, 1500, 1436, 1372, 1308, 1244, 1180, 1116, 1052, 988, 924, 876, 844, 812, 780, 748, 716, 684, 652, 620, 588, 556, 524, 492, 460, 428, 396, 372, 356, 340, 324, 308, 292, 276, 260, 244, 228, 212, 196, 180, 164, 148, 132, 120, 112, 104, 96, 88, 80, 72, 64, 56, 48, 40, 32, 24, 16, 8, 0, } // u-law to A-law conversion lookup table based on the ITU-T G.711 specification ulaw2alaw = [256]uint8{ 42, 43, 40, 41, 46, 47, 44, 45, 34, 35, 32, 33, 38, 39, 36, 37, 58, 59, 56, 57, 62, 63, 60, 61, 50, 51, 48, 49, 54, 55, 52, 53, 10, 11, 8, 9, 14, 15, 12, 13, 2, 3, 0, 1, 6, 7, 4, 26, 27, 24, 25, 30, 31, 28, 29, 18, 19, 16, 17, 22, 23, 20, 21, 106, 104, 105, 110, 111, 108, 109, 98, 99, 96, 97, 102, 103, 100, 101, 122, 120, 126, 127, 124, 125, 114, 115, 112, 113, 118, 119, 116, 117, 75, 73, 79, 77, 66, 67, 64, 65, 70, 71, 68, 69, 90, 91, 88, 89, 94, 95, 92, 93, 82, 82, 83, 83, 80, 80, 81, 81, 86, 86, 87, 87, 84, 84, 85, 85, 170, 171, 168, 169, 174, 175, 172, 173, 162, 163, 160, 161, 166, 167, 164, 165, 186, 187, 184, 185, 190, 191, 188, 189, 178, 179, 176, 177, 182, 183, 180, 181, 138, 139, 136, 137, 142, 143, 140, 141, 130, 131, 128, 129, 134, 135, 132, 154, 155, 152, 153, 158, 159, 156, 157, 146, 147, 144, 145, 150, 151, 148, 149, 234, 232, 233, 238, 239, 236, 237, 226, 227, 224, 225, 230, 231, 228, 229, 250, 248, 254, 255, 252, 253, 242, 243, 240, 241, 246, 247, 244, 245, 203, 201, 207, 205, 194, 195, 192, 193, 198, 199, 196, 197, 218, 219, 216, 217, 222, 223, 220, 221, 210, 210, 211, 211, 208, 208, 209, 209, 214, 214, 215, 215, 212, 212, 213, 213, } ) // EncodeUlaw encodes 16bit LPCM data to G711 u-law PCM func EncodeUlaw(lpcm []byte) []byte { if len(lpcm) < 2 { return []byte{} } ulaw := make([]byte, len(lpcm)/2) for i, j := 0, 0; j <= len(lpcm)-2; i, j = i+1, j+2 { ulaw[i] = EncodeUlawFrame(int16(lpcm[j]) | int16(lpcm[j+1])<<8) } return ulaw } // EncodeUlawFrame encodes a 16bit LPCM frame to G711 u-law PCM func EncodeUlawFrame(frame int16) uint8 { /* The algorithm first stores off the sign. It then adds in a bias value which (due to wrapping) will cause high valued samples to lose precision. The top five most significant bits are pulled out of the sample. Then, the bottom three bits of the compressed byte are generated using the segment look-up table, based on the biased value of the source sample. The 8-bit compressed sample is then finally created by logically OR'ing together the 5 most important bits, the 3 lower bits, and the sign when applicable. The bits are then logically NOT'ed for transmission. */ sign := (frame >> 8) & 0x80 if sign != 0 { frame = -frame } if frame > uLawClip { frame = uLawClip } frame += uLawBias segment := ulawSegment[(frame>>7)&0xFF] bottom := (frame >> (segment + 3)) & 0x0F return uint8(^(sign | (int16(segment) << 4) | bottom)) } // DecodeUlaw decodes u-law PCM data to 16bit LPCM func DecodeUlaw(pcm []byte) []byte { lpcm := make([]byte, len(pcm)*2) for i, j := 0, 0; i < len(pcm); i, j = i+1, j+2 { frame := ulaw2lpcm[pcm[i]] lpcm[j] = byte(frame) lpcm[j+1] = byte(frame >> 8) } return lpcm } // DecodeUlawFrame decodes a u-law PCM frame to 16bit LPCM func DecodeUlawFrame(frame uint8) int16 { return ulaw2lpcm[frame] } // Ulaw2Alaw performs direct u-law to A-law data conversion func Ulaw2Alaw(ulaw []byte) []byte { alaw := make([]byte, len(ulaw)) for i := 0; i < len(alaw); i++ { alaw[i] = ulaw2alaw[ulaw[i]] } return ulaw } // Ulaw2AlawFrame directly converts a u-law frame to A-law func Ulaw2AlawFrame(frame uint8) uint8 { return ulaw2alaw[frame] } g711-1.2/ulaw_test.go000066400000000000000000000023521416664175100144060ustar00rootroot00000000000000/* Copyright (C) 2016 - 2017, Lefteris Zafiris This program is free software, distributed under the terms of the BSD 3-Clause License. See the LICENSE file at the top of the source tree. Package g711 implements encoding and decoding of G711 PCM sound data. G.711 is an ITU-T standard for audio companding. */ package g711 import ( "io/ioutil" "testing" ) // Benchmark EncodeUlaw func BenchmarkEncodeUlaw(b *testing.B) { rawData, err := ioutil.ReadFile("testing/speech.raw") if err != nil { b.Fatalf("Failed to read test data: %s\n", err) } b.SetBytes(int64(len(rawData))) b.ResetTimer() for i := 0; i < b.N; i++ { EncodeUlaw(rawData) } } // Benchmark DecodeUlaw func BenchmarkDecodeUlaw(b *testing.B) { uData, err := ioutil.ReadFile("testing/speech.ulaw") if err != nil { b.Fatalf("Failed to read test data: %s\n", err) } b.SetBytes(int64(len(uData))) b.ResetTimer() for i := 0; i < b.N; i++ { DecodeUlaw(uData) } } // Benchmark Ulaw2Alaw func BenchmarkUlaw2Alaw(b *testing.B) { uData, err := ioutil.ReadFile("testing/speech.ulaw") if err != nil { b.Fatalf("Failed to read test data: %s\n", err) } b.SetBytes(int64(len(uData))) b.ResetTimer() for i := 0; i < b.N; i++ { Ulaw2Alaw(uData) } }