xref: /aosp_15_r20/external/libopus/README.draft (revision a58d3d2adb790c104798cd88c8a3aff4fa8b82cc)
1*a58d3d2aSXin LiTo build this source code, simply type:
2*a58d3d2aSXin Li
3*a58d3d2aSXin Li% make
4*a58d3d2aSXin Li
5*a58d3d2aSXin LiIf this does not work, or if you want to change the default configuration
6*a58d3d2aSXin Li(e.g., to compile for a fixed-point architecture), simply edit the options
7*a58d3d2aSXin Liin the Makefile.
8*a58d3d2aSXin Li
9*a58d3d2aSXin LiAn up-to-date implementation conforming to this standard is available in a
10*a58d3d2aSXin LiGit repository at https://gitlab.xiph.org/xiph/opus.git or on a website at:
11*a58d3d2aSXin Lihttps://opus-codec.org/
12*a58d3d2aSXin LiHowever, although that implementation is expected to remain conformant
13*a58d3d2aSXin Liwith the standard, it is the code in this RFC that shall remain normative.
14*a58d3d2aSXin LiTo build from the git repository instead of using this RFC, follow these
15*a58d3d2aSXin Listeps:
16*a58d3d2aSXin Li
17*a58d3d2aSXin Li1) Clone the repository (latest implementation of this standard at the time
18*a58d3d2aSXin Liof publication)
19*a58d3d2aSXin Li
20*a58d3d2aSXin Li% git clone https://gitlab.xiph.org/xiph/opus.git
21*a58d3d2aSXin Li% cd opus
22*a58d3d2aSXin Li
23*a58d3d2aSXin Li2) Compile
24*a58d3d2aSXin Li
25*a58d3d2aSXin Li% ./autogen.sh
26*a58d3d2aSXin Li% ./configure
27*a58d3d2aSXin Li% make
28*a58d3d2aSXin Li
29*a58d3d2aSXin LiOnce you have compiled the codec, there will be a opus_demo executable in
30*a58d3d2aSXin Lithe top directory.
31*a58d3d2aSXin Li
32*a58d3d2aSXin LiUsage: opus_demo [-e] <application> <sampling rate (Hz)> <channels (1/2)>
33*a58d3d2aSXin Li         <bits per second> [options] <input> <output>
34*a58d3d2aSXin Li       opus_demo -d <sampling rate (Hz)> <channels (1/2)> [options]
35*a58d3d2aSXin Li         <input> <output>
36*a58d3d2aSXin Li
37*a58d3d2aSXin Limode: voip | audio | restricted-lowdelay
38*a58d3d2aSXin Lioptions:
39*a58d3d2aSXin Li-e                   : only runs the encoder (output the bit-stream)
40*a58d3d2aSXin Li-d                   : only runs the decoder (reads the bit-stream as input)
41*a58d3d2aSXin Li-cbr                 : enable constant bitrate; default: variable bitrate
42*a58d3d2aSXin Li-cvbr                : enable constrained variable bitrate; default: unconstrained
43*a58d3d2aSXin Li-bandwidth <NB|MB|WB|SWB|FB> : audio bandwidth (from narrowband to fullband);
44*a58d3d2aSXin Li                               default: sampling rate
45*a58d3d2aSXin Li-framesize <2.5|5|10|20|40|60> : frame size in ms; default: 20
46*a58d3d2aSXin Li-max_payload <bytes> : maximum payload size in bytes, default: 1024
47*a58d3d2aSXin Li-complexity <comp>   : complexity, 0 (lowest) ... 10 (highest); default: 10
48*a58d3d2aSXin Li-inbandfec           : enable SILK inband FEC
49*a58d3d2aSXin Li-forcemono           : force mono encoding, even for stereo input
50*a58d3d2aSXin Li-dtx                 : enable SILK DTX
51*a58d3d2aSXin Li-loss <perc>         : simulate packet loss, in percent (0-100); default: 0
52*a58d3d2aSXin Li
53*a58d3d2aSXin Liinput and output are little endian signed 16-bit PCM files or opus bitstreams
54*a58d3d2aSXin Liwith simple opus_demo proprietary framing.
55