| OLD | NEW |
| 1 == Opus audio codec == | 1 == Opus audio codec == |
| 2 | 2 |
| 3 Opus is a codec for interactive speech and audio transmission over the Internet. | 3 Opus is a codec for interactive speech and audio transmission over the Internet. |
| 4 | 4 |
| 5 Opus can handle a wide range of interactive audio applications, including | 5 Opus can handle a wide range of interactive audio applications, including |
| 6 Voice over IP, videoconferencing, in-game chat, and even remote live music | 6 Voice over IP, videoconferencing, in-game chat, and even remote live music |
| 7 performances. It can scale from low bit-rate narrowband speech to very high | 7 performances. It can scale from low bit-rate narrowband speech to very high |
| 8 quality stereo music. | 8 quality stereo music. |
| 9 | 9 |
| 10 Opus, when coupled with an appropriate container format, is also suitable | 10 Opus, when coupled with an appropriate container format, is also suitable |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 | 36 |
| 37 Opus-tools can be found at: | 37 Opus-tools can be found at: |
| 38 https://git.xiph.org/?p=opus-tools.git | 38 https://git.xiph.org/?p=opus-tools.git |
| 39 or on the main Opus website: | 39 or on the main Opus website: |
| 40 https://opus-codec.org/ | 40 https://opus-codec.org/ |
| 41 | 41 |
| 42 == Compiling libopus == | 42 == Compiling libopus == |
| 43 | 43 |
| 44 To build from a distribution tarball, you only need to do the following: | 44 To build from a distribution tarball, you only need to do the following: |
| 45 | 45 |
| 46 % ./configure | 46 % ./configure |
| 47 % make | 47 % make |
| 48 | 48 |
| 49 To build from the git repository, the following steps are necessary: | 49 To build from the git repository, the following steps are necessary: |
| 50 | 50 |
| 51 0) Set up a development environment: |
| 52 |
| 53 On an Ubuntu or Debian family Linux distribution: |
| 54 |
| 55 % sudo apt-get install git autoconf automake libtool gcc make |
| 56 |
| 57 On a Fedora/Redhat based Linux: |
| 58 |
| 59 % sudo dnf install git autoconf automake libtool gcc make |
| 60 |
| 61 Or for older Redhat/Centos Linux releases: |
| 62 |
| 63 % sudo yum install git autoconf automake libtool gcc make |
| 64 |
| 65 On Apple macOS, install Xcode and brew.sh, then in the Terminal enter: |
| 66 |
| 67 % brew install autoconf automake libtool |
| 68 |
| 51 1) Clone the repository: | 69 1) Clone the repository: |
| 52 | 70 |
| 53 % git clone https://git.xiph.org/opus.git | 71 % git clone https://git.xiph.org/opus.git |
| 54 % cd opus | 72 % cd opus |
| 55 | 73 |
| 56 2) Compiling the source | 74 2) Compiling the source |
| 57 | 75 |
| 58 % ./autogen.sh | 76 % ./autogen.sh |
| 59 % ./configure | 77 % ./configure |
| 60 % make | 78 % make |
| 61 | 79 |
| 62 3) Install the codec libraries (optional) | 80 3) Install the codec libraries (optional) |
| 63 | 81 |
| 64 % sudo make install | 82 % sudo make install |
| 65 | 83 |
| 66 Once you have compiled the codec, there will be a opus_demo executable | 84 Once you have compiled the codec, there will be a opus_demo executable |
| 67 in the top directory. | 85 in the top directory. |
| 68 | 86 |
| 69 Usage: opus_demo [-e] <application> <sampling rate (Hz)> <channels (1/2)> | 87 Usage: opus_demo [-e] <application> <sampling rate (Hz)> <channels (1/2)> |
| 70 <bits per second> [options] <input> <output> | 88 <bits per second> [options] <input> <output> |
| 71 opus_demo -d <sampling rate (Hz)> <channels (1/2)> [options] | 89 opus_demo -d <sampling rate (Hz)> <channels (1/2)> [options] |
| 72 <input> <output> | 90 <input> <output> |
| 73 | 91 |
| 74 mode: voip | audio | restricted-lowdelay | 92 mode: voip | audio | restricted-lowdelay |
| (...skipping 20 matching lines...) Expand all Loading... |
| 95 input and output are little-endian signed 16-bit PCM files or opus | 113 input and output are little-endian signed 16-bit PCM files or opus |
| 96 bitstreams with simple opus_demo proprietary framing. | 114 bitstreams with simple opus_demo proprietary framing. |
| 97 | 115 |
| 98 == Testing == | 116 == Testing == |
| 99 | 117 |
| 100 This package includes a collection of automated unit and system tests | 118 This package includes a collection of automated unit and system tests |
| 101 which SHOULD be run after compiling the package especially the first | 119 which SHOULD be run after compiling the package especially the first |
| 102 time it is run on a new platform. | 120 time it is run on a new platform. |
| 103 | 121 |
| 104 To run the integrated tests: | 122 To run the integrated tests: |
| 105 % make check | 123 |
| 124 % make check |
| 106 | 125 |
| 107 There is also collection of standard test vectors which are not | 126 There is also collection of standard test vectors which are not |
| 108 included in this package for size reasons but can be obtained from: | 127 included in this package for size reasons but can be obtained from: |
| 109 https://opus-codec.org/testvectors/opus_testvectors.tar.gz | 128 https://opus-codec.org/testvectors/opus_testvectors.tar.gz |
| 110 | 129 |
| 111 To run compare the code to these test vectors: | 130 To run compare the code to these test vectors: |
| 112 | 131 |
| 113 % curl -O https://opus-codec.org/testvectors/opus_testvectors.tar.gz | 132 % curl -OL https://opus-codec.org/testvectors/opus_testvectors.tar.gz |
| 114 % tar -zxf opus_testvectors.tar.gz | 133 % tar -zxf opus_testvectors.tar.gz |
| 115 % ./tests/run_vectors.sh ./ opus_testvectors 48000 | 134 % ./tests/run_vectors.sh ./ opus_testvectors 48000 |
| 116 | 135 |
| 117 == Portability notes == | 136 == Portability notes == |
| 118 | 137 |
| 119 This implementation uses floating-point by default but can be compiled to | 138 This implementation uses floating-point by default but can be compiled to |
| 120 use only fixed-point arithmetic by setting --enable-fixed-point (if using | 139 use only fixed-point arithmetic by setting --enable-fixed-point (if using |
| 121 autoconf) or by defining the FIXED_POINT macro (if building manually). | 140 autoconf) or by defining the FIXED_POINT macro (if building manually). |
| 122 The fixed point implementation has somewhat lower audio quality and is | 141 The fixed point implementation has somewhat lower audio quality and is |
| 123 slower on platforms with fast FPUs, it is normally only used in embedded | 142 slower on platforms with fast FPUs, it is normally only used in embedded |
| 124 environments. | 143 environments. |
| 125 | 144 |
| 126 The implementation can be compiled with either a C89 or a C99 compiler. | 145 The implementation can be compiled with either a C89 or a C99 compiler. |
| 127 While it does not rely on any _undefined behavior_ as defined by C89 or | 146 While it does not rely on any _undefined behavior_ as defined by C89 or |
| 128 C99, it relies on common _implementation-defined behavior_ for two's | 147 C99, it relies on common _implementation-defined behavior_ for two's |
| 129 complement architectures: | 148 complement architectures: |
| 130 | 149 |
| 131 o Right shifts of negative values are consistent with two's | 150 o Right shifts of negative values are consistent with two's |
| 132 complement arithmetic, so that a>>b is equivalent to | 151 complement arithmetic, so that a>>b is equivalent to |
| 133 floor(a/(2^b)), | 152 floor(a/(2^b)), |
| 134 | 153 |
| 135 o For conversion to a signed integer of N bits, the value is reduced | 154 o For conversion to a signed integer of N bits, the value is reduced |
| 136 modulo 2^N to be within range of the type, | 155 modulo 2^N to be within range of the type, |
| 137 | 156 |
| 138 o The result of integer division of a negative value is truncated | 157 o The result of integer division of a negative value is truncated |
| 139 towards zero, and | 158 towards zero, and |
| 140 | 159 |
| 141 o The compiler provides a 64-bit integer type (a C99 requirement | 160 o The compiler provides a 64-bit integer type (a C99 requirement |
| 142 which is supported by most C89 compilers). | 161 which is supported by most C89 compilers). |
| OLD | NEW |