diff --git a/Makefile.draft b/Makefile.draft index c2d2e7437189f3a8f3f321679e65500952c6a536..5d18111184ee95cf643e3e8f5d49729e8881cbb1 100644 --- a/Makefile.draft +++ b/Makefile.draft @@ -1,4 +1,19 @@ -FIXED_POINT=1 +#################### COMPILE OPTIONS ####################### + +#Uncomment this for fixed-point build +#FIXED_POINT=1 + +#If you have a C99 compiler, you don't need this +CFLAGS += -Drestrict= + +#It is strongly recommended to uncomment one of these +#VAR_ARRAYS: Use C99 variable-length arrays for stack allocation +#USE_ALLOCA: Use alloca() for stack allocation +#If none is defined, then the fallback is a non-threadsafe global array +#CFLAGS += -DUSE_ALLOCA +#CFLAGS += -DVAR_ARRAYS + +###################### END OF OPTIONS ###################### include silk_sources.mk include celt_sources.mk @@ -21,9 +36,9 @@ ldflags-from-ldlibdirs = $(addprefix -L,$(1)) ldlibs-from-libs = $(addprefix -l,$(1)) WARNINGS = -Wall -W -Wstrict-prototypes -Wextra -Wcast-align -Wnested-externs -Wshadow -Wno-parentheses -Wno-unused-parameter -Wno-sign-compare -CFLAGS += -O2 -g $(WARNINGS) -DOPUS_BUILD -Drestrict= +CFLAGS += -O2 -g $(WARNINGS) -DOPUS_BUILD ifdef FIXED_POINT -CFLAGS += -DFIXED_POINT=1 +CFLAGS += -DFIXED_POINT=1 -DDISABLE_FLOAT_API endif CFLAGS += $(call cppflags-from-defines,$(CDEFINES)) diff --git a/README.draft b/README.draft new file mode 100644 index 0000000000000000000000000000000000000000..9e1b53e3db117c3871c2062baa32ccc399109ebb --- /dev/null +++ b/README.draft @@ -0,0 +1,43 @@ +To build this source code, simply type: + +% make + +If this does not work, or to change the default configuration (e.g. compile for +a fixed-point architecture), simply edit the options in the Makefile + +To build from the git repository instead of using this draft, the following +steps are necessary + +1) Clone the repository: + +% git clone git://git.xiph.org/users/jm/ietfcodec.git +% cd ietfcodec + +2) Get the celt and silk submodules: + +% git submodule update --init + +3) Compile + +% ./autogen.sh +% ./configure --disable-shared +% make + + +Once you have compiled the codec, there will be a test_opus executable in +the src/ directory. This can be in the following way: + +% ./test_opus <mode (0/1/2)> <sampling rate (Hz)> <channels> <bits per second> [options] <input> <output> + +mode: 0 for audo, 1 for voice, 2 for audio: +options: +-cbr : enable constant bitrate; default: VBR +-bandwidth <NB|MB|WB|SWB|FB> : audio bandwidth (from narrowband to fullband); default: sampling rate +-framesize <2.5|5|10|20|40|60> : frame size in ms; default: 20 +-max_payload <bytes> : maximum payload size in bytes, default: 1024 +-complexity <comp> : complexity, 0 (lowest) ... 10 (highest); default: 10 +-inbandfec : enable SILK inband FEC +-dtx : enable SILK DTX +-loss <perc> : simulate packet loss, in percent (0-100); default: 0 + +input and output are 16-bit PCM files (machine endian) diff --git a/doc/build_draft.sh b/doc/build_draft.sh index 52212e4409d85932ecc8217b537f32e294aca4a8..0fcd4d995913bc89f48bac855de5a449424ff4e5 100755 --- a/doc/build_draft.sh +++ b/doc/build_draft.sh @@ -3,7 +3,6 @@ echo packaging source code rm -rf opus_source cat opus_sources.mk celt_sources.mk silk_sources.mk opus_headers.txt celt_headers.txt silk_headers.txt | grep '\.[ch]' | sed -e 's/^.*=//' -e 's/\\//' > all_files.txt -cat opus_extra.txt >> all_files.txt tar czf tmp_draft.tar.gz `cat all_files.txt` mkdir opus_source @@ -13,6 +12,8 @@ cp ../Makefile.draft Makefile cp ../opus_sources.mk . cp ../celt_sources.mk . cp ../silk_sources.mk . +cp ../README.draft README +cp ../COPYING COPYING cd .. tar czf opus_source.tar.gz opus_source diff --git a/opus_extra.txt b/opus_extra.txt deleted file mode 100644 index 1f562b303c0b450f725e7ab42dc86351b533b82e..0000000000000000000000000000000000000000 --- a/opus_extra.txt +++ /dev/null @@ -1,2 +0,0 @@ -README -COPYING