pax_global_header00006660000000000000000000000064126452767410014530gustar00rootroot0000000000000052 comment=6ec80674e2a4d6c4db1bc41201a446026ac392ff opus-1.1.2/000077500000000000000000000000001264527674100125175ustar00rootroot00000000000000opus-1.1.2/AUTHORS000066400000000000000000000003571264527674100135740ustar00rootroot00000000000000Jean-Marc Valin (jmvalin@jmvalin.ca) Koen Vos (koenvos74@gmail.com) Timothy Terriberry (tterribe@xiph.org) Karsten Vandborg Sorensen (karsten.vandborg.sorensen@skype.net) Soren Skak Jensen (ssjensen@gn.com) Gregory Maxwell (greg@xiph.org) opus-1.1.2/COPYING000066400000000000000000000036101264527674100135520ustar00rootroot00000000000000Copyright 2001-2011 Xiph.Org, Skype Limited, Octasic, Jean-Marc Valin, Timothy B. Terriberry, CSIRO, Gregory Maxwell, Mark Borgerding, Erik de Castro Lopo Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - 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. - Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific 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 OWNER 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. Opus is subject to the royalty-free patent licenses which are specified at: Xiph.Org Foundation: https://datatracker.ietf.org/ipr/1524/ Microsoft Corporation: https://datatracker.ietf.org/ipr/1914/ Broadcom Corporation: https://datatracker.ietf.org/ipr/1526/ opus-1.1.2/ChangeLog000066400000000000000000000000001264527674100142570ustar00rootroot00000000000000opus-1.1.2/LICENSE_PLEASE_READ.txt000066400000000000000000000012771264527674100161750ustar00rootroot00000000000000Contributions to the collaboration shall not be considered confidential. Each contributor represents and warrants that it has the right and authority to license copyright in its contributions to the collaboration. Each contributor agrees to license the copyright in the contributions under the Modified (2-clause or 3-clause) BSD License or the Clear BSD License. Please see the IPR statements submitted to the IETF for the complete patent licensing details: Xiph.Org Foundation: https://datatracker.ietf.org/ipr/1524/ Microsoft Corporation: https://datatracker.ietf.org/ipr/1914/ Skype Limited: https://datatracker.ietf.org/ipr/1602/ Broadcom Corporation: https://datatracker.ietf.org/ipr/1526/ opus-1.1.2/Makefile.am000066400000000000000000000241161264527674100145570ustar00rootroot00000000000000# Provide the full test output for failed tests when using the parallel # test suite (which is enabled by default with automake 1.13+). export VERBOSE = yes AUTOMAKE_OPTIONS = subdir-objects ACLOCAL_AMFLAGS = -I m4 lib_LTLIBRARIES = libopus.la DIST_SUBDIRS = doc AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/celt -I$(top_srcdir)/silk \ -I$(top_srcdir)/silk/float -I$(top_srcdir)/silk/fixed $(NE10_CFLAGS) include celt_sources.mk include silk_sources.mk include opus_sources.mk if FIXED_POINT SILK_SOURCES += $(SILK_SOURCES_FIXED) if HAVE_SSE4_1 SILK_SOURCES += $(SILK_SOURCES_SSE4_1) $(SILK_SOURCES_FIXED_SSE4_1) endif else SILK_SOURCES += $(SILK_SOURCES_FLOAT) if HAVE_SSE4_1 SILK_SOURCES += $(SILK_SOURCES_SSE4_1) endif endif if DISABLE_FLOAT_API else OPUS_SOURCES += $(OPUS_SOURCES_FLOAT) endif if HAVE_SSE CELT_SOURCES += $(CELT_SOURCES_SSE) endif if HAVE_SSE2 CELT_SOURCES += $(CELT_SOURCES_SSE2) endif if HAVE_SSE4_1 CELT_SOURCES += $(CELT_SOURCES_SSE4_1) endif if CPU_ARM CELT_SOURCES += $(CELT_SOURCES_ARM) SILK_SOURCES += $(SILK_SOURCES_ARM) if OPUS_ARM_NEON_INTR CELT_SOURCES += $(CELT_SOURCES_ARM_NEON_INTR) endif if HAVE_ARM_NE10 CELT_SOURCES += $(CELT_SOURCES_ARM_NE10) endif if OPUS_ARM_EXTERNAL_ASM noinst_LTLIBRARIES = libarmasm.la libarmasm_la_SOURCES = $(CELT_SOURCES_ARM_ASM:.s=-gnu.S) BUILT_SOURCES = $(CELT_SOURCES_ARM_ASM:.s=-gnu.S) \ $(CELT_AM_SOURCES_ARM_ASM:.s.in=.s) \ $(CELT_AM_SOURCES_ARM_ASM:.s.in=-gnu.S) endif endif CLEANFILES = $(CELT_SOURCES_ARM_ASM:.s=-gnu.S) \ $(CELT_AM_SOURCES_ARM_ASM:.s.in=-gnu.S) include celt_headers.mk include silk_headers.mk include opus_headers.mk libopus_la_SOURCES = $(CELT_SOURCES) $(SILK_SOURCES) $(OPUS_SOURCES) libopus_la_LDFLAGS = -no-undefined -version-info @OPUS_LT_CURRENT@:@OPUS_LT_REVISION@:@OPUS_LT_AGE@ libopus_la_LIBADD = $(NE10_LIBS) $(LIBM) if OPUS_ARM_EXTERNAL_ASM libopus_la_LIBADD += libarmasm.la endif pkginclude_HEADERS = include/opus.h include/opus_multistream.h include/opus_types.h include/opus_defines.h noinst_HEADERS = $(OPUS_HEAD) $(SILK_HEAD) $(CELT_HEAD) if EXTRA_PROGRAMS noinst_PROGRAMS = opus_demo repacketizer_demo opus_compare tests/test_opus_api tests/test_opus_encode tests/test_opus_decode tests/test_opus_padding celt/tests/test_unit_cwrs32 celt/tests/test_unit_dft celt/tests/test_unit_entropy celt/tests/test_unit_laplace celt/tests/test_unit_mathops celt/tests/test_unit_mdct celt/tests/test_unit_rotation celt/tests/test_unit_types TESTS = celt/tests/test_unit_types celt/tests/test_unit_mathops celt/tests/test_unit_entropy celt/tests/test_unit_laplace celt/tests/test_unit_dft celt/tests/test_unit_mdct celt/tests/test_unit_rotation celt/tests/test_unit_cwrs32 tests/test_opus_api tests/test_opus_decode tests/test_opus_encode tests/test_opus_padding opus_demo_SOURCES = src/opus_demo.c opus_demo_LDADD = libopus.la $(NE10_LIBS) $(LIBM) repacketizer_demo_SOURCES = src/repacketizer_demo.c repacketizer_demo_LDADD = libopus.la $(NE10_LIBS) $(LIBM) opus_compare_SOURCES = src/opus_compare.c opus_compare_LDADD = $(LIBM) tests_test_opus_api_SOURCES = tests/test_opus_api.c tests/test_opus_common.h tests_test_opus_api_LDADD = libopus.la $(NE10_LIBS) $(LIBM) tests_test_opus_encode_SOURCES = tests/test_opus_encode.c tests/test_opus_common.h tests_test_opus_encode_LDADD = libopus.la $(NE10_LIBS) $(LIBM) tests_test_opus_decode_SOURCES = tests/test_opus_decode.c tests/test_opus_common.h tests_test_opus_decode_LDADD = libopus.la $(NE10_LIBS) $(LIBM) tests_test_opus_padding_SOURCES = tests/test_opus_padding.c tests/test_opus_common.h tests_test_opus_padding_LDADD = libopus.la $(NE10_LIBS) $(LIBM) celt_tests_test_unit_cwrs32_SOURCES = celt/tests/test_unit_cwrs32.c celt_tests_test_unit_cwrs32_LDADD = $(LIBM) celt_tests_test_unit_dft_SOURCES = celt/tests/test_unit_dft.c celt_tests_test_unit_dft_LDADD = $(NE10_LIBS) $(LIBM) if OPUS_ARM_EXTERNAL_ASM celt_tests_test_unit_dft_LDADD += libarmasm.la endif celt_tests_test_unit_entropy_SOURCES = celt/tests/test_unit_entropy.c celt_tests_test_unit_entropy_LDADD = $(LIBM) celt_tests_test_unit_laplace_SOURCES = celt/tests/test_unit_laplace.c celt_tests_test_unit_laplace_LDADD = $(LIBM) celt_tests_test_unit_mathops_SOURCES = celt/tests/test_unit_mathops.c celt_tests_test_unit_mathops_LDADD = $(NE10_LIBS) $(LIBM) if OPUS_ARM_EXTERNAL_ASM celt_tests_test_unit_mathops_LDADD += libarmasm.la endif celt_tests_test_unit_mdct_SOURCES = celt/tests/test_unit_mdct.c celt_tests_test_unit_mdct_LDADD = $(NE10_LIBS) $(LIBM) if OPUS_ARM_EXTERNAL_ASM celt_tests_test_unit_mdct_LDADD += libarmasm.la endif celt_tests_test_unit_rotation_SOURCES = celt/tests/test_unit_rotation.c celt_tests_test_unit_rotation_LDADD = $(NE10_LIBS) $(LIBM) if OPUS_ARM_EXTERNAL_ASM celt_tests_test_unit_rotation_LDADD += libarmasm.la endif celt_tests_test_unit_types_SOURCES = celt/tests/test_unit_types.c celt_tests_test_unit_types_LDADD = $(LIBM) endif if CUSTOM_MODES pkginclude_HEADERS += include/opus_custom.h if EXTRA_PROGRAMS noinst_PROGRAMS += opus_custom_demo opus_custom_demo_SOURCES = celt/opus_custom_demo.c opus_custom_demo_LDADD = libopus.la $(LIBM) endif endif EXTRA_DIST = version.mk \ opus.pc.in \ opus-uninstalled.pc.in \ opus.m4 \ Makefile.mips \ Makefile.unix \ tests/run_vectors.sh \ celt/arm/arm2gnu.pl \ celt/arm/celt_pitch_xcorr_arm.s \ win32/VS2010/silk_float.vcxproj \ win32/VS2010/celt.vcxproj.filters \ win32/VS2010/opus.vcxproj \ win32/VS2010/silk_common.vcxproj.filters \ win32/VS2010/silk_float.vcxproj.filters \ win32/VS2010/test_opus_encode.vcxproj.filters \ win32/VS2010/silk_common.vcxproj \ win32/VS2010/test_opus_encode.vcxproj \ win32/VS2010/opus_demo.vcxproj \ win32/VS2010/test_opus_api.vcxproj.filters \ win32/VS2010/test_opus_api.vcxproj \ win32/VS2010/test_opus_decode.vcxproj.filters \ win32/VS2010/silk_fixed.vcxproj.filters \ win32/VS2010/opus_demo.vcxproj.filters \ win32/VS2010/silk_fixed.vcxproj \ win32/VS2010/opus.vcxproj.filters \ win32/VS2010/test_opus_decode.vcxproj \ win32/VS2010/celt.vcxproj \ win32/VS2010/opus.sln \ win32/genversion.bat \ win32/config.h pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = opus.pc m4datadir = $(datadir)/aclocal m4data_DATA = opus.m4 # Targets to build and install just the library without the docs opus check-opus install-opus: export NO_DOXYGEN = 1 opus: all check-opus: check install-opus: install # Or just the docs docs: ( cd doc && $(MAKE) $(AM_MAKEFLAGS) ) install-docs: ( cd doc && $(MAKE) $(AM_MAKEFLAGS) install ) # Or everything (by default) all-local: @[ -n "$(NO_DOXYGEN)" ] || ( cd doc && $(MAKE) $(AM_MAKEFLAGS) ) install-data-local: @[ -n "$(NO_DOXYGEN)" ] || ( cd doc && $(MAKE) $(AM_MAKEFLAGS) install ) clean-local: -( cd doc && $(MAKE) $(AM_MAKEFLAGS) clean ) uninstall-local: ( cd doc && $(MAKE) $(AM_MAKEFLAGS) uninstall ) # We check this every time make is run, with configure.ac being touched to # trigger an update of the build system files if update_version changes the # current PACKAGE_VERSION (or if package_version was modified manually by a # user with either AUTO_UPDATE=no or no update_version script present - the # latter being the normal case for tarball releases). # # We can't just add the package_version file to CONFIGURE_DEPENDENCIES since # simply running autoconf will not actually regenerate configure for us when # the content of that file changes (due to autoconf dependency checking not # knowing about that without us creating yet another file for it to include). # # The MAKECMDGOALS check is a gnu-make'ism, but will degrade 'gracefully' for # makes that don't support it. The only loss of functionality is not forcing # an update of package_version for `make dist` if AUTO_UPDATE=no, but that is # unlikely to be a real problem for any real user. $(top_srcdir)/configure.ac: force @case "$(MAKECMDGOALS)" in \ dist-hook) exit 0 ;; \ dist-* | dist | distcheck | distclean) _arg=release ;; \ esac; \ if ! $(top_srcdir)/update_version $$_arg 2> /dev/null; then \ if [ ! -e $(top_srcdir)/package_version ]; then \ echo 'PACKAGE_VERSION="unknown"' > $(top_srcdir)/package_version; \ fi; \ . $(top_srcdir)/package_version || exit 1; \ [ "$(PACKAGE_VERSION)" != "$$PACKAGE_VERSION" ] || exit 0; \ fi; \ touch $@ force: # Create a minimal package_version file when make dist is run. dist-hook: echo 'PACKAGE_VERSION="$(PACKAGE_VERSION)"' > $(top_distdir)/package_version .PHONY: opus check-opus install-opus docs install-docs # automake doesn't do dependency tracking for asm files, that I can tell $(CELT_SOURCES_ARM_ASM:%.s=%-gnu.S): celt/arm/armopts-gnu.S $(CELT_SOURCES_ARM_ASM:%.s=%-gnu.S): $(top_srcdir)/celt/arm/arm2gnu.pl # convert ARM asm to GNU as format %-gnu.S: $(top_srcdir)/%.s $(top_srcdir)/celt/arm/arm2gnu.pl @ARM2GNU_PARAMS@ < $< > $@ # For autoconf-modified sources (e.g., armopts.s) %-gnu.S: %.s $(top_srcdir)/celt/arm/arm2gnu.pl @ARM2GNU_PARAMS@ < $< > $@ OPT_UNIT_TEST_OBJ = $(celt_tests_test_unit_mathops_SOURCES:.c=.o) \ $(celt_tests_test_unit_rotation_SOURCES:.c=.o) \ $(celt_tests_test_unit_mdct_SOURCES:.c=.o) \ $(celt_tests_test_unit_dft_SOURCES:.c=.o) if HAVE_SSE SSE_OBJ = $(CELT_SOURCES_SSE:.c=.lo) $(SSE_OBJ) $(OPT_UNIT_TEST_OBJ): CFLAGS += $(OPUS_X86_SSE_CFLAGS) endif if HAVE_SSE2 SSE2_OBJ = $(CELT_SOURCES_SSE2:.c=.lo) $(SSE2_OBJ) $(OPT_UNIT_TEST_OBJ): CFLAGS += $(OPUS_X86_SSE2_CFLAGS) endif if HAVE_SSE4_1 SSE4_1_OBJ = $(CELT_SOURCES_SSE4_1:.c=.lo) \ $(SILK_SOURCES_SSE4_1:.c=.lo) \ $(SILK_SOURCES_FIXED_SSE4_1:.c=.lo) $(SSE4_1_OBJ) $(OPT_UNIT_TEST_OBJ): CFLAGS += $(OPUS_X86_SSE4_1_CFLAGS) endif if OPUS_ARM_NEON_INTR CELT_ARM_NEON_INTR_OBJ = $(CELT_SOURCES_ARM_NEON_INTR:.c=.lo) $(CELT_ARM_NEON_INTR_OBJ) $(OPT_UNIT_TEST_OBJ): CFLAGS += \ $(OPUS_ARM_NEON_INTR_CFLAGS) $(NE10_CFLAGS) endif opus-1.1.2/Makefile.in000066400000000000000000004147171264527674100146020ustar00rootroot00000000000000# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ DIST_COMMON = $(srcdir)/celt_sources.mk $(srcdir)/silk_sources.mk \ $(srcdir)/opus_sources.mk $(srcdir)/celt_headers.mk \ $(srcdir)/silk_headers.mk $(srcdir)/opus_headers.mk INSTALL \ NEWS README AUTHORS ChangeLog $(srcdir)/Makefile.in \ $(srcdir)/Makefile.am $(top_srcdir)/configure \ $(am__configure_deps) $(srcdir)/config.h.in \ $(srcdir)/opus.pc.in $(srcdir)/opus-uninstalled.pc.in \ $(top_srcdir)/celt/arm/armopts.s.in depcomp $(noinst_HEADERS) \ $(am__pkginclude_HEADERS_DIST) test-driver COPYING compile \ config.guess config.sub install-sh missing ltmain.sh @FIXED_POINT_TRUE@am__append_1 = $(SILK_SOURCES_FIXED) @FIXED_POINT_TRUE@@HAVE_SSE4_1_TRUE@am__append_2 = $(SILK_SOURCES_SSE4_1) $(SILK_SOURCES_FIXED_SSE4_1) @FIXED_POINT_FALSE@am__append_3 = $(SILK_SOURCES_FLOAT) @FIXED_POINT_FALSE@@HAVE_SSE4_1_TRUE@am__append_4 = $(SILK_SOURCES_SSE4_1) @DISABLE_FLOAT_API_FALSE@am__append_5 = $(OPUS_SOURCES_FLOAT) @HAVE_SSE_TRUE@am__append_6 = $(CELT_SOURCES_SSE) @HAVE_SSE2_TRUE@am__append_7 = $(CELT_SOURCES_SSE2) @HAVE_SSE4_1_TRUE@am__append_8 = $(CELT_SOURCES_SSE4_1) @CPU_ARM_TRUE@am__append_9 = $(CELT_SOURCES_ARM) @CPU_ARM_TRUE@am__append_10 = $(SILK_SOURCES_ARM) @CPU_ARM_TRUE@@OPUS_ARM_NEON_INTR_TRUE@am__append_11 = $(CELT_SOURCES_ARM_NEON_INTR) @CPU_ARM_TRUE@@HAVE_ARM_NE10_TRUE@am__append_12 = $(CELT_SOURCES_ARM_NE10) @OPUS_ARM_EXTERNAL_ASM_TRUE@am__append_13 = libarmasm.la @EXTRA_PROGRAMS_TRUE@noinst_PROGRAMS = opus_demo$(EXEEXT) \ @EXTRA_PROGRAMS_TRUE@ repacketizer_demo$(EXEEXT) \ @EXTRA_PROGRAMS_TRUE@ opus_compare$(EXEEXT) \ @EXTRA_PROGRAMS_TRUE@ tests/test_opus_api$(EXEEXT) \ @EXTRA_PROGRAMS_TRUE@ tests/test_opus_encode$(EXEEXT) \ @EXTRA_PROGRAMS_TRUE@ tests/test_opus_decode$(EXEEXT) \ @EXTRA_PROGRAMS_TRUE@ tests/test_opus_padding$(EXEEXT) \ @EXTRA_PROGRAMS_TRUE@ celt/tests/test_unit_cwrs32$(EXEEXT) \ @EXTRA_PROGRAMS_TRUE@ celt/tests/test_unit_dft$(EXEEXT) \ @EXTRA_PROGRAMS_TRUE@ celt/tests/test_unit_entropy$(EXEEXT) \ @EXTRA_PROGRAMS_TRUE@ celt/tests/test_unit_laplace$(EXEEXT) \ @EXTRA_PROGRAMS_TRUE@ celt/tests/test_unit_mathops$(EXEEXT) \ @EXTRA_PROGRAMS_TRUE@ celt/tests/test_unit_mdct$(EXEEXT) \ @EXTRA_PROGRAMS_TRUE@ celt/tests/test_unit_rotation$(EXEEXT) \ @EXTRA_PROGRAMS_TRUE@ celt/tests/test_unit_types$(EXEEXT) \ @EXTRA_PROGRAMS_TRUE@ $(am__EXEEXT_1) @EXTRA_PROGRAMS_TRUE@TESTS = celt/tests/test_unit_types$(EXEEXT) \ @EXTRA_PROGRAMS_TRUE@ celt/tests/test_unit_mathops$(EXEEXT) \ @EXTRA_PROGRAMS_TRUE@ celt/tests/test_unit_entropy$(EXEEXT) \ @EXTRA_PROGRAMS_TRUE@ celt/tests/test_unit_laplace$(EXEEXT) \ @EXTRA_PROGRAMS_TRUE@ celt/tests/test_unit_dft$(EXEEXT) \ @EXTRA_PROGRAMS_TRUE@ celt/tests/test_unit_mdct$(EXEEXT) \ @EXTRA_PROGRAMS_TRUE@ celt/tests/test_unit_rotation$(EXEEXT) \ @EXTRA_PROGRAMS_TRUE@ celt/tests/test_unit_cwrs32$(EXEEXT) \ @EXTRA_PROGRAMS_TRUE@ tests/test_opus_api$(EXEEXT) \ @EXTRA_PROGRAMS_TRUE@ tests/test_opus_decode$(EXEEXT) \ @EXTRA_PROGRAMS_TRUE@ tests/test_opus_encode$(EXEEXT) \ @EXTRA_PROGRAMS_TRUE@ tests/test_opus_padding$(EXEEXT) @EXTRA_PROGRAMS_TRUE@@OPUS_ARM_EXTERNAL_ASM_TRUE@am__append_14 = libarmasm.la @EXTRA_PROGRAMS_TRUE@@OPUS_ARM_EXTERNAL_ASM_TRUE@am__append_15 = libarmasm.la @EXTRA_PROGRAMS_TRUE@@OPUS_ARM_EXTERNAL_ASM_TRUE@am__append_16 = libarmasm.la @EXTRA_PROGRAMS_TRUE@@OPUS_ARM_EXTERNAL_ASM_TRUE@am__append_17 = libarmasm.la @CUSTOM_MODES_TRUE@am__append_18 = include/opus_custom.h @CUSTOM_MODES_TRUE@@EXTRA_PROGRAMS_TRUE@am__append_19 = opus_custom_demo subdir = . SUBDIRS = ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/as-gcc-inline-assembly.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/opus-intrinsics.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = opus.pc opus-uninstalled.pc celt/arm/armopts.s CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(m4datadir)" \ "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(pkgincludedir)" LTLIBRARIES = $(lib_LTLIBRARIES) $(noinst_LTLIBRARIES) libarmasm_la_LIBADD = am__libarmasm_la_SOURCES_DIST = celt/arm/celt_pitch_xcorr_arm-gnu.S am__dirstamp = $(am__leading_dot)dirstamp am__objects_1 = celt/arm/celt_pitch_xcorr_arm-gnu.lo @CPU_ARM_TRUE@@OPUS_ARM_EXTERNAL_ASM_TRUE@am_libarmasm_la_OBJECTS = \ @CPU_ARM_TRUE@@OPUS_ARM_EXTERNAL_ASM_TRUE@ $(am__objects_1) libarmasm_la_OBJECTS = $(am_libarmasm_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = @CPU_ARM_TRUE@@OPUS_ARM_EXTERNAL_ASM_TRUE@am_libarmasm_la_rpath = am__DEPENDENCIES_1 = libopus_la_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__append_13) am__libopus_la_SOURCES_DIST = celt/bands.c celt/celt.c \ celt/celt_encoder.c celt/celt_decoder.c celt/cwrs.c \ celt/entcode.c celt/entdec.c celt/entenc.c celt/kiss_fft.c \ celt/laplace.c celt/mathops.c celt/mdct.c celt/modes.c \ celt/pitch.c celt/celt_lpc.c celt/quant_bands.c celt/rate.c \ celt/vq.c celt/x86/x86cpu.c celt/x86/x86_celt_map.c \ celt/x86/pitch_sse.c celt/x86/pitch_sse2.c \ celt/x86/celt_lpc_sse.c celt/x86/pitch_sse4_1.c \ celt/arm/armcpu.c celt/arm/arm_celt_map.c \ celt/arm/celt_neon_intr.c celt/arm/celt_ne10_fft.c \ celt/arm/celt_ne10_mdct.c silk/CNG.c silk/code_signs.c \ silk/init_decoder.c silk/decode_core.c silk/decode_frame.c \ silk/decode_parameters.c silk/decode_indices.c \ silk/decode_pulses.c silk/decoder_set_fs.c silk/dec_API.c \ silk/enc_API.c silk/encode_indices.c silk/encode_pulses.c \ silk/gain_quant.c silk/interpolate.c silk/LP_variable_cutoff.c \ silk/NLSF_decode.c silk/NSQ.c silk/NSQ_del_dec.c silk/PLC.c \ silk/shell_coder.c silk/tables_gain.c silk/tables_LTP.c \ silk/tables_NLSF_CB_NB_MB.c silk/tables_NLSF_CB_WB.c \ silk/tables_other.c silk/tables_pitch_lag.c \ silk/tables_pulses_per_block.c silk/VAD.c \ silk/control_audio_bandwidth.c silk/quant_LTP_gains.c \ silk/VQ_WMat_EC.c silk/HP_variable_cutoff.c silk/NLSF_encode.c \ silk/NLSF_VQ.c silk/NLSF_unpack.c silk/NLSF_del_dec_quant.c \ silk/process_NLSFs.c silk/stereo_LR_to_MS.c \ silk/stereo_MS_to_LR.c silk/check_control_input.c \ silk/control_SNR.c silk/init_encoder.c silk/control_codec.c \ silk/A2NLSF.c silk/ana_filt_bank_1.c silk/biquad_alt.c \ silk/bwexpander_32.c silk/bwexpander.c silk/debug.c \ silk/decode_pitch.c silk/inner_prod_aligned.c silk/lin2log.c \ silk/log2lin.c silk/LPC_analysis_filter.c \ silk/LPC_inv_pred_gain.c silk/table_LSF_cos.c silk/NLSF2A.c \ silk/NLSF_stabilize.c silk/NLSF_VQ_weights_laroia.c \ silk/pitch_est_tables.c silk/resampler.c \ silk/resampler_down2_3.c silk/resampler_down2.c \ silk/resampler_private_AR2.c silk/resampler_private_down_FIR.c \ silk/resampler_private_IIR_FIR.c \ silk/resampler_private_up2_HQ.c silk/resampler_rom.c \ silk/sigm_Q15.c silk/sort.c silk/sum_sqr_shift.c \ silk/stereo_decode_pred.c silk/stereo_encode_pred.c \ silk/stereo_find_predictor.c silk/stereo_quant_pred.c \ silk/fixed/LTP_analysis_filter_FIX.c \ silk/fixed/LTP_scale_ctrl_FIX.c silk/fixed/corrMatrix_FIX.c \ silk/fixed/encode_frame_FIX.c silk/fixed/find_LPC_FIX.c \ silk/fixed/find_LTP_FIX.c silk/fixed/find_pitch_lags_FIX.c \ silk/fixed/find_pred_coefs_FIX.c \ silk/fixed/noise_shape_analysis_FIX.c \ silk/fixed/prefilter_FIX.c silk/fixed/process_gains_FIX.c \ silk/fixed/regularize_correlations_FIX.c \ silk/fixed/residual_energy16_FIX.c \ silk/fixed/residual_energy_FIX.c silk/fixed/solve_LS_FIX.c \ silk/fixed/warped_autocorrelation_FIX.c \ silk/fixed/apply_sine_window_FIX.c silk/fixed/autocorr_FIX.c \ silk/fixed/burg_modified_FIX.c silk/fixed/k2a_FIX.c \ silk/fixed/k2a_Q16_FIX.c silk/fixed/pitch_analysis_core_FIX.c \ silk/fixed/vector_ops_FIX.c silk/fixed/schur64_FIX.c \ silk/fixed/schur_FIX.c silk/x86/NSQ_sse.c \ silk/x86/NSQ_del_dec_sse.c silk/x86/x86_silk_map.c \ silk/x86/VAD_sse.c silk/x86/VQ_WMat_EC_sse.c \ silk/fixed/x86/vector_ops_FIX_sse.c \ silk/fixed/x86/burg_modified_FIX_sse.c \ silk/fixed/x86/prefilter_FIX_sse.c \ silk/float/apply_sine_window_FLP.c silk/float/corrMatrix_FLP.c \ silk/float/encode_frame_FLP.c silk/float/find_LPC_FLP.c \ silk/float/find_LTP_FLP.c silk/float/find_pitch_lags_FLP.c \ silk/float/find_pred_coefs_FLP.c \ silk/float/LPC_analysis_filter_FLP.c \ silk/float/LTP_analysis_filter_FLP.c \ silk/float/LTP_scale_ctrl_FLP.c \ silk/float/noise_shape_analysis_FLP.c \ silk/float/prefilter_FLP.c silk/float/process_gains_FLP.c \ silk/float/regularize_correlations_FLP.c \ silk/float/residual_energy_FLP.c silk/float/solve_LS_FLP.c \ silk/float/warped_autocorrelation_FLP.c \ silk/float/wrappers_FLP.c silk/float/autocorrelation_FLP.c \ silk/float/burg_modified_FLP.c silk/float/bwexpander_FLP.c \ silk/float/energy_FLP.c silk/float/inner_product_FLP.c \ silk/float/k2a_FLP.c silk/float/levinsondurbin_FLP.c \ silk/float/LPC_inv_pred_gain_FLP.c \ silk/float/pitch_analysis_core_FLP.c \ silk/float/scale_copy_vector_FLP.c \ silk/float/scale_vector_FLP.c silk/float/schur_FLP.c \ silk/float/sort_FLP.c src/opus.c src/opus_decoder.c \ src/opus_encoder.c src/opus_multistream.c \ src/opus_multistream_encoder.c src/opus_multistream_decoder.c \ src/repacketizer.c src/analysis.c src/mlp.c src/mlp_data.c am__objects_2 = celt/x86/x86cpu.lo celt/x86/x86_celt_map.lo \ celt/x86/pitch_sse.lo @HAVE_SSE_TRUE@am__objects_3 = $(am__objects_2) am__objects_4 = celt/x86/pitch_sse2.lo @HAVE_SSE2_TRUE@am__objects_5 = $(am__objects_4) am__objects_6 = celt/x86/celt_lpc_sse.lo celt/x86/pitch_sse4_1.lo @HAVE_SSE4_1_TRUE@am__objects_7 = $(am__objects_6) am__objects_8 = celt/arm/armcpu.lo celt/arm/arm_celt_map.lo @CPU_ARM_TRUE@am__objects_9 = $(am__objects_8) am__objects_10 = celt/arm/celt_neon_intr.lo @CPU_ARM_TRUE@@OPUS_ARM_NEON_INTR_TRUE@am__objects_11 = \ @CPU_ARM_TRUE@@OPUS_ARM_NEON_INTR_TRUE@ $(am__objects_10) am__objects_12 = celt/arm/celt_ne10_fft.lo celt/arm/celt_ne10_mdct.lo @CPU_ARM_TRUE@@HAVE_ARM_NE10_TRUE@am__objects_13 = $(am__objects_12) am__objects_14 = celt/bands.lo celt/celt.lo celt/celt_encoder.lo \ celt/celt_decoder.lo celt/cwrs.lo celt/entcode.lo \ celt/entdec.lo celt/entenc.lo celt/kiss_fft.lo celt/laplace.lo \ celt/mathops.lo celt/mdct.lo celt/modes.lo celt/pitch.lo \ celt/celt_lpc.lo celt/quant_bands.lo celt/rate.lo celt/vq.lo \ $(am__objects_3) $(am__objects_5) $(am__objects_7) \ $(am__objects_9) $(am__objects_11) $(am__objects_13) am__objects_15 = silk/fixed/LTP_analysis_filter_FIX.lo \ silk/fixed/LTP_scale_ctrl_FIX.lo silk/fixed/corrMatrix_FIX.lo \ silk/fixed/encode_frame_FIX.lo silk/fixed/find_LPC_FIX.lo \ silk/fixed/find_LTP_FIX.lo silk/fixed/find_pitch_lags_FIX.lo \ silk/fixed/find_pred_coefs_FIX.lo \ silk/fixed/noise_shape_analysis_FIX.lo \ silk/fixed/prefilter_FIX.lo silk/fixed/process_gains_FIX.lo \ silk/fixed/regularize_correlations_FIX.lo \ silk/fixed/residual_energy16_FIX.lo \ silk/fixed/residual_energy_FIX.lo silk/fixed/solve_LS_FIX.lo \ silk/fixed/warped_autocorrelation_FIX.lo \ silk/fixed/apply_sine_window_FIX.lo silk/fixed/autocorr_FIX.lo \ silk/fixed/burg_modified_FIX.lo silk/fixed/k2a_FIX.lo \ silk/fixed/k2a_Q16_FIX.lo \ silk/fixed/pitch_analysis_core_FIX.lo \ silk/fixed/vector_ops_FIX.lo silk/fixed/schur64_FIX.lo \ silk/fixed/schur_FIX.lo @FIXED_POINT_TRUE@am__objects_16 = $(am__objects_15) am__objects_17 = silk/x86/NSQ_sse.lo silk/x86/NSQ_del_dec_sse.lo \ silk/x86/x86_silk_map.lo silk/x86/VAD_sse.lo \ silk/x86/VQ_WMat_EC_sse.lo am__objects_18 = silk/fixed/x86/vector_ops_FIX_sse.lo \ silk/fixed/x86/burg_modified_FIX_sse.lo \ silk/fixed/x86/prefilter_FIX_sse.lo @FIXED_POINT_TRUE@@HAVE_SSE4_1_TRUE@am__objects_19 = \ @FIXED_POINT_TRUE@@HAVE_SSE4_1_TRUE@ $(am__objects_17) \ @FIXED_POINT_TRUE@@HAVE_SSE4_1_TRUE@ $(am__objects_18) am__objects_20 = silk/float/apply_sine_window_FLP.lo \ silk/float/corrMatrix_FLP.lo silk/float/encode_frame_FLP.lo \ silk/float/find_LPC_FLP.lo silk/float/find_LTP_FLP.lo \ silk/float/find_pitch_lags_FLP.lo \ silk/float/find_pred_coefs_FLP.lo \ silk/float/LPC_analysis_filter_FLP.lo \ silk/float/LTP_analysis_filter_FLP.lo \ silk/float/LTP_scale_ctrl_FLP.lo \ silk/float/noise_shape_analysis_FLP.lo \ silk/float/prefilter_FLP.lo silk/float/process_gains_FLP.lo \ silk/float/regularize_correlations_FLP.lo \ silk/float/residual_energy_FLP.lo silk/float/solve_LS_FLP.lo \ silk/float/warped_autocorrelation_FLP.lo \ silk/float/wrappers_FLP.lo silk/float/autocorrelation_FLP.lo \ silk/float/burg_modified_FLP.lo silk/float/bwexpander_FLP.lo \ silk/float/energy_FLP.lo silk/float/inner_product_FLP.lo \ silk/float/k2a_FLP.lo silk/float/levinsondurbin_FLP.lo \ silk/float/LPC_inv_pred_gain_FLP.lo \ silk/float/pitch_analysis_core_FLP.lo \ silk/float/scale_copy_vector_FLP.lo \ silk/float/scale_vector_FLP.lo silk/float/schur_FLP.lo \ silk/float/sort_FLP.lo @FIXED_POINT_FALSE@am__objects_21 = $(am__objects_20) @FIXED_POINT_FALSE@@HAVE_SSE4_1_TRUE@am__objects_22 = \ @FIXED_POINT_FALSE@@HAVE_SSE4_1_TRUE@ $(am__objects_17) am__objects_23 = am__objects_24 = silk/CNG.lo silk/code_signs.lo silk/init_decoder.lo \ silk/decode_core.lo silk/decode_frame.lo \ silk/decode_parameters.lo silk/decode_indices.lo \ silk/decode_pulses.lo silk/decoder_set_fs.lo silk/dec_API.lo \ silk/enc_API.lo silk/encode_indices.lo silk/encode_pulses.lo \ silk/gain_quant.lo silk/interpolate.lo \ silk/LP_variable_cutoff.lo silk/NLSF_decode.lo silk/NSQ.lo \ silk/NSQ_del_dec.lo silk/PLC.lo silk/shell_coder.lo \ silk/tables_gain.lo silk/tables_LTP.lo \ silk/tables_NLSF_CB_NB_MB.lo silk/tables_NLSF_CB_WB.lo \ silk/tables_other.lo silk/tables_pitch_lag.lo \ silk/tables_pulses_per_block.lo silk/VAD.lo \ silk/control_audio_bandwidth.lo silk/quant_LTP_gains.lo \ silk/VQ_WMat_EC.lo silk/HP_variable_cutoff.lo \ silk/NLSF_encode.lo silk/NLSF_VQ.lo silk/NLSF_unpack.lo \ silk/NLSF_del_dec_quant.lo silk/process_NLSFs.lo \ silk/stereo_LR_to_MS.lo silk/stereo_MS_to_LR.lo \ silk/check_control_input.lo silk/control_SNR.lo \ silk/init_encoder.lo silk/control_codec.lo silk/A2NLSF.lo \ silk/ana_filt_bank_1.lo silk/biquad_alt.lo \ silk/bwexpander_32.lo silk/bwexpander.lo silk/debug.lo \ silk/decode_pitch.lo silk/inner_prod_aligned.lo \ silk/lin2log.lo silk/log2lin.lo silk/LPC_analysis_filter.lo \ silk/LPC_inv_pred_gain.lo silk/table_LSF_cos.lo silk/NLSF2A.lo \ silk/NLSF_stabilize.lo silk/NLSF_VQ_weights_laroia.lo \ silk/pitch_est_tables.lo silk/resampler.lo \ silk/resampler_down2_3.lo silk/resampler_down2.lo \ silk/resampler_private_AR2.lo \ silk/resampler_private_down_FIR.lo \ silk/resampler_private_IIR_FIR.lo \ silk/resampler_private_up2_HQ.lo silk/resampler_rom.lo \ silk/sigm_Q15.lo silk/sort.lo silk/sum_sqr_shift.lo \ silk/stereo_decode_pred.lo silk/stereo_encode_pred.lo \ silk/stereo_find_predictor.lo silk/stereo_quant_pred.lo \ $(am__objects_16) $(am__objects_19) $(am__objects_21) \ $(am__objects_22) $(am__objects_23) am__objects_25 = src/analysis.lo src/mlp.lo src/mlp_data.lo @DISABLE_FLOAT_API_FALSE@am__objects_26 = $(am__objects_25) am__objects_27 = src/opus.lo src/opus_decoder.lo src/opus_encoder.lo \ src/opus_multistream.lo src/opus_multistream_encoder.lo \ src/opus_multistream_decoder.lo src/repacketizer.lo \ $(am__objects_26) am_libopus_la_OBJECTS = $(am__objects_14) $(am__objects_24) \ $(am__objects_27) libopus_la_OBJECTS = $(am_libopus_la_OBJECTS) libopus_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(libopus_la_LDFLAGS) $(LDFLAGS) -o $@ @CUSTOM_MODES_TRUE@@EXTRA_PROGRAMS_TRUE@am__EXEEXT_1 = opus_custom_demo$(EXEEXT) PROGRAMS = $(noinst_PROGRAMS) am__celt_tests_test_unit_cwrs32_SOURCES_DIST = \ celt/tests/test_unit_cwrs32.c @EXTRA_PROGRAMS_TRUE@am_celt_tests_test_unit_cwrs32_OBJECTS = \ @EXTRA_PROGRAMS_TRUE@ celt/tests/test_unit_cwrs32.$(OBJEXT) celt_tests_test_unit_cwrs32_OBJECTS = \ $(am_celt_tests_test_unit_cwrs32_OBJECTS) @EXTRA_PROGRAMS_TRUE@celt_tests_test_unit_cwrs32_DEPENDENCIES = \ @EXTRA_PROGRAMS_TRUE@ $(am__DEPENDENCIES_1) am__celt_tests_test_unit_dft_SOURCES_DIST = \ celt/tests/test_unit_dft.c @EXTRA_PROGRAMS_TRUE@am_celt_tests_test_unit_dft_OBJECTS = \ @EXTRA_PROGRAMS_TRUE@ celt/tests/test_unit_dft.$(OBJEXT) celt_tests_test_unit_dft_OBJECTS = \ $(am_celt_tests_test_unit_dft_OBJECTS) @EXTRA_PROGRAMS_TRUE@celt_tests_test_unit_dft_DEPENDENCIES = \ @EXTRA_PROGRAMS_TRUE@ $(am__DEPENDENCIES_1) \ @EXTRA_PROGRAMS_TRUE@ $(am__DEPENDENCIES_1) $(am__append_14) am__celt_tests_test_unit_entropy_SOURCES_DIST = \ celt/tests/test_unit_entropy.c @EXTRA_PROGRAMS_TRUE@am_celt_tests_test_unit_entropy_OBJECTS = \ @EXTRA_PROGRAMS_TRUE@ celt/tests/test_unit_entropy.$(OBJEXT) celt_tests_test_unit_entropy_OBJECTS = \ $(am_celt_tests_test_unit_entropy_OBJECTS) @EXTRA_PROGRAMS_TRUE@celt_tests_test_unit_entropy_DEPENDENCIES = \ @EXTRA_PROGRAMS_TRUE@ $(am__DEPENDENCIES_1) am__celt_tests_test_unit_laplace_SOURCES_DIST = \ celt/tests/test_unit_laplace.c @EXTRA_PROGRAMS_TRUE@am_celt_tests_test_unit_laplace_OBJECTS = \ @EXTRA_PROGRAMS_TRUE@ celt/tests/test_unit_laplace.$(OBJEXT) celt_tests_test_unit_laplace_OBJECTS = \ $(am_celt_tests_test_unit_laplace_OBJECTS) @EXTRA_PROGRAMS_TRUE@celt_tests_test_unit_laplace_DEPENDENCIES = \ @EXTRA_PROGRAMS_TRUE@ $(am__DEPENDENCIES_1) am__celt_tests_test_unit_mathops_SOURCES_DIST = \ celt/tests/test_unit_mathops.c @EXTRA_PROGRAMS_TRUE@am_celt_tests_test_unit_mathops_OBJECTS = \ @EXTRA_PROGRAMS_TRUE@ celt/tests/test_unit_mathops.$(OBJEXT) celt_tests_test_unit_mathops_OBJECTS = \ $(am_celt_tests_test_unit_mathops_OBJECTS) @EXTRA_PROGRAMS_TRUE@celt_tests_test_unit_mathops_DEPENDENCIES = \ @EXTRA_PROGRAMS_TRUE@ $(am__DEPENDENCIES_1) \ @EXTRA_PROGRAMS_TRUE@ $(am__DEPENDENCIES_1) $(am__append_15) am__celt_tests_test_unit_mdct_SOURCES_DIST = \ celt/tests/test_unit_mdct.c @EXTRA_PROGRAMS_TRUE@am_celt_tests_test_unit_mdct_OBJECTS = \ @EXTRA_PROGRAMS_TRUE@ celt/tests/test_unit_mdct.$(OBJEXT) celt_tests_test_unit_mdct_OBJECTS = \ $(am_celt_tests_test_unit_mdct_OBJECTS) @EXTRA_PROGRAMS_TRUE@celt_tests_test_unit_mdct_DEPENDENCIES = \ @EXTRA_PROGRAMS_TRUE@ $(am__DEPENDENCIES_1) \ @EXTRA_PROGRAMS_TRUE@ $(am__DEPENDENCIES_1) $(am__append_16) am__celt_tests_test_unit_rotation_SOURCES_DIST = \ celt/tests/test_unit_rotation.c @EXTRA_PROGRAMS_TRUE@am_celt_tests_test_unit_rotation_OBJECTS = \ @EXTRA_PROGRAMS_TRUE@ celt/tests/test_unit_rotation.$(OBJEXT) celt_tests_test_unit_rotation_OBJECTS = \ $(am_celt_tests_test_unit_rotation_OBJECTS) @EXTRA_PROGRAMS_TRUE@celt_tests_test_unit_rotation_DEPENDENCIES = \ @EXTRA_PROGRAMS_TRUE@ $(am__DEPENDENCIES_1) \ @EXTRA_PROGRAMS_TRUE@ $(am__DEPENDENCIES_1) $(am__append_17) am__celt_tests_test_unit_types_SOURCES_DIST = \ celt/tests/test_unit_types.c @EXTRA_PROGRAMS_TRUE@am_celt_tests_test_unit_types_OBJECTS = \ @EXTRA_PROGRAMS_TRUE@ celt/tests/test_unit_types.$(OBJEXT) celt_tests_test_unit_types_OBJECTS = \ $(am_celt_tests_test_unit_types_OBJECTS) @EXTRA_PROGRAMS_TRUE@celt_tests_test_unit_types_DEPENDENCIES = \ @EXTRA_PROGRAMS_TRUE@ $(am__DEPENDENCIES_1) am__opus_compare_SOURCES_DIST = src/opus_compare.c @EXTRA_PROGRAMS_TRUE@am_opus_compare_OBJECTS = \ @EXTRA_PROGRAMS_TRUE@ src/opus_compare.$(OBJEXT) opus_compare_OBJECTS = $(am_opus_compare_OBJECTS) @EXTRA_PROGRAMS_TRUE@opus_compare_DEPENDENCIES = \ @EXTRA_PROGRAMS_TRUE@ $(am__DEPENDENCIES_1) am__opus_custom_demo_SOURCES_DIST = celt/opus_custom_demo.c @CUSTOM_MODES_TRUE@@EXTRA_PROGRAMS_TRUE@am_opus_custom_demo_OBJECTS = celt/opus_custom_demo.$(OBJEXT) opus_custom_demo_OBJECTS = $(am_opus_custom_demo_OBJECTS) @CUSTOM_MODES_TRUE@@EXTRA_PROGRAMS_TRUE@opus_custom_demo_DEPENDENCIES = \ @CUSTOM_MODES_TRUE@@EXTRA_PROGRAMS_TRUE@ libopus.la \ @CUSTOM_MODES_TRUE@@EXTRA_PROGRAMS_TRUE@ $(am__DEPENDENCIES_1) am__opus_demo_SOURCES_DIST = src/opus_demo.c @EXTRA_PROGRAMS_TRUE@am_opus_demo_OBJECTS = src/opus_demo.$(OBJEXT) opus_demo_OBJECTS = $(am_opus_demo_OBJECTS) @EXTRA_PROGRAMS_TRUE@opus_demo_DEPENDENCIES = libopus.la \ @EXTRA_PROGRAMS_TRUE@ $(am__DEPENDENCIES_1) \ @EXTRA_PROGRAMS_TRUE@ $(am__DEPENDENCIES_1) am__repacketizer_demo_SOURCES_DIST = src/repacketizer_demo.c @EXTRA_PROGRAMS_TRUE@am_repacketizer_demo_OBJECTS = \ @EXTRA_PROGRAMS_TRUE@ src/repacketizer_demo.$(OBJEXT) repacketizer_demo_OBJECTS = $(am_repacketizer_demo_OBJECTS) @EXTRA_PROGRAMS_TRUE@repacketizer_demo_DEPENDENCIES = libopus.la \ @EXTRA_PROGRAMS_TRUE@ $(am__DEPENDENCIES_1) \ @EXTRA_PROGRAMS_TRUE@ $(am__DEPENDENCIES_1) am__tests_test_opus_api_SOURCES_DIST = tests/test_opus_api.c \ tests/test_opus_common.h @EXTRA_PROGRAMS_TRUE@am_tests_test_opus_api_OBJECTS = \ @EXTRA_PROGRAMS_TRUE@ tests/test_opus_api.$(OBJEXT) tests_test_opus_api_OBJECTS = $(am_tests_test_opus_api_OBJECTS) @EXTRA_PROGRAMS_TRUE@tests_test_opus_api_DEPENDENCIES = libopus.la \ @EXTRA_PROGRAMS_TRUE@ $(am__DEPENDENCIES_1) \ @EXTRA_PROGRAMS_TRUE@ $(am__DEPENDENCIES_1) am__tests_test_opus_decode_SOURCES_DIST = tests/test_opus_decode.c \ tests/test_opus_common.h @EXTRA_PROGRAMS_TRUE@am_tests_test_opus_decode_OBJECTS = \ @EXTRA_PROGRAMS_TRUE@ tests/test_opus_decode.$(OBJEXT) tests_test_opus_decode_OBJECTS = $(am_tests_test_opus_decode_OBJECTS) @EXTRA_PROGRAMS_TRUE@tests_test_opus_decode_DEPENDENCIES = libopus.la \ @EXTRA_PROGRAMS_TRUE@ $(am__DEPENDENCIES_1) \ @EXTRA_PROGRAMS_TRUE@ $(am__DEPENDENCIES_1) am__tests_test_opus_encode_SOURCES_DIST = tests/test_opus_encode.c \ tests/test_opus_common.h @EXTRA_PROGRAMS_TRUE@am_tests_test_opus_encode_OBJECTS = \ @EXTRA_PROGRAMS_TRUE@ tests/test_opus_encode.$(OBJEXT) tests_test_opus_encode_OBJECTS = $(am_tests_test_opus_encode_OBJECTS) @EXTRA_PROGRAMS_TRUE@tests_test_opus_encode_DEPENDENCIES = libopus.la \ @EXTRA_PROGRAMS_TRUE@ $(am__DEPENDENCIES_1) \ @EXTRA_PROGRAMS_TRUE@ $(am__DEPENDENCIES_1) am__tests_test_opus_padding_SOURCES_DIST = tests/test_opus_padding.c \ tests/test_opus_common.h @EXTRA_PROGRAMS_TRUE@am_tests_test_opus_padding_OBJECTS = \ @EXTRA_PROGRAMS_TRUE@ tests/test_opus_padding.$(OBJEXT) tests_test_opus_padding_OBJECTS = \ $(am_tests_test_opus_padding_OBJECTS) @EXTRA_PROGRAMS_TRUE@tests_test_opus_padding_DEPENDENCIES = \ @EXTRA_PROGRAMS_TRUE@ libopus.la $(am__DEPENDENCIES_1) \ @EXTRA_PROGRAMS_TRUE@ $(am__DEPENDENCIES_1) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CPPASCOMPILE = $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS) LTCPPASCOMPILE = $(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CCASFLAGS) $(CCASFLAGS) AM_V_CPPAS = $(am__v_CPPAS_@AM_V@) am__v_CPPAS_ = $(am__v_CPPAS_@AM_DEFAULT_V@) am__v_CPPAS_0 = @echo " CPPAS " $@; am__v_CPPAS_1 = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libarmasm_la_SOURCES) $(libopus_la_SOURCES) \ $(celt_tests_test_unit_cwrs32_SOURCES) \ $(celt_tests_test_unit_dft_SOURCES) \ $(celt_tests_test_unit_entropy_SOURCES) \ $(celt_tests_test_unit_laplace_SOURCES) \ $(celt_tests_test_unit_mathops_SOURCES) \ $(celt_tests_test_unit_mdct_SOURCES) \ $(celt_tests_test_unit_rotation_SOURCES) \ $(celt_tests_test_unit_types_SOURCES) $(opus_compare_SOURCES) \ $(opus_custom_demo_SOURCES) $(opus_demo_SOURCES) \ $(repacketizer_demo_SOURCES) $(tests_test_opus_api_SOURCES) \ $(tests_test_opus_decode_SOURCES) \ $(tests_test_opus_encode_SOURCES) \ $(tests_test_opus_padding_SOURCES) DIST_SOURCES = $(am__libarmasm_la_SOURCES_DIST) \ $(am__libopus_la_SOURCES_DIST) \ $(am__celt_tests_test_unit_cwrs32_SOURCES_DIST) \ $(am__celt_tests_test_unit_dft_SOURCES_DIST) \ $(am__celt_tests_test_unit_entropy_SOURCES_DIST) \ $(am__celt_tests_test_unit_laplace_SOURCES_DIST) \ $(am__celt_tests_test_unit_mathops_SOURCES_DIST) \ $(am__celt_tests_test_unit_mdct_SOURCES_DIST) \ $(am__celt_tests_test_unit_rotation_SOURCES_DIST) \ $(am__celt_tests_test_unit_types_SOURCES_DIST) \ $(am__opus_compare_SOURCES_DIST) \ $(am__opus_custom_demo_SOURCES_DIST) \ $(am__opus_demo_SOURCES_DIST) \ $(am__repacketizer_demo_SOURCES_DIST) \ $(am__tests_test_opus_api_SOURCES_DIST) \ $(am__tests_test_opus_decode_SOURCES_DIST) \ $(am__tests_test_opus_encode_SOURCES_DIST) \ $(am__tests_test_opus_padding_SOURCES_DIST) RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac DATA = $(m4data_DATA) $(pkgconfig_DATA) am__pkginclude_HEADERS_DIST = include/opus.h \ include/opus_multistream.h include/opus_types.h \ include/opus_defines.h include/opus_custom.h HEADERS = $(noinst_HEADERS) $(pkginclude_HEADERS) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ cscope check recheck distdir dist dist-all distcheck am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ $(LISP)config.h.in # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags CSCOPE = cscope am__tty_colors_dummy = \ mgn= red= grn= lgn= blu= brg= std=; \ am__color_tests=no am__tty_colors = { \ $(am__tty_colors_dummy); \ if test "X$(AM_COLOR_TESTS)" = Xno; then \ am__color_tests=no; \ elif test "X$(AM_COLOR_TESTS)" = Xalways; then \ am__color_tests=yes; \ elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \ am__color_tests=yes; \ fi; \ if test $$am__color_tests = yes; then \ red=''; \ grn=''; \ lgn=''; \ blu=''; \ mgn=''; \ brg=''; \ std=''; \ fi; \ } am__recheck_rx = ^[ ]*:recheck:[ ]* am__global_test_result_rx = ^[ ]*:global-test-result:[ ]* am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]* # A command that, given a newline-separated list of test names on the # standard input, print the name of the tests that are to be re-run # upon "make recheck". am__list_recheck_tests = $(AWK) '{ \ recheck = 1; \ while ((rc = (getline line < ($$0 ".trs"))) != 0) \ { \ if (rc < 0) \ { \ if ((getline line2 < ($$0 ".log")) < 0) \ recheck = 0; \ break; \ } \ else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \ { \ recheck = 0; \ break; \ } \ else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \ { \ break; \ } \ }; \ if (recheck) \ print $$0; \ close ($$0 ".trs"); \ close ($$0 ".log"); \ }' # A command that, given a newline-separated list of test names on the # standard input, create the global log from their .trs and .log files. am__create_global_log = $(AWK) ' \ function fatal(msg) \ { \ print "fatal: making $@: " msg | "cat >&2"; \ exit 1; \ } \ function rst_section(header) \ { \ print header; \ len = length(header); \ for (i = 1; i <= len; i = i + 1) \ printf "="; \ printf "\n\n"; \ } \ { \ copy_in_global_log = 1; \ global_test_result = "RUN"; \ while ((rc = (getline line < ($$0 ".trs"))) != 0) \ { \ if (rc < 0) \ fatal("failed to read from " $$0 ".trs"); \ if (line ~ /$(am__global_test_result_rx)/) \ { \ sub("$(am__global_test_result_rx)", "", line); \ sub("[ ]*$$", "", line); \ global_test_result = line; \ } \ else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \ copy_in_global_log = 0; \ }; \ if (copy_in_global_log) \ { \ rst_section(global_test_result ": " $$0); \ while ((rc = (getline line < ($$0 ".log"))) != 0) \ { \ if (rc < 0) \ fatal("failed to read from " $$0 ".log"); \ print line; \ }; \ printf "\n"; \ }; \ close ($$0 ".trs"); \ close ($$0 ".log"); \ }' # Restructured Text title. am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; } # Solaris 10 'make', and several other traditional 'make' implementations, # pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it # by disabling -e (using the XSI extension "set +e") if it's set. am__sh_e_setup = case $$- in *e*) set +e;; esac # Default flags passed to test drivers. am__common_driver_flags = \ --color-tests "$$am__color_tests" \ --enable-hard-errors "$$am__enable_hard_errors" \ --expect-failure "$$am__expect_failure" # To be inserted before the command running the test. Creates the # directory for the log if needed. Stores in $dir the directory # containing $f, in $tst the test, in $log the log. Executes the # developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and # passes TESTS_ENVIRONMENT. Set up options for the wrapper that # will run the test scripts (or their associated LOG_COMPILER, if # thy have one). am__check_pre = \ $(am__sh_e_setup); \ $(am__vpath_adj_setup) $(am__vpath_adj) \ $(am__tty_colors); \ srcdir=$(srcdir); export srcdir; \ case "$@" in \ */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \ *) am__odir=.;; \ esac; \ test "x$$am__odir" = x"." || test -d "$$am__odir" \ || $(MKDIR_P) "$$am__odir" || exit $$?; \ if test -f "./$$f"; then dir=./; \ elif test -f "$$f"; then dir=; \ else dir="$(srcdir)/"; fi; \ tst=$$dir$$f; log='$@'; \ if test -n '$(DISABLE_HARD_ERRORS)'; then \ am__enable_hard_errors=no; \ else \ am__enable_hard_errors=yes; \ fi; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \ am__expect_failure=yes;; \ *) \ am__expect_failure=no;; \ esac; \ $(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) # A shell command to get the names of the tests scripts with any registered # extension removed (i.e., equivalently, the names of the test logs, with # the '.log' extension removed). The result is saved in the shell variable # '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly, # we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)", # since that might cause problem with VPATH rewrites for suffix-less tests. # See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'. am__set_TESTS_bases = \ bases='$(TEST_LOGS)'; \ bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ bases=`echo $$bases` RECHECK_LOGS = $(TEST_LOGS) TEST_SUITE_LOG = test-suite.log TEST_EXTENSIONS = @EXEEXT@ .test LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS) am__set_b = \ case '$@' in \ */*) \ case '$*' in \ */*) b='$*';; \ *) b=`echo '$@' | sed 's/\.log$$//'`; \ esac;; \ *) \ b='$*';; \ esac am__test_logs1 = $(TESTS:=.log) am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log) TEST_LOGS = $(am__test_logs2:.test.log=.log) TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \ $(TEST_LOG_FLAGS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ if test -d "$(distdir)"; then \ find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -rf "$(distdir)" \ || { sleep 5 && rm -rf "$(distdir)"; }; \ else :; fi am__post_remove_distdir = $(am__remove_distdir) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best DIST_TARGETS = dist-gzip distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ ARM2GNU_PARAMS = @ARM2GNU_PARAMS@ ARM_NEON_INTR_CFLAGS = @ARM_NEON_INTR_CFLAGS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ HAVE_ARM_NE10 = @HAVE_ARM_NE10@ HAVE_DOXYGEN = @HAVE_DOXYGEN@ HAVE_PERL = @HAVE_PERL@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NE10_CFLAGS = @NE10_CFLAGS@ NE10_LIBS = @NE10_LIBS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPUS_ARM_MAY_HAVE_EDSP = @OPUS_ARM_MAY_HAVE_EDSP@ OPUS_ARM_MAY_HAVE_MEDIA = @OPUS_ARM_MAY_HAVE_MEDIA@ OPUS_ARM_MAY_HAVE_NEON = @OPUS_ARM_MAY_HAVE_NEON@ OPUS_ARM_NEON_INTR_CFLAGS = @OPUS_ARM_NEON_INTR_CFLAGS@ OPUS_HAVE_RTCD = @OPUS_HAVE_RTCD@ OPUS_LT_AGE = @OPUS_LT_AGE@ OPUS_LT_CURRENT = @OPUS_LT_CURRENT@ OPUS_LT_REVISION = @OPUS_LT_REVISION@ OPUS_X86_AVX_CFLAGS = @OPUS_X86_AVX_CFLAGS@ OPUS_X86_SSE2_CFLAGS = @OPUS_X86_SSE2_CFLAGS@ OPUS_X86_SSE4_1_CFLAGS = @OPUS_X86_SSE4_1_CFLAGS@ OPUS_X86_SSE_CFLAGS = @OPUS_X86_SSE_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PC_BUILD = @PC_BUILD@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ X86_AVX_CFLAGS = @X86_AVX_CFLAGS@ X86_SSE2_CFLAGS = @X86_SSE2_CFLAGS@ X86_SSE4_1_CFLAGS = @X86_SSE4_1_CFLAGS@ X86_SSE_CFLAGS = @X86_SSE_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = subdir-objects ACLOCAL_AMFLAGS = -I m4 lib_LTLIBRARIES = libopus.la DIST_SUBDIRS = doc AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/celt -I$(top_srcdir)/silk \ -I$(top_srcdir)/silk/float -I$(top_srcdir)/silk/fixed $(NE10_CFLAGS) CELT_SOURCES = celt/bands.c celt/celt.c celt/celt_encoder.c \ celt/celt_decoder.c celt/cwrs.c celt/entcode.c celt/entdec.c \ celt/entenc.c celt/kiss_fft.c celt/laplace.c celt/mathops.c \ celt/mdct.c celt/modes.c celt/pitch.c celt/celt_lpc.c \ celt/quant_bands.c celt/rate.c celt/vq.c $(am__append_6) \ $(am__append_7) $(am__append_8) $(am__append_9) \ $(am__append_11) $(am__append_12) CELT_SOURCES_SSE = celt/x86/x86cpu.c \ celt/x86/x86_celt_map.c \ celt/x86/pitch_sse.c CELT_SOURCES_SSE2 = celt/x86/pitch_sse2.c CELT_SOURCES_SSE4_1 = celt/x86/celt_lpc_sse.c \ celt/x86/pitch_sse4_1.c CELT_SOURCES_ARM = \ celt/arm/armcpu.c \ celt/arm/arm_celt_map.c CELT_SOURCES_ARM_ASM = \ celt/arm/celt_pitch_xcorr_arm.s CELT_AM_SOURCES_ARM_ASM = \ celt/arm/armopts.s.in CELT_SOURCES_ARM_NEON_INTR = \ celt/arm/celt_neon_intr.c CELT_SOURCES_ARM_NE10 = \ celt/arm/celt_ne10_fft.c \ celt/arm/celt_ne10_mdct.c SILK_SOURCES = silk/CNG.c silk/code_signs.c silk/init_decoder.c \ silk/decode_core.c silk/decode_frame.c \ silk/decode_parameters.c silk/decode_indices.c \ silk/decode_pulses.c silk/decoder_set_fs.c silk/dec_API.c \ silk/enc_API.c silk/encode_indices.c silk/encode_pulses.c \ silk/gain_quant.c silk/interpolate.c silk/LP_variable_cutoff.c \ silk/NLSF_decode.c silk/NSQ.c silk/NSQ_del_dec.c silk/PLC.c \ silk/shell_coder.c silk/tables_gain.c silk/tables_LTP.c \ silk/tables_NLSF_CB_NB_MB.c silk/tables_NLSF_CB_WB.c \ silk/tables_other.c silk/tables_pitch_lag.c \ silk/tables_pulses_per_block.c silk/VAD.c \ silk/control_audio_bandwidth.c silk/quant_LTP_gains.c \ silk/VQ_WMat_EC.c silk/HP_variable_cutoff.c silk/NLSF_encode.c \ silk/NLSF_VQ.c silk/NLSF_unpack.c silk/NLSF_del_dec_quant.c \ silk/process_NLSFs.c silk/stereo_LR_to_MS.c \ silk/stereo_MS_to_LR.c silk/check_control_input.c \ silk/control_SNR.c silk/init_encoder.c silk/control_codec.c \ silk/A2NLSF.c silk/ana_filt_bank_1.c silk/biquad_alt.c \ silk/bwexpander_32.c silk/bwexpander.c silk/debug.c \ silk/decode_pitch.c silk/inner_prod_aligned.c silk/lin2log.c \ silk/log2lin.c silk/LPC_analysis_filter.c \ silk/LPC_inv_pred_gain.c silk/table_LSF_cos.c silk/NLSF2A.c \ silk/NLSF_stabilize.c silk/NLSF_VQ_weights_laroia.c \ silk/pitch_est_tables.c silk/resampler.c \ silk/resampler_down2_3.c silk/resampler_down2.c \ silk/resampler_private_AR2.c silk/resampler_private_down_FIR.c \ silk/resampler_private_IIR_FIR.c \ silk/resampler_private_up2_HQ.c silk/resampler_rom.c \ silk/sigm_Q15.c silk/sort.c silk/sum_sqr_shift.c \ silk/stereo_decode_pred.c silk/stereo_encode_pred.c \ silk/stereo_find_predictor.c silk/stereo_quant_pred.c \ $(am__append_1) $(am__append_2) $(am__append_3) \ $(am__append_4) $(am__append_10) SILK_SOURCES_SSE4_1 = silk/x86/NSQ_sse.c \ silk/x86/NSQ_del_dec_sse.c \ silk/x86/x86_silk_map.c \ silk/x86/VAD_sse.c \ silk/x86/VQ_WMat_EC_sse.c SILK_SOURCES_FIXED = \ silk/fixed/LTP_analysis_filter_FIX.c \ silk/fixed/LTP_scale_ctrl_FIX.c \ silk/fixed/corrMatrix_FIX.c \ silk/fixed/encode_frame_FIX.c \ silk/fixed/find_LPC_FIX.c \ silk/fixed/find_LTP_FIX.c \ silk/fixed/find_pitch_lags_FIX.c \ silk/fixed/find_pred_coefs_FIX.c \ silk/fixed/noise_shape_analysis_FIX.c \ silk/fixed/prefilter_FIX.c \ silk/fixed/process_gains_FIX.c \ silk/fixed/regularize_correlations_FIX.c \ silk/fixed/residual_energy16_FIX.c \ silk/fixed/residual_energy_FIX.c \ silk/fixed/solve_LS_FIX.c \ silk/fixed/warped_autocorrelation_FIX.c \ silk/fixed/apply_sine_window_FIX.c \ silk/fixed/autocorr_FIX.c \ silk/fixed/burg_modified_FIX.c \ silk/fixed/k2a_FIX.c \ silk/fixed/k2a_Q16_FIX.c \ silk/fixed/pitch_analysis_core_FIX.c \ silk/fixed/vector_ops_FIX.c \ silk/fixed/schur64_FIX.c \ silk/fixed/schur_FIX.c SILK_SOURCES_FIXED_SSE4_1 = silk/fixed/x86/vector_ops_FIX_sse.c \ silk/fixed/x86/burg_modified_FIX_sse.c \ silk/fixed/x86/prefilter_FIX_sse.c SILK_SOURCES_FLOAT = \ silk/float/apply_sine_window_FLP.c \ silk/float/corrMatrix_FLP.c \ silk/float/encode_frame_FLP.c \ silk/float/find_LPC_FLP.c \ silk/float/find_LTP_FLP.c \ silk/float/find_pitch_lags_FLP.c \ silk/float/find_pred_coefs_FLP.c \ silk/float/LPC_analysis_filter_FLP.c \ silk/float/LTP_analysis_filter_FLP.c \ silk/float/LTP_scale_ctrl_FLP.c \ silk/float/noise_shape_analysis_FLP.c \ silk/float/prefilter_FLP.c \ silk/float/process_gains_FLP.c \ silk/float/regularize_correlations_FLP.c \ silk/float/residual_energy_FLP.c \ silk/float/solve_LS_FLP.c \ silk/float/warped_autocorrelation_FLP.c \ silk/float/wrappers_FLP.c \ silk/float/autocorrelation_FLP.c \ silk/float/burg_modified_FLP.c \ silk/float/bwexpander_FLP.c \ silk/float/energy_FLP.c \ silk/float/inner_product_FLP.c \ silk/float/k2a_FLP.c \ silk/float/levinsondurbin_FLP.c \ silk/float/LPC_inv_pred_gain_FLP.c \ silk/float/pitch_analysis_core_FLP.c \ silk/float/scale_copy_vector_FLP.c \ silk/float/scale_vector_FLP.c \ silk/float/schur_FLP.c \ silk/float/sort_FLP.c OPUS_SOURCES = src/opus.c src/opus_decoder.c src/opus_encoder.c \ src/opus_multistream.c src/opus_multistream_encoder.c \ src/opus_multistream_decoder.c src/repacketizer.c \ $(am__append_5) OPUS_SOURCES_FLOAT = \ src/analysis.c \ src/mlp.c \ src/mlp_data.c @CPU_ARM_TRUE@@OPUS_ARM_EXTERNAL_ASM_TRUE@noinst_LTLIBRARIES = libarmasm.la @CPU_ARM_TRUE@@OPUS_ARM_EXTERNAL_ASM_TRUE@libarmasm_la_SOURCES = $(CELT_SOURCES_ARM_ASM:.s=-gnu.S) @CPU_ARM_TRUE@@OPUS_ARM_EXTERNAL_ASM_TRUE@BUILT_SOURCES = $(CELT_SOURCES_ARM_ASM:.s=-gnu.S) \ @CPU_ARM_TRUE@@OPUS_ARM_EXTERNAL_ASM_TRUE@ $(CELT_AM_SOURCES_ARM_ASM:.s.in=.s) \ @CPU_ARM_TRUE@@OPUS_ARM_EXTERNAL_ASM_TRUE@ $(CELT_AM_SOURCES_ARM_ASM:.s.in=-gnu.S) CLEANFILES = $(CELT_SOURCES_ARM_ASM:.s=-gnu.S) \ $(CELT_AM_SOURCES_ARM_ASM:.s.in=-gnu.S) CELT_HEAD = \ celt/arch.h \ celt/bands.h \ celt/celt.h \ celt/cpu_support.h \ include/opus_types.h \ include/opus_defines.h \ include/opus_custom.h \ celt/cwrs.h \ celt/ecintrin.h \ celt/entcode.h \ celt/entdec.h \ celt/entenc.h \ celt/fixed_debug.h \ celt/fixed_generic.h \ celt/float_cast.h \ celt/_kiss_fft_guts.h \ celt/kiss_fft.h \ celt/laplace.h \ celt/mathops.h \ celt/mdct.h \ celt/mfrngcod.h \ celt/modes.h \ celt/os_support.h \ celt/pitch.h \ celt/celt_lpc.h \ celt/x86/celt_lpc_sse.h \ celt/quant_bands.h \ celt/rate.h \ celt/stack_alloc.h \ celt/vq.h \ celt/static_modes_float.h \ celt/static_modes_fixed.h \ celt/static_modes_float_arm_ne10.h \ celt/static_modes_fixed_arm_ne10.h \ celt/arm/armcpu.h \ celt/arm/fixed_armv4.h \ celt/arm/fixed_armv5e.h \ celt/arm/kiss_fft_armv4.h \ celt/arm/kiss_fft_armv5e.h \ celt/arm/pitch_arm.h \ celt/arm/fft_arm.h \ celt/arm/mdct_arm.h \ celt/mips/celt_mipsr1.h \ celt/mips/fixed_generic_mipsr1.h \ celt/mips/kiss_fft_mipsr1.h \ celt/mips/mdct_mipsr1.h \ celt/mips/pitch_mipsr1.h \ celt/mips/vq_mipsr1.h \ celt/x86/pitch_sse.h \ celt/x86/x86cpu.h SILK_HEAD = \ silk/debug.h \ silk/control.h \ silk/errors.h \ silk/API.h \ silk/typedef.h \ silk/define.h \ silk/main.h \ silk/x86/main_sse.h \ silk/PLC.h \ silk/structs.h \ silk/tables.h \ silk/tuning_parameters.h \ silk/Inlines.h \ silk/MacroCount.h \ silk/MacroDebug.h \ silk/macros.h \ silk/pitch_est_defines.h \ silk/resampler_private.h \ silk/resampler_rom.h \ silk/resampler_structs.h \ silk/SigProc_FIX.h \ silk/x86/SigProc_FIX_sse.h \ silk/arm/macros_armv4.h \ silk/arm/macros_armv5e.h \ silk/arm/SigProc_FIX_armv4.h \ silk/arm/SigProc_FIX_armv5e.h \ silk/fixed/main_FIX.h \ silk/fixed/structs_FIX.h \ silk/fixed/mips/noise_shape_analysis_FIX_mipsr1.h \ silk/fixed/mips/prefilter_FIX_mipsr1.h \ silk/fixed/mips/warped_autocorrelation_FIX_mipsr1.h \ silk/float/main_FLP.h \ silk/float/structs_FLP.h \ silk/float/SigProc_FLP.h \ silk/mips/macros_mipsr1.h \ silk/mips/NSQ_del_dec_mipsr1.h \ silk/mips/sigproc_fix_mipsr1.h OPUS_HEAD = \ include/opus.h \ include/opus_multistream.h \ src/opus_private.h \ src/analysis.h \ src/mlp.h \ src/tansig_table.h libopus_la_SOURCES = $(CELT_SOURCES) $(SILK_SOURCES) $(OPUS_SOURCES) libopus_la_LDFLAGS = -no-undefined -version-info @OPUS_LT_CURRENT@:@OPUS_LT_REVISION@:@OPUS_LT_AGE@ libopus_la_LIBADD = $(NE10_LIBS) $(LIBM) $(am__append_13) pkginclude_HEADERS = include/opus.h include/opus_multistream.h \ include/opus_types.h include/opus_defines.h $(am__append_18) noinst_HEADERS = $(OPUS_HEAD) $(SILK_HEAD) $(CELT_HEAD) @EXTRA_PROGRAMS_TRUE@opus_demo_SOURCES = src/opus_demo.c @EXTRA_PROGRAMS_TRUE@opus_demo_LDADD = libopus.la $(NE10_LIBS) $(LIBM) @EXTRA_PROGRAMS_TRUE@repacketizer_demo_SOURCES = src/repacketizer_demo.c @EXTRA_PROGRAMS_TRUE@repacketizer_demo_LDADD = libopus.la $(NE10_LIBS) $(LIBM) @EXTRA_PROGRAMS_TRUE@opus_compare_SOURCES = src/opus_compare.c @EXTRA_PROGRAMS_TRUE@opus_compare_LDADD = $(LIBM) @EXTRA_PROGRAMS_TRUE@tests_test_opus_api_SOURCES = tests/test_opus_api.c tests/test_opus_common.h @EXTRA_PROGRAMS_TRUE@tests_test_opus_api_LDADD = libopus.la $(NE10_LIBS) $(LIBM) @EXTRA_PROGRAMS_TRUE@tests_test_opus_encode_SOURCES = tests/test_opus_encode.c tests/test_opus_common.h @EXTRA_PROGRAMS_TRUE@tests_test_opus_encode_LDADD = libopus.la $(NE10_LIBS) $(LIBM) @EXTRA_PROGRAMS_TRUE@tests_test_opus_decode_SOURCES = tests/test_opus_decode.c tests/test_opus_common.h @EXTRA_PROGRAMS_TRUE@tests_test_opus_decode_LDADD = libopus.la $(NE10_LIBS) $(LIBM) @EXTRA_PROGRAMS_TRUE@tests_test_opus_padding_SOURCES = tests/test_opus_padding.c tests/test_opus_common.h @EXTRA_PROGRAMS_TRUE@tests_test_opus_padding_LDADD = libopus.la $(NE10_LIBS) $(LIBM) @EXTRA_PROGRAMS_TRUE@celt_tests_test_unit_cwrs32_SOURCES = celt/tests/test_unit_cwrs32.c @EXTRA_PROGRAMS_TRUE@celt_tests_test_unit_cwrs32_LDADD = $(LIBM) @EXTRA_PROGRAMS_TRUE@celt_tests_test_unit_dft_SOURCES = celt/tests/test_unit_dft.c @EXTRA_PROGRAMS_TRUE@celt_tests_test_unit_dft_LDADD = $(NE10_LIBS) \ @EXTRA_PROGRAMS_TRUE@ $(LIBM) $(am__append_14) @EXTRA_PROGRAMS_TRUE@celt_tests_test_unit_entropy_SOURCES = celt/tests/test_unit_entropy.c @EXTRA_PROGRAMS_TRUE@celt_tests_test_unit_entropy_LDADD = $(LIBM) @EXTRA_PROGRAMS_TRUE@celt_tests_test_unit_laplace_SOURCES = celt/tests/test_unit_laplace.c @EXTRA_PROGRAMS_TRUE@celt_tests_test_unit_laplace_LDADD = $(LIBM) @EXTRA_PROGRAMS_TRUE@celt_tests_test_unit_mathops_SOURCES = celt/tests/test_unit_mathops.c @EXTRA_PROGRAMS_TRUE@celt_tests_test_unit_mathops_LDADD = \ @EXTRA_PROGRAMS_TRUE@ $(NE10_LIBS) $(LIBM) $(am__append_15) @EXTRA_PROGRAMS_TRUE@celt_tests_test_unit_mdct_SOURCES = celt/tests/test_unit_mdct.c @EXTRA_PROGRAMS_TRUE@celt_tests_test_unit_mdct_LDADD = $(NE10_LIBS) \ @EXTRA_PROGRAMS_TRUE@ $(LIBM) $(am__append_16) @EXTRA_PROGRAMS_TRUE@celt_tests_test_unit_rotation_SOURCES = celt/tests/test_unit_rotation.c @EXTRA_PROGRAMS_TRUE@celt_tests_test_unit_rotation_LDADD = \ @EXTRA_PROGRAMS_TRUE@ $(NE10_LIBS) $(LIBM) $(am__append_17) @EXTRA_PROGRAMS_TRUE@celt_tests_test_unit_types_SOURCES = celt/tests/test_unit_types.c @EXTRA_PROGRAMS_TRUE@celt_tests_test_unit_types_LDADD = $(LIBM) @CUSTOM_MODES_TRUE@@EXTRA_PROGRAMS_TRUE@opus_custom_demo_SOURCES = celt/opus_custom_demo.c @CUSTOM_MODES_TRUE@@EXTRA_PROGRAMS_TRUE@opus_custom_demo_LDADD = libopus.la $(LIBM) EXTRA_DIST = version.mk \ opus.pc.in \ opus-uninstalled.pc.in \ opus.m4 \ Makefile.mips \ Makefile.unix \ tests/run_vectors.sh \ celt/arm/arm2gnu.pl \ celt/arm/celt_pitch_xcorr_arm.s \ win32/VS2010/silk_float.vcxproj \ win32/VS2010/celt.vcxproj.filters \ win32/VS2010/opus.vcxproj \ win32/VS2010/silk_common.vcxproj.filters \ win32/VS2010/silk_float.vcxproj.filters \ win32/VS2010/test_opus_encode.vcxproj.filters \ win32/VS2010/silk_common.vcxproj \ win32/VS2010/test_opus_encode.vcxproj \ win32/VS2010/opus_demo.vcxproj \ win32/VS2010/test_opus_api.vcxproj.filters \ win32/VS2010/test_opus_api.vcxproj \ win32/VS2010/test_opus_decode.vcxproj.filters \ win32/VS2010/silk_fixed.vcxproj.filters \ win32/VS2010/opus_demo.vcxproj.filters \ win32/VS2010/silk_fixed.vcxproj \ win32/VS2010/opus.vcxproj.filters \ win32/VS2010/test_opus_decode.vcxproj \ win32/VS2010/celt.vcxproj \ win32/VS2010/opus.sln \ win32/genversion.bat \ win32/config.h pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = opus.pc m4datadir = $(datadir)/aclocal m4data_DATA = opus.m4 OPT_UNIT_TEST_OBJ = $(celt_tests_test_unit_mathops_SOURCES:.c=.o) \ $(celt_tests_test_unit_rotation_SOURCES:.c=.o) \ $(celt_tests_test_unit_mdct_SOURCES:.c=.o) \ $(celt_tests_test_unit_dft_SOURCES:.c=.o) @HAVE_SSE_TRUE@SSE_OBJ = $(CELT_SOURCES_SSE:.c=.lo) @HAVE_SSE2_TRUE@SSE2_OBJ = $(CELT_SOURCES_SSE2:.c=.lo) @HAVE_SSE4_1_TRUE@SSE4_1_OBJ = $(CELT_SOURCES_SSE4_1:.c=.lo) \ @HAVE_SSE4_1_TRUE@ $(SILK_SOURCES_SSE4_1:.c=.lo) \ @HAVE_SSE4_1_TRUE@ $(SILK_SOURCES_FIXED_SSE4_1:.c=.lo) @OPUS_ARM_NEON_INTR_TRUE@CELT_ARM_NEON_INTR_OBJ = $(CELT_SOURCES_ARM_NEON_INTR:.c=.lo) all: $(BUILT_SOURCES) config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: .SUFFIXES: .S .c .lo .log .o .obj .test .test$(EXEEXT) .trs am--refresh: Makefile @: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/celt_sources.mk $(srcdir)/silk_sources.mk $(srcdir)/opus_sources.mk $(srcdir)/celt_headers.mk $(srcdir)/silk_headers.mk $(srcdir)/opus_headers.mk $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(srcdir)/celt_sources.mk $(srcdir)/silk_sources.mk $(srcdir)/opus_sources.mk $(srcdir)/celt_headers.mk $(srcdir)/silk_headers.mk $(srcdir)/opus_headers.mk: $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): config.h: stamp-h1 @test -f $@ || rm -f stamp-h1 @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1 stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status config.h $(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f config.h stamp-h1 opus.pc: $(top_builddir)/config.status $(srcdir)/opus.pc.in cd $(top_builddir) && $(SHELL) ./config.status $@ opus-uninstalled.pc: $(top_builddir)/config.status $(srcdir)/opus-uninstalled.pc.in cd $(top_builddir) && $(SHELL) ./config.status $@ celt/arm/armopts.s: $(top_builddir)/config.status $(top_srcdir)/celt/arm/armopts.s.in cd $(top_builddir) && $(SHELL) ./config.status $@ install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } celt/arm/$(am__dirstamp): @$(MKDIR_P) celt/arm @: > celt/arm/$(am__dirstamp) celt/arm/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) celt/arm/$(DEPDIR) @: > celt/arm/$(DEPDIR)/$(am__dirstamp) celt/arm/celt_pitch_xcorr_arm-gnu.lo: celt/arm/$(am__dirstamp) \ celt/arm/$(DEPDIR)/$(am__dirstamp) libarmasm.la: $(libarmasm_la_OBJECTS) $(libarmasm_la_DEPENDENCIES) $(EXTRA_libarmasm_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(am_libarmasm_la_rpath) $(libarmasm_la_OBJECTS) $(libarmasm_la_LIBADD) $(LIBS) celt/$(am__dirstamp): @$(MKDIR_P) celt @: > celt/$(am__dirstamp) celt/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) celt/$(DEPDIR) @: > celt/$(DEPDIR)/$(am__dirstamp) celt/bands.lo: celt/$(am__dirstamp) celt/$(DEPDIR)/$(am__dirstamp) celt/celt.lo: celt/$(am__dirstamp) celt/$(DEPDIR)/$(am__dirstamp) celt/celt_encoder.lo: celt/$(am__dirstamp) \ celt/$(DEPDIR)/$(am__dirstamp) celt/celt_decoder.lo: celt/$(am__dirstamp) \ celt/$(DEPDIR)/$(am__dirstamp) celt/cwrs.lo: celt/$(am__dirstamp) celt/$(DEPDIR)/$(am__dirstamp) celt/entcode.lo: celt/$(am__dirstamp) celt/$(DEPDIR)/$(am__dirstamp) celt/entdec.lo: celt/$(am__dirstamp) celt/$(DEPDIR)/$(am__dirstamp) celt/entenc.lo: celt/$(am__dirstamp) celt/$(DEPDIR)/$(am__dirstamp) celt/kiss_fft.lo: celt/$(am__dirstamp) celt/$(DEPDIR)/$(am__dirstamp) celt/laplace.lo: celt/$(am__dirstamp) celt/$(DEPDIR)/$(am__dirstamp) celt/mathops.lo: celt/$(am__dirstamp) celt/$(DEPDIR)/$(am__dirstamp) celt/mdct.lo: celt/$(am__dirstamp) celt/$(DEPDIR)/$(am__dirstamp) celt/modes.lo: celt/$(am__dirstamp) celt/$(DEPDIR)/$(am__dirstamp) celt/pitch.lo: celt/$(am__dirstamp) celt/$(DEPDIR)/$(am__dirstamp) celt/celt_lpc.lo: celt/$(am__dirstamp) celt/$(DEPDIR)/$(am__dirstamp) celt/quant_bands.lo: celt/$(am__dirstamp) \ celt/$(DEPDIR)/$(am__dirstamp) celt/rate.lo: celt/$(am__dirstamp) celt/$(DEPDIR)/$(am__dirstamp) celt/vq.lo: celt/$(am__dirstamp) celt/$(DEPDIR)/$(am__dirstamp) celt/x86/$(am__dirstamp): @$(MKDIR_P) celt/x86 @: > celt/x86/$(am__dirstamp) celt/x86/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) celt/x86/$(DEPDIR) @: > celt/x86/$(DEPDIR)/$(am__dirstamp) celt/x86/x86cpu.lo: celt/x86/$(am__dirstamp) \ celt/x86/$(DEPDIR)/$(am__dirstamp) celt/x86/x86_celt_map.lo: celt/x86/$(am__dirstamp) \ celt/x86/$(DEPDIR)/$(am__dirstamp) celt/x86/pitch_sse.lo: celt/x86/$(am__dirstamp) \ celt/x86/$(DEPDIR)/$(am__dirstamp) celt/x86/pitch_sse2.lo: celt/x86/$(am__dirstamp) \ celt/x86/$(DEPDIR)/$(am__dirstamp) celt/x86/celt_lpc_sse.lo: celt/x86/$(am__dirstamp) \ celt/x86/$(DEPDIR)/$(am__dirstamp) celt/x86/pitch_sse4_1.lo: celt/x86/$(am__dirstamp) \ celt/x86/$(DEPDIR)/$(am__dirstamp) celt/arm/armcpu.lo: celt/arm/$(am__dirstamp) \ celt/arm/$(DEPDIR)/$(am__dirstamp) celt/arm/arm_celt_map.lo: celt/arm/$(am__dirstamp) \ celt/arm/$(DEPDIR)/$(am__dirstamp) celt/arm/celt_neon_intr.lo: celt/arm/$(am__dirstamp) \ celt/arm/$(DEPDIR)/$(am__dirstamp) celt/arm/celt_ne10_fft.lo: celt/arm/$(am__dirstamp) \ celt/arm/$(DEPDIR)/$(am__dirstamp) celt/arm/celt_ne10_mdct.lo: celt/arm/$(am__dirstamp) \ celt/arm/$(DEPDIR)/$(am__dirstamp) silk/$(am__dirstamp): @$(MKDIR_P) silk @: > silk/$(am__dirstamp) silk/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) silk/$(DEPDIR) @: > silk/$(DEPDIR)/$(am__dirstamp) silk/CNG.lo: silk/$(am__dirstamp) silk/$(DEPDIR)/$(am__dirstamp) silk/code_signs.lo: silk/$(am__dirstamp) \ silk/$(DEPDIR)/$(am__dirstamp) silk/init_decoder.lo: silk/$(am__dirstamp) \ silk/$(DEPDIR)/$(am__dirstamp) silk/decode_core.lo: silk/$(am__dirstamp) \ silk/$(DEPDIR)/$(am__dirstamp) silk/decode_frame.lo: silk/$(am__dirstamp) \ silk/$(DEPDIR)/$(am__dirstamp) silk/decode_parameters.lo: silk/$(am__dirstamp) \ silk/$(DEPDIR)/$(am__dirstamp) silk/decode_indices.lo: silk/$(am__dirstamp) \ silk/$(DEPDIR)/$(am__dirstamp) silk/decode_pulses.lo: silk/$(am__dirstamp) \ silk/$(DEPDIR)/$(am__dirstamp) silk/decoder_set_fs.lo: silk/$(am__dirstamp) \ silk/$(DEPDIR)/$(am__dirstamp) silk/dec_API.lo: silk/$(am__dirstamp) silk/$(DEPDIR)/$(am__dirstamp) silk/enc_API.lo: silk/$(am__dirstamp) silk/$(DEPDIR)/$(am__dirstamp) silk/encode_indices.lo: silk/$(am__dirstamp) \ silk/$(DEPDIR)/$(am__dirstamp) silk/encode_pulses.lo: silk/$(am__dirstamp) \ silk/$(DEPDIR)/$(am__dirstamp) silk/gain_quant.lo: silk/$(am__dirstamp) \ silk/$(DEPDIR)/$(am__dirstamp) silk/interpolate.lo: silk/$(am__dirstamp) \ silk/$(DEPDIR)/$(am__dirstamp) silk/LP_variable_cutoff.lo: silk/$(am__dirstamp) \ silk/$(DEPDIR)/$(am__dirstamp) silk/NLSF_decode.lo: silk/$(am__dirstamp) \ silk/$(DEPDIR)/$(am__dirstamp) silk/NSQ.lo: silk/$(am__dirstamp) silk/$(DEPDIR)/$(am__dirstamp) silk/NSQ_del_dec.lo: silk/$(am__dirstamp) \ silk/$(DEPDIR)/$(am__dirstamp) silk/PLC.lo: silk/$(am__dirstamp) silk/$(DEPDIR)/$(am__dirstamp) silk/shell_coder.lo: silk/$(am__dirstamp) \ silk/$(DEPDIR)/$(am__dirstamp) silk/tables_gain.lo: silk/$(am__dirstamp) \ silk/$(DEPDIR)/$(am__dirstamp) silk/tables_LTP.lo: silk/$(am__dirstamp) \ silk/$(DEPDIR)/$(am__dirstamp) silk/tables_NLSF_CB_NB_MB.lo: silk/$(am__dirstamp) \ silk/$(DEPDIR)/$(am__dirstamp) silk/tables_NLSF_CB_WB.lo: silk/$(am__dirstamp) \ silk/$(DEPDIR)/$(am__dirstamp) silk/tables_other.lo: silk/$(am__dirstamp) \ silk/$(DEPDIR)/$(am__dirstamp) silk/tables_pitch_lag.lo: silk/$(am__dirstamp) \ silk/$(DEPDIR)/$(am__dirstamp) silk/tables_pulses_per_block.lo: silk/$(am__dirstamp) \ silk/$(DEPDIR)/$(am__dirstamp) silk/VAD.lo: silk/$(am__dirstamp) silk/$(DEPDIR)/$(am__dirstamp) silk/control_audio_bandwidth.lo: silk/$(am__dirstamp) \ silk/$(DEPDIR)/$(am__dirstamp) silk/quant_LTP_gains.lo: silk/$(am__dirstamp) \ silk/$(DEPDIR)/$(am__dirstamp) silk/VQ_WMat_EC.lo: silk/$(am__dirstamp) \ silk/$(DEPDIR)/$(am__dirstamp) silk/HP_variable_cutoff.lo: silk/$(am__dirstamp) \ silk/$(DEPDIR)/$(am__dirstamp) silk/NLSF_encode.lo: silk/$(am__dirstamp) \ silk/$(DEPDIR)/$(am__dirstamp) silk/NLSF_VQ.lo: silk/$(am__dirstamp) silk/$(DEPDIR)/$(am__dirstamp) silk/NLSF_unpack.lo: silk/$(am__dirstamp) \ silk/$(DEPDIR)/$(am__dirstamp) silk/NLSF_del_dec_quant.lo: silk/$(am__dirstamp) \ silk/$(DEPDIR)/$(am__dirstamp) silk/process_NLSFs.lo: silk/$(am__dirstamp) \ silk/$(DEPDIR)/$(am__dirstamp) silk/stereo_LR_to_MS.lo: silk/$(am__dirstamp) \ silk/$(DEPDIR)/$(am__dirstamp) silk/stereo_MS_to_LR.lo: silk/$(am__dirstamp) \ silk/$(DEPDIR)/$(am__dirstamp) silk/check_control_input.lo: silk/$(am__dirstamp) \ silk/$(DEPDIR)/$(am__dirstamp) silk/control_SNR.lo: silk/$(am__dirstamp) \ silk/$(DEPDIR)/$(am__dirstamp) silk/init_encoder.lo: silk/$(am__dirstamp) \ silk/$(DEPDIR)/$(am__dirstamp) silk/control_codec.lo: silk/$(am__dirstamp) \ silk/$(DEPDIR)/$(am__dirstamp) silk/A2NLSF.lo: silk/$(am__dirstamp) silk/$(DEPDIR)/$(am__dirstamp) silk/ana_filt_bank_1.lo: silk/$(am__dirstamp) \ silk/$(DEPDIR)/$(am__dirstamp) silk/biquad_alt.lo: silk/$(am__dirstamp) \ silk/$(DEPDIR)/$(am__dirstamp) silk/bwexpander_32.lo: silk/$(am__dirstamp) \ silk/$(DEPDIR)/$(am__dirstamp) silk/bwexpander.lo: silk/$(am__dirstamp) \ silk/$(DEPDIR)/$(am__dirstamp) silk/debug.lo: silk/$(am__dirstamp) silk/$(DEPDIR)/$(am__dirstamp) silk/decode_pitch.lo: silk/$(am__dirstamp) \ silk/$(DEPDIR)/$(am__dirstamp) silk/inner_prod_aligned.lo: silk/$(am__dirstamp) \ silk/$(DEPDIR)/$(am__dirstamp) silk/lin2log.lo: silk/$(am__dirstamp) silk/$(DEPDIR)/$(am__dirstamp) silk/log2lin.lo: silk/$(am__dirstamp) silk/$(DEPDIR)/$(am__dirstamp) silk/LPC_analysis_filter.lo: silk/$(am__dirstamp) \ silk/$(DEPDIR)/$(am__dirstamp) silk/LPC_inv_pred_gain.lo: silk/$(am__dirstamp) \ silk/$(DEPDIR)/$(am__dirstamp) silk/table_LSF_cos.lo: silk/$(am__dirstamp) \ silk/$(DEPDIR)/$(am__dirstamp) silk/NLSF2A.lo: silk/$(am__dirstamp) silk/$(DEPDIR)/$(am__dirstamp) silk/NLSF_stabilize.lo: silk/$(am__dirstamp) \ silk/$(DEPDIR)/$(am__dirstamp) silk/NLSF_VQ_weights_laroia.lo: silk/$(am__dirstamp) \ silk/$(DEPDIR)/$(am__dirstamp) silk/pitch_est_tables.lo: silk/$(am__dirstamp) \ silk/$(DEPDIR)/$(am__dirstamp) silk/resampler.lo: silk/$(am__dirstamp) silk/$(DEPDIR)/$(am__dirstamp) silk/resampler_down2_3.lo: silk/$(am__dirstamp) \ silk/$(DEPDIR)/$(am__dirstamp) silk/resampler_down2.lo: silk/$(am__dirstamp) \ silk/$(DEPDIR)/$(am__dirstamp) silk/resampler_private_AR2.lo: silk/$(am__dirstamp) \ silk/$(DEPDIR)/$(am__dirstamp) silk/resampler_private_down_FIR.lo: silk/$(am__dirstamp) \ silk/$(DEPDIR)/$(am__dirstamp) silk/resampler_private_IIR_FIR.lo: silk/$(am__dirstamp) \ silk/$(DEPDIR)/$(am__dirstamp) silk/resampler_private_up2_HQ.lo: silk/$(am__dirstamp) \ silk/$(DEPDIR)/$(am__dirstamp) silk/resampler_rom.lo: silk/$(am__dirstamp) \ silk/$(DEPDIR)/$(am__dirstamp) silk/sigm_Q15.lo: silk/$(am__dirstamp) silk/$(DEPDIR)/$(am__dirstamp) silk/sort.lo: silk/$(am__dirstamp) silk/$(DEPDIR)/$(am__dirstamp) silk/sum_sqr_shift.lo: silk/$(am__dirstamp) \ silk/$(DEPDIR)/$(am__dirstamp) silk/stereo_decode_pred.lo: silk/$(am__dirstamp) \ silk/$(DEPDIR)/$(am__dirstamp) silk/stereo_encode_pred.lo: silk/$(am__dirstamp) \ silk/$(DEPDIR)/$(am__dirstamp) silk/stereo_find_predictor.lo: silk/$(am__dirstamp) \ silk/$(DEPDIR)/$(am__dirstamp) silk/stereo_quant_pred.lo: silk/$(am__dirstamp) \ silk/$(DEPDIR)/$(am__dirstamp) silk/fixed/$(am__dirstamp): @$(MKDIR_P) silk/fixed @: > silk/fixed/$(am__dirstamp) silk/fixed/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) silk/fixed/$(DEPDIR) @: > silk/fixed/$(DEPDIR)/$(am__dirstamp) silk/fixed/LTP_analysis_filter_FIX.lo: silk/fixed/$(am__dirstamp) \ silk/fixed/$(DEPDIR)/$(am__dirstamp) silk/fixed/LTP_scale_ctrl_FIX.lo: silk/fixed/$(am__dirstamp) \ silk/fixed/$(DEPDIR)/$(am__dirstamp) silk/fixed/corrMatrix_FIX.lo: silk/fixed/$(am__dirstamp) \ silk/fixed/$(DEPDIR)/$(am__dirstamp) silk/fixed/encode_frame_FIX.lo: silk/fixed/$(am__dirstamp) \ silk/fixed/$(DEPDIR)/$(am__dirstamp) silk/fixed/find_LPC_FIX.lo: silk/fixed/$(am__dirstamp) \ silk/fixed/$(DEPDIR)/$(am__dirstamp) silk/fixed/find_LTP_FIX.lo: silk/fixed/$(am__dirstamp) \ silk/fixed/$(DEPDIR)/$(am__dirstamp) silk/fixed/find_pitch_lags_FIX.lo: silk/fixed/$(am__dirstamp) \ silk/fixed/$(DEPDIR)/$(am__dirstamp) silk/fixed/find_pred_coefs_FIX.lo: silk/fixed/$(am__dirstamp) \ silk/fixed/$(DEPDIR)/$(am__dirstamp) silk/fixed/noise_shape_analysis_FIX.lo: silk/fixed/$(am__dirstamp) \ silk/fixed/$(DEPDIR)/$(am__dirstamp) silk/fixed/prefilter_FIX.lo: silk/fixed/$(am__dirstamp) \ silk/fixed/$(DEPDIR)/$(am__dirstamp) silk/fixed/process_gains_FIX.lo: silk/fixed/$(am__dirstamp) \ silk/fixed/$(DEPDIR)/$(am__dirstamp) silk/fixed/regularize_correlations_FIX.lo: silk/fixed/$(am__dirstamp) \ silk/fixed/$(DEPDIR)/$(am__dirstamp) silk/fixed/residual_energy16_FIX.lo: silk/fixed/$(am__dirstamp) \ silk/fixed/$(DEPDIR)/$(am__dirstamp) silk/fixed/residual_energy_FIX.lo: silk/fixed/$(am__dirstamp) \ silk/fixed/$(DEPDIR)/$(am__dirstamp) silk/fixed/solve_LS_FIX.lo: silk/fixed/$(am__dirstamp) \ silk/fixed/$(DEPDIR)/$(am__dirstamp) silk/fixed/warped_autocorrelation_FIX.lo: silk/fixed/$(am__dirstamp) \ silk/fixed/$(DEPDIR)/$(am__dirstamp) silk/fixed/apply_sine_window_FIX.lo: silk/fixed/$(am__dirstamp) \ silk/fixed/$(DEPDIR)/$(am__dirstamp) silk/fixed/autocorr_FIX.lo: silk/fixed/$(am__dirstamp) \ silk/fixed/$(DEPDIR)/$(am__dirstamp) silk/fixed/burg_modified_FIX.lo: silk/fixed/$(am__dirstamp) \ silk/fixed/$(DEPDIR)/$(am__dirstamp) silk/fixed/k2a_FIX.lo: silk/fixed/$(am__dirstamp) \ silk/fixed/$(DEPDIR)/$(am__dirstamp) silk/fixed/k2a_Q16_FIX.lo: silk/fixed/$(am__dirstamp) \ silk/fixed/$(DEPDIR)/$(am__dirstamp) silk/fixed/pitch_analysis_core_FIX.lo: silk/fixed/$(am__dirstamp) \ silk/fixed/$(DEPDIR)/$(am__dirstamp) silk/fixed/vector_ops_FIX.lo: silk/fixed/$(am__dirstamp) \ silk/fixed/$(DEPDIR)/$(am__dirstamp) silk/fixed/schur64_FIX.lo: silk/fixed/$(am__dirstamp) \ silk/fixed/$(DEPDIR)/$(am__dirstamp) silk/fixed/schur_FIX.lo: silk/fixed/$(am__dirstamp) \ silk/fixed/$(DEPDIR)/$(am__dirstamp) silk/x86/$(am__dirstamp): @$(MKDIR_P) silk/x86 @: > silk/x86/$(am__dirstamp) silk/x86/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) silk/x86/$(DEPDIR) @: > silk/x86/$(DEPDIR)/$(am__dirstamp) silk/x86/NSQ_sse.lo: silk/x86/$(am__dirstamp) \ silk/x86/$(DEPDIR)/$(am__dirstamp) silk/x86/NSQ_del_dec_sse.lo: silk/x86/$(am__dirstamp) \ silk/x86/$(DEPDIR)/$(am__dirstamp) silk/x86/x86_silk_map.lo: silk/x86/$(am__dirstamp) \ silk/x86/$(DEPDIR)/$(am__dirstamp) silk/x86/VAD_sse.lo: silk/x86/$(am__dirstamp) \ silk/x86/$(DEPDIR)/$(am__dirstamp) silk/x86/VQ_WMat_EC_sse.lo: silk/x86/$(am__dirstamp) \ silk/x86/$(DEPDIR)/$(am__dirstamp) silk/fixed/x86/$(am__dirstamp): @$(MKDIR_P) silk/fixed/x86 @: > silk/fixed/x86/$(am__dirstamp) silk/fixed/x86/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) silk/fixed/x86/$(DEPDIR) @: > silk/fixed/x86/$(DEPDIR)/$(am__dirstamp) silk/fixed/x86/vector_ops_FIX_sse.lo: silk/fixed/x86/$(am__dirstamp) \ silk/fixed/x86/$(DEPDIR)/$(am__dirstamp) silk/fixed/x86/burg_modified_FIX_sse.lo: \ silk/fixed/x86/$(am__dirstamp) \ silk/fixed/x86/$(DEPDIR)/$(am__dirstamp) silk/fixed/x86/prefilter_FIX_sse.lo: silk/fixed/x86/$(am__dirstamp) \ silk/fixed/x86/$(DEPDIR)/$(am__dirstamp) silk/float/$(am__dirstamp): @$(MKDIR_P) silk/float @: > silk/float/$(am__dirstamp) silk/float/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) silk/float/$(DEPDIR) @: > silk/float/$(DEPDIR)/$(am__dirstamp) silk/float/apply_sine_window_FLP.lo: silk/float/$(am__dirstamp) \ silk/float/$(DEPDIR)/$(am__dirstamp) silk/float/corrMatrix_FLP.lo: silk/float/$(am__dirstamp) \ silk/float/$(DEPDIR)/$(am__dirstamp) silk/float/encode_frame_FLP.lo: silk/float/$(am__dirstamp) \ silk/float/$(DEPDIR)/$(am__dirstamp) silk/float/find_LPC_FLP.lo: silk/float/$(am__dirstamp) \ silk/float/$(DEPDIR)/$(am__dirstamp) silk/float/find_LTP_FLP.lo: silk/float/$(am__dirstamp) \ silk/float/$(DEPDIR)/$(am__dirstamp) silk/float/find_pitch_lags_FLP.lo: silk/float/$(am__dirstamp) \ silk/float/$(DEPDIR)/$(am__dirstamp) silk/float/find_pred_coefs_FLP.lo: silk/float/$(am__dirstamp) \ silk/float/$(DEPDIR)/$(am__dirstamp) silk/float/LPC_analysis_filter_FLP.lo: silk/float/$(am__dirstamp) \ silk/float/$(DEPDIR)/$(am__dirstamp) silk/float/LTP_analysis_filter_FLP.lo: silk/float/$(am__dirstamp) \ silk/float/$(DEPDIR)/$(am__dirstamp) silk/float/LTP_scale_ctrl_FLP.lo: silk/float/$(am__dirstamp) \ silk/float/$(DEPDIR)/$(am__dirstamp) silk/float/noise_shape_analysis_FLP.lo: silk/float/$(am__dirstamp) \ silk/float/$(DEPDIR)/$(am__dirstamp) silk/float/prefilter_FLP.lo: silk/float/$(am__dirstamp) \ silk/float/$(DEPDIR)/$(am__dirstamp) silk/float/process_gains_FLP.lo: silk/float/$(am__dirstamp) \ silk/float/$(DEPDIR)/$(am__dirstamp) silk/float/regularize_correlations_FLP.lo: silk/float/$(am__dirstamp) \ silk/float/$(DEPDIR)/$(am__dirstamp) silk/float/residual_energy_FLP.lo: silk/float/$(am__dirstamp) \ silk/float/$(DEPDIR)/$(am__dirstamp) silk/float/solve_LS_FLP.lo: silk/float/$(am__dirstamp) \ silk/float/$(DEPDIR)/$(am__dirstamp) silk/float/warped_autocorrelation_FLP.lo: silk/float/$(am__dirstamp) \ silk/float/$(DEPDIR)/$(am__dirstamp) silk/float/wrappers_FLP.lo: silk/float/$(am__dirstamp) \ silk/float/$(DEPDIR)/$(am__dirstamp) silk/float/autocorrelation_FLP.lo: silk/float/$(am__dirstamp) \ silk/float/$(DEPDIR)/$(am__dirstamp) silk/float/burg_modified_FLP.lo: silk/float/$(am__dirstamp) \ silk/float/$(DEPDIR)/$(am__dirstamp) silk/float/bwexpander_FLP.lo: silk/float/$(am__dirstamp) \ silk/float/$(DEPDIR)/$(am__dirstamp) silk/float/energy_FLP.lo: silk/float/$(am__dirstamp) \ silk/float/$(DEPDIR)/$(am__dirstamp) silk/float/inner_product_FLP.lo: silk/float/$(am__dirstamp) \ silk/float/$(DEPDIR)/$(am__dirstamp) silk/float/k2a_FLP.lo: silk/float/$(am__dirstamp) \ silk/float/$(DEPDIR)/$(am__dirstamp) silk/float/levinsondurbin_FLP.lo: silk/float/$(am__dirstamp) \ silk/float/$(DEPDIR)/$(am__dirstamp) silk/float/LPC_inv_pred_gain_FLP.lo: silk/float/$(am__dirstamp) \ silk/float/$(DEPDIR)/$(am__dirstamp) silk/float/pitch_analysis_core_FLP.lo: silk/float/$(am__dirstamp) \ silk/float/$(DEPDIR)/$(am__dirstamp) silk/float/scale_copy_vector_FLP.lo: silk/float/$(am__dirstamp) \ silk/float/$(DEPDIR)/$(am__dirstamp) silk/float/scale_vector_FLP.lo: silk/float/$(am__dirstamp) \ silk/float/$(DEPDIR)/$(am__dirstamp) silk/float/schur_FLP.lo: silk/float/$(am__dirstamp) \ silk/float/$(DEPDIR)/$(am__dirstamp) silk/float/sort_FLP.lo: silk/float/$(am__dirstamp) \ silk/float/$(DEPDIR)/$(am__dirstamp) src/$(am__dirstamp): @$(MKDIR_P) src @: > src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) src/$(DEPDIR) @: > src/$(DEPDIR)/$(am__dirstamp) src/opus.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/opus_decoder.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/opus_encoder.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/opus_multistream.lo: src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/opus_multistream_encoder.lo: src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/opus_multistream_decoder.lo: src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/repacketizer.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/analysis.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/mlp.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/mlp_data.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) libopus.la: $(libopus_la_OBJECTS) $(libopus_la_DEPENDENCIES) $(EXTRA_libopus_la_DEPENDENCIES) $(AM_V_CCLD)$(libopus_la_LINK) -rpath $(libdir) $(libopus_la_OBJECTS) $(libopus_la_LIBADD) $(LIBS) clean-noinstPROGRAMS: @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list celt/tests/$(am__dirstamp): @$(MKDIR_P) celt/tests @: > celt/tests/$(am__dirstamp) celt/tests/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) celt/tests/$(DEPDIR) @: > celt/tests/$(DEPDIR)/$(am__dirstamp) celt/tests/test_unit_cwrs32.$(OBJEXT): celt/tests/$(am__dirstamp) \ celt/tests/$(DEPDIR)/$(am__dirstamp) celt/tests/test_unit_cwrs32$(EXEEXT): $(celt_tests_test_unit_cwrs32_OBJECTS) $(celt_tests_test_unit_cwrs32_DEPENDENCIES) $(EXTRA_celt_tests_test_unit_cwrs32_DEPENDENCIES) celt/tests/$(am__dirstamp) @rm -f celt/tests/test_unit_cwrs32$(EXEEXT) $(AM_V_CCLD)$(LINK) $(celt_tests_test_unit_cwrs32_OBJECTS) $(celt_tests_test_unit_cwrs32_LDADD) $(LIBS) celt/tests/test_unit_dft.$(OBJEXT): celt/tests/$(am__dirstamp) \ celt/tests/$(DEPDIR)/$(am__dirstamp) celt/tests/test_unit_dft$(EXEEXT): $(celt_tests_test_unit_dft_OBJECTS) $(celt_tests_test_unit_dft_DEPENDENCIES) $(EXTRA_celt_tests_test_unit_dft_DEPENDENCIES) celt/tests/$(am__dirstamp) @rm -f celt/tests/test_unit_dft$(EXEEXT) $(AM_V_CCLD)$(LINK) $(celt_tests_test_unit_dft_OBJECTS) $(celt_tests_test_unit_dft_LDADD) $(LIBS) celt/tests/test_unit_entropy.$(OBJEXT): celt/tests/$(am__dirstamp) \ celt/tests/$(DEPDIR)/$(am__dirstamp) celt/tests/test_unit_entropy$(EXEEXT): $(celt_tests_test_unit_entropy_OBJECTS) $(celt_tests_test_unit_entropy_DEPENDENCIES) $(EXTRA_celt_tests_test_unit_entropy_DEPENDENCIES) celt/tests/$(am__dirstamp) @rm -f celt/tests/test_unit_entropy$(EXEEXT) $(AM_V_CCLD)$(LINK) $(celt_tests_test_unit_entropy_OBJECTS) $(celt_tests_test_unit_entropy_LDADD) $(LIBS) celt/tests/test_unit_laplace.$(OBJEXT): celt/tests/$(am__dirstamp) \ celt/tests/$(DEPDIR)/$(am__dirstamp) celt/tests/test_unit_laplace$(EXEEXT): $(celt_tests_test_unit_laplace_OBJECTS) $(celt_tests_test_unit_laplace_DEPENDENCIES) $(EXTRA_celt_tests_test_unit_laplace_DEPENDENCIES) celt/tests/$(am__dirstamp) @rm -f celt/tests/test_unit_laplace$(EXEEXT) $(AM_V_CCLD)$(LINK) $(celt_tests_test_unit_laplace_OBJECTS) $(celt_tests_test_unit_laplace_LDADD) $(LIBS) celt/tests/test_unit_mathops.$(OBJEXT): celt/tests/$(am__dirstamp) \ celt/tests/$(DEPDIR)/$(am__dirstamp) celt/tests/test_unit_mathops$(EXEEXT): $(celt_tests_test_unit_mathops_OBJECTS) $(celt_tests_test_unit_mathops_DEPENDENCIES) $(EXTRA_celt_tests_test_unit_mathops_DEPENDENCIES) celt/tests/$(am__dirstamp) @rm -f celt/tests/test_unit_mathops$(EXEEXT) $(AM_V_CCLD)$(LINK) $(celt_tests_test_unit_mathops_OBJECTS) $(celt_tests_test_unit_mathops_LDADD) $(LIBS) celt/tests/test_unit_mdct.$(OBJEXT): celt/tests/$(am__dirstamp) \ celt/tests/$(DEPDIR)/$(am__dirstamp) celt/tests/test_unit_mdct$(EXEEXT): $(celt_tests_test_unit_mdct_OBJECTS) $(celt_tests_test_unit_mdct_DEPENDENCIES) $(EXTRA_celt_tests_test_unit_mdct_DEPENDENCIES) celt/tests/$(am__dirstamp) @rm -f celt/tests/test_unit_mdct$(EXEEXT) $(AM_V_CCLD)$(LINK) $(celt_tests_test_unit_mdct_OBJECTS) $(celt_tests_test_unit_mdct_LDADD) $(LIBS) celt/tests/test_unit_rotation.$(OBJEXT): celt/tests/$(am__dirstamp) \ celt/tests/$(DEPDIR)/$(am__dirstamp) celt/tests/test_unit_rotation$(EXEEXT): $(celt_tests_test_unit_rotation_OBJECTS) $(celt_tests_test_unit_rotation_DEPENDENCIES) $(EXTRA_celt_tests_test_unit_rotation_DEPENDENCIES) celt/tests/$(am__dirstamp) @rm -f celt/tests/test_unit_rotation$(EXEEXT) $(AM_V_CCLD)$(LINK) $(celt_tests_test_unit_rotation_OBJECTS) $(celt_tests_test_unit_rotation_LDADD) $(LIBS) celt/tests/test_unit_types.$(OBJEXT): celt/tests/$(am__dirstamp) \ celt/tests/$(DEPDIR)/$(am__dirstamp) celt/tests/test_unit_types$(EXEEXT): $(celt_tests_test_unit_types_OBJECTS) $(celt_tests_test_unit_types_DEPENDENCIES) $(EXTRA_celt_tests_test_unit_types_DEPENDENCIES) celt/tests/$(am__dirstamp) @rm -f celt/tests/test_unit_types$(EXEEXT) $(AM_V_CCLD)$(LINK) $(celt_tests_test_unit_types_OBJECTS) $(celt_tests_test_unit_types_LDADD) $(LIBS) src/opus_compare.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) opus_compare$(EXEEXT): $(opus_compare_OBJECTS) $(opus_compare_DEPENDENCIES) $(EXTRA_opus_compare_DEPENDENCIES) @rm -f opus_compare$(EXEEXT) $(AM_V_CCLD)$(LINK) $(opus_compare_OBJECTS) $(opus_compare_LDADD) $(LIBS) celt/opus_custom_demo.$(OBJEXT): celt/$(am__dirstamp) \ celt/$(DEPDIR)/$(am__dirstamp) opus_custom_demo$(EXEEXT): $(opus_custom_demo_OBJECTS) $(opus_custom_demo_DEPENDENCIES) $(EXTRA_opus_custom_demo_DEPENDENCIES) @rm -f opus_custom_demo$(EXEEXT) $(AM_V_CCLD)$(LINK) $(opus_custom_demo_OBJECTS) $(opus_custom_demo_LDADD) $(LIBS) src/opus_demo.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) opus_demo$(EXEEXT): $(opus_demo_OBJECTS) $(opus_demo_DEPENDENCIES) $(EXTRA_opus_demo_DEPENDENCIES) @rm -f opus_demo$(EXEEXT) $(AM_V_CCLD)$(LINK) $(opus_demo_OBJECTS) $(opus_demo_LDADD) $(LIBS) src/repacketizer_demo.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) repacketizer_demo$(EXEEXT): $(repacketizer_demo_OBJECTS) $(repacketizer_demo_DEPENDENCIES) $(EXTRA_repacketizer_demo_DEPENDENCIES) @rm -f repacketizer_demo$(EXEEXT) $(AM_V_CCLD)$(LINK) $(repacketizer_demo_OBJECTS) $(repacketizer_demo_LDADD) $(LIBS) tests/$(am__dirstamp): @$(MKDIR_P) tests @: > tests/$(am__dirstamp) tests/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) tests/$(DEPDIR) @: > tests/$(DEPDIR)/$(am__dirstamp) tests/test_opus_api.$(OBJEXT): tests/$(am__dirstamp) \ tests/$(DEPDIR)/$(am__dirstamp) tests/test_opus_api$(EXEEXT): $(tests_test_opus_api_OBJECTS) $(tests_test_opus_api_DEPENDENCIES) $(EXTRA_tests_test_opus_api_DEPENDENCIES) tests/$(am__dirstamp) @rm -f tests/test_opus_api$(EXEEXT) $(AM_V_CCLD)$(LINK) $(tests_test_opus_api_OBJECTS) $(tests_test_opus_api_LDADD) $(LIBS) tests/test_opus_decode.$(OBJEXT): tests/$(am__dirstamp) \ tests/$(DEPDIR)/$(am__dirstamp) tests/test_opus_decode$(EXEEXT): $(tests_test_opus_decode_OBJECTS) $(tests_test_opus_decode_DEPENDENCIES) $(EXTRA_tests_test_opus_decode_DEPENDENCIES) tests/$(am__dirstamp) @rm -f tests/test_opus_decode$(EXEEXT) $(AM_V_CCLD)$(LINK) $(tests_test_opus_decode_OBJECTS) $(tests_test_opus_decode_LDADD) $(LIBS) tests/test_opus_encode.$(OBJEXT): tests/$(am__dirstamp) \ tests/$(DEPDIR)/$(am__dirstamp) tests/test_opus_encode$(EXEEXT): $(tests_test_opus_encode_OBJECTS) $(tests_test_opus_encode_DEPENDENCIES) $(EXTRA_tests_test_opus_encode_DEPENDENCIES) tests/$(am__dirstamp) @rm -f tests/test_opus_encode$(EXEEXT) $(AM_V_CCLD)$(LINK) $(tests_test_opus_encode_OBJECTS) $(tests_test_opus_encode_LDADD) $(LIBS) tests/test_opus_padding.$(OBJEXT): tests/$(am__dirstamp) \ tests/$(DEPDIR)/$(am__dirstamp) tests/test_opus_padding$(EXEEXT): $(tests_test_opus_padding_OBJECTS) $(tests_test_opus_padding_DEPENDENCIES) $(EXTRA_tests_test_opus_padding_DEPENDENCIES) tests/$(am__dirstamp) @rm -f tests/test_opus_padding$(EXEEXT) $(AM_V_CCLD)$(LINK) $(tests_test_opus_padding_OBJECTS) $(tests_test_opus_padding_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) -rm -f celt/*.$(OBJEXT) -rm -f celt/*.lo -rm -f celt/arm/*.$(OBJEXT) -rm -f celt/arm/*.lo -rm -f celt/tests/*.$(OBJEXT) -rm -f celt/x86/*.$(OBJEXT) -rm -f celt/x86/*.lo -rm -f silk/*.$(OBJEXT) -rm -f silk/*.lo -rm -f silk/fixed/*.$(OBJEXT) -rm -f silk/fixed/*.lo -rm -f silk/fixed/x86/*.$(OBJEXT) -rm -f silk/fixed/x86/*.lo -rm -f silk/float/*.$(OBJEXT) -rm -f silk/float/*.lo -rm -f silk/x86/*.$(OBJEXT) -rm -f silk/x86/*.lo -rm -f src/*.$(OBJEXT) -rm -f src/*.lo -rm -f tests/*.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@celt/$(DEPDIR)/bands.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@celt/$(DEPDIR)/celt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@celt/$(DEPDIR)/celt_decoder.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@celt/$(DEPDIR)/celt_encoder.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@celt/$(DEPDIR)/celt_lpc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@celt/$(DEPDIR)/cwrs.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@celt/$(DEPDIR)/entcode.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@celt/$(DEPDIR)/entdec.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@celt/$(DEPDIR)/entenc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@celt/$(DEPDIR)/kiss_fft.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@celt/$(DEPDIR)/laplace.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@celt/$(DEPDIR)/mathops.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@celt/$(DEPDIR)/mdct.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@celt/$(DEPDIR)/modes.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@celt/$(DEPDIR)/opus_custom_demo.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@celt/$(DEPDIR)/pitch.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@celt/$(DEPDIR)/quant_bands.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@celt/$(DEPDIR)/rate.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@celt/$(DEPDIR)/vq.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@celt/arm/$(DEPDIR)/arm_celt_map.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@celt/arm/$(DEPDIR)/armcpu.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@celt/arm/$(DEPDIR)/celt_ne10_fft.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@celt/arm/$(DEPDIR)/celt_ne10_mdct.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@celt/arm/$(DEPDIR)/celt_neon_intr.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@celt/arm/$(DEPDIR)/celt_pitch_xcorr_arm-gnu.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@celt/tests/$(DEPDIR)/test_unit_cwrs32.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@celt/tests/$(DEPDIR)/test_unit_dft.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@celt/tests/$(DEPDIR)/test_unit_entropy.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@celt/tests/$(DEPDIR)/test_unit_laplace.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@celt/tests/$(DEPDIR)/test_unit_mathops.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@celt/tests/$(DEPDIR)/test_unit_mdct.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@celt/tests/$(DEPDIR)/test_unit_rotation.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@celt/tests/$(DEPDIR)/test_unit_types.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@celt/x86/$(DEPDIR)/celt_lpc_sse.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@celt/x86/$(DEPDIR)/pitch_sse.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@celt/x86/$(DEPDIR)/pitch_sse2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@celt/x86/$(DEPDIR)/pitch_sse4_1.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@celt/x86/$(DEPDIR)/x86_celt_map.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@celt/x86/$(DEPDIR)/x86cpu.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/$(DEPDIR)/A2NLSF.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/$(DEPDIR)/CNG.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/$(DEPDIR)/HP_variable_cutoff.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/$(DEPDIR)/LPC_analysis_filter.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/$(DEPDIR)/LPC_inv_pred_gain.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/$(DEPDIR)/LP_variable_cutoff.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/$(DEPDIR)/NLSF2A.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/$(DEPDIR)/NLSF_VQ.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/$(DEPDIR)/NLSF_VQ_weights_laroia.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/$(DEPDIR)/NLSF_decode.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/$(DEPDIR)/NLSF_del_dec_quant.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/$(DEPDIR)/NLSF_encode.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/$(DEPDIR)/NLSF_stabilize.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/$(DEPDIR)/NLSF_unpack.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/$(DEPDIR)/NSQ.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/$(DEPDIR)/NSQ_del_dec.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/$(DEPDIR)/PLC.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/$(DEPDIR)/VAD.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/$(DEPDIR)/VQ_WMat_EC.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/$(DEPDIR)/ana_filt_bank_1.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/$(DEPDIR)/biquad_alt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/$(DEPDIR)/bwexpander.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/$(DEPDIR)/bwexpander_32.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/$(DEPDIR)/check_control_input.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/$(DEPDIR)/code_signs.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/$(DEPDIR)/control_SNR.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/$(DEPDIR)/control_audio_bandwidth.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/$(DEPDIR)/control_codec.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/$(DEPDIR)/debug.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/$(DEPDIR)/dec_API.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/$(DEPDIR)/decode_core.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/$(DEPDIR)/decode_frame.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/$(DEPDIR)/decode_indices.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/$(DEPDIR)/decode_parameters.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/$(DEPDIR)/decode_pitch.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/$(DEPDIR)/decode_pulses.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/$(DEPDIR)/decoder_set_fs.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/$(DEPDIR)/enc_API.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/$(DEPDIR)/encode_indices.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/$(DEPDIR)/encode_pulses.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/$(DEPDIR)/gain_quant.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/$(DEPDIR)/init_decoder.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/$(DEPDIR)/init_encoder.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/$(DEPDIR)/inner_prod_aligned.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/$(DEPDIR)/interpolate.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/$(DEPDIR)/lin2log.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/$(DEPDIR)/log2lin.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/$(DEPDIR)/pitch_est_tables.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/$(DEPDIR)/process_NLSFs.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/$(DEPDIR)/quant_LTP_gains.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/$(DEPDIR)/resampler.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/$(DEPDIR)/resampler_down2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/$(DEPDIR)/resampler_down2_3.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/$(DEPDIR)/resampler_private_AR2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/$(DEPDIR)/resampler_private_IIR_FIR.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/$(DEPDIR)/resampler_private_down_FIR.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/$(DEPDIR)/resampler_private_up2_HQ.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/$(DEPDIR)/resampler_rom.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/$(DEPDIR)/shell_coder.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/$(DEPDIR)/sigm_Q15.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/$(DEPDIR)/sort.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/$(DEPDIR)/stereo_LR_to_MS.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/$(DEPDIR)/stereo_MS_to_LR.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/$(DEPDIR)/stereo_decode_pred.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/$(DEPDIR)/stereo_encode_pred.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/$(DEPDIR)/stereo_find_predictor.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/$(DEPDIR)/stereo_quant_pred.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/$(DEPDIR)/sum_sqr_shift.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/$(DEPDIR)/table_LSF_cos.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/$(DEPDIR)/tables_LTP.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/$(DEPDIR)/tables_NLSF_CB_NB_MB.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/$(DEPDIR)/tables_NLSF_CB_WB.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/$(DEPDIR)/tables_gain.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/$(DEPDIR)/tables_other.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/$(DEPDIR)/tables_pitch_lag.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/$(DEPDIR)/tables_pulses_per_block.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/fixed/$(DEPDIR)/LTP_analysis_filter_FIX.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/fixed/$(DEPDIR)/LTP_scale_ctrl_FIX.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/fixed/$(DEPDIR)/apply_sine_window_FIX.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/fixed/$(DEPDIR)/autocorr_FIX.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/fixed/$(DEPDIR)/burg_modified_FIX.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/fixed/$(DEPDIR)/corrMatrix_FIX.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/fixed/$(DEPDIR)/encode_frame_FIX.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/fixed/$(DEPDIR)/find_LPC_FIX.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/fixed/$(DEPDIR)/find_LTP_FIX.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/fixed/$(DEPDIR)/find_pitch_lags_FIX.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/fixed/$(DEPDIR)/find_pred_coefs_FIX.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/fixed/$(DEPDIR)/k2a_FIX.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/fixed/$(DEPDIR)/k2a_Q16_FIX.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/fixed/$(DEPDIR)/noise_shape_analysis_FIX.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/fixed/$(DEPDIR)/pitch_analysis_core_FIX.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/fixed/$(DEPDIR)/prefilter_FIX.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/fixed/$(DEPDIR)/process_gains_FIX.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/fixed/$(DEPDIR)/regularize_correlations_FIX.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/fixed/$(DEPDIR)/residual_energy16_FIX.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/fixed/$(DEPDIR)/residual_energy_FIX.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/fixed/$(DEPDIR)/schur64_FIX.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/fixed/$(DEPDIR)/schur_FIX.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/fixed/$(DEPDIR)/solve_LS_FIX.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/fixed/$(DEPDIR)/vector_ops_FIX.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/fixed/$(DEPDIR)/warped_autocorrelation_FIX.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/fixed/x86/$(DEPDIR)/burg_modified_FIX_sse.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/fixed/x86/$(DEPDIR)/prefilter_FIX_sse.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/fixed/x86/$(DEPDIR)/vector_ops_FIX_sse.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/float/$(DEPDIR)/LPC_analysis_filter_FLP.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/float/$(DEPDIR)/LPC_inv_pred_gain_FLP.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/float/$(DEPDIR)/LTP_analysis_filter_FLP.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/float/$(DEPDIR)/LTP_scale_ctrl_FLP.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/float/$(DEPDIR)/apply_sine_window_FLP.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/float/$(DEPDIR)/autocorrelation_FLP.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/float/$(DEPDIR)/burg_modified_FLP.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/float/$(DEPDIR)/bwexpander_FLP.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/float/$(DEPDIR)/corrMatrix_FLP.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/float/$(DEPDIR)/encode_frame_FLP.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/float/$(DEPDIR)/energy_FLP.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/float/$(DEPDIR)/find_LPC_FLP.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/float/$(DEPDIR)/find_LTP_FLP.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/float/$(DEPDIR)/find_pitch_lags_FLP.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/float/$(DEPDIR)/find_pred_coefs_FLP.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/float/$(DEPDIR)/inner_product_FLP.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/float/$(DEPDIR)/k2a_FLP.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/float/$(DEPDIR)/levinsondurbin_FLP.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/float/$(DEPDIR)/noise_shape_analysis_FLP.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/float/$(DEPDIR)/pitch_analysis_core_FLP.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/float/$(DEPDIR)/prefilter_FLP.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/float/$(DEPDIR)/process_gains_FLP.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/float/$(DEPDIR)/regularize_correlations_FLP.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/float/$(DEPDIR)/residual_energy_FLP.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/float/$(DEPDIR)/scale_copy_vector_FLP.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/float/$(DEPDIR)/scale_vector_FLP.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/float/$(DEPDIR)/schur_FLP.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/float/$(DEPDIR)/solve_LS_FLP.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/float/$(DEPDIR)/sort_FLP.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/float/$(DEPDIR)/warped_autocorrelation_FLP.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/float/$(DEPDIR)/wrappers_FLP.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/x86/$(DEPDIR)/NSQ_del_dec_sse.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/x86/$(DEPDIR)/NSQ_sse.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/x86/$(DEPDIR)/VAD_sse.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/x86/$(DEPDIR)/VQ_WMat_EC_sse.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@silk/x86/$(DEPDIR)/x86_silk_map.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/analysis.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/mlp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/mlp_data.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/opus.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/opus_compare.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/opus_decoder.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/opus_demo.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/opus_encoder.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/opus_multistream.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/opus_multistream_decoder.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/opus_multistream_encoder.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/repacketizer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/repacketizer_demo.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/test_opus_api.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/test_opus_decode.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/test_opus_encode.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/test_opus_padding.Po@am__quote@ .S.o: @am__fastdepCCAS_TRUE@ $(AM_V_CPPAS)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCCAS_TRUE@ $(CPPASCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCCAS_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCCAS_FALSE@ $(AM_V_CPPAS@am__nodep@)$(CPPASCOMPILE) -c -o $@ $< .S.obj: @am__fastdepCCAS_TRUE@ $(AM_V_CPPAS)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCCAS_TRUE@ $(CPPASCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCCAS_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCCAS_FALSE@ $(AM_V_CPPAS@am__nodep@)$(CPPASCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .S.lo: @am__fastdepCCAS_TRUE@ $(AM_V_CPPAS)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ @am__fastdepCCAS_TRUE@ $(LTCPPASCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCCAS_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo @AMDEP_TRUE@@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCCAS_FALSE@ $(AM_V_CPPAS@am__nodep@)$(LTCPPASCOMPILE) -c -o $@ $< .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs -rm -rf celt/.libs celt/_libs -rm -rf celt/arm/.libs celt/arm/_libs -rm -rf celt/tests/.libs celt/tests/_libs -rm -rf celt/x86/.libs celt/x86/_libs -rm -rf silk/.libs silk/_libs -rm -rf silk/fixed/.libs silk/fixed/_libs -rm -rf silk/fixed/x86/.libs silk/fixed/x86/_libs -rm -rf silk/float/.libs silk/float/_libs -rm -rf silk/x86/.libs silk/x86/_libs -rm -rf src/.libs src/_libs -rm -rf tests/.libs tests/_libs distclean-libtool: -rm -f libtool config.lt install-m4dataDATA: $(m4data_DATA) @$(NORMAL_INSTALL) @list='$(m4data_DATA)'; test -n "$(m4datadir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(m4datadir)'"; \ $(MKDIR_P) "$(DESTDIR)$(m4datadir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(m4datadir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(m4datadir)" || exit $$?; \ done uninstall-m4dataDATA: @$(NORMAL_UNINSTALL) @list='$(m4data_DATA)'; test -n "$(m4datadir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(m4datadir)'; $(am__uninstall_files_from_dir) install-pkgconfigDATA: $(pkgconfig_DATA) @$(NORMAL_INSTALL) @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \ done uninstall-pkgconfigDATA: @$(NORMAL_UNINSTALL) @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir) install-pkgincludeHEADERS: $(pkginclude_HEADERS) @$(NORMAL_INSTALL) @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(pkgincludedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \ done uninstall-pkgincludeHEADERS: @$(NORMAL_UNINSTALL) @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(pkgincludedir)'; $(am__uninstall_files_from_dir) # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscope: cscope.files test ! -s cscope.files \ || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) clean-cscope: -rm -f cscope.files cscope.files: clean-cscope cscopelist cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -rm -f cscope.out cscope.in.out cscope.po.out cscope.files # Recover from deleted '.trs' file; this should ensure that # "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create # both 'foo.log' and 'foo.trs'. Break the recipe in two subshells # to avoid problems with "make -n". .log.trs: rm -f $< $@ $(MAKE) $(AM_MAKEFLAGS) $< # Leading 'am--fnord' is there to ensure the list of targets does not # expand to empty, as could happen e.g. with make check TESTS=''. am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck) am--force-recheck: @: $(TEST_SUITE_LOG): $(TEST_LOGS) @$(am__set_TESTS_bases); \ am__f_ok () { test -f "$$1" && test -r "$$1"; }; \ redo_bases=`for i in $$bases; do \ am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \ done`; \ if test -n "$$redo_bases"; then \ redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \ redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \ if $(am__make_dryrun); then :; else \ rm -f $$redo_logs && rm -f $$redo_results || exit 1; \ fi; \ fi; \ if test -n "$$am__remaking_logs"; then \ echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \ "recursion detected" >&2; \ else \ am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \ fi; \ if $(am__make_dryrun); then :; else \ st=0; \ errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \ for i in $$redo_bases; do \ test -f $$i.trs && test -r $$i.trs \ || { echo "$$errmsg $$i.trs" >&2; st=1; }; \ test -f $$i.log && test -r $$i.log \ || { echo "$$errmsg $$i.log" >&2; st=1; }; \ done; \ test $$st -eq 0 || exit 1; \ fi @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \ ws='[ ]'; \ results=`for b in $$bases; do echo $$b.trs; done`; \ test -n "$$results" || results=/dev/null; \ all=` grep "^$$ws*:test-result:" $$results | wc -l`; \ pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \ fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \ skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \ xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \ xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \ error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \ if test `expr $$fail + $$xpass + $$error` -eq 0; then \ success=true; \ else \ success=false; \ fi; \ br='==================='; br=$$br$$br$$br$$br; \ result_count () \ { \ if test x"$$1" = x"--maybe-color"; then \ maybe_colorize=yes; \ elif test x"$$1" = x"--no-color"; then \ maybe_colorize=no; \ else \ echo "$@: invalid 'result_count' usage" >&2; exit 4; \ fi; \ shift; \ desc=$$1 count=$$2; \ if test $$maybe_colorize = yes && test $$count -gt 0; then \ color_start=$$3 color_end=$$std; \ else \ color_start= color_end=; \ fi; \ echo "$${color_start}# $$desc $$count$${color_end}"; \ }; \ create_testsuite_report () \ { \ result_count $$1 "TOTAL:" $$all "$$brg"; \ result_count $$1 "PASS: " $$pass "$$grn"; \ result_count $$1 "SKIP: " $$skip "$$blu"; \ result_count $$1 "XFAIL:" $$xfail "$$lgn"; \ result_count $$1 "FAIL: " $$fail "$$red"; \ result_count $$1 "XPASS:" $$xpass "$$red"; \ result_count $$1 "ERROR:" $$error "$$mgn"; \ }; \ { \ echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ $(am__rst_title); \ create_testsuite_report --no-color; \ echo; \ echo ".. contents:: :depth: 2"; \ echo; \ for b in $$bases; do echo $$b; done \ | $(am__create_global_log); \ } >$(TEST_SUITE_LOG).tmp || exit 1; \ mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \ if $$success; then \ col="$$grn"; \ else \ col="$$red"; \ test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ fi; \ echo "$${col}$$br$${std}"; \ echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ echo "$${col}$$br$${std}"; \ create_testsuite_report --maybe-color; \ echo "$$col$$br$$std"; \ if $$success; then :; else \ echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \ if test -n "$(PACKAGE_BUGREPORT)"; then \ echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \ fi; \ echo "$$col$$br$$std"; \ fi; \ $$success || exit 1 check-TESTS: @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) @set +e; $(am__set_TESTS_bases); \ log_list=`for i in $$bases; do echo $$i.log; done`; \ trs_list=`for i in $$bases; do echo $$i.trs; done`; \ log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \ exit $$?; recheck: all @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) @set +e; $(am__set_TESTS_bases); \ bases=`for i in $$bases; do echo $$i; done \ | $(am__list_recheck_tests)` || exit 1; \ log_list=`for i in $$bases; do echo $$i.log; done`; \ log_list=`echo $$log_list`; \ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \ am__force_recheck=am--force-recheck \ TEST_LOGS="$$log_list"; \ exit $$? celt/tests/test_unit_types.log: celt/tests/test_unit_types$(EXEEXT) @p='celt/tests/test_unit_types$(EXEEXT)'; \ b='celt/tests/test_unit_types'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) celt/tests/test_unit_mathops.log: celt/tests/test_unit_mathops$(EXEEXT) @p='celt/tests/test_unit_mathops$(EXEEXT)'; \ b='celt/tests/test_unit_mathops'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) celt/tests/test_unit_entropy.log: celt/tests/test_unit_entropy$(EXEEXT) @p='celt/tests/test_unit_entropy$(EXEEXT)'; \ b='celt/tests/test_unit_entropy'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) celt/tests/test_unit_laplace.log: celt/tests/test_unit_laplace$(EXEEXT) @p='celt/tests/test_unit_laplace$(EXEEXT)'; \ b='celt/tests/test_unit_laplace'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) celt/tests/test_unit_dft.log: celt/tests/test_unit_dft$(EXEEXT) @p='celt/tests/test_unit_dft$(EXEEXT)'; \ b='celt/tests/test_unit_dft'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) celt/tests/test_unit_mdct.log: celt/tests/test_unit_mdct$(EXEEXT) @p='celt/tests/test_unit_mdct$(EXEEXT)'; \ b='celt/tests/test_unit_mdct'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) celt/tests/test_unit_rotation.log: celt/tests/test_unit_rotation$(EXEEXT) @p='celt/tests/test_unit_rotation$(EXEEXT)'; \ b='celt/tests/test_unit_rotation'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) celt/tests/test_unit_cwrs32.log: celt/tests/test_unit_cwrs32$(EXEEXT) @p='celt/tests/test_unit_cwrs32$(EXEEXT)'; \ b='celt/tests/test_unit_cwrs32'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) tests/test_opus_api.log: tests/test_opus_api$(EXEEXT) @p='tests/test_opus_api$(EXEEXT)'; \ b='tests/test_opus_api'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) tests/test_opus_decode.log: tests/test_opus_decode$(EXEEXT) @p='tests/test_opus_decode$(EXEEXT)'; \ b='tests/test_opus_decode'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) tests/test_opus_encode.log: tests/test_opus_encode$(EXEEXT) @p='tests/test_opus_encode$(EXEEXT)'; \ b='tests/test_opus_encode'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) tests/test_opus_padding.log: tests/test_opus_padding$(EXEEXT) @p='tests/test_opus_padding$(EXEEXT)'; \ b='tests/test_opus_padding'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) .test.log: @p='$<'; \ $(am__set_b); \ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) @am__EXEEXT_TRUE@.test$(EXEEXT).log: @am__EXEEXT_TRUE@ @p='$<'; \ @am__EXEEXT_TRUE@ $(am__set_b); \ @am__EXEEXT_TRUE@ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ @am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ @am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ @am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) distdir: $(DISTFILES) $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook -test -n "$(am__skip_mode_fix)" \ || find "$(distdir)" -type d ! -perm -755 \ -exec chmod u+rwx,go+rx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__post_remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 $(am__post_remove_distdir) dist-lzip: distdir tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz $(am__post_remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__post_remove_distdir) dist-tarZ: distdir @echo WARNING: "Support for shar distribution archives is" \ "deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__post_remove_distdir) dist-shar: distdir @echo WARNING: "Support for distribution archives compressed with" \ "legacy program 'compress' is deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__post_remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__post_remove_distdir) dist dist-all: $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' $(am__post_remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lz*) \ lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir) chmod u+w $(distdir) mkdir $(distdir)/_build $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build \ && ../configure \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ --srcdir=.. --prefix="$$dc_install_base" \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 $(am__post_remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @test -n '$(distuninstallcheck_dir)' || { \ echo 'ERROR: trying to run $@ with an empty' \ '$$(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ $(am__cd) '$(distuninstallcheck_dir)' || { \ echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-recursive all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(DATA) $(HEADERS) \ config.h all-local installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(m4datadir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(pkgincludedir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS) -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs) -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -rm -f celt/$(DEPDIR)/$(am__dirstamp) -rm -f celt/$(am__dirstamp) -rm -f celt/arm/$(DEPDIR)/$(am__dirstamp) -rm -f celt/arm/$(am__dirstamp) -rm -f celt/tests/$(DEPDIR)/$(am__dirstamp) -rm -f celt/tests/$(am__dirstamp) -rm -f celt/x86/$(DEPDIR)/$(am__dirstamp) -rm -f celt/x86/$(am__dirstamp) -rm -f silk/$(DEPDIR)/$(am__dirstamp) -rm -f silk/$(am__dirstamp) -rm -f silk/fixed/$(DEPDIR)/$(am__dirstamp) -rm -f silk/fixed/$(am__dirstamp) -rm -f silk/fixed/x86/$(DEPDIR)/$(am__dirstamp) -rm -f silk/fixed/x86/$(am__dirstamp) -rm -f silk/float/$(DEPDIR)/$(am__dirstamp) -rm -f silk/float/$(am__dirstamp) -rm -f silk/x86/$(DEPDIR)/$(am__dirstamp) -rm -f silk/x86/$(am__dirstamp) -rm -f src/$(DEPDIR)/$(am__dirstamp) -rm -f src/$(am__dirstamp) -rm -f tests/$(DEPDIR)/$(am__dirstamp) -rm -f tests/$(am__dirstamp) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) clean: clean-recursive clean-am: clean-generic clean-libLTLIBRARIES clean-libtool clean-local \ clean-noinstLTLIBRARIES clean-noinstPROGRAMS mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf celt/$(DEPDIR) celt/arm/$(DEPDIR) celt/tests/$(DEPDIR) celt/x86/$(DEPDIR) silk/$(DEPDIR) silk/fixed/$(DEPDIR) silk/fixed/x86/$(DEPDIR) silk/float/$(DEPDIR) silk/x86/$(DEPDIR) src/$(DEPDIR) tests/$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-hdr distclean-libtool distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-data-local install-m4dataDATA \ install-pkgconfigDATA install-pkgincludeHEADERS install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -rf celt/$(DEPDIR) celt/arm/$(DEPDIR) celt/tests/$(DEPDIR) celt/x86/$(DEPDIR) silk/$(DEPDIR) silk/fixed/$(DEPDIR) silk/fixed/x86/$(DEPDIR) silk/float/$(DEPDIR) silk/x86/$(DEPDIR) src/$(DEPDIR) tests/$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-libLTLIBRARIES uninstall-local \ uninstall-m4dataDATA uninstall-pkgconfigDATA \ uninstall-pkgincludeHEADERS .MAKE: $(am__recursive_targets) all check check-am install install-am \ install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am all-local \ am--refresh check check-TESTS check-am clean clean-cscope \ clean-generic clean-libLTLIBRARIES clean-libtool clean-local \ clean-noinstLTLIBRARIES clean-noinstPROGRAMS cscope \ cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \ dist-gzip dist-hook dist-lzip dist-shar dist-tarZ dist-xz \ dist-zip distcheck distclean distclean-compile \ distclean-generic distclean-hdr distclean-libtool \ distclean-tags distcleancheck distdir distuninstallcheck dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-data-local install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am \ install-libLTLIBRARIES install-m4dataDATA install-man \ install-pdf install-pdf-am install-pkgconfigDATA \ install-pkgincludeHEADERS install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am recheck tags tags-am \ uninstall uninstall-am uninstall-libLTLIBRARIES \ uninstall-local uninstall-m4dataDATA uninstall-pkgconfigDATA \ uninstall-pkgincludeHEADERS # Provide the full test output for failed tests when using the parallel # test suite (which is enabled by default with automake 1.13+). export VERBOSE = yes # Targets to build and install just the library without the docs opus check-opus install-opus: export NO_DOXYGEN = 1 opus: all check-opus: check install-opus: install # Or just the docs docs: ( cd doc && $(MAKE) $(AM_MAKEFLAGS) ) install-docs: ( cd doc && $(MAKE) $(AM_MAKEFLAGS) install ) # Or everything (by default) all-local: @[ -n "$(NO_DOXYGEN)" ] || ( cd doc && $(MAKE) $(AM_MAKEFLAGS) ) install-data-local: @[ -n "$(NO_DOXYGEN)" ] || ( cd doc && $(MAKE) $(AM_MAKEFLAGS) install ) clean-local: -( cd doc && $(MAKE) $(AM_MAKEFLAGS) clean ) uninstall-local: ( cd doc && $(MAKE) $(AM_MAKEFLAGS) uninstall ) # We check this every time make is run, with configure.ac being touched to # trigger an update of the build system files if update_version changes the # current PACKAGE_VERSION (or if package_version was modified manually by a # user with either AUTO_UPDATE=no or no update_version script present - the # latter being the normal case for tarball releases). # # We can't just add the package_version file to CONFIGURE_DEPENDENCIES since # simply running autoconf will not actually regenerate configure for us when # the content of that file changes (due to autoconf dependency checking not # knowing about that without us creating yet another file for it to include). # # The MAKECMDGOALS check is a gnu-make'ism, but will degrade 'gracefully' for # makes that don't support it. The only loss of functionality is not forcing # an update of package_version for `make dist` if AUTO_UPDATE=no, but that is # unlikely to be a real problem for any real user. $(top_srcdir)/configure.ac: force @case "$(MAKECMDGOALS)" in \ dist-hook) exit 0 ;; \ dist-* | dist | distcheck | distclean) _arg=release ;; \ esac; \ if ! $(top_srcdir)/update_version $$_arg 2> /dev/null; then \ if [ ! -e $(top_srcdir)/package_version ]; then \ echo 'PACKAGE_VERSION="unknown"' > $(top_srcdir)/package_version; \ fi; \ . $(top_srcdir)/package_version || exit 1; \ [ "$(PACKAGE_VERSION)" != "$$PACKAGE_VERSION" ] || exit 0; \ fi; \ touch $@ force: # Create a minimal package_version file when make dist is run. dist-hook: echo 'PACKAGE_VERSION="$(PACKAGE_VERSION)"' > $(top_distdir)/package_version .PHONY: opus check-opus install-opus docs install-docs # automake doesn't do dependency tracking for asm files, that I can tell $(CELT_SOURCES_ARM_ASM:%.s=%-gnu.S): celt/arm/armopts-gnu.S $(CELT_SOURCES_ARM_ASM:%.s=%-gnu.S): $(top_srcdir)/celt/arm/arm2gnu.pl # convert ARM asm to GNU as format %-gnu.S: $(top_srcdir)/%.s $(top_srcdir)/celt/arm/arm2gnu.pl @ARM2GNU_PARAMS@ < $< > $@ # For autoconf-modified sources (e.g., armopts.s) %-gnu.S: %.s $(top_srcdir)/celt/arm/arm2gnu.pl @ARM2GNU_PARAMS@ < $< > $@ @HAVE_SSE_TRUE@$(SSE_OBJ) $(OPT_UNIT_TEST_OBJ): CFLAGS += $(OPUS_X86_SSE_CFLAGS) @HAVE_SSE2_TRUE@$(SSE2_OBJ) $(OPT_UNIT_TEST_OBJ): CFLAGS += $(OPUS_X86_SSE2_CFLAGS) @HAVE_SSE4_1_TRUE@$(SSE4_1_OBJ) $(OPT_UNIT_TEST_OBJ): CFLAGS += $(OPUS_X86_SSE4_1_CFLAGS) @OPUS_ARM_NEON_INTR_TRUE@$(CELT_ARM_NEON_INTR_OBJ) $(OPT_UNIT_TEST_OBJ): CFLAGS += \ @OPUS_ARM_NEON_INTR_TRUE@ $(OPUS_ARM_NEON_INTR_CFLAGS) $(NE10_CFLAGS) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: opus-1.1.2/Makefile.mips000066400000000000000000000107021264527674100151260ustar00rootroot00000000000000#################### COMPILE OPTIONS ####################### # Uncomment this for fixed-point build FIXED_POINT=1 # 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) #CFLAGS := -DVAR_ARRAYS $(CFLAGS) # These options affect performance # HAVE_LRINTF: Use C99 intrinsics to speed up float-to-int conversion #CFLAGS := -DHAVE_LRINTF $(CFLAGS) ###################### END OF OPTIONS ###################### -include package_version include silk_sources.mk include celt_sources.mk include opus_sources.mk ifdef FIXED_POINT SILK_SOURCES += $(SILK_SOURCES_FIXED) else SILK_SOURCES += $(SILK_SOURCES_FLOAT) OPUS_SOURCES += $(OPUS_SOURCES_FLOAT) endif EXESUFFIX = LIBPREFIX = lib LIBSUFFIX = .a OBJSUFFIX = .o CC = $(TOOLCHAIN_PREFIX)cc$(TOOLCHAIN_SUFFIX) AR = $(TOOLCHAIN_PREFIX)ar RANLIB = $(TOOLCHAIN_PREFIX)ranlib CP = $(TOOLCHAIN_PREFIX)cp cppflags-from-defines = $(addprefix -D,$(1)) cppflags-from-includes = $(addprefix -I,$(1)) ldflags-from-ldlibdirs = $(addprefix -L,$(1)) ldlibs-from-libs = $(addprefix -l,$(1)) WARNINGS = -Wall -W -Wstrict-prototypes -Wextra -Wcast-align -Wnested-externs -Wshadow CFLAGS += -mips32r2 -mno-mips16 -std=gnu99 -O2 -g $(WARNINGS) -DENABLE_ASSERTIONS -DMIPSr1_ASM -DOPUS_BUILD -mdspr2 -march=74kc -mtune=74kc -mmt -mgp32 CINCLUDES = include silk celt ifdef FIXED_POINT CFLAGS += -DFIXED_POINT=1 -DDISABLE_FLOAT_API CINCLUDES += silk/fixed else CINCLUDES += silk/float endif LIBS = m LDLIBDIRS = ./ CFLAGS += $(call cppflags-from-defines,$(CDEFINES)) CFLAGS += $(call cppflags-from-includes,$(CINCLUDES)) LDFLAGS += $(call ldflags-from-ldlibdirs,$(LDLIBDIRS)) LDLIBS += $(call ldlibs-from-libs,$(LIBS)) COMPILE.c.cmdline = $(CC) -c $(CFLAGS) -o $@ $< LINK.o = $(CC) $(LDPREFLAGS) $(LDFLAGS) LINK.o.cmdline = $(LINK.o) $^ $(LDLIBS) -o $@$(EXESUFFIX) ARCHIVE.cmdline = $(AR) $(ARFLAGS) $@ $^ && $(RANLIB) $@ %$(OBJSUFFIX):%.c $(COMPILE.c.cmdline) %$(OBJSUFFIX):%.cpp $(COMPILE.cpp.cmdline) # Directives # Variable definitions LIB_NAME = opus TARGET = $(LIBPREFIX)$(LIB_NAME)$(LIBSUFFIX) SRCS_C = $(SILK_SOURCES) $(CELT_SOURCES) $(OPUS_SOURCES) OBJS := $(patsubst %.c,%$(OBJSUFFIX),$(SRCS_C)) OPUSDEMO_SRCS_C = src/opus_demo.c OPUSDEMO_OBJS := $(patsubst %.c,%$(OBJSUFFIX),$(OPUSDEMO_SRCS_C)) TESTOPUSAPI_SRCS_C = tests/test_opus_api.c TESTOPUSAPI_OBJS := $(patsubst %.c,%$(OBJSUFFIX),$(TESTOPUSAPI_SRCS_C)) TESTOPUSDECODE_SRCS_C = tests/test_opus_decode.c TESTOPUSDECODE_OBJS := $(patsubst %.c,%$(OBJSUFFIX),$(TESTOPUSDECODE_SRCS_C)) TESTOPUSENCODE_SRCS_C = tests/test_opus_encode.c TESTOPUSENCODE_OBJS := $(patsubst %.c,%$(OBJSUFFIX),$(TESTOPUSENCODE_SRCS_C)) TESTOPUSPADDING_SRCS_C = tests/test_opus_padding.c TESTOPUSPADDING_OBJS := $(patsubst %.c,%$(OBJSUFFIX),$(TESTOPUSPADDING_SRCS_C)) OPUSCOMPARE_SRCS_C = src/opus_compare.c OPUSCOMPARE_OBJS := $(patsubst %.c,%$(OBJSUFFIX),$(OPUSCOMPARE_SRCS_C)) TESTS := test_opus_api test_opus_decode test_opus_encode test_opus_padding # Rules all: lib opus_demo opus_compare $(TESTS) lib: $(TARGET) check: all for test in $(TESTS); do ./$$test; done $(TARGET): $(OBJS) $(ARCHIVE.cmdline) opus_demo$(EXESUFFIX): $(OPUSDEMO_OBJS) $(TARGET) $(LINK.o.cmdline) test_opus_api$(EXESUFFIX): $(TESTOPUSAPI_OBJS) $(TARGET) $(LINK.o.cmdline) test_opus_decode$(EXESUFFIX): $(TESTOPUSDECODE_OBJS) $(TARGET) $(LINK.o.cmdline) test_opus_encode$(EXESUFFIX): $(TESTOPUSENCODE_OBJS) $(TARGET) $(LINK.o.cmdline) test_opus_padding$(EXESUFFIX): $(TESTOPUSPADDING_OBJS) $(TARGET) $(LINK.o.cmdline) opus_compare$(EXESUFFIX): $(OPUSCOMPARE_OBJS) $(LINK.o.cmdline) celt/celt.o: CFLAGS += -DPACKAGE_VERSION='$(PACKAGE_VERSION)' celt/celt.o: package_version package_version: force @if [ -x ./update_version ]; then \ ./update_version || true; \ elif [ ! -e ./package_version ]; then \ echo 'PACKAGE_VERSION="unknown"' > ./package_version; \ fi force: clean: rm -f opus_demo$(EXESUFFIX) opus_compare$(EXESUFFIX) $(TARGET) \ test_opus_api$(EXESUFFIX) test_opus_decode$(EXESUFFIX) \ test_opus_encode$(EXESUFFIX) test_opus_padding$(EXESUFFIX) \ $(OBJS) $(OPUSDEMO_OBJS) $(OPUSCOMPARE_OBJS) $(TESTOPUSAPI_OBJS) \ $(TESTOPUSDECODE_OBJS) $(TESTOPUSENCODE_OBJS) $(TESTOPUSPADDING_OBJS) .PHONY: all lib clean force check opus-1.1.2/Makefile.unix000066400000000000000000000105231264527674100151420ustar00rootroot00000000000000#################### COMPILE OPTIONS ####################### # Uncomment this for fixed-point build #FIXED_POINT=1 # 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) #CFLAGS := -DVAR_ARRAYS $(CFLAGS) # These options affect performance # HAVE_LRINTF: Use C99 intrinsics to speed up float-to-int conversion #CFLAGS := -DHAVE_LRINTF $(CFLAGS) ###################### END OF OPTIONS ###################### -include package_version include silk_sources.mk include celt_sources.mk include opus_sources.mk ifdef FIXED_POINT SILK_SOURCES += $(SILK_SOURCES_FIXED) else SILK_SOURCES += $(SILK_SOURCES_FLOAT) OPUS_SOURCES += $(OPUS_SOURCES_FLOAT) endif EXESUFFIX = LIBPREFIX = lib LIBSUFFIX = .a OBJSUFFIX = .o CC = $(TOOLCHAIN_PREFIX)cc$(TOOLCHAIN_SUFFIX) AR = $(TOOLCHAIN_PREFIX)ar RANLIB = $(TOOLCHAIN_PREFIX)ranlib CP = $(TOOLCHAIN_PREFIX)cp cppflags-from-defines = $(addprefix -D,$(1)) cppflags-from-includes = $(addprefix -I,$(1)) ldflags-from-ldlibdirs = $(addprefix -L,$(1)) ldlibs-from-libs = $(addprefix -l,$(1)) WARNINGS = -Wall -W -Wstrict-prototypes -Wextra -Wcast-align -Wnested-externs -Wshadow CFLAGS += -O2 -g $(WARNINGS) -DOPUS_BUILD CINCLUDES = include silk celt ifdef FIXED_POINT CFLAGS += -DFIXED_POINT=1 -DDISABLE_FLOAT_API CINCLUDES += silk/fixed else CINCLUDES += silk/float endif LIBS = m LDLIBDIRS = ./ CFLAGS += $(call cppflags-from-defines,$(CDEFINES)) CFLAGS += $(call cppflags-from-includes,$(CINCLUDES)) LDFLAGS += $(call ldflags-from-ldlibdirs,$(LDLIBDIRS)) LDLIBS += $(call ldlibs-from-libs,$(LIBS)) COMPILE.c.cmdline = $(CC) -c $(CFLAGS) -o $@ $< LINK.o = $(CC) $(LDPREFLAGS) $(LDFLAGS) LINK.o.cmdline = $(LINK.o) $^ $(LDLIBS) -o $@$(EXESUFFIX) ARCHIVE.cmdline = $(AR) $(ARFLAGS) $@ $^ && $(RANLIB) $@ %$(OBJSUFFIX):%.c $(COMPILE.c.cmdline) %$(OBJSUFFIX):%.cpp $(COMPILE.cpp.cmdline) # Directives # Variable definitions LIB_NAME = opus TARGET = $(LIBPREFIX)$(LIB_NAME)$(LIBSUFFIX) SRCS_C = $(SILK_SOURCES) $(CELT_SOURCES) $(OPUS_SOURCES) OBJS := $(patsubst %.c,%$(OBJSUFFIX),$(SRCS_C)) OPUSDEMO_SRCS_C = src/opus_demo.c OPUSDEMO_OBJS := $(patsubst %.c,%$(OBJSUFFIX),$(OPUSDEMO_SRCS_C)) TESTOPUSAPI_SRCS_C = tests/test_opus_api.c TESTOPUSAPI_OBJS := $(patsubst %.c,%$(OBJSUFFIX),$(TESTOPUSAPI_SRCS_C)) TESTOPUSDECODE_SRCS_C = tests/test_opus_decode.c TESTOPUSDECODE_OBJS := $(patsubst %.c,%$(OBJSUFFIX),$(TESTOPUSDECODE_SRCS_C)) TESTOPUSENCODE_SRCS_C = tests/test_opus_encode.c TESTOPUSENCODE_OBJS := $(patsubst %.c,%$(OBJSUFFIX),$(TESTOPUSENCODE_SRCS_C)) TESTOPUSPADDING_SRCS_C = tests/test_opus_padding.c TESTOPUSPADDING_OBJS := $(patsubst %.c,%$(OBJSUFFIX),$(TESTOPUSPADDING_SRCS_C)) OPUSCOMPARE_SRCS_C = src/opus_compare.c OPUSCOMPARE_OBJS := $(patsubst %.c,%$(OBJSUFFIX),$(OPUSCOMPARE_SRCS_C)) TESTS := test_opus_api test_opus_decode test_opus_encode test_opus_padding # Rules all: lib opus_demo opus_compare $(TESTS) lib: $(TARGET) check: all for test in $(TESTS); do ./$$test; done $(TARGET): $(OBJS) $(ARCHIVE.cmdline) opus_demo$(EXESUFFIX): $(OPUSDEMO_OBJS) $(TARGET) $(LINK.o.cmdline) test_opus_api$(EXESUFFIX): $(TESTOPUSAPI_OBJS) $(TARGET) $(LINK.o.cmdline) test_opus_decode$(EXESUFFIX): $(TESTOPUSDECODE_OBJS) $(TARGET) $(LINK.o.cmdline) test_opus_encode$(EXESUFFIX): $(TESTOPUSENCODE_OBJS) $(TARGET) $(LINK.o.cmdline) test_opus_padding$(EXESUFFIX): $(TESTOPUSPADDING_OBJS) $(TARGET) $(LINK.o.cmdline) opus_compare$(EXESUFFIX): $(OPUSCOMPARE_OBJS) $(LINK.o.cmdline) celt/celt.o: CFLAGS += -DPACKAGE_VERSION='$(PACKAGE_VERSION)' celt/celt.o: package_version package_version: force @if [ -x ./update_version ]; then \ ./update_version || true; \ elif [ ! -e ./package_version ]; then \ echo 'PACKAGE_VERSION="unknown"' > ./package_version; \ fi force: clean: rm -f opus_demo$(EXESUFFIX) opus_compare$(EXESUFFIX) $(TARGET) \ test_opus_api$(EXESUFFIX) test_opus_decode$(EXESUFFIX) \ test_opus_encode$(EXESUFFIX) test_opus_padding$(EXESUFFIX) \ $(OBJS) $(OPUSDEMO_OBJS) $(OPUSCOMPARE_OBJS) $(TESTOPUSAPI_OBJS) \ $(TESTOPUSDECODE_OBJS) $(TESTOPUSENCODE_OBJS) $(TESTOPUSPADDING_OBJS) .PHONY: all lib clean force check opus-1.1.2/NEWS000066400000000000000000000000001264527674100132040ustar00rootroot00000000000000opus-1.1.2/README000066400000000000000000000122771264527674100134100ustar00rootroot00000000000000== Opus audio codec == Opus is a codec for interactive speech and audio transmission over the Internet. Opus can handle a wide range of interactive audio applications, including Voice over IP, videoconferencing, in-game chat, and even remote live music performances. It can scale from low bit-rate narrowband speech to very high quality stereo music. Opus, when coupled with an appropriate container format, is also suitable for non-realtime stored-file applications such as music distribution, game soundtracks, portable music players, jukeboxes, and other applications that have historically used high latency formats such as MP3, AAC, or Vorbis. Opus is specified by IETF RFC 6716: https://tools.ietf.org/html/rfc6716 The Opus format and this implementation of it are subject to the royalty- free patent and copyright licenses specified in the file COPYING. This package implements a shared library for encoding and decoding raw Opus bitstreams. Raw Opus bitstreams should be used over RTP according to https://tools.ietf.org/html/rfc7587 The package also includes a number of test tools used for testing the correct operation of the library. The bitstreams read/written by these tools should not be used for Opus file distribution: They include additional debugging data and cannot support seeking. Opus stored in files should use the Ogg encapsulation for Opus which is described at: https://wiki.xiph.org/OggOpus An opus-tools package is available which provides encoding and decoding of Ogg encapsulated Opus files and includes a number of useful features. Opus-tools can be found at: https://git.xiph.org/?p=opus-tools.git or on the main Opus website: https://opus-codec.org/ == Compiling libopus == To build from a distribution tarball, you only need to do the following: % ./configure % make To build from the git repository, the following steps are necessary: 1) Clone the repository: % git clone https://git.xiph.org/opus.git % cd opus 2) Compiling the source % ./autogen.sh % ./configure % make 3) Install the codec libraries (optional) % sudo make install Once you have compiled the codec, there will be a opus_demo executable in the top directory. Usage: opus_demo [-e] [options] opus_demo -d [options] mode: voip | audio | restricted-lowdelay options: -e : only runs the encoder (output the bit-stream) -d : only runs the decoder (reads the bit-stream as input) -cbr : enable constant bitrate; default: variable bitrate -cvbr : enable constrained variable bitrate; default: unconstrained -bandwidth : 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 : maximum payload size in bytes, default: 1024 -complexity : complexity, 0 (lowest) ... 10 (highest); default: 10 -inbandfec : enable SILK inband FEC -forcemono : force mono encoding, even for stereo input -dtx : enable SILK DTX -loss : simulate packet loss, in percent (0-100); default: 0 input and output are little-endian signed 16-bit PCM files or opus bitstreams with simple opus_demo proprietary framing. == Testing == This package includes a collection of automated unit and system tests which SHOULD be run after compiling the package especially the first time it is run on a new platform. To run the integrated tests: % make check There is also collection of standard test vectors which are not included in this package for size reasons but can be obtained from: https://opus-codec.org/testvectors/opus_testvectors.tar.gz To run compare the code to these test vectors: % curl -O https://opus-codec.org/testvectors/opus_testvectors.tar.gz % tar -zxf opus_testvectors.tar.gz % ./tests/run_vectors.sh ./ opus_testvectors 48000 == Portability notes == This implementation uses floating-point by default but can be compiled to use only fixed-point arithmetic by setting --enable-fixed-point (if using autoconf) or by defining the FIXED_POINT macro (if building manually). The fixed point implementation has somewhat lower audio quality and is slower on platforms with fast FPUs, it is normally only used in embedded environments. The implementation can be compiled with either a C89 or a C99 compiler. While it does not rely on any _undefined behavior_ as defined by C89 or C99, it relies on common _implementation-defined behavior_ for two's complement architectures: o Right shifts of negative values are consistent with two's complement arithmetic, so that a>>b is equivalent to floor(a/(2^b)), o For conversion to a signed integer of N bits, the value is reduced modulo 2^N to be within range of the type, o The result of integer division of a negative value is truncated towards zero, and o The compiler provides a 64-bit integer type (a C99 requirement which is supported by most C89 compilers). opus-1.1.2/README.draft000066400000000000000000000041631264527674100145020ustar00rootroot00000000000000To build this source code, simply type: % make If this does not work, or if you want to change the default configuration (e.g., to compile for a fixed-point architecture), simply edit the options in the Makefile. An up-to-date implementation conforming to this standard is available in a Git repository at https://git.xiph.org/opus.git or on a website at: https://opus-codec.org/ However, although that implementation is expected to remain conformant with the standard, it is the code in this RFC that shall remain normative. To build from the git repository instead of using this RFC, follow these steps: 1) Clone the repository (latest implementation of this standard at the time of publication) % git clone https://git.xiph.org/opus.git % cd opus 2) Compile % ./autogen.sh % ./configure % make Once you have compiled the codec, there will be a opus_demo executable in the top directory. Usage: opus_demo [-e] [options] opus_demo -d [options] mode: voip | audio | restricted-lowdelay options: -e : only runs the encoder (output the bit-stream) -d : only runs the decoder (reads the bit-stream as input) -cbr : enable constant bitrate; default: variable bitrate -cvbr : enable constrained variable bitrate; default: unconstrained -bandwidth : 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 : maximum payload size in bytes, default: 1024 -complexity : complexity, 0 (lowest) ... 10 (highest); default: 10 -inbandfec : enable SILK inband FEC -forcemono : force mono encoding, even for stereo input -dtx : enable SILK DTX -loss : simulate packet loss, in percent (0-100); default: 0 input and output are little endian signed 16-bit PCM files or opus bitstreams with simple opus_demo proprietary framing. opus-1.1.2/aclocal.m4000066400000000000000000001270151264527674100143650ustar00rootroot00000000000000# generated automatically by aclocal 1.14.1 -*- Autoconf -*- # Copyright (C) 1996-2013 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, [m4_warning([this file was generated for autoconf 2.69. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) # Copyright (C) 2002-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.14' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.14.1], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.14.1])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # Figure out how to run the assembler. -*- Autoconf -*- # Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_AS # ---------- AC_DEFUN([AM_PROG_AS], [# By default we simply use the C compiler to build assembly code. AC_REQUIRE([AC_PROG_CC]) test "${CCAS+set}" = set || CCAS=$CC test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS AC_ARG_VAR([CCAS], [assembler compiler command (defaults to CC)]) AC_ARG_VAR([CCASFLAGS], [assembler compiler flags (defaults to CFLAGS)]) _AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES([CCAS])])dnl ]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to # '$srcdir', '$srcdir/..', or '$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is '.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl # Expand $ac_aux_dir to an absolute path. am_aux_dir=`cd "$ac_aux_dir" && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ([2.52])dnl m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl m4_define([_AM_COND_VALUE_$1], [$2])dnl if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], [$1], [CXX], [depcc="$CXX" am_compiler_list=], [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], [$1], [UPC], [depcc="$UPC" am_compiler_list=], [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi am__universal=false m4_case([$1], [CC], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac], [CXX], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac]) for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES. AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE([dependency-tracking], [dnl AS_HELP_STRING( [--enable-dependency-tracking], [do not reject slow dependency extractors]) AS_HELP_STRING( [--disable-dependency-tracking], [speeds up one-time build])]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl AC_SUBST([am__nodep])dnl _AM_SUBST_NOTMAKE([am__nodep])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named 'Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running 'make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "$am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each '.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC]) [_AM_PROG_CC_C_O ]) # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.65])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [AC_DIAGNOSE([obsolete], [$0: two- and three-arguments forms are deprecated.]) m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if( m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), [ok:ok],, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) AM_MISSING_PROG([AUTOCONF], [autoconf]) AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) AM_MISSING_PROG([AUTOHEADER], [autoheader]) AM_MISSING_PROG([MAKEINFO], [makeinfo]) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # AC_SUBST([mkdir_p], ['$(MKDIR_P)']) # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES([CC])], [m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES([CXX])], [m4_define([AC_PROG_CXX], m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES([OBJC])], [m4_define([AC_PROG_OBJC], m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], [_AM_DEPENDENCIES([OBJCXX])], [m4_define([AC_PROG_OBJCXX], m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl ]) AC_REQUIRE([AM_SILENT_RULES])dnl dnl The testsuite driver may need to know about EXEEXT, so add the dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl # POSIX will say in a future version that running "rm -f" with no argument # is OK; and we want to be able to make that assumption in our Makefile # recipes. So use an aggressive probe to check that the usage we want is # actually supported "in the wild" to an acceptable degree. # See automake bug#10828. # To make any issue more visible, cause the running configure to be aborted # by default if the 'rm' program in use doesn't match our expectations; the # user can still override this though. if rm -f && rm -fr && rm -rf; then : OK; else cat >&2 <<'END' Oops! Your 'rm' program seems unable to run without file operands specified on the command line, even when the '-f' option is present. This is contrary to the behaviour of most rm programs out there, and not conforming with the upcoming POSIX standard: Please tell bug-automake@gnu.org about your system, including the value of your $PATH and any error possibly output before this message. This can help us improve future automake versions. END if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then echo 'Configuration will proceed anyway, since you have set the' >&2 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 echo >&2 else cat >&2 <<'END' Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM to "yes", and re-run configure. END AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) fi fi ]) dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi AC_SUBST([install_sh])]) # Copyright (C) 2003-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Add --enable-maintainer-mode option to configure. -*- Autoconf -*- # From Jim Meyering # Copyright (C) 1996-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_MAINTAINER_MODE([DEFAULT-MODE]) # ---------------------------------- # Control maintainer-specific portions of Makefiles. # Default is to disable them, unless 'enable' is passed literally. # For symmetry, 'disable' may be passed as well. Anyway, the user # can override the default with the --enable/--disable switch. AC_DEFUN([AM_MAINTAINER_MODE], [m4_case(m4_default([$1], [disable]), [enable], [m4_define([am_maintainer_other], [disable])], [disable], [m4_define([am_maintainer_other], [enable])], [m4_define([am_maintainer_other], [enable]) m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) dnl maintainer-mode's default is 'disable' unless 'enable' is passed AC_ARG_ENABLE([maintainer-mode], [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode], am_maintainer_other[ make rules and dependencies not useful (and sometimes confusing) to the casual installer])], [USE_MAINTAINER_MODE=$enableval], [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) AC_MSG_RESULT([$USE_MAINTAINER_MODE]) AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) MAINT=$MAINTAINER_MODE_TRUE AC_SUBST([MAINT])dnl ] ) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it is modern enough. # If it is, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= AC_MSG_WARN(['missing' script is too old or missing]) fi ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # -------------------- # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), [1])]) # _AM_SET_OPTIONS(OPTIONS) # ------------------------ # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Copyright (C) 1999-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_PROG_CC_C_O # --------------- # Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC # to automatically call this. AC_DEFUN([_AM_PROG_CC_C_O], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([compile])dnl AC_LANG_PUSH([C])dnl AC_CACHE_CHECK( [whether $CC understands -c and -o together], [am_cv_prog_cc_c_o], [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i]) if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi AC_LANG_POP([C])]) # For backward compatibility. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) # Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_RUN_LOG(COMMAND) # ------------------- # Run COMMAND, save the exit status in ac_status, and log it. # (This has been adapted from Autoconf's _AC_RUN_LOG macro.) AC_DEFUN([AM_RUN_LOG], [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD (exit $ac_status); }]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[[\\\"\#\$\&\'\`$am_lf]]*) AC_MSG_ERROR([unsafe absolute working directory name]);; esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; esac # Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi if test "$[2]" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT([yes]) # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi AC_CONFIG_COMMANDS_PRE( [AC_MSG_CHECKING([that generated files are newer than configure]) if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi AC_MSG_RESULT([done])]) rm -f conftest.file ]) # Copyright (C) 2009-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_SILENT_RULES([DEFAULT]) # -------------------------- # Enable less verbose build rules; with the default set to DEFAULT # ("yes" being less verbose, "no" or empty being verbose). AC_DEFUN([AM_SILENT_RULES], [AC_ARG_ENABLE([silent-rules], [dnl AS_HELP_STRING( [--enable-silent-rules], [less verbose build output (undo: "make V=1")]) AS_HELP_STRING( [--disable-silent-rules], [verbose build output (undo: "make V=0")])dnl ]) case $enable_silent_rules in @%:@ ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; esac dnl dnl A few 'make' implementations (e.g., NonStop OS and NextStep) dnl do not support nested variable expansions. dnl See automake bug#9928 and bug#10237. am_make=${MAKE-make} AC_CACHE_CHECK([whether $am_make supports nested variables], [am_cv_make_support_nested_variables], [if AS_ECHO([['TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi]) if test $am_cv_make_support_nested_variables = yes; then dnl Using '$V' instead of '$(V)' breaks IRIX make. AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AC_SUBST([AM_V])dnl AM_SUBST_NOTMAKE([AM_V])dnl AC_SUBST([AM_DEFAULT_V])dnl AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl AC_SUBST([AM_DEFAULT_VERBOSITY])dnl AM_BACKSLASH='\' AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) # Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor 'install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in "make install-strip", and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using 'strip' when the user # run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the 'STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) # -------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of 'v7', 'ustar', or 'pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar # AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AC_SUBST([AMTAR], ['$${TAR-tar}']) # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' m4_if([$1], [v7], [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], [m4_case([$1], [ustar], [# The POSIX 1988 'ustar' format is defined with fixed-size fields. # There is notably a 21 bits limit for the UID and the GID. In fact, # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 # and bug#13588). am_max_uid=2097151 # 2^21 - 1 am_max_gid=$am_max_uid # The $UID and $GID variables are not portable, so we need to resort # to the POSIX-mandated id(1) utility. Errors in the 'id' calls # below are definitely unexpected, so allow the users to see them # (that is, avoid stderr redirection). am_uid=`id -u || echo unknown` am_gid=`id -g || echo unknown` AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) if test $am_uid -le $am_max_uid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) if test $am_gid -le $am_max_gid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi], [pax], [], [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Go ahead even if we have the value already cached. We do so because we # need to set the values for the 'am__tar' and 'am__untar' variables. _am_tools=${am_cv_prog_tar_$1-$_am_tools} for _am_tool in $_am_tools; do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works. rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR m4_include([m4/as-gcc-inline-assembly.m4]) m4_include([m4/libtool.m4]) m4_include([m4/ltoptions.m4]) m4_include([m4/ltsugar.m4]) m4_include([m4/ltversion.m4]) m4_include([m4/lt~obsolete.m4]) m4_include([m4/opus-intrinsics.m4]) opus-1.1.2/autogen.sh000077500000000000000000000003261264527674100145210ustar00rootroot00000000000000#!/bin/sh # Run this to set up the build system: configure, makefiles, etc. set -e srcdir=`dirname $0` test -n "$srcdir" && cd "$srcdir" echo "Updating build configuration files, please wait...." autoreconf -if opus-1.1.2/celt/000077500000000000000000000000001264527674100134465ustar00rootroot00000000000000opus-1.1.2/celt/_kiss_fft_guts.h000066400000000000000000000134621264527674100166360ustar00rootroot00000000000000/*Copyright (c) 2003-2004, Mark Borgerding All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * 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. 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 OWNER 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.*/ #ifndef KISS_FFT_GUTS_H #define KISS_FFT_GUTS_H #define MIN(a,b) ((a)<(b) ? (a):(b)) #define MAX(a,b) ((a)>(b) ? (a):(b)) /* kiss_fft.h defines kiss_fft_scalar as either short or a float type and defines typedef struct { kiss_fft_scalar r; kiss_fft_scalar i; }kiss_fft_cpx; */ #include "kiss_fft.h" /* Explanation of macros dealing with complex math: C_MUL(m,a,b) : m = a*b C_FIXDIV( c , div ) : if a fixed point impl., c /= div. noop otherwise C_SUB( res, a,b) : res = a - b C_SUBFROM( res , a) : res -= a C_ADDTO( res , a) : res += a * */ #ifdef FIXED_POINT #include "arch.h" #define SAMP_MAX 2147483647 #define TWID_MAX 32767 #define TRIG_UPSCALE 1 #define SAMP_MIN -SAMP_MAX # define S_MUL(a,b) MULT16_32_Q15(b, a) # define C_MUL(m,a,b) \ do{ (m).r = SUB32(S_MUL((a).r,(b).r) , S_MUL((a).i,(b).i)); \ (m).i = ADD32(S_MUL((a).r,(b).i) , S_MUL((a).i,(b).r)); }while(0) # define C_MULC(m,a,b) \ do{ (m).r = ADD32(S_MUL((a).r,(b).r) , S_MUL((a).i,(b).i)); \ (m).i = SUB32(S_MUL((a).i,(b).r) , S_MUL((a).r,(b).i)); }while(0) # define C_MULBYSCALAR( c, s ) \ do{ (c).r = S_MUL( (c).r , s ) ;\ (c).i = S_MUL( (c).i , s ) ; }while(0) # define DIVSCALAR(x,k) \ (x) = S_MUL( x, (TWID_MAX-((k)>>1))/(k)+1 ) # define C_FIXDIV(c,div) \ do { DIVSCALAR( (c).r , div); \ DIVSCALAR( (c).i , div); }while (0) #define C_ADD( res, a,b)\ do {(res).r=ADD32((a).r,(b).r); (res).i=ADD32((a).i,(b).i); \ }while(0) #define C_SUB( res, a,b)\ do {(res).r=SUB32((a).r,(b).r); (res).i=SUB32((a).i,(b).i); \ }while(0) #define C_ADDTO( res , a)\ do {(res).r = ADD32((res).r, (a).r); (res).i = ADD32((res).i,(a).i);\ }while(0) #define C_SUBFROM( res , a)\ do {(res).r = ADD32((res).r,(a).r); (res).i = SUB32((res).i,(a).i); \ }while(0) #if defined(OPUS_ARM_INLINE_ASM) #include "arm/kiss_fft_armv4.h" #endif #if defined(OPUS_ARM_INLINE_EDSP) #include "arm/kiss_fft_armv5e.h" #endif #if defined(MIPSr1_ASM) #include "mips/kiss_fft_mipsr1.h" #endif #else /* not FIXED_POINT*/ # define S_MUL(a,b) ( (a)*(b) ) #define C_MUL(m,a,b) \ do{ (m).r = (a).r*(b).r - (a).i*(b).i;\ (m).i = (a).r*(b).i + (a).i*(b).r; }while(0) #define C_MULC(m,a,b) \ do{ (m).r = (a).r*(b).r + (a).i*(b).i;\ (m).i = (a).i*(b).r - (a).r*(b).i; }while(0) #define C_MUL4(m,a,b) C_MUL(m,a,b) # define C_FIXDIV(c,div) /* NOOP */ # define C_MULBYSCALAR( c, s ) \ do{ (c).r *= (s);\ (c).i *= (s); }while(0) #endif #ifndef CHECK_OVERFLOW_OP # define CHECK_OVERFLOW_OP(a,op,b) /* noop */ #endif #ifndef C_ADD #define C_ADD( res, a,b)\ do { \ CHECK_OVERFLOW_OP((a).r,+,(b).r)\ CHECK_OVERFLOW_OP((a).i,+,(b).i)\ (res).r=(a).r+(b).r; (res).i=(a).i+(b).i; \ }while(0) #define C_SUB( res, a,b)\ do { \ CHECK_OVERFLOW_OP((a).r,-,(b).r)\ CHECK_OVERFLOW_OP((a).i,-,(b).i)\ (res).r=(a).r-(b).r; (res).i=(a).i-(b).i; \ }while(0) #define C_ADDTO( res , a)\ do { \ CHECK_OVERFLOW_OP((res).r,+,(a).r)\ CHECK_OVERFLOW_OP((res).i,+,(a).i)\ (res).r += (a).r; (res).i += (a).i;\ }while(0) #define C_SUBFROM( res , a)\ do {\ CHECK_OVERFLOW_OP((res).r,-,(a).r)\ CHECK_OVERFLOW_OP((res).i,-,(a).i)\ (res).r -= (a).r; (res).i -= (a).i; \ }while(0) #endif /* C_ADD defined */ #ifdef FIXED_POINT /*# define KISS_FFT_COS(phase) TRIG_UPSCALE*floor(MIN(32767,MAX(-32767,.5+32768 * cos (phase)))) # define KISS_FFT_SIN(phase) TRIG_UPSCALE*floor(MIN(32767,MAX(-32767,.5+32768 * sin (phase))))*/ # define KISS_FFT_COS(phase) floor(.5+TWID_MAX*cos (phase)) # define KISS_FFT_SIN(phase) floor(.5+TWID_MAX*sin (phase)) # define HALF_OF(x) ((x)>>1) #elif defined(USE_SIMD) # define KISS_FFT_COS(phase) _mm_set1_ps( cos(phase) ) # define KISS_FFT_SIN(phase) _mm_set1_ps( sin(phase) ) # define HALF_OF(x) ((x)*_mm_set1_ps(.5f)) #else # define KISS_FFT_COS(phase) (kiss_fft_scalar) cos(phase) # define KISS_FFT_SIN(phase) (kiss_fft_scalar) sin(phase) # define HALF_OF(x) ((x)*.5f) #endif #define kf_cexp(x,phase) \ do{ \ (x)->r = KISS_FFT_COS(phase);\ (x)->i = KISS_FFT_SIN(phase);\ }while(0) #define kf_cexp2(x,phase) \ do{ \ (x)->r = TRIG_UPSCALE*celt_cos_norm((phase));\ (x)->i = TRIG_UPSCALE*celt_cos_norm((phase)-32768);\ }while(0) #endif /* KISS_FFT_GUTS_H */ opus-1.1.2/celt/arch.h000066400000000000000000000153631264527674100145440ustar00rootroot00000000000000/* Copyright (c) 2003-2008 Jean-Marc Valin Copyright (c) 2007-2008 CSIRO Copyright (c) 2007-2009 Xiph.Org Foundation Written by Jean-Marc Valin */ /** @file arch.h @brief Various architecture definitions for CELT */ /* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - 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. 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 OWNER 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. */ #ifndef ARCH_H #define ARCH_H #include "opus_types.h" #include "opus_defines.h" # if !defined(__GNUC_PREREQ) # if defined(__GNUC__)&&defined(__GNUC_MINOR__) # define __GNUC_PREREQ(_maj,_min) \ ((__GNUC__<<16)+__GNUC_MINOR__>=((_maj)<<16)+(_min)) # else # define __GNUC_PREREQ(_maj,_min) 0 # endif # endif #define CELT_SIG_SCALE 32768.f #define celt_fatal(str) _celt_fatal(str, __FILE__, __LINE__); #ifdef ENABLE_ASSERTIONS #include #include #ifdef __GNUC__ __attribute__((noreturn)) #endif static OPUS_INLINE void _celt_fatal(const char *str, const char *file, int line) { fprintf (stderr, "Fatal (internal) error in %s, line %d: %s\n", file, line, str); abort(); } #define celt_assert(cond) {if (!(cond)) {celt_fatal("assertion failed: " #cond);}} #define celt_assert2(cond, message) {if (!(cond)) {celt_fatal("assertion failed: " #cond "\n" message);}} #else #define celt_assert(cond) #define celt_assert2(cond, message) #endif #define IMUL32(a,b) ((a)*(b)) #define MIN16(a,b) ((a) < (b) ? (a) : (b)) /**< Minimum 16-bit value. */ #define MAX16(a,b) ((a) > (b) ? (a) : (b)) /**< Maximum 16-bit value. */ #define MIN32(a,b) ((a) < (b) ? (a) : (b)) /**< Minimum 32-bit value. */ #define MAX32(a,b) ((a) > (b) ? (a) : (b)) /**< Maximum 32-bit value. */ #define IMIN(a,b) ((a) < (b) ? (a) : (b)) /**< Minimum int value. */ #define IMAX(a,b) ((a) > (b) ? (a) : (b)) /**< Maximum int value. */ #define UADD32(a,b) ((a)+(b)) #define USUB32(a,b) ((a)-(b)) #define PRINT_MIPS(file) #ifdef FIXED_POINT typedef opus_int16 opus_val16; typedef opus_int32 opus_val32; typedef opus_val32 celt_sig; typedef opus_val16 celt_norm; typedef opus_val32 celt_ener; #define Q15ONE 32767 #define SIG_SHIFT 12 #define NORM_SCALING 16384 #define DB_SHIFT 10 #define EPSILON 1 #define VERY_SMALL 0 #define VERY_LARGE16 ((opus_val16)32767) #define Q15_ONE ((opus_val16)32767) #define SCALEIN(a) (a) #define SCALEOUT(a) (a) #define ABS16(x) ((x) < 0 ? (-(x)) : (x)) #define ABS32(x) ((x) < 0 ? (-(x)) : (x)) static OPUS_INLINE opus_int16 SAT16(opus_int32 x) { return x > 32767 ? 32767 : x < -32768 ? -32768 : (opus_int16)x; } #ifdef FIXED_DEBUG #include "fixed_debug.h" #else #include "fixed_generic.h" #ifdef OPUS_ARM_INLINE_EDSP #include "arm/fixed_armv5e.h" #elif defined (OPUS_ARM_INLINE_ASM) #include "arm/fixed_armv4.h" #elif defined (BFIN_ASM) #include "fixed_bfin.h" #elif defined (TI_C5X_ASM) #include "fixed_c5x.h" #elif defined (TI_C6X_ASM) #include "fixed_c6x.h" #endif #endif #else /* FIXED_POINT */ typedef float opus_val16; typedef float opus_val32; typedef float celt_sig; typedef float celt_norm; typedef float celt_ener; #ifdef FLOAT_APPROX /* This code should reliably detect NaN/inf even when -ffast-math is used. Assumes IEEE 754 format. */ static OPUS_INLINE int celt_isnan(float x) { union {float f; opus_uint32 i;} in; in.f = x; return ((in.i>>23)&0xFF)==0xFF && (in.i&0x007FFFFF)!=0; } #else #ifdef __FAST_MATH__ #error Cannot build libopus with -ffast-math unless FLOAT_APPROX is defined. This could result in crashes on extreme (e.g. NaN) input #endif #define celt_isnan(x) ((x)!=(x)) #endif #define Q15ONE 1.0f #define NORM_SCALING 1.f #define EPSILON 1e-15f #define VERY_SMALL 1e-30f #define VERY_LARGE16 1e15f #define Q15_ONE ((opus_val16)1.f) /* This appears to be the same speed as C99's fabsf() but it's more portable. */ #define ABS16(x) ((float)fabs(x)) #define ABS32(x) ((float)fabs(x)) #define QCONST16(x,bits) (x) #define QCONST32(x,bits) (x) #define NEG16(x) (-(x)) #define NEG32(x) (-(x)) #define EXTRACT16(x) (x) #define EXTEND32(x) (x) #define SHR16(a,shift) (a) #define SHL16(a,shift) (a) #define SHR32(a,shift) (a) #define SHL32(a,shift) (a) #define PSHR32(a,shift) (a) #define VSHR32(a,shift) (a) #define PSHR(a,shift) (a) #define SHR(a,shift) (a) #define SHL(a,shift) (a) #define SATURATE(x,a) (x) #define SATURATE16(x) (x) #define ROUND16(a,shift) (a) #define HALF16(x) (.5f*(x)) #define HALF32(x) (.5f*(x)) #define ADD16(a,b) ((a)+(b)) #define SUB16(a,b) ((a)-(b)) #define ADD32(a,b) ((a)+(b)) #define SUB32(a,b) ((a)-(b)) #define MULT16_16_16(a,b) ((a)*(b)) #define MULT16_16(a,b) ((opus_val32)(a)*(opus_val32)(b)) #define MAC16_16(c,a,b) ((c)+(opus_val32)(a)*(opus_val32)(b)) #define MULT16_32_Q15(a,b) ((a)*(b)) #define MULT16_32_Q16(a,b) ((a)*(b)) #define MULT32_32_Q31(a,b) ((a)*(b)) #define MAC16_32_Q15(c,a,b) ((c)+(a)*(b)) #define MAC16_32_Q16(c,a,b) ((c)+(a)*(b)) #define MULT16_16_Q11_32(a,b) ((a)*(b)) #define MULT16_16_Q11(a,b) ((a)*(b)) #define MULT16_16_Q13(a,b) ((a)*(b)) #define MULT16_16_Q14(a,b) ((a)*(b)) #define MULT16_16_Q15(a,b) ((a)*(b)) #define MULT16_16_P15(a,b) ((a)*(b)) #define MULT16_16_P13(a,b) ((a)*(b)) #define MULT16_16_P14(a,b) ((a)*(b)) #define MULT16_32_P16(a,b) ((a)*(b)) #define DIV32_16(a,b) (((opus_val32)(a))/(opus_val16)(b)) #define DIV32(a,b) (((opus_val32)(a))/(opus_val32)(b)) #define SCALEIN(a) ((a)*CELT_SIG_SCALE) #define SCALEOUT(a) ((a)*(1/CELT_SIG_SCALE)) #define SIG2WORD16(x) (x) #endif /* !FIXED_POINT */ #ifndef GLOBAL_STACK_SIZE #ifdef FIXED_POINT #define GLOBAL_STACK_SIZE 100000 #else #define GLOBAL_STACK_SIZE 100000 #endif #endif #endif /* ARCH_H */ opus-1.1.2/celt/arm/000077500000000000000000000000001264527674100142255ustar00rootroot00000000000000opus-1.1.2/celt/arm/arm2gnu.pl000077500000000000000000000250031264527674100161400ustar00rootroot00000000000000#!/usr/bin/perl # Copyright (C) 2002-2013 Xiph.org Foundation # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # - Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # # - 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. # # 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 OWNER # 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. my $bigend; # little/big endian my $nxstack; my $apple = 0; my $symprefix = ""; $nxstack = 0; eval 'exec /usr/local/bin/perl -S $0 ${1+"$@"}' if $running_under_some_shell; while ($ARGV[0] =~ /^-/) { $_ = shift; last if /^--$/; if (/^-n$/) { $nflag++; next; } if (/^--apple$/) { $apple = 1; $symprefix = "_"; next; } die "I don't recognize this switch: $_\\n"; } $printit++ unless $nflag; $\ = "\n"; # automatically add newline on print $n=0; $thumb = 0; # ARM mode by default, not Thumb. @proc_stack = (); printf (" .syntax unified\n"); LINE: while (<>) { # For ADRLs we need to add a new line after the substituted one. $addPadding = 0; # First, we do not dare to touch *anything* inside double quotes, do we? # Second, if you want a dollar character in the string, # insert two of them -- that's how ARM C and assembler treat strings. s/^([A-Za-z_]\w*)[ \t]+DCB[ \t]*\"/$1: .ascii \"/ && do { s/\$\$/\$/g; next }; s/\bDCB\b[ \t]*\"/.ascii \"/ && do { s/\$\$/\$/g; next }; s/^(\S+)\s+RN\s+(\S+)/$1 .req r$2/ && do { s/\$\$/\$/g; next }; # If there's nothing on a line but a comment, don't try to apply any further # substitutions (this is a cheap hack to avoid mucking up the license header) s/^([ \t]*);/$1@/ && do { s/\$\$/\$/g; next }; # If substituted -- leave immediately ! s/@/,:/; s/;/@/; while ( /@.*'/ ) { s/(@.*)'/$1/g; } s/\{FALSE\}/0/g; s/\{TRUE\}/1/g; s/\{(\w\w\w\w+)\}/$1/g; s/\bINCLUDE[ \t]*([^ \t\n]+)/.include \"$1\"/; s/\bGET[ \t]*([^ \t\n]+)/.include \"${ my $x=$1; $x =~ s|\.s|-gnu.S|; \$x }\"/; s/\bIMPORT\b/.extern/; s/\bEXPORT\b\s*/.global $symprefix/; s/^(\s+)\[/$1IF/; s/^(\s+)\|/$1ELSE/; s/^(\s+)\]/$1ENDIF/; s/IF *:DEF:/ .ifdef/; s/IF *:LNOT: *:DEF:/ .ifndef/; s/ELSE/ .else/; s/ENDIF/ .endif/; if( /\bIF\b/ ) { s/\bIF\b/ .if/; s/=/==/; } if ( $n == 2) { s/\$/\\/g; } if ($n == 1) { s/\$//g; s/label//g; $n = 2; } if ( /MACRO/ ) { s/MACRO *\n/.macro/; $n=1; } if ( /\bMEND\b/ ) { s/\bMEND\b/.endm/; $n=0; } # ".rdata" doesn't work in 'as' version 2.13.2, as it is ".rodata" there. # if ( /\bAREA\b/ ) { my $align; $align = "2"; if ( /ALIGN=(\d+)/ ) { $align = $1; } if ( /CODE/ ) { $nxstack = 1; } s/^(.+)CODE(.+)READONLY(.*)/ .text/; s/^(.+)DATA(.+)READONLY(.*)/ .section .rdata/; s/^(.+)\|\|\.data\|\|(.+)/ .data/; s/^(.+)\|\|\.bss\|\|(.+)/ .bss/; s/$/; .p2align $align/; # Enable NEON instructions but don't produce a binary that requires # ARMv7. RVCT does not have equivalent directives, so we just do this # for all CODE areas. if ( /.text/ ) { # Separating .arch, .fpu, etc., by semicolons does not work (gas # thinks the semicolon is part of the arch name, even when there's # whitespace separating them). Sadly this means our line numbers # won't match the original source file (we could use the .line # directive, which is documented to be obsolete, but then gdb will # show the wrong line in the translated source file). s/$/; .arch armv7-a\n .fpu neon\n .object_arch armv4t/ unless ($apple); } } s/\|\|\.constdata\$(\d+)\|\|/.L_CONST$1/; # ||.constdata$3|| s/\|\|\.bss\$(\d+)\|\|/.L_BSS$1/; # ||.bss$2|| s/\|\|\.data\$(\d+)\|\|/.L_DATA$1/; # ||.data$2|| s/\|\|([a-zA-Z0-9_]+)\@([a-zA-Z0-9_]+)\|\|/@ $&/; s/^(\s+)\%(\s)/ .space $1/; s/\|(.+)\.(\d+)\|/\.$1_$2/; # |L80.123| -> .L80_123 s/\bCODE32\b/.code 32/ && do {$thumb = 0}; s/\bCODE16\b/.code 16/ && do {$thumb = 1}; if (/\bPROC\b/) { my $prefix; my $proc; /^([A-Za-z_\.]\w+)\b/; $proc = $1; $prefix = ""; if ($proc) { $prefix = $prefix.sprintf("\t.type\t%s, %%function; ",$proc) unless ($apple); # Make sure we $prefix isn't empty here (for the $apple case). # We handle mangling the label here, make sure it doesn't match # the label handling below (if $prefix would be empty). $prefix = "; "; push(@proc_stack, $proc); s/^[A-Za-z_\.]\w+/$symprefix$&:/; } $prefix = $prefix."\t.thumb_func; " if ($thumb); s/\bPROC\b/@ $&/; $_ = $prefix.$_; } s/^(\s*)(S|Q|SH|U|UQ|UH)ASX\b/$1$2ADDSUBX/; s/^(\s*)(S|Q|SH|U|UQ|UH)SAX\b/$1$2SUBADDX/; if (/\bENDP\b/) { my $proc; s/\bENDP\b/@ $&/; $proc = pop(@proc_stack); $_ = "\t.size $proc, .-$proc".$_ if ($proc && !$apple); } s/\bSUBT\b/@ $&/; s/\bDATA\b/@ $&/; # DATA directive is deprecated -- Asm guide, p.7-25 s/\bKEEP\b/@ $&/; s/\bEXPORTAS\b/@ $&/; s/\|\|(.)+\bEQU\b/@ $&/; s/\|\|([\w\$]+)\|\|/$1/; s/\bENTRY\b/@ $&/; s/\bASSERT\b/@ $&/; s/\bGBLL\b/@ $&/; s/\bGBLA\b/@ $&/; s/^\W+OPT\b/@ $&/; s/:OR:/|/g; s/:SHL:/<>/g; s/:AND:/&/g; s/:LAND:/&&/g; s/CPSR/cpsr/; s/SPSR/spsr/; s/ALIGN$/.balign 4/; s/ALIGN\s+([0-9x]+)$/.balign $1/; s/psr_cxsf/psr_all/; s/LTORG/.ltorg/; s/^([A-Za-z_]\w*)[ \t]+EQU/ .set $1,/; s/^([A-Za-z_]\w*)[ \t]+SETL/ .set $1,/; s/^([A-Za-z_]\w*)[ \t]+SETA/ .set $1,/; s/^([A-Za-z_]\w*)[ \t]+\*/ .set $1,/; # {PC} + 0xdeadfeed --> . + 0xdeadfeed s/\{PC\} \+/ \. +/; # Single hex constant on the line ! # # >>> NOTE <<< # Double-precision floats in gcc are always mixed-endian, which means # bytes in two words are little-endian, but words are big-endian. # So, 0x0000deadfeed0000 would be stored as 0x0000dead at low address # and 0xfeed0000 at high address. # s/\bDCFD\b[ \t]+0x([a-fA-F0-9]{8})([a-fA-F0-9]{8})/.long 0x$1, 0x$2/; # Only decimal constants on the line, no hex ! s/\bDCFD\b[ \t]+([0-9\.\-]+)/.double $1/; # Single hex constant on the line ! # s/\bDCFS\b[ \t]+0x([a-f0-9]{8})([a-f0-9]{8})/.long 0x$1, 0x$2/; # Only decimal constants on the line, no hex ! # s/\bDCFS\b[ \t]+([0-9\.\-]+)/.double $1/; s/\bDCFS[ \t]+0x/.word 0x/; s/\bDCFS\b/.float/; s/^([A-Za-z_]\w*)[ \t]+DCD/$1 .word/; s/\bDCD\b/.word/; s/^([A-Za-z_]\w*)[ \t]+DCW/$1 .short/; s/\bDCW\b/.short/; s/^([A-Za-z_]\w*)[ \t]+DCB/$1 .byte/; s/\bDCB\b/.byte/; s/^([A-Za-z_]\w*)[ \t]+\%/.comm $1,/; s/^[A-Za-z_\.]\w+/$&:/; s/^(\d+)/$1:/; s/\%(\d+)/$1b_or_f/; s/\%[Bb](\d+)/$1b/; s/\%[Ff](\d+)/$1f/; s/\%[Ff][Tt](\d+)/$1f/; s/&([\dA-Fa-f]+)/0x$1/; if ( /\b2_[01]+\b/ ) { s/\b2_([01]+)\b/conv$1&&&&/g; while ( /[01][01][01][01]&&&&/ ) { s/0000&&&&/&&&&0/g; s/0001&&&&/&&&&1/g; s/0010&&&&/&&&&2/g; s/0011&&&&/&&&&3/g; s/0100&&&&/&&&&4/g; s/0101&&&&/&&&&5/g; s/0110&&&&/&&&&6/g; s/0111&&&&/&&&&7/g; s/1000&&&&/&&&&8/g; s/1001&&&&/&&&&9/g; s/1010&&&&/&&&&A/g; s/1011&&&&/&&&&B/g; s/1100&&&&/&&&&C/g; s/1101&&&&/&&&&D/g; s/1110&&&&/&&&&E/g; s/1111&&&&/&&&&F/g; } s/000&&&&/&&&&0/g; s/001&&&&/&&&&1/g; s/010&&&&/&&&&2/g; s/011&&&&/&&&&3/g; s/100&&&&/&&&&4/g; s/101&&&&/&&&&5/g; s/110&&&&/&&&&6/g; s/111&&&&/&&&&7/g; s/00&&&&/&&&&0/g; s/01&&&&/&&&&1/g; s/10&&&&/&&&&2/g; s/11&&&&/&&&&3/g; s/0&&&&/&&&&0/g; s/1&&&&/&&&&1/g; s/conv&&&&/0x/g; } if ( /commandline/) { if( /-bigend/) { $bigend=1; } } if ( /\bDCDU\b/ ) { my $cmd=$_; my $value; my $prefix; my $w1; my $w2; my $w3; my $w4; s/\s+DCDU\b/@ $&/; $cmd =~ /\bDCDU\b\s+0x(\d+)/; $value = $1; $value =~ /(\w\w)(\w\w)(\w\w)(\w\w)/; $w1 = $1; $w2 = $2; $w3 = $3; $w4 = $4; if( $bigend ne "") { # big endian $prefix = "\t.byte\t0x".$w1.";". "\t.byte\t0x".$w2.";". "\t.byte\t0x".$w3.";". "\t.byte\t0x".$w4."; "; } else { # little endian $prefix = "\t.byte\t0x".$w4.";". "\t.byte\t0x".$w3.";". "\t.byte\t0x".$w2.";". "\t.byte\t0x".$w1."; "; } $_=$prefix.$_; } if ( /\badrl\b/i ) { s/\badrl\s+(\w+)\s*,\s*(\w+)/ldr $1,=$2/i; $addPadding = 1; } s/\bEND\b/@ END/; } continue { printf ("%s", $_) if $printit; if ($addPadding != 0) { printf (" mov r0,r0\n"); $addPadding = 0; } } #If we had a code section, mark that this object doesn't need an executable # stack. if ($nxstack && !$apple) { printf (" .section\t.note.GNU-stack,\"\",\%\%progbits\n"); } opus-1.1.2/celt/arm/arm_celt_map.c000066400000000000000000000121111264527674100170100ustar00rootroot00000000000000/* Copyright (c) 2010 Xiph.Org Foundation * Copyright (c) 2013 Parrot */ /* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - 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. 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 OWNER 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. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "pitch.h" #include "kiss_fft.h" #include "mdct.h" #if defined(OPUS_HAVE_RTCD) # if defined(FIXED_POINT) opus_val32 (*const CELT_PITCH_XCORR_IMPL[OPUS_ARCHMASK+1])(const opus_val16 *, const opus_val16 *, opus_val32 *, int , int) = { celt_pitch_xcorr_c, /* ARMv4 */ MAY_HAVE_EDSP(celt_pitch_xcorr), /* EDSP */ MAY_HAVE_MEDIA(celt_pitch_xcorr), /* Media */ MAY_HAVE_NEON(celt_pitch_xcorr) /* NEON */ }; # else /* !FIXED_POINT */ # if defined(OPUS_ARM_MAY_HAVE_NEON_INTR) void (*const CELT_PITCH_XCORR_IMPL[OPUS_ARCHMASK+1])(const opus_val16 *, const opus_val16 *, opus_val32 *, int, int) = { celt_pitch_xcorr_c, /* ARMv4 */ celt_pitch_xcorr_c, /* EDSP */ celt_pitch_xcorr_c, /* Media */ celt_pitch_xcorr_float_neon /* Neon */ }; # endif # endif /* FIXED_POINT */ # if defined(OPUS_ARM_MAY_HAVE_NEON_INTR) # if defined(HAVE_ARM_NE10) # if defined(CUSTOM_MODES) int (*const OPUS_FFT_ALLOC_ARCH_IMPL[OPUS_ARCHMASK+1])(kiss_fft_state *st) = { opus_fft_alloc_arch_c, /* ARMv4 */ opus_fft_alloc_arch_c, /* EDSP */ opus_fft_alloc_arch_c, /* Media */ opus_fft_alloc_arm_neon /* Neon with NE10 library support */ }; void (*const OPUS_FFT_FREE_ARCH_IMPL[OPUS_ARCHMASK+1])(kiss_fft_state *st) = { opus_fft_free_arch_c, /* ARMv4 */ opus_fft_free_arch_c, /* EDSP */ opus_fft_free_arch_c, /* Media */ opus_fft_free_arm_neon /* Neon with NE10 */ }; # endif /* CUSTOM_MODES */ void (*const OPUS_FFT[OPUS_ARCHMASK+1])(const kiss_fft_state *cfg, const kiss_fft_cpx *fin, kiss_fft_cpx *fout) = { opus_fft_c, /* ARMv4 */ opus_fft_c, /* EDSP */ opus_fft_c, /* Media */ opus_fft_neon /* Neon with NE10 */ }; void (*const OPUS_IFFT[OPUS_ARCHMASK+1])(const kiss_fft_state *cfg, const kiss_fft_cpx *fin, kiss_fft_cpx *fout) = { opus_ifft_c, /* ARMv4 */ opus_ifft_c, /* EDSP */ opus_ifft_c, /* Media */ opus_ifft_neon /* Neon with NE10 */ }; void (*const CLT_MDCT_FORWARD_IMPL[OPUS_ARCHMASK+1])(const mdct_lookup *l, kiss_fft_scalar *in, kiss_fft_scalar * OPUS_RESTRICT out, const opus_val16 *window, int overlap, int shift, int stride, int arch) = { clt_mdct_forward_c, /* ARMv4 */ clt_mdct_forward_c, /* EDSP */ clt_mdct_forward_c, /* Media */ clt_mdct_forward_neon /* Neon with NE10 */ }; void (*const CLT_MDCT_BACKWARD_IMPL[OPUS_ARCHMASK+1])(const mdct_lookup *l, kiss_fft_scalar *in, kiss_fft_scalar * OPUS_RESTRICT out, const opus_val16 *window, int overlap, int shift, int stride, int arch) = { clt_mdct_backward_c, /* ARMv4 */ clt_mdct_backward_c, /* EDSP */ clt_mdct_backward_c, /* Media */ clt_mdct_backward_neon /* Neon with NE10 */ }; # endif /* HAVE_ARM_NE10 */ # endif /* OPUS_ARM_MAY_HAVE_NEON_INTR */ #endif /* OPUS_HAVE_RTCD */ opus-1.1.2/celt/arm/armcpu.c000066400000000000000000000116511264527674100156640ustar00rootroot00000000000000/* Copyright (c) 2010 Xiph.Org Foundation * Copyright (c) 2013 Parrot */ /* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - 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. 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 OWNER 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. */ /* Original code from libtheora modified to suit to Opus */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #ifdef OPUS_HAVE_RTCD #include "armcpu.h" #include "cpu_support.h" #include "os_support.h" #include "opus_types.h" #define OPUS_CPU_ARM_V4 (1) #define OPUS_CPU_ARM_EDSP (1<<1) #define OPUS_CPU_ARM_MEDIA (1<<2) #define OPUS_CPU_ARM_NEON (1<<3) #if defined(_MSC_VER) /*For GetExceptionCode() and EXCEPTION_ILLEGAL_INSTRUCTION.*/ # define WIN32_LEAN_AND_MEAN # define WIN32_EXTRA_LEAN # include static OPUS_INLINE opus_uint32 opus_cpu_capabilities(void){ opus_uint32 flags; flags=0; /* MSVC has no OPUS_INLINE __asm support for ARM, but it does let you __emit * instructions via their assembled hex code. * All of these instructions should be essentially nops. */ # if defined(OPUS_ARM_MAY_HAVE_EDSP) __try{ /*PLD [r13]*/ __emit(0xF5DDF000); flags|=OPUS_CPU_ARM_EDSP; } __except(GetExceptionCode()==EXCEPTION_ILLEGAL_INSTRUCTION){ /*Ignore exception.*/ } # if defined(OPUS_ARM_MAY_HAVE_MEDIA) __try{ /*SHADD8 r3,r3,r3*/ __emit(0xE6333F93); flags|=OPUS_CPU_ARM_MEDIA; } __except(GetExceptionCode()==EXCEPTION_ILLEGAL_INSTRUCTION){ /*Ignore exception.*/ } # if defined(OPUS_ARM_MAY_HAVE_NEON) || defined(OPUS_ARM_MAY_HAVE_NEON_INTR) __try{ /*VORR q0,q0,q0*/ __emit(0xF2200150); flags|=OPUS_CPU_ARM_NEON; } __except(GetExceptionCode()==EXCEPTION_ILLEGAL_INSTRUCTION){ /*Ignore exception.*/ } # endif # endif # endif return flags; } #elif defined(__linux__) /* Linux based */ opus_uint32 opus_cpu_capabilities(void) { opus_uint32 flags = 0; FILE *cpuinfo; /* Reading /proc/self/auxv would be easier, but that doesn't work reliably on * Android */ cpuinfo = fopen("/proc/cpuinfo", "r"); if(cpuinfo != NULL) { /* 512 should be enough for anybody (it's even enough for all the flags that * x86 has accumulated... so far). */ char buf[512]; while(fgets(buf, 512, cpuinfo) != NULL) { # if defined(OPUS_ARM_MAY_HAVE_EDSP) || defined(OPUS_ARM_MAY_HAVE_NEON) || defined(OPUS_ARM_MAY_HAVE_NEON_INTR) /* Search for edsp and neon flag */ if(memcmp(buf, "Features", 8) == 0) { char *p; # if defined(OPUS_ARM_MAY_HAVE_EDSP) p = strstr(buf, " edsp"); if(p != NULL && (p[5] == ' ' || p[5] == '\n')) flags |= OPUS_CPU_ARM_EDSP; # endif # if defined(OPUS_ARM_MAY_HAVE_NEON) || defined(OPUS_ARM_MAY_HAVE_NEON_INTR) p = strstr(buf, " neon"); if(p != NULL && (p[5] == ' ' || p[5] == '\n')) flags |= OPUS_CPU_ARM_NEON; # endif } # endif # if defined(OPUS_ARM_MAY_HAVE_MEDIA) /* Search for media capabilities (>= ARMv6) */ if(memcmp(buf, "CPU architecture:", 17) == 0) { int version; version = atoi(buf+17); if(version >= 6) flags |= OPUS_CPU_ARM_MEDIA; } # endif } fclose(cpuinfo); } return flags; } #else /* The feature registers which can tell us what the processor supports are * accessible in priveleged modes only, so we can't have a general user-space * detection method like on x86.*/ # error "Configured to use ARM asm but no CPU detection method available for " \ "your platform. Reconfigure with --disable-rtcd (or send patches)." #endif int opus_select_arch(void) { opus_uint32 flags = opus_cpu_capabilities(); int arch = 0; if(!(flags & OPUS_CPU_ARM_EDSP)) return arch; arch++; if(!(flags & OPUS_CPU_ARM_MEDIA)) return arch; arch++; if(!(flags & OPUS_CPU_ARM_NEON)) return arch; arch++; return arch; } #endif opus-1.1.2/celt/arm/armcpu.h000066400000000000000000000044571264527674100156770ustar00rootroot00000000000000/* Copyright (c) 2010 Xiph.Org Foundation * Copyright (c) 2013 Parrot */ /* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - 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. 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 OWNER 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. */ #if !defined(ARMCPU_H) # define ARMCPU_H # if defined(OPUS_ARM_MAY_HAVE_EDSP) # define MAY_HAVE_EDSP(name) name ## _edsp # else # define MAY_HAVE_EDSP(name) name ## _c # endif # if defined(OPUS_ARM_MAY_HAVE_MEDIA) # define MAY_HAVE_MEDIA(name) name ## _media # else # define MAY_HAVE_MEDIA(name) MAY_HAVE_EDSP(name) # endif # if defined(OPUS_ARM_MAY_HAVE_NEON) # define MAY_HAVE_NEON(name) name ## _neon # else # define MAY_HAVE_NEON(name) MAY_HAVE_MEDIA(name) # endif # if defined(OPUS_ARM_PRESUME_EDSP) # define PRESUME_EDSP(name) name ## _edsp # else # define PRESUME_EDSP(name) name ## _c # endif # if defined(OPUS_ARM_PRESUME_MEDIA) # define PRESUME_MEDIA(name) name ## _media # else # define PRESUME_MEDIA(name) PRESUME_EDSP(name) # endif # if defined(OPUS_ARM_PRESUME_NEON) # define PRESUME_NEON(name) name ## _neon # else # define PRESUME_NEON(name) PRESUME_MEDIA(name) # endif # if defined(OPUS_HAVE_RTCD) int opus_select_arch(void); # endif #endif opus-1.1.2/celt/arm/armopts.s.in000066400000000000000000000032631264527674100165070ustar00rootroot00000000000000/* Copyright (C) 2013 Mozilla Corporation */ /* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - 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. 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 OWNER 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. */ ; Set the following to 1 if we have EDSP instructions ; (LDRD/STRD, etc., ARMv5E and later). OPUS_ARM_MAY_HAVE_EDSP * @OPUS_ARM_MAY_HAVE_EDSP@ ; Set the following to 1 if we have ARMv6 media instructions. OPUS_ARM_MAY_HAVE_MEDIA * @OPUS_ARM_MAY_HAVE_MEDIA@ ; Set the following to 1 if we have NEON (some ARMv7) OPUS_ARM_MAY_HAVE_NEON * @OPUS_ARM_MAY_HAVE_NEON@ END opus-1.1.2/celt/arm/celt_ne10_fft.c000066400000000000000000000131361264527674100170060ustar00rootroot00000000000000/* Copyright (c) 2015 Xiph.Org Foundation Written by Viswanath Puttagunta */ /** @file celt_ne10_fft.c @brief ARM Neon optimizations for fft using NE10 library */ /* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - 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. 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 OWNER 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. */ #ifndef SKIP_CONFIG_H #ifdef HAVE_CONFIG_H #include "config.h" #endif #endif #include #include #include "os_support.h" #include "kiss_fft.h" #include "stack_alloc.h" #if !defined(FIXED_POINT) # define NE10_FFT_ALLOC_C2C_TYPE_NEON ne10_fft_alloc_c2c_float32_neon # define NE10_FFT_CFG_TYPE_T ne10_fft_cfg_float32_t # define NE10_FFT_STATE_TYPE_T ne10_fft_state_float32_t # define NE10_FFT_DESTROY_C2C_TYPE ne10_fft_destroy_c2c_float32 # define NE10_FFT_CPX_TYPE_T ne10_fft_cpx_float32_t # define NE10_FFT_C2C_1D_TYPE_NEON ne10_fft_c2c_1d_float32_neon #else # define NE10_FFT_ALLOC_C2C_TYPE_NEON(nfft) ne10_fft_alloc_c2c_int32_neon(nfft) # define NE10_FFT_CFG_TYPE_T ne10_fft_cfg_int32_t # define NE10_FFT_STATE_TYPE_T ne10_fft_state_int32_t # define NE10_FFT_DESTROY_C2C_TYPE ne10_fft_destroy_c2c_int32 # define NE10_FFT_DESTROY_C2C_TYPE ne10_fft_destroy_c2c_int32 # define NE10_FFT_CPX_TYPE_T ne10_fft_cpx_int32_t # define NE10_FFT_C2C_1D_TYPE_NEON ne10_fft_c2c_1d_int32_neon #endif #if defined(CUSTOM_MODES) /* nfft lengths in NE10 that support scaled fft */ # define NE10_FFTSCALED_SUPPORT_MAX 4 static const int ne10_fft_scaled_support[NE10_FFTSCALED_SUPPORT_MAX] = { 480, 240, 120, 60 }; int opus_fft_alloc_arm_neon(kiss_fft_state *st) { int i; size_t memneeded = sizeof(struct arch_fft_state); st->arch_fft = (arch_fft_state *)opus_alloc(memneeded); if (!st->arch_fft) return -1; for (i = 0; i < NE10_FFTSCALED_SUPPORT_MAX; i++) { if(st->nfft == ne10_fft_scaled_support[i]) break; } if (i == NE10_FFTSCALED_SUPPORT_MAX) { /* This nfft length (scaled fft) is not supported in NE10 */ st->arch_fft->is_supported = 0; st->arch_fft->priv = NULL; } else { st->arch_fft->is_supported = 1; st->arch_fft->priv = (void *)NE10_FFT_ALLOC_C2C_TYPE_NEON(st->nfft); if (st->arch_fft->priv == NULL) { return -1; } } return 0; } void opus_fft_free_arm_neon(kiss_fft_state *st) { NE10_FFT_CFG_TYPE_T cfg; if (!st->arch_fft) return; cfg = (NE10_FFT_CFG_TYPE_T)st->arch_fft->priv; if (cfg) NE10_FFT_DESTROY_C2C_TYPE(cfg); opus_free(st->arch_fft); } #endif void opus_fft_neon(const kiss_fft_state *st, const kiss_fft_cpx *fin, kiss_fft_cpx *fout) { NE10_FFT_STATE_TYPE_T state; NE10_FFT_CFG_TYPE_T cfg = &state; VARDECL(NE10_FFT_CPX_TYPE_T, buffer); SAVE_STACK; ALLOC(buffer, st->nfft, NE10_FFT_CPX_TYPE_T); if (!st->arch_fft->is_supported) { /* This nfft length (scaled fft) not supported in NE10 */ opus_fft_c(st, fin, fout); } else { memcpy((void *)cfg, st->arch_fft->priv, sizeof(NE10_FFT_STATE_TYPE_T)); state.buffer = (NE10_FFT_CPX_TYPE_T *)&buffer[0]; #if !defined(FIXED_POINT) state.is_forward_scaled = 1; NE10_FFT_C2C_1D_TYPE_NEON((NE10_FFT_CPX_TYPE_T *)fout, (NE10_FFT_CPX_TYPE_T *)fin, cfg, 0); #else NE10_FFT_C2C_1D_TYPE_NEON((NE10_FFT_CPX_TYPE_T *)fout, (NE10_FFT_CPX_TYPE_T *)fin, cfg, 0, 1); #endif } RESTORE_STACK; } void opus_ifft_neon(const kiss_fft_state *st, const kiss_fft_cpx *fin, kiss_fft_cpx *fout) { NE10_FFT_STATE_TYPE_T state; NE10_FFT_CFG_TYPE_T cfg = &state; VARDECL(NE10_FFT_CPX_TYPE_T, buffer); SAVE_STACK; ALLOC(buffer, st->nfft, NE10_FFT_CPX_TYPE_T); if (!st->arch_fft->is_supported) { /* This nfft length (scaled fft) not supported in NE10 */ opus_ifft_c(st, fin, fout); } else { memcpy((void *)cfg, st->arch_fft->priv, sizeof(NE10_FFT_STATE_TYPE_T)); state.buffer = (NE10_FFT_CPX_TYPE_T *)&buffer[0]; #if !defined(FIXED_POINT) state.is_backward_scaled = 0; NE10_FFT_C2C_1D_TYPE_NEON((NE10_FFT_CPX_TYPE_T *)fout, (NE10_FFT_CPX_TYPE_T *)fin, cfg, 1); #else NE10_FFT_C2C_1D_TYPE_NEON((NE10_FFT_CPX_TYPE_T *)fout, (NE10_FFT_CPX_TYPE_T *)fin, cfg, 1, 0); #endif } RESTORE_STACK; } opus-1.1.2/celt/arm/celt_ne10_mdct.c000066400000000000000000000176661264527674100171720ustar00rootroot00000000000000/* Copyright (c) 2015 Xiph.Org Foundation Written by Viswanath Puttagunta */ /** @file celt_ne10_mdct.c @brief ARM Neon optimizations for mdct using NE10 library */ /* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - 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. 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 OWNER 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. */ #ifndef SKIP_CONFIG_H #ifdef HAVE_CONFIG_H #include "config.h" #endif #endif #include "kiss_fft.h" #include "_kiss_fft_guts.h" #include "mdct.h" #include "stack_alloc.h" void clt_mdct_forward_neon(const mdct_lookup *l, kiss_fft_scalar *in, kiss_fft_scalar * OPUS_RESTRICT out, const opus_val16 *window, int overlap, int shift, int stride, int arch) { int i; int N, N2, N4; VARDECL(kiss_fft_scalar, f); VARDECL(kiss_fft_cpx, f2); const kiss_fft_state *st = l->kfft[shift]; const kiss_twiddle_scalar *trig; SAVE_STACK; N = l->n; trig = l->trig; for (i=0;i>= 1; trig += N; } N2 = N>>1; N4 = N>>2; ALLOC(f, N2, kiss_fft_scalar); ALLOC(f2, N4, kiss_fft_cpx); /* Consider the input to be composed of four blocks: [a, b, c, d] */ /* Window, shuffle, fold */ { /* Temp pointers to make it really clear to the compiler what we're doing */ const kiss_fft_scalar * OPUS_RESTRICT xp1 = in+(overlap>>1); const kiss_fft_scalar * OPUS_RESTRICT xp2 = in+N2-1+(overlap>>1); kiss_fft_scalar * OPUS_RESTRICT yp = f; const opus_val16 * OPUS_RESTRICT wp1 = window+(overlap>>1); const opus_val16 * OPUS_RESTRICT wp2 = window+(overlap>>1)-1; for(i=0;i<((overlap+3)>>2);i++) { /* Real part arranged as -d-cR, Imag part arranged as -b+aR*/ *yp++ = MULT16_32_Q15(*wp2, xp1[N2]) + MULT16_32_Q15(*wp1,*xp2); *yp++ = MULT16_32_Q15(*wp1, *xp1) - MULT16_32_Q15(*wp2, xp2[-N2]); xp1+=2; xp2-=2; wp1+=2; wp2-=2; } wp1 = window; wp2 = window+overlap-1; for(;i>2);i++) { /* Real part arranged as a-bR, Imag part arranged as -c-dR */ *yp++ = *xp2; *yp++ = *xp1; xp1+=2; xp2-=2; } for(;ii,t[N4+i]) - S_MUL(fp->r,t[i]); yi = S_MUL(fp->r,t[N4+i]) + S_MUL(fp->i,t[i]); *yp1 = yr; *yp2 = yi; fp++; yp1 += 2*stride; yp2 -= 2*stride; } } RESTORE_STACK; } void clt_mdct_backward_neon(const mdct_lookup *l, kiss_fft_scalar *in, kiss_fft_scalar * OPUS_RESTRICT out, const opus_val16 * OPUS_RESTRICT window, int overlap, int shift, int stride, int arch) { int i; int N, N2, N4; VARDECL(kiss_fft_scalar, f); const kiss_twiddle_scalar *trig; const kiss_fft_state *st = l->kfft[shift]; N = l->n; trig = l->trig; for (i=0;i>= 1; trig += N; } N2 = N>>1; N4 = N>>2; ALLOC(f, N2, kiss_fft_scalar); /* Pre-rotate */ { /* Temp pointers to make it really clear to the compiler what we're doing */ const kiss_fft_scalar * OPUS_RESTRICT xp1 = in; const kiss_fft_scalar * OPUS_RESTRICT xp2 = in+stride*(N2-1); kiss_fft_scalar * OPUS_RESTRICT yp = f; const kiss_twiddle_scalar * OPUS_RESTRICT t = &trig[0]; for(i=0;i>1)), arch); /* Post-rotate and de-shuffle from both ends of the buffer at once to make it in-place. */ { kiss_fft_scalar * yp0 = out+(overlap>>1); kiss_fft_scalar * yp1 = out+(overlap>>1)+N2-2; const kiss_twiddle_scalar *t = &trig[0]; /* Loop to (N4+1)>>1 to handle odd N4. When N4 is odd, the middle pair will be computed twice. */ for(i=0;i<(N4+1)>>1;i++) { kiss_fft_scalar re, im, yr, yi; kiss_twiddle_scalar t0, t1; re = yp0[0]; im = yp0[1]; t0 = t[i]; t1 = t[N4+i]; /* We'd scale up by 2 here, but instead it's done when mixing the windows */ yr = S_MUL(re,t0) + S_MUL(im,t1); yi = S_MUL(re,t1) - S_MUL(im,t0); re = yp1[0]; im = yp1[1]; yp0[0] = yr; yp1[1] = yi; t0 = t[(N4-i-1)]; t1 = t[(N2-i-1)]; /* We'd scale up by 2 here, but instead it's done when mixing the windows */ yr = S_MUL(re,t0) + S_MUL(im,t1); yi = S_MUL(re,t1) - S_MUL(im,t0); yp1[0] = yr; yp0[1] = yi; yp0 += 2; yp1 -= 2; } } /* Mirror on both sides for TDAC */ { kiss_fft_scalar * OPUS_RESTRICT xp1 = out+overlap-1; kiss_fft_scalar * OPUS_RESTRICT yp1 = out; const opus_val16 * OPUS_RESTRICT wp1 = window; const opus_val16 * OPUS_RESTRICT wp2 = window+overlap-1; for(i = 0; i < overlap/2; i++) { kiss_fft_scalar x1, x2; x1 = *xp1; x2 = *yp1; *yp1++ = MULT16_32_Q15(*wp2, x2) - MULT16_32_Q15(*wp1, x1); *xp1-- = MULT16_32_Q15(*wp1, x2) + MULT16_32_Q15(*wp2, x1); wp1++; wp2--; } } RESTORE_STACK; } opus-1.1.2/celt/arm/celt_neon_intr.c000066400000000000000000000166211264527674100174010ustar00rootroot00000000000000/* Copyright (c) 2014-2015 Xiph.Org Foundation Written by Viswanath Puttagunta */ /** @file celt_neon_intr.c @brief ARM Neon Intrinsic optimizations for celt */ /* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - 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. 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 OWNER 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. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include "../pitch.h" #if !defined(FIXED_POINT) /* * Function: xcorr_kernel_neon_float * --------------------------------- * Computes 4 correlation values and stores them in sum[4] */ static void xcorr_kernel_neon_float(const float32_t *x, const float32_t *y, float32_t sum[4], int len) { float32x4_t YY[3]; float32x4_t YEXT[3]; float32x4_t XX[2]; float32x2_t XX_2; float32x4_t SUMM; const float32_t *xi = x; const float32_t *yi = y; celt_assert(len>0); YY[0] = vld1q_f32(yi); SUMM = vdupq_n_f32(0); /* Consume 8 elements in x vector and 12 elements in y * vector. However, the 12'th element never really gets * touched in this loop. So, if len == 8, then we only * must access y[0] to y[10]. y[11] must not be accessed * hence make sure len > 8 and not len >= 8 */ while (len > 8) { yi += 4; YY[1] = vld1q_f32(yi); yi += 4; YY[2] = vld1q_f32(yi); XX[0] = vld1q_f32(xi); xi += 4; XX[1] = vld1q_f32(xi); xi += 4; SUMM = vmlaq_lane_f32(SUMM, YY[0], vget_low_f32(XX[0]), 0); YEXT[0] = vextq_f32(YY[0], YY[1], 1); SUMM = vmlaq_lane_f32(SUMM, YEXT[0], vget_low_f32(XX[0]), 1); YEXT[1] = vextq_f32(YY[0], YY[1], 2); SUMM = vmlaq_lane_f32(SUMM, YEXT[1], vget_high_f32(XX[0]), 0); YEXT[2] = vextq_f32(YY[0], YY[1], 3); SUMM = vmlaq_lane_f32(SUMM, YEXT[2], vget_high_f32(XX[0]), 1); SUMM = vmlaq_lane_f32(SUMM, YY[1], vget_low_f32(XX[1]), 0); YEXT[0] = vextq_f32(YY[1], YY[2], 1); SUMM = vmlaq_lane_f32(SUMM, YEXT[0], vget_low_f32(XX[1]), 1); YEXT[1] = vextq_f32(YY[1], YY[2], 2); SUMM = vmlaq_lane_f32(SUMM, YEXT[1], vget_high_f32(XX[1]), 0); YEXT[2] = vextq_f32(YY[1], YY[2], 3); SUMM = vmlaq_lane_f32(SUMM, YEXT[2], vget_high_f32(XX[1]), 1); YY[0] = YY[2]; len -= 8; } /* Consume 4 elements in x vector and 8 elements in y * vector. However, the 8'th element in y never really gets * touched in this loop. So, if len == 4, then we only * must access y[0] to y[6]. y[7] must not be accessed * hence make sure len>4 and not len>=4 */ if (len > 4) { yi += 4; YY[1] = vld1q_f32(yi); XX[0] = vld1q_f32(xi); xi += 4; SUMM = vmlaq_lane_f32(SUMM, YY[0], vget_low_f32(XX[0]), 0); YEXT[0] = vextq_f32(YY[0], YY[1], 1); SUMM = vmlaq_lane_f32(SUMM, YEXT[0], vget_low_f32(XX[0]), 1); YEXT[1] = vextq_f32(YY[0], YY[1], 2); SUMM = vmlaq_lane_f32(SUMM, YEXT[1], vget_high_f32(XX[0]), 0); YEXT[2] = vextq_f32(YY[0], YY[1], 3); SUMM = vmlaq_lane_f32(SUMM, YEXT[2], vget_high_f32(XX[0]), 1); YY[0] = YY[1]; len -= 4; } while (--len > 0) { XX_2 = vld1_dup_f32(xi++); SUMM = vmlaq_lane_f32(SUMM, YY[0], XX_2, 0); YY[0]= vld1q_f32(++yi); } XX_2 = vld1_dup_f32(xi); SUMM = vmlaq_lane_f32(SUMM, YY[0], XX_2, 0); vst1q_f32(sum, SUMM); } /* * Function: xcorr_kernel_neon_float_process1 * --------------------------------- * Computes single correlation values and stores in *sum */ static void xcorr_kernel_neon_float_process1(const float32_t *x, const float32_t *y, float32_t *sum, int len) { float32x4_t XX[4]; float32x4_t YY[4]; float32x2_t XX_2; float32x2_t YY_2; float32x4_t SUMM; float32x2_t SUMM_2[2]; const float32_t *xi = x; const float32_t *yi = y; SUMM = vdupq_n_f32(0); /* Work on 16 values per iteration */ while (len >= 16) { XX[0] = vld1q_f32(xi); xi += 4; XX[1] = vld1q_f32(xi); xi += 4; XX[2] = vld1q_f32(xi); xi += 4; XX[3] = vld1q_f32(xi); xi += 4; YY[0] = vld1q_f32(yi); yi += 4; YY[1] = vld1q_f32(yi); yi += 4; YY[2] = vld1q_f32(yi); yi += 4; YY[3] = vld1q_f32(yi); yi += 4; SUMM = vmlaq_f32(SUMM, YY[0], XX[0]); SUMM = vmlaq_f32(SUMM, YY[1], XX[1]); SUMM = vmlaq_f32(SUMM, YY[2], XX[2]); SUMM = vmlaq_f32(SUMM, YY[3], XX[3]); len -= 16; } /* Work on 8 values */ if (len >= 8) { XX[0] = vld1q_f32(xi); xi += 4; XX[1] = vld1q_f32(xi); xi += 4; YY[0] = vld1q_f32(yi); yi += 4; YY[1] = vld1q_f32(yi); yi += 4; SUMM = vmlaq_f32(SUMM, YY[0], XX[0]); SUMM = vmlaq_f32(SUMM, YY[1], XX[1]); len -= 8; } /* Work on 4 values */ if (len >= 4) { XX[0] = vld1q_f32(xi); xi += 4; YY[0] = vld1q_f32(yi); yi += 4; SUMM = vmlaq_f32(SUMM, YY[0], XX[0]); len -= 4; } /* Start accumulating results */ SUMM_2[0] = vget_low_f32(SUMM); if (len >= 2) { /* While at it, consume 2 more values if available */ XX_2 = vld1_f32(xi); xi += 2; YY_2 = vld1_f32(yi); yi += 2; SUMM_2[0] = vmla_f32(SUMM_2[0], YY_2, XX_2); len -= 2; } SUMM_2[1] = vget_high_f32(SUMM); SUMM_2[0] = vadd_f32(SUMM_2[0], SUMM_2[1]); SUMM_2[0] = vpadd_f32(SUMM_2[0], SUMM_2[0]); /* Ok, now we have result accumulated in SUMM_2[0].0 */ if (len > 0) { /* Case when you have one value left */ XX_2 = vld1_dup_f32(xi); YY_2 = vld1_dup_f32(yi); SUMM_2[0] = vmla_f32(SUMM_2[0], XX_2, YY_2); } vst1_lane_f32(sum, SUMM_2[0], 0); } void celt_pitch_xcorr_float_neon(const opus_val16 *_x, const opus_val16 *_y, opus_val32 *xcorr, int len, int max_pitch) { int i; celt_assert(max_pitch > 0); celt_assert((((unsigned char *)_x-(unsigned char *)NULL)&3)==0); for (i = 0; i < (max_pitch-3); i += 4) { xcorr_kernel_neon_float((const float32_t *)_x, (const float32_t *)_y+i, (float32_t *)xcorr+i, len); } /* In case max_pitch isn't multiple of 4 * compute single correlation value per iteration */ for (; i < max_pitch; i++) { xcorr_kernel_neon_float_process1((const float32_t *)_x, (const float32_t *)_y+i, (float32_t *)xcorr+i, len); } } #endif opus-1.1.2/celt/arm/celt_pitch_xcorr_arm.s000066400000000000000000000470701264527674100206130ustar00rootroot00000000000000; Copyright (c) 2007-2008 CSIRO ; Copyright (c) 2007-2009 Xiph.Org Foundation ; Copyright (c) 2013 Parrot ; Written by Aurélien Zanelli ; ; Redistribution and use in source and binary forms, with or without ; modification, are permitted provided that the following conditions ; are met: ; ; - Redistributions of source code must retain the above copyright ; notice, this list of conditions and the following disclaimer. ; ; - 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. ; ; 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 OWNER ; 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. AREA |.text|, CODE, READONLY GET celt/arm/armopts.s IF OPUS_ARM_MAY_HAVE_EDSP EXPORT celt_pitch_xcorr_edsp ENDIF IF OPUS_ARM_MAY_HAVE_NEON EXPORT celt_pitch_xcorr_neon ENDIF IF OPUS_ARM_MAY_HAVE_NEON ; Compute sum[k]=sum(x[j]*y[j+k],j=0...len-1), k=0...3 xcorr_kernel_neon PROC xcorr_kernel_neon_start ; input: ; r3 = int len ; r4 = opus_val16 *x ; r5 = opus_val16 *y ; q0 = opus_val32 sum[4] ; output: ; q0 = opus_val32 sum[4] ; preserved: r0-r3, r6-r11, d2, q4-q7, q9-q15 ; internal usage: ; r12 = int j ; d3 = y_3|y_2|y_1|y_0 ; q2 = y_B|y_A|y_9|y_8|y_7|y_6|y_5|y_4 ; q3 = x_7|x_6|x_5|x_4|x_3|x_2|x_1|x_0 ; q8 = scratch ; ; Load y[0...3] ; This requires len>0 to always be valid (which we assert in the C code). VLD1.16 {d5}, [r5]! SUBS r12, r3, #8 BLE xcorr_kernel_neon_process4 ; Process 8 samples at a time. ; This loop loads one y value more than we actually need. Therefore we have to ; stop as soon as there are 8 or fewer samples left (instead of 7), to avoid ; reading past the end of the array. xcorr_kernel_neon_process8 ; This loop has 19 total instructions (10 cycles to issue, minimum), with ; - 2 cycles of ARM insrtuctions, ; - 10 cycles of load/store/byte permute instructions, and ; - 9 cycles of data processing instructions. ; On a Cortex A8, we dual-issue the maximum amount (9 cycles) between the ; latter two categories, meaning the whole loop should run in 10 cycles per ; iteration, barring cache misses. ; ; Load x[0...7] VLD1.16 {d6, d7}, [r4]! ; Unlike VMOV, VAND is a data processsing instruction (and doesn't get ; assembled to VMOV, like VORR would), so it dual-issues with the prior VLD1. VAND d3, d5, d5 SUBS r12, r12, #8 ; Load y[4...11] VLD1.16 {d4, d5}, [r5]! VMLAL.S16 q0, d3, d6[0] VEXT.16 d16, d3, d4, #1 VMLAL.S16 q0, d4, d7[0] VEXT.16 d17, d4, d5, #1 VMLAL.S16 q0, d16, d6[1] VEXT.16 d16, d3, d4, #2 VMLAL.S16 q0, d17, d7[1] VEXT.16 d17, d4, d5, #2 VMLAL.S16 q0, d16, d6[2] VEXT.16 d16, d3, d4, #3 VMLAL.S16 q0, d17, d7[2] VEXT.16 d17, d4, d5, #3 VMLAL.S16 q0, d16, d6[3] VMLAL.S16 q0, d17, d7[3] BGT xcorr_kernel_neon_process8 ; Process 4 samples here if we have > 4 left (still reading one extra y value). xcorr_kernel_neon_process4 ADDS r12, r12, #4 BLE xcorr_kernel_neon_process2 ; Load x[0...3] VLD1.16 d6, [r4]! ; Use VAND since it's a data processing instruction again. VAND d4, d5, d5 SUB r12, r12, #4 ; Load y[4...7] VLD1.16 d5, [r5]! VMLAL.S16 q0, d4, d6[0] VEXT.16 d16, d4, d5, #1 VMLAL.S16 q0, d16, d6[1] VEXT.16 d16, d4, d5, #2 VMLAL.S16 q0, d16, d6[2] VEXT.16 d16, d4, d5, #3 VMLAL.S16 q0, d16, d6[3] ; Process 2 samples here if we have > 2 left (still reading one extra y value). xcorr_kernel_neon_process2 ADDS r12, r12, #2 BLE xcorr_kernel_neon_process1 ; Load x[0...1] VLD2.16 {d6[],d7[]}, [r4]! ; Use VAND since it's a data processing instruction again. VAND d4, d5, d5 SUB r12, r12, #2 ; Load y[4...5] VLD1.32 {d5[]}, [r5]! VMLAL.S16 q0, d4, d6 VEXT.16 d16, d4, d5, #1 ; Replace bottom copy of {y5,y4} in d5 with {y3,y2} from d4, using VSRI ; instead of VEXT, since it's a data-processing instruction. VSRI.64 d5, d4, #32 VMLAL.S16 q0, d16, d7 ; Process 1 sample using the extra y value we loaded above. xcorr_kernel_neon_process1 ; Load next *x VLD1.16 {d6[]}, [r4]! ADDS r12, r12, #1 ; y[0...3] are left in d5 from prior iteration(s) (if any) VMLAL.S16 q0, d5, d6 MOVLE pc, lr ; Now process 1 last sample, not reading ahead. ; Load last *y VLD1.16 {d4[]}, [r5]! VSRI.64 d4, d5, #16 ; Load last *x VLD1.16 {d6[]}, [r4]! VMLAL.S16 q0, d4, d6 MOV pc, lr ENDP ; opus_val32 celt_pitch_xcorr_neon(opus_val16 *_x, opus_val16 *_y, ; opus_val32 *xcorr, int len, int max_pitch) celt_pitch_xcorr_neon PROC ; input: ; r0 = opus_val16 *_x ; r1 = opus_val16 *_y ; r2 = opus_val32 *xcorr ; r3 = int len ; output: ; r0 = int maxcorr ; internal usage: ; r4 = opus_val16 *x (for xcorr_kernel_neon()) ; r5 = opus_val16 *y (for xcorr_kernel_neon()) ; r6 = int max_pitch ; r12 = int j ; q15 = int maxcorr[4] (q15 is not used by xcorr_kernel_neon()) STMFD sp!, {r4-r6, lr} LDR r6, [sp, #16] VMOV.S32 q15, #1 ; if (max_pitch < 4) goto celt_pitch_xcorr_neon_process4_done SUBS r6, r6, #4 BLT celt_pitch_xcorr_neon_process4_done celt_pitch_xcorr_neon_process4 ; xcorr_kernel_neon parameters: ; r3 = len, r4 = _x, r5 = _y, q0 = {0, 0, 0, 0} MOV r4, r0 MOV r5, r1 VEOR q0, q0, q0 ; xcorr_kernel_neon only modifies r4, r5, r12, and q0...q3. ; So we don't save/restore any other registers. BL xcorr_kernel_neon_start SUBS r6, r6, #4 VST1.32 {q0}, [r2]! ; _y += 4 ADD r1, r1, #8 VMAX.S32 q15, q15, q0 ; if (max_pitch < 4) goto celt_pitch_xcorr_neon_process4_done BGE celt_pitch_xcorr_neon_process4 ; We have less than 4 sums left to compute. celt_pitch_xcorr_neon_process4_done ADDS r6, r6, #4 ; Reduce maxcorr to a single value VMAX.S32 d30, d30, d31 VPMAX.S32 d30, d30, d30 ; if (max_pitch <= 0) goto celt_pitch_xcorr_neon_done BLE celt_pitch_xcorr_neon_done ; Now compute each remaining sum one at a time. celt_pitch_xcorr_neon_process_remaining MOV r4, r0 MOV r5, r1 VMOV.I32 q0, #0 SUBS r12, r3, #8 BLT celt_pitch_xcorr_neon_process_remaining4 ; Sum terms 8 at a time. celt_pitch_xcorr_neon_process_remaining_loop8 ; Load x[0...7] VLD1.16 {q1}, [r4]! ; Load y[0...7] VLD1.16 {q2}, [r5]! SUBS r12, r12, #8 VMLAL.S16 q0, d4, d2 VMLAL.S16 q0, d5, d3 BGE celt_pitch_xcorr_neon_process_remaining_loop8 ; Sum terms 4 at a time. celt_pitch_xcorr_neon_process_remaining4 ADDS r12, r12, #4 BLT celt_pitch_xcorr_neon_process_remaining4_done ; Load x[0...3] VLD1.16 {d2}, [r4]! ; Load y[0...3] VLD1.16 {d3}, [r5]! SUB r12, r12, #4 VMLAL.S16 q0, d3, d2 celt_pitch_xcorr_neon_process_remaining4_done ; Reduce the sum to a single value. VADD.S32 d0, d0, d1 VPADDL.S32 d0, d0 ADDS r12, r12, #4 BLE celt_pitch_xcorr_neon_process_remaining_loop_done ; Sum terms 1 at a time. celt_pitch_xcorr_neon_process_remaining_loop1 VLD1.16 {d2[]}, [r4]! VLD1.16 {d3[]}, [r5]! SUBS r12, r12, #1 VMLAL.S16 q0, d2, d3 BGT celt_pitch_xcorr_neon_process_remaining_loop1 celt_pitch_xcorr_neon_process_remaining_loop_done VST1.32 {d0[0]}, [r2]! VMAX.S32 d30, d30, d0 SUBS r6, r6, #1 ; _y++ ADD r1, r1, #2 ; if (--max_pitch > 0) goto celt_pitch_xcorr_neon_process_remaining BGT celt_pitch_xcorr_neon_process_remaining celt_pitch_xcorr_neon_done VMOV.32 r0, d30[0] LDMFD sp!, {r4-r6, pc} ENDP ENDIF IF OPUS_ARM_MAY_HAVE_EDSP ; This will get used on ARMv7 devices without NEON, so it has been optimized ; to take advantage of dual-issuing where possible. xcorr_kernel_edsp PROC xcorr_kernel_edsp_start ; input: ; r3 = int len ; r4 = opus_val16 *_x (must be 32-bit aligned) ; r5 = opus_val16 *_y (must be 32-bit aligned) ; r6...r9 = opus_val32 sum[4] ; output: ; r6...r9 = opus_val32 sum[4] ; preserved: r0-r5 ; internal usage ; r2 = int j ; r12,r14 = opus_val16 x[4] ; r10,r11 = opus_val16 y[4] STMFD sp!, {r2,r4,r5,lr} LDR r10, [r5], #4 ; Load y[0...1] SUBS r2, r3, #4 ; j = len-4 LDR r11, [r5], #4 ; Load y[2...3] BLE xcorr_kernel_edsp_process4_done LDR r12, [r4], #4 ; Load x[0...1] ; Stall xcorr_kernel_edsp_process4 ; The multiplies must issue from pipeline 0, and can't dual-issue with each ; other. Every other instruction here dual-issues with a multiply, and is ; thus "free". There should be no stalls in the body of the loop. SMLABB r6, r12, r10, r6 ; sum[0] = MAC16_16(sum[0],x_0,y_0) LDR r14, [r4], #4 ; Load x[2...3] SMLABT r7, r12, r10, r7 ; sum[1] = MAC16_16(sum[1],x_0,y_1) SUBS r2, r2, #4 ; j-=4 SMLABB r8, r12, r11, r8 ; sum[2] = MAC16_16(sum[2],x_0,y_2) SMLABT r9, r12, r11, r9 ; sum[3] = MAC16_16(sum[3],x_0,y_3) SMLATT r6, r12, r10, r6 ; sum[0] = MAC16_16(sum[0],x_1,y_1) LDR r10, [r5], #4 ; Load y[4...5] SMLATB r7, r12, r11, r7 ; sum[1] = MAC16_16(sum[1],x_1,y_2) SMLATT r8, r12, r11, r8 ; sum[2] = MAC16_16(sum[2],x_1,y_3) SMLATB r9, r12, r10, r9 ; sum[3] = MAC16_16(sum[3],x_1,y_4) LDRGT r12, [r4], #4 ; Load x[0...1] SMLABB r6, r14, r11, r6 ; sum[0] = MAC16_16(sum[0],x_2,y_2) SMLABT r7, r14, r11, r7 ; sum[1] = MAC16_16(sum[1],x_2,y_3) SMLABB r8, r14, r10, r8 ; sum[2] = MAC16_16(sum[2],x_2,y_4) SMLABT r9, r14, r10, r9 ; sum[3] = MAC16_16(sum[3],x_2,y_5) SMLATT r6, r14, r11, r6 ; sum[0] = MAC16_16(sum[0],x_3,y_3) LDR r11, [r5], #4 ; Load y[6...7] SMLATB r7, r14, r10, r7 ; sum[1] = MAC16_16(sum[1],x_3,y_4) SMLATT r8, r14, r10, r8 ; sum[2] = MAC16_16(sum[2],x_3,y_5) SMLATB r9, r14, r11, r9 ; sum[3] = MAC16_16(sum[3],x_3,y_6) BGT xcorr_kernel_edsp_process4 xcorr_kernel_edsp_process4_done ADDS r2, r2, #4 BLE xcorr_kernel_edsp_done LDRH r12, [r4], #2 ; r12 = *x++ SUBS r2, r2, #1 ; j-- ; Stall SMLABB r6, r12, r10, r6 ; sum[0] = MAC16_16(sum[0],x,y_0) LDRHGT r14, [r4], #2 ; r14 = *x++ SMLABT r7, r12, r10, r7 ; sum[1] = MAC16_16(sum[1],x,y_1) SMLABB r8, r12, r11, r8 ; sum[2] = MAC16_16(sum[2],x,y_2) SMLABT r9, r12, r11, r9 ; sum[3] = MAC16_16(sum[3],x,y_3) BLE xcorr_kernel_edsp_done SMLABT r6, r14, r10, r6 ; sum[0] = MAC16_16(sum[0],x,y_1) SUBS r2, r2, #1 ; j-- SMLABB r7, r14, r11, r7 ; sum[1] = MAC16_16(sum[1],x,y_2) LDRH r10, [r5], #2 ; r10 = y_4 = *y++ SMLABT r8, r14, r11, r8 ; sum[2] = MAC16_16(sum[2],x,y_3) LDRHGT r12, [r4], #2 ; r12 = *x++ SMLABB r9, r14, r10, r9 ; sum[3] = MAC16_16(sum[3],x,y_4) BLE xcorr_kernel_edsp_done SMLABB r6, r12, r11, r6 ; sum[0] = MAC16_16(sum[0],tmp,y_2) CMP r2, #1 ; j-- SMLABT r7, r12, r11, r7 ; sum[1] = MAC16_16(sum[1],tmp,y_3) LDRH r2, [r5], #2 ; r2 = y_5 = *y++ SMLABB r8, r12, r10, r8 ; sum[2] = MAC16_16(sum[2],tmp,y_4) LDRHGT r14, [r4] ; r14 = *x SMLABB r9, r12, r2, r9 ; sum[3] = MAC16_16(sum[3],tmp,y_5) BLE xcorr_kernel_edsp_done SMLABT r6, r14, r11, r6 ; sum[0] = MAC16_16(sum[0],tmp,y_3) LDRH r11, [r5] ; r11 = y_6 = *y SMLABB r7, r14, r10, r7 ; sum[1] = MAC16_16(sum[1],tmp,y_4) SMLABB r8, r14, r2, r8 ; sum[2] = MAC16_16(sum[2],tmp,y_5) SMLABB r9, r14, r11, r9 ; sum[3] = MAC16_16(sum[3],tmp,y_6) xcorr_kernel_edsp_done LDMFD sp!, {r2,r4,r5,pc} ENDP celt_pitch_xcorr_edsp PROC ; input: ; r0 = opus_val16 *_x (must be 32-bit aligned) ; r1 = opus_val16 *_y (only needs to be 16-bit aligned) ; r2 = opus_val32 *xcorr ; r3 = int len ; output: ; r0 = maxcorr ; internal usage ; r4 = opus_val16 *x ; r5 = opus_val16 *y ; r6 = opus_val32 sum0 ; r7 = opus_val32 sum1 ; r8 = opus_val32 sum2 ; r9 = opus_val32 sum3 ; r1 = int max_pitch ; r12 = int j STMFD sp!, {r4-r11, lr} MOV r5, r1 LDR r1, [sp, #36] MOV r4, r0 TST r5, #3 ; maxcorr = 1 MOV r0, #1 BEQ celt_pitch_xcorr_edsp_process1u_done ; Compute one sum at the start to make y 32-bit aligned. SUBS r12, r3, #4 ; r14 = sum = 0 MOV r14, #0 LDRH r8, [r5], #2 BLE celt_pitch_xcorr_edsp_process1u_loop4_done LDR r6, [r4], #4 MOV r8, r8, LSL #16 celt_pitch_xcorr_edsp_process1u_loop4 LDR r9, [r5], #4 SMLABT r14, r6, r8, r14 ; sum = MAC16_16(sum, x_0, y_0) LDR r7, [r4], #4 SMLATB r14, r6, r9, r14 ; sum = MAC16_16(sum, x_1, y_1) LDR r8, [r5], #4 SMLABT r14, r7, r9, r14 ; sum = MAC16_16(sum, x_2, y_2) SUBS r12, r12, #4 ; j-=4 SMLATB r14, r7, r8, r14 ; sum = MAC16_16(sum, x_3, y_3) LDRGT r6, [r4], #4 BGT celt_pitch_xcorr_edsp_process1u_loop4 MOV r8, r8, LSR #16 celt_pitch_xcorr_edsp_process1u_loop4_done ADDS r12, r12, #4 celt_pitch_xcorr_edsp_process1u_loop1 LDRHGE r6, [r4], #2 ; Stall SMLABBGE r14, r6, r8, r14 ; sum = MAC16_16(sum, *x, *y) SUBSGE r12, r12, #1 LDRHGT r8, [r5], #2 BGT celt_pitch_xcorr_edsp_process1u_loop1 ; Restore _x SUB r4, r4, r3, LSL #1 ; Restore and advance _y SUB r5, r5, r3, LSL #1 ; maxcorr = max(maxcorr, sum) CMP r0, r14 ADD r5, r5, #2 MOVLT r0, r14 SUBS r1, r1, #1 ; xcorr[i] = sum STR r14, [r2], #4 BLE celt_pitch_xcorr_edsp_done celt_pitch_xcorr_edsp_process1u_done ; if (max_pitch < 4) goto celt_pitch_xcorr_edsp_process2 SUBS r1, r1, #4 BLT celt_pitch_xcorr_edsp_process2 celt_pitch_xcorr_edsp_process4 ; xcorr_kernel_edsp parameters: ; r3 = len, r4 = _x, r5 = _y, r6...r9 = sum[4] = {0, 0, 0, 0} MOV r6, #0 MOV r7, #0 MOV r8, #0 MOV r9, #0 BL xcorr_kernel_edsp_start ; xcorr_kernel_edsp(_x, _y+i, xcorr+i, len) ; maxcorr = max(maxcorr, sum0, sum1, sum2, sum3) CMP r0, r6 ; _y+=4 ADD r5, r5, #8 MOVLT r0, r6 CMP r0, r7 MOVLT r0, r7 CMP r0, r8 MOVLT r0, r8 CMP r0, r9 MOVLT r0, r9 STMIA r2!, {r6-r9} SUBS r1, r1, #4 BGE celt_pitch_xcorr_edsp_process4 celt_pitch_xcorr_edsp_process2 ADDS r1, r1, #2 BLT celt_pitch_xcorr_edsp_process1a SUBS r12, r3, #4 ; {r10, r11} = {sum0, sum1} = {0, 0} MOV r10, #0 MOV r11, #0 LDR r8, [r5], #4 BLE celt_pitch_xcorr_edsp_process2_loop_done LDR r6, [r4], #4 LDR r9, [r5], #4 celt_pitch_xcorr_edsp_process2_loop4 SMLABB r10, r6, r8, r10 ; sum0 = MAC16_16(sum0, x_0, y_0) LDR r7, [r4], #4 SMLABT r11, r6, r8, r11 ; sum1 = MAC16_16(sum1, x_0, y_1) SUBS r12, r12, #4 ; j-=4 SMLATT r10, r6, r8, r10 ; sum0 = MAC16_16(sum0, x_1, y_1) LDR r8, [r5], #4 SMLATB r11, r6, r9, r11 ; sum1 = MAC16_16(sum1, x_1, y_2) LDRGT r6, [r4], #4 SMLABB r10, r7, r9, r10 ; sum0 = MAC16_16(sum0, x_2, y_2) SMLABT r11, r7, r9, r11 ; sum1 = MAC16_16(sum1, x_2, y_3) SMLATT r10, r7, r9, r10 ; sum0 = MAC16_16(sum0, x_3, y_3) LDRGT r9, [r5], #4 SMLATB r11, r7, r8, r11 ; sum1 = MAC16_16(sum1, x_3, y_4) BGT celt_pitch_xcorr_edsp_process2_loop4 celt_pitch_xcorr_edsp_process2_loop_done ADDS r12, r12, #2 BLE celt_pitch_xcorr_edsp_process2_1 LDR r6, [r4], #4 ; Stall SMLABB r10, r6, r8, r10 ; sum0 = MAC16_16(sum0, x_0, y_0) LDR r9, [r5], #4 SMLABT r11, r6, r8, r11 ; sum1 = MAC16_16(sum1, x_0, y_1) SUB r12, r12, #2 SMLATT r10, r6, r8, r10 ; sum0 = MAC16_16(sum0, x_1, y_1) MOV r8, r9 SMLATB r11, r6, r9, r11 ; sum1 = MAC16_16(sum1, x_1, y_2) celt_pitch_xcorr_edsp_process2_1 LDRH r6, [r4], #2 ADDS r12, r12, #1 ; Stall SMLABB r10, r6, r8, r10 ; sum0 = MAC16_16(sum0, x_0, y_0) LDRHGT r7, [r4], #2 SMLABT r11, r6, r8, r11 ; sum1 = MAC16_16(sum1, x_0, y_1) BLE celt_pitch_xcorr_edsp_process2_done LDRH r9, [r5], #2 SMLABT r10, r7, r8, r10 ; sum0 = MAC16_16(sum0, x_0, y_1) SMLABB r11, r7, r9, r11 ; sum1 = MAC16_16(sum1, x_0, y_2) celt_pitch_xcorr_edsp_process2_done ; Restore _x SUB r4, r4, r3, LSL #1 ; Restore and advance _y SUB r5, r5, r3, LSL #1 ; maxcorr = max(maxcorr, sum0) CMP r0, r10 ADD r5, r5, #2 MOVLT r0, r10 SUB r1, r1, #2 ; maxcorr = max(maxcorr, sum1) CMP r0, r11 ; xcorr[i] = sum STR r10, [r2], #4 MOVLT r0, r11 STR r11, [r2], #4 celt_pitch_xcorr_edsp_process1a ADDS r1, r1, #1 BLT celt_pitch_xcorr_edsp_done SUBS r12, r3, #4 ; r14 = sum = 0 MOV r14, #0 BLT celt_pitch_xcorr_edsp_process1a_loop_done LDR r6, [r4], #4 LDR r8, [r5], #4 LDR r7, [r4], #4 LDR r9, [r5], #4 celt_pitch_xcorr_edsp_process1a_loop4 SMLABB r14, r6, r8, r14 ; sum = MAC16_16(sum, x_0, y_0) SUBS r12, r12, #4 ; j-=4 SMLATT r14, r6, r8, r14 ; sum = MAC16_16(sum, x_1, y_1) LDRGE r6, [r4], #4 SMLABB r14, r7, r9, r14 ; sum = MAC16_16(sum, x_2, y_2) LDRGE r8, [r5], #4 SMLATT r14, r7, r9, r14 ; sum = MAC16_16(sum, x_3, y_3) LDRGE r7, [r4], #4 LDRGE r9, [r5], #4 BGE celt_pitch_xcorr_edsp_process1a_loop4 celt_pitch_xcorr_edsp_process1a_loop_done ADDS r12, r12, #2 LDRGE r6, [r4], #4 LDRGE r8, [r5], #4 ; Stall SMLABBGE r14, r6, r8, r14 ; sum = MAC16_16(sum, x_0, y_0) SUBGE r12, r12, #2 SMLATTGE r14, r6, r8, r14 ; sum = MAC16_16(sum, x_1, y_1) ADDS r12, r12, #1 LDRHGE r6, [r4], #2 LDRHGE r8, [r5], #2 ; Stall SMLABBGE r14, r6, r8, r14 ; sum = MAC16_16(sum, *x, *y) ; maxcorr = max(maxcorr, sum) CMP r0, r14 ; xcorr[i] = sum STR r14, [r2], #4 MOVLT r0, r14 celt_pitch_xcorr_edsp_done LDMFD sp!, {r4-r11, pc} ENDP ENDIF END opus-1.1.2/celt/arm/fft_arm.h000066400000000000000000000046201264527674100160160ustar00rootroot00000000000000/* Copyright (c) 2015 Xiph.Org Foundation Written by Viswanath Puttagunta */ /** @file fft_arm.h @brief ARM Neon Intrinsic optimizations for fft using NE10 library */ /* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - 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. 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 OWNER 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. */ #if !defined(FFT_ARM_H) #define FFT_ARM_H #include "config.h" #include "kiss_fft.h" #if defined(HAVE_ARM_NE10) int opus_fft_alloc_arm_neon(kiss_fft_state *st); void opus_fft_free_arm_neon(kiss_fft_state *st); void opus_fft_neon(const kiss_fft_state *st, const kiss_fft_cpx *fin, kiss_fft_cpx *fout); void opus_ifft_neon(const kiss_fft_state *st, const kiss_fft_cpx *fin, kiss_fft_cpx *fout); #if !defined(OPUS_HAVE_RTCD) #define OVERRIDE_OPUS_FFT (1) #define opus_fft_alloc_arch(_st, arch) \ ((void)(arch), opus_fft_alloc_arm_neon(_st)) #define opus_fft_free_arch(_st, arch) \ ((void)(arch), opus_fft_free_arm_neon(_st)) #define opus_fft(_st, _fin, _fout, arch) \ ((void)(arch), opus_fft_neon(_st, _fin, _fout)) #define opus_ifft(_st, _fin, _fout, arch) \ ((void)(arch), opus_ifft_neon(_st, _fin, _fout)) #endif /* OPUS_HAVE_RTCD */ #endif /* HAVE_ARM_NE10 */ #endif opus-1.1.2/celt/arm/fixed_armv4.h000066400000000000000000000055661264527674100166220ustar00rootroot00000000000000/* Copyright (C) 2013 Xiph.Org Foundation and contributors */ /* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - 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. 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 OWNER 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. */ #ifndef FIXED_ARMv4_H #define FIXED_ARMv4_H /** 16x32 multiplication, followed by a 16-bit shift right. Results fits in 32 bits */ #undef MULT16_32_Q16 static OPUS_INLINE opus_val32 MULT16_32_Q16_armv4(opus_val16 a, opus_val32 b) { unsigned rd_lo; int rd_hi; __asm__( "#MULT16_32_Q16\n\t" "smull %0, %1, %2, %3\n\t" : "=&r"(rd_lo), "=&r"(rd_hi) : "%r"(b),"r"(a<<16) ); return rd_hi; } #define MULT16_32_Q16(a, b) (MULT16_32_Q16_armv4(a, b)) /** 16x32 multiplication, followed by a 15-bit shift right. Results fits in 32 bits */ #undef MULT16_32_Q15 static OPUS_INLINE opus_val32 MULT16_32_Q15_armv4(opus_val16 a, opus_val32 b) { unsigned rd_lo; int rd_hi; __asm__( "#MULT16_32_Q15\n\t" "smull %0, %1, %2, %3\n\t" : "=&r"(rd_lo), "=&r"(rd_hi) : "%r"(b), "r"(a<<16) ); /*We intentionally don't OR in the high bit of rd_lo for speed.*/ return rd_hi<<1; } #define MULT16_32_Q15(a, b) (MULT16_32_Q15_armv4(a, b)) /** 16x32 multiply, followed by a 15-bit shift right and 32-bit add. b must fit in 31 bits. Result fits in 32 bits. */ #undef MAC16_32_Q15 #define MAC16_32_Q15(c, a, b) ADD32(c, MULT16_32_Q15(a, b)) /** 16x32 multiply, followed by a 16-bit shift right and 32-bit add. Result fits in 32 bits. */ #undef MAC16_32_Q16 #define MAC16_32_Q16(c, a, b) ADD32(c, MULT16_32_Q16(a, b)) /** 32x32 multiplication, followed by a 31-bit shift right. Results fits in 32 bits */ #undef MULT32_32_Q31 #define MULT32_32_Q31(a,b) (opus_val32)((((opus_int64)(a)) * ((opus_int64)(b)))>>31) #endif opus-1.1.2/celt/arm/fixed_armv5e.h000066400000000000000000000102601264527674100167530ustar00rootroot00000000000000/* Copyright (C) 2007-2009 Xiph.Org Foundation Copyright (C) 2003-2008 Jean-Marc Valin Copyright (C) 2007-2008 CSIRO Copyright (C) 2013 Parrot */ /* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - 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. 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 OWNER 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. */ #ifndef FIXED_ARMv5E_H #define FIXED_ARMv5E_H #include "fixed_armv4.h" /** 16x32 multiplication, followed by a 16-bit shift right. Results fits in 32 bits */ #undef MULT16_32_Q16 static OPUS_INLINE opus_val32 MULT16_32_Q16_armv5e(opus_val16 a, opus_val32 b) { int res; __asm__( "#MULT16_32_Q16\n\t" "smulwb %0, %1, %2\n\t" : "=r"(res) : "r"(b),"r"(a) ); return res; } #define MULT16_32_Q16(a, b) (MULT16_32_Q16_armv5e(a, b)) /** 16x32 multiplication, followed by a 15-bit shift right. Results fits in 32 bits */ #undef MULT16_32_Q15 static OPUS_INLINE opus_val32 MULT16_32_Q15_armv5e(opus_val16 a, opus_val32 b) { int res; __asm__( "#MULT16_32_Q15\n\t" "smulwb %0, %1, %2\n\t" : "=r"(res) : "r"(b), "r"(a) ); return res<<1; } #define MULT16_32_Q15(a, b) (MULT16_32_Q15_armv5e(a, b)) /** 16x32 multiply, followed by a 15-bit shift right and 32-bit add. b must fit in 31 bits. Result fits in 32 bits. */ #undef MAC16_32_Q15 static OPUS_INLINE opus_val32 MAC16_32_Q15_armv5e(opus_val32 c, opus_val16 a, opus_val32 b) { int res; __asm__( "#MAC16_32_Q15\n\t" "smlawb %0, %1, %2, %3;\n" : "=r"(res) : "r"(b<<1), "r"(a), "r"(c) ); return res; } #define MAC16_32_Q15(c, a, b) (MAC16_32_Q15_armv5e(c, a, b)) /** 16x32 multiply, followed by a 16-bit shift right and 32-bit add. Result fits in 32 bits. */ #undef MAC16_32_Q16 static OPUS_INLINE opus_val32 MAC16_32_Q16_armv5e(opus_val32 c, opus_val16 a, opus_val32 b) { int res; __asm__( "#MAC16_32_Q16\n\t" "smlawb %0, %1, %2, %3;\n" : "=r"(res) : "r"(b), "r"(a), "r"(c) ); return res; } #define MAC16_32_Q16(c, a, b) (MAC16_32_Q16_armv5e(c, a, b)) /** 16x16 multiply-add where the result fits in 32 bits */ #undef MAC16_16 static OPUS_INLINE opus_val32 MAC16_16_armv5e(opus_val32 c, opus_val16 a, opus_val16 b) { int res; __asm__( "#MAC16_16\n\t" "smlabb %0, %1, %2, %3;\n" : "=r"(res) : "r"(a), "r"(b), "r"(c) ); return res; } #define MAC16_16(c, a, b) (MAC16_16_armv5e(c, a, b)) /** 16x16 multiplication where the result fits in 32 bits */ #undef MULT16_16 static OPUS_INLINE opus_val32 MULT16_16_armv5e(opus_val16 a, opus_val16 b) { int res; __asm__( "#MULT16_16\n\t" "smulbb %0, %1, %2;\n" : "=r"(res) : "r"(a), "r"(b) ); return res; } #define MULT16_16(a, b) (MULT16_16_armv5e(a, b)) #ifdef OPUS_ARM_INLINE_MEDIA #undef SIG2WORD16 static OPUS_INLINE opus_val16 SIG2WORD16_armv6(opus_val32 x) { celt_sig res; __asm__( "#SIG2WORD16\n\t" "ssat %0, #16, %1, ASR #12\n\t" : "=r"(res) : "r"(x+2048) ); return EXTRACT16(res); } #define SIG2WORD16(x) (SIG2WORD16_armv6(x)) #endif /* OPUS_ARM_INLINE_MEDIA */ #endif opus-1.1.2/celt/arm/kiss_fft_armv4.h000066400000000000000000000105611264527674100173220ustar00rootroot00000000000000/*Copyright (c) 2013, Xiph.Org Foundation and contributors. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * 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. 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 OWNER 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.*/ #ifndef KISS_FFT_ARMv4_H #define KISS_FFT_ARMv4_H #if !defined(KISS_FFT_GUTS_H) #error "This file should only be included from _kiss_fft_guts.h" #endif #ifdef FIXED_POINT #undef C_MUL #define C_MUL(m,a,b) \ do{ \ int br__; \ int bi__; \ int tt__; \ __asm__ __volatile__( \ "#C_MUL\n\t" \ "ldrsh %[br], [%[bp], #0]\n\t" \ "ldm %[ap], {r0,r1}\n\t" \ "ldrsh %[bi], [%[bp], #2]\n\t" \ "smull %[tt], %[mi], r1, %[br]\n\t" \ "smlal %[tt], %[mi], r0, %[bi]\n\t" \ "rsb %[bi], %[bi], #0\n\t" \ "smull %[br], %[mr], r0, %[br]\n\t" \ "mov %[tt], %[tt], lsr #15\n\t" \ "smlal %[br], %[mr], r1, %[bi]\n\t" \ "orr %[mi], %[tt], %[mi], lsl #17\n\t" \ "mov %[br], %[br], lsr #15\n\t" \ "orr %[mr], %[br], %[mr], lsl #17\n\t" \ : [mr]"=r"((m).r), [mi]"=r"((m).i), \ [br]"=&r"(br__), [bi]"=r"(bi__), [tt]"=r"(tt__) \ : [ap]"r"(&(a)), [bp]"r"(&(b)) \ : "r0", "r1" \ ); \ } \ while(0) #undef C_MUL4 #define C_MUL4(m,a,b) \ do{ \ int br__; \ int bi__; \ int tt__; \ __asm__ __volatile__( \ "#C_MUL4\n\t" \ "ldrsh %[br], [%[bp], #0]\n\t" \ "ldm %[ap], {r0,r1}\n\t" \ "ldrsh %[bi], [%[bp], #2]\n\t" \ "smull %[tt], %[mi], r1, %[br]\n\t" \ "smlal %[tt], %[mi], r0, %[bi]\n\t" \ "rsb %[bi], %[bi], #0\n\t" \ "smull %[br], %[mr], r0, %[br]\n\t" \ "mov %[tt], %[tt], lsr #17\n\t" \ "smlal %[br], %[mr], r1, %[bi]\n\t" \ "orr %[mi], %[tt], %[mi], lsl #15\n\t" \ "mov %[br], %[br], lsr #17\n\t" \ "orr %[mr], %[br], %[mr], lsl #15\n\t" \ : [mr]"=r"((m).r), [mi]"=r"((m).i), \ [br]"=&r"(br__), [bi]"=r"(bi__), [tt]"=r"(tt__) \ : [ap]"r"(&(a)), [bp]"r"(&(b)) \ : "r0", "r1" \ ); \ } \ while(0) #undef C_MULC #define C_MULC(m,a,b) \ do{ \ int br__; \ int bi__; \ int tt__; \ __asm__ __volatile__( \ "#C_MULC\n\t" \ "ldrsh %[br], [%[bp], #0]\n\t" \ "ldm %[ap], {r0,r1}\n\t" \ "ldrsh %[bi], [%[bp], #2]\n\t" \ "smull %[tt], %[mr], r0, %[br]\n\t" \ "smlal %[tt], %[mr], r1, %[bi]\n\t" \ "rsb %[bi], %[bi], #0\n\t" \ "smull %[br], %[mi], r1, %[br]\n\t" \ "mov %[tt], %[tt], lsr #15\n\t" \ "smlal %[br], %[mi], r0, %[bi]\n\t" \ "orr %[mr], %[tt], %[mr], lsl #17\n\t" \ "mov %[br], %[br], lsr #15\n\t" \ "orr %[mi], %[br], %[mi], lsl #17\n\t" \ : [mr]"=r"((m).r), [mi]"=r"((m).i), \ [br]"=&r"(br__), [bi]"=r"(bi__), [tt]"=r"(tt__) \ : [ap]"r"(&(a)), [bp]"r"(&(b)) \ : "r0", "r1" \ ); \ } \ while(0) #endif /* FIXED_POINT */ #endif /* KISS_FFT_ARMv4_H */ opus-1.1.2/celt/arm/kiss_fft_armv5e.h000066400000000000000000000100051264527674100174610ustar00rootroot00000000000000/*Copyright (c) 2013, Xiph.Org Foundation and contributors. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * 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. 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 OWNER 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.*/ #ifndef KISS_FFT_ARMv5E_H #define KISS_FFT_ARMv5E_H #if !defined(KISS_FFT_GUTS_H) #error "This file should only be included from _kiss_fft_guts.h" #endif #ifdef FIXED_POINT #if defined(__thumb__)||defined(__thumb2__) #define LDRD_CONS "Q" #else #define LDRD_CONS "Uq" #endif #undef C_MUL #define C_MUL(m,a,b) \ do{ \ int mr1__; \ int mr2__; \ int mi__; \ long long aval__; \ int bval__; \ __asm__( \ "#C_MUL\n\t" \ "ldrd %[aval], %H[aval], %[ap]\n\t" \ "ldr %[bval], %[bp]\n\t" \ "smulwb %[mi], %H[aval], %[bval]\n\t" \ "smulwb %[mr1], %[aval], %[bval]\n\t" \ "smulwt %[mr2], %H[aval], %[bval]\n\t" \ "smlawt %[mi], %[aval], %[bval], %[mi]\n\t" \ : [mr1]"=r"(mr1__), [mr2]"=r"(mr2__), [mi]"=r"(mi__), \ [aval]"=&r"(aval__), [bval]"=r"(bval__) \ : [ap]LDRD_CONS(a), [bp]"m"(b) \ ); \ (m).r = SHL32(SUB32(mr1__, mr2__), 1); \ (m).i = SHL32(mi__, 1); \ } \ while(0) #undef C_MUL4 #define C_MUL4(m,a,b) \ do{ \ int mr1__; \ int mr2__; \ int mi__; \ long long aval__; \ int bval__; \ __asm__( \ "#C_MUL4\n\t" \ "ldrd %[aval], %H[aval], %[ap]\n\t" \ "ldr %[bval], %[bp]\n\t" \ "smulwb %[mi], %H[aval], %[bval]\n\t" \ "smulwb %[mr1], %[aval], %[bval]\n\t" \ "smulwt %[mr2], %H[aval], %[bval]\n\t" \ "smlawt %[mi], %[aval], %[bval], %[mi]\n\t" \ : [mr1]"=r"(mr1__), [mr2]"=r"(mr2__), [mi]"=r"(mi__), \ [aval]"=&r"(aval__), [bval]"=r"(bval__) \ : [ap]LDRD_CONS(a), [bp]"m"(b) \ ); \ (m).r = SHR32(SUB32(mr1__, mr2__), 1); \ (m).i = SHR32(mi__, 1); \ } \ while(0) #undef C_MULC #define C_MULC(m,a,b) \ do{ \ int mr__; \ int mi1__; \ int mi2__; \ long long aval__; \ int bval__; \ __asm__( \ "#C_MULC\n\t" \ "ldrd %[aval], %H[aval], %[ap]\n\t" \ "ldr %[bval], %[bp]\n\t" \ "smulwb %[mr], %[aval], %[bval]\n\t" \ "smulwb %[mi1], %H[aval], %[bval]\n\t" \ "smulwt %[mi2], %[aval], %[bval]\n\t" \ "smlawt %[mr], %H[aval], %[bval], %[mr]\n\t" \ : [mr]"=r"(mr__), [mi1]"=r"(mi1__), [mi2]"=r"(mi2__), \ [aval]"=&r"(aval__), [bval]"=r"(bval__) \ : [ap]LDRD_CONS(a), [bp]"m"(b) \ ); \ (m).r = SHL32(mr__, 1); \ (m).i = SHL32(SUB32(mi1__, mi2__), 1); \ } \ while(0) #endif /* FIXED_POINT */ #endif /* KISS_FFT_GUTS_H */ opus-1.1.2/celt/arm/mdct_arm.h000066400000000000000000000051211264527674100161630ustar00rootroot00000000000000/* Copyright (c) 2015 Xiph.Org Foundation Written by Viswanath Puttagunta */ /** @file arm_mdct.h @brief ARM Neon Intrinsic optimizations for mdct using NE10 library */ /* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - 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. 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 OWNER 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. */ #if !defined(MDCT_ARM_H) #define MDCT_ARM_H #include "config.h" #include "mdct.h" #if defined(HAVE_ARM_NE10) /** Compute a forward MDCT and scale by 4/N, trashes the input array */ void clt_mdct_forward_neon(const mdct_lookup *l, kiss_fft_scalar *in, kiss_fft_scalar * OPUS_RESTRICT out, const opus_val16 *window, int overlap, int shift, int stride, int arch); void clt_mdct_backward_neon(const mdct_lookup *l, kiss_fft_scalar *in, kiss_fft_scalar * OPUS_RESTRICT out, const opus_val16 *window, int overlap, int shift, int stride, int arch); #if !defined(OPUS_HAVE_RTCD) #define OVERRIDE_OPUS_MDCT (1) #define clt_mdct_forward(_l, _in, _out, _window, _int, _shift, _stride, _arch) \ clt_mdct_forward_neon(_l, _in, _out, _window, _int, _shift, _stride, _arch) #define clt_mdct_backward(_l, _in, _out, _window, _int, _shift, _stride, _arch) \ clt_mdct_backward_neon(_l, _in, _out, _window, _int, _shift, _stride, _arch) #endif /* OPUS_HAVE_RTCD */ #endif /* HAVE_ARM_NE10 */ #endif opus-1.1.2/celt/arm/pitch_arm.h000066400000000000000000000052061264527674100163470ustar00rootroot00000000000000/* Copyright (c) 2010 Xiph.Org Foundation * Copyright (c) 2013 Parrot */ /* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - 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. 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 OWNER 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. */ #if !defined(PITCH_ARM_H) # define PITCH_ARM_H # include "armcpu.h" # if defined(FIXED_POINT) # if defined(OPUS_ARM_MAY_HAVE_NEON) opus_val32 celt_pitch_xcorr_neon(const opus_val16 *_x, const opus_val16 *_y, opus_val32 *xcorr, int len, int max_pitch); # endif # if defined(OPUS_ARM_MAY_HAVE_MEDIA) # define celt_pitch_xcorr_media MAY_HAVE_EDSP(celt_pitch_xcorr) # endif # if defined(OPUS_ARM_MAY_HAVE_EDSP) opus_val32 celt_pitch_xcorr_edsp(const opus_val16 *_x, const opus_val16 *_y, opus_val32 *xcorr, int len, int max_pitch); # endif # if !defined(OPUS_HAVE_RTCD) # define OVERRIDE_PITCH_XCORR (1) # define celt_pitch_xcorr(_x, _y, xcorr, len, max_pitch, arch) \ ((void)(arch),PRESUME_NEON(celt_pitch_xcorr)(_x, _y, xcorr, len, max_pitch)) # endif #else /* Start !FIXED_POINT */ /* Float case */ #if defined(OPUS_ARM_MAY_HAVE_NEON_INTR) void celt_pitch_xcorr_float_neon(const opus_val16 *_x, const opus_val16 *_y, opus_val32 *xcorr, int len, int max_pitch); #if !defined(OPUS_HAVE_RTCD) || defined(OPUS_ARM_PRESUME_NEON_INTR) #define OVERRIDE_PITCH_XCORR (1) # define celt_pitch_xcorr(_x, _y, xcorr, len, max_pitch, arch) \ ((void)(arch),celt_pitch_xcorr_float_neon(_x, _y, xcorr, len, max_pitch)) #endif #endif #endif /* end !FIXED_POINT */ #endif opus-1.1.2/celt/bands.c000066400000000000000000001262241264527674100147100ustar00rootroot00000000000000/* Copyright (c) 2007-2008 CSIRO Copyright (c) 2007-2009 Xiph.Org Foundation Copyright (c) 2008-2009 Gregory Maxwell Written by Jean-Marc Valin and Gregory Maxwell */ /* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - 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. 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 OWNER 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. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include "bands.h" #include "modes.h" #include "vq.h" #include "cwrs.h" #include "stack_alloc.h" #include "os_support.h" #include "mathops.h" #include "rate.h" #include "quant_bands.h" #include "pitch.h" int hysteresis_decision(opus_val16 val, const opus_val16 *thresholds, const opus_val16 *hysteresis, int N, int prev) { int i; for (i=0;iprev && val < thresholds[prev]+hysteresis[prev]) i=prev; if (i thresholds[prev-1]-hysteresis[prev-1]) i=prev; return i; } opus_uint32 celt_lcg_rand(opus_uint32 seed) { return 1664525 * seed + 1013904223; } /* This is a cos() approximation designed to be bit-exact on any platform. Bit exactness with this approximation is important because it has an impact on the bit allocation */ static opus_int16 bitexact_cos(opus_int16 x) { opus_int32 tmp; opus_int16 x2; tmp = (4096+((opus_int32)(x)*(x)))>>13; celt_assert(tmp<=32767); x2 = tmp; x2 = (32767-x2) + FRAC_MUL16(x2, (-7651 + FRAC_MUL16(x2, (8277 + FRAC_MUL16(-626, x2))))); celt_assert(x2<=32766); return 1+x2; } static int bitexact_log2tan(int isin,int icos) { int lc; int ls; lc=EC_ILOG(icos); ls=EC_ILOG(isin); icos<<=15-lc; isin<<=15-ls; return (ls-lc)*(1<<11) +FRAC_MUL16(isin, FRAC_MUL16(isin, -2597) + 7932) -FRAC_MUL16(icos, FRAC_MUL16(icos, -2597) + 7932); } #ifdef FIXED_POINT /* Compute the amplitude (sqrt energy) in each of the bands */ void compute_band_energies(const CELTMode *m, const celt_sig *X, celt_ener *bandE, int end, int C, int LM) { int i, c, N; const opus_int16 *eBands = m->eBands; N = m->shortMdctSize< 0) { int shift = celt_ilog2(maxval) - 14 + (((m->logN[i]>>BITRES)+LM+1)>>1); j=eBands[i]<0) { do { sum = MAC16_16(sum, EXTRACT16(SHR32(X[j+c*N],shift)), EXTRACT16(SHR32(X[j+c*N],shift))); } while (++jnbEBands] = EPSILON+VSHR32(EXTEND32(celt_sqrt(sum)),-shift); } else { bandE[i+c*m->nbEBands] = EPSILON; } /*printf ("%f ", bandE[i+c*m->nbEBands]);*/ } } while (++ceBands; N = M*m->shortMdctSize; c=0; do { i=0; do { opus_val16 g; int j,shift; opus_val16 E; shift = celt_zlog2(bandE[i+c*m->nbEBands])-13; E = VSHR32(bandE[i+c*m->nbEBands], shift); g = EXTRACT16(celt_rcp(SHL32(E,3))); j=M*eBands[i]; do { X[j+c*N] = MULT16_16_Q15(VSHR32(freq[j+c*N],shift-1),g); } while (++jeBands; N = m->shortMdctSize<nbEBands] = celt_sqrt(sum); /*printf ("%f ", bandE[i+c*m->nbEBands]);*/ } } while (++ceBands; N = M*m->shortMdctSize; c=0; do { for (i=0;inbEBands]); for (j=M*eBands[i];jeBands; N = M*m->shortMdctSize; bound = M*eBands[end]; if (downsample!=1) bound = IMIN(bound, N/downsample); if (silence) { bound = 0; start = end = 0; } f = freq; x = X+M*eBands[start]; for (i=0;i>DB_SHIFT); if (shift>31) { shift=0; g=0; } else { /* Handle the fractional part. */ g = celt_exp2_frac(lg&((1<eBands[i+1]-m->eBands[i]; /* depth in 1/8 bits */ celt_assert(pulses[i]>=0); depth = celt_udiv(1+pulses[i], (m->eBands[i+1]-m->eBands[i]))>>LM; #ifdef FIXED_POINT thresh32 = SHR32(celt_exp2(-SHL16(depth, 10-BITRES)),1); thresh = MULT16_32_Q15(QCONST16(0.5f, 15), MIN32(32767,thresh32)); { opus_val32 t; t = N0<>1; t = SHL32(t, (7-shift)<<1); sqrt_1 = celt_rsqrt_norm(t); } #else thresh = .5f*celt_exp2(-.125f*depth); sqrt_1 = celt_rsqrt(N0<nbEBands+i]; prev2 = prev2logE[c*m->nbEBands+i]; if (C==1) { prev1 = MAX16(prev1,prev1logE[m->nbEBands+i]); prev2 = MAX16(prev2,prev2logE[m->nbEBands+i]); } Ediff = EXTEND32(logE[c*m->nbEBands+i])-EXTEND32(MIN16(prev1,prev2)); Ediff = MAX32(0, Ediff); #ifdef FIXED_POINT if (Ediff < 16384) { opus_val32 r32 = SHR32(celt_exp2(-EXTRACT16(Ediff)),1); r = 2*MIN16(16383,r32); } else { r = 0; } if (LM==3) r = MULT16_16_Q14(23170, MIN32(23169, r)); r = SHR16(MIN16(thresh, r),1); r = SHR32(MULT16_16_Q15(sqrt_1, r),shift); #else /* r needs to be multiplied by 2 or 2*sqrt(2) depending on LM because short blocks don't have the same energy as long */ r = 2.f*celt_exp2(-Ediff); if (LM==3) r *= 1.41421356f; r = MIN16(thresh, r); r = r*sqrt_1; #endif X = X_+c*size+(m->eBands[i]<nbEBands]))-13; #endif left = VSHR32(bandE[i],shift); right = VSHR32(bandE[i+m->nbEBands],shift); norm = EPSILON + celt_sqrt(EPSILON+MULT16_16(left,left)+MULT16_16(right,right)); a1 = DIV32_16(SHL32(EXTEND32(left),14),norm); a2 = DIV32_16(SHL32(EXTEND32(right),14),norm); for (j=0;j>1; kr = celt_ilog2(Er)>>1; #endif t = VSHR32(El, (kl-7)<<1); lgain = celt_rsqrt_norm(t); t = VSHR32(Er, (kr-7)<<1); rgain = celt_rsqrt_norm(t); #ifdef FIXED_POINT if (kl < 7) kl = 7; if (kr < 7) kr = 7; #endif for (j=0;jeBands; int decision; int hf_sum=0; celt_assert(end>0); N0 = M*m->shortMdctSize; if (M*(eBands[end]-eBands[end-1]) <= 8) return SPREAD_NONE; c=0; do { for (i=0;im->nbEBands-4) hf_sum += celt_udiv(32*(tcount[1]+tcount[0]), N); tmp = (2*tcount[2] >= N) + (2*tcount[1] >= N) + (2*tcount[0] >= N); sum += tmp*256; nbBands++; } } while (++cnbEBands+end)); *hf_average = (*hf_average+hf_sum)>>1; hf_sum = *hf_average; if (*tapset_decision==2) hf_sum += 4; else if (*tapset_decision==0) hf_sum -= 4; if (hf_sum > 22) *tapset_decision=2; else if (hf_sum > 18) *tapset_decision=1; else *tapset_decision=0; } /*printf("%d %d %d\n", hf_sum, *hf_average, *tapset_decision);*/ celt_assert(nbBands>0); /* end has to be non-zero */ celt_assert(sum>=0); sum = celt_udiv(sum, nbBands); /* Recursive averaging */ sum = (sum+*average)>>1; *average = sum; /* Hysteresis */ sum = (3*sum + (((3-last_decision)<<7) + 64) + 2)>>2; if (sum < 80) { decision = SPREAD_AGGRESSIVE; } else if (sum < 256) { decision = SPREAD_NORMAL; } else if (sum < 384) { decision = SPREAD_LIGHT; } else { decision = SPREAD_NONE; } #ifdef FUZZING decision = rand()&0x3; *tapset_decision=rand()%3; #endif return decision; } /* Indexing table for converting from natural Hadamard to ordery Hadamard This is essentially a bit-reversed Gray, on top of which we've added an inversion of the order because we want the DC at the end rather than the beginning. The lines are for N=2, 4, 8, 16 */ static const int ordery_table[] = { 1, 0, 3, 0, 2, 1, 7, 0, 4, 3, 6, 1, 5, 2, 15, 0, 8, 7, 12, 3, 11, 4, 14, 1, 9, 6, 13, 2, 10, 5, }; static void deinterleave_hadamard(celt_norm *X, int N0, int stride, int hadamard) { int i,j; VARDECL(celt_norm, tmp); int N; SAVE_STACK; N = N0*stride; ALLOC(tmp, N, celt_norm); celt_assert(stride>0); if (hadamard) { const int *ordery = ordery_table+stride-2; for (i=0;i>= 1; for (i=0;i>1)) { qn = 1; } else { qn = exp2_table8[qb&0x7]>>(14-(qb>>BITRES)); qn = (qn+1)>>1<<1; } celt_assert(qn <= 256); return qn; } struct band_ctx { int encode; const CELTMode *m; int i; int intensity; int spread; int tf_change; ec_ctx *ec; opus_int32 remaining_bits; const celt_ener *bandE; opus_uint32 seed; int arch; }; struct split_ctx { int inv; int imid; int iside; int delta; int itheta; int qalloc; }; static void compute_theta(struct band_ctx *ctx, struct split_ctx *sctx, celt_norm *X, celt_norm *Y, int N, int *b, int B, int B0, int LM, int stereo, int *fill) { int qn; int itheta=0; int delta; int imid, iside; int qalloc; int pulse_cap; int offset; opus_int32 tell; int inv=0; int encode; const CELTMode *m; int i; int intensity; ec_ctx *ec; const celt_ener *bandE; encode = ctx->encode; m = ctx->m; i = ctx->i; intensity = ctx->intensity; ec = ctx->ec; bandE = ctx->bandE; /* Decide on the resolution to give to the split parameter theta */ pulse_cap = m->logN[i]+LM*(1<>1) - (stereo&&N==2 ? QTHETA_OFFSET_TWOPHASE : QTHETA_OFFSET); qn = compute_qn(N, *b, offset, pulse_cap, stereo); if (stereo && i>=intensity) qn = 1; if (encode) { /* theta is the atan() of the ratio between the (normalized) side and mid. With just that parameter, we can re-scale both mid and side because we know that 1) they have unit norm and 2) they are orthogonal. */ itheta = stereo_itheta(X, Y, stereo, N, ctx->arch); } tell = ec_tell_frac(ec); if (qn!=1) { if (encode) itheta = (itheta*qn+8192)>>14; /* Entropy coding of the angle. We use a uniform pdf for the time split, a step for stereo, and a triangular one for the rest. */ if (stereo && N>2) { int p0 = 3; int x = itheta; int x0 = qn/2; int ft = p0*(x0+1) + x0; /* Use a probability of p0 up to itheta=8192 and then use 1 after */ if (encode) { ec_encode(ec,x<=x0?p0*x:(x-1-x0)+(x0+1)*p0,x<=x0?p0*(x+1):(x-x0)+(x0+1)*p0,ft); } else { int fs; fs=ec_decode(ec,ft); if (fs<(x0+1)*p0) x=fs/p0; else x=x0+1+(fs-(x0+1)*p0); ec_dec_update(ec,x<=x0?p0*x:(x-1-x0)+(x0+1)*p0,x<=x0?p0*(x+1):(x-x0)+(x0+1)*p0,ft); itheta = x; } } else if (B0>1 || stereo) { /* Uniform pdf */ if (encode) ec_enc_uint(ec, itheta, qn+1); else itheta = ec_dec_uint(ec, qn+1); } else { int fs=1, ft; ft = ((qn>>1)+1)*((qn>>1)+1); if (encode) { int fl; fs = itheta <= (qn>>1) ? itheta + 1 : qn + 1 - itheta; fl = itheta <= (qn>>1) ? itheta*(itheta + 1)>>1 : ft - ((qn + 1 - itheta)*(qn + 2 - itheta)>>1); ec_encode(ec, fl, fl+fs, ft); } else { /* Triangular pdf */ int fl=0; int fm; fm = ec_decode(ec, ft); if (fm < ((qn>>1)*((qn>>1) + 1)>>1)) { itheta = (isqrt32(8*(opus_uint32)fm + 1) - 1)>>1; fs = itheta + 1; fl = itheta*(itheta + 1)>>1; } else { itheta = (2*(qn + 1) - isqrt32(8*(opus_uint32)(ft - fm - 1) + 1))>>1; fs = qn + 1 - itheta; fl = ft - ((qn + 1 - itheta)*(qn + 2 - itheta)>>1); } ec_dec_update(ec, fl, fl+fs, ft); } } celt_assert(itheta>=0); itheta = celt_udiv((opus_int32)itheta*16384, qn); if (encode && stereo) { if (itheta==0) intensity_stereo(m, X, Y, bandE, i, N); else stereo_split(X, Y, N); } /* NOTE: Renormalising X and Y *may* help fixed-point a bit at very high rate. Let's do that at higher complexity */ } else if (stereo) { if (encode) { inv = itheta > 8192; if (inv) { int j; for (j=0;j2<remaining_bits > 2<inv = inv; sctx->imid = imid; sctx->iside = iside; sctx->delta = delta; sctx->itheta = itheta; sctx->qalloc = qalloc; } static unsigned quant_band_n1(struct band_ctx *ctx, celt_norm *X, celt_norm *Y, int b, celt_norm *lowband_out) { #ifdef RESYNTH int resynth = 1; #else int resynth = !ctx->encode; #endif int c; int stereo; celt_norm *x = X; int encode; ec_ctx *ec; encode = ctx->encode; ec = ctx->ec; stereo = Y != NULL; c=0; do { int sign=0; if (ctx->remaining_bits>=1<remaining_bits -= 1<encode; #endif celt_norm *Y=NULL; int encode; const CELTMode *m; int i; int spread; ec_ctx *ec; encode = ctx->encode; m = ctx->m; i = ctx->i; spread = ctx->spread; ec = ctx->ec; /* If we need 1.5 more bit than we can produce, split the band in two. */ cache = m->cache.bits + m->cache.index[(LM+1)*m->nbEBands+i]; if (LM != -1 && b > cache[cache[0]]+12 && N>2) { int mbits, sbits, delta; int itheta; int qalloc; struct split_ctx sctx; celt_norm *next_lowband2=NULL; opus_int32 rebalance; N >>= 1; Y = X+N; LM -= 1; if (B==1) fill = (fill&1)|(fill<<1); B = (B+1)>>1; compute_theta(ctx, &sctx, X, Y, N, &b, B, B0, LM, 0, &fill); imid = sctx.imid; iside = sctx.iside; delta = sctx.delta; itheta = sctx.itheta; qalloc = sctx.qalloc; #ifdef FIXED_POINT mid = imid; side = iside; #else mid = (1.f/32768)*imid; side = (1.f/32768)*iside; #endif /* Give more bits to low-energy MDCTs than they would otherwise deserve */ if (B0>1 && (itheta&0x3fff)) { if (itheta > 8192) /* Rough approximation for pre-echo masking */ delta -= delta>>(4-LM); else /* Corresponds to a forward-masking slope of 1.5 dB per 10 ms */ delta = IMIN(0, delta + (N<>(5-LM))); } mbits = IMAX(0, IMIN(b, (b-delta)/2)); sbits = b-mbits; ctx->remaining_bits -= qalloc; if (lowband) next_lowband2 = lowband+N; /* >32-bit split case */ rebalance = ctx->remaining_bits; if (mbits >= sbits) { cm = quant_partition(ctx, X, N, mbits, B, lowband, LM, MULT16_16_P15(gain,mid), fill); rebalance = mbits - (rebalance-ctx->remaining_bits); if (rebalance > 3<>B)<<(B0>>1); } else { cm = quant_partition(ctx, Y, N, sbits, B, next_lowband2, LM, MULT16_16_P15(gain,side), fill>>B)<<(B0>>1); rebalance = sbits - (rebalance-ctx->remaining_bits); if (rebalance > 3<remaining_bits -= curr_bits; /* Ensures we can never bust the budget */ while (ctx->remaining_bits < 0 && q > 0) { ctx->remaining_bits += curr_bits; q--; curr_bits = pulses2bits(m, i, LM, q); ctx->remaining_bits -= curr_bits; } if (q!=0) { int K = get_pulses(q); /* Finally do the actual quantization */ if (encode) { cm = alg_quant(X, N, K, spread, B, ec #ifdef RESYNTH , gain #endif ); } else { cm = alg_unquant(X, N, K, spread, B, ec, gain); } } else { /* If there's no pulse, fill the band anyway */ int j; if (resynth) { unsigned cm_mask; /* B can be as large as 16, so this shift might overflow an int on a 16-bit platform; use a long to get defined behavior.*/ cm_mask = (unsigned)(1UL<seed = celt_lcg_rand(ctx->seed); X[j] = (celt_norm)((opus_int32)ctx->seed>>20); } cm = cm_mask; } else { /* Folded spectrum */ for (j=0;jseed = celt_lcg_rand(ctx->seed); /* About 48 dB below the "normal" folding level */ tmp = QCONST16(1.0f/256, 10); tmp = (ctx->seed)&0x8000 ? tmp : -tmp; X[j] = lowband[j]+tmp; } cm = fill; } renormalise_vector(X, N, gain, ctx->arch); } } } } return cm; } /* This function is responsible for encoding and decoding a band for the mono case. */ static unsigned quant_band(struct band_ctx *ctx, celt_norm *X, int N, int b, int B, celt_norm *lowband, int LM, celt_norm *lowband_out, opus_val16 gain, celt_norm *lowband_scratch, int fill) { int N0=N; int N_B=N; int N_B0; int B0=B; int time_divide=0; int recombine=0; int longBlocks; unsigned cm=0; #ifdef RESYNTH int resynth = 1; #else int resynth = !ctx->encode; #endif int k; int encode; int tf_change; encode = ctx->encode; tf_change = ctx->tf_change; longBlocks = B0==1; N_B = celt_udiv(N_B, B); /* Special case for one sample */ if (N==1) { return quant_band_n1(ctx, X, NULL, b, lowband_out); } if (tf_change>0) recombine = tf_change; /* Band recombining to increase frequency resolution */ if (lowband_scratch && lowband && (recombine || ((N_B&1) == 0 && tf_change<0) || B0>1)) { OPUS_COPY(lowband_scratch, lowband, N); lowband = lowband_scratch; } for (k=0;k>k, 1<>k, 1<>4]<<2; } B>>=recombine; N_B<<=recombine; /* Increasing the time resolution */ while ((N_B&1) == 0 && tf_change<0) { if (encode) haar1(X, N_B, B); if (lowband) haar1(lowband, N_B, B); fill |= fill<>= 1; time_divide++; tf_change++; } B0=B; N_B0 = N_B; /* Reorganize the samples in time order instead of frequency order */ if (B0>1) { if (encode) deinterleave_hadamard(X, N_B>>recombine, B0<>recombine, B0<1) interleave_hadamard(X, N_B>>recombine, B0<>= 1; N_B <<= 1; cm |= cm>>B; haar1(X, N_B, B); } for (k=0;k>k, 1<encode; #endif int mbits, sbits, delta; int itheta; int qalloc; struct split_ctx sctx; int orig_fill; int encode; ec_ctx *ec; encode = ctx->encode; ec = ctx->ec; /* Special case for one sample */ if (N==1) { return quant_band_n1(ctx, X, Y, b, lowband_out); } orig_fill = fill; compute_theta(ctx, &sctx, X, Y, N, &b, B, B, LM, 1, &fill); inv = sctx.inv; imid = sctx.imid; iside = sctx.iside; delta = sctx.delta; itheta = sctx.itheta; qalloc = sctx.qalloc; #ifdef FIXED_POINT mid = imid; side = iside; #else mid = (1.f/32768)*imid; side = (1.f/32768)*iside; #endif /* This is a special case for N=2 that only works for stereo and takes advantage of the fact that mid and side are orthogonal to encode the side with just one bit. */ if (N==2) { int c; int sign=0; celt_norm *x2, *y2; mbits = b; sbits = 0; /* Only need one bit for the side. */ if (itheta != 0 && itheta != 16384) sbits = 1< 8192; ctx->remaining_bits -= qalloc+sbits; x2 = c ? Y : X; y2 = c ? X : Y; if (sbits) { if (encode) { /* Here we only need to encode a sign for the side. */ sign = x2[0]*y2[1] - x2[1]*y2[0] < 0; ec_enc_bits(ec, sign, 1); } else { sign = ec_dec_bits(ec, 1); } } sign = 1-2*sign; /* We use orig_fill here because we want to fold the side, but if itheta==16384, we'll have cleared the low bits of fill. */ cm = quant_band(ctx, x2, N, mbits, B, lowband, LM, lowband_out, Q15ONE, lowband_scratch, orig_fill); /* We don't split N=2 bands, so cm is either 1 or 0 (for a fold-collapse), and there's no need to worry about mixing with the other channel. */ y2[0] = -sign*x2[1]; y2[1] = sign*x2[0]; if (resynth) { celt_norm tmp; X[0] = MULT16_16_Q15(mid, X[0]); X[1] = MULT16_16_Q15(mid, X[1]); Y[0] = MULT16_16_Q15(side, Y[0]); Y[1] = MULT16_16_Q15(side, Y[1]); tmp = X[0]; X[0] = SUB16(tmp,Y[0]); Y[0] = ADD16(tmp,Y[0]); tmp = X[1]; X[1] = SUB16(tmp,Y[1]); Y[1] = ADD16(tmp,Y[1]); } } else { /* "Normal" split code */ opus_int32 rebalance; mbits = IMAX(0, IMIN(b, (b-delta)/2)); sbits = b-mbits; ctx->remaining_bits -= qalloc; rebalance = ctx->remaining_bits; if (mbits >= sbits) { /* In stereo mode, we do not apply a scaling to the mid because we need the normalized mid for folding later. */ cm = quant_band(ctx, X, N, mbits, B, lowband, LM, lowband_out, Q15ONE, lowband_scratch, fill); rebalance = mbits - (rebalance-ctx->remaining_bits); if (rebalance > 3<>B); } else { /* For a stereo split, the high bits of fill are always zero, so no folding will be done to the side. */ cm = quant_band(ctx, Y, N, sbits, B, NULL, LM, NULL, side, NULL, fill>>B); rebalance = sbits - (rebalance-ctx->remaining_bits); if (rebalance > 3<arch); if (inv) { int j; for (j=0;jeBands; celt_norm * OPUS_RESTRICT norm, * OPUS_RESTRICT norm2; VARDECL(celt_norm, _norm); celt_norm *lowband_scratch; int B; int M; int lowband_offset; int update_lowband = 1; int C = Y_ != NULL ? 2 : 1; int norm_offset; #ifdef RESYNTH int resynth = 1; #else int resynth = !encode; #endif struct band_ctx ctx; SAVE_STACK; M = 1<nbEBands-1]-norm_offset), celt_norm); norm = _norm; norm2 = norm + M*eBands[m->nbEBands-1]-norm_offset; /* We can use the last band as scratch space because we don't need that scratch space for the last band. */ lowband_scratch = X_+M*eBands[m->nbEBands-1]; lowband_offset = 0; ctx.bandE = bandE; ctx.ec = ec; ctx.encode = encode; ctx.intensity = intensity; ctx.m = m; ctx.seed = *seed; ctx.spread = spread; ctx.arch = arch; for (i=start;i= M*eBands[start] && (update_lowband || lowband_offset==0)) lowband_offset = i; tf_change = tf_res[i]; ctx.tf_change = tf_change; if (i>=m->effEBands) { X=norm; if (Y_!=NULL) Y = norm; lowband_scratch = NULL; } if (i==end-1) lowband_scratch = NULL; /* Get a conservative estimate of the collapse_mask's for the bands we're going to be folding from. */ if (lowband_offset != 0 && (spread!=SPREAD_AGGRESSIVE || B>1 || tf_change<0)) { int fold_start; int fold_end; int fold_i; /* This ensures we never repeat spectral content within one band */ effective_lowband = IMAX(0, M*eBands[lowband_offset]-norm_offset-N); fold_start = lowband_offset; while(M*eBands[--fold_start] > effective_lowband+norm_offset); fold_end = lowband_offset-1; while(M*eBands[++fold_end] < effective_lowband+norm_offset+N); x_cm = y_cm = 0; fold_i = fold_start; do { x_cm |= collapse_masks[fold_i*C+0]; y_cm |= collapse_masks[fold_i*C+C-1]; } while (++fold_i(N< #include "celt.h" #include "pitch.h" #include "bands.h" #include "modes.h" #include "entcode.h" #include "quant_bands.h" #include "rate.h" #include "stack_alloc.h" #include "mathops.h" #include "float_cast.h" #include #include "celt_lpc.h" #include "vq.h" #ifndef PACKAGE_VERSION #define PACKAGE_VERSION "unknown" #endif #if defined(MIPSr1_ASM) #include "mips/celt_mipsr1.h" #endif int resampling_factor(opus_int32 rate) { int ret; switch (rate) { case 48000: ret = 1; break; case 24000: ret = 2; break; case 16000: ret = 3; break; case 12000: ret = 4; break; case 8000: ret = 6; break; default: #ifndef CUSTOM_MODES celt_assert(0); #endif ret = 0; break; } return ret; } #if !defined(OVERRIDE_COMB_FILTER_CONST) || defined(NON_STATIC_COMB_FILTER_CONST_C) /* This version should be faster on ARM */ #ifdef OPUS_ARM_ASM #ifndef NON_STATIC_COMB_FILTER_CONST_C static #endif void comb_filter_const_c(opus_val32 *y, opus_val32 *x, int T, int N, opus_val16 g10, opus_val16 g11, opus_val16 g12) { opus_val32 x0, x1, x2, x3, x4; int i; x4 = SHL32(x[-T-2], 1); x3 = SHL32(x[-T-1], 1); x2 = SHL32(x[-T], 1); x1 = SHL32(x[-T+1], 1); for (i=0;inbEBands;i++) { int N; N=(m->eBands[i+1]-m->eBands[i])<cache.caps[m->nbEBands*(2*LM+C-1)+i]+64)*C*N>>2; } } const char *opus_strerror(int error) { static const char * const error_strings[8] = { "success", "invalid argument", "buffer too small", "internal error", "corrupted stream", "request not implemented", "invalid state", "memory allocation failed" }; if (error > 0 || error < -7) return "unknown error"; else return error_strings[-error]; } const char *opus_get_version_string(void) { return "libopus " PACKAGE_VERSION /* Applications may rely on the presence of this substring in the version string to determine if they have a fixed-point or floating-point build at runtime. */ #ifdef FIXED_POINT "-fixed" #endif #ifdef FUZZING "-fuzzing" #endif ; } opus-1.1.2/celt/celt.h000066400000000000000000000165741264527674100145630ustar00rootroot00000000000000/* Copyright (c) 2007-2008 CSIRO Copyright (c) 2007-2009 Xiph.Org Foundation Copyright (c) 2008 Gregory Maxwell Written by Jean-Marc Valin and Gregory Maxwell */ /** @file celt.h @brief Contains all the functions for encoding and decoding audio */ /* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - 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. 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 OWNER 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. */ #ifndef CELT_H #define CELT_H #include "opus_types.h" #include "opus_defines.h" #include "opus_custom.h" #include "entenc.h" #include "entdec.h" #include "arch.h" #ifdef __cplusplus extern "C" { #endif #define CELTEncoder OpusCustomEncoder #define CELTDecoder OpusCustomDecoder #define CELTMode OpusCustomMode typedef struct { int valid; float tonality; float tonality_slope; float noisiness; float activity; float music_prob; int bandwidth; }AnalysisInfo; #define __celt_check_mode_ptr_ptr(ptr) ((ptr) + ((ptr) - (const CELTMode**)(ptr))) #define __celt_check_analysis_ptr(ptr) ((ptr) + ((ptr) - (const AnalysisInfo*)(ptr))) /* Encoder/decoder Requests */ /* Expose this option again when variable framesize actually works */ #define OPUS_FRAMESIZE_VARIABLE 5010 /**< Optimize the frame size dynamically */ #define CELT_SET_PREDICTION_REQUEST 10002 /** Controls the use of interframe prediction. 0=Independent frames 1=Short term interframe prediction allowed 2=Long term prediction allowed */ #define CELT_SET_PREDICTION(x) CELT_SET_PREDICTION_REQUEST, __opus_check_int(x) #define CELT_SET_INPUT_CLIPPING_REQUEST 10004 #define CELT_SET_INPUT_CLIPPING(x) CELT_SET_INPUT_CLIPPING_REQUEST, __opus_check_int(x) #define CELT_GET_AND_CLEAR_ERROR_REQUEST 10007 #define CELT_GET_AND_CLEAR_ERROR(x) CELT_GET_AND_CLEAR_ERROR_REQUEST, __opus_check_int_ptr(x) #define CELT_SET_CHANNELS_REQUEST 10008 #define CELT_SET_CHANNELS(x) CELT_SET_CHANNELS_REQUEST, __opus_check_int(x) /* Internal */ #define CELT_SET_START_BAND_REQUEST 10010 #define CELT_SET_START_BAND(x) CELT_SET_START_BAND_REQUEST, __opus_check_int(x) #define CELT_SET_END_BAND_REQUEST 10012 #define CELT_SET_END_BAND(x) CELT_SET_END_BAND_REQUEST, __opus_check_int(x) #define CELT_GET_MODE_REQUEST 10015 /** Get the CELTMode used by an encoder or decoder */ #define CELT_GET_MODE(x) CELT_GET_MODE_REQUEST, __celt_check_mode_ptr_ptr(x) #define CELT_SET_SIGNALLING_REQUEST 10016 #define CELT_SET_SIGNALLING(x) CELT_SET_SIGNALLING_REQUEST, __opus_check_int(x) #define CELT_SET_TONALITY_REQUEST 10018 #define CELT_SET_TONALITY(x) CELT_SET_TONALITY_REQUEST, __opus_check_int(x) #define CELT_SET_TONALITY_SLOPE_REQUEST 10020 #define CELT_SET_TONALITY_SLOPE(x) CELT_SET_TONALITY_SLOPE_REQUEST, __opus_check_int(x) #define CELT_SET_ANALYSIS_REQUEST 10022 #define CELT_SET_ANALYSIS(x) CELT_SET_ANALYSIS_REQUEST, __celt_check_analysis_ptr(x) #define OPUS_SET_LFE_REQUEST 10024 #define OPUS_SET_LFE(x) OPUS_SET_LFE_REQUEST, __opus_check_int(x) #define OPUS_SET_ENERGY_MASK_REQUEST 10026 #define OPUS_SET_ENERGY_MASK(x) OPUS_SET_ENERGY_MASK_REQUEST, __opus_check_val16_ptr(x) /* Encoder stuff */ int celt_encoder_get_size(int channels); int celt_encode_with_ec(OpusCustomEncoder * OPUS_RESTRICT st, const opus_val16 * pcm, int frame_size, unsigned char *compressed, int nbCompressedBytes, ec_enc *enc); int celt_encoder_init(CELTEncoder *st, opus_int32 sampling_rate, int channels, int arch); /* Decoder stuff */ int celt_decoder_get_size(int channels); int celt_decoder_init(CELTDecoder *st, opus_int32 sampling_rate, int channels); int celt_decode_with_ec(OpusCustomDecoder * OPUS_RESTRICT st, const unsigned char *data, int len, opus_val16 * OPUS_RESTRICT pcm, int frame_size, ec_dec *dec, int accum); #define celt_encoder_ctl opus_custom_encoder_ctl #define celt_decoder_ctl opus_custom_decoder_ctl #ifdef CUSTOM_MODES #define OPUS_CUSTOM_NOSTATIC #else #define OPUS_CUSTOM_NOSTATIC static OPUS_INLINE #endif static const unsigned char trim_icdf[11] = {126, 124, 119, 109, 87, 41, 19, 9, 4, 2, 0}; /* Probs: NONE: 21.875%, LIGHT: 6.25%, NORMAL: 65.625%, AGGRESSIVE: 6.25% */ static const unsigned char spread_icdf[4] = {25, 23, 2, 0}; static const unsigned char tapset_icdf[3]={2,1,0}; #ifdef CUSTOM_MODES static const unsigned char toOpusTable[20] = { 0xE0, 0xE8, 0xF0, 0xF8, 0xC0, 0xC8, 0xD0, 0xD8, 0xA0, 0xA8, 0xB0, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x80, 0x88, 0x90, 0x98, }; static const unsigned char fromOpusTable[16] = { 0x80, 0x88, 0x90, 0x98, 0x40, 0x48, 0x50, 0x58, 0x20, 0x28, 0x30, 0x38, 0x00, 0x08, 0x10, 0x18 }; static OPUS_INLINE int toOpus(unsigned char c) { int ret=0; if (c<0xA0) ret = toOpusTable[c>>3]; if (ret == 0) return -1; else return ret|(c&0x7); } static OPUS_INLINE int fromOpus(unsigned char c) { if (c<0x80) return -1; else return fromOpusTable[(c>>3)-16] | (c&0x7); } #endif /* CUSTOM_MODES */ #define COMBFILTER_MAXPERIOD 1024 #define COMBFILTER_MINPERIOD 15 extern const signed char tf_select_table[4][8]; int resampling_factor(opus_int32 rate); void celt_preemphasis(const opus_val16 * OPUS_RESTRICT pcmp, celt_sig * OPUS_RESTRICT inp, int N, int CC, int upsample, const opus_val16 *coef, celt_sig *mem, int clip); void comb_filter(opus_val32 *y, opus_val32 *x, int T0, int T1, int N, opus_val16 g0, opus_val16 g1, int tapset0, int tapset1, const opus_val16 *window, int overlap, int arch); #ifdef NON_STATIC_COMB_FILTER_CONST_C void comb_filter_const_c(opus_val32 *y, opus_val32 *x, int T, int N, opus_val16 g10, opus_val16 g11, opus_val16 g12); #endif #ifndef OVERRIDE_COMB_FILTER_CONST # define comb_filter_const(y, x, T, N, g10, g11, g12, arch) \ ((void)(arch),comb_filter_const_c(y, x, T, N, g10, g11, g12)) #endif void init_caps(const CELTMode *m,int *cap,int LM,int C); #ifdef RESYNTH void deemphasis(celt_sig *in[], opus_val16 *pcm, int N, int C, int downsample, const opus_val16 *coef, celt_sig *mem); void celt_synthesis(const CELTMode *mode, celt_norm *X, celt_sig * out_syn[], opus_val16 *oldBandE, int start, int effEnd, int C, int CC, int isTransient, int LM, int downsample, int silence); #endif #ifdef __cplusplus } #endif #endif /* CELT_H */ opus-1.1.2/celt/celt_decoder.c000066400000000000000000001124051264527674100162310ustar00rootroot00000000000000/* Copyright (c) 2007-2008 CSIRO Copyright (c) 2007-2010 Xiph.Org Foundation Copyright (c) 2008 Gregory Maxwell Written by Jean-Marc Valin and Gregory Maxwell */ /* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - 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. 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 OWNER 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. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #define CELT_DECODER_C #include "cpu_support.h" #include "os_support.h" #include "mdct.h" #include #include "celt.h" #include "pitch.h" #include "bands.h" #include "modes.h" #include "entcode.h" #include "quant_bands.h" #include "rate.h" #include "stack_alloc.h" #include "mathops.h" #include "float_cast.h" #include #include "celt_lpc.h" #include "vq.h" #if defined(SMALL_FOOTPRINT) && defined(FIXED_POINT) #define NORM_ALIASING_HACK #endif /**********************************************************************/ /* */ /* DECODER */ /* */ /**********************************************************************/ #define DECODE_BUFFER_SIZE 2048 /** Decoder state @brief Decoder state */ struct OpusCustomDecoder { const OpusCustomMode *mode; int overlap; int channels; int stream_channels; int downsample; int start, end; int signalling; int arch; /* Everything beyond this point gets cleared on a reset */ #define DECODER_RESET_START rng opus_uint32 rng; int error; int last_pitch_index; int loss_count; int postfilter_period; int postfilter_period_old; opus_val16 postfilter_gain; opus_val16 postfilter_gain_old; int postfilter_tapset; int postfilter_tapset_old; celt_sig preemph_memD[2]; celt_sig _decode_mem[1]; /* Size = channels*(DECODE_BUFFER_SIZE+mode->overlap) */ /* opus_val16 lpc[], Size = channels*LPC_ORDER */ /* opus_val16 oldEBands[], Size = 2*mode->nbEBands */ /* opus_val16 oldLogE[], Size = 2*mode->nbEBands */ /* opus_val16 oldLogE2[], Size = 2*mode->nbEBands */ /* opus_val16 backgroundLogE[], Size = 2*mode->nbEBands */ }; int celt_decoder_get_size(int channels) { const CELTMode *mode = opus_custom_mode_create(48000, 960, NULL); return opus_custom_decoder_get_size(mode, channels); } OPUS_CUSTOM_NOSTATIC int opus_custom_decoder_get_size(const CELTMode *mode, int channels) { int size = sizeof(struct CELTDecoder) + (channels*(DECODE_BUFFER_SIZE+mode->overlap)-1)*sizeof(celt_sig) + channels*LPC_ORDER*sizeof(opus_val16) + 4*2*mode->nbEBands*sizeof(opus_val16); return size; } #ifdef CUSTOM_MODES CELTDecoder *opus_custom_decoder_create(const CELTMode *mode, int channels, int *error) { int ret; CELTDecoder *st = (CELTDecoder *)opus_alloc(opus_custom_decoder_get_size(mode, channels)); ret = opus_custom_decoder_init(st, mode, channels); if (ret != OPUS_OK) { opus_custom_decoder_destroy(st); st = NULL; } if (error) *error = ret; return st; } #endif /* CUSTOM_MODES */ int celt_decoder_init(CELTDecoder *st, opus_int32 sampling_rate, int channels) { int ret; ret = opus_custom_decoder_init(st, opus_custom_mode_create(48000, 960, NULL), channels); if (ret != OPUS_OK) return ret; st->downsample = resampling_factor(sampling_rate); if (st->downsample==0) return OPUS_BAD_ARG; else return OPUS_OK; } OPUS_CUSTOM_NOSTATIC int opus_custom_decoder_init(CELTDecoder *st, const CELTMode *mode, int channels) { if (channels < 0 || channels > 2) return OPUS_BAD_ARG; if (st==NULL) return OPUS_ALLOC_FAIL; OPUS_CLEAR((char*)st, opus_custom_decoder_get_size(mode, channels)); st->mode = mode; st->overlap = mode->overlap; st->stream_channels = st->channels = channels; st->downsample = 1; st->start = 0; st->end = st->mode->effEBands; st->signalling = 1; st->arch = opus_select_arch(); st->loss_count = 0; opus_custom_decoder_ctl(st, OPUS_RESET_STATE); return OPUS_OK; } #ifdef CUSTOM_MODES void opus_custom_decoder_destroy(CELTDecoder *st) { opus_free(st); } #endif /* CUSTOM_MODES */ #ifndef RESYNTH static #endif void deemphasis(celt_sig *in[], opus_val16 *pcm, int N, int C, int downsample, const opus_val16 *coef, celt_sig *mem, int accum) { int c; int Nd; int apply_downsampling=0; opus_val16 coef0; VARDECL(celt_sig, scratch); SAVE_STACK; #ifndef FIXED_POINT (void)accum; celt_assert(accum==0); #endif ALLOC(scratch, N, celt_sig); coef0 = coef[0]; Nd = N/downsample; c=0; do { int j; celt_sig * OPUS_RESTRICT x; opus_val16 * OPUS_RESTRICT y; celt_sig m = mem[c]; x =in[c]; y = pcm+c; #ifdef CUSTOM_MODES if (coef[1] != 0) { opus_val16 coef1 = coef[1]; opus_val16 coef3 = coef[3]; for (j=0;j1) { /* Shortcut for the standard (non-custom modes) case */ for (j=0;joverlap; nbEBands = mode->nbEBands; N = mode->shortMdctSize<shortMdctSize; shift = mode->maxLM; } else { B = 1; NB = mode->shortMdctSize<maxLM-LM; } if (CC==2&&C==1) { /* Copying a mono streams to two channels */ celt_sig *freq2; denormalise_bands(mode, X, freq, oldBandE, start, effEnd, M, downsample, silence); /* Store a temporary copy in the output buffer because the IMDCT destroys its input. */ freq2 = out_syn[1]+overlap/2; OPUS_COPY(freq2, freq, N); for (b=0;bmdct, &freq2[b], out_syn[0]+NB*b, mode->window, overlap, shift, B, arch); for (b=0;bmdct, &freq[b], out_syn[1]+NB*b, mode->window, overlap, shift, B, arch); } else if (CC==1&&C==2) { /* Downmixing a stereo stream to mono */ celt_sig *freq2; freq2 = out_syn[0]+overlap/2; denormalise_bands(mode, X, freq, oldBandE, start, effEnd, M, downsample, silence); /* Use the output buffer as temp array before downmixing. */ denormalise_bands(mode, X+N, freq2, oldBandE+nbEBands, start, effEnd, M, downsample, silence); for (i=0;imdct, &freq[b], out_syn[0]+NB*b, mode->window, overlap, shift, B, arch); } else { /* Normal case (mono or stereo) */ c=0; do { denormalise_bands(mode, X+c*N, freq, oldBandE+c*nbEBands, start, effEnd, M, downsample, silence); for (b=0;bmdct, &freq[b], out_syn[c]+NB*b, mode->window, overlap, shift, B, arch); } while (++cstorage*8; tell = ec_tell(dec); logp = isTransient ? 2 : 4; tf_select_rsv = LM>0 && tell+logp+1<=budget; budget -= tf_select_rsv; tf_changed = curr = 0; for (i=start;i>1, opus_val16 ); pitch_downsample(decode_mem, lp_pitch_buf, DECODE_BUFFER_SIZE, C, arch); pitch_search(lp_pitch_buf+(PLC_PITCH_LAG_MAX>>1), lp_pitch_buf, DECODE_BUFFER_SIZE-PLC_PITCH_LAG_MAX, PLC_PITCH_LAG_MAX-PLC_PITCH_LAG_MIN, &pitch_index, arch); pitch_index = PLC_PITCH_LAG_MAX-pitch_index; RESTORE_STACK; return pitch_index; } static void celt_decode_lost(CELTDecoder * OPUS_RESTRICT st, int N, int LM) { int c; int i; const int C = st->channels; celt_sig *decode_mem[2]; celt_sig *out_syn[2]; opus_val16 *lpc; opus_val16 *oldBandE, *oldLogE, *oldLogE2, *backgroundLogE; const OpusCustomMode *mode; int nbEBands; int overlap; int start; int loss_count; int noise_based; const opus_int16 *eBands; SAVE_STACK; mode = st->mode; nbEBands = mode->nbEBands; overlap = mode->overlap; eBands = mode->eBands; c=0; do { decode_mem[c] = st->_decode_mem + c*(DECODE_BUFFER_SIZE+overlap); out_syn[c] = decode_mem[c]+DECODE_BUFFER_SIZE-N; } while (++c_decode_mem+(DECODE_BUFFER_SIZE+overlap)*C); oldBandE = lpc+C*LPC_ORDER; oldLogE = oldBandE + 2*nbEBands; oldLogE2 = oldLogE + 2*nbEBands; backgroundLogE = oldLogE2 + 2*nbEBands; loss_count = st->loss_count; start = st->start; noise_based = loss_count >= 5 || start != 0; if (noise_based) { /* Noise-based PLC/CNG */ #ifdef NORM_ALIASING_HACK celt_norm *X; #else VARDECL(celt_norm, X); #endif opus_uint32 seed; int end; int effEnd; opus_val16 decay; end = st->end; effEnd = IMAX(start, IMIN(end, mode->effEBands)); #ifdef NORM_ALIASING_HACK /* This is an ugly hack that breaks aliasing rules and would be easily broken, but it saves almost 4kB of stack. */ X = (celt_norm*)(out_syn[C-1]+overlap/2); #else ALLOC(X, C*N, celt_norm); /**< Interleaved normalised MDCTs */ #endif /* Energy decay */ decay = loss_count==0 ? QCONST16(1.5f, DB_SHIFT) : QCONST16(.5f, DB_SHIFT); c=0; do { for (i=start;irng; for (c=0;c>20); } renormalise_vector(X+boffs, blen, Q15ONE, st->arch); } } st->rng = seed; c=0; do { OPUS_MOVE(decode_mem[c], decode_mem[c]+N, DECODE_BUFFER_SIZE-N+(overlap>>1)); } while (++cdownsample, 0, st->arch); } else { /* Pitch-based PLC */ const opus_val16 *window; opus_val16 fade = Q15ONE; int pitch_index; VARDECL(opus_val32, etmp); VARDECL(opus_val16, exc); if (loss_count == 0) { st->last_pitch_index = pitch_index = celt_plc_pitch_search(decode_mem, C, st->arch); } else { pitch_index = st->last_pitch_index; fade = QCONST16(.8f,15); } ALLOC(etmp, overlap, opus_val32); ALLOC(exc, MAX_PERIOD, opus_val16); window = mode->window; c=0; do { opus_val16 decay; opus_val16 attenuation; opus_val32 S1=0; celt_sig *buf; int extrapolation_offset; int extrapolation_len; int exc_length; int j; buf = decode_mem[c]; for (i=0;iarch); /* Add a noise floor of -40 dB. */ #ifdef FIXED_POINT ac[0] += SHR32(ac[0],13); #else ac[0] *= 1.0001f; #endif /* Use lag windowing to stabilize the Levinson-Durbin recursion. */ for (i=1;i<=LPC_ORDER;i++) { /*ac[i] *= exp(-.5*(2*M_PI*.002*i)*(2*M_PI*.002*i));*/ #ifdef FIXED_POINT ac[i] -= MULT16_32_Q15(2*i*i, ac[i]); #else ac[i] -= ac[i]*(0.008f*0.008f)*i*i; #endif } _celt_lpc(lpc+c*LPC_ORDER, ac, LPC_ORDER); } /* We want the excitation for 2 pitch periods in order to look for a decaying signal, but we can't get more than MAX_PERIOD. */ exc_length = IMIN(2*pitch_index, MAX_PERIOD); /* Initialize the LPC history with the samples just before the start of the region for which we're computing the excitation. */ { opus_val16 lpc_mem[LPC_ORDER]; for (i=0;iarch); } /* Check if the waveform is decaying, and if so how fast. We do this to avoid adding energy when concealing in a segment with decaying energy. */ { opus_val32 E1=1, E2=1; int decay_length; #ifdef FIXED_POINT int shift = IMAX(0,2*celt_zlog2(celt_maxabs16(&exc[MAX_PERIOD-exc_length], exc_length))-20); #endif decay_length = exc_length>>1; for (i=0;i= pitch_index) { j -= pitch_index; attenuation = MULT16_16_Q15(attenuation, decay); } buf[DECODE_BUFFER_SIZE-N+i] = SHL32(EXTEND32(MULT16_16_Q15(attenuation, exc[extrapolation_offset+j])), SIG_SHIFT); /* Compute the energy of the previously decoded signal whose excitation we're copying. */ tmp = ROUND16( buf[DECODE_BUFFER_SIZE-MAX_PERIOD-N+extrapolation_offset+j], SIG_SHIFT); S1 += SHR32(MULT16_16(tmp, tmp), 8); } { opus_val16 lpc_mem[LPC_ORDER]; /* Copy the last decoded samples (prior to the overlap region) to synthesis filter memory so we can have a continuous signal. */ for (i=0;iarch); } /* Check if the synthesis energy is higher than expected, which can happen with the signal changes during our window. If so, attenuate. */ { opus_val32 S2=0; for (i=0;i SHR32(S2,2))) #else /* The float test is written this way to catch NaNs in the output of the IIR filter at the same time. */ if (!(S1 > 0.2f*S2)) #endif { for (i=0;ipostfilter_period, st->postfilter_period, overlap, -st->postfilter_gain, -st->postfilter_gain, st->postfilter_tapset, st->postfilter_tapset, NULL, 0, st->arch); /* Simulate TDAC on the concealed audio so that it blends with the MDCT of the next frame. */ for (i=0;iloss_count = loss_count+1; RESTORE_STACK; } int celt_decode_with_ec(CELTDecoder * OPUS_RESTRICT st, const unsigned char *data, int len, opus_val16 * OPUS_RESTRICT pcm, int frame_size, ec_dec *dec, int accum) { int c, i, N; int spread_decision; opus_int32 bits; ec_dec _dec; #ifdef NORM_ALIASING_HACK celt_norm *X; #else VARDECL(celt_norm, X); #endif VARDECL(int, fine_quant); VARDECL(int, pulses); VARDECL(int, cap); VARDECL(int, offsets); VARDECL(int, fine_priority); VARDECL(int, tf_res); VARDECL(unsigned char, collapse_masks); celt_sig *decode_mem[2]; celt_sig *out_syn[2]; opus_val16 *lpc; opus_val16 *oldBandE, *oldLogE, *oldLogE2, *backgroundLogE; int shortBlocks; int isTransient; int intra_ener; const int CC = st->channels; int LM, M; int start; int end; int effEnd; int codedBands; int alloc_trim; int postfilter_pitch; opus_val16 postfilter_gain; int intensity=0; int dual_stereo=0; opus_int32 total_bits; opus_int32 balance; opus_int32 tell; int dynalloc_logp; int postfilter_tapset; int anti_collapse_rsv; int anti_collapse_on=0; int silence; int C = st->stream_channels; const OpusCustomMode *mode; int nbEBands; int overlap; const opus_int16 *eBands; ALLOC_STACK; mode = st->mode; nbEBands = mode->nbEBands; overlap = mode->overlap; eBands = mode->eBands; start = st->start; end = st->end; frame_size *= st->downsample; lpc = (opus_val16*)(st->_decode_mem+(DECODE_BUFFER_SIZE+overlap)*CC); oldBandE = lpc+CC*LPC_ORDER; oldLogE = oldBandE + 2*nbEBands; oldLogE2 = oldLogE + 2*nbEBands; backgroundLogE = oldLogE2 + 2*nbEBands; #ifdef CUSTOM_MODES if (st->signalling && data!=NULL) { int data0=data[0]; /* Convert "standard mode" to Opus header */ if (mode->Fs==48000 && mode->shortMdctSize==120) { data0 = fromOpus(data0); if (data0<0) return OPUS_INVALID_PACKET; } st->end = end = IMAX(1, mode->effEBands-2*(data0>>5)); LM = (data0>>3)&0x3; C = 1 + ((data0>>2)&0x1); data++; len--; if (LM>mode->maxLM) return OPUS_INVALID_PACKET; if (frame_size < mode->shortMdctSize<shortMdctSize<maxLM;LM++) if (mode->shortMdctSize<mode->maxLM) return OPUS_BAD_ARG; } M=1<1275 || pcm==NULL) return OPUS_BAD_ARG; N = M*mode->shortMdctSize; c=0; do { decode_mem[c] = st->_decode_mem + c*(DECODE_BUFFER_SIZE+overlap); out_syn[c] = decode_mem[c]+DECODE_BUFFER_SIZE-N; } while (++c mode->effEBands) effEnd = mode->effEBands; if (data == NULL || len<=1) { celt_decode_lost(st, N, LM); deemphasis(out_syn, pcm, N, CC, st->downsample, mode->preemph, st->preemph_memD, accum); RESTORE_STACK; return frame_size/st->downsample; } if (dec == NULL) { ec_dec_init(&_dec,(unsigned char*)data,len); dec = &_dec; } if (C==1) { for (i=0;i= total_bits) silence = 1; else if (tell==1) silence = ec_dec_bit_logp(dec, 15); else silence = 0; if (silence) { /* Pretend we've read all the remaining bits */ tell = len*8; dec->nbits_total+=tell-ec_tell(dec); } postfilter_gain = 0; postfilter_pitch = 0; postfilter_tapset = 0; if (start==0 && tell+16 <= total_bits) { if(ec_dec_bit_logp(dec, 1)) { int qg, octave; octave = ec_dec_uint(dec, 6); postfilter_pitch = (16< 0 && tell+3 <= total_bits) { isTransient = ec_dec_bit_logp(dec, 3); tell = ec_tell(dec); } else isTransient = 0; if (isTransient) shortBlocks = M; else shortBlocks = 0; /* Decode the global flags (first symbols in the stream) */ intra_ener = tell+3<=total_bits ? ec_dec_bit_logp(dec, 3) : 0; /* Get band energies */ unquant_coarse_energy(mode, start, end, oldBandE, intra_ener, dec, C, LM); ALLOC(tf_res, nbEBands, int); tf_decode(start, end, isTransient, tf_res, LM, dec); tell = ec_tell(dec); spread_decision = SPREAD_NORMAL; if (tell+4 <= total_bits) spread_decision = ec_dec_icdf(dec, spread_icdf, 5); ALLOC(cap, nbEBands, int); init_caps(mode,cap,LM,C); ALLOC(offsets, nbEBands, int); dynalloc_logp = 6; total_bits<<=BITRES; tell = ec_tell_frac(dec); for (i=start;i0) dynalloc_logp = IMAX(2, dynalloc_logp-1); } ALLOC(fine_quant, nbEBands, int); alloc_trim = tell+(6<=2&&bits>=((LM+2)<rng, st->arch); if (anti_collapse_rsv > 0) { anti_collapse_on = ec_dec_bits(dec, 1); } unquant_energy_finalise(mode, start, end, oldBandE, fine_quant, fine_priority, len*8-ec_tell(dec), dec, C); if (anti_collapse_on) anti_collapse(mode, X, collapse_masks, LM, C, N, start, end, oldBandE, oldLogE, oldLogE2, pulses, st->rng, st->arch); if (silence) { for (i=0;idownsample, silence, st->arch); c=0; do { st->postfilter_period=IMAX(st->postfilter_period, COMBFILTER_MINPERIOD); st->postfilter_period_old=IMAX(st->postfilter_period_old, COMBFILTER_MINPERIOD); comb_filter(out_syn[c], out_syn[c], st->postfilter_period_old, st->postfilter_period, mode->shortMdctSize, st->postfilter_gain_old, st->postfilter_gain, st->postfilter_tapset_old, st->postfilter_tapset, mode->window, overlap, st->arch); if (LM!=0) comb_filter(out_syn[c]+mode->shortMdctSize, out_syn[c]+mode->shortMdctSize, st->postfilter_period, postfilter_pitch, N-mode->shortMdctSize, st->postfilter_gain, postfilter_gain, st->postfilter_tapset, postfilter_tapset, mode->window, overlap, st->arch); } while (++cpostfilter_period_old = st->postfilter_period; st->postfilter_gain_old = st->postfilter_gain; st->postfilter_tapset_old = st->postfilter_tapset; st->postfilter_period = postfilter_pitch; st->postfilter_gain = postfilter_gain; st->postfilter_tapset = postfilter_tapset; if (LM!=0) { st->postfilter_period_old = st->postfilter_period; st->postfilter_gain_old = st->postfilter_gain; st->postfilter_tapset_old = st->postfilter_tapset; } if (C==1) OPUS_COPY(&oldBandE[nbEBands], oldBandE, nbEBands); /* In case start or end were to change */ if (!isTransient) { opus_val16 max_background_increase; OPUS_COPY(oldLogE2, oldLogE, 2*nbEBands); OPUS_COPY(oldLogE, oldBandE, 2*nbEBands); /* In normal circumstances, we only allow the noise floor to increase by up to 2.4 dB/second, but when we're in DTX, we allow up to 6 dB increase for each update.*/ if (st->loss_count < 10) max_background_increase = M*QCONST16(0.001f,DB_SHIFT); else max_background_increase = QCONST16(1.f,DB_SHIFT); for (i=0;i<2*nbEBands;i++) backgroundLogE[i] = MIN16(backgroundLogE[i] + max_background_increase, oldBandE[i]); } else { for (i=0;i<2*nbEBands;i++) oldLogE[i] = MIN16(oldLogE[i], oldBandE[i]); } c=0; do { for (i=0;irng = dec->rng; deemphasis(out_syn, pcm, N, CC, st->downsample, mode->preemph, st->preemph_memD, accum); st->loss_count = 0; RESTORE_STACK; if (ec_tell(dec) > 8*len) return OPUS_INTERNAL_ERROR; if(ec_get_error(dec)) st->error = 1; return frame_size/st->downsample; } #ifdef CUSTOM_MODES #ifdef FIXED_POINT int opus_custom_decode(CELTDecoder * OPUS_RESTRICT st, const unsigned char *data, int len, opus_int16 * OPUS_RESTRICT pcm, int frame_size) { return celt_decode_with_ec(st, data, len, pcm, frame_size, NULL, 0); } #ifndef DISABLE_FLOAT_API int opus_custom_decode_float(CELTDecoder * OPUS_RESTRICT st, const unsigned char *data, int len, float * OPUS_RESTRICT pcm, int frame_size) { int j, ret, C, N; VARDECL(opus_int16, out); ALLOC_STACK; if (pcm==NULL) return OPUS_BAD_ARG; C = st->channels; N = frame_size; ALLOC(out, C*N, opus_int16); ret=celt_decode_with_ec(st, data, len, out, frame_size, NULL, 0); if (ret>0) for (j=0;jchannels; N = frame_size; ALLOC(out, C*N, celt_sig); ret=celt_decode_with_ec(st, data, len, out, frame_size, NULL, 0); if (ret>0) for (j=0;j=st->mode->nbEBands) goto bad_arg; st->start = value; } break; case CELT_SET_END_BAND_REQUEST: { opus_int32 value = va_arg(ap, opus_int32); if (value<1 || value>st->mode->nbEBands) goto bad_arg; st->end = value; } break; case CELT_SET_CHANNELS_REQUEST: { opus_int32 value = va_arg(ap, opus_int32); if (value<1 || value>2) goto bad_arg; st->stream_channels = value; } break; case CELT_GET_AND_CLEAR_ERROR_REQUEST: { opus_int32 *value = va_arg(ap, opus_int32*); if (value==NULL) goto bad_arg; *value=st->error; st->error = 0; } break; case OPUS_GET_LOOKAHEAD_REQUEST: { opus_int32 *value = va_arg(ap, opus_int32*); if (value==NULL) goto bad_arg; *value = st->overlap/st->downsample; } break; case OPUS_RESET_STATE: { int i; opus_val16 *lpc, *oldBandE, *oldLogE, *oldLogE2; lpc = (opus_val16*)(st->_decode_mem+(DECODE_BUFFER_SIZE+st->overlap)*st->channels); oldBandE = lpc+st->channels*LPC_ORDER; oldLogE = oldBandE + 2*st->mode->nbEBands; oldLogE2 = oldLogE + 2*st->mode->nbEBands; OPUS_CLEAR((char*)&st->DECODER_RESET_START, opus_custom_decoder_get_size(st->mode, st->channels)- ((char*)&st->DECODER_RESET_START - (char*)st)); for (i=0;i<2*st->mode->nbEBands;i++) oldLogE[i]=oldLogE2[i]=-QCONST16(28.f,DB_SHIFT); } break; case OPUS_GET_PITCH_REQUEST: { opus_int32 *value = va_arg(ap, opus_int32*); if (value==NULL) goto bad_arg; *value = st->postfilter_period; } break; case CELT_GET_MODE_REQUEST: { const CELTMode ** value = va_arg(ap, const CELTMode**); if (value==0) goto bad_arg; *value=st->mode; } break; case CELT_SET_SIGNALLING_REQUEST: { opus_int32 value = va_arg(ap, opus_int32); st->signalling = value; } break; case OPUS_GET_FINAL_RANGE_REQUEST: { opus_uint32 * value = va_arg(ap, opus_uint32 *); if (value==0) goto bad_arg; *value=st->rng; } break; default: goto bad_request; } va_end(ap); return OPUS_OK; bad_arg: va_end(ap); return OPUS_BAD_ARG; bad_request: va_end(ap); return OPUS_UNIMPLEMENTED; } opus-1.1.2/celt/celt_encoder.c000066400000000000000000002260031264527674100162430ustar00rootroot00000000000000/* Copyright (c) 2007-2008 CSIRO Copyright (c) 2007-2010 Xiph.Org Foundation Copyright (c) 2008 Gregory Maxwell Written by Jean-Marc Valin and Gregory Maxwell */ /* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - 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. 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 OWNER 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. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #define CELT_ENCODER_C #include "cpu_support.h" #include "os_support.h" #include "mdct.h" #include #include "celt.h" #include "pitch.h" #include "bands.h" #include "modes.h" #include "entcode.h" #include "quant_bands.h" #include "rate.h" #include "stack_alloc.h" #include "mathops.h" #include "float_cast.h" #include #include "celt_lpc.h" #include "vq.h" /** Encoder state @brief Encoder state */ struct OpusCustomEncoder { const OpusCustomMode *mode; /**< Mode used by the encoder */ int channels; int stream_channels; int force_intra; int clip; int disable_pf; int complexity; int upsample; int start, end; opus_int32 bitrate; int vbr; int signalling; int constrained_vbr; /* If zero, VBR can do whatever it likes with the rate */ int loss_rate; int lsb_depth; int variable_duration; int lfe; int arch; /* Everything beyond this point gets cleared on a reset */ #define ENCODER_RESET_START rng opus_uint32 rng; int spread_decision; opus_val32 delayedIntra; int tonal_average; int lastCodedBands; int hf_average; int tapset_decision; int prefilter_period; opus_val16 prefilter_gain; int prefilter_tapset; #ifdef RESYNTH int prefilter_period_old; opus_val16 prefilter_gain_old; int prefilter_tapset_old; #endif int consec_transient; AnalysisInfo analysis; opus_val32 preemph_memE[2]; opus_val32 preemph_memD[2]; /* VBR-related parameters */ opus_int32 vbr_reservoir; opus_int32 vbr_drift; opus_int32 vbr_offset; opus_int32 vbr_count; opus_val32 overlap_max; opus_val16 stereo_saving; int intensity; opus_val16 *energy_mask; opus_val16 spec_avg; #ifdef RESYNTH /* +MAX_PERIOD/2 to make space for overlap */ celt_sig syn_mem[2][2*MAX_PERIOD+MAX_PERIOD/2]; #endif celt_sig in_mem[1]; /* Size = channels*mode->overlap */ /* celt_sig prefilter_mem[], Size = channels*COMBFILTER_MAXPERIOD */ /* opus_val16 oldBandE[], Size = channels*mode->nbEBands */ /* opus_val16 oldLogE[], Size = channels*mode->nbEBands */ /* opus_val16 oldLogE2[], Size = channels*mode->nbEBands */ }; int celt_encoder_get_size(int channels) { CELTMode *mode = opus_custom_mode_create(48000, 960, NULL); return opus_custom_encoder_get_size(mode, channels); } OPUS_CUSTOM_NOSTATIC int opus_custom_encoder_get_size(const CELTMode *mode, int channels) { int size = sizeof(struct CELTEncoder) + (channels*mode->overlap-1)*sizeof(celt_sig) /* celt_sig in_mem[channels*mode->overlap]; */ + channels*COMBFILTER_MAXPERIOD*sizeof(celt_sig) /* celt_sig prefilter_mem[channels*COMBFILTER_MAXPERIOD]; */ + 3*channels*mode->nbEBands*sizeof(opus_val16); /* opus_val16 oldBandE[channels*mode->nbEBands]; */ /* opus_val16 oldLogE[channels*mode->nbEBands]; */ /* opus_val16 oldLogE2[channels*mode->nbEBands]; */ return size; } #ifdef CUSTOM_MODES CELTEncoder *opus_custom_encoder_create(const CELTMode *mode, int channels, int *error) { int ret; CELTEncoder *st = (CELTEncoder *)opus_alloc(opus_custom_encoder_get_size(mode, channels)); /* init will handle the NULL case */ ret = opus_custom_encoder_init(st, mode, channels); if (ret != OPUS_OK) { opus_custom_encoder_destroy(st); st = NULL; } if (error) *error = ret; return st; } #endif /* CUSTOM_MODES */ static int opus_custom_encoder_init_arch(CELTEncoder *st, const CELTMode *mode, int channels, int arch) { if (channels < 0 || channels > 2) return OPUS_BAD_ARG; if (st==NULL || mode==NULL) return OPUS_ALLOC_FAIL; OPUS_CLEAR((char*)st, opus_custom_encoder_get_size(mode, channels)); st->mode = mode; st->stream_channels = st->channels = channels; st->upsample = 1; st->start = 0; st->end = st->mode->effEBands; st->signalling = 1; st->arch = arch; st->constrained_vbr = 1; st->clip = 1; st->bitrate = OPUS_BITRATE_MAX; st->vbr = 0; st->force_intra = 0; st->complexity = 5; st->lsb_depth=24; opus_custom_encoder_ctl(st, OPUS_RESET_STATE); return OPUS_OK; } #ifdef CUSTOM_MODES int opus_custom_encoder_init(CELTEncoder *st, const CELTMode *mode, int channels) { return opus_custom_encoder_init_arch(st, mode, channels, opus_select_arch()); } #endif int celt_encoder_init(CELTEncoder *st, opus_int32 sampling_rate, int channels, int arch) { int ret; ret = opus_custom_encoder_init_arch(st, opus_custom_mode_create(48000, 960, NULL), channels, arch); if (ret != OPUS_OK) return ret; st->upsample = resampling_factor(sampling_rate); return OPUS_OK; } #ifdef CUSTOM_MODES void opus_custom_encoder_destroy(CELTEncoder *st) { opus_free(st); } #endif /* CUSTOM_MODES */ static int transient_analysis(const opus_val32 * OPUS_RESTRICT in, int len, int C, opus_val16 *tf_estimate, int *tf_chan) { int i; VARDECL(opus_val16, tmp); opus_val32 mem0,mem1; int is_transient = 0; opus_int32 mask_metric = 0; int c; opus_val16 tf_max; int len2; /* Table of 6*64/x, trained on real data to minimize the average error */ static const unsigned char inv_table[128] = { 255,255,156,110, 86, 70, 59, 51, 45, 40, 37, 33, 31, 28, 26, 25, 23, 22, 21, 20, 19, 18, 17, 16, 16, 15, 15, 14, 13, 13, 12, 12, 12, 12, 11, 11, 11, 10, 10, 10, 9, 9, 9, 9, 9, 9, 8, 8, 8, 8, 8, 7, 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, }; SAVE_STACK; ALLOC(tmp, len, opus_val16); len2=len/2; for (c=0;c=0;i--) { #ifdef FIXED_POINT /* FIXME: Use PSHR16() instead */ tmp[i] = mem0 + PSHR32(tmp[i]-mem0,3); #else tmp[i] = mem0 + MULT16_16_P15(QCONST16(0.125f,15),tmp[i]-mem0); #endif mem0 = tmp[i]; maxE = MAX16(maxE, mem0); } /*for (i=0;i>1))); #else mean = celt_sqrt(mean * maxE*.5*len2); #endif /* Inverse of the mean energy in Q15+6 */ norm = SHL32(EXTEND32(len2),6+14)/ADD32(EPSILON,SHR32(mean,1)); /* Compute harmonic mean discarding the unreliable boundaries The data is smooth, so we only take 1/4th of the samples */ unmask=0; for (i=12;imask_metric) { *tf_chan = c; mask_metric = unmask; } } is_transient = mask_metric>200; /* Arbitrary metric for VBR boost */ tf_max = MAX16(0,celt_sqrt(27*mask_metric)-42); /* *tf_estimate = 1 + MIN16(1, sqrt(MAX16(0, tf_max-30))/20); */ *tf_estimate = celt_sqrt(MAX32(0, SHL32(MULT16_16(QCONST16(0.0069,14),MIN16(163,tf_max)),14)-QCONST32(0.139,28))); /*printf("%d %f\n", tf_max, mask_metric);*/ RESTORE_STACK; #ifdef FUZZING is_transient = rand()&0x1; #endif /*printf("%d %f %d\n", is_transient, (float)*tf_estimate, tf_max);*/ return is_transient; } /* Looks for sudden increases of energy to decide whether we need to patch the transient decision */ static int patch_transient_decision(opus_val16 *newE, opus_val16 *oldE, int nbEBands, int start, int end, int C) { int i, c; opus_val32 mean_diff=0; opus_val16 spread_old[26]; /* Apply an aggressive (-6 dB/Bark) spreading function to the old frame to avoid false detection caused by irrelevant bands */ if (C==1) { spread_old[start] = oldE[start]; for (i=start+1;i=start;i--) spread_old[i] = MAX16(spread_old[i], spread_old[i+1]-QCONST16(1.0f, DB_SHIFT)); /* Compute mean increase */ c=0; do { for (i=IMAX(2,start);i QCONST16(1.f, DB_SHIFT); } /** Apply window and compute the MDCT for all sub-frames and all channels in a frame */ static void compute_mdcts(const CELTMode *mode, int shortBlocks, celt_sig * OPUS_RESTRICT in, celt_sig * OPUS_RESTRICT out, int C, int CC, int LM, int upsample, int arch) { const int overlap = mode->overlap; int N; int B; int shift; int i, b, c; if (shortBlocks) { B = shortBlocks; N = mode->shortMdctSize; shift = mode->maxLM; } else { B = 1; N = mode->shortMdctSize<maxLM-LM; } c=0; do { for (b=0;bmdct, in+c*(B*N+overlap)+b*N, &out[b+c*N*B], mode->window, overlap, shift, B, arch); } } while (++ceBands[len]-m->eBands[len-1])<eBands[len]-m->eBands[len-1])<eBands[i+1]-m->eBands[i])<eBands[i+1]-m->eBands[i])==1; OPUS_COPY(tmp, &X[tf_chan*N0 + (m->eBands[i]<eBands[i]<>LM, 1<>k, 1<=0;i--) { if (tf_res[i+1] == 1) tf_res[i] = path1[i+1]; else tf_res[i] = path0[i+1]; } /*printf("%d %f\n", *tf_sum, tf_estimate);*/ RESTORE_STACK; #ifdef FUZZING tf_select = rand()&0x1; tf_res[0] = rand()&0x1; for (i=1;istorage*8; tell = ec_tell(enc); logp = isTransient ? 2 : 4; /* Reserve space to code the tf_select decision. */ tf_select_rsv = LM>0 && tell+logp+1 <= budget; budget -= tf_select_rsv; curr = tf_changed = 0; for (i=start;ieBands[i]<eBands[i]<eBands[i+1]-m->eBands[i])<eBands[i]<eBands[i]<eBands[i+1]-m->eBands[i])<nbEBands]*(opus_int32)(2+2*i-end); } } while (++cvalid) { trim -= MAX16(-QCONST16(2.f, 8), MIN16(QCONST16(2.f, 8), (opus_val16)(QCONST16(2.f, 8)*(analysis->tonality_slope+.05f)))); } #else (void)analysis; #endif #ifdef FIXED_POINT trim_index = PSHR32(trim, 8); #else trim_index = (int)floor(.5f+trim); #endif trim_index = IMAX(0, IMIN(10, trim_index)); /*printf("%d\n", trim_index);*/ #ifdef FUZZING trim_index = rand()%11; #endif return trim_index; } static int stereo_analysis(const CELTMode *m, const celt_norm *X, int LM, int N0) { int i; int thetas; opus_val32 sumLR = EPSILON, sumMS = EPSILON; /* Use the L1 norm to model the entropy of the L/R signal vs the M/S signal */ for (i=0;i<13;i++) { int j; for (j=m->eBands[i]<eBands[i+1]<eBands[13]<<(LM+1))+thetas, sumMS) > MULT16_32_Q15(m->eBands[13]<<(LM+1), sumLR); } #define MSWAP(a,b) do {opus_val16 tmp = a;a=b;b=tmp;} while(0) static opus_val16 median_of_5(const opus_val16 *x) { opus_val16 t0, t1, t2, t3, t4; t2 = x[2]; if (x[0] > x[1]) { t0 = x[1]; t1 = x[0]; } else { t0 = x[0]; t1 = x[1]; } if (x[3] > x[4]) { t3 = x[4]; t4 = x[3]; } else { t3 = x[3]; t4 = x[4]; } if (t0 > t3) { MSWAP(t0, t3); MSWAP(t1, t4); } if (t2 > t1) { if (t1 < t3) return MIN16(t2, t3); else return MIN16(t4, t1); } else { if (t2 < t3) return MIN16(t1, t3); else return MIN16(t2, t4); } } static opus_val16 median_of_3(const opus_val16 *x) { opus_val16 t0, t1, t2; if (x[0] > x[1]) { t0 = x[1]; t1 = x[0]; } else { t0 = x[0]; t1 = x[1]; } t2 = x[2]; if (t1 < t2) return t1; else if (t0 < t2) return t2; else return t0; } static opus_val16 dynalloc_analysis(const opus_val16 *bandLogE, const opus_val16 *bandLogE2, int nbEBands, int start, int end, int C, int *offsets, int lsb_depth, const opus_int16 *logN, int isTransient, int vbr, int constrained_vbr, const opus_int16 *eBands, int LM, int effectiveBytes, opus_int32 *tot_boost_, int lfe, opus_val16 *surround_dynalloc) { int i, c; opus_int32 tot_boost=0; opus_val16 maxDepth; VARDECL(opus_val16, follower); VARDECL(opus_val16, noise_floor); SAVE_STACK; ALLOC(follower, C*nbEBands, opus_val16); ALLOC(noise_floor, C*nbEBands, opus_val16); OPUS_CLEAR(offsets, nbEBands); /* Dynamic allocation code */ maxDepth=-QCONST16(31.9f, DB_SHIFT); for (i=0;i 50 && LM>=1 && !lfe) { int last=0; c=0;do { opus_val16 offset; opus_val16 tmp; opus_val16 *f; f = &follower[c*nbEBands]; f[0] = bandLogE2[c*nbEBands]; for (i=1;i bandLogE2[c*nbEBands+i-1]+QCONST16(.5f,DB_SHIFT)) last=i; f[i] = MIN16(f[i-1]+QCONST16(1.5f,DB_SHIFT), bandLogE2[c*nbEBands+i]); } for (i=last-1;i>=0;i--) f[i] = MIN16(f[i], MIN16(f[i+1]+QCONST16(2.f,DB_SHIFT), bandLogE2[c*nbEBands+i])); /* Combine with a median filter to avoid dynalloc triggering unnecessarily. The "offset" value controls how conservative we are -- a higher offset reduces the impact of the median filter and makes dynalloc use more bits. */ offset = QCONST16(1.f, DB_SHIFT); for (i=2;i=12) follower[i] = HALF16(follower[i]); follower[i] = MIN16(follower[i], QCONST16(4, DB_SHIFT)); width = C*(eBands[i+1]-eBands[i])< 48) { boost = (int)SHR32(EXTEND32(follower[i])*8,DB_SHIFT); boost_bits = (boost*width<>BITRES>>3 > effectiveBytes/4) { opus_int32 cap = ((effectiveBytes/4)<mode; overlap = mode->overlap; ALLOC(_pre, CC*(N+COMBFILTER_MAXPERIOD), celt_sig); pre[0] = _pre; pre[1] = _pre + (N+COMBFILTER_MAXPERIOD); c=0; do { OPUS_COPY(pre[c], prefilter_mem+c*COMBFILTER_MAXPERIOD, COMBFILTER_MAXPERIOD); OPUS_COPY(pre[c]+COMBFILTER_MAXPERIOD, in+c*(N+overlap)+overlap, N); } while (++c>1, opus_val16); pitch_downsample(pre, pitch_buf, COMBFILTER_MAXPERIOD+N, CC, st->arch); /* Don't search for the fir last 1.5 octave of the range because there's too many false-positives due to short-term correlation */ pitch_search(pitch_buf+(COMBFILTER_MAXPERIOD>>1), pitch_buf, N, COMBFILTER_MAXPERIOD-3*COMBFILTER_MINPERIOD, &pitch_index, st->arch); pitch_index = COMBFILTER_MAXPERIOD-pitch_index; gain1 = remove_doubling(pitch_buf, COMBFILTER_MAXPERIOD, COMBFILTER_MINPERIOD, N, &pitch_index, st->prefilter_period, st->prefilter_gain, st->arch); if (pitch_index > COMBFILTER_MAXPERIOD-2) pitch_index = COMBFILTER_MAXPERIOD-2; gain1 = MULT16_16_Q15(QCONST16(.7f,15),gain1); /*printf("%d %d %f %f\n", pitch_change, pitch_index, gain1, st->analysis.tonality);*/ if (st->loss_rate>2) gain1 = HALF32(gain1); if (st->loss_rate>4) gain1 = HALF32(gain1); if (st->loss_rate>8) gain1 = 0; } else { gain1 = 0; pitch_index = COMBFILTER_MINPERIOD; } /* Gain threshold for enabling the prefilter/postfilter */ pf_threshold = QCONST16(.2f,15); /* Adjusting the threshold based on rate and continuity */ if (abs(pitch_index-st->prefilter_period)*10>pitch_index) pf_threshold += QCONST16(.2f,15); if (nbAvailableBytes<25) pf_threshold += QCONST16(.1f,15); if (nbAvailableBytes<35) pf_threshold += QCONST16(.1f,15); if (st->prefilter_gain > QCONST16(.4f,15)) pf_threshold -= QCONST16(.1f,15); if (st->prefilter_gain > QCONST16(.55f,15)) pf_threshold -= QCONST16(.1f,15); /* Hard threshold at 0.2 */ pf_threshold = MAX16(pf_threshold, QCONST16(.2f,15)); if (gain1prefilter_gain)prefilter_gain; #ifdef FIXED_POINT qg = ((gain1+1536)>>10)/3-1; #else qg = (int)floor(.5f+gain1*32/3)-1; #endif qg = IMAX(0, IMIN(7, qg)); gain1 = QCONST16(0.09375f,15)*(qg+1); pf_on = 1; } /*printf("%d %f\n", pitch_index, gain1);*/ c=0; do { int offset = mode->shortMdctSize-overlap; st->prefilter_period=IMAX(st->prefilter_period, COMBFILTER_MINPERIOD); OPUS_COPY(in+c*(N+overlap), st->in_mem+c*(overlap), overlap); if (offset) comb_filter(in+c*(N+overlap)+overlap, pre[c]+COMBFILTER_MAXPERIOD, st->prefilter_period, st->prefilter_period, offset, -st->prefilter_gain, -st->prefilter_gain, st->prefilter_tapset, st->prefilter_tapset, NULL, 0, st->arch); comb_filter(in+c*(N+overlap)+overlap+offset, pre[c]+COMBFILTER_MAXPERIOD+offset, st->prefilter_period, pitch_index, N-offset, -st->prefilter_gain, -gain1, st->prefilter_tapset, prefilter_tapset, mode->window, overlap, st->arch); OPUS_COPY(st->in_mem+c*(overlap), in+c*(N+overlap)+N, overlap); if (N>COMBFILTER_MAXPERIOD) { OPUS_MOVE(prefilter_mem+c*COMBFILTER_MAXPERIOD, pre[c]+N, COMBFILTER_MAXPERIOD); } else { OPUS_MOVE(prefilter_mem+c*COMBFILTER_MAXPERIOD, prefilter_mem+c*COMBFILTER_MAXPERIOD+N, COMBFILTER_MAXPERIOD-N); OPUS_MOVE(prefilter_mem+c*COMBFILTER_MAXPERIOD+COMBFILTER_MAXPERIOD-N, pre[c]+COMBFILTER_MAXPERIOD, N); } } while (++cnbEBands; eBands = mode->eBands; coded_bands = lastCodedBands ? lastCodedBands : nbEBands; coded_bins = eBands[coded_bands]<analysis.activity, st->analysis.tonality, tf_estimate, st->stereo_saving, tot_boost, coded_bands);*/ #ifndef DISABLE_FLOAT_API if (analysis->valid && analysis->activity<.4) target -= (opus_int32)((coded_bins<activity)); #endif /* Stereo savings */ if (C==2) { int coded_stereo_bands; int coded_stereo_dof; opus_val16 max_frac; coded_stereo_bands = IMIN(intensity, coded_bands); coded_stereo_dof = (eBands[coded_stereo_bands]<valid && !lfe) { opus_int32 tonal_target; float tonal; /* Tonality boost (compensating for the average). */ tonal = MAX16(0.f,analysis->tonality-.15f)-0.09f; tonal_target = target + (opus_int32)((coded_bins<tonality, tonal);*/ target = tonal_target; } #else (void)analysis; (void)pitch_change; #endif if (has_surround_mask&&!lfe) { opus_int32 surround_target = target + (opus_int32)SHR32(MULT16_16(surround_masking,coded_bins<end, st->intensity, surround_target, target, st->bitrate);*/ target = IMAX(target/4, surround_target); } { opus_int32 floor_depth; int bins; bins = eBands[nbEBands-2]<>2); target = IMIN(target, floor_depth); /*printf("%f %d\n", maxDepth, floor_depth);*/ } if ((!has_surround_mask||lfe) && (constrained_vbr || bitrate<64000)) { opus_val16 rate_factor; #ifdef FIXED_POINT rate_factor = MAX16(0,(bitrate-32000)); #else rate_factor = MAX16(0,(1.f/32768)*(bitrate-32000)); #endif if (constrained_vbr) rate_factor = MIN16(rate_factor, QCONST16(0.67f, 15)); target = base_target + (opus_int32)MULT16_32_Q15(rate_factor, target-base_target); } if (!has_surround_mask && tf_estimate < QCONST16(.2f, 14)) { opus_val16 amount; opus_val16 tvbr_factor; amount = MULT16_16_Q15(QCONST16(.0000031f, 30), IMAX(0, IMIN(32000, 96000-bitrate))); tvbr_factor = SHR32(MULT16_16(temporal_vbr, amount), DB_SHIFT); target += (opus_int32)MULT16_32_Q15(tvbr_factor, target); } /* Don't allow more than doubling the rate */ target = IMIN(2*base_target, target); return target; } int celt_encode_with_ec(CELTEncoder * OPUS_RESTRICT st, const opus_val16 * pcm, int frame_size, unsigned char *compressed, int nbCompressedBytes, ec_enc *enc) { int i, c, N; opus_int32 bits; ec_enc _enc; VARDECL(celt_sig, in); VARDECL(celt_sig, freq); VARDECL(celt_norm, X); VARDECL(celt_ener, bandE); VARDECL(opus_val16, bandLogE); VARDECL(opus_val16, bandLogE2); VARDECL(int, fine_quant); VARDECL(opus_val16, error); VARDECL(int, pulses); VARDECL(int, cap); VARDECL(int, offsets); VARDECL(int, fine_priority); VARDECL(int, tf_res); VARDECL(unsigned char, collapse_masks); celt_sig *prefilter_mem; opus_val16 *oldBandE, *oldLogE, *oldLogE2; int shortBlocks=0; int isTransient=0; const int CC = st->channels; const int C = st->stream_channels; int LM, M; int tf_select; int nbFilledBytes, nbAvailableBytes; int start; int end; int effEnd; int codedBands; int tf_sum; int alloc_trim; int pitch_index=COMBFILTER_MINPERIOD; opus_val16 gain1 = 0; int dual_stereo=0; int effectiveBytes; int dynalloc_logp; opus_int32 vbr_rate; opus_int32 total_bits; opus_int32 total_boost; opus_int32 balance; opus_int32 tell; int prefilter_tapset=0; int pf_on; int anti_collapse_rsv; int anti_collapse_on=0; int silence=0; int tf_chan = 0; opus_val16 tf_estimate; int pitch_change=0; opus_int32 tot_boost; opus_val32 sample_max; opus_val16 maxDepth; const OpusCustomMode *mode; int nbEBands; int overlap; const opus_int16 *eBands; int secondMdct; int signalBandwidth; int transient_got_disabled=0; opus_val16 surround_masking=0; opus_val16 temporal_vbr=0; opus_val16 surround_trim = 0; opus_int32 equiv_rate = 510000; VARDECL(opus_val16, surround_dynalloc); ALLOC_STACK; mode = st->mode; nbEBands = mode->nbEBands; overlap = mode->overlap; eBands = mode->eBands; start = st->start; end = st->end; tf_estimate = 0; if (nbCompressedBytes<2 || pcm==NULL) { RESTORE_STACK; return OPUS_BAD_ARG; } frame_size *= st->upsample; for (LM=0;LM<=mode->maxLM;LM++) if (mode->shortMdctSize<mode->maxLM) { RESTORE_STACK; return OPUS_BAD_ARG; } M=1<shortMdctSize; prefilter_mem = st->in_mem+CC*(overlap); oldBandE = (opus_val16*)(st->in_mem+CC*(overlap+COMBFILTER_MAXPERIOD)); oldLogE = oldBandE + CC*nbEBands; oldLogE2 = oldLogE + CC*nbEBands; if (enc==NULL) { tell=1; nbFilledBytes=0; } else { tell=ec_tell(enc); nbFilledBytes=(tell+4)>>3; } #ifdef CUSTOM_MODES if (st->signalling && enc==NULL) { int tmp = (mode->effEBands-end)>>1; end = st->end = IMAX(1, mode->effEBands-tmp); compressed[0] = tmp<<5; compressed[0] |= LM<<3; compressed[0] |= (C==2)<<2; /* Convert "standard mode" to Opus header */ if (mode->Fs==48000 && mode->shortMdctSize==120) { int c0 = toOpus(compressed[0]); if (c0<0) { RESTORE_STACK; return OPUS_BAD_ARG; } compressed[0] = c0; } compressed++; nbCompressedBytes--; } #else celt_assert(st->signalling==0); #endif /* Can't produce more than 1275 output bytes */ nbCompressedBytes = IMIN(nbCompressedBytes,1275); nbAvailableBytes = nbCompressedBytes - nbFilledBytes; if (st->vbr && st->bitrate!=OPUS_BITRATE_MAX) { opus_int32 den=mode->Fs>>BITRES; vbr_rate=(st->bitrate*frame_size+(den>>1))/den; #ifdef CUSTOM_MODES if (st->signalling) vbr_rate -= 8<>(3+BITRES); } else { opus_int32 tmp; vbr_rate = 0; tmp = st->bitrate*frame_size; if (tell>1) tmp += tell; if (st->bitrate!=OPUS_BITRATE_MAX) nbCompressedBytes = IMAX(2, IMIN(nbCompressedBytes, (tmp+4*mode->Fs)/(8*mode->Fs)-!!st->signalling)); effectiveBytes = nbCompressedBytes; } if (st->bitrate != OPUS_BITRATE_MAX) equiv_rate = st->bitrate - (40*C+20)*((400>>LM) - 50); if (enc==NULL) { ec_enc_init(&_enc, compressed, nbCompressedBytes); enc = &_enc; } if (vbr_rate>0) { /* Computes the max bit-rate allowed in VBR mode to avoid violating the target rate and buffering. We must do this up front so that bust-prevention logic triggers correctly if we don't have enough bits. */ if (st->constrained_vbr) { opus_int32 vbr_bound; opus_int32 max_allowed; /* We could use any multiple of vbr_rate as bound (depending on the delay). This is clamped to ensure we use at least two bytes if the encoder was entirely empty, but to allow 0 in hybrid mode. */ vbr_bound = vbr_rate; max_allowed = IMIN(IMAX(tell==1?2:0, (vbr_rate+vbr_bound-st->vbr_reservoir)>>(BITRES+3)), nbAvailableBytes); if(max_allowed < nbAvailableBytes) { nbCompressedBytes = nbFilledBytes+max_allowed; nbAvailableBytes = max_allowed; ec_enc_shrink(enc, nbCompressedBytes); } } } total_bits = nbCompressedBytes*8; effEnd = end; if (effEnd > mode->effEBands) effEnd = mode->effEBands; ALLOC(in, CC*(N+overlap), celt_sig); sample_max=MAX32(st->overlap_max, celt_maxabs16(pcm, C*(N-overlap)/st->upsample)); st->overlap_max=celt_maxabs16(pcm+C*(N-overlap)/st->upsample, C*overlap/st->upsample); sample_max=MAX32(sample_max, st->overlap_max); #ifdef FIXED_POINT silence = (sample_max==0); #else silence = (sample_max <= (opus_val16)1/(1<lsb_depth)); #endif #ifdef FUZZING if ((rand()&0x3F)==0) silence = 1; #endif if (tell==1) ec_enc_bit_logp(enc, silence, 15); else silence=0; if (silence) { /*In VBR mode there is no need to send more than the minimum. */ if (vbr_rate>0) { effectiveBytes=nbCompressedBytes=IMIN(nbCompressedBytes, nbFilledBytes+2); total_bits=nbCompressedBytes*8; nbAvailableBytes=2; ec_enc_shrink(enc, nbCompressedBytes); } /* Pretend we've filled all the remaining bits with zeros (that's what the initialiser did anyway) */ tell = nbCompressedBytes*8; enc->nbits_total+=tell-ec_tell(enc); } c=0; do { int need_clip=0; #ifndef FIXED_POINT need_clip = st->clip && sample_max>65536.f; #endif celt_preemphasis(pcm+c, in+c*(N+overlap)+overlap, N, CC, st->upsample, mode->preemph, st->preemph_memE+c, need_clip); } while (++clfe&&nbAvailableBytes>3) || nbAvailableBytes>12*C) && start==0 && !silence && !st->disable_pf && st->complexity >= 5 && !(st->consec_transient && LM!=3 && st->variable_duration==OPUS_FRAMESIZE_VARIABLE); prefilter_tapset = st->tapset_decision; pf_on = run_prefilter(st, in, prefilter_mem, CC, N, prefilter_tapset, &pitch_index, &gain1, &qg, enabled, nbAvailableBytes); if ((gain1 > QCONST16(.4f,15) || st->prefilter_gain > QCONST16(.4f,15)) && (!st->analysis.valid || st->analysis.tonality > .3) && (pitch_index > 1.26*st->prefilter_period || pitch_index < .79*st->prefilter_period)) pitch_change = 1; if (pf_on==0) { if(start==0 && tell+16<=total_bits) ec_enc_bit_logp(enc, 0, 1); } else { /*This block is not gated by a total bits check only because of the nbAvailableBytes check above.*/ int octave; ec_enc_bit_logp(enc, 1, 1); pitch_index += 1; octave = EC_ILOG(pitch_index)-5; ec_enc_uint(enc, octave, 6); ec_enc_bits(enc, pitch_index-(16<complexity >= 1 && !st->lfe) { isTransient = transient_analysis(in, N+overlap, CC, &tf_estimate, &tf_chan); } if (LM>0 && ec_tell(enc)+3<=total_bits) { if (isTransient) shortBlocks = M; } else { isTransient = 0; transient_got_disabled=1; } ALLOC(freq, CC*N, celt_sig); /**< Interleaved signal MDCTs */ ALLOC(bandE,nbEBands*CC, celt_ener); ALLOC(bandLogE,nbEBands*CC, opus_val16); secondMdct = shortBlocks && st->complexity>=8; ALLOC(bandLogE2, C*nbEBands, opus_val16); if (secondMdct) { compute_mdcts(mode, 0, in, freq, C, CC, LM, st->upsample, st->arch); compute_band_energies(mode, freq, bandE, effEnd, C, LM); amp2Log2(mode, effEnd, end, bandE, bandLogE2, C); for (i=0;iupsample, st->arch); if (CC==2&&C==1) tf_chan = 0; compute_band_energies(mode, freq, bandE, effEnd, C, LM); if (st->lfe) { for (i=2;ienergy_mask&&!st->lfe) { int mask_end; int midband; int count_dynalloc; opus_val32 mask_avg=0; opus_val32 diff=0; int count=0; mask_end = IMAX(2,st->lastCodedBands); for (c=0;cenergy_mask[nbEBands*c+i], QCONST16(.25f, DB_SHIFT)), -QCONST16(2.0f, DB_SHIFT)); if (mask > 0) mask = HALF16(mask); mask_avg += MULT16_16(mask, eBands[i+1]-eBands[i]); count += eBands[i+1]-eBands[i]; diff += MULT16_16(mask, 1+2*i-mask_end); } } celt_assert(count>0); mask_avg = DIV32_16(mask_avg,count); mask_avg += QCONST16(.2f, DB_SHIFT); diff = diff*6/(C*(mask_end-1)*(mask_end+1)*mask_end); /* Again, being conservative */ diff = HALF32(diff); diff = MAX32(MIN32(diff, QCONST32(.031f, DB_SHIFT)), -QCONST32(.031f, DB_SHIFT)); /* Find the band that's in the middle of the coded spectrum */ for (midband=0;eBands[midband+1] < eBands[mask_end]/2;midband++); count_dynalloc=0; for(i=0;ienergy_mask[i], st->energy_mask[nbEBands+i]); else unmask = st->energy_mask[i]; unmask = MIN16(unmask, QCONST16(.0f, DB_SHIFT)); unmask -= lin; if (unmask > QCONST16(.25f, DB_SHIFT)) { surround_dynalloc[i] = unmask - QCONST16(.25f, DB_SHIFT); count_dynalloc++; } } if (count_dynalloc>=3) { /* If we need dynalloc in many bands, it's probably because our initial masking rate was too low. */ mask_avg += QCONST16(.25f, DB_SHIFT); if (mask_avg>0) { /* Something went really wrong in the original calculations, disabling masking. */ mask_avg = 0; diff = 0; OPUS_CLEAR(surround_dynalloc, mask_end); } else { for(i=0;ilfe) { opus_val16 follow=-QCONST16(10.0f,DB_SHIFT); opus_val32 frame_avg=0; opus_val16 offset = shortBlocks?HALF16(SHL16(LM, DB_SHIFT)):0; for(i=start;ispec_avg); temporal_vbr = MIN16(QCONST16(3.f, DB_SHIFT), MAX16(-QCONST16(1.5f, DB_SHIFT), temporal_vbr)); st->spec_avg += MULT16_16_Q15(QCONST16(.02f, 15), temporal_vbr); } /*for (i=0;i<21;i++) printf("%f ", bandLogE[i]); printf("\n");*/ if (!secondMdct) { OPUS_COPY(bandLogE2, bandLogE, C*nbEBands); } /* Last chance to catch any transient we might have missed in the time-domain analysis */ if (LM>0 && ec_tell(enc)+3<=total_bits && !isTransient && st->complexity>=5 && !st->lfe) { if (patch_transient_decision(bandLogE, oldBandE, nbEBands, start, end, C)) { isTransient = 1; shortBlocks = M; compute_mdcts(mode, shortBlocks, in, freq, C, CC, LM, st->upsample, st->arch); compute_band_energies(mode, freq, bandE, effEnd, C, LM); amp2Log2(mode, effEnd, end, bandE, bandLogE, C); /* Compensate for the scaling of short vs long mdcts */ for (i=0;i0 && ec_tell(enc)+3<=total_bits) ec_enc_bit_logp(enc, isTransient, 3); ALLOC(X, C*N, celt_norm); /**< Interleaved normalised MDCTs */ /* Band normalisation */ normalise_bands(mode, freq, X, bandE, effEnd, C, M); ALLOC(tf_res, nbEBands, int); /* Disable variable tf resolution for hybrid and at very low bitrate */ if (effectiveBytes>=15*C && start==0 && st->complexity>=2 && !st->lfe) { int lambda; if (effectiveBytes<40) lambda = 12; else if (effectiveBytes<60) lambda = 6; else if (effectiveBytes<100) lambda = 4; else lambda = 3; lambda*=2; tf_select = tf_analysis(mode, effEnd, isTransient, tf_res, lambda, X, N, LM, &tf_sum, tf_estimate, tf_chan); for (i=effEnd;iforce_intra, &st->delayedIntra, st->complexity >= 4, st->loss_rate, st->lfe); tf_encode(start, end, isTransient, tf_res, LM, tf_select, enc); if (ec_tell(enc)+4<=total_bits) { if (st->lfe) { st->tapset_decision = 0; st->spread_decision = SPREAD_NORMAL; } else if (shortBlocks || st->complexity < 3 || nbAvailableBytes < 10*C || start != 0) { if (st->complexity == 0) st->spread_decision = SPREAD_NONE; else st->spread_decision = SPREAD_NORMAL; } else { /* Disable new spreading+tapset estimator until we can show it works better than the old one. So far it seems like spreading_decision() works best. */ #if 0 if (st->analysis.valid) { static const opus_val16 spread_thresholds[3] = {-QCONST16(.6f, 15), -QCONST16(.2f, 15), -QCONST16(.07f, 15)}; static const opus_val16 spread_histeresis[3] = {QCONST16(.15f, 15), QCONST16(.07f, 15), QCONST16(.02f, 15)}; static const opus_val16 tapset_thresholds[2] = {QCONST16(.0f, 15), QCONST16(.15f, 15)}; static const opus_val16 tapset_histeresis[2] = {QCONST16(.1f, 15), QCONST16(.05f, 15)}; st->spread_decision = hysteresis_decision(-st->analysis.tonality, spread_thresholds, spread_histeresis, 3, st->spread_decision); st->tapset_decision = hysteresis_decision(st->analysis.tonality_slope, tapset_thresholds, tapset_histeresis, 2, st->tapset_decision); } else #endif { st->spread_decision = spreading_decision(mode, X, &st->tonal_average, st->spread_decision, &st->hf_average, &st->tapset_decision, pf_on&&!shortBlocks, effEnd, C, M); } /*printf("%d %d\n", st->tapset_decision, st->spread_decision);*/ /*printf("%f %d %f %d\n\n", st->analysis.tonality, st->spread_decision, st->analysis.tonality_slope, st->tapset_decision);*/ } ec_enc_icdf(enc, st->spread_decision, spread_icdf, 5); } ALLOC(offsets, nbEBands, int); maxDepth = dynalloc_analysis(bandLogE, bandLogE2, nbEBands, start, end, C, offsets, st->lsb_depth, mode->logN, isTransient, st->vbr, st->constrained_vbr, eBands, LM, effectiveBytes, &tot_boost, st->lfe, surround_dynalloc); /* For LFE, everything interesting is in the first band */ if (st->lfe) offsets[0] = IMIN(8, effectiveBytes/3); ALLOC(cap, nbEBands, int); init_caps(mode,cap,LM,C); dynalloc_logp = 6; total_bits<<=BITRES; total_boost = 0; tell = ec_tell_frac(enc); for (i=start;iintensity = hysteresis_decision((opus_val16)(equiv_rate/1000), intensity_thresholds, intensity_histeresis, 21, st->intensity); st->intensity = IMIN(end,IMAX(start, st->intensity)); } alloc_trim = 5; if (tell+(6<lfe) alloc_trim = 5; else alloc_trim = alloc_trim_analysis(mode, X, bandLogE, end, LM, C, N, &st->analysis, &st->stereo_saving, tf_estimate, st->intensity, surround_trim, st->arch); ec_enc_icdf(enc, alloc_trim, trim_icdf, 7); tell = ec_tell_frac(enc); } /* Variable bitrate */ if (vbr_rate>0) { opus_val16 alpha; opus_int32 delta; /* The target rate in 8th bits per frame */ opus_int32 target, base_target; opus_int32 min_allowed; int lm_diff = mode->maxLM - LM; /* Don't attempt to use more than 510 kb/s, even for frames smaller than 20 ms. The CELT allocator will just not be able to use more than that anyway. */ nbCompressedBytes = IMIN(nbCompressedBytes,1275>>(3-LM)); base_target = vbr_rate - ((40*C+20)<constrained_vbr) base_target += (st->vbr_offset>>lm_diff); target = compute_vbr(mode, &st->analysis, base_target, LM, equiv_rate, st->lastCodedBands, C, st->intensity, st->constrained_vbr, st->stereo_saving, tot_boost, tf_estimate, pitch_change, maxDepth, st->variable_duration, st->lfe, st->energy_mask!=NULL, surround_masking, temporal_vbr); /* The current offset is removed from the target and the space used so far is added*/ target=target+tell; /* In VBR mode the frame size must not be reduced so much that it would result in the encoder running out of bits. The margin of 2 bytes ensures that none of the bust-prevention logic in the decoder will have triggered so far. */ min_allowed = ((tell+total_boost+(1<<(BITRES+3))-1)>>(BITRES+3)) + 2 - nbFilledBytes; nbAvailableBytes = (target+(1<<(BITRES+2)))>>(BITRES+3); nbAvailableBytes = IMAX(min_allowed,nbAvailableBytes); nbAvailableBytes = IMIN(nbCompressedBytes,nbAvailableBytes+nbFilledBytes) - nbFilledBytes; /* By how much did we "miss" the target on that frame */ delta = target - vbr_rate; target=nbAvailableBytes<<(BITRES+3); /*If the frame is silent we don't adjust our drift, otherwise the encoder will shoot to very high rates after hitting a span of silence, but we do allow the bitres to refill. This means that we'll undershoot our target in CVBR/VBR modes on files with lots of silence. */ if(silence) { nbAvailableBytes = 2; target = 2*8<vbr_count < 970) { st->vbr_count++; alpha = celt_rcp(SHL32(EXTEND32(st->vbr_count+20),16)); } else alpha = QCONST16(.001f,15); /* How many bits have we used in excess of what we're allowed */ if (st->constrained_vbr) st->vbr_reservoir += target - vbr_rate; /*printf ("%d\n", st->vbr_reservoir);*/ /* Compute the offset we need to apply in order to reach the target */ if (st->constrained_vbr) { st->vbr_drift += (opus_int32)MULT16_32_Q15(alpha,(delta*(1<vbr_offset-st->vbr_drift); st->vbr_offset = -st->vbr_drift; } /*printf ("%d\n", st->vbr_drift);*/ if (st->constrained_vbr && st->vbr_reservoir < 0) { /* We're under the min value -- increase rate */ int adjust = (-st->vbr_reservoir)/(8<vbr_reservoir = 0; /*printf ("+%d\n", adjust);*/ } nbCompressedBytes = IMIN(nbCompressedBytes,nbAvailableBytes+nbFilledBytes); /*printf("%d\n", nbCompressedBytes*50*8);*/ /* This moves the raw bits to take into account the new compressed size */ ec_enc_shrink(enc, nbCompressedBytes); } /* Bit allocation */ ALLOC(fine_quant, nbEBands, int); ALLOC(pulses, nbEBands, int); ALLOC(fine_priority, nbEBands, int); /* bits = packet size - where we are - safety*/ bits = (((opus_int32)nbCompressedBytes*8)<=2&&bits>=((LM+2)<analysis.valid) { int min_bandwidth; if (equiv_rate < (opus_int32)32000*C) min_bandwidth = 13; else if (equiv_rate < (opus_int32)48000*C) min_bandwidth = 16; else if (equiv_rate < (opus_int32)60000*C) min_bandwidth = 18; else if (equiv_rate < (opus_int32)80000*C) min_bandwidth = 19; else min_bandwidth = 20; signalBandwidth = IMAX(st->analysis.bandwidth, min_bandwidth); } #endif if (st->lfe) signalBandwidth = 1; codedBands = compute_allocation(mode, start, end, offsets, cap, alloc_trim, &st->intensity, &dual_stereo, bits, &balance, pulses, fine_quant, fine_priority, C, LM, enc, 1, st->lastCodedBands, signalBandwidth); if (st->lastCodedBands) st->lastCodedBands = IMIN(st->lastCodedBands+1,IMAX(st->lastCodedBands-1,codedBands)); else st->lastCodedBands = codedBands; quant_fine_energy(mode, start, end, oldBandE, error, fine_quant, enc, C); /* Residual quantisation */ ALLOC(collapse_masks, C*nbEBands, unsigned char); quant_all_bands(1, mode, start, end, X, C==2 ? X+N : NULL, collapse_masks, bandE, pulses, shortBlocks, st->spread_decision, dual_stereo, st->intensity, tf_res, nbCompressedBytes*(8<rng, st->arch); if (anti_collapse_rsv > 0) { anti_collapse_on = st->consec_transient<2; #ifdef FUZZING anti_collapse_on = rand()&0x1; #endif ec_enc_bits(enc, anti_collapse_on, 1); } quant_energy_finalise(mode, start, end, oldBandE, error, fine_quant, fine_priority, nbCompressedBytes*8-ec_tell(enc), enc, C); if (silence) { for (i=0;irng); } c=0; do { OPUS_MOVE(st->syn_mem[c], st->syn_mem[c]+N, 2*MAX_PERIOD-N+overlap/2); } while (++csyn_mem[c]+2*MAX_PERIOD-N; } while (++cupsample, silence, st->arch); c=0; do { st->prefilter_period=IMAX(st->prefilter_period, COMBFILTER_MINPERIOD); st->prefilter_period_old=IMAX(st->prefilter_period_old, COMBFILTER_MINPERIOD); comb_filter(out_mem[c], out_mem[c], st->prefilter_period_old, st->prefilter_period, mode->shortMdctSize, st->prefilter_gain_old, st->prefilter_gain, st->prefilter_tapset_old, st->prefilter_tapset, mode->window, overlap); if (LM!=0) comb_filter(out_mem[c]+mode->shortMdctSize, out_mem[c]+mode->shortMdctSize, st->prefilter_period, pitch_index, N-mode->shortMdctSize, st->prefilter_gain, gain1, st->prefilter_tapset, prefilter_tapset, mode->window, overlap); } while (++cupsample, mode->preemph, st->preemph_memD); st->prefilter_period_old = st->prefilter_period; st->prefilter_gain_old = st->prefilter_gain; st->prefilter_tapset_old = st->prefilter_tapset; } #endif st->prefilter_period = pitch_index; st->prefilter_gain = gain1; st->prefilter_tapset = prefilter_tapset; #ifdef RESYNTH if (LM!=0) { st->prefilter_period_old = st->prefilter_period; st->prefilter_gain_old = st->prefilter_gain; st->prefilter_tapset_old = st->prefilter_tapset; } #endif if (CC==2&&C==1) { OPUS_COPY(&oldBandE[nbEBands], oldBandE, nbEBands); } if (!isTransient) { OPUS_COPY(oldLogE2, oldLogE, CC*nbEBands); OPUS_COPY(oldLogE, oldBandE, CC*nbEBands); } else { for (i=0;iconsec_transient++; else st->consec_transient=0; st->rng = enc->rng; /* If there's any room left (can only happen for very high rates), it's already filled with zeros */ ec_enc_done(enc); #ifdef CUSTOM_MODES if (st->signalling) nbCompressedBytes++; #endif RESTORE_STACK; if (ec_get_error(enc)) return OPUS_INTERNAL_ERROR; else return nbCompressedBytes; } #ifdef CUSTOM_MODES #ifdef FIXED_POINT int opus_custom_encode(CELTEncoder * OPUS_RESTRICT st, const opus_int16 * pcm, int frame_size, unsigned char *compressed, int nbCompressedBytes) { return celt_encode_with_ec(st, pcm, frame_size, compressed, nbCompressedBytes, NULL); } #ifndef DISABLE_FLOAT_API int opus_custom_encode_float(CELTEncoder * OPUS_RESTRICT st, const float * pcm, int frame_size, unsigned char *compressed, int nbCompressedBytes) { int j, ret, C, N; VARDECL(opus_int16, in); ALLOC_STACK; if (pcm==NULL) return OPUS_BAD_ARG; C = st->channels; N = frame_size; ALLOC(in, C*N, opus_int16); for (j=0;jchannels; N=frame_size; ALLOC(in, C*N, celt_sig); for (j=0;j10) goto bad_arg; st->complexity = value; } break; case CELT_SET_START_BAND_REQUEST: { opus_int32 value = va_arg(ap, opus_int32); if (value<0 || value>=st->mode->nbEBands) goto bad_arg; st->start = value; } break; case CELT_SET_END_BAND_REQUEST: { opus_int32 value = va_arg(ap, opus_int32); if (value<1 || value>st->mode->nbEBands) goto bad_arg; st->end = value; } break; case CELT_SET_PREDICTION_REQUEST: { int value = va_arg(ap, opus_int32); if (value<0 || value>2) goto bad_arg; st->disable_pf = value<=1; st->force_intra = value==0; } break; case OPUS_SET_PACKET_LOSS_PERC_REQUEST: { int value = va_arg(ap, opus_int32); if (value<0 || value>100) goto bad_arg; st->loss_rate = value; } break; case OPUS_SET_VBR_CONSTRAINT_REQUEST: { opus_int32 value = va_arg(ap, opus_int32); st->constrained_vbr = value; } break; case OPUS_SET_VBR_REQUEST: { opus_int32 value = va_arg(ap, opus_int32); st->vbr = value; } break; case OPUS_SET_BITRATE_REQUEST: { opus_int32 value = va_arg(ap, opus_int32); if (value<=500 && value!=OPUS_BITRATE_MAX) goto bad_arg; value = IMIN(value, 260000*st->channels); st->bitrate = value; } break; case CELT_SET_CHANNELS_REQUEST: { opus_int32 value = va_arg(ap, opus_int32); if (value<1 || value>2) goto bad_arg; st->stream_channels = value; } break; case OPUS_SET_LSB_DEPTH_REQUEST: { opus_int32 value = va_arg(ap, opus_int32); if (value<8 || value>24) goto bad_arg; st->lsb_depth=value; } break; case OPUS_GET_LSB_DEPTH_REQUEST: { opus_int32 *value = va_arg(ap, opus_int32*); *value=st->lsb_depth; } break; case OPUS_SET_EXPERT_FRAME_DURATION_REQUEST: { opus_int32 value = va_arg(ap, opus_int32); st->variable_duration = value; } break; case OPUS_RESET_STATE: { int i; opus_val16 *oldBandE, *oldLogE, *oldLogE2; oldBandE = (opus_val16*)(st->in_mem+st->channels*(st->mode->overlap+COMBFILTER_MAXPERIOD)); oldLogE = oldBandE + st->channels*st->mode->nbEBands; oldLogE2 = oldLogE + st->channels*st->mode->nbEBands; OPUS_CLEAR((char*)&st->ENCODER_RESET_START, opus_custom_encoder_get_size(st->mode, st->channels)- ((char*)&st->ENCODER_RESET_START - (char*)st)); for (i=0;ichannels*st->mode->nbEBands;i++) oldLogE[i]=oldLogE2[i]=-QCONST16(28.f,DB_SHIFT); st->vbr_offset = 0; st->delayedIntra = 1; st->spread_decision = SPREAD_NORMAL; st->tonal_average = 256; st->hf_average = 0; st->tapset_decision = 0; } break; #ifdef CUSTOM_MODES case CELT_SET_INPUT_CLIPPING_REQUEST: { opus_int32 value = va_arg(ap, opus_int32); st->clip = value; } break; #endif case CELT_SET_SIGNALLING_REQUEST: { opus_int32 value = va_arg(ap, opus_int32); st->signalling = value; } break; case CELT_SET_ANALYSIS_REQUEST: { AnalysisInfo *info = va_arg(ap, AnalysisInfo *); if (info) OPUS_COPY(&st->analysis, info, 1); } break; case CELT_GET_MODE_REQUEST: { const CELTMode ** value = va_arg(ap, const CELTMode**); if (value==0) goto bad_arg; *value=st->mode; } break; case OPUS_GET_FINAL_RANGE_REQUEST: { opus_uint32 * value = va_arg(ap, opus_uint32 *); if (value==0) goto bad_arg; *value=st->rng; } break; case OPUS_SET_LFE_REQUEST: { opus_int32 value = va_arg(ap, opus_int32); st->lfe = value; } break; case OPUS_SET_ENERGY_MASK_REQUEST: { opus_val16 *value = va_arg(ap, opus_val16*); st->energy_mask = value; } break; default: goto bad_request; } va_end(ap); return OPUS_OK; bad_arg: va_end(ap); return OPUS_BAD_ARG; bad_request: va_end(ap); return OPUS_UNIMPLEMENTED; } opus-1.1.2/celt/celt_lpc.c000066400000000000000000000204261264527674100154030ustar00rootroot00000000000000/* Copyright (c) 2009-2010 Xiph.Org Foundation Written by Jean-Marc Valin */ /* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - 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. 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 OWNER 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. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "celt_lpc.h" #include "stack_alloc.h" #include "mathops.h" #include "pitch.h" void _celt_lpc( opus_val16 *_lpc, /* out: [0...p-1] LPC coefficients */ const opus_val32 *ac, /* in: [0...p] autocorrelation values */ int p ) { int i, j; opus_val32 r; opus_val32 error = ac[0]; #ifdef FIXED_POINT opus_val32 lpc[LPC_ORDER]; #else float *lpc = _lpc; #endif for (i = 0; i < p; i++) lpc[i] = 0; if (ac[0] != 0) { for (i = 0; i < p; i++) { /* Sum up this iteration's reflection coefficient */ opus_val32 rr = 0; for (j = 0; j < i; j++) rr += MULT32_32_Q31(lpc[j],ac[i - j]); rr += SHR32(ac[i + 1],3); r = -frac_div32(SHL32(rr,3), error); /* Update LPC coefficients and total error */ lpc[i] = SHR32(r,3); for (j = 0; j < (i+1)>>1; j++) { opus_val32 tmp1, tmp2; tmp1 = lpc[j]; tmp2 = lpc[i-1-j]; lpc[j] = tmp1 + MULT32_32_Q31(r,tmp2); lpc[i-1-j] = tmp2 + MULT32_32_Q31(r,tmp1); } error = error - MULT32_32_Q31(MULT32_32_Q31(r,r),error); /* Bail out once we get 30 dB gain */ #ifdef FIXED_POINT if (error=1;j--) { mem[j]=mem[j-1]; } mem[0] = ROUND16(sum,SIG_SHIFT); _y[i] = sum; } #else int i,j; VARDECL(opus_val16, rden); VARDECL(opus_val16, y); SAVE_STACK; celt_assert((ord&3)==0); ALLOC(rden, ord, opus_val16); ALLOC(y, N+ord, opus_val16); for(i=0;i0); celt_assert(overlap>=0); if (overlap == 0) { xptr = x; } else { for (i=0;i0) { for(i=0;i= 536870912) { int shift2=1; if (ac[0] >= 1073741824) shift2++; for (i=0;i<=lag;i++) ac[i] = SHR32(ac[i], shift2); shift += shift2; } #endif RESTORE_STACK; return shift; } opus-1.1.2/celt/celt_lpc.h000066400000000000000000000043211264527674100154040ustar00rootroot00000000000000/* Copyright (c) 2009-2010 Xiph.Org Foundation Written by Jean-Marc Valin */ /* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - 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. 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 OWNER 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. */ #ifndef PLC_H #define PLC_H #include "arch.h" #include "cpu_support.h" #if defined(OPUS_X86_MAY_HAVE_SSE4_1) #include "x86/celt_lpc_sse.h" #endif #define LPC_ORDER 24 void _celt_lpc(opus_val16 *_lpc, const opus_val32 *ac, int p); void celt_fir_c( const opus_val16 *x, const opus_val16 *num, opus_val16 *y, int N, int ord, opus_val16 *mem, int arch); #if !defined(OVERRIDE_CELT_FIR) #define celt_fir(x, num, y, N, ord, mem, arch) \ (celt_fir_c(x, num, y, N, ord, mem, arch)) #endif void celt_iir(const opus_val32 *x, const opus_val16 *den, opus_val32 *y, int N, int ord, opus_val16 *mem, int arch); int _celt_autocorr(const opus_val16 *x, opus_val32 *ac, const opus_val16 *window, int overlap, int lag, int n, int arch); #endif /* PLC_H */ opus-1.1.2/celt/cpu_support.h000066400000000000000000000045041264527674100162050ustar00rootroot00000000000000/* Copyright (c) 2010 Xiph.Org Foundation * Copyright (c) 2013 Parrot */ /* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - 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. 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 OWNER 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. */ #ifndef CPU_SUPPORT_H #define CPU_SUPPORT_H #include "opus_types.h" #include "opus_defines.h" #if defined(OPUS_HAVE_RTCD) && \ (defined(OPUS_ARM_ASM) || defined(OPUS_ARM_MAY_HAVE_NEON_INTR)) #include "arm/armcpu.h" /* We currently support 4 ARM variants: * arch[0] -> ARMv4 * arch[1] -> ARMv5E * arch[2] -> ARMv6 * arch[3] -> NEON */ #define OPUS_ARCHMASK 3 #elif (defined(OPUS_X86_MAY_HAVE_SSE) && !defined(OPUS_X86_PRESUME_SSE)) || \ (defined(OPUS_X86_MAY_HAVE_SSE2) && !defined(OPUS_X86_PRESUME_SSE2)) || \ (defined(OPUS_X86_MAY_HAVE_SSE4_1) && !defined(OPUS_X86_PRESUME_SSE4_1)) || \ (defined(OPUS_X86_MAY_HAVE_AVX) && !defined(OPUS_X86_PRESUME_AVX)) #include "x86/x86cpu.h" /* We currently support 5 x86 variants: * arch[0] -> non-sse * arch[1] -> sse * arch[2] -> sse2 * arch[3] -> sse4.1 * arch[4] -> avx */ #define OPUS_ARCHMASK 7 int opus_select_arch(void); #else #define OPUS_ARCHMASK 0 static OPUS_INLINE int opus_select_arch(void) { return 0; } #endif #endif opus-1.1.2/celt/cwrs.c000066400000000000000000000671401264527674100146000ustar00rootroot00000000000000/* Copyright (c) 2007-2008 CSIRO Copyright (c) 2007-2009 Xiph.Org Foundation Copyright (c) 2007-2009 Timothy B. Terriberry Written by Timothy B. Terriberry and Jean-Marc Valin */ /* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - 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. 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 OWNER 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. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "os_support.h" #include "cwrs.h" #include "mathops.h" #include "arch.h" #ifdef CUSTOM_MODES /*Guaranteed to return a conservatively large estimate of the binary logarithm with frac bits of fractional precision. Tested for all possible 32-bit inputs with frac=4, where the maximum overestimation is 0.06254243 bits.*/ int log2_frac(opus_uint32 val, int frac) { int l; l=EC_ILOG(val); if(val&(val-1)){ /*This is (val>>l-16), but guaranteed to round up, even if adding a bias before the shift would cause overflow (e.g., for 0xFFFFxxxx). Doesn't work for val=0, but that case fails the test above.*/ if(l>16)val=((val-1)>>(l-16))+1; else val<<=16-l; l=(l-1)<>16); l+=b<>b; val=(val*val+0x7FFF)>>15; } while(frac-->0); /*If val is not exactly 0x8000, then we have to round up the remainder.*/ return l+(val>0x8000); } /*Exact powers of two require no rounding.*/ else return (l-1)<0 ? sum(k=1...K,2**k*choose(N,k)*choose(K-1,k-1)) : 1, where choose() is the binomial function. A table of values for N<10 and K<10 looks like: V[10][10] = { {1, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {1, 2, 2, 2, 2, 2, 2, 2, 2, 2}, {1, 4, 8, 12, 16, 20, 24, 28, 32, 36}, {1, 6, 18, 38, 66, 102, 146, 198, 258, 326}, {1, 8, 32, 88, 192, 360, 608, 952, 1408, 1992}, {1, 10, 50, 170, 450, 1002, 1970, 3530, 5890, 9290}, {1, 12, 72, 292, 912, 2364, 5336, 10836, 20256, 35436}, {1, 14, 98, 462, 1666, 4942, 12642, 28814, 59906, 115598}, {1, 16, 128, 688, 2816, 9424, 27008, 68464, 157184, 332688}, {1, 18, 162, 978, 4482, 16722, 53154, 148626, 374274, 864146} }; U(N,K) = the number of such combinations wherein N-1 objects are taken at most K-1 at a time. This is given by U(N,K) = sum(k=0...K-1,V(N-1,k)) = K>0 ? (V(N-1,K-1) + V(N,K-1))/2 : 0. The latter expression also makes clear that U(N,K) is half the number of such combinations wherein the first object is taken at least once. Although it may not be clear from either of these definitions, U(N,K) is the natural function to work with when enumerating the pulse vector codebooks, not V(N,K). U(N,K) is not well-defined for N=0, but with the extension U(0,K) = K>0 ? 0 : 1, the function becomes symmetric: U(N,K) = U(K,N), with a similar table: U[10][10] = { {1, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1}, {0, 1, 3, 5, 7, 9, 11, 13, 15, 17}, {0, 1, 5, 13, 25, 41, 61, 85, 113, 145}, {0, 1, 7, 25, 63, 129, 231, 377, 575, 833}, {0, 1, 9, 41, 129, 321, 681, 1289, 2241, 3649}, {0, 1, 11, 61, 231, 681, 1683, 3653, 7183, 13073}, {0, 1, 13, 85, 377, 1289, 3653, 8989, 19825, 40081}, {0, 1, 15, 113, 575, 2241, 7183, 19825, 48639, 108545}, {0, 1, 17, 145, 833, 3649, 13073, 40081, 108545, 265729} }; With this extension, V(N,K) may be written in terms of U(N,K): V(N,K) = U(N,K) + U(N,K+1) for all N>=0, K>=0. Thus U(N,K+1) represents the number of combinations where the first element is positive or zero, and U(N,K) represents the number of combinations where it is negative. With a large enough table of U(N,K) values, we could write O(N) encoding and O(min(N*log(K),N+K)) decoding routines, but such a table would be prohibitively large for small embedded devices (K may be as large as 32767 for small N, and N may be as large as 200). Both functions obey the same recurrence relation: V(N,K) = V(N-1,K) + V(N,K-1) + V(N-1,K-1), U(N,K) = U(N-1,K) + U(N,K-1) + U(N-1,K-1), for all N>0, K>0, with different initial conditions at N=0 or K=0. This allows us to construct a row of one of the tables above given the previous row or the next row. Thus we can derive O(NK) encoding and decoding routines with O(K) memory using only addition and subtraction. When encoding, we build up from the U(2,K) row and work our way forwards. When decoding, we need to start at the U(N,K) row and work our way backwards, which requires a means of computing U(N,K). U(N,K) may be computed from two previous values with the same N: U(N,K) = ((2*N-1)*U(N,K-1) - U(N,K-2))/(K-1) + U(N,K-2) for all N>1, and since U(N,K) is symmetric, a similar relation holds for two previous values with the same K: U(N,K>1) = ((2*K-1)*U(N-1,K) - U(N-2,K))/(N-1) + U(N-2,K) for all K>1. This allows us to construct an arbitrary row of the U(N,K) table by starting with the first two values, which are constants. This saves roughly 2/3 the work in our O(NK) decoding routine, but costs O(K) multiplications. Similar relations can be derived for V(N,K), but are not used here. For N>0 and K>0, U(N,K) and V(N,K) take on the form of an (N-1)-degree polynomial for fixed N. The first few are U(1,K) = 1, U(2,K) = 2*K-1, U(3,K) = (2*K-2)*K+1, U(4,K) = (((4*K-6)*K+8)*K-3)/3, U(5,K) = ((((2*K-4)*K+10)*K-8)*K+3)/3, and V(1,K) = 2, V(2,K) = 4*K, V(3,K) = 4*K*K+2, V(4,K) = 8*(K*K+2)*K/3, V(5,K) = ((4*K*K+20)*K*K+6)/3, for all K>0. This allows us to derive O(N) encoding and O(N*log(K)) decoding routines for small N (and indeed decoding is also O(N) for N<3). @ARTICLE{Fis86, author="Thomas R. Fischer", title="A Pyramid Vector Quantizer", journal="IEEE Transactions on Information Theory", volume="IT-32", number=4, pages="568--583", month=Jul, year=1986 }*/ #if !defined(SMALL_FOOTPRINT) /*U(N,K) = U(K,N) := N>0?K>0?U(N-1,K)+U(N,K-1)+U(N-1,K-1):0:K>0?1:0*/ # define CELT_PVQ_U(_n,_k) (CELT_PVQ_U_ROW[IMIN(_n,_k)][IMAX(_n,_k)]) /*V(N,K) := U(N,K)+U(N,K+1) = the number of PVQ codewords for a band of size N with K pulses allocated to it.*/ # define CELT_PVQ_V(_n,_k) (CELT_PVQ_U(_n,_k)+CELT_PVQ_U(_n,(_k)+1)) /*For each V(N,K) supported, we will access element U(min(N,K+1),max(N,K+1)). Thus, the number of entries in row I is the larger of the maximum number of pulses we will ever allocate for a given N=I (K=128, or however many fit in 32 bits, whichever is smaller), plus one, and the maximum N for which K=I-1 pulses fit in 32 bits. The largest band size in an Opus Custom mode is 208. Otherwise, we can limit things to the set of N which can be achieved by splitting a band from a standard Opus mode: 176, 144, 96, 88, 72, 64, 48, 44, 36, 32, 24, 22, 18, 16, 8, 4, 2).*/ #if defined(CUSTOM_MODES) static const opus_uint32 CELT_PVQ_U_DATA[1488]={ #else static const opus_uint32 CELT_PVQ_U_DATA[1272]={ #endif /*N=0, K=0...176:*/ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, #if defined(CUSTOM_MODES) /*...208:*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, #endif /*N=1, K=1...176:*/ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, #if defined(CUSTOM_MODES) /*...208:*/ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, #endif /*N=2, K=2...176:*/ 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95, 97, 99, 101, 103, 105, 107, 109, 111, 113, 115, 117, 119, 121, 123, 125, 127, 129, 131, 133, 135, 137, 139, 141, 143, 145, 147, 149, 151, 153, 155, 157, 159, 161, 163, 165, 167, 169, 171, 173, 175, 177, 179, 181, 183, 185, 187, 189, 191, 193, 195, 197, 199, 201, 203, 205, 207, 209, 211, 213, 215, 217, 219, 221, 223, 225, 227, 229, 231, 233, 235, 237, 239, 241, 243, 245, 247, 249, 251, 253, 255, 257, 259, 261, 263, 265, 267, 269, 271, 273, 275, 277, 279, 281, 283, 285, 287, 289, 291, 293, 295, 297, 299, 301, 303, 305, 307, 309, 311, 313, 315, 317, 319, 321, 323, 325, 327, 329, 331, 333, 335, 337, 339, 341, 343, 345, 347, 349, 351, #if defined(CUSTOM_MODES) /*...208:*/ 353, 355, 357, 359, 361, 363, 365, 367, 369, 371, 373, 375, 377, 379, 381, 383, 385, 387, 389, 391, 393, 395, 397, 399, 401, 403, 405, 407, 409, 411, 413, 415, #endif /*N=3, K=3...176:*/ 13, 25, 41, 61, 85, 113, 145, 181, 221, 265, 313, 365, 421, 481, 545, 613, 685, 761, 841, 925, 1013, 1105, 1201, 1301, 1405, 1513, 1625, 1741, 1861, 1985, 2113, 2245, 2381, 2521, 2665, 2813, 2965, 3121, 3281, 3445, 3613, 3785, 3961, 4141, 4325, 4513, 4705, 4901, 5101, 5305, 5513, 5725, 5941, 6161, 6385, 6613, 6845, 7081, 7321, 7565, 7813, 8065, 8321, 8581, 8845, 9113, 9385, 9661, 9941, 10225, 10513, 10805, 11101, 11401, 11705, 12013, 12325, 12641, 12961, 13285, 13613, 13945, 14281, 14621, 14965, 15313, 15665, 16021, 16381, 16745, 17113, 17485, 17861, 18241, 18625, 19013, 19405, 19801, 20201, 20605, 21013, 21425, 21841, 22261, 22685, 23113, 23545, 23981, 24421, 24865, 25313, 25765, 26221, 26681, 27145, 27613, 28085, 28561, 29041, 29525, 30013, 30505, 31001, 31501, 32005, 32513, 33025, 33541, 34061, 34585, 35113, 35645, 36181, 36721, 37265, 37813, 38365, 38921, 39481, 40045, 40613, 41185, 41761, 42341, 42925, 43513, 44105, 44701, 45301, 45905, 46513, 47125, 47741, 48361, 48985, 49613, 50245, 50881, 51521, 52165, 52813, 53465, 54121, 54781, 55445, 56113, 56785, 57461, 58141, 58825, 59513, 60205, 60901, 61601, #if defined(CUSTOM_MODES) /*...208:*/ 62305, 63013, 63725, 64441, 65161, 65885, 66613, 67345, 68081, 68821, 69565, 70313, 71065, 71821, 72581, 73345, 74113, 74885, 75661, 76441, 77225, 78013, 78805, 79601, 80401, 81205, 82013, 82825, 83641, 84461, 85285, 86113, #endif /*N=4, K=4...176:*/ 63, 129, 231, 377, 575, 833, 1159, 1561, 2047, 2625, 3303, 4089, 4991, 6017, 7175, 8473, 9919, 11521, 13287, 15225, 17343, 19649, 22151, 24857, 27775, 30913, 34279, 37881, 41727, 45825, 50183, 54809, 59711, 64897, 70375, 76153, 82239, 88641, 95367, 102425, 109823, 117569, 125671, 134137, 142975, 152193, 161799, 171801, 182207, 193025, 204263, 215929, 228031, 240577, 253575, 267033, 280959, 295361, 310247, 325625, 341503, 357889, 374791, 392217, 410175, 428673, 447719, 467321, 487487, 508225, 529543, 551449, 573951, 597057, 620775, 645113, 670079, 695681, 721927, 748825, 776383, 804609, 833511, 863097, 893375, 924353, 956039, 988441, 1021567, 1055425, 1090023, 1125369, 1161471, 1198337, 1235975, 1274393, 1313599, 1353601, 1394407, 1436025, 1478463, 1521729, 1565831, 1610777, 1656575, 1703233, 1750759, 1799161, 1848447, 1898625, 1949703, 2001689, 2054591, 2108417, 2163175, 2218873, 2275519, 2333121, 2391687, 2451225, 2511743, 2573249, 2635751, 2699257, 2763775, 2829313, 2895879, 2963481, 3032127, 3101825, 3172583, 3244409, 3317311, 3391297, 3466375, 3542553, 3619839, 3698241, 3777767, 3858425, 3940223, 4023169, 4107271, 4192537, 4278975, 4366593, 4455399, 4545401, 4636607, 4729025, 4822663, 4917529, 5013631, 5110977, 5209575, 5309433, 5410559, 5512961, 5616647, 5721625, 5827903, 5935489, 6044391, 6154617, 6266175, 6379073, 6493319, 6608921, 6725887, 6844225, 6963943, 7085049, 7207551, #if defined(CUSTOM_MODES) /*...208:*/ 7331457, 7456775, 7583513, 7711679, 7841281, 7972327, 8104825, 8238783, 8374209, 8511111, 8649497, 8789375, 8930753, 9073639, 9218041, 9363967, 9511425, 9660423, 9810969, 9963071, 10116737, 10271975, 10428793, 10587199, 10747201, 10908807, 11072025, 11236863, 11403329, 11571431, 11741177, 11912575, #endif /*N=5, K=5...176:*/ 321, 681, 1289, 2241, 3649, 5641, 8361, 11969, 16641, 22569, 29961, 39041, 50049, 63241, 78889, 97281, 118721, 143529, 172041, 204609, 241601, 283401, 330409, 383041, 441729, 506921, 579081, 658689, 746241, 842249, 947241, 1061761, 1186369, 1321641, 1468169, 1626561, 1797441, 1981449, 2179241, 2391489, 2618881, 2862121, 3121929, 3399041, 3694209, 4008201, 4341801, 4695809, 5071041, 5468329, 5888521, 6332481, 6801089, 7295241, 7815849, 8363841, 8940161, 9545769, 10181641, 10848769, 11548161, 12280841, 13047849, 13850241, 14689089, 15565481, 16480521, 17435329, 18431041, 19468809, 20549801, 21675201, 22846209, 24064041, 25329929, 26645121, 28010881, 29428489, 30899241, 32424449, 34005441, 35643561, 37340169, 39096641, 40914369, 42794761, 44739241, 46749249, 48826241, 50971689, 53187081, 55473921, 57833729, 60268041, 62778409, 65366401, 68033601, 70781609, 73612041, 76526529, 79526721, 82614281, 85790889, 89058241, 92418049, 95872041, 99421961, 103069569, 106816641, 110664969, 114616361, 118672641, 122835649, 127107241, 131489289, 135983681, 140592321, 145317129, 150160041, 155123009, 160208001, 165417001, 170752009, 176215041, 181808129, 187533321, 193392681, 199388289, 205522241, 211796649, 218213641, 224775361, 231483969, 238341641, 245350569, 252512961, 259831041, 267307049, 274943241, 282741889, 290705281, 298835721, 307135529, 315607041, 324252609, 333074601, 342075401, 351257409, 360623041, 370174729, 379914921, 389846081, 399970689, 410291241, 420810249, 431530241, 442453761, 453583369, 464921641, 476471169, 488234561, 500214441, 512413449, 524834241, 537479489, 550351881, 563454121, 576788929, 590359041, 604167209, 618216201, 632508801, #if defined(CUSTOM_MODES) /*...208:*/ 647047809, 661836041, 676876329, 692171521, 707724481, 723538089, 739615241, 755958849, 772571841, 789457161, 806617769, 824056641, 841776769, 859781161, 878072841, 896654849, 915530241, 934702089, 954173481, 973947521, 994027329, 1014416041, 1035116809, 1056132801, 1077467201, 1099123209, 1121104041, 1143412929, 1166053121, 1189027881, 1212340489, 1235994241, #endif /*N=6, K=6...96:*/ 1683, 3653, 7183, 13073, 22363, 36365, 56695, 85305, 124515, 177045, 246047, 335137, 448427, 590557, 766727, 982729, 1244979, 1560549, 1937199, 2383409, 2908411, 3522221, 4235671, 5060441, 6009091, 7095093, 8332863, 9737793, 11326283, 13115773, 15124775, 17372905, 19880915, 22670725, 25765455, 29189457, 32968347, 37129037, 41699767, 46710137, 52191139, 58175189, 64696159, 71789409, 79491819, 87841821, 96879431, 106646281, 117185651, 128542501, 140763503, 153897073, 167993403, 183104493, 199284183, 216588185, 235074115, 254801525, 275831935, 298228865, 322057867, 347386557, 374284647, 402823977, 433078547, 465124549, 499040399, 534906769, 572806619, 612825229, 655050231, 699571641, 746481891, 795875861, 847850911, 902506913, 959946283, 1020274013, 1083597703, 1150027593, 1219676595, 1292660325, 1369097135, 1449108145, 1532817275, 1620351277, 1711839767, 1807415257, 1907213187, 2011371957, 2120032959, #if defined(CUSTOM_MODES) /*...109:*/ 2233340609U, 2351442379U, 2474488829U, 2602633639U, 2736033641U, 2874848851U, 3019242501U, 3169381071U, 3325434321U, 3487575323U, 3655980493U, 3830829623U, 4012305913U, #endif /*N=7, K=7...54*/ 8989, 19825, 40081, 75517, 134245, 227305, 369305, 579125, 880685, 1303777, 1884961, 2668525, 3707509, 5064793, 6814249, 9041957, 11847485, 15345233, 19665841, 24957661, 31388293, 39146185, 48442297, 59511829, 72616013, 88043969, 106114625, 127178701, 151620757, 179861305, 212358985, 249612805, 292164445, 340600625, 395555537, 457713341, 527810725, 606639529, 695049433, 793950709, 904317037, 1027188385, 1163673953, 1314955181, 1482288821, 1667010073, 1870535785, 2094367717, #if defined(CUSTOM_MODES) /*...60:*/ 2340095869U, 2609401873U, 2904062449U, 3225952925U, 3577050821U, 3959439497U, #endif /*N=8, K=8...37*/ 48639, 108545, 224143, 433905, 795455, 1392065, 2340495, 3800305, 5984767, 9173505, 13726991, 20103025, 28875327, 40754369, 56610575, 77500017, 104692735, 139703809, 184327311, 240673265, 311207743, 398796225, 506750351, 638878193, 799538175, 993696769, 1226990095, 1505789553, 1837271615, 2229491905U, #if defined(CUSTOM_MODES) /*...40:*/ 2691463695U, 3233240945U, 3866006015U, #endif /*N=9, K=9...28:*/ 265729, 598417, 1256465, 2485825, 4673345, 8405905, 14546705, 24331777, 39490049, 62390545, 96220561, 145198913, 214828609, 312193553, 446304145, 628496897, 872893441, 1196924561, 1621925137, 2173806145U, #if defined(CUSTOM_MODES) /*...29:*/ 2883810113U, #endif /*N=10, K=10...24:*/ 1462563, 3317445, 7059735, 14218905, 27298155, 50250765, 89129247, 152951073, 254831667, 413442773, 654862247, 1014889769, 1541911931, 2300409629U, 3375210671U, /*N=11, K=11...19:*/ 8097453, 18474633, 39753273, 81270333, 158819253, 298199265, 540279585, 948062325, 1616336765, #if defined(CUSTOM_MODES) /*...20:*/ 2684641785U, #endif /*N=12, K=12...18:*/ 45046719, 103274625, 224298231, 464387817, 921406335, 1759885185, 3248227095U, /*N=13, K=13...16:*/ 251595969, 579168825, 1267854873, 2653649025U, /*N=14, K=14:*/ 1409933619 }; #if defined(CUSTOM_MODES) static const opus_uint32 *const CELT_PVQ_U_ROW[15]={ CELT_PVQ_U_DATA+ 0,CELT_PVQ_U_DATA+ 208,CELT_PVQ_U_DATA+ 415, CELT_PVQ_U_DATA+ 621,CELT_PVQ_U_DATA+ 826,CELT_PVQ_U_DATA+1030, CELT_PVQ_U_DATA+1233,CELT_PVQ_U_DATA+1336,CELT_PVQ_U_DATA+1389, CELT_PVQ_U_DATA+1421,CELT_PVQ_U_DATA+1441,CELT_PVQ_U_DATA+1455, CELT_PVQ_U_DATA+1464,CELT_PVQ_U_DATA+1470,CELT_PVQ_U_DATA+1473 }; #else static const opus_uint32 *const CELT_PVQ_U_ROW[15]={ CELT_PVQ_U_DATA+ 0,CELT_PVQ_U_DATA+ 176,CELT_PVQ_U_DATA+ 351, CELT_PVQ_U_DATA+ 525,CELT_PVQ_U_DATA+ 698,CELT_PVQ_U_DATA+ 870, CELT_PVQ_U_DATA+1041,CELT_PVQ_U_DATA+1131,CELT_PVQ_U_DATA+1178, CELT_PVQ_U_DATA+1207,CELT_PVQ_U_DATA+1226,CELT_PVQ_U_DATA+1240, CELT_PVQ_U_DATA+1248,CELT_PVQ_U_DATA+1254,CELT_PVQ_U_DATA+1257 }; #endif #if defined(CUSTOM_MODES) void get_required_bits(opus_int16 *_bits,int _n,int _maxk,int _frac){ int k; /*_maxk==0 => there's nothing to do.*/ celt_assert(_maxk>0); _bits[0]=0; for(k=1;k<=_maxk;k++)_bits[k]=log2_frac(CELT_PVQ_V(_n,k),_frac); } #endif static opus_uint32 icwrs(int _n,const int *_y){ opus_uint32 i; int j; int k; celt_assert(_n>=2); j=_n-1; i=_y[j]<0; k=abs(_y[j]); do{ j--; i+=CELT_PVQ_U(_n-j,k); k+=abs(_y[j]); if(_y[j]<0)i+=CELT_PVQ_U(_n-j,k+1); } while(j>0); return i; } void encode_pulses(const int *_y,int _n,int _k,ec_enc *_enc){ celt_assert(_k>0); ec_enc_uint(_enc,icwrs(_n,_y),CELT_PVQ_V(_n,_k)); } static opus_val32 cwrsi(int _n,int _k,opus_uint32 _i,int *_y){ opus_uint32 p; int s; int k0; opus_int16 val; opus_val32 yy=0; celt_assert(_k>0); celt_assert(_n>1); while(_n>2){ opus_uint32 q; /*Lots of pulses case:*/ if(_k>=_n){ const opus_uint32 *row; row=CELT_PVQ_U_ROW[_n]; /*Are the pulses in this dimension negative?*/ p=row[_k+1]; s=-(_i>=p); _i-=p&s; /*Count how many pulses were placed in this dimension.*/ k0=_k; q=row[_n]; if(q>_i){ celt_assert(p>q); _k=_n; do p=CELT_PVQ_U_ROW[--_k][_n]; while(p>_i); } else for(p=row[_k];p>_i;p=row[_k])_k--; _i-=p; val=(k0-_k+s)^s; *_y++=val; yy=MAC16_16(yy,val,val); } /*Lots of dimensions case:*/ else{ /*Are there any pulses in this dimension at all?*/ p=CELT_PVQ_U_ROW[_k][_n]; q=CELT_PVQ_U_ROW[_k+1][_n]; if(p<=_i&&_i=q); _i-=q&s; /*Count how many pulses were placed in this dimension.*/ k0=_k; do p=CELT_PVQ_U_ROW[--_k][_n]; while(p>_i); _i-=p; val=(k0-_k+s)^s; *_y++=val; yy=MAC16_16(yy,val,val); } } _n--; } /*_n==2*/ p=2*_k+1; s=-(_i>=p); _i-=p&s; k0=_k; _k=(_i+1)>>1; if(_k)_i-=2*_k-1; val=(k0-_k+s)^s; *_y++=val; yy=MAC16_16(yy,val,val); /*_n==1*/ s=-(int)_i; val=(_k+s)^s; *_y=val; yy=MAC16_16(yy,val,val); return yy; } opus_val32 decode_pulses(int *_y,int _n,int _k,ec_dec *_dec){ return cwrsi(_n,_k,ec_dec_uint(_dec,CELT_PVQ_V(_n,_k)),_y); } #else /* SMALL_FOOTPRINT */ /*Computes the next row/column of any recurrence that obeys the relation u[i][j]=u[i-1][j]+u[i][j-1]+u[i-1][j-1]. _ui0 is the base case for the new row/column.*/ static OPUS_INLINE void unext(opus_uint32 *_ui,unsigned _len,opus_uint32 _ui0){ opus_uint32 ui1; unsigned j; /*This do-while will overrun the array if we don't have storage for at least 2 values.*/ j=1; do { ui1=UADD32(UADD32(_ui[j],_ui[j-1]),_ui0); _ui[j-1]=_ui0; _ui0=ui1; } while (++j<_len); _ui[j-1]=_ui0; } /*Computes the previous row/column of any recurrence that obeys the relation u[i-1][j]=u[i][j]-u[i][j-1]-u[i-1][j-1]. _ui0 is the base case for the new row/column.*/ static OPUS_INLINE void uprev(opus_uint32 *_ui,unsigned _n,opus_uint32 _ui0){ opus_uint32 ui1; unsigned j; /*This do-while will overrun the array if we don't have storage for at least 2 values.*/ j=1; do { ui1=USUB32(USUB32(_ui[j],_ui[j-1]),_ui0); _ui[j-1]=_ui0; _ui0=ui1; } while (++j<_n); _ui[j-1]=_ui0; } /*Compute V(_n,_k), as well as U(_n,0..._k+1). _u: On exit, _u[i] contains U(_n,i) for i in [0..._k+1].*/ static opus_uint32 ncwrs_urow(unsigned _n,unsigned _k,opus_uint32 *_u){ opus_uint32 um2; unsigned len; unsigned k; len=_k+2; /*We require storage at least 3 values (e.g., _k>0).*/ celt_assert(len>=3); _u[0]=0; _u[1]=um2=1; /*If _n==0, _u[0] should be 1 and the rest should be 0.*/ /*If _n==1, _u[i] should be 1 for i>1.*/ celt_assert(_n>=2); /*If _k==0, the following do-while loop will overflow the buffer.*/ celt_assert(_k>0); k=2; do _u[k]=(k<<1)-1; while(++k0); j=0; do{ opus_uint32 p; int s; int yj; p=_u[_k+1]; s=-(_i>=p); _i-=p&s; yj=_k; p=_u[_k]; while(p>_i)p=_u[--_k]; _i-=p; yj-=_k; val=(yj+s)^s; _y[j]=val; yy=MAC16_16(yy,val,val); uprev(_u,_k+2,0); } while(++j<_n); return yy; } /*Returns the index of the given combination of K elements chosen from a set of size 1 with associated sign bits. _y: The vector of pulses, whose sum of absolute values is K. _k: Returns K.*/ static OPUS_INLINE opus_uint32 icwrs1(const int *_y,int *_k){ *_k=abs(_y[0]); return _y[0]<0; } /*Returns the index of the given combination of K elements chosen from a set of size _n with associated sign bits. _y: The vector of pulses, whose sum of absolute values must be _k. _nc: Returns V(_n,_k).*/ static OPUS_INLINE opus_uint32 icwrs(int _n,int _k,opus_uint32 *_nc,const int *_y, opus_uint32 *_u){ opus_uint32 i; int j; int k; /*We can't unroll the first two iterations of the loop unless _n>=2.*/ celt_assert(_n>=2); _u[0]=0; for(k=1;k<=_k+1;k++)_u[k]=(k<<1)-1; i=icwrs1(_y+_n-1,&k); j=_n-2; i+=_u[k]; k+=abs(_y[j]); if(_y[j]<0)i+=_u[k+1]; while(j-->0){ unext(_u,_k+2,0); i+=_u[k]; k+=abs(_y[j]); if(_y[j]<0)i+=_u[k+1]; } *_nc=_u[k]+_u[k+1]; return i; } #ifdef CUSTOM_MODES void get_required_bits(opus_int16 *_bits,int _n,int _maxk,int _frac){ int k; /*_maxk==0 => there's nothing to do.*/ celt_assert(_maxk>0); _bits[0]=0; if (_n==1) { for (k=1;k<=_maxk;k++) _bits[k] = 1<<_frac; } else { VARDECL(opus_uint32,u); SAVE_STACK; ALLOC(u,_maxk+2U,opus_uint32); ncwrs_urow(_n,_maxk,u); for(k=1;k<=_maxk;k++) _bits[k]=log2_frac(u[k]+u[k+1],_frac); RESTORE_STACK; } } #endif /* CUSTOM_MODES */ void encode_pulses(const int *_y,int _n,int _k,ec_enc *_enc){ opus_uint32 i; VARDECL(opus_uint32,u); opus_uint32 nc; SAVE_STACK; celt_assert(_k>0); ALLOC(u,_k+2U,opus_uint32); i=icwrs(_n,_k,&nc,_y,u); ec_enc_uint(_enc,i,nc); RESTORE_STACK; } opus_val32 decode_pulses(int *_y,int _n,int _k,ec_dec *_dec){ VARDECL(opus_uint32,u); int ret; SAVE_STACK; celt_assert(_k>0); ALLOC(u,_k+2U,opus_uint32); ret = cwrsi(_n,_k,ec_dec_uint(_dec,ncwrs_urow(_n,_k,u)),_y,u); RESTORE_STACK; return ret; } #endif /* SMALL_FOOTPRINT */ opus-1.1.2/celt/cwrs.h000066400000000000000000000035351264527674100146030ustar00rootroot00000000000000/* Copyright (c) 2007-2008 CSIRO Copyright (c) 2007-2009 Xiph.Org Foundation Copyright (c) 2007-2009 Timothy B. Terriberry Written by Timothy B. Terriberry and Jean-Marc Valin */ /* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - 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. 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 OWNER 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. */ #ifndef CWRS_H #define CWRS_H #include "arch.h" #include "stack_alloc.h" #include "entenc.h" #include "entdec.h" #ifdef CUSTOM_MODES int log2_frac(opus_uint32 val, int frac); #endif void get_required_bits(opus_int16 *bits, int N, int K, int frac); void encode_pulses(const int *_y, int N, int K, ec_enc *enc); opus_val32 decode_pulses(int *_y, int N, int K, ec_dec *dec); #endif /* CWRS_H */ opus-1.1.2/celt/dump_modes/000077500000000000000000000000001264527674100156025ustar00rootroot00000000000000opus-1.1.2/celt/dump_modes/Makefile000066400000000000000000000013441264527674100172440ustar00rootroot00000000000000 CFLAGS=-O2 -Wall -Wextra -DHAVE_CONFIG_H INCLUDES=-I. -I../ -I../.. -I../../include SOURCES = dump_modes.c \ ../modes.c \ ../cwrs.c \ ../rate.c \ ../entcode.c \ ../entenc.c \ ../entdec.c \ ../mathops.c \ ../mdct.c \ ../kiss_fft.c ifdef HAVE_ARM_NE10 CC = gcc CFLAGS += -mfpu=neon INCLUDES += -I$(NE10_INCDIR) -DHAVE_ARM_NE10 -DOPUS_ARM_PRESUME_NEON_INTR LIBS = -L$(NE10_LIBDIR) -lNE10 SOURCES += ../arm/celt_ne10_fft.c \ dump_modes_arm_ne10.c \ ../arm/armcpu.c endif all: dump_modes dump_modes: $(PREFIX)$(CC) $(CFLAGS) $(INCLUDES) -DCUSTOM_MODES_ONLY -DCUSTOM_MODES $(SOURCES) -o $@ $(LIBS) -lm clean: rm -f dump_modes opus-1.1.2/celt/dump_modes/dump_modes.c000066400000000000000000000320201264527674100200770ustar00rootroot00000000000000/* Copyright (c) 2008 CSIRO Copyright (c) 2008-2009 Xiph.Org Foundation Written by Jean-Marc Valin */ /* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - 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. 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 OWNER 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. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include "modes.h" #include "celt.h" #include "rate.h" #include "dump_modes_arch.h" #define INT16 "%d" #define INT32 "%d" #define FLOAT "%#0.8gf" #ifdef FIXED_POINT #define WORD16 INT16 #define WORD32 INT32 #else #define WORD16 FLOAT #define WORD32 FLOAT #endif void dump_modes(FILE *file, CELTMode **modes, int nb_modes) { int i, j, k; int mdct_twiddles_size; fprintf(file, "/* The contents of this file was automatically generated by dump_modes.c\n"); fprintf(file, " with arguments:"); for (i=0;iFs,mode->shortMdctSize*mode->nbShortMdcts); } fprintf(file, "\n It contains static definitions for some pre-defined modes. */\n"); fprintf(file, "#include \"modes.h\"\n"); fprintf(file, "#include \"rate.h\"\n"); fprintf(file, "\n#ifdef HAVE_ARM_NE10\n"); fprintf(file, "#define OVERRIDE_FFT 1\n"); fprintf(file, "#include \"%s\"\n", ARM_NE10_ARCH_FILE_NAME); fprintf(file, "#endif\n"); fprintf(file, "\n"); for (i=0;ishortMdctSize*mode->nbShortMdcts; standard = (mode->Fs == 400*(opus_int32)mode->shortMdctSize); framerate = mode->Fs/mode->shortMdctSize; if (!standard) { fprintf(file, "#ifndef DEF_EBANDS%d_%d\n", mode->Fs, mdctSize); fprintf(file, "#define DEF_EBANDS%d_%d\n", mode->Fs, mdctSize); fprintf (file, "static const opus_int16 eBands%d_%d[%d] = {\n", mode->Fs, mdctSize, mode->nbEBands+2); for (j=0;jnbEBands+2;j++) fprintf (file, "%d, ", mode->eBands[j]); fprintf (file, "};\n"); fprintf(file, "#endif\n"); fprintf(file, "\n"); } fprintf(file, "#ifndef DEF_WINDOW%d\n", mode->overlap); fprintf(file, "#define DEF_WINDOW%d\n", mode->overlap); fprintf (file, "static const opus_val16 window%d[%d] = {\n", mode->overlap, mode->overlap); for (j=0;joverlap;j++) fprintf (file, WORD16 ",%c", mode->window[j],(j+6)%5==0?'\n':' '); fprintf (file, "};\n"); fprintf(file, "#endif\n"); fprintf(file, "\n"); if (!standard) { fprintf(file, "#ifndef DEF_ALLOC_VECTORS%d_%d\n", mode->Fs, mdctSize); fprintf(file, "#define DEF_ALLOC_VECTORS%d_%d\n", mode->Fs, mdctSize); fprintf (file, "static const unsigned char allocVectors%d_%d[%d] = {\n", mode->Fs, mdctSize, mode->nbEBands*mode->nbAllocVectors); for (j=0;jnbAllocVectors;j++) { for (k=0;knbEBands;k++) fprintf (file, "%2d, ", mode->allocVectors[j*mode->nbEBands+k]); fprintf (file, "\n"); } fprintf (file, "};\n"); fprintf(file, "#endif\n"); fprintf(file, "\n"); } fprintf(file, "#ifndef DEF_LOGN%d\n", framerate); fprintf(file, "#define DEF_LOGN%d\n", framerate); fprintf (file, "static const opus_int16 logN%d[%d] = {\n", framerate, mode->nbEBands); for (j=0;jnbEBands;j++) fprintf (file, "%d, ", mode->logN[j]); fprintf (file, "};\n"); fprintf(file, "#endif\n"); fprintf(file, "\n"); /* Pulse cache */ fprintf(file, "#ifndef DEF_PULSE_CACHE%d\n", mode->Fs/mdctSize); fprintf(file, "#define DEF_PULSE_CACHE%d\n", mode->Fs/mdctSize); fprintf (file, "static const opus_int16 cache_index%d[%d] = {\n", mode->Fs/mdctSize, (mode->maxLM+2)*mode->nbEBands); for (j=0;jnbEBands*(mode->maxLM+2);j++) fprintf (file, "%d,%c", mode->cache.index[j],(j+16)%15==0?'\n':' '); fprintf (file, "};\n"); fprintf (file, "static const unsigned char cache_bits%d[%d] = {\n", mode->Fs/mdctSize, mode->cache.size); for (j=0;jcache.size;j++) fprintf (file, "%d,%c", mode->cache.bits[j],(j+16)%15==0?'\n':' '); fprintf (file, "};\n"); fprintf (file, "static const unsigned char cache_caps%d[%d] = {\n", mode->Fs/mdctSize, (mode->maxLM+1)*2*mode->nbEBands); for (j=0;j<(mode->maxLM+1)*2*mode->nbEBands;j++) fprintf (file, "%d,%c", mode->cache.caps[j],(j+16)%15==0?'\n':' '); fprintf (file, "};\n"); fprintf(file, "#endif\n"); fprintf(file, "\n"); /* FFT twiddles */ fprintf(file, "#ifndef FFT_TWIDDLES%d_%d\n", mode->Fs, mdctSize); fprintf(file, "#define FFT_TWIDDLES%d_%d\n", mode->Fs, mdctSize); fprintf (file, "static const kiss_twiddle_cpx fft_twiddles%d_%d[%d] = {\n", mode->Fs, mdctSize, mode->mdct.kfft[0]->nfft); for (j=0;jmdct.kfft[0]->nfft;j++) fprintf (file, "{" WORD16 ", " WORD16 "},%c", mode->mdct.kfft[0]->twiddles[j].r, mode->mdct.kfft[0]->twiddles[j].i,(j+3)%2==0?'\n':' '); fprintf (file, "};\n"); #ifdef OVERRIDE_FFT dump_mode_arch(mode); #endif /* FFT Bitrev tables */ for (k=0;k<=mode->mdct.maxshift;k++) { fprintf(file, "#ifndef FFT_BITREV%d\n", mode->mdct.kfft[k]->nfft); fprintf(file, "#define FFT_BITREV%d\n", mode->mdct.kfft[k]->nfft); fprintf (file, "static const opus_int16 fft_bitrev%d[%d] = {\n", mode->mdct.kfft[k]->nfft, mode->mdct.kfft[k]->nfft); for (j=0;jmdct.kfft[k]->nfft;j++) fprintf (file, "%d,%c", mode->mdct.kfft[k]->bitrev[j],(j+16)%15==0?'\n':' '); fprintf (file, "};\n"); fprintf(file, "#endif\n"); fprintf(file, "\n"); } /* FFT States */ for (k=0;k<=mode->mdct.maxshift;k++) { fprintf(file, "#ifndef FFT_STATE%d_%d_%d\n", mode->Fs, mdctSize, k); fprintf(file, "#define FFT_STATE%d_%d_%d\n", mode->Fs, mdctSize, k); fprintf (file, "static const kiss_fft_state fft_state%d_%d_%d = {\n", mode->Fs, mdctSize, k); fprintf (file, "%d, /* nfft */\n", mode->mdct.kfft[k]->nfft); fprintf (file, WORD16 ", /* scale */\n", mode->mdct.kfft[k]->scale); #ifdef FIXED_POINT fprintf (file, "%d, /* scale_shift */\n", mode->mdct.kfft[k]->scale_shift); #endif fprintf (file, "%d, /* shift */\n", mode->mdct.kfft[k]->shift); fprintf (file, "{"); for (j=0;j<2*MAXFACTORS;j++) fprintf (file, "%d, ", mode->mdct.kfft[k]->factors[j]); fprintf (file, "}, /* factors */\n"); fprintf (file, "fft_bitrev%d, /* bitrev */\n", mode->mdct.kfft[k]->nfft); fprintf (file, "fft_twiddles%d_%d, /* bitrev */\n", mode->Fs, mdctSize); fprintf (file, "#ifdef OVERRIDE_FFT\n"); fprintf (file, "(arch_fft_state *)&cfg_arch_%d,\n", mode->mdct.kfft[k]->nfft); fprintf (file, "#else\n"); fprintf (file, "NULL,\n"); fprintf(file, "#endif\n"); fprintf (file, "};\n"); fprintf(file, "#endif\n"); fprintf(file, "\n"); } fprintf(file, "#endif\n"); fprintf(file, "\n"); /* MDCT twiddles */ mdct_twiddles_size = mode->mdct.n-(mode->mdct.n/2>>mode->mdct.maxshift); fprintf(file, "#ifndef MDCT_TWIDDLES%d\n", mdctSize); fprintf(file, "#define MDCT_TWIDDLES%d\n", mdctSize); fprintf (file, "static const opus_val16 mdct_twiddles%d[%d] = {\n", mdctSize, mdct_twiddles_size); for (j=0;jmdct.trig[j],(j+6)%5==0?'\n':' '); fprintf (file, "};\n"); fprintf(file, "#endif\n"); fprintf(file, "\n"); /* Print the actual mode data */ fprintf(file, "static const CELTMode mode%d_%d_%d = {\n", mode->Fs, mdctSize, mode->overlap); fprintf(file, INT32 ", /* Fs */\n", mode->Fs); fprintf(file, "%d, /* overlap */\n", mode->overlap); fprintf(file, "%d, /* nbEBands */\n", mode->nbEBands); fprintf(file, "%d, /* effEBands */\n", mode->effEBands); fprintf(file, "{"); for (j=0;j<4;j++) fprintf(file, WORD16 ", ", mode->preemph[j]); fprintf(file, "}, /* preemph */\n"); if (standard) fprintf(file, "eband5ms, /* eBands */\n"); else fprintf(file, "eBands%d_%d, /* eBands */\n", mode->Fs, mdctSize); fprintf(file, "%d, /* maxLM */\n", mode->maxLM); fprintf(file, "%d, /* nbShortMdcts */\n", mode->nbShortMdcts); fprintf(file, "%d, /* shortMdctSize */\n", mode->shortMdctSize); fprintf(file, "%d, /* nbAllocVectors */\n", mode->nbAllocVectors); if (standard) fprintf(file, "band_allocation, /* allocVectors */\n"); else fprintf(file, "allocVectors%d_%d, /* allocVectors */\n", mode->Fs, mdctSize); fprintf(file, "logN%d, /* logN */\n", framerate); fprintf(file, "window%d, /* window */\n", mode->overlap); fprintf(file, "{%d, %d, {", mode->mdct.n, mode->mdct.maxshift); for (k=0;k<=mode->mdct.maxshift;k++) fprintf(file, "&fft_state%d_%d_%d, ", mode->Fs, mdctSize, k); fprintf (file, "}, mdct_twiddles%d}, /* mdct */\n", mdctSize); fprintf(file, "{%d, cache_index%d, cache_bits%d, cache_caps%d}, /* cache */\n", mode->cache.size, mode->Fs/mdctSize, mode->Fs/mdctSize, mode->Fs/mdctSize); fprintf(file, "};\n"); } fprintf(file, "\n"); fprintf(file, "/* List of all the available modes */\n"); fprintf(file, "#define TOTAL_MODES %d\n", nb_modes); fprintf(file, "static const CELTMode * const static_mode_list[TOTAL_MODES] = {\n"); for (i=0;ishortMdctSize*mode->nbShortMdcts; fprintf(file, "&mode%d_%d_%d,\n", mode->Fs, mdctSize, mode->overlap); } fprintf(file, "};\n"); } void dump_header(FILE *file, CELTMode **modes, int nb_modes) { int i; int channels = 0; int frame_size = 0; int overlap = 0; fprintf (file, "/* This header file is generated automatically*/\n"); for (i=0;ishortMdctSize*mode->nbShortMdcts; else if (frame_size != mode->shortMdctSize*mode->nbShortMdcts) frame_size = -1; if (overlap==0) overlap = mode->overlap; else if (overlap != mode->overlap) overlap = -1; } if (channels>0) { fprintf (file, "#define CHANNELS(mode) %d\n", channels); if (channels==1) fprintf (file, "#define DISABLE_STEREO\n"); } if (frame_size>0) { fprintf (file, "#define FRAMESIZE(mode) %d\n", frame_size); } if (overlap>0) { fprintf (file, "#define OVERLAP(mode) %d\n", overlap); } } #ifdef FIXED_POINT #define BASENAME "static_modes_fixed" #else #define BASENAME "static_modes_float" #endif int main(int argc, char **argv) { int i, nb; FILE *file; CELTMode **m; if (argc%2 != 1 || argc<3) { fprintf (stderr, "Usage: %s rate frame_size [rate frame_size] [rate frame_size]...\n",argv[0]); return 1; } nb = (argc-1)/2; m = malloc(nb*sizeof(CELTMode*)); for (i=0;i #include #include "modes.h" #include "dump_modes_arch.h" #include #if !defined(FIXED_POINT) # define NE10_FFT_CFG_TYPE_T ne10_fft_cfg_float32_t # define NE10_FFT_CPX_TYPE_T_STR "ne10_fft_cpx_float32_t" # define NE10_FFT_STATE_TYPE_T_STR "ne10_fft_state_float32_t" #else # define NE10_FFT_CFG_TYPE_T ne10_fft_cfg_int32_t # define NE10_FFT_CPX_TYPE_T_STR "ne10_fft_cpx_int32_t" # define NE10_FFT_STATE_TYPE_T_STR "ne10_fft_state_int32_t" #endif static FILE *file; void dump_modes_arch_init(CELTMode **modes, int nb_modes) { int i; file = fopen(ARM_NE10_ARCH_FILE_NAME, "w"); fprintf(file, "/* The contents of this file was automatically generated by\n"); fprintf(file, " * dump_mode_arm_ne10.c with arguments:"); for (i=0;iFs,mode->shortMdctSize*mode->nbShortMdcts); } fprintf(file, "\n * It contains static definitions for some pre-defined modes. */\n"); fprintf(file, "#include \n\n"); } void dump_modes_arch_finalize() { fclose(file); } void dump_mode_arch(CELTMode *mode) { int k, j; int mdctSize; mdctSize = mode->shortMdctSize*mode->nbShortMdcts; fprintf(file, "#ifndef NE10_FFT_PARAMS%d_%d\n", mode->Fs, mdctSize); fprintf(file, "#define NE10_FFT_PARAMS%d_%d\n", mode->Fs, mdctSize); /* cfg->factors */ for(k=0;k<=mode->mdct.maxshift;k++) { NE10_FFT_CFG_TYPE_T cfg; cfg = (NE10_FFT_CFG_TYPE_T)mode->mdct.kfft[k]->arch_fft->priv; if (!cfg) continue; fprintf(file, "static const ne10_int32_t ne10_factors_%d[%d] = {\n", mode->mdct.kfft[k]->nfft, (NE10_MAXFACTORS * 2)); for(j=0;j<(NE10_MAXFACTORS * 2);j++) { fprintf(file, "%d,%c", cfg->factors[j],(j+16)%15==0?'\n':' '); } fprintf (file, "};\n"); } /* cfg->twiddles */ for(k=0;k<=mode->mdct.maxshift;k++) { NE10_FFT_CFG_TYPE_T cfg; cfg = (NE10_FFT_CFG_TYPE_T)mode->mdct.kfft[k]->arch_fft->priv; if (!cfg) continue; fprintf(file, "static const %s ne10_twiddles_%d[%d] = {\n", NE10_FFT_CPX_TYPE_T_STR, mode->mdct.kfft[k]->nfft, mode->mdct.kfft[k]->nfft); for(j=0;jmdct.kfft[k]->nfft;j++) { #if !defined(FIXED_POINT) fprintf(file, "{%#0.8gf,%#0.8gf},%c", cfg->twiddles[j].r, cfg->twiddles[j].i,(j+4)%3==0?'\n':' '); #else fprintf(file, "{%d,%d},%c", cfg->twiddles[j].r, cfg->twiddles[j].i,(j+4)%3==0?'\n':' '); #endif } fprintf (file, "};\n"); } for(k=0;k<=mode->mdct.maxshift;k++) { NE10_FFT_CFG_TYPE_T cfg; cfg = (NE10_FFT_CFG_TYPE_T)mode->mdct.kfft[k]->arch_fft->priv; if (!cfg) { fprintf(file, "/* Ne10 does not support scaled FFT for length = %d */\n", mode->mdct.kfft[k]->nfft); fprintf(file, "static const arch_fft_state cfg_arch_%d = {\n", mode->mdct.kfft[k]->nfft); fprintf(file, "0,\n"); fprintf(file, "NULL\n"); fprintf(file, "};\n"); continue; } fprintf(file, "static const %s %s_%d = {\n", NE10_FFT_STATE_TYPE_T_STR, NE10_FFT_STATE_TYPE_T_STR, mode->mdct.kfft[k]->nfft); fprintf(file, "%d,\n", cfg->nfft); fprintf(file, "(ne10_int32_t *)ne10_factors_%d,\n", mode->mdct.kfft[k]->nfft); fprintf(file, "(%s *)ne10_twiddles_%d,\n", NE10_FFT_CPX_TYPE_T_STR, mode->mdct.kfft[k]->nfft); fprintf(file, "NULL,\n"); /* buffer */ fprintf(file, "(%s *)&ne10_twiddles_%d[%d],\n", NE10_FFT_CPX_TYPE_T_STR, mode->mdct.kfft[k]->nfft, cfg->nfft); #if !defined(FIXED_POINT) fprintf(file, "/* is_forward_scaled = true */\n"); fprintf(file, "(ne10_int32_t) 1,\n"); fprintf(file, "/* is_backward_scaled = false */\n"); fprintf(file, "(ne10_int32_t) 0,\n"); #endif fprintf(file, "};\n"); fprintf(file, "static const arch_fft_state cfg_arch_%d = {\n", mode->mdct.kfft[k]->nfft); fprintf(file, "1,\n"); fprintf(file, "(void *)&%s_%d,\n", NE10_FFT_STATE_TYPE_T_STR, mode->mdct.kfft[k]->nfft); fprintf(file, "};\n\n"); } fprintf(file, "#endif /* end NE10_FFT_PARAMS%d_%d */\n", mode->Fs, mdctSize); } opus-1.1.2/celt/ecintrin.h000066400000000000000000000067551264527674100154470ustar00rootroot00000000000000/* Copyright (c) 2003-2008 Timothy B. Terriberry Copyright (c) 2008 Xiph.Org Foundation */ /* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - 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. 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 OWNER 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. */ /*Some common macros for potential platform-specific optimization.*/ #include "opus_types.h" #include #include #include "arch.h" #if !defined(_ecintrin_H) # define _ecintrin_H (1) /*Some specific platforms may have optimized intrinsic or OPUS_INLINE assembly versions of these functions which can substantially improve performance. We define macros for them to allow easy incorporation of these non-ANSI features.*/ /*Modern gcc (4.x) can compile the naive versions of min and max with cmov if given an appropriate architecture, but the branchless bit-twiddling versions are just as fast, and do not require any special target architecture. Earlier gcc versions (3.x) compiled both code to the same assembly instructions, because of the way they represented ((_b)>(_a)) internally.*/ # define EC_MINI(_a,_b) ((_a)+(((_b)-(_a))&-((_b)<(_a)))) /*Count leading zeros. This macro should only be used for implementing ec_ilog(), if it is defined. All other code should use EC_ILOG() instead.*/ #if defined(_MSC_VER) && (_MSC_VER >= 1400) # include /*In _DEBUG mode this is not an intrinsic by default.*/ # pragma intrinsic(_BitScanReverse) static __inline int ec_bsr(unsigned long _x){ unsigned long ret; _BitScanReverse(&ret,_x); return (int)ret; } # define EC_CLZ0 (1) # define EC_CLZ(_x) (-ec_bsr(_x)) #elif defined(ENABLE_TI_DSPLIB) # include "dsplib.h" # define EC_CLZ0 (31) # define EC_CLZ(_x) (_lnorm(_x)) #elif __GNUC_PREREQ(3,4) # if INT_MAX>=2147483647 # define EC_CLZ0 ((int)sizeof(unsigned)*CHAR_BIT) # define EC_CLZ(_x) (__builtin_clz(_x)) # elif LONG_MAX>=2147483647L # define EC_CLZ0 ((int)sizeof(unsigned long)*CHAR_BIT) # define EC_CLZ(_x) (__builtin_clzl(_x)) # endif #endif #if defined(EC_CLZ) /*Note that __builtin_clz is not defined when _x==0, according to the gcc documentation (and that of the BSR instruction that implements it on x86). The majority of the time we can never pass it zero. When we need to, it can be special cased.*/ # define EC_ILOG(_x) (EC_CLZ0-EC_CLZ(_x)) #else int ec_ilog(opus_uint32 _v); # define EC_ILOG(_x) (ec_ilog(_x)) #endif #endif opus-1.1.2/celt/entcode.c000066400000000000000000000131041264527674100152320ustar00rootroot00000000000000/* Copyright (c) 2001-2011 Timothy B. Terriberry */ /* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - 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. 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 OWNER 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. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "entcode.h" #include "arch.h" #if !defined(EC_CLZ) /*This is a fallback for systems where we don't know how to access a BSR or CLZ instruction (see ecintrin.h). If you are optimizing Opus on a new platform and it has a native CLZ or BZR (e.g. cell, MIPS, x86, etc) then making it available to Opus will be an easy performance win.*/ int ec_ilog(opus_uint32 _v){ /*On a Pentium M, this branchless version tested as the fastest on 1,000,000,000 random 32-bit integers, edging out a similar version with branches, and a 256-entry LUT version.*/ int ret; int m; ret=!!_v; m=!!(_v&0xFFFF0000)<<4; _v>>=m; ret|=m; m=!!(_v&0xFF00)<<3; _v>>=m; ret|=m; m=!!(_v&0xF0)<<2; _v>>=m; ret|=m; m=!!(_v&0xC)<<1; _v>>=m; ret|=m; ret+=!!(_v&0x2); return ret; } #endif #if 1 /* This is a faster version of ec_tell_frac() that takes advantage of the low (1/8 bit) resolution to use just a linear function followed by a lookup to determine the exact transition thresholds. */ opus_uint32 ec_tell_frac(ec_ctx *_this){ static const unsigned correction[8] = {35733, 38967, 42495, 46340, 50535, 55109, 60097, 65535}; opus_uint32 nbits; opus_uint32 r; int l; unsigned b; nbits=_this->nbits_total<rng); r=_this->rng>>(l-16); b = (r>>12)-8; b += r>correction[b]; l = (l<<3)+b; return nbits-l; } #else opus_uint32 ec_tell_frac(ec_ctx *_this){ opus_uint32 nbits; opus_uint32 r; int l; int i; /*To handle the non-integral number of bits still left in the encoder/decoder state, we compute the worst-case number of bits of val that must be encoded to ensure that the value is inside the range for any possible subsequent bits. The computation here is independent of val itself (the decoder does not even track that value), even though the real number of bits used after ec_enc_done() may be 1 smaller if rng is a power of two and the corresponding trailing bits of val are all zeros. If we did try to track that special case, then coding a value with a probability of 1/(1<nbits_total<rng); r=_this->rng>>(l-16); for(i=BITRES;i-->0;){ int b; r=r*r>>15; b=(int)(r>>16); l=l<<1|b; r>>=b; } return nbits-l; } #endif #ifdef USE_SMALL_DIV_TABLE /* Result of 2^32/(2*i+1), except for i=0. */ const opus_uint32 SMALL_DIV_TABLE[129] = { 0xFFFFFFFF, 0x55555555, 0x33333333, 0x24924924, 0x1C71C71C, 0x1745D174, 0x13B13B13, 0x11111111, 0x0F0F0F0F, 0x0D79435E, 0x0C30C30C, 0x0B21642C, 0x0A3D70A3, 0x097B425E, 0x08D3DCB0, 0x08421084, 0x07C1F07C, 0x07507507, 0x06EB3E45, 0x06906906, 0x063E7063, 0x05F417D0, 0x05B05B05, 0x0572620A, 0x05397829, 0x05050505, 0x04D4873E, 0x04A7904A, 0x047DC11F, 0x0456C797, 0x04325C53, 0x04104104, 0x03F03F03, 0x03D22635, 0x03B5CC0E, 0x039B0AD1, 0x0381C0E0, 0x0369D036, 0x03531DEC, 0x033D91D2, 0x0329161F, 0x03159721, 0x03030303, 0x02F14990, 0x02E05C0B, 0x02D02D02, 0x02C0B02C, 0x02B1DA46, 0x02A3A0FD, 0x0295FAD4, 0x0288DF0C, 0x027C4597, 0x02702702, 0x02647C69, 0x02593F69, 0x024E6A17, 0x0243F6F0, 0x0239E0D5, 0x02302302, 0x0226B902, 0x021D9EAD, 0x0214D021, 0x020C49BA, 0x02040810, 0x01FC07F0, 0x01F44659, 0x01ECC07B, 0x01E573AC, 0x01DE5D6E, 0x01D77B65, 0x01D0CB58, 0x01CA4B30, 0x01C3F8F0, 0x01BDD2B8, 0x01B7D6C3, 0x01B20364, 0x01AC5701, 0x01A6D01A, 0x01A16D3F, 0x019C2D14, 0x01970E4F, 0x01920FB4, 0x018D3018, 0x01886E5F, 0x0183C977, 0x017F405F, 0x017AD220, 0x01767DCE, 0x01724287, 0x016E1F76, 0x016A13CD, 0x01661EC6, 0x01623FA7, 0x015E75BB, 0x015AC056, 0x01571ED3, 0x01539094, 0x01501501, 0x014CAB88, 0x0149539E, 0x01460CBC, 0x0142D662, 0x013FB013, 0x013C995A, 0x013991C2, 0x013698DF, 0x0133AE45, 0x0130D190, 0x012E025C, 0x012B404A, 0x01288B01, 0x0125E227, 0x01234567, 0x0120B470, 0x011E2EF3, 0x011BB4A4, 0x01194538, 0x0116E068, 0x011485F0, 0x0112358E, 0x010FEF01, 0x010DB20A, 0x010B7E6E, 0x010953F3, 0x01073260, 0x0105197F, 0x0103091B, 0x01010101 }; #endif opus-1.1.2/celt/entcode.h000066400000000000000000000124461264527674100152470ustar00rootroot00000000000000/* Copyright (c) 2001-2011 Timothy B. Terriberry Copyright (c) 2008-2009 Xiph.Org Foundation */ /* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - 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. 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 OWNER 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. */ #include "opus_types.h" #include "opus_defines.h" #if !defined(_entcode_H) # define _entcode_H (1) # include # include # include "ecintrin.h" extern const opus_uint32 SMALL_DIV_TABLE[129]; #ifdef OPUS_ARM_ASM #define USE_SMALL_DIV_TABLE #endif /*OPT: ec_window must be at least 32 bits, but if you have fast arithmetic on a larger type, you can speed up the decoder by using it here.*/ typedef opus_uint32 ec_window; typedef struct ec_ctx ec_ctx; typedef struct ec_ctx ec_enc; typedef struct ec_ctx ec_dec; # define EC_WINDOW_SIZE ((int)sizeof(ec_window)*CHAR_BIT) /*The number of bits to use for the range-coded part of unsigned integers.*/ # define EC_UINT_BITS (8) /*The resolution of fractional-precision bit usage measurements, i.e., 3 => 1/8th bits.*/ # define BITRES 3 /*The entropy encoder/decoder context. We use the same structure for both, so that common functions like ec_tell() can be used on either one.*/ struct ec_ctx{ /*Buffered input/output.*/ unsigned char *buf; /*The size of the buffer.*/ opus_uint32 storage; /*The offset at which the last byte containing raw bits was read/written.*/ opus_uint32 end_offs; /*Bits that will be read from/written at the end.*/ ec_window end_window; /*Number of valid bits in end_window.*/ int nend_bits; /*The total number of whole bits read/written. This does not include partial bits currently in the range coder.*/ int nbits_total; /*The offset at which the next range coder byte will be read/written.*/ opus_uint32 offs; /*The number of values in the current range.*/ opus_uint32 rng; /*In the decoder: the difference between the top of the current range and the input value, minus one. In the encoder: the low end of the current range.*/ opus_uint32 val; /*In the decoder: the saved normalization factor from ec_decode(). In the encoder: the number of oustanding carry propagating symbols.*/ opus_uint32 ext; /*A buffered input/output symbol, awaiting carry propagation.*/ int rem; /*Nonzero if an error occurred.*/ int error; }; static OPUS_INLINE opus_uint32 ec_range_bytes(ec_ctx *_this){ return _this->offs; } static OPUS_INLINE unsigned char *ec_get_buffer(ec_ctx *_this){ return _this->buf; } static OPUS_INLINE int ec_get_error(ec_ctx *_this){ return _this->error; } /*Returns the number of bits "used" by the encoded or decoded symbols so far. This same number can be computed in either the encoder or the decoder, and is suitable for making coding decisions. Return: The number of bits. This will always be slightly larger than the exact value (e.g., all rounding error is in the positive direction).*/ static OPUS_INLINE int ec_tell(ec_ctx *_this){ return _this->nbits_total-EC_ILOG(_this->rng); } /*Returns the number of bits "used" by the encoded or decoded symbols so far. This same number can be computed in either the encoder or the decoder, and is suitable for making coding decisions. Return: The number of bits scaled by 2**BITRES. This will always be slightly larger than the exact value (e.g., all rounding error is in the positive direction).*/ opus_uint32 ec_tell_frac(ec_ctx *_this); /* Tested exhaustively for all n and for 1<=d<=256 */ static OPUS_INLINE opus_uint32 celt_udiv(opus_uint32 n, opus_uint32 d) { celt_assert(d>0); #ifdef USE_SMALL_DIV_TABLE if (d>256) return n/d; else { opus_uint32 t, q; t = EC_ILOG(d&-d); q = (opus_uint64)SMALL_DIV_TABLE[d>>t]*(n>>(t-1))>>32; return q+(n-q*d >= d); } #else return n/d; #endif } static OPUS_INLINE opus_int32 celt_sudiv(opus_int32 n, opus_int32 d) { celt_assert(d>0); #ifdef USE_SMALL_DIV_TABLE if (n<0) return -(opus_int32)celt_udiv(-n, d); else return celt_udiv(n, d); #else return n/d; #endif } #endif opus-1.1.2/celt/entdec.c000066400000000000000000000175201264527674100150610ustar00rootroot00000000000000/* Copyright (c) 2001-2011 Timothy B. Terriberry Copyright (c) 2008-2009 Xiph.Org Foundation */ /* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - 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. 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 OWNER 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. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include "os_support.h" #include "arch.h" #include "entdec.h" #include "mfrngcod.h" /*A range decoder. This is an entropy decoder based upon \cite{Mar79}, which is itself a rediscovery of the FIFO arithmetic code introduced by \cite{Pas76}. It is very similar to arithmetic encoding, except that encoding is done with digits in any base, instead of with bits, and so it is faster when using larger bases (i.e.: a byte). The author claims an average waste of $\frac{1}{2}\log_b(2b)$ bits, where $b$ is the base, longer than the theoretical optimum, but to my knowledge there is no published justification for this claim. This only seems true when using near-infinite precision arithmetic so that the process is carried out with no rounding errors. An excellent description of implementation details is available at http://www.arturocampos.com/ac_range.html A recent work \cite{MNW98} which proposes several changes to arithmetic encoding for efficiency actually re-discovers many of the principles behind range encoding, and presents a good theoretical analysis of them. End of stream is handled by writing out the smallest number of bits that ensures that the stream will be correctly decoded regardless of the value of any subsequent bits. ec_tell() can be used to determine how many bits were needed to decode all the symbols thus far; other data can be packed in the remaining bits of the input buffer. @PHDTHESIS{Pas76, author="Richard Clark Pasco", title="Source coding algorithms for fast data compression", school="Dept. of Electrical Engineering, Stanford University", address="Stanford, CA", month=May, year=1976 } @INPROCEEDINGS{Mar79, author="Martin, G.N.N.", title="Range encoding: an algorithm for removing redundancy from a digitised message", booktitle="Video & Data Recording Conference", year=1979, address="Southampton", month=Jul } @ARTICLE{MNW98, author="Alistair Moffat and Radford Neal and Ian H. Witten", title="Arithmetic Coding Revisited", journal="{ACM} Transactions on Information Systems", year=1998, volume=16, number=3, pages="256--294", month=Jul, URL="http://www.stanford.edu/class/ee398a/handouts/papers/Moffat98ArithmCoding.pdf" }*/ static int ec_read_byte(ec_dec *_this){ return _this->offs<_this->storage?_this->buf[_this->offs++]:0; } static int ec_read_byte_from_end(ec_dec *_this){ return _this->end_offs<_this->storage? _this->buf[_this->storage-++(_this->end_offs)]:0; } /*Normalizes the contents of val and rng so that rng lies entirely in the high-order symbol.*/ static void ec_dec_normalize(ec_dec *_this){ /*If the range is too small, rescale it and input some bits.*/ while(_this->rng<=EC_CODE_BOT){ int sym; _this->nbits_total+=EC_SYM_BITS; _this->rng<<=EC_SYM_BITS; /*Use up the remaining bits from our last symbol.*/ sym=_this->rem; /*Read the next value from the input.*/ _this->rem=ec_read_byte(_this); /*Take the rest of the bits we need from this new symbol.*/ sym=(sym<rem)>>(EC_SYM_BITS-EC_CODE_EXTRA); /*And subtract them from val, capped to be less than EC_CODE_TOP.*/ _this->val=((_this->val<buf=_buf; _this->storage=_storage; _this->end_offs=0; _this->end_window=0; _this->nend_bits=0; /*This is the offset from which ec_tell() will subtract partial bits. The final value after the ec_dec_normalize() call will be the same as in the encoder, but we have to compensate for the bits that are added there.*/ _this->nbits_total=EC_CODE_BITS+1 -((EC_CODE_BITS-EC_CODE_EXTRA)/EC_SYM_BITS)*EC_SYM_BITS; _this->offs=0; _this->rng=1U<rem=ec_read_byte(_this); _this->val=_this->rng-1-(_this->rem>>(EC_SYM_BITS-EC_CODE_EXTRA)); _this->error=0; /*Normalize the interval.*/ ec_dec_normalize(_this); } unsigned ec_decode(ec_dec *_this,unsigned _ft){ unsigned s; _this->ext=celt_udiv(_this->rng,_ft); s=(unsigned)(_this->val/_this->ext); return _ft-EC_MINI(s+1,_ft); } unsigned ec_decode_bin(ec_dec *_this,unsigned _bits){ unsigned s; _this->ext=_this->rng>>_bits; s=(unsigned)(_this->val/_this->ext); return (1U<<_bits)-EC_MINI(s+1U,1U<<_bits); } void ec_dec_update(ec_dec *_this,unsigned _fl,unsigned _fh,unsigned _ft){ opus_uint32 s; s=IMUL32(_this->ext,_ft-_fh); _this->val-=s; _this->rng=_fl>0?IMUL32(_this->ext,_fh-_fl):_this->rng-s; ec_dec_normalize(_this); } /*The probability of having a "one" is 1/(1<<_logp).*/ int ec_dec_bit_logp(ec_dec *_this,unsigned _logp){ opus_uint32 r; opus_uint32 d; opus_uint32 s; int ret; r=_this->rng; d=_this->val; s=r>>_logp; ret=dval=d-s; _this->rng=ret?s:r-s; ec_dec_normalize(_this); return ret; } int ec_dec_icdf(ec_dec *_this,const unsigned char *_icdf,unsigned _ftb){ opus_uint32 r; opus_uint32 d; opus_uint32 s; opus_uint32 t; int ret; s=_this->rng; d=_this->val; r=s>>_ftb; ret=-1; do{ t=s; s=IMUL32(r,_icdf[++ret]); } while(dval=d-s; _this->rng=t-s; ec_dec_normalize(_this); return ret; } opus_uint32 ec_dec_uint(ec_dec *_this,opus_uint32 _ft){ unsigned ft; unsigned s; int ftb; /*In order to optimize EC_ILOG(), it is undefined for the value 0.*/ celt_assert(_ft>1); _ft--; ftb=EC_ILOG(_ft); if(ftb>EC_UINT_BITS){ opus_uint32 t; ftb-=EC_UINT_BITS; ft=(unsigned)(_ft>>ftb)+1; s=ec_decode(_this,ft); ec_dec_update(_this,s,s+1,ft); t=(opus_uint32)s<error=1; return _ft; } else{ _ft++; s=ec_decode(_this,(unsigned)_ft); ec_dec_update(_this,s,s+1,(unsigned)_ft); return s; } } opus_uint32 ec_dec_bits(ec_dec *_this,unsigned _bits){ ec_window window; int available; opus_uint32 ret; window=_this->end_window; available=_this->nend_bits; if((unsigned)available<_bits){ do{ window|=(ec_window)ec_read_byte_from_end(_this)<>=_bits; available-=_bits; _this->end_window=window; _this->nend_bits=available; _this->nbits_total+=_bits; return ret; } opus-1.1.2/celt/entdec.h000066400000000000000000000113431264527674100150630ustar00rootroot00000000000000/* Copyright (c) 2001-2011 Timothy B. Terriberry Copyright (c) 2008-2009 Xiph.Org Foundation */ /* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - 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. 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 OWNER 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. */ #if !defined(_entdec_H) # define _entdec_H (1) # include # include "entcode.h" /*Initializes the decoder. _buf: The input buffer to use. Return: 0 on success, or a negative value on error.*/ void ec_dec_init(ec_dec *_this,unsigned char *_buf,opus_uint32 _storage); /*Calculates the cumulative frequency for the next symbol. This can then be fed into the probability model to determine what that symbol is, and the additional frequency information required to advance to the next symbol. This function cannot be called more than once without a corresponding call to ec_dec_update(), or decoding will not proceed correctly. _ft: The total frequency of the symbols in the alphabet the next symbol was encoded with. Return: A cumulative frequency representing the encoded symbol. If the cumulative frequency of all the symbols before the one that was encoded was fl, and the cumulative frequency of all the symbols up to and including the one encoded is fh, then the returned value will fall in the range [fl,fh).*/ unsigned ec_decode(ec_dec *_this,unsigned _ft); /*Equivalent to ec_decode() with _ft==1<<_bits.*/ unsigned ec_decode_bin(ec_dec *_this,unsigned _bits); /*Advance the decoder past the next symbol using the frequency information the symbol was encoded with. Exactly one call to ec_decode() must have been made so that all necessary intermediate calculations are performed. _fl: The cumulative frequency of all symbols that come before the symbol decoded. _fh: The cumulative frequency of all symbols up to and including the symbol decoded. Together with _fl, this defines the range [_fl,_fh) in which the value returned above must fall. _ft: The total frequency of the symbols in the alphabet the symbol decoded was encoded in. This must be the same as passed to the preceding call to ec_decode().*/ void ec_dec_update(ec_dec *_this,unsigned _fl,unsigned _fh,unsigned _ft); /* Decode a bit that has a 1/(1<<_logp) probability of being a one */ int ec_dec_bit_logp(ec_dec *_this,unsigned _logp); /*Decodes a symbol given an "inverse" CDF table. No call to ec_dec_update() is necessary after this call. _icdf: The "inverse" CDF, such that symbol s falls in the range [s>0?ft-_icdf[s-1]:0,ft-_icdf[s]), where ft=1<<_ftb. The values must be monotonically non-increasing, and the last value must be 0. _ftb: The number of bits of precision in the cumulative distribution. Return: The decoded symbol s.*/ int ec_dec_icdf(ec_dec *_this,const unsigned char *_icdf,unsigned _ftb); /*Extracts a raw unsigned integer with a non-power-of-2 range from the stream. The bits must have been encoded with ec_enc_uint(). No call to ec_dec_update() is necessary after this call. _ft: The number of integers that can be decoded (one more than the max). This must be at least one, and no more than 2**32-1. Return: The decoded bits.*/ opus_uint32 ec_dec_uint(ec_dec *_this,opus_uint32 _ft); /*Extracts a sequence of raw bits from the stream. The bits must have been encoded with ec_enc_bits(). No call to ec_dec_update() is necessary after this call. _ftb: The number of bits to extract. This must be between 0 and 25, inclusive. Return: The decoded bits.*/ opus_uint32 ec_dec_bits(ec_dec *_this,unsigned _ftb); #endif opus-1.1.2/celt/entenc.c000066400000000000000000000225311264527674100150710ustar00rootroot00000000000000/* Copyright (c) 2001-2011 Timothy B. Terriberry Copyright (c) 2008-2009 Xiph.Org Foundation */ /* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - 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. 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 OWNER 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. */ #if defined(HAVE_CONFIG_H) # include "config.h" #endif #include "os_support.h" #include "arch.h" #include "entenc.h" #include "mfrngcod.h" /*A range encoder. See entdec.c and the references for implementation details \cite{Mar79,MNW98}. @INPROCEEDINGS{Mar79, author="Martin, G.N.N.", title="Range encoding: an algorithm for removing redundancy from a digitised message", booktitle="Video \& Data Recording Conference", year=1979, address="Southampton", month=Jul } @ARTICLE{MNW98, author="Alistair Moffat and Radford Neal and Ian H. Witten", title="Arithmetic Coding Revisited", journal="{ACM} Transactions on Information Systems", year=1998, volume=16, number=3, pages="256--294", month=Jul, URL="http://www.stanford.edu/class/ee398/handouts/papers/Moffat98ArithmCoding.pdf" }*/ static int ec_write_byte(ec_enc *_this,unsigned _value){ if(_this->offs+_this->end_offs>=_this->storage)return -1; _this->buf[_this->offs++]=(unsigned char)_value; return 0; } static int ec_write_byte_at_end(ec_enc *_this,unsigned _value){ if(_this->offs+_this->end_offs>=_this->storage)return -1; _this->buf[_this->storage-++(_this->end_offs)]=(unsigned char)_value; return 0; } /*Outputs a symbol, with a carry bit. If there is a potential to propagate a carry over several symbols, they are buffered until it can be determined whether or not an actual carry will occur. If the counter for the buffered symbols overflows, then the stream becomes undecodable. This gives a theoretical limit of a few billion symbols in a single packet on 32-bit systems. The alternative is to truncate the range in order to force a carry, but requires similar carry tracking in the decoder, needlessly slowing it down.*/ static void ec_enc_carry_out(ec_enc *_this,int _c){ if(_c!=EC_SYM_MAX){ /*No further carry propagation possible, flush buffer.*/ int carry; carry=_c>>EC_SYM_BITS; /*Don't output a byte on the first write. This compare should be taken care of by branch-prediction thereafter.*/ if(_this->rem>=0)_this->error|=ec_write_byte(_this,_this->rem+carry); if(_this->ext>0){ unsigned sym; sym=(EC_SYM_MAX+carry)&EC_SYM_MAX; do _this->error|=ec_write_byte(_this,sym); while(--(_this->ext)>0); } _this->rem=_c&EC_SYM_MAX; } else _this->ext++; } static OPUS_INLINE void ec_enc_normalize(ec_enc *_this){ /*If the range is too small, output some bits and rescale it.*/ while(_this->rng<=EC_CODE_BOT){ ec_enc_carry_out(_this,(int)(_this->val>>EC_CODE_SHIFT)); /*Move the next-to-high-order symbol into the high-order position.*/ _this->val=(_this->val<rng<<=EC_SYM_BITS; _this->nbits_total+=EC_SYM_BITS; } } void ec_enc_init(ec_enc *_this,unsigned char *_buf,opus_uint32 _size){ _this->buf=_buf; _this->end_offs=0; _this->end_window=0; _this->nend_bits=0; /*This is the offset from which ec_tell() will subtract partial bits.*/ _this->nbits_total=EC_CODE_BITS+1; _this->offs=0; _this->rng=EC_CODE_TOP; _this->rem=-1; _this->val=0; _this->ext=0; _this->storage=_size; _this->error=0; } void ec_encode(ec_enc *_this,unsigned _fl,unsigned _fh,unsigned _ft){ opus_uint32 r; r=celt_udiv(_this->rng,_ft); if(_fl>0){ _this->val+=_this->rng-IMUL32(r,(_ft-_fl)); _this->rng=IMUL32(r,(_fh-_fl)); } else _this->rng-=IMUL32(r,(_ft-_fh)); ec_enc_normalize(_this); } void ec_encode_bin(ec_enc *_this,unsigned _fl,unsigned _fh,unsigned _bits){ opus_uint32 r; r=_this->rng>>_bits; if(_fl>0){ _this->val+=_this->rng-IMUL32(r,((1U<<_bits)-_fl)); _this->rng=IMUL32(r,(_fh-_fl)); } else _this->rng-=IMUL32(r,((1U<<_bits)-_fh)); ec_enc_normalize(_this); } /*The probability of having a "one" is 1/(1<<_logp).*/ void ec_enc_bit_logp(ec_enc *_this,int _val,unsigned _logp){ opus_uint32 r; opus_uint32 s; opus_uint32 l; r=_this->rng; l=_this->val; s=r>>_logp; r-=s; if(_val)_this->val=l+r; _this->rng=_val?s:r; ec_enc_normalize(_this); } void ec_enc_icdf(ec_enc *_this,int _s,const unsigned char *_icdf,unsigned _ftb){ opus_uint32 r; r=_this->rng>>_ftb; if(_s>0){ _this->val+=_this->rng-IMUL32(r,_icdf[_s-1]); _this->rng=IMUL32(r,_icdf[_s-1]-_icdf[_s]); } else _this->rng-=IMUL32(r,_icdf[_s]); ec_enc_normalize(_this); } void ec_enc_uint(ec_enc *_this,opus_uint32 _fl,opus_uint32 _ft){ unsigned ft; unsigned fl; int ftb; /*In order to optimize EC_ILOG(), it is undefined for the value 0.*/ celt_assert(_ft>1); _ft--; ftb=EC_ILOG(_ft); if(ftb>EC_UINT_BITS){ ftb-=EC_UINT_BITS; ft=(_ft>>ftb)+1; fl=(unsigned)(_fl>>ftb); ec_encode(_this,fl,fl+1,ft); ec_enc_bits(_this,_fl&(((opus_uint32)1<end_window; used=_this->nend_bits; celt_assert(_bits>0); if(used+_bits>EC_WINDOW_SIZE){ do{ _this->error|=ec_write_byte_at_end(_this,(unsigned)window&EC_SYM_MAX); window>>=EC_SYM_BITS; used-=EC_SYM_BITS; } while(used>=EC_SYM_BITS); } window|=(ec_window)_fl<end_window=window; _this->nend_bits=used; _this->nbits_total+=_bits; } void ec_enc_patch_initial_bits(ec_enc *_this,unsigned _val,unsigned _nbits){ int shift; unsigned mask; celt_assert(_nbits<=EC_SYM_BITS); shift=EC_SYM_BITS-_nbits; mask=((1<<_nbits)-1)<offs>0){ /*The first byte has been finalized.*/ _this->buf[0]=(unsigned char)((_this->buf[0]&~mask)|_val<rem>=0){ /*The first byte is still awaiting carry propagation.*/ _this->rem=(_this->rem&~mask)|_val<rng<=(EC_CODE_TOP>>_nbits)){ /*The renormalization loop has never been run.*/ _this->val=(_this->val&~((opus_uint32)mask<error=-1; } void ec_enc_shrink(ec_enc *_this,opus_uint32 _size){ celt_assert(_this->offs+_this->end_offs<=_size); OPUS_MOVE(_this->buf+_size-_this->end_offs, _this->buf+_this->storage-_this->end_offs,_this->end_offs); _this->storage=_size; } void ec_enc_done(ec_enc *_this){ ec_window window; int used; opus_uint32 msk; opus_uint32 end; int l; /*We output the minimum number of bits that ensures that the symbols encoded thus far will be decoded correctly regardless of the bits that follow.*/ l=EC_CODE_BITS-EC_ILOG(_this->rng); msk=(EC_CODE_TOP-1)>>l; end=(_this->val+msk)&~msk; if((end|msk)>=_this->val+_this->rng){ l++; msk>>=1; end=(_this->val+msk)&~msk; } while(l>0){ ec_enc_carry_out(_this,(int)(end>>EC_CODE_SHIFT)); end=(end<rem>=0||_this->ext>0)ec_enc_carry_out(_this,0); /*If we have buffered extra bits, flush them as well.*/ window=_this->end_window; used=_this->nend_bits; while(used>=EC_SYM_BITS){ _this->error|=ec_write_byte_at_end(_this,(unsigned)window&EC_SYM_MAX); window>>=EC_SYM_BITS; used-=EC_SYM_BITS; } /*Clear any excess space and add any remaining extra bits to the last byte.*/ if(!_this->error){ OPUS_CLEAR(_this->buf+_this->offs, _this->storage-_this->offs-_this->end_offs); if(used>0){ /*If there's no range coder data at all, give up.*/ if(_this->end_offs>=_this->storage)_this->error=-1; else{ l=-l; /*If we've busted, don't add too many extra bits to the last byte; it would corrupt the range coder data, and that's more important.*/ if(_this->offs+_this->end_offs>=_this->storage&&lerror=-1; } _this->buf[_this->storage-_this->end_offs-1]|=(unsigned char)window; } } } } opus-1.1.2/celt/entenc.h000066400000000000000000000124631264527674100151010ustar00rootroot00000000000000/* Copyright (c) 2001-2011 Timothy B. Terriberry Copyright (c) 2008-2009 Xiph.Org Foundation */ /* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - 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. 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 OWNER 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. */ #if !defined(_entenc_H) # define _entenc_H (1) # include # include "entcode.h" /*Initializes the encoder. _buf: The buffer to store output bytes in. _size: The size of the buffer, in chars.*/ void ec_enc_init(ec_enc *_this,unsigned char *_buf,opus_uint32 _size); /*Encodes a symbol given its frequency information. The frequency information must be discernable by the decoder, assuming it has read only the previous symbols from the stream. It is allowable to change the frequency information, or even the entire source alphabet, so long as the decoder can tell from the context of the previously encoded information that it is supposed to do so as well. _fl: The cumulative frequency of all symbols that come before the one to be encoded. _fh: The cumulative frequency of all symbols up to and including the one to be encoded. Together with _fl, this defines the range [_fl,_fh) in which the decoded value will fall. _ft: The sum of the frequencies of all the symbols*/ void ec_encode(ec_enc *_this,unsigned _fl,unsigned _fh,unsigned _ft); /*Equivalent to ec_encode() with _ft==1<<_bits.*/ void ec_encode_bin(ec_enc *_this,unsigned _fl,unsigned _fh,unsigned _bits); /* Encode a bit that has a 1/(1<<_logp) probability of being a one */ void ec_enc_bit_logp(ec_enc *_this,int _val,unsigned _logp); /*Encodes a symbol given an "inverse" CDF table. _s: The index of the symbol to encode. _icdf: The "inverse" CDF, such that symbol _s falls in the range [_s>0?ft-_icdf[_s-1]:0,ft-_icdf[_s]), where ft=1<<_ftb. The values must be monotonically non-increasing, and the last value must be 0. _ftb: The number of bits of precision in the cumulative distribution.*/ void ec_enc_icdf(ec_enc *_this,int _s,const unsigned char *_icdf,unsigned _ftb); /*Encodes a raw unsigned integer in the stream. _fl: The integer to encode. _ft: The number of integers that can be encoded (one more than the max). This must be at least one, and no more than 2**32-1.*/ void ec_enc_uint(ec_enc *_this,opus_uint32 _fl,opus_uint32 _ft); /*Encodes a sequence of raw bits in the stream. _fl: The bits to encode. _ftb: The number of bits to encode. This must be between 1 and 25, inclusive.*/ void ec_enc_bits(ec_enc *_this,opus_uint32 _fl,unsigned _ftb); /*Overwrites a few bits at the very start of an existing stream, after they have already been encoded. This makes it possible to have a few flags up front, where it is easy for decoders to access them without parsing the whole stream, even if their values are not determined until late in the encoding process, without having to buffer all the intermediate symbols in the encoder. In order for this to work, at least _nbits bits must have already been encoded using probabilities that are an exact power of two. The encoder can verify the number of encoded bits is sufficient, but cannot check this latter condition. _val: The bits to encode (in the least _nbits significant bits). They will be decoded in order from most-significant to least. _nbits: The number of bits to overwrite. This must be no more than 8.*/ void ec_enc_patch_initial_bits(ec_enc *_this,unsigned _val,unsigned _nbits); /*Compacts the data to fit in the target size. This moves up the raw bits at the end of the current buffer so they are at the end of the new buffer size. The caller must ensure that the amount of data that's already been written will fit in the new size. _size: The number of bytes in the new buffer. This must be large enough to contain the bits already written, and must be no larger than the existing size.*/ void ec_enc_shrink(ec_enc *_this,opus_uint32 _size); /*Indicates that there are no more symbols to encode. All reamining output bytes are flushed to the output buffer. ec_enc_init() must be called before the encoder can be used again.*/ void ec_enc_done(ec_enc *_this); #endif opus-1.1.2/celt/fixed_c5x.h000066400000000000000000000047351264527674100155060ustar00rootroot00000000000000/* Copyright (C) 2003 Jean-Marc Valin */ /** @file fixed_c5x.h @brief Fixed-point operations for the TI C5x DSP family */ /* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - 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. 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 OWNER 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. */ #ifndef FIXED_C5X_H #define FIXED_C5X_H #include "dsplib.h" #undef IMUL32 static OPUS_INLINE long IMUL32(long i, long j) { long ac0, ac1; ac0 = _lmpy(i>>16,j); ac1 = ac0 + _lmpy(i,j>>16); return _lmpyu(i,j) + (ac1<<16); } #undef MAX16 #define MAX16(a,b) _max(a,b) #undef MIN16 #define MIN16(a,b) _min(a,b) #undef MAX32 #define MAX32(a,b) _lmax(a,b) #undef MIN32 #define MIN32(a,b) _lmin(a,b) #undef VSHR32 #define VSHR32(a, shift) _lshl(a,-(shift)) #undef MULT16_16_Q15 #define MULT16_16_Q15(a,b) (_smpy(a,b)) #undef MULT16_16SU #define MULT16_16SU(a,b) _lmpysu(a,b) #undef MULT_16_16 #define MULT_16_16(a,b) _lmpy(a,b) /* FIXME: This is technically incorrect and is bound to cause problems. Is there any cleaner solution? */ #undef MULT16_32_Q15 #define MULT16_32_Q15(a,b) ADD32(SHL(MULT16_16((a),SHR((b),16)),1), SHR(MULT16_16SU((a),(b)),15)) #define celt_ilog2(x) (30 - _lnorm(x)) #define OVERRIDE_CELT_ILOG2 #define celt_maxabs16(x, len) MAX32(EXTEND32(maxval((DATA *)x, len)),-EXTEND32(minval((DATA *)x, len))) #define OVERRIDE_CELT_MAXABS16 #endif /* FIXED_C5X_H */ opus-1.1.2/celt/fixed_c6x.h000066400000000000000000000042151264527674100155000ustar00rootroot00000000000000/* Copyright (C) 2008 CSIRO */ /** @file fixed_c6x.h @brief Fixed-point operations for the TI C6x DSP family */ /* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - 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. 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 OWNER 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. */ #ifndef FIXED_C6X_H #define FIXED_C6X_H #undef MULT16_16SU #define MULT16_16SU(a,b) _mpysu(a,b) #undef MULT_16_16 #define MULT_16_16(a,b) _mpy(a,b) #define celt_ilog2(x) (30 - _norm(x)) #define OVERRIDE_CELT_ILOG2 #undef MULT16_32_Q15 #define MULT16_32_Q15(a,b) (_mpylill(a, b) >> 15) #if 0 #include "dsplib.h" #undef MAX16 #define MAX16(a,b) _max(a,b) #undef MIN16 #define MIN16(a,b) _min(a,b) #undef MAX32 #define MAX32(a,b) _lmax(a,b) #undef MIN32 #define MIN32(a,b) _lmin(a,b) #undef VSHR32 #define VSHR32(a, shift) _lshl(a,-(shift)) #undef MULT16_16_Q15 #define MULT16_16_Q15(a,b) (_smpy(a,b)) #define celt_maxabs16(x, len) MAX32(EXTEND32(maxval((DATA *)x, len)),-EXTEND32(minval((DATA *)x, len))) #define OVERRIDE_CELT_MAXABS16 #endif /* FIXED_C6X_H */ opus-1.1.2/celt/fixed_debug.h000066400000000000000000000503671264527674100160770ustar00rootroot00000000000000/* Copyright (C) 2003-2008 Jean-Marc Valin Copyright (C) 2007-2012 Xiph.Org Foundation */ /** @file fixed_debug.h @brief Fixed-point operations with debugging */ /* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - 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. 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 OWNER 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. */ #ifndef FIXED_DEBUG_H #define FIXED_DEBUG_H #include #include "opus_defines.h" #ifdef CELT_C OPUS_EXPORT opus_int64 celt_mips=0; #else extern opus_int64 celt_mips; #endif #define MULT16_16SU(a,b) ((opus_val32)(opus_val16)(a)*(opus_val32)(opus_uint16)(b)) #define MULT32_32_Q31(a,b) ADD32(ADD32(SHL32(MULT16_16(SHR32((a),16),SHR((b),16)),1), SHR32(MULT16_16SU(SHR32((a),16),((b)&0x0000ffff)),15)), SHR32(MULT16_16SU(SHR32((b),16),((a)&0x0000ffff)),15)) /** 16x32 multiplication, followed by a 16-bit shift right. Results fits in 32 bits */ #define MULT16_32_Q16(a,b) ADD32(MULT16_16((a),SHR32((b),16)), SHR32(MULT16_16SU((a),((b)&0x0000ffff)),16)) #define MULT16_32_P16(a,b) MULT16_32_PX(a,b,16) #define QCONST16(x,bits) ((opus_val16)(.5+(x)*(((opus_val32)1)<<(bits)))) #define QCONST32(x,bits) ((opus_val32)(.5+(x)*(((opus_val32)1)<<(bits)))) #define VERIFY_SHORT(x) ((x)<=32767&&(x)>=-32768) #define VERIFY_INT(x) ((x)<=2147483647LL&&(x)>=-2147483648LL) #define VERIFY_UINT(x) ((x)<=(2147483647LLU<<1)) #define SHR(a,b) SHR32(a,b) #define PSHR(a,b) PSHR32(a,b) static OPUS_INLINE short NEG16(int x) { int res; if (!VERIFY_SHORT(x)) { fprintf (stderr, "NEG16: input is not short: %d\n", (int)x); #ifdef FIXED_DEBUG_ASSERT celt_assert(0); #endif } res = -x; if (!VERIFY_SHORT(res)) { fprintf (stderr, "NEG16: output is not short: %d\n", (int)res); #ifdef FIXED_DEBUG_ASSERT celt_assert(0); #endif } celt_mips++; return res; } static OPUS_INLINE int NEG32(opus_int64 x) { opus_int64 res; if (!VERIFY_INT(x)) { fprintf (stderr, "NEG16: input is not int: %d\n", (int)x); #ifdef FIXED_DEBUG_ASSERT celt_assert(0); #endif } res = -x; if (!VERIFY_INT(res)) { fprintf (stderr, "NEG16: output is not int: %d\n", (int)res); #ifdef FIXED_DEBUG_ASSERT celt_assert(0); #endif } celt_mips+=2; return res; } #define EXTRACT16(x) EXTRACT16_(x, __FILE__, __LINE__) static OPUS_INLINE short EXTRACT16_(int x, char *file, int line) { int res; if (!VERIFY_SHORT(x)) { fprintf (stderr, "EXTRACT16: input is not short: %d in %s: line %d\n", x, file, line); #ifdef FIXED_DEBUG_ASSERT celt_assert(0); #endif } res = x; celt_mips++; return res; } #define EXTEND32(x) EXTEND32_(x, __FILE__, __LINE__) static OPUS_INLINE int EXTEND32_(int x, char *file, int line) { int res; if (!VERIFY_SHORT(x)) { fprintf (stderr, "EXTEND32: input is not short: %d in %s: line %d\n", x, file, line); #ifdef FIXED_DEBUG_ASSERT celt_assert(0); #endif } res = x; celt_mips++; return res; } #define SHR16(a, shift) SHR16_(a, shift, __FILE__, __LINE__) static OPUS_INLINE short SHR16_(int a, int shift, char *file, int line) { int res; if (!VERIFY_SHORT(a) || !VERIFY_SHORT(shift)) { fprintf (stderr, "SHR16: inputs are not short: %d >> %d in %s: line %d\n", a, shift, file, line); #ifdef FIXED_DEBUG_ASSERT celt_assert(0); #endif } res = a>>shift; if (!VERIFY_SHORT(res)) { fprintf (stderr, "SHR16: output is not short: %d in %s: line %d\n", res, file, line); #ifdef FIXED_DEBUG_ASSERT celt_assert(0); #endif } celt_mips++; return res; } #define SHL16(a, shift) SHL16_(a, shift, __FILE__, __LINE__) static OPUS_INLINE short SHL16_(int a, int shift, char *file, int line) { int res; if (!VERIFY_SHORT(a) || !VERIFY_SHORT(shift)) { fprintf (stderr, "SHL16: inputs are not short: %d %d in %s: line %d\n", a, shift, file, line); #ifdef FIXED_DEBUG_ASSERT celt_assert(0); #endif } res = a<>shift; if (!VERIFY_INT(res)) { fprintf (stderr, "SHR32: output is not int: %d\n", (int)res); #ifdef FIXED_DEBUG_ASSERT celt_assert(0); #endif } celt_mips+=2; return res; } #define SHL32(a, shift) SHL32_(a, shift, __FILE__, __LINE__) static OPUS_INLINE int SHL32_(opus_int64 a, int shift, char *file, int line) { opus_int64 res; if (!VERIFY_INT(a) || !VERIFY_SHORT(shift)) { fprintf (stderr, "SHL32: inputs are not int: %lld %d in %s: line %d\n", a, shift, file, line); #ifdef FIXED_DEBUG_ASSERT celt_assert(0); #endif } res = a<>1))),shift)) #define VSHR32(a, shift) (((shift)>0) ? SHR32(a, shift) : SHL32(a, -(shift))) #define ROUND16(x,a) (celt_mips--,EXTRACT16(PSHR32((x),(a)))) #define HALF16(x) (SHR16(x,1)) #define HALF32(x) (SHR32(x,1)) //#define SHR(a,shift) ((a) >> (shift)) //#define SHL(a,shift) ((a) << (shift)) #define ADD16(a, b) ADD16_(a, b, __FILE__, __LINE__) static OPUS_INLINE short ADD16_(int a, int b, char *file, int line) { int res; if (!VERIFY_SHORT(a) || !VERIFY_SHORT(b)) { fprintf (stderr, "ADD16: inputs are not short: %d %d in %s: line %d\n", a, b, file, line); #ifdef FIXED_DEBUG_ASSERT celt_assert(0); #endif } res = a+b; if (!VERIFY_SHORT(res)) { fprintf (stderr, "ADD16: output is not short: %d+%d=%d in %s: line %d\n", a,b,res, file, line); #ifdef FIXED_DEBUG_ASSERT celt_assert(0); #endif } celt_mips++; return res; } #define SUB16(a, b) SUB16_(a, b, __FILE__, __LINE__) static OPUS_INLINE short SUB16_(int a, int b, char *file, int line) { int res; if (!VERIFY_SHORT(a) || !VERIFY_SHORT(b)) { fprintf (stderr, "SUB16: inputs are not short: %d %d in %s: line %d\n", a, b, file, line); #ifdef FIXED_DEBUG_ASSERT celt_assert(0); #endif } res = a-b; if (!VERIFY_SHORT(res)) { fprintf (stderr, "SUB16: output is not short: %d in %s: line %d\n", res, file, line); #ifdef FIXED_DEBUG_ASSERT celt_assert(0); #endif } celt_mips++; return res; } #define ADD32(a, b) ADD32_(a, b, __FILE__, __LINE__) static OPUS_INLINE int ADD32_(opus_int64 a, opus_int64 b, char *file, int line) { opus_int64 res; if (!VERIFY_INT(a) || !VERIFY_INT(b)) { fprintf (stderr, "ADD32: inputs are not int: %d %d in %s: line %d\n", (int)a, (int)b, file, line); #ifdef FIXED_DEBUG_ASSERT celt_assert(0); #endif } res = a+b; if (!VERIFY_INT(res)) { fprintf (stderr, "ADD32: output is not int: %d in %s: line %d\n", (int)res, file, line); #ifdef FIXED_DEBUG_ASSERT celt_assert(0); #endif } celt_mips+=2; return res; } #define SUB32(a, b) SUB32_(a, b, __FILE__, __LINE__) static OPUS_INLINE int SUB32_(opus_int64 a, opus_int64 b, char *file, int line) { opus_int64 res; if (!VERIFY_INT(a) || !VERIFY_INT(b)) { fprintf (stderr, "SUB32: inputs are not int: %d %d in %s: line %d\n", (int)a, (int)b, file, line); #ifdef FIXED_DEBUG_ASSERT celt_assert(0); #endif } res = a-b; if (!VERIFY_INT(res)) { fprintf (stderr, "SUB32: output is not int: %d in %s: line %d\n", (int)res, file, line); #ifdef FIXED_DEBUG_ASSERT celt_assert(0); #endif } celt_mips+=2; return res; } #undef UADD32 #define UADD32(a, b) UADD32_(a, b, __FILE__, __LINE__) static OPUS_INLINE unsigned int UADD32_(opus_uint64 a, opus_uint64 b, char *file, int line) { opus_uint64 res; if (!VERIFY_UINT(a) || !VERIFY_UINT(b)) { fprintf (stderr, "UADD32: inputs are not uint32: %llu %llu in %s: line %d\n", a, b, file, line); #ifdef FIXED_DEBUG_ASSERT celt_assert(0); #endif } res = a+b; if (!VERIFY_UINT(res)) { fprintf (stderr, "UADD32: output is not uint32: %llu in %s: line %d\n", res, file, line); #ifdef FIXED_DEBUG_ASSERT celt_assert(0); #endif } celt_mips+=2; return res; } #undef USUB32 #define USUB32(a, b) USUB32_(a, b, __FILE__, __LINE__) static OPUS_INLINE unsigned int USUB32_(opus_uint64 a, opus_uint64 b, char *file, int line) { opus_uint64 res; if (!VERIFY_UINT(a) || !VERIFY_UINT(b)) { fprintf (stderr, "USUB32: inputs are not uint32: %llu %llu in %s: line %d\n", a, b, file, line); #ifdef FIXED_DEBUG_ASSERT celt_assert(0); #endif } if (a=((opus_val32)(1)<<(15+Q))) { fprintf (stderr, "MULT16_32_Q%d: second operand too large: %d %d in %s: line %d\n", Q, (int)a, (int)b, file, line); #ifdef FIXED_DEBUG_ASSERT celt_assert(0); #endif } res = (((opus_int64)a)*(opus_int64)b) >> Q; if (!VERIFY_INT(res)) { fprintf (stderr, "MULT16_32_Q%d: output is not int: %d*%d=%d in %s: line %d\n", Q, (int)a, (int)b,(int)res, file, line); #ifdef FIXED_DEBUG_ASSERT celt_assert(0); #endif } if (Q==15) celt_mips+=3; else celt_mips+=4; return res; } #define MULT16_32_PX(a, b, Q) MULT16_32_PX_(a, b, Q, __FILE__, __LINE__) static OPUS_INLINE int MULT16_32_PX_(int a, opus_int64 b, int Q, char *file, int line) { opus_int64 res; if (!VERIFY_SHORT(a) || !VERIFY_INT(b)) { fprintf (stderr, "MULT16_32_P%d: inputs are not short+int: %d %d in %s: line %d\n\n", Q, (int)a, (int)b, file, line); #ifdef FIXED_DEBUG_ASSERT celt_assert(0); #endif } if (ABS32(b)>=((opus_int64)(1)<<(15+Q))) { fprintf (stderr, "MULT16_32_Q%d: second operand too large: %d %d in %s: line %d\n\n", Q, (int)a, (int)b,file, line); #ifdef FIXED_DEBUG_ASSERT celt_assert(0); #endif } res = ((((opus_int64)a)*(opus_int64)b) + (((opus_val32)(1)<>1))>> Q; if (!VERIFY_INT(res)) { fprintf (stderr, "MULT16_32_P%d: output is not int: %d*%d=%d in %s: line %d\n\n", Q, (int)a, (int)b,(int)res, file, line); #ifdef FIXED_DEBUG_ASSERT celt_assert(0); #endif } if (Q==15) celt_mips+=4; else celt_mips+=5; return res; } #define MULT16_32_Q15(a,b) MULT16_32_QX(a,b,15) #define MAC16_32_Q15(c,a,b) (celt_mips-=2,ADD32((c),MULT16_32_Q15((a),(b)))) #define MAC16_32_Q16(c,a,b) (celt_mips-=2,ADD32((c),MULT16_32_Q16((a),(b)))) static OPUS_INLINE int SATURATE(int a, int b) { if (a>b) a=b; if (a<-b) a = -b; celt_mips+=3; return a; } static OPUS_INLINE opus_int16 SATURATE16(opus_int32 a) { celt_mips+=3; if (a>32767) return 32767; else if (a<-32768) return -32768; else return a; } static OPUS_INLINE int MULT16_16_Q11_32(int a, int b) { opus_int64 res; if (!VERIFY_SHORT(a) || !VERIFY_SHORT(b)) { fprintf (stderr, "MULT16_16_Q11: inputs are not short: %d %d\n", a, b); #ifdef FIXED_DEBUG_ASSERT celt_assert(0); #endif } res = ((opus_int64)a)*b; res >>= 11; if (!VERIFY_INT(res)) { fprintf (stderr, "MULT16_16_Q11: output is not short: %d*%d=%d\n", (int)a, (int)b, (int)res); #ifdef FIXED_DEBUG_ASSERT celt_assert(0); #endif } celt_mips+=3; return res; } static OPUS_INLINE short MULT16_16_Q13(int a, int b) { opus_int64 res; if (!VERIFY_SHORT(a) || !VERIFY_SHORT(b)) { fprintf (stderr, "MULT16_16_Q13: inputs are not short: %d %d\n", a, b); #ifdef FIXED_DEBUG_ASSERT celt_assert(0); #endif } res = ((opus_int64)a)*b; res >>= 13; if (!VERIFY_SHORT(res)) { fprintf (stderr, "MULT16_16_Q13: output is not short: %d*%d=%d\n", a, b, (int)res); #ifdef FIXED_DEBUG_ASSERT celt_assert(0); #endif } celt_mips+=3; return res; } static OPUS_INLINE short MULT16_16_Q14(int a, int b) { opus_int64 res; if (!VERIFY_SHORT(a) || !VERIFY_SHORT(b)) { fprintf (stderr, "MULT16_16_Q14: inputs are not short: %d %d\n", a, b); #ifdef FIXED_DEBUG_ASSERT celt_assert(0); #endif } res = ((opus_int64)a)*b; res >>= 14; if (!VERIFY_SHORT(res)) { fprintf (stderr, "MULT16_16_Q14: output is not short: %d\n", (int)res); #ifdef FIXED_DEBUG_ASSERT celt_assert(0); #endif } celt_mips+=3; return res; } #define MULT16_16_Q15(a, b) MULT16_16_Q15_(a, b, __FILE__, __LINE__) static OPUS_INLINE short MULT16_16_Q15_(int a, int b, char *file, int line) { opus_int64 res; if (!VERIFY_SHORT(a) || !VERIFY_SHORT(b)) { fprintf (stderr, "MULT16_16_Q15: inputs are not short: %d %d in %s: line %d\n", a, b, file, line); #ifdef FIXED_DEBUG_ASSERT celt_assert(0); #endif } res = ((opus_int64)a)*b; res >>= 15; if (!VERIFY_SHORT(res)) { fprintf (stderr, "MULT16_16_Q15: output is not short: %d in %s: line %d\n", (int)res, file, line); #ifdef FIXED_DEBUG_ASSERT celt_assert(0); #endif } celt_mips+=1; return res; } static OPUS_INLINE short MULT16_16_P13(int a, int b) { opus_int64 res; if (!VERIFY_SHORT(a) || !VERIFY_SHORT(b)) { fprintf (stderr, "MULT16_16_P13: inputs are not short: %d %d\n", a, b); #ifdef FIXED_DEBUG_ASSERT celt_assert(0); #endif } res = ((opus_int64)a)*b; res += 4096; if (!VERIFY_INT(res)) { fprintf (stderr, "MULT16_16_P13: overflow: %d*%d=%d\n", a, b, (int)res); #ifdef FIXED_DEBUG_ASSERT celt_assert(0); #endif } res >>= 13; if (!VERIFY_SHORT(res)) { fprintf (stderr, "MULT16_16_P13: output is not short: %d*%d=%d\n", a, b, (int)res); #ifdef FIXED_DEBUG_ASSERT celt_assert(0); #endif } celt_mips+=4; return res; } static OPUS_INLINE short MULT16_16_P14(int a, int b) { opus_int64 res; if (!VERIFY_SHORT(a) || !VERIFY_SHORT(b)) { fprintf (stderr, "MULT16_16_P14: inputs are not short: %d %d\n", a, b); #ifdef FIXED_DEBUG_ASSERT celt_assert(0); #endif } res = ((opus_int64)a)*b; res += 8192; if (!VERIFY_INT(res)) { fprintf (stderr, "MULT16_16_P14: overflow: %d*%d=%d\n", a, b, (int)res); #ifdef FIXED_DEBUG_ASSERT celt_assert(0); #endif } res >>= 14; if (!VERIFY_SHORT(res)) { fprintf (stderr, "MULT16_16_P14: output is not short: %d*%d=%d\n", a, b, (int)res); #ifdef FIXED_DEBUG_ASSERT celt_assert(0); #endif } celt_mips+=4; return res; } static OPUS_INLINE short MULT16_16_P15(int a, int b) { opus_int64 res; if (!VERIFY_SHORT(a) || !VERIFY_SHORT(b)) { fprintf (stderr, "MULT16_16_P15: inputs are not short: %d %d\n", a, b); #ifdef FIXED_DEBUG_ASSERT celt_assert(0); #endif } res = ((opus_int64)a)*b; res += 16384; if (!VERIFY_INT(res)) { fprintf (stderr, "MULT16_16_P15: overflow: %d*%d=%d\n", a, b, (int)res); #ifdef FIXED_DEBUG_ASSERT celt_assert(0); #endif } res >>= 15; if (!VERIFY_SHORT(res)) { fprintf (stderr, "MULT16_16_P15: output is not short: %d*%d=%d\n", a, b, (int)res); #ifdef FIXED_DEBUG_ASSERT celt_assert(0); #endif } celt_mips+=2; return res; } #define DIV32_16(a, b) DIV32_16_(a, b, __FILE__, __LINE__) static OPUS_INLINE int DIV32_16_(opus_int64 a, opus_int64 b, char *file, int line) { opus_int64 res; if (b==0) { fprintf(stderr, "DIV32_16: divide by zero: %d/%d in %s: line %d\n", (int)a, (int)b, file, line); #ifdef FIXED_DEBUG_ASSERT celt_assert(0); #endif return 0; } if (!VERIFY_INT(a) || !VERIFY_SHORT(b)) { fprintf (stderr, "DIV32_16: inputs are not int/short: %d %d in %s: line %d\n", (int)a, (int)b, file, line); #ifdef FIXED_DEBUG_ASSERT celt_assert(0); #endif } res = a/b; if (!VERIFY_SHORT(res)) { fprintf (stderr, "DIV32_16: output is not short: %d / %d = %d in %s: line %d\n", (int)a,(int)b,(int)res, file, line); if (res>32767) res = 32767; if (res<-32768) res = -32768; #ifdef FIXED_DEBUG_ASSERT celt_assert(0); #endif } celt_mips+=35; return res; } #define DIV32(a, b) DIV32_(a, b, __FILE__, __LINE__) static OPUS_INLINE int DIV32_(opus_int64 a, opus_int64 b, char *file, int line) { opus_int64 res; if (b==0) { fprintf(stderr, "DIV32: divide by zero: %d/%d in %s: line %d\n", (int)a, (int)b, file, line); #ifdef FIXED_DEBUG_ASSERT celt_assert(0); #endif return 0; } if (!VERIFY_INT(a) || !VERIFY_INT(b)) { fprintf (stderr, "DIV32: inputs are not int/short: %d %d in %s: line %d\n", (int)a, (int)b, file, line); #ifdef FIXED_DEBUG_ASSERT celt_assert(0); #endif } res = a/b; if (!VERIFY_INT(res)) { fprintf (stderr, "DIV32: output is not int: %d in %s: line %d\n", (int)res, file, line); #ifdef FIXED_DEBUG_ASSERT celt_assert(0); #endif } celt_mips+=70; return res; } static OPUS_INLINE opus_val16 SIG2WORD16_generic(celt_sig x) { x = PSHR32(x, SIG_SHIFT); x = MAX32(x, -32768); x = MIN32(x, 32767); return EXTRACT16(x); } #define SIG2WORD16(x) (SIG2WORD16_generic(x)) #undef PRINT_MIPS #define PRINT_MIPS(file) do {fprintf (file, "total complexity = %llu MIPS\n", celt_mips);} while (0); #endif opus-1.1.2/celt/fixed_generic.h000066400000000000000000000153521264527674100164200ustar00rootroot00000000000000/* Copyright (C) 2007-2009 Xiph.Org Foundation Copyright (C) 2003-2008 Jean-Marc Valin Copyright (C) 2007-2008 CSIRO */ /** @file fixed_generic.h @brief Generic fixed-point operations */ /* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - 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. 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 OWNER 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. */ #ifndef FIXED_GENERIC_H #define FIXED_GENERIC_H /** Multiply a 16-bit signed value by a 16-bit unsigned value. The result is a 32-bit signed value */ #define MULT16_16SU(a,b) ((opus_val32)(opus_val16)(a)*(opus_val32)(opus_uint16)(b)) /** 16x32 multiplication, followed by a 16-bit shift right. Results fits in 32 bits */ #define MULT16_32_Q16(a,b) ADD32(MULT16_16((a),SHR((b),16)), SHR(MULT16_16SU((a),((b)&0x0000ffff)),16)) /** 16x32 multiplication, followed by a 16-bit shift right (round-to-nearest). Results fits in 32 bits */ #define MULT16_32_P16(a,b) ADD32(MULT16_16((a),SHR((b),16)), PSHR(MULT16_16SU((a),((b)&0x0000ffff)),16)) /** 16x32 multiplication, followed by a 15-bit shift right. Results fits in 32 bits */ #define MULT16_32_Q15(a,b) ADD32(SHL(MULT16_16((a),SHR((b),16)),1), SHR(MULT16_16SU((a),((b)&0x0000ffff)),15)) /** 32x32 multiplication, followed by a 31-bit shift right. Results fits in 32 bits */ #define MULT32_32_Q31(a,b) ADD32(ADD32(SHL(MULT16_16(SHR((a),16),SHR((b),16)),1), SHR(MULT16_16SU(SHR((a),16),((b)&0x0000ffff)),15)), SHR(MULT16_16SU(SHR((b),16),((a)&0x0000ffff)),15)) /** Compile-time conversion of float constant to 16-bit value */ #define QCONST16(x,bits) ((opus_val16)(.5+(x)*(((opus_val32)1)<<(bits)))) /** Compile-time conversion of float constant to 32-bit value */ #define QCONST32(x,bits) ((opus_val32)(.5+(x)*(((opus_val32)1)<<(bits)))) /** Negate a 16-bit value */ #define NEG16(x) (-(x)) /** Negate a 32-bit value */ #define NEG32(x) (-(x)) /** Change a 32-bit value into a 16-bit value. The value is assumed to fit in 16-bit, otherwise the result is undefined */ #define EXTRACT16(x) ((opus_val16)(x)) /** Change a 16-bit value into a 32-bit value */ #define EXTEND32(x) ((opus_val32)(x)) /** Arithmetic shift-right of a 16-bit value */ #define SHR16(a,shift) ((a) >> (shift)) /** Arithmetic shift-left of a 16-bit value */ #define SHL16(a,shift) ((opus_int16)((opus_uint16)(a)<<(shift))) /** Arithmetic shift-right of a 32-bit value */ #define SHR32(a,shift) ((a) >> (shift)) /** Arithmetic shift-left of a 32-bit value */ #define SHL32(a,shift) ((opus_int32)((opus_uint32)(a)<<(shift))) /** 32-bit arithmetic shift right with rounding-to-nearest instead of rounding down */ #define PSHR32(a,shift) (SHR32((a)+((EXTEND32(1)<<((shift))>>1)),shift)) /** 32-bit arithmetic shift right where the argument can be negative */ #define VSHR32(a, shift) (((shift)>0) ? SHR32(a, shift) : SHL32(a, -(shift))) /** "RAW" macros, should not be used outside of this header file */ #define SHR(a,shift) ((a) >> (shift)) #define SHL(a,shift) SHL32(a,shift) #define PSHR(a,shift) (SHR((a)+((EXTEND32(1)<<((shift))>>1)),shift)) #define SATURATE(x,a) (((x)>(a) ? (a) : (x)<-(a) ? -(a) : (x))) #define SATURATE16(x) (EXTRACT16((x)>32767 ? 32767 : (x)<-32768 ? -32768 : (x))) /** Shift by a and round-to-neareast 32-bit value. Result is a 16-bit value */ #define ROUND16(x,a) (EXTRACT16(PSHR32((x),(a)))) /** Divide by two */ #define HALF16(x) (SHR16(x,1)) #define HALF32(x) (SHR32(x,1)) /** Add two 16-bit values */ #define ADD16(a,b) ((opus_val16)((opus_val16)(a)+(opus_val16)(b))) /** Subtract two 16-bit values */ #define SUB16(a,b) ((opus_val16)(a)-(opus_val16)(b)) /** Add two 32-bit values */ #define ADD32(a,b) ((opus_val32)(a)+(opus_val32)(b)) /** Subtract two 32-bit values */ #define SUB32(a,b) ((opus_val32)(a)-(opus_val32)(b)) /** 16x16 multiplication where the result fits in 16 bits */ #define MULT16_16_16(a,b) ((((opus_val16)(a))*((opus_val16)(b)))) /* (opus_val32)(opus_val16) gives TI compiler a hint that it's 16x16->32 multiply */ /** 16x16 multiplication where the result fits in 32 bits */ #define MULT16_16(a,b) (((opus_val32)(opus_val16)(a))*((opus_val32)(opus_val16)(b))) /** 16x16 multiply-add where the result fits in 32 bits */ #define MAC16_16(c,a,b) (ADD32((c),MULT16_16((a),(b)))) /** 16x32 multiply, followed by a 15-bit shift right and 32-bit add. b must fit in 31 bits. Result fits in 32 bits. */ #define MAC16_32_Q15(c,a,b) ADD32((c),ADD32(MULT16_16((a),SHR((b),15)), SHR(MULT16_16((a),((b)&0x00007fff)),15))) /** 16x32 multiplication, followed by a 16-bit shift right and 32-bit add. Results fits in 32 bits */ #define MAC16_32_Q16(c,a,b) ADD32((c),ADD32(MULT16_16((a),SHR((b),16)), SHR(MULT16_16SU((a),((b)&0x0000ffff)),16))) #define MULT16_16_Q11_32(a,b) (SHR(MULT16_16((a),(b)),11)) #define MULT16_16_Q11(a,b) (SHR(MULT16_16((a),(b)),11)) #define MULT16_16_Q13(a,b) (SHR(MULT16_16((a),(b)),13)) #define MULT16_16_Q14(a,b) (SHR(MULT16_16((a),(b)),14)) #define MULT16_16_Q15(a,b) (SHR(MULT16_16((a),(b)),15)) #define MULT16_16_P13(a,b) (SHR(ADD32(4096,MULT16_16((a),(b))),13)) #define MULT16_16_P14(a,b) (SHR(ADD32(8192,MULT16_16((a),(b))),14)) #define MULT16_16_P15(a,b) (SHR(ADD32(16384,MULT16_16((a),(b))),15)) /** Divide a 32-bit value by a 16-bit value. Result fits in 16 bits */ #define DIV32_16(a,b) ((opus_val16)(((opus_val32)(a))/((opus_val16)(b)))) /** Divide a 32-bit value by a 32-bit value. Result fits in 32 bits */ #define DIV32(a,b) (((opus_val32)(a))/((opus_val32)(b))) #if defined(MIPSr1_ASM) #include "mips/fixed_generic_mipsr1.h" #endif static OPUS_INLINE opus_val16 SIG2WORD16_generic(celt_sig x) { x = PSHR32(x, SIG_SHIFT); x = MAX32(x, -32768); x = MIN32(x, 32767); return EXTRACT16(x); } #define SIG2WORD16(x) (SIG2WORD16_generic(x)) #endif opus-1.1.2/celt/float_cast.h000066400000000000000000000112311264527674100157340ustar00rootroot00000000000000/* Copyright (C) 2001 Erik de Castro Lopo */ /* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - 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. 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 OWNER 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. */ /* Version 1.1 */ #ifndef FLOAT_CAST_H #define FLOAT_CAST_H #include "arch.h" /*============================================================================ ** On Intel Pentium processors (especially PIII and probably P4), converting ** from float to int is very slow. To meet the C specs, the code produced by ** most C compilers targeting Pentium needs to change the FPU rounding mode ** before the float to int conversion is performed. ** ** Changing the FPU rounding mode causes the FPU pipeline to be flushed. It ** is this flushing of the pipeline which is so slow. ** ** Fortunately the ISO C99 specifications define the functions lrint, lrintf, ** llrint and llrintf which fix this problem as a side effect. ** ** On Unix-like systems, the configure process should have detected the ** presence of these functions. If they weren't found we have to replace them ** here with a standard C cast. */ /* ** The C99 prototypes for lrint and lrintf are as follows: ** ** long int lrintf (float x) ; ** long int lrint (double x) ; */ /* The presence of the required functions are detected during the configure ** process and the values HAVE_LRINT and HAVE_LRINTF are set accordingly in ** the config.h file. */ #if (HAVE_LRINTF) /* These defines enable functionality introduced with the 1999 ISO C ** standard. They must be defined before the inclusion of math.h to ** engage them. If optimisation is enabled, these functions will be ** inlined. With optimisation switched off, you have to link in the ** maths library using -lm. */ #define _ISOC9X_SOURCE 1 #define _ISOC99_SOURCE 1 #define __USE_ISOC9X 1 #define __USE_ISOC99 1 #include #define float2int(x) lrintf(x) #elif (defined(HAVE_LRINT)) #define _ISOC9X_SOURCE 1 #define _ISOC99_SOURCE 1 #define __USE_ISOC9X 1 #define __USE_ISOC99 1 #include #define float2int(x) lrint(x) #elif (defined(_MSC_VER) && _MSC_VER >= 1400) && defined (_M_X64) #include __inline long int float2int(float value) { return _mm_cvtss_si32(_mm_load_ss(&value)); } #elif (defined(_MSC_VER) && _MSC_VER >= 1400) && defined (_M_IX86) #include /* Win32 doesn't seem to have these functions. ** Therefore implement OPUS_INLINE versions of these functions here. */ __inline long int float2int (float flt) { int intgr; _asm { fld flt fistp intgr } ; return intgr ; } #else #if (defined(__GNUC__) && defined(__STDC__) && __STDC__ && __STDC_VERSION__ >= 199901L) /* supported by gcc in C99 mode, but not by all other compilers */ #warning "Don't have the functions lrint() and lrintf ()." #warning "Replacing these functions with a standard C cast." #endif /* __STDC_VERSION__ >= 199901L */ #include #define float2int(flt) ((int)(floor(.5+flt))) #endif #ifndef DISABLE_FLOAT_API static OPUS_INLINE opus_int16 FLOAT2INT16(float x) { x = x*CELT_SIG_SCALE; x = MAX32(x, -32768); x = MIN32(x, 32767); return (opus_int16)float2int(x); } #endif /* DISABLE_FLOAT_API */ #endif /* FLOAT_CAST_H */ opus-1.1.2/celt/kiss_fft.c000066400000000000000000000401721264527674100154260ustar00rootroot00000000000000/*Copyright (c) 2003-2004, Mark Borgerding Lots of modifications by Jean-Marc Valin Copyright (c) 2005-2007, Xiph.Org Foundation Copyright (c) 2008, Xiph.Org Foundation, CSIRO All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * 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. 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 OWNER 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.*/ /* This code is originally from Mark Borgerding's KISS-FFT but has been heavily modified to better suit Opus */ #ifndef SKIP_CONFIG_H # ifdef HAVE_CONFIG_H # include "config.h" # endif #endif #include "_kiss_fft_guts.h" #include "arch.h" #include "os_support.h" #include "mathops.h" #include "stack_alloc.h" /* The guts header contains all the multiplication and addition macros that are defined for complex numbers. It also delares the kf_ internal functions. */ static void kf_bfly2( kiss_fft_cpx * Fout, int m, int N ) { kiss_fft_cpx * Fout2; int i; (void)m; #ifdef CUSTOM_MODES if (m==1) { celt_assert(m==1); for (i=0;itwiddles; /* m is guaranteed to be a multiple of 4. */ for (j=0;jtwiddles[fstride*m]; #endif for (i=0;itwiddles; /* For non-custom modes, m is guaranteed to be a multiple of 4. */ k=m; do { C_MUL(scratch[1],Fout[m] , *tw1); C_MUL(scratch[2],Fout[m2] , *tw2); C_ADD(scratch[3],scratch[1],scratch[2]); C_SUB(scratch[0],scratch[1],scratch[2]); tw1 += fstride; tw2 += fstride*2; Fout[m].r = Fout->r - HALF_OF(scratch[3].r); Fout[m].i = Fout->i - HALF_OF(scratch[3].i); C_MULBYSCALAR( scratch[0] , epi3.i ); C_ADDTO(*Fout,scratch[3]); Fout[m2].r = Fout[m].r + scratch[0].i; Fout[m2].i = Fout[m].i - scratch[0].r; Fout[m].r -= scratch[0].i; Fout[m].i += scratch[0].r; ++Fout; } while(--k); } } #ifndef OVERRIDE_kf_bfly5 static void kf_bfly5( kiss_fft_cpx * Fout, const size_t fstride, const kiss_fft_state *st, int m, int N, int mm ) { kiss_fft_cpx *Fout0,*Fout1,*Fout2,*Fout3,*Fout4; int i, u; kiss_fft_cpx scratch[13]; const kiss_twiddle_cpx *tw; kiss_twiddle_cpx ya,yb; kiss_fft_cpx * Fout_beg = Fout; #ifdef FIXED_POINT ya.r = 10126; ya.i = -31164; yb.r = -26510; yb.i = -19261; #else ya = st->twiddles[fstride*m]; yb = st->twiddles[fstride*2*m]; #endif tw=st->twiddles; for (i=0;ir += scratch[7].r + scratch[8].r; Fout0->i += scratch[7].i + scratch[8].i; scratch[5].r = scratch[0].r + S_MUL(scratch[7].r,ya.r) + S_MUL(scratch[8].r,yb.r); scratch[5].i = scratch[0].i + S_MUL(scratch[7].i,ya.r) + S_MUL(scratch[8].i,yb.r); scratch[6].r = S_MUL(scratch[10].i,ya.i) + S_MUL(scratch[9].i,yb.i); scratch[6].i = -S_MUL(scratch[10].r,ya.i) - S_MUL(scratch[9].r,yb.i); C_SUB(*Fout1,scratch[5],scratch[6]); C_ADD(*Fout4,scratch[5],scratch[6]); scratch[11].r = scratch[0].r + S_MUL(scratch[7].r,yb.r) + S_MUL(scratch[8].r,ya.r); scratch[11].i = scratch[0].i + S_MUL(scratch[7].i,yb.r) + S_MUL(scratch[8].i,ya.r); scratch[12].r = - S_MUL(scratch[10].i,yb.i) + S_MUL(scratch[9].i,ya.i); scratch[12].i = S_MUL(scratch[10].r,yb.i) - S_MUL(scratch[9].r,ya.i); C_ADD(*Fout2,scratch[11],scratch[12]); C_SUB(*Fout3,scratch[11],scratch[12]); ++Fout0;++Fout1;++Fout2;++Fout3;++Fout4; } } } #endif /* OVERRIDE_kf_bfly5 */ #endif #ifdef CUSTOM_MODES static void compute_bitrev_table( int Fout, opus_int16 *f, const size_t fstride, int in_stride, opus_int16 * factors, const kiss_fft_state *st ) { const int p=*factors++; /* the radix */ const int m=*factors++; /* stage's fft length/p */ /*printf ("fft %d %d %d %d %d %d\n", p*m, m, p, s2, fstride*in_stride, N);*/ if (m==1) { int j; for (j=0;j32000 || (opus_int32)p*(opus_int32)p > n) p = n; /* no more factors, skip to end */ } n /= p; #ifdef RADIX_TWO_ONLY if (p!=2 && p != 4) #else if (p>5) #endif { return 0; } facbuf[2*stages] = p; if (p==2 && stages > 1) { facbuf[2*stages] = 4; facbuf[2] = 2; } stages++; } while (n > 1); n = nbak; /* Reverse the order to get the radix 4 at the end, so we can use the fast degenerate case. It turns out that reversing the order also improves the noise behaviour. */ for (i=0;i= memneeded) st = (kiss_fft_state*)mem; *lenmem = memneeded; } if (st) { opus_int16 *bitrev; kiss_twiddle_cpx *twiddles; st->nfft=nfft; #ifdef FIXED_POINT st->scale_shift = celt_ilog2(st->nfft); if (st->nfft == 1<scale_shift) st->scale = Q15ONE; else st->scale = (1073741824+st->nfft/2)/st->nfft>>(15-st->scale_shift); #else st->scale = 1.f/nfft; #endif if (base != NULL) { st->twiddles = base->twiddles; st->shift = 0; while (st->shift < 32 && nfft<shift != base->nfft) st->shift++; if (st->shift>=32) goto fail; } else { st->twiddles = twiddles = (kiss_twiddle_cpx*)KISS_FFT_MALLOC(sizeof(kiss_twiddle_cpx)*nfft); compute_twiddles(twiddles, nfft); st->shift = -1; } if (!kf_factor(nfft,st->factors)) { goto fail; } /* bitrev */ st->bitrev = bitrev = (opus_int16*)KISS_FFT_MALLOC(sizeof(opus_int16)*nfft); if (st->bitrev==NULL) goto fail; compute_bitrev_table(0, bitrev, 1,1, st->factors,st); /* Initialize architecture specific fft parameters */ if (opus_fft_alloc_arch(st, arch)) goto fail; } return st; fail: opus_fft_free(st, arch); return NULL; } kiss_fft_state *opus_fft_alloc(int nfft,void * mem,size_t * lenmem, int arch) { return opus_fft_alloc_twiddles(nfft, mem, lenmem, NULL, arch); } void opus_fft_free_arch_c(kiss_fft_state *st) { (void)st; } void opus_fft_free(const kiss_fft_state *cfg, int arch) { if (cfg) { opus_fft_free_arch((kiss_fft_state *)cfg, arch); opus_free((opus_int16*)cfg->bitrev); if (cfg->shift < 0) opus_free((kiss_twiddle_cpx*)cfg->twiddles); opus_free((kiss_fft_state*)cfg); } } #endif /* CUSTOM_MODES */ void opus_fft_impl(const kiss_fft_state *st,kiss_fft_cpx *fout) { int m2, m; int p; int L; int fstride[MAXFACTORS]; int i; int shift; /* st->shift can be -1 */ shift = st->shift>0 ? st->shift : 0; fstride[0] = 1; L=0; do { p = st->factors[2*L]; m = st->factors[2*L+1]; fstride[L+1] = fstride[L]*p; L++; } while(m!=1); m = st->factors[2*L-1]; for (i=L-1;i>=0;i--) { if (i!=0) m2 = st->factors[2*i-1]; else m2 = 1; switch (st->factors[2*i]) { case 2: kf_bfly2(fout, m, fstride[i]); break; case 4: kf_bfly4(fout,fstride[i]<scale_shift-1; #endif scale = st->scale; celt_assert2 (fin != fout, "In-place FFT not supported"); /* Bit-reverse the input */ for (i=0;infft;i++) { kiss_fft_cpx x = fin[i]; fout[st->bitrev[i]].r = SHR32(MULT16_32_Q16(scale, x.r), scale_shift); fout[st->bitrev[i]].i = SHR32(MULT16_32_Q16(scale, x.i), scale_shift); } opus_fft_impl(st, fout); } void opus_ifft_c(const kiss_fft_state *st,const kiss_fft_cpx *fin,kiss_fft_cpx *fout) { int i; celt_assert2 (fin != fout, "In-place FFT not supported"); /* Bit-reverse the input */ for (i=0;infft;i++) fout[st->bitrev[i]] = fin[i]; for (i=0;infft;i++) fout[i].i = -fout[i].i; opus_fft_impl(st, fout); for (i=0;infft;i++) fout[i].i = -fout[i].i; } opus-1.1.2/celt/kiss_fft.h000066400000000000000000000142271264527674100154350ustar00rootroot00000000000000/*Copyright (c) 2003-2004, Mark Borgerding Lots of modifications by Jean-Marc Valin Copyright (c) 2005-2007, Xiph.Org Foundation Copyright (c) 2008, Xiph.Org Foundation, CSIRO All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * 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. 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 OWNER 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.*/ #ifndef KISS_FFT_H #define KISS_FFT_H #include #include #include "arch.h" #include "cpu_support.h" #ifdef __cplusplus extern "C" { #endif #ifdef USE_SIMD # include # define kiss_fft_scalar __m128 #define KISS_FFT_MALLOC(nbytes) memalign(16,nbytes) #else #define KISS_FFT_MALLOC opus_alloc #endif #ifdef FIXED_POINT #include "arch.h" # define kiss_fft_scalar opus_int32 # define kiss_twiddle_scalar opus_int16 #else # ifndef kiss_fft_scalar /* default is float */ # define kiss_fft_scalar float # define kiss_twiddle_scalar float # define KF_SUFFIX _celt_single # endif #endif typedef struct { kiss_fft_scalar r; kiss_fft_scalar i; }kiss_fft_cpx; typedef struct { kiss_twiddle_scalar r; kiss_twiddle_scalar i; }kiss_twiddle_cpx; #define MAXFACTORS 8 /* e.g. an fft of length 128 has 4 factors as far as kissfft is concerned 4*4*4*2 */ typedef struct arch_fft_state{ int is_supported; void *priv; } arch_fft_state; typedef struct kiss_fft_state{ int nfft; opus_val16 scale; #ifdef FIXED_POINT int scale_shift; #endif int shift; opus_int16 factors[2*MAXFACTORS]; const opus_int16 *bitrev; const kiss_twiddle_cpx *twiddles; arch_fft_state *arch_fft; } kiss_fft_state; #if defined(HAVE_ARM_NE10) #include "arm/fft_arm.h" #endif /*typedef struct kiss_fft_state* kiss_fft_cfg;*/ /** * opus_fft_alloc * * Initialize a FFT (or IFFT) algorithm's cfg/state buffer. * * typical usage: kiss_fft_cfg mycfg=opus_fft_alloc(1024,0,NULL,NULL); * * The return value from fft_alloc is a cfg buffer used internally * by the fft routine or NULL. * * If lenmem is NULL, then opus_fft_alloc will allocate a cfg buffer using malloc. * The returned value should be free()d when done to avoid memory leaks. * * The state can be placed in a user supplied buffer 'mem': * If lenmem is not NULL and mem is not NULL and *lenmem is large enough, * then the function places the cfg in mem and the size used in *lenmem * and returns mem. * * If lenmem is not NULL and ( mem is NULL or *lenmem is not large enough), * then the function returns NULL and places the minimum cfg * buffer size in *lenmem. * */ kiss_fft_state *opus_fft_alloc_twiddles(int nfft,void * mem,size_t * lenmem, const kiss_fft_state *base, int arch); kiss_fft_state *opus_fft_alloc(int nfft,void * mem,size_t * lenmem, int arch); /** * opus_fft(cfg,in_out_buf) * * Perform an FFT on a complex input buffer. * for a forward FFT, * fin should be f[0] , f[1] , ... ,f[nfft-1] * fout will be F[0] , F[1] , ... ,F[nfft-1] * Note that each element is complex and can be accessed like f[k].r and f[k].i * */ void opus_fft_c(const kiss_fft_state *cfg,const kiss_fft_cpx *fin,kiss_fft_cpx *fout); void opus_ifft_c(const kiss_fft_state *cfg,const kiss_fft_cpx *fin,kiss_fft_cpx *fout); void opus_fft_impl(const kiss_fft_state *st,kiss_fft_cpx *fout); void opus_ifft_impl(const kiss_fft_state *st,kiss_fft_cpx *fout); void opus_fft_free(const kiss_fft_state *cfg, int arch); void opus_fft_free_arch_c(kiss_fft_state *st); int opus_fft_alloc_arch_c(kiss_fft_state *st); #if !defined(OVERRIDE_OPUS_FFT) /* Is run-time CPU detection enabled on this platform? */ #if defined(OPUS_HAVE_RTCD) && (defined(HAVE_ARM_NE10)) extern int (*const OPUS_FFT_ALLOC_ARCH_IMPL[OPUS_ARCHMASK+1])( kiss_fft_state *st); #define opus_fft_alloc_arch(_st, arch) \ ((*OPUS_FFT_ALLOC_ARCH_IMPL[(arch)&OPUS_ARCHMASK])(_st)) extern void (*const OPUS_FFT_FREE_ARCH_IMPL[OPUS_ARCHMASK+1])( kiss_fft_state *st); #define opus_fft_free_arch(_st, arch) \ ((*OPUS_FFT_FREE_ARCH_IMPL[(arch)&OPUS_ARCHMASK])(_st)) extern void (*const OPUS_FFT[OPUS_ARCHMASK+1])(const kiss_fft_state *cfg, const kiss_fft_cpx *fin, kiss_fft_cpx *fout); #define opus_fft(_cfg, _fin, _fout, arch) \ ((*OPUS_FFT[(arch)&OPUS_ARCHMASK])(_cfg, _fin, _fout)) extern void (*const OPUS_IFFT[OPUS_ARCHMASK+1])(const kiss_fft_state *cfg, const kiss_fft_cpx *fin, kiss_fft_cpx *fout); #define opus_ifft(_cfg, _fin, _fout, arch) \ ((*OPUS_IFFT[(arch)&OPUS_ARCHMASK])(_cfg, _fin, _fout)) #else /* else for if defined(OPUS_HAVE_RTCD) && (defined(HAVE_ARM_NE10)) */ #define opus_fft_alloc_arch(_st, arch) \ ((void)(arch), opus_fft_alloc_arch_c(_st)) #define opus_fft_free_arch(_st, arch) \ ((void)(arch), opus_fft_free_arch_c(_st)) #define opus_fft(_cfg, _fin, _fout, arch) \ ((void)(arch), opus_fft_c(_cfg, _fin, _fout)) #define opus_ifft(_cfg, _fin, _fout, arch) \ ((void)(arch), opus_ifft_c(_cfg, _fin, _fout)) #endif /* end if defined(OPUS_HAVE_RTCD) && (defined(HAVE_ARM_NE10)) */ #endif /* end if !defined(OVERRIDE_OPUS_FFT) */ #ifdef __cplusplus } #endif #endif opus-1.1.2/celt/laplace.c000066400000000000000000000076661264527674100152320ustar00rootroot00000000000000/* Copyright (c) 2007 CSIRO Copyright (c) 2007-2009 Xiph.Org Foundation Written by Jean-Marc Valin */ /* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - 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. 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 OWNER 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. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "laplace.h" #include "mathops.h" /* The minimum probability of an energy delta (out of 32768). */ #define LAPLACE_LOG_MINP (0) #define LAPLACE_MINP (1<>15; } void ec_laplace_encode(ec_enc *enc, int *value, unsigned fs, int decay) { unsigned fl; int val = *value; fl = 0; if (val) { int s; int i; s = -(val<0); val = (val+s)^s; fl = fs; fs = ec_laplace_get_freq1(fs, decay); /* Search the decaying part of the PDF.*/ for (i=1; fs > 0 && i < val; i++) { fs *= 2; fl += fs+2*LAPLACE_MINP; fs = (fs*(opus_int32)decay)>>15; } /* Everything beyond that has probability LAPLACE_MINP. */ if (!fs) { int di; int ndi_max; ndi_max = (32768-fl+LAPLACE_MINP-1)>>LAPLACE_LOG_MINP; ndi_max = (ndi_max-s)>>1; di = IMIN(val - i, ndi_max - 1); fl += (2*di+1+s)*LAPLACE_MINP; fs = IMIN(LAPLACE_MINP, 32768-fl); *value = (i+di+s)^s; } else { fs += LAPLACE_MINP; fl += fs&~s; } celt_assert(fl+fs<=32768); celt_assert(fs>0); } ec_encode_bin(enc, fl, fl+fs, 15); } int ec_laplace_decode(ec_dec *dec, unsigned fs, int decay) { int val=0; unsigned fl; unsigned fm; fm = ec_decode_bin(dec, 15); fl = 0; if (fm >= fs) { val++; fl = fs; fs = ec_laplace_get_freq1(fs, decay)+LAPLACE_MINP; /* Search the decaying part of the PDF.*/ while(fs > LAPLACE_MINP && fm >= fl+2*fs) { fs *= 2; fl += fs; fs = ((fs-2*LAPLACE_MINP)*(opus_int32)decay)>>15; fs += LAPLACE_MINP; val++; } /* Everything beyond that has probability LAPLACE_MINP. */ if (fs <= LAPLACE_MINP) { int di; di = (fm-fl)>>(LAPLACE_LOG_MINP+1); val += di; fl += 2*di*LAPLACE_MINP; } if (fm < fl+fs) val = -val; else fl += fs; } celt_assert(fl<32768); celt_assert(fs>0); celt_assert(fl<=fm); celt_assert(fm>1; b=1U<>=1; bshift--; } while(bshift>=0); return g; } #ifdef FIXED_POINT opus_val32 frac_div32(opus_val32 a, opus_val32 b) { opus_val16 rcp; opus_val32 result, rem; int shift = celt_ilog2(b)-29; a = VSHR32(a,shift); b = VSHR32(b,shift); /* 16-bit reciprocal */ rcp = ROUND16(celt_rcp(ROUND16(b,16)),3); result = MULT16_32_Q15(rcp, a); rem = PSHR32(a,2)-MULT32_32_Q31(result, b); result = ADD32(result, SHL32(MULT16_32_Q15(rcp, rem),2)); if (result >= 536870912) /* 2^29 */ return 2147483647; /* 2^31 - 1 */ else if (result <= -536870912) /* -2^29 */ return -2147483647; /* -2^31 */ else return SHL32(result, 2); } /** Reciprocal sqrt approximation in the range [0.25,1) (Q16 in, Q14 out) */ opus_val16 celt_rsqrt_norm(opus_val32 x) { opus_val16 n; opus_val16 r; opus_val16 r2; opus_val16 y; /* Range of n is [-16384,32767] ([-0.5,1) in Q15). */ n = x-32768; /* Get a rough initial guess for the root. The optimal minimax quadratic approximation (using relative error) is r = 1.437799046117536+n*(-0.823394375837328+n*0.4096419668459485). Coefficients here, and the final result r, are Q14.*/ r = ADD16(23557, MULT16_16_Q15(n, ADD16(-13490, MULT16_16_Q15(n, 6713)))); /* We want y = x*r*r-1 in Q15, but x is 32-bit Q16 and r is Q14. We can compute the result from n and r using Q15 multiplies with some adjustment, carefully done to avoid overflow. Range of y is [-1564,1594]. */ r2 = MULT16_16_Q15(r, r); y = SHL16(SUB16(ADD16(MULT16_16_Q15(r2, n), r2), 16384), 1); /* Apply a 2nd-order Householder iteration: r += r*y*(y*0.375-0.5). This yields the Q14 reciprocal square root of the Q16 x, with a maximum relative error of 1.04956E-4, a (relative) RMSE of 2.80979E-5, and a peak absolute error of 2.26591/16384. */ return ADD16(r, MULT16_16_Q15(r, MULT16_16_Q15(y, SUB16(MULT16_16_Q15(y, 12288), 16384)))); } /** Sqrt approximation (QX input, QX/2 output) */ opus_val32 celt_sqrt(opus_val32 x) { int k; opus_val16 n; opus_val32 rt; static const opus_val16 C[5] = {23175, 11561, -3011, 1699, -664}; if (x==0) return 0; else if (x>=1073741824) return 32767; k = (celt_ilog2(x)>>1)-7; x = VSHR32(x, 2*k); n = x-32768; rt = ADD16(C[0], MULT16_16_Q15(n, ADD16(C[1], MULT16_16_Q15(n, ADD16(C[2], MULT16_16_Q15(n, ADD16(C[3], MULT16_16_Q15(n, (C[4]))))))))); rt = VSHR32(rt,7-k); return rt; } #define L1 32767 #define L2 -7651 #define L3 8277 #define L4 -626 static OPUS_INLINE opus_val16 _celt_cos_pi_2(opus_val16 x) { opus_val16 x2; x2 = MULT16_16_P15(x,x); return ADD16(1,MIN16(32766,ADD32(SUB16(L1,x2), MULT16_16_P15(x2, ADD32(L2, MULT16_16_P15(x2, ADD32(L3, MULT16_16_P15(L4, x2 )))))))); } #undef L1 #undef L2 #undef L3 #undef L4 opus_val16 celt_cos_norm(opus_val32 x) { x = x&0x0001ffff; if (x>SHL32(EXTEND32(1), 16)) x = SUB32(SHL32(EXTEND32(1), 17),x); if (x&0x00007fff) { if (x0, "celt_rcp() only defined for positive values"); i = celt_ilog2(x); /* n is Q15 with range [0,1). */ n = VSHR32(x,i-15)-32768; /* Start with a linear approximation: r = 1.8823529411764706-0.9411764705882353*n. The coefficients and the result are Q14 in the range [15420,30840].*/ r = ADD16(30840, MULT16_16_Q15(-15420, n)); /* Perform two Newton iterations: r -= r*((r*n)-1.Q15) = r*((r*n)+(r-1.Q15)). */ r = SUB16(r, MULT16_16_Q15(r, ADD16(MULT16_16_Q15(r, n), ADD16(r, -32768)))); /* We subtract an extra 1 in the second iteration to avoid overflow; it also neatly compensates for truncation error in the rest of the process. */ r = SUB16(r, ADD16(1, MULT16_16_Q15(r, ADD16(MULT16_16_Q15(r, n), ADD16(r, -32768))))); /* r is now the Q15 solution to 2/(n+1), with a maximum relative error of 7.05346E-5, a (relative) RMSE of 2.14418E-5, and a peak absolute error of 1.24665/32768. */ return VSHR32(EXTEND32(r),i-16); } #endif opus-1.1.2/celt/mathops.h000066400000000000000000000160551264527674100153010ustar00rootroot00000000000000/* Copyright (c) 2002-2008 Jean-Marc Valin Copyright (c) 2007-2008 CSIRO Copyright (c) 2007-2009 Xiph.Org Foundation Written by Jean-Marc Valin */ /** @file mathops.h @brief Various math functions */ /* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - 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. 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 OWNER 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. */ #ifndef MATHOPS_H #define MATHOPS_H #include "arch.h" #include "entcode.h" #include "os_support.h" /* Multiplies two 16-bit fractional values. Bit-exactness of this macro is important */ #define FRAC_MUL16(a,b) ((16384+((opus_int32)(opus_int16)(a)*(opus_int16)(b)))>>15) unsigned isqrt32(opus_uint32 _val); #ifndef OVERRIDE_CELT_MAXABS16 static OPUS_INLINE opus_val32 celt_maxabs16(const opus_val16 *x, int len) { int i; opus_val16 maxval = 0; opus_val16 minval = 0; for (i=0;i>23)-127; in.i -= integer<<23; frac = in.f - 1.5f; frac = -0.41445418f + frac*(0.95909232f + frac*(-0.33951290f + frac*0.16541097f)); return 1+integer+frac; } /** Base-2 exponential approximation (2^x). */ static OPUS_INLINE float celt_exp2(float x) { int integer; float frac; union { float f; opus_uint32 i; } res; integer = floor(x); if (integer < -50) return 0; frac = x-integer; /* K0 = 1, K1 = log(2), K2 = 3-4*log(2), K3 = 3*log(2) - 2 */ res.f = 0.99992522f + frac * (0.69583354f + frac * (0.22606716f + 0.078024523f*frac)); res.i = (res.i + (integer<<23)) & 0x7fffffff; return res.f; } #else #define celt_log2(x) ((float)(1.442695040888963387*log(x))) #define celt_exp2(x) ((float)exp(0.6931471805599453094*(x))) #endif #endif #ifdef FIXED_POINT #include "os_support.h" #ifndef OVERRIDE_CELT_ILOG2 /** Integer log in base2. Undefined for zero and negative numbers */ static OPUS_INLINE opus_int16 celt_ilog2(opus_int32 x) { celt_assert2(x>0, "celt_ilog2() only defined for strictly positive numbers"); return EC_ILOG(x)-1; } #endif /** Integer log in base2. Defined for zero, but not for negative numbers */ static OPUS_INLINE opus_int16 celt_zlog2(opus_val32 x) { return x <= 0 ? 0 : celt_ilog2(x); } opus_val16 celt_rsqrt_norm(opus_val32 x); opus_val32 celt_sqrt(opus_val32 x); opus_val16 celt_cos_norm(opus_val32 x); /** Base-2 logarithm approximation (log2(x)). (Q14 input, Q10 output) */ static OPUS_INLINE opus_val16 celt_log2(opus_val32 x) { int i; opus_val16 n, frac; /* -0.41509302963303146, 0.9609890551383969, -0.31836011537636605, 0.15530808010959576, -0.08556153059057618 */ static const opus_val16 C[5] = {-6801+(1<<(13-DB_SHIFT)), 15746, -5217, 2545, -1401}; if (x==0) return -32767; i = celt_ilog2(x); n = VSHR32(x,i-15)-32768-16384; frac = ADD16(C[0], MULT16_16_Q15(n, ADD16(C[1], MULT16_16_Q15(n, ADD16(C[2], MULT16_16_Q15(n, ADD16(C[3], MULT16_16_Q15(n, C[4])))))))); return SHL16(i-13,DB_SHIFT)+SHR16(frac,14-DB_SHIFT); } /* K0 = 1 K1 = log(2) K2 = 3-4*log(2) K3 = 3*log(2) - 2 */ #define D0 16383 #define D1 22804 #define D2 14819 #define D3 10204 static OPUS_INLINE opus_val32 celt_exp2_frac(opus_val16 x) { opus_val16 frac; frac = SHL16(x, 4); return ADD16(D0, MULT16_16_Q15(frac, ADD16(D1, MULT16_16_Q15(frac, ADD16(D2 , MULT16_16_Q15(D3,frac)))))); } /** Base-2 exponential approximation (2^x). (Q10 input, Q16 output) */ static OPUS_INLINE opus_val32 celt_exp2(opus_val16 x) { int integer; opus_val16 frac; integer = SHR16(x,10); if (integer>14) return 0x7f000000; else if (integer < -15) return 0; frac = celt_exp2_frac(x-SHL16(integer,10)); return VSHR32(EXTEND32(frac), -integer-2); } opus_val32 celt_rcp(opus_val32 x); #define celt_div(a,b) MULT32_32_Q31((opus_val32)(a),celt_rcp(b)) opus_val32 frac_div32(opus_val32 a, opus_val32 b); #define M1 32767 #define M2 -21 #define M3 -11943 #define M4 4936 /* Atan approximation using a 4th order polynomial. Input is in Q15 format and normalized by pi/4. Output is in Q15 format */ static OPUS_INLINE opus_val16 celt_atan01(opus_val16 x) { return MULT16_16_P15(x, ADD32(M1, MULT16_16_P15(x, ADD32(M2, MULT16_16_P15(x, ADD32(M3, MULT16_16_P15(M4, x))))))); } #undef M1 #undef M2 #undef M3 #undef M4 /* atan2() approximation valid for positive input values */ static OPUS_INLINE opus_val16 celt_atan2p(opus_val16 y, opus_val16 x) { if (y < x) { opus_val32 arg; arg = celt_div(SHL32(EXTEND32(y),15),x); if (arg >= 32767) arg = 32767; return SHR16(celt_atan01(EXTRACT16(arg)),1); } else { opus_val32 arg; arg = celt_div(SHL32(EXTEND32(x),15),y); if (arg >= 32767) arg = 32767; return 25736-SHR16(celt_atan01(EXTRACT16(arg)),1); } } #endif /* FIXED_POINT */ #endif /* MATHOPS_H */ opus-1.1.2/celt/mdct.c000066400000000000000000000250621264527674100145460ustar00rootroot00000000000000/* Copyright (c) 2007-2008 CSIRO Copyright (c) 2007-2008 Xiph.Org Foundation Written by Jean-Marc Valin */ /* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - 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. 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 OWNER 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. */ /* This is a simple MDCT implementation that uses a N/4 complex FFT to do most of the work. It should be relatively straightforward to plug in pretty much and FFT here. This replaces the Vorbis FFT (and uses the exact same API), which was a bit too messy and that was ending up duplicating code (might as well use the same FFT everywhere). The algorithm is similar to (and inspired from) Fabrice Bellard's MDCT implementation in FFMPEG, but has differences in signs, ordering and scaling in many places. */ #ifndef SKIP_CONFIG_H #ifdef HAVE_CONFIG_H #include "config.h" #endif #endif #include "mdct.h" #include "kiss_fft.h" #include "_kiss_fft_guts.h" #include #include "os_support.h" #include "mathops.h" #include "stack_alloc.h" #if defined(MIPSr1_ASM) #include "mips/mdct_mipsr1.h" #endif #ifdef CUSTOM_MODES int clt_mdct_init(mdct_lookup *l,int N, int maxshift, int arch) { int i; kiss_twiddle_scalar *trig; int shift; int N2=N>>1; l->n = N; l->maxshift = maxshift; for (i=0;i<=maxshift;i++) { if (i==0) l->kfft[i] = opus_fft_alloc(N>>2>>i, 0, 0, arch); else l->kfft[i] = opus_fft_alloc_twiddles(N>>2>>i, 0, 0, l->kfft[0], arch); #ifndef ENABLE_TI_DSPLIB55 if (l->kfft[i]==NULL) return 0; #endif } l->trig = trig = (kiss_twiddle_scalar*)opus_alloc((N-(N2>>maxshift))*sizeof(kiss_twiddle_scalar)); if (l->trig==NULL) return 0; for (shift=0;shift<=maxshift;shift++) { /* We have enough points that sine isn't necessary */ #if defined(FIXED_POINT) #if 1 for (i=0;i>= 1; N >>= 1; } return 1; } void clt_mdct_clear(mdct_lookup *l, int arch) { int i; for (i=0;i<=l->maxshift;i++) opus_fft_free(l->kfft[i], arch); opus_free((kiss_twiddle_scalar*)l->trig); } #endif /* CUSTOM_MODES */ /* Forward MDCT trashes the input array */ #ifndef OVERRIDE_clt_mdct_forward void clt_mdct_forward_c(const mdct_lookup *l, kiss_fft_scalar *in, kiss_fft_scalar * OPUS_RESTRICT out, const opus_val16 *window, int overlap, int shift, int stride, int arch) { int i; int N, N2, N4; VARDECL(kiss_fft_scalar, f); VARDECL(kiss_fft_cpx, f2); const kiss_fft_state *st = l->kfft[shift]; const kiss_twiddle_scalar *trig; opus_val16 scale; #ifdef FIXED_POINT /* Allows us to scale with MULT16_32_Q16(), which is faster than MULT16_32_Q15() on ARM. */ int scale_shift = st->scale_shift-1; #endif SAVE_STACK; (void)arch; scale = st->scale; N = l->n; trig = l->trig; for (i=0;i>= 1; trig += N; } N2 = N>>1; N4 = N>>2; ALLOC(f, N2, kiss_fft_scalar); ALLOC(f2, N4, kiss_fft_cpx); /* Consider the input to be composed of four blocks: [a, b, c, d] */ /* Window, shuffle, fold */ { /* Temp pointers to make it really clear to the compiler what we're doing */ const kiss_fft_scalar * OPUS_RESTRICT xp1 = in+(overlap>>1); const kiss_fft_scalar * OPUS_RESTRICT xp2 = in+N2-1+(overlap>>1); kiss_fft_scalar * OPUS_RESTRICT yp = f; const opus_val16 * OPUS_RESTRICT wp1 = window+(overlap>>1); const opus_val16 * OPUS_RESTRICT wp2 = window+(overlap>>1)-1; for(i=0;i<((overlap+3)>>2);i++) { /* Real part arranged as -d-cR, Imag part arranged as -b+aR*/ *yp++ = MULT16_32_Q15(*wp2, xp1[N2]) + MULT16_32_Q15(*wp1,*xp2); *yp++ = MULT16_32_Q15(*wp1, *xp1) - MULT16_32_Q15(*wp2, xp2[-N2]); xp1+=2; xp2-=2; wp1+=2; wp2-=2; } wp1 = window; wp2 = window+overlap-1; for(;i>2);i++) { /* Real part arranged as a-bR, Imag part arranged as -c-dR */ *yp++ = *xp2; *yp++ = *xp1; xp1+=2; xp2-=2; } for(;ibitrev[i]] = yc; } } /* N/4 complex FFT, does not downscale anymore */ opus_fft_impl(st, f2); /* Post-rotate */ { /* Temp pointers to make it really clear to the compiler what we're doing */ const kiss_fft_cpx * OPUS_RESTRICT fp = f2; kiss_fft_scalar * OPUS_RESTRICT yp1 = out; kiss_fft_scalar * OPUS_RESTRICT yp2 = out+stride*(N2-1); const kiss_twiddle_scalar *t = &trig[0]; /* Temp pointers to make it really clear to the compiler what we're doing */ for(i=0;ii,t[N4+i]) - S_MUL(fp->r,t[i]); yi = S_MUL(fp->r,t[N4+i]) + S_MUL(fp->i,t[i]); *yp1 = yr; *yp2 = yi; fp++; yp1 += 2*stride; yp2 -= 2*stride; } } RESTORE_STACK; } #endif /* OVERRIDE_clt_mdct_forward */ #ifndef OVERRIDE_clt_mdct_backward void clt_mdct_backward_c(const mdct_lookup *l, kiss_fft_scalar *in, kiss_fft_scalar * OPUS_RESTRICT out, const opus_val16 * OPUS_RESTRICT window, int overlap, int shift, int stride, int arch) { int i; int N, N2, N4; const kiss_twiddle_scalar *trig; (void) arch; N = l->n; trig = l->trig; for (i=0;i>= 1; trig += N; } N2 = N>>1; N4 = N>>2; /* Pre-rotate */ { /* Temp pointers to make it really clear to the compiler what we're doing */ const kiss_fft_scalar * OPUS_RESTRICT xp1 = in; const kiss_fft_scalar * OPUS_RESTRICT xp2 = in+stride*(N2-1); kiss_fft_scalar * OPUS_RESTRICT yp = out+(overlap>>1); const kiss_twiddle_scalar * OPUS_RESTRICT t = &trig[0]; const opus_int16 * OPUS_RESTRICT bitrev = l->kfft[shift]->bitrev; for(i=0;ikfft[shift], (kiss_fft_cpx*)(out+(overlap>>1))); /* Post-rotate and de-shuffle from both ends of the buffer at once to make it in-place. */ { kiss_fft_scalar * yp0 = out+(overlap>>1); kiss_fft_scalar * yp1 = out+(overlap>>1)+N2-2; const kiss_twiddle_scalar *t = &trig[0]; /* Loop to (N4+1)>>1 to handle odd N4. When N4 is odd, the middle pair will be computed twice. */ for(i=0;i<(N4+1)>>1;i++) { kiss_fft_scalar re, im, yr, yi; kiss_twiddle_scalar t0, t1; /* We swap real and imag because we're using an FFT instead of an IFFT. */ re = yp0[1]; im = yp0[0]; t0 = t[i]; t1 = t[N4+i]; /* We'd scale up by 2 here, but instead it's done when mixing the windows */ yr = S_MUL(re,t0) + S_MUL(im,t1); yi = S_MUL(re,t1) - S_MUL(im,t0); /* We swap real and imag because we're using an FFT instead of an IFFT. */ re = yp1[1]; im = yp1[0]; yp0[0] = yr; yp1[1] = yi; t0 = t[(N4-i-1)]; t1 = t[(N2-i-1)]; /* We'd scale up by 2 here, but instead it's done when mixing the windows */ yr = S_MUL(re,t0) + S_MUL(im,t1); yi = S_MUL(re,t1) - S_MUL(im,t0); yp1[0] = yr; yp0[1] = yi; yp0 += 2; yp1 -= 2; } } /* Mirror on both sides for TDAC */ { kiss_fft_scalar * OPUS_RESTRICT xp1 = out+overlap-1; kiss_fft_scalar * OPUS_RESTRICT yp1 = out; const opus_val16 * OPUS_RESTRICT wp1 = window; const opus_val16 * OPUS_RESTRICT wp2 = window+overlap-1; for(i = 0; i < overlap/2; i++) { kiss_fft_scalar x1, x2; x1 = *xp1; x2 = *yp1; *yp1++ = MULT16_32_Q15(*wp2, x2) - MULT16_32_Q15(*wp1, x1); *xp1-- = MULT16_32_Q15(*wp1, x2) + MULT16_32_Q15(*wp2, x1); wp1++; wp2--; } } } #endif /* OVERRIDE_clt_mdct_backward */ opus-1.1.2/celt/mdct.h000066400000000000000000000112501264527674100145450ustar00rootroot00000000000000/* Copyright (c) 2007-2008 CSIRO Copyright (c) 2007-2008 Xiph.Org Foundation Written by Jean-Marc Valin */ /* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - 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. 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 OWNER 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. */ /* This is a simple MDCT implementation that uses a N/4 complex FFT to do most of the work. It should be relatively straightforward to plug in pretty much and FFT here. This replaces the Vorbis FFT (and uses the exact same API), which was a bit too messy and that was ending up duplicating code (might as well use the same FFT everywhere). The algorithm is similar to (and inspired from) Fabrice Bellard's MDCT implementation in FFMPEG, but has differences in signs, ordering and scaling in many places. */ #ifndef MDCT_H #define MDCT_H #include "opus_defines.h" #include "kiss_fft.h" #include "arch.h" typedef struct { int n; int maxshift; const kiss_fft_state *kfft[4]; const kiss_twiddle_scalar * OPUS_RESTRICT trig; } mdct_lookup; #if defined(HAVE_ARM_NE10) #include "arm/mdct_arm.h" #endif int clt_mdct_init(mdct_lookup *l,int N, int maxshift, int arch); void clt_mdct_clear(mdct_lookup *l, int arch); /** Compute a forward MDCT and scale by 4/N, trashes the input array */ void clt_mdct_forward_c(const mdct_lookup *l, kiss_fft_scalar *in, kiss_fft_scalar * OPUS_RESTRICT out, const opus_val16 *window, int overlap, int shift, int stride, int arch); /** Compute a backward MDCT (no scaling) and performs weighted overlap-add (scales implicitly by 1/2) */ void clt_mdct_backward_c(const mdct_lookup *l, kiss_fft_scalar *in, kiss_fft_scalar * OPUS_RESTRICT out, const opus_val16 * OPUS_RESTRICT window, int overlap, int shift, int stride, int arch); #if !defined(OVERRIDE_OPUS_MDCT) /* Is run-time CPU detection enabled on this platform? */ #if defined(OPUS_HAVE_RTCD) && defined(HAVE_ARM_NE10) extern void (*const CLT_MDCT_FORWARD_IMPL[OPUS_ARCHMASK+1])( const mdct_lookup *l, kiss_fft_scalar *in, kiss_fft_scalar * OPUS_RESTRICT out, const opus_val16 *window, int overlap, int shift, int stride, int arch); #define clt_mdct_forward(_l, _in, _out, _window, _overlap, _shift, _stride, _arch) \ ((*CLT_MDCT_FORWARD_IMPL[(arch)&OPUS_ARCHMASK])(_l, _in, _out, \ _window, _overlap, _shift, \ _stride, _arch)) extern void (*const CLT_MDCT_BACKWARD_IMPL[OPUS_ARCHMASK+1])( const mdct_lookup *l, kiss_fft_scalar *in, kiss_fft_scalar * OPUS_RESTRICT out, const opus_val16 *window, int overlap, int shift, int stride, int arch); #define clt_mdct_backward(_l, _in, _out, _window, _overlap, _shift, _stride, _arch) \ (*CLT_MDCT_BACKWARD_IMPL[(arch)&OPUS_ARCHMASK])(_l, _in, _out, \ _window, _overlap, _shift, \ _stride, _arch) #else /* if defined(OPUS_HAVE_RTCD) && defined(HAVE_ARM_NE10) */ #define clt_mdct_forward(_l, _in, _out, _window, _overlap, _shift, _stride, _arch) \ clt_mdct_forward_c(_l, _in, _out, _window, _overlap, _shift, _stride, _arch) #define clt_mdct_backward(_l, _in, _out, _window, _overlap, _shift, _stride, _arch) \ clt_mdct_backward_c(_l, _in, _out, _window, _overlap, _shift, _stride, _arch) #endif /* end if defined(OPUS_HAVE_RTCD) && defined(HAVE_ARM_NE10) && !defined(FIXED_POINT) */ #endif /* end if !defined(OVERRIDE_OPUS_MDCT) */ #endif opus-1.1.2/celt/mfrngcod.h000066400000000000000000000042701264527674100154210ustar00rootroot00000000000000/* Copyright (c) 2001-2008 Timothy B. Terriberry Copyright (c) 2008-2009 Xiph.Org Foundation */ /* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - 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. 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 OWNER 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. */ #if !defined(_mfrngcode_H) # define _mfrngcode_H (1) # include "entcode.h" /*Constants used by the entropy encoder/decoder.*/ /*The number of bits to output at a time.*/ # define EC_SYM_BITS (8) /*The total number of bits in each of the state registers.*/ # define EC_CODE_BITS (32) /*The maximum symbol value.*/ # define EC_SYM_MAX ((1U<>EC_SYM_BITS) /*The number of bits available for the last, partial symbol in the code field.*/ # define EC_CODE_EXTRA ((EC_CODE_BITS-2)%EC_SYM_BITS+1) #endif opus-1.1.2/celt/mips/000077500000000000000000000000001264527674100144165ustar00rootroot00000000000000opus-1.1.2/celt/mips/celt_mipsr1.h000066400000000000000000000116701264527674100170160ustar00rootroot00000000000000/* Copyright (c) 2007-2008 CSIRO Copyright (c) 2007-2010 Xiph.Org Foundation Copyright (c) 2008 Gregory Maxwell Written by Jean-Marc Valin and Gregory Maxwell */ /* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - 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. 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 OWNER 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. */ #ifndef __CELT_MIPSR1_H__ #define __CELT_MIPSR1_H__ #ifdef HAVE_CONFIG_H #include "config.h" #endif #define CELT_C #include "os_support.h" #include "mdct.h" #include #include "celt.h" #include "pitch.h" #include "bands.h" #include "modes.h" #include "entcode.h" #include "quant_bands.h" #include "rate.h" #include "stack_alloc.h" #include "mathops.h" #include "float_cast.h" #include #include "celt_lpc.h" #include "vq.h" #define OVERRIDE_comb_filter void comb_filter(opus_val32 *y, opus_val32 *x, int T0, int T1, int N, opus_val16 g0, opus_val16 g1, int tapset0, int tapset1, const opus_val16 *window, int overlap, int arch) { int i; opus_val32 x0, x1, x2, x3, x4; (void)arch; /* printf ("%d %d %f %f\n", T0, T1, g0, g1); */ opus_val16 g00, g01, g02, g10, g11, g12; static const opus_val16 gains[3][3] = { {QCONST16(0.3066406250f, 15), QCONST16(0.2170410156f, 15), QCONST16(0.1296386719f, 15)}, {QCONST16(0.4638671875f, 15), QCONST16(0.2680664062f, 15), QCONST16(0.f, 15)}, {QCONST16(0.7998046875f, 15), QCONST16(0.1000976562f, 15), QCONST16(0.f, 15)}}; if (g0==0 && g1==0) { /* OPT: Happens to work without the OPUS_MOVE(), but only because the current encoder already copies x to y */ if (x!=y) OPUS_MOVE(y, x, N); return; } g00 = MULT16_16_P15(g0, gains[tapset0][0]); g01 = MULT16_16_P15(g0, gains[tapset0][1]); g02 = MULT16_16_P15(g0, gains[tapset0][2]); g10 = MULT16_16_P15(g1, gains[tapset1][0]); g11 = MULT16_16_P15(g1, gains[tapset1][1]); g12 = MULT16_16_P15(g1, gains[tapset1][2]); x1 = x[-T1+1]; x2 = x[-T1 ]; x3 = x[-T1-1]; x4 = x[-T1-2]; /* If the filter didn't change, we don't need the overlap */ if (g0==g1 && T0==T1 && tapset0==tapset1) overlap=0; for (i=0;itwiddles[fstride*m]; yb = st->twiddles[fstride*2*m]; #endif tw=st->twiddles; for (i=0;ir += scratch[7].r + scratch[8].r; Fout0->i += scratch[7].i + scratch[8].i; scratch[5].r = scratch[0].r + S_MUL_ADD(scratch[7].r,ya.r,scratch[8].r,yb.r); scratch[5].i = scratch[0].i + S_MUL_ADD(scratch[7].i,ya.r,scratch[8].i,yb.r); scratch[6].r = S_MUL_ADD(scratch[10].i,ya.i,scratch[9].i,yb.i); scratch[6].i = -S_MUL_ADD(scratch[10].r,ya.i,scratch[9].r,yb.i); C_SUB(*Fout1,scratch[5],scratch[6]); C_ADD(*Fout4,scratch[5],scratch[6]); scratch[11].r = scratch[0].r + S_MUL_ADD(scratch[7].r,yb.r,scratch[8].r,ya.r); scratch[11].i = scratch[0].i + S_MUL_ADD(scratch[7].i,yb.r,scratch[8].i,ya.r); scratch[12].r = S_MUL_SUB(scratch[9].i,ya.i,scratch[10].i,yb.i); scratch[12].i = S_MUL_SUB(scratch[10].r,yb.i,scratch[9].r,ya.i); C_ADD(*Fout2,scratch[11],scratch[12]); C_SUB(*Fout3,scratch[11],scratch[12]); ++Fout0;++Fout1;++Fout2;++Fout3;++Fout4; } } } #endif /* KISS_FFT_MIPSR1_H */ opus-1.1.2/celt/mips/mdct_mipsr1.h000066400000000000000000000220361264527674100170140ustar00rootroot00000000000000/* Copyright (c) 2007-2008 CSIRO Copyright (c) 2007-2008 Xiph.Org Foundation Written by Jean-Marc Valin */ /* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - 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. 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 OWNER 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. */ /* This is a simple MDCT implementation that uses a N/4 complex FFT to do most of the work. It should be relatively straightforward to plug in pretty much and FFT here. This replaces the Vorbis FFT (and uses the exact same API), which was a bit too messy and that was ending up duplicating code (might as well use the same FFT everywhere). The algorithm is similar to (and inspired from) Fabrice Bellard's MDCT implementation in FFMPEG, but has differences in signs, ordering and scaling in many places. */ #ifndef __MDCT_MIPSR1_H__ #define __MDCT_MIPSR1_H__ #ifndef SKIP_CONFIG_H #ifdef HAVE_CONFIG_H #include "config.h" #endif #endif #include "mdct.h" #include "kiss_fft.h" #include "_kiss_fft_guts.h" #include #include "os_support.h" #include "mathops.h" #include "stack_alloc.h" /* Forward MDCT trashes the input array */ #define OVERRIDE_clt_mdct_forward void clt_mdct_forward(const mdct_lookup *l, kiss_fft_scalar *in, kiss_fft_scalar * OPUS_RESTRICT out, const opus_val16 *window, int overlap, int shift, int stride, int arch) { int i; int N, N2, N4; VARDECL(kiss_fft_scalar, f); VARDECL(kiss_fft_cpx, f2); const kiss_fft_state *st = l->kfft[shift]; const kiss_twiddle_scalar *trig; opus_val16 scale; #ifdef FIXED_POINT /* Allows us to scale with MULT16_32_Q16(), which is faster than MULT16_32_Q15() on ARM. */ int scale_shift = st->scale_shift-1; #endif (void)arch; SAVE_STACK; scale = st->scale; N = l->n; trig = l->trig; for (i=0;i>= 1; trig += N; } N2 = N>>1; N4 = N>>2; ALLOC(f, N2, kiss_fft_scalar); ALLOC(f2, N4, kiss_fft_cpx); /* Consider the input to be composed of four blocks: [a, b, c, d] */ /* Window, shuffle, fold */ { /* Temp pointers to make it really clear to the compiler what we're doing */ const kiss_fft_scalar * OPUS_RESTRICT xp1 = in+(overlap>>1); const kiss_fft_scalar * OPUS_RESTRICT xp2 = in+N2-1+(overlap>>1); kiss_fft_scalar * OPUS_RESTRICT yp = f; const opus_val16 * OPUS_RESTRICT wp1 = window+(overlap>>1); const opus_val16 * OPUS_RESTRICT wp2 = window+(overlap>>1)-1; for(i=0;i<((overlap+3)>>2);i++) { /* Real part arranged as -d-cR, Imag part arranged as -b+aR*/ *yp++ = S_MUL_ADD(*wp2, xp1[N2],*wp1,*xp2); *yp++ = S_MUL_SUB(*wp1, *xp1,*wp2, xp2[-N2]); xp1+=2; xp2-=2; wp1+=2; wp2-=2; } wp1 = window; wp2 = window+overlap-1; for(;i>2);i++) { /* Real part arranged as a-bR, Imag part arranged as -c-dR */ *yp++ = *xp2; *yp++ = *xp1; xp1+=2; xp2-=2; } for(;ibitrev[i]] = yc; } } /* N/4 complex FFT, does not downscale anymore */ opus_fft_impl(st, f2); /* Post-rotate */ { /* Temp pointers to make it really clear to the compiler what we're doing */ const kiss_fft_cpx * OPUS_RESTRICT fp = f2; kiss_fft_scalar * OPUS_RESTRICT yp1 = out; kiss_fft_scalar * OPUS_RESTRICT yp2 = out+stride*(N2-1); const kiss_twiddle_scalar *t = &trig[0]; /* Temp pointers to make it really clear to the compiler what we're doing */ for(i=0;ii,t[N4+i] , fp->r,t[i]); yi = S_MUL_ADD(fp->r,t[N4+i] ,fp->i,t[i]); *yp1 = yr; *yp2 = yi; fp++; yp1 += 2*stride; yp2 -= 2*stride; } } RESTORE_STACK; } #define OVERRIDE_clt_mdct_backward void clt_mdct_backward(const mdct_lookup *l, kiss_fft_scalar *in, kiss_fft_scalar * OPUS_RESTRICT out, const opus_val16 * OPUS_RESTRICT window, int overlap, int shift, int stride, int arch) { int i; int N, N2, N4; const kiss_twiddle_scalar *trig; (void)arch; N = l->n; trig = l->trig; for (i=0;i>= 1; trig += N; } N2 = N>>1; N4 = N>>2; /* Pre-rotate */ { /* Temp pointers to make it really clear to the compiler what we're doing */ const kiss_fft_scalar * OPUS_RESTRICT xp1 = in; const kiss_fft_scalar * OPUS_RESTRICT xp2 = in+stride*(N2-1); kiss_fft_scalar * OPUS_RESTRICT yp = out+(overlap>>1); const kiss_twiddle_scalar * OPUS_RESTRICT t = &trig[0]; const opus_int16 * OPUS_RESTRICT bitrev = l->kfft[shift]->bitrev; for(i=0;ikfft[shift], (kiss_fft_cpx*)(out+(overlap>>1))); /* Post-rotate and de-shuffle from both ends of the buffer at once to make it in-place. */ { kiss_fft_scalar * OPUS_RESTRICT yp0 = out+(overlap>>1); kiss_fft_scalar * OPUS_RESTRICT yp1 = out+(overlap>>1)+N2-2; const kiss_twiddle_scalar *t = &trig[0]; /* Loop to (N4+1)>>1 to handle odd N4. When N4 is odd, the middle pair will be computed twice. */ for(i=0;i<(N4+1)>>1;i++) { kiss_fft_scalar re, im, yr, yi; kiss_twiddle_scalar t0, t1; /* We swap real and imag because we're using an FFT instead of an IFFT. */ re = yp0[1]; im = yp0[0]; t0 = t[i]; t1 = t[N4+i]; /* We'd scale up by 2 here, but instead it's done when mixing the windows */ yr = S_MUL_ADD(re,t0 , im,t1); yi = S_MUL_SUB(re,t1 , im,t0); /* We swap real and imag because we're using an FFT instead of an IFFT. */ re = yp1[1]; im = yp1[0]; yp0[0] = yr; yp1[1] = yi; t0 = t[(N4-i-1)]; t1 = t[(N2-i-1)]; /* We'd scale up by 2 here, but instead it's done when mixing the windows */ yr = S_MUL_ADD(re,t0,im,t1); yi = S_MUL_SUB(re,t1,im,t0); yp1[0] = yr; yp0[1] = yi; yp0 += 2; yp1 -= 2; } } /* Mirror on both sides for TDAC */ { kiss_fft_scalar * OPUS_RESTRICT xp1 = out+overlap-1; kiss_fft_scalar * OPUS_RESTRICT yp1 = out; const opus_val16 * OPUS_RESTRICT wp1 = window; const opus_val16 * OPUS_RESTRICT wp2 = window+overlap-1; for(i = 0; i < overlap/2; i++) { kiss_fft_scalar x1, x2; x1 = *xp1; x2 = *yp1; *yp1++ = MULT16_32_Q15(*wp2, x2) - MULT16_32_Q15(*wp1, x1); *xp1-- = MULT16_32_Q15(*wp1, x2) + MULT16_32_Q15(*wp2, x1); wp1++; wp2--; } } } #endif /* __MDCT_MIPSR1_H__ */ opus-1.1.2/celt/mips/pitch_mipsr1.h000066400000000000000000000117601264527674100171760ustar00rootroot00000000000000/* Copyright (c) 2007-2008 CSIRO Copyright (c) 2007-2009 Xiph.Org Foundation Written by Jean-Marc Valin */ /** @file pitch.h @brief Pitch analysis */ /* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - 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. 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 OWNER 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. */ #ifndef PITCH_MIPSR1_H #define PITCH_MIPSR1_H #define OVERRIDE_DUAL_INNER_PROD static inline void dual_inner_prod(const opus_val16 *x, const opus_val16 *y01, const opus_val16 *y02, int N, opus_val32 *xy1, opus_val32 *xy2, int arch) { int j; opus_val32 xy01=0; opus_val32 xy02=0; (void)arch; asm volatile("MULT $ac1, $0, $0"); asm volatile("MULT $ac2, $0, $0"); /* Compute the norm of X+Y and X-Y as |X|^2 + |Y|^2 +/- sum(xy) */ for (j=0;j=0;i--) { celt_norm x1, x2; x1 = Xptr[0]; x2 = Xptr[stride]; Xptr[stride] = EXTRACT16(PSHR32(MAC16_16(MULT16_16(c, x2), s, x1), 15)); *Xptr-- = EXTRACT16(PSHR32(MAC16_16(MULT16_16(c, x1), ms, x2), 15)); } } #define OVERRIDE_renormalise_vector #define renormalise_vector(X, N, gain, arch) \ (renormalise_vector_mips(X, N, gain, arch)) void renormalise_vector_mips(celt_norm *X, int N, opus_val16 gain, int arch) { int i; #ifdef FIXED_POINT int k; #endif opus_val32 E = EPSILON; opus_val16 g; opus_val32 t; celt_norm *xptr = X; int X0, X1; (void)arch; asm volatile("mult $ac1, $0, $0"); asm volatile("MTLO %0, $ac1" : :"r" (E)); /*if(N %4) printf("error");*/ for (i=0;i>1; #endif t = VSHR32(E, 2*(k-7)); g = MULT16_16_P15(celt_rsqrt_norm(t),gain); xptr = X; for (i=0;i= Fs) break; /* Find where the linear part ends (i.e. where the spacing is more than min_width */ for (lin=0;lin= res) break; low = (bark_freq[lin]+res/2)/res; high = nBark-lin; *nbEBands = low+high; eBands = opus_alloc(sizeof(opus_int16)*(*nbEBands+2)); if (eBands==NULL) return NULL; /* Linear spacing (min_width) */ for (i=0;i0) offset = eBands[low-1]*res - bark_freq[lin-1]; /* Spacing follows critical bands */ for (i=0;i frame_size) eBands[*nbEBands] = frame_size; for (i=1;i<*nbEBands-1;i++) { if (eBands[i+1]-eBands[i] < eBands[i]-eBands[i-1]) { eBands[i] -= (2*eBands[i]-eBands[i-1]-eBands[i+1])/2; } } /* Remove any empty bands. */ for (i=j=0;i<*nbEBands;i++) if(eBands[i+1]>eBands[j]) eBands[++j]=eBands[i+1]; *nbEBands=j; for (i=1;i<*nbEBands;i++) { /* Every band must be smaller than the last band. */ celt_assert(eBands[i]-eBands[i-1]<=eBands[*nbEBands]-eBands[*nbEBands-1]); /* Each band must be no larger than twice the size of the previous one. */ celt_assert(eBands[i+1]-eBands[i]<=2*(eBands[i]-eBands[i-1])); } return eBands; } static void compute_allocation_table(CELTMode *mode) { int i, j; unsigned char *allocVectors; int maxBands = sizeof(eband5ms)/sizeof(eband5ms[0])-1; mode->nbAllocVectors = BITALLOC_SIZE; allocVectors = opus_alloc(sizeof(unsigned char)*(BITALLOC_SIZE*mode->nbEBands)); if (allocVectors==NULL) return; /* Check for standard mode */ if (mode->Fs == 400*(opus_int32)mode->shortMdctSize) { for (i=0;inbEBands;i++) allocVectors[i] = band_allocation[i]; mode->allocVectors = allocVectors; return; } /* If not the standard mode, interpolate */ /* Compute per-codec-band allocation from per-critical-band matrix */ for (i=0;inbEBands;j++) { int k; for (k=0;k mode->eBands[j]*(opus_int32)mode->Fs/mode->shortMdctSize) break; } if (k>maxBands-1) allocVectors[i*mode->nbEBands+j] = band_allocation[i*maxBands + maxBands-1]; else { opus_int32 a0, a1; a1 = mode->eBands[j]*(opus_int32)mode->Fs/mode->shortMdctSize - 400*(opus_int32)eband5ms[k-1]; a0 = 400*(opus_int32)eband5ms[k] - mode->eBands[j]*(opus_int32)mode->Fs/mode->shortMdctSize; allocVectors[i*mode->nbEBands+j] = (a0*band_allocation[i*maxBands+k-1] + a1*band_allocation[i*maxBands+k])/(a0+a1); } } } /*printf ("\n"); for (i=0;inbEBands;j++) printf ("%d ", allocVectors[i*mode->nbEBands+j]); printf ("\n"); } exit(0);*/ mode->allocVectors = allocVectors; } #endif /* CUSTOM_MODES */ CELTMode *opus_custom_mode_create(opus_int32 Fs, int frame_size, int *error) { int i; #ifdef CUSTOM_MODES CELTMode *mode=NULL; int res; opus_val16 *window; opus_int16 *logN; int LM; int arch = opus_select_arch(); ALLOC_STACK; #if !defined(VAR_ARRAYS) && !defined(USE_ALLOCA) if (global_stack==NULL) goto failure; #endif #endif #ifndef CUSTOM_MODES_ONLY for (i=0;iFs && (frame_size<shortMdctSize*static_mode_list[i]->nbShortMdcts) { if (error) *error = OPUS_OK; return (CELTMode*)static_mode_list[i]; } } } #endif /* CUSTOM_MODES_ONLY */ #ifndef CUSTOM_MODES if (error) *error = OPUS_BAD_ARG; return NULL; #else /* The good thing here is that permutation of the arguments will automatically be invalid */ if (Fs < 8000 || Fs > 96000) { if (error) *error = OPUS_BAD_ARG; return NULL; } if (frame_size < 40 || frame_size > 1024 || frame_size%2!=0) { if (error) *error = OPUS_BAD_ARG; return NULL; } /* Frames of less than 1ms are not supported. */ if ((opus_int32)frame_size*1000 < Fs) { if (error) *error = OPUS_BAD_ARG; return NULL; } if ((opus_int32)frame_size*75 >= Fs && (frame_size%16)==0) { LM = 3; } else if ((opus_int32)frame_size*150 >= Fs && (frame_size%8)==0) { LM = 2; } else if ((opus_int32)frame_size*300 >= Fs && (frame_size%4)==0) { LM = 1; } else { LM = 0; } /* Shorts longer than 3.3ms are not supported. */ if ((opus_int32)(frame_size>>LM)*300 > Fs) { if (error) *error = OPUS_BAD_ARG; return NULL; } mode = opus_alloc(sizeof(CELTMode)); if (mode==NULL) goto failure; mode->Fs = Fs; /* Pre/de-emphasis depends on sampling rate. The "standard" pre-emphasis is defined as A(z) = 1 - 0.85*z^-1 at 48 kHz. Other rates should approximate that. */ if(Fs < 12000) /* 8 kHz */ { mode->preemph[0] = QCONST16(0.3500061035f, 15); mode->preemph[1] = -QCONST16(0.1799926758f, 15); mode->preemph[2] = QCONST16(0.2719968125f, SIG_SHIFT); /* exact 1/preemph[3] */ mode->preemph[3] = QCONST16(3.6765136719f, 13); } else if(Fs < 24000) /* 16 kHz */ { mode->preemph[0] = QCONST16(0.6000061035f, 15); mode->preemph[1] = -QCONST16(0.1799926758f, 15); mode->preemph[2] = QCONST16(0.4424998650f, SIG_SHIFT); /* exact 1/preemph[3] */ mode->preemph[3] = QCONST16(2.2598876953f, 13); } else if(Fs < 40000) /* 32 kHz */ { mode->preemph[0] = QCONST16(0.7799987793f, 15); mode->preemph[1] = -QCONST16(0.1000061035f, 15); mode->preemph[2] = QCONST16(0.7499771125f, SIG_SHIFT); /* exact 1/preemph[3] */ mode->preemph[3] = QCONST16(1.3333740234f, 13); } else /* 48 kHz */ { mode->preemph[0] = QCONST16(0.8500061035f, 15); mode->preemph[1] = QCONST16(0.0f, 15); mode->preemph[2] = QCONST16(1.f, SIG_SHIFT); mode->preemph[3] = QCONST16(1.f, 13); } mode->maxLM = LM; mode->nbShortMdcts = 1<shortMdctSize = frame_size/mode->nbShortMdcts; res = (mode->Fs+mode->shortMdctSize)/(2*mode->shortMdctSize); mode->eBands = compute_ebands(Fs, mode->shortMdctSize, res, &mode->nbEBands); if (mode->eBands==NULL) goto failure; #if !defined(SMALL_FOOTPRINT) /* Make sure we don't allocate a band larger than our PVQ table. 208 should be enough, but let's be paranoid. */ if ((mode->eBands[mode->nbEBands] - mode->eBands[mode->nbEBands-1])< 208) { goto failure; } #endif mode->effEBands = mode->nbEBands; while (mode->eBands[mode->effEBands] > mode->shortMdctSize) mode->effEBands--; /* Overlap must be divisible by 4 */ mode->overlap = ((mode->shortMdctSize>>2)<<2); compute_allocation_table(mode); if (mode->allocVectors==NULL) goto failure; window = (opus_val16*)opus_alloc(mode->overlap*sizeof(opus_val16)); if (window==NULL) goto failure; #ifndef FIXED_POINT for (i=0;ioverlap;i++) window[i] = Q15ONE*sin(.5*M_PI* sin(.5*M_PI*(i+.5)/mode->overlap) * sin(.5*M_PI*(i+.5)/mode->overlap)); #else for (i=0;ioverlap;i++) window[i] = MIN32(32767,floor(.5+32768.*sin(.5*M_PI* sin(.5*M_PI*(i+.5)/mode->overlap) * sin(.5*M_PI*(i+.5)/mode->overlap)))); #endif mode->window = window; logN = (opus_int16*)opus_alloc(mode->nbEBands*sizeof(opus_int16)); if (logN==NULL) goto failure; for (i=0;inbEBands;i++) logN[i] = log2_frac(mode->eBands[i+1]-mode->eBands[i], BITRES); mode->logN = logN; compute_pulse_cache(mode, mode->maxLM); if (clt_mdct_init(&mode->mdct, 2*mode->shortMdctSize*mode->nbShortMdcts, mode->maxLM, arch) == 0) goto failure; if (error) *error = OPUS_OK; return mode; failure: if (error) *error = OPUS_ALLOC_FAIL; if (mode!=NULL) opus_custom_mode_destroy(mode); return NULL; #endif /* !CUSTOM_MODES */ } #ifdef CUSTOM_MODES void opus_custom_mode_destroy(CELTMode *mode) { int arch = opus_select_arch(); if (mode == NULL) return; #ifndef CUSTOM_MODES_ONLY { int i; for (i=0;ieBands); opus_free((opus_int16*)mode->allocVectors); opus_free((opus_val16*)mode->window); opus_free((opus_int16*)mode->logN); opus_free((opus_int16*)mode->cache.index); opus_free((unsigned char*)mode->cache.bits); opus_free((unsigned char*)mode->cache.caps); clt_mdct_clear(&mode->mdct, arch); opus_free((CELTMode *)mode); } #endif opus-1.1.2/celt/modes.h000066400000000000000000000046051264527674100147330ustar00rootroot00000000000000/* Copyright (c) 2007-2008 CSIRO Copyright (c) 2007-2009 Xiph.Org Foundation Copyright (c) 2008 Gregory Maxwell Written by Jean-Marc Valin and Gregory Maxwell */ /* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - 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. 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 OWNER 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. */ #ifndef MODES_H #define MODES_H #include "opus_types.h" #include "celt.h" #include "arch.h" #include "mdct.h" #include "entenc.h" #include "entdec.h" #define MAX_PERIOD 1024 typedef struct { int size; const opus_int16 *index; const unsigned char *bits; const unsigned char *caps; } PulseCache; /** Mode definition (opaque) @brief Mode definition */ struct OpusCustomMode { opus_int32 Fs; int overlap; int nbEBands; int effEBands; opus_val16 preemph[4]; const opus_int16 *eBands; /**< Definition for each "pseudo-critical band" */ int maxLM; int nbShortMdcts; int shortMdctSize; int nbAllocVectors; /**< Number of lines in the matrix below */ const unsigned char *allocVectors; /**< Number of bits in each band for several rates */ const opus_int16 *logN; const opus_val16 *window; mdct_lookup mdct; PulseCache cache; }; #endif opus-1.1.2/celt/opus_custom_demo.c000066400000000000000000000141431264527674100172010ustar00rootroot00000000000000/* Copyright (c) 2007-2008 CSIRO Copyright (c) 2007-2009 Xiph.Org Foundation Written by Jean-Marc Valin */ /* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - 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. 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 OWNER 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. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "opus_custom.h" #include "arch.h" #include #include #include #include #define MAX_PACKET 1275 int main(int argc, char *argv[]) { int err; char *inFile, *outFile; FILE *fin, *fout; OpusCustomMode *mode=NULL; OpusCustomEncoder *enc; OpusCustomDecoder *dec; int len; opus_int32 frame_size, channels, rate; int bytes_per_packet; unsigned char data[MAX_PACKET]; int complexity; #if !(defined (FIXED_POINT) && !defined(CUSTOM_MODES)) && defined(RESYNTH) int i; double rmsd = 0; #endif int count = 0; opus_int32 skip; opus_int16 *in, *out; if (argc != 9 && argc != 8 && argc != 7) { fprintf (stderr, "Usage: test_opus_custom " " [ [packet loss rate]] " " \n"); return 1; } rate = (opus_int32)atol(argv[1]); channels = atoi(argv[2]); frame_size = atoi(argv[3]); mode = opus_custom_mode_create(rate, frame_size, NULL); if (mode == NULL) { fprintf(stderr, "failed to create a mode\n"); return 1; } bytes_per_packet = atoi(argv[4]); if (bytes_per_packet < 0 || bytes_per_packet > MAX_PACKET) { fprintf (stderr, "bytes per packet must be between 0 and %d\n", MAX_PACKET); return 1; } inFile = argv[argc-2]; fin = fopen(inFile, "rb"); if (!fin) { fprintf (stderr, "Could not open input file %s\n", argv[argc-2]); return 1; } outFile = argv[argc-1]; fout = fopen(outFile, "wb+"); if (!fout) { fprintf (stderr, "Could not open output file %s\n", argv[argc-1]); fclose(fin); return 1; } enc = opus_custom_encoder_create(mode, channels, &err); if (err != 0) { fprintf(stderr, "Failed to create the encoder: %s\n", opus_strerror(err)); fclose(fin); fclose(fout); return 1; } dec = opus_custom_decoder_create(mode, channels, &err); if (err != 0) { fprintf(stderr, "Failed to create the decoder: %s\n", opus_strerror(err)); fclose(fin); fclose(fout); return 1; } opus_custom_decoder_ctl(dec, OPUS_GET_LOOKAHEAD(&skip)); if (argc>7) { complexity=atoi(argv[5]); opus_custom_encoder_ctl(enc,OPUS_SET_COMPLEXITY(complexity)); } in = (opus_int16*)malloc(frame_size*channels*sizeof(opus_int16)); out = (opus_int16*)malloc(frame_size*channels*sizeof(opus_int16)); while (!feof(fin)) { int ret; err = fread(in, sizeof(short), frame_size*channels, fin); if (feof(fin)) break; len = opus_custom_encode(enc, in, frame_size, data, bytes_per_packet); if (len <= 0) fprintf (stderr, "opus_custom_encode() failed: %s\n", opus_strerror(len)); /* This is for simulating bit errors */ #if 0 int errors = 0; int eid = 0; /* This simulates random bit error */ for (i=0;i 0) { rmsd = sqrt(rmsd/(1.0*frame_size*channels*count)); fprintf (stderr, "Error: encoder doesn't match decoder\n"); fprintf (stderr, "RMS mismatch is %f\n", rmsd); return 1; } else { fprintf (stderr, "Encoder matches decoder!!\n"); } #endif return 0; } opus-1.1.2/celt/os_support.h000066400000000000000000000061331264527674100160370ustar00rootroot00000000000000/* Copyright (C) 2007 Jean-Marc Valin File: os_support.h This is the (tiny) OS abstraction layer. Aside from math.h, this is the only place where system headers are allowed. 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. THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. */ #ifndef OS_SUPPORT_H #define OS_SUPPORT_H #ifdef CUSTOM_SUPPORT # include "custom_support.h" #endif #include "opus_types.h" #include "opus_defines.h" #include #include #include /** Opus wrapper for malloc(). To do your own dynamic allocation, all you need to do is replace this function and opus_free */ #ifndef OVERRIDE_OPUS_ALLOC static OPUS_INLINE void *opus_alloc (size_t size) { return malloc(size); } #endif /** Same as celt_alloc(), except that the area is only needed inside a CELT call (might cause problem with wideband though) */ #ifndef OVERRIDE_OPUS_ALLOC_SCRATCH static OPUS_INLINE void *opus_alloc_scratch (size_t size) { /* Scratch space doesn't need to be cleared */ return opus_alloc(size); } #endif /** Opus wrapper for free(). To do your own dynamic allocation, all you need to do is replace this function and opus_alloc */ #ifndef OVERRIDE_OPUS_FREE static OPUS_INLINE void opus_free (void *ptr) { free(ptr); } #endif /** Copy n elements from src to dst. The 0* term provides compile-time type checking */ #ifndef OVERRIDE_OPUS_COPY #define OPUS_COPY(dst, src, n) (memcpy((dst), (src), (n)*sizeof(*(dst)) + 0*((dst)-(src)) )) #endif /** Copy n elements from src to dst, allowing overlapping regions. The 0* term provides compile-time type checking */ #ifndef OVERRIDE_OPUS_MOVE #define OPUS_MOVE(dst, src, n) (memmove((dst), (src), (n)*sizeof(*(dst)) + 0*((dst)-(src)) )) #endif /** Set n elements of dst to zero */ #ifndef OVERRIDE_OPUS_CLEAR #define OPUS_CLEAR(dst, n) (memset((dst), 0, (n)*sizeof(*(dst)))) #endif /*#ifdef __GNUC__ #pragma GCC poison printf sprintf #pragma GCC poison malloc free realloc calloc #endif*/ #endif /* OS_SUPPORT_H */ opus-1.1.2/celt/pitch.c000066400000000000000000000342731264527674100147320ustar00rootroot00000000000000/* Copyright (c) 2007-2008 CSIRO Copyright (c) 2007-2009 Xiph.Org Foundation Written by Jean-Marc Valin */ /** @file pitch.c @brief Pitch analysis */ /* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - 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. 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 OWNER 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. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "pitch.h" #include "os_support.h" #include "modes.h" #include "stack_alloc.h" #include "mathops.h" #include "celt_lpc.h" static void find_best_pitch(opus_val32 *xcorr, opus_val16 *y, int len, int max_pitch, int *best_pitch #ifdef FIXED_POINT , int yshift, opus_val32 maxcorr #endif ) { int i, j; opus_val32 Syy=1; opus_val16 best_num[2]; opus_val32 best_den[2]; #ifdef FIXED_POINT int xshift; xshift = celt_ilog2(maxcorr)-14; #endif best_num[0] = -1; best_num[1] = -1; best_den[0] = 0; best_den[1] = 0; best_pitch[0] = 0; best_pitch[1] = 1; for (j=0;j0) { opus_val16 num; opus_val32 xcorr16; xcorr16 = EXTRACT16(VSHR32(xcorr[i], xshift)); #ifndef FIXED_POINT /* Considering the range of xcorr16, this should avoid both underflows and overflows (inf) when squaring xcorr16 */ xcorr16 *= 1e-12f; #endif num = MULT16_16_Q15(xcorr16,xcorr16); if (MULT16_32_Q15(num,best_den[1]) > MULT16_32_Q15(best_num[1],Syy)) { if (MULT16_32_Q15(num,best_den[0]) > MULT16_32_Q15(best_num[0],Syy)) { best_num[1] = best_num[0]; best_den[1] = best_den[0]; best_pitch[1] = best_pitch[0]; best_num[0] = num; best_den[0] = Syy; best_pitch[0] = i; } else { best_num[1] = num; best_den[1] = Syy; best_pitch[1] = i; } } } Syy += SHR32(MULT16_16(y[i+len],y[i+len]),yshift) - SHR32(MULT16_16(y[i],y[i]),yshift); Syy = MAX32(1, Syy); } } static void celt_fir5(const opus_val16 *x, const opus_val16 *num, opus_val16 *y, int N, opus_val16 *mem) { int i; opus_val16 num0, num1, num2, num3, num4; opus_val32 mem0, mem1, mem2, mem3, mem4; num0=num[0]; num1=num[1]; num2=num[2]; num3=num[3]; num4=num[4]; mem0=mem[0]; mem1=mem[1]; mem2=mem[2]; mem3=mem[3]; mem4=mem[4]; for (i=0;i>1;i++) x_lp[i] = SHR32(HALF32(HALF32(x[0][(2*i-1)]+x[0][(2*i+1)])+x[0][2*i]), shift); x_lp[0] = SHR32(HALF32(HALF32(x[0][1])+x[0][0]), shift); if (C==2) { for (i=1;i>1;i++) x_lp[i] += SHR32(HALF32(HALF32(x[1][(2*i-1)]+x[1][(2*i+1)])+x[1][2*i]), shift); x_lp[0] += SHR32(HALF32(HALF32(x[1][1])+x[1][0]), shift); } _celt_autocorr(x_lp, ac, NULL, 0, 4, len>>1, arch); /* Noise floor -40 dB */ #ifdef FIXED_POINT ac[0] += SHR32(ac[0],13); #else ac[0] *= 1.0001f; #endif /* Lag windowing */ for (i=1;i<=4;i++) { /*ac[i] *= exp(-.5*(2*M_PI*.002*i)*(2*M_PI*.002*i));*/ #ifdef FIXED_POINT ac[i] -= MULT16_32_Q15(2*i*i, ac[i]); #else ac[i] -= ac[i]*(.008f*i)*(.008f*i); #endif } _celt_lpc(lpc, ac, 4); for (i=0;i<4;i++) { tmp = MULT16_16_Q15(QCONST16(.9f,15), tmp); lpc[i] = MULT16_16_Q15(lpc[i], tmp); } /* Add a zero */ lpc2[0] = lpc[0] + QCONST16(.8f,SIG_SHIFT); lpc2[1] = lpc[1] + MULT16_16_Q15(c1,lpc[0]); lpc2[2] = lpc[2] + MULT16_16_Q15(c1,lpc[1]); lpc2[3] = lpc[3] + MULT16_16_Q15(c1,lpc[2]); lpc2[4] = MULT16_16_Q15(c1,lpc[3]); celt_fir5(x_lp, lpc2, x_lp, len>>1, mem); } /* Pure C implementation. */ #ifdef FIXED_POINT opus_val32 #else void #endif #if defined(OVERRIDE_PITCH_XCORR) celt_pitch_xcorr_c(const opus_val16 *_x, const opus_val16 *_y, opus_val32 *xcorr, int len, int max_pitch) #else celt_pitch_xcorr(const opus_val16 *_x, const opus_val16 *_y, opus_val32 *xcorr, int len, int max_pitch, int arch) #endif { #if 0 /* This is a simple version of the pitch correlation that should work well on DSPs like Blackfin and TI C5x/C6x */ int i, j; #ifdef FIXED_POINT opus_val32 maxcorr=1; #endif #if !defined(OVERRIDE_PITCH_XCORR) (void)arch; #endif for (i=0;i0); celt_assert((((unsigned char *)_x-(unsigned char *)NULL)&3)==0); for (i=0;i0); celt_assert(max_pitch>0); lag = len+max_pitch; ALLOC(x_lp4, len>>2, opus_val16); ALLOC(y_lp4, lag>>2, opus_val16); ALLOC(xcorr, max_pitch>>1, opus_val32); /* Downsample by 2 again */ for (j=0;j>2;j++) x_lp4[j] = x_lp[2*j]; for (j=0;j>2;j++) y_lp4[j] = y[2*j]; #ifdef FIXED_POINT xmax = celt_maxabs16(x_lp4, len>>2); ymax = celt_maxabs16(y_lp4, lag>>2); shift = celt_ilog2(MAX32(1, MAX32(xmax, ymax)))-11; if (shift>0) { for (j=0;j>2;j++) x_lp4[j] = SHR16(x_lp4[j], shift); for (j=0;j>2;j++) y_lp4[j] = SHR16(y_lp4[j], shift); /* Use double the shift for a MAC */ shift *= 2; } else { shift = 0; } #endif /* Coarse search with 4x decimation */ #ifdef FIXED_POINT maxcorr = #endif celt_pitch_xcorr(x_lp4, y_lp4, xcorr, len>>2, max_pitch>>2, arch); find_best_pitch(xcorr, y_lp4, len>>2, max_pitch>>2, best_pitch #ifdef FIXED_POINT , 0, maxcorr #endif ); /* Finer search with 2x decimation */ #ifdef FIXED_POINT maxcorr=1; #endif for (i=0;i>1;i++) { opus_val32 sum; xcorr[i] = 0; if (abs(i-2*best_pitch[0])>2 && abs(i-2*best_pitch[1])>2) continue; #ifdef FIXED_POINT sum = 0; for (j=0;j>1;j++) sum += SHR32(MULT16_16(x_lp[j],y[i+j]), shift); #else sum = celt_inner_prod_c(x_lp, y+i, len>>1); #endif xcorr[i] = MAX32(-1, sum); #ifdef FIXED_POINT maxcorr = MAX32(maxcorr, sum); #endif } find_best_pitch(xcorr, y, len>>1, max_pitch>>1, best_pitch #ifdef FIXED_POINT , shift+1, maxcorr #endif ); /* Refine by pseudo-interpolation */ if (best_pitch[0]>0 && best_pitch[0]<(max_pitch>>1)-1) { opus_val32 a, b, c; a = xcorr[best_pitch[0]-1]; b = xcorr[best_pitch[0]]; c = xcorr[best_pitch[0]+1]; if ((c-a) > MULT16_32_Q15(QCONST16(.7f,15),b-a)) offset = 1; else if ((a-c) > MULT16_32_Q15(QCONST16(.7f,15),b-c)) offset = -1; else offset = 0; } else { offset = 0; } *pitch = 2*best_pitch[0]-offset; RESTORE_STACK; } static const int second_check[16] = {0, 0, 3, 2, 3, 2, 5, 2, 3, 2, 3, 2, 5, 2, 3, 2}; opus_val16 remove_doubling(opus_val16 *x, int maxperiod, int minperiod, int N, int *T0_, int prev_period, opus_val16 prev_gain, int arch) { int k, i, T, T0; opus_val16 g, g0; opus_val16 pg; opus_val32 xy,xx,yy,xy2; opus_val32 xcorr[3]; opus_val32 best_xy, best_yy; int offset; int minperiod0; VARDECL(opus_val32, yy_lookup); SAVE_STACK; minperiod0 = minperiod; maxperiod /= 2; minperiod /= 2; *T0_ /= 2; prev_period /= 2; N /= 2; x += maxperiod; if (*T0_>=maxperiod) *T0_=maxperiod-1; T = T0 = *T0_; ALLOC(yy_lookup, maxperiod+1, opus_val32); dual_inner_prod(x, x, x-T0, N, &xx, &xy, arch); yy_lookup[0] = xx; yy=xx; for (i=1;i<=maxperiod;i++) { yy = yy+MULT16_16(x[-i],x[-i])-MULT16_16(x[N-i],x[N-i]); yy_lookup[i] = MAX32(0, yy); } yy = yy_lookup[T0]; best_xy = xy; best_yy = yy; #ifdef FIXED_POINT { opus_val32 x2y2; int sh, t; x2y2 = 1+HALF32(MULT32_32_Q31(xx,yy)); sh = celt_ilog2(x2y2)>>1; t = VSHR32(x2y2, 2*(sh-7)); g = g0 = VSHR32(MULT16_32_Q15(celt_rsqrt_norm(t), xy),sh+1); } #else g = g0 = xy/celt_sqrt(1+xx*yy); #endif /* Look for any pitch at T/k */ for (k=2;k<=15;k++) { int T1, T1b; opus_val16 g1; opus_val16 cont=0; opus_val16 thresh; T1 = celt_udiv(2*T0+k, 2*k); if (T1 < minperiod) break; /* Look for another strong correlation at T1b */ if (k==2) { if (T1+T0>maxperiod) T1b = T0; else T1b = T0+T1; } else { T1b = celt_udiv(2*second_check[k]*T0+k, 2*k); } dual_inner_prod(x, &x[-T1], &x[-T1b], N, &xy, &xy2, arch); xy += xy2; yy = yy_lookup[T1] + yy_lookup[T1b]; #ifdef FIXED_POINT { opus_val32 x2y2; int sh, t; x2y2 = 1+MULT32_32_Q31(xx,yy); sh = celt_ilog2(x2y2)>>1; t = VSHR32(x2y2, 2*(sh-7)); g1 = VSHR32(MULT16_32_Q15(celt_rsqrt_norm(t), xy),sh+1); } #else g1 = xy/celt_sqrt(1+2.f*xx*1.f*yy); #endif if (abs(T1-prev_period)<=1) cont = prev_gain; else if (abs(T1-prev_period)<=2 && 5*k*k < T0) cont = HALF32(prev_gain); else cont = 0; thresh = MAX16(QCONST16(.3f,15), MULT16_16_Q15(QCONST16(.7f,15),g0)-cont); /* Bias against very high pitch (very short period) to avoid false-positives due to short-term correlation */ if (T1<3*minperiod) thresh = MAX16(QCONST16(.4f,15), MULT16_16_Q15(QCONST16(.85f,15),g0)-cont); else if (T1<2*minperiod) thresh = MAX16(QCONST16(.5f,15), MULT16_16_Q15(QCONST16(.9f,15),g0)-cont); if (g1 > thresh) { best_xy = xy; best_yy = yy; T = T1; g = g1; } } best_xy = MAX32(0, best_xy); if (best_yy <= best_xy) pg = Q15ONE; else pg = SHR32(frac_div32(best_xy,best_yy+1),16); for (k=0;k<3;k++) xcorr[k] = celt_inner_prod(x, x-(T+k-1), N, arch); if ((xcorr[2]-xcorr[0]) > MULT16_32_Q15(QCONST16(.7f,15),xcorr[1]-xcorr[0])) offset = 1; else if ((xcorr[0]-xcorr[2]) > MULT16_32_Q15(QCONST16(.7f,15),xcorr[1]-xcorr[2])) offset = -1; else offset = 0; if (pg > g) pg = g; *T0_ = 2*T+offset; if (*T0_=3); y_3=0; /* gcc doesn't realize that y_3 can't be used uninitialized */ y_0=*y++; y_1=*y++; y_2=*y++; for (j=0;j #include "os_support.h" #include "arch.h" #include "mathops.h" #include "stack_alloc.h" #include "rate.h" #ifdef FIXED_POINT /* Mean energy in each band quantized in Q4 */ const signed char eMeans[25] = { 103,100, 92, 85, 81, 77, 72, 70, 78, 75, 73, 71, 78, 74, 69, 72, 70, 74, 76, 71, 60, 60, 60, 60, 60 }; #else /* Mean energy in each band quantized in Q4 and converted back to float */ const opus_val16 eMeans[25] = { 6.437500f, 6.250000f, 5.750000f, 5.312500f, 5.062500f, 4.812500f, 4.500000f, 4.375000f, 4.875000f, 4.687500f, 4.562500f, 4.437500f, 4.875000f, 4.625000f, 4.312500f, 4.500000f, 4.375000f, 4.625000f, 4.750000f, 4.437500f, 3.750000f, 3.750000f, 3.750000f, 3.750000f, 3.750000f }; #endif /* prediction coefficients: 0.9, 0.8, 0.65, 0.5 */ #ifdef FIXED_POINT static const opus_val16 pred_coef[4] = {29440, 26112, 21248, 16384}; static const opus_val16 beta_coef[4] = {30147, 22282, 12124, 6554}; static const opus_val16 beta_intra = 4915; #else static const opus_val16 pred_coef[4] = {29440/32768., 26112/32768., 21248/32768., 16384/32768.}; static const opus_val16 beta_coef[4] = {30147/32768., 22282/32768., 12124/32768., 6554/32768.}; static const opus_val16 beta_intra = 4915/32768.; #endif /*Parameters of the Laplace-like probability models used for the coarse energy. There is one pair of parameters for each frame size, prediction type (inter/intra), and band number. The first number of each pair is the probability of 0, and the second is the decay rate, both in Q8 precision.*/ static const unsigned char e_prob_model[4][2][42] = { /*120 sample frames.*/ { /*Inter*/ { 72, 127, 65, 129, 66, 128, 65, 128, 64, 128, 62, 128, 64, 128, 64, 128, 92, 78, 92, 79, 92, 78, 90, 79, 116, 41, 115, 40, 114, 40, 132, 26, 132, 26, 145, 17, 161, 12, 176, 10, 177, 11 }, /*Intra*/ { 24, 179, 48, 138, 54, 135, 54, 132, 53, 134, 56, 133, 55, 132, 55, 132, 61, 114, 70, 96, 74, 88, 75, 88, 87, 74, 89, 66, 91, 67, 100, 59, 108, 50, 120, 40, 122, 37, 97, 43, 78, 50 } }, /*240 sample frames.*/ { /*Inter*/ { 83, 78, 84, 81, 88, 75, 86, 74, 87, 71, 90, 73, 93, 74, 93, 74, 109, 40, 114, 36, 117, 34, 117, 34, 143, 17, 145, 18, 146, 19, 162, 12, 165, 10, 178, 7, 189, 6, 190, 8, 177, 9 }, /*Intra*/ { 23, 178, 54, 115, 63, 102, 66, 98, 69, 99, 74, 89, 71, 91, 73, 91, 78, 89, 86, 80, 92, 66, 93, 64, 102, 59, 103, 60, 104, 60, 117, 52, 123, 44, 138, 35, 133, 31, 97, 38, 77, 45 } }, /*480 sample frames.*/ { /*Inter*/ { 61, 90, 93, 60, 105, 42, 107, 41, 110, 45, 116, 38, 113, 38, 112, 38, 124, 26, 132, 27, 136, 19, 140, 20, 155, 14, 159, 16, 158, 18, 170, 13, 177, 10, 187, 8, 192, 6, 175, 9, 159, 10 }, /*Intra*/ { 21, 178, 59, 110, 71, 86, 75, 85, 84, 83, 91, 66, 88, 73, 87, 72, 92, 75, 98, 72, 105, 58, 107, 54, 115, 52, 114, 55, 112, 56, 129, 51, 132, 40, 150, 33, 140, 29, 98, 35, 77, 42 } }, /*960 sample frames.*/ { /*Inter*/ { 42, 121, 96, 66, 108, 43, 111, 40, 117, 44, 123, 32, 120, 36, 119, 33, 127, 33, 134, 34, 139, 21, 147, 23, 152, 20, 158, 25, 154, 26, 166, 21, 173, 16, 184, 13, 184, 10, 150, 13, 139, 15 }, /*Intra*/ { 22, 178, 63, 114, 74, 82, 84, 83, 92, 82, 103, 62, 96, 72, 96, 67, 101, 73, 107, 72, 113, 55, 118, 52, 125, 52, 118, 52, 117, 55, 135, 49, 137, 39, 157, 32, 145, 29, 97, 33, 77, 40 } } }; static const unsigned char small_energy_icdf[3]={2,1,0}; static opus_val32 loss_distortion(const opus_val16 *eBands, opus_val16 *oldEBands, int start, int end, int len, int C) { int c, i; opus_val32 dist = 0; c=0; do { for (i=start;inbEBands]; oldE = MAX16(-QCONST16(9.f,DB_SHIFT), oldEBands[i+c*m->nbEBands]); #ifdef FIXED_POINT f = SHL32(EXTEND32(x),7) - PSHR32(MULT16_16(coef,oldE), 8) - prev[c]; /* Rounding to nearest integer here is really important! */ qi = (f+QCONST32(.5f,DB_SHIFT+7))>>(DB_SHIFT+7); decay_bound = EXTRACT16(MAX32(-QCONST16(28.f,DB_SHIFT), SUB32((opus_val32)oldEBands[i+c*m->nbEBands],max_decay))); #else f = x-coef*oldE-prev[c]; /* Rounding to nearest integer here is really important! */ qi = (int)floor(.5f+f); decay_bound = MAX16(-QCONST16(28.f,DB_SHIFT), oldEBands[i+c*m->nbEBands]) - max_decay; #endif /* Prevent the energy from going down too quickly (e.g. for bands that have just one bin) */ if (qi < 0 && x < decay_bound) { qi += (int)SHR16(SUB16(decay_bound,x), DB_SHIFT); if (qi > 0) qi = 0; } qi0 = qi; /* If we don't have enough bits to encode all the energy, just assume something safe. */ tell = ec_tell(enc); bits_left = budget-tell-3*C*(end-i); if (i!=start && bits_left < 30) { if (bits_left < 24) qi = IMIN(1, qi); if (bits_left < 16) qi = IMAX(-1, qi); } if (lfe && i>=2) qi = IMIN(qi, 0); if (budget-tell >= 15) { int pi; pi = 2*IMIN(i,20); ec_laplace_encode(enc, &qi, prob_model[pi]<<7, prob_model[pi+1]<<6); } else if(budget-tell >= 2) { qi = IMAX(-1, IMIN(qi, 1)); ec_enc_icdf(enc, 2*qi^-(qi<0), small_energy_icdf, 2); } else if(budget-tell >= 1) { qi = IMIN(0, qi); ec_enc_bit_logp(enc, -qi, 1); } else qi = -1; error[i+c*m->nbEBands] = PSHR32(f,7) - SHL16(qi,DB_SHIFT); badness += abs(qi0-qi); q = (opus_val32)SHL32(EXTEND32(qi),DB_SHIFT); tmp = PSHR32(MULT16_16(coef,oldE),8) + prev[c] + SHL32(q,7); #ifdef FIXED_POINT tmp = MAX32(-QCONST32(28.f, DB_SHIFT+7), tmp); #endif oldEBands[i+c*m->nbEBands] = PSHR32(tmp, 7); prev[c] = prev[c] + SHL32(q,7) - MULT16_16(beta,PSHR32(q,8)); } while (++c < C); } return lfe ? 0 : badness; } void quant_coarse_energy(const CELTMode *m, int start, int end, int effEnd, const opus_val16 *eBands, opus_val16 *oldEBands, opus_uint32 budget, opus_val16 *error, ec_enc *enc, int C, int LM, int nbAvailableBytes, int force_intra, opus_val32 *delayedIntra, int two_pass, int loss_rate, int lfe) { int intra; opus_val16 max_decay; VARDECL(opus_val16, oldEBands_intra); VARDECL(opus_val16, error_intra); ec_enc enc_start_state; opus_uint32 tell; int badness1=0; opus_int32 intra_bias; opus_val32 new_distortion; SAVE_STACK; intra = force_intra || (!two_pass && *delayedIntra>2*C*(end-start) && nbAvailableBytes > (end-start)*C); intra_bias = (opus_int32)((budget**delayedIntra*loss_rate)/(C*512)); new_distortion = loss_distortion(eBands, oldEBands, start, effEnd, m->nbEBands, C); tell = ec_tell(enc); if (tell+3 > budget) two_pass = intra = 0; max_decay = QCONST16(16.f,DB_SHIFT); if (end-start>10) { #ifdef FIXED_POINT max_decay = MIN32(max_decay, SHL32(EXTEND32(nbAvailableBytes),DB_SHIFT-3)); #else max_decay = MIN32(max_decay, .125f*nbAvailableBytes); #endif } if (lfe) max_decay = QCONST16(3.f,DB_SHIFT); enc_start_state = *enc; ALLOC(oldEBands_intra, C*m->nbEBands, opus_val16); ALLOC(error_intra, C*m->nbEBands, opus_val16); OPUS_COPY(oldEBands_intra, oldEBands, C*m->nbEBands); if (two_pass || intra) { badness1 = quant_coarse_energy_impl(m, start, end, eBands, oldEBands_intra, budget, tell, e_prob_model[LM][1], error_intra, enc, C, LM, 1, max_decay, lfe); } if (!intra) { unsigned char *intra_buf; ec_enc enc_intra_state; opus_int32 tell_intra; opus_uint32 nstart_bytes; opus_uint32 nintra_bytes; opus_uint32 save_bytes; int badness2; VARDECL(unsigned char, intra_bits); tell_intra = ec_tell_frac(enc); enc_intra_state = *enc; nstart_bytes = ec_range_bytes(&enc_start_state); nintra_bytes = ec_range_bytes(&enc_intra_state); intra_buf = ec_get_buffer(&enc_intra_state) + nstart_bytes; save_bytes = nintra_bytes-nstart_bytes; if (save_bytes == 0) save_bytes = ALLOC_NONE; ALLOC(intra_bits, save_bytes, unsigned char); /* Copy bits from intra bit-stream */ OPUS_COPY(intra_bits, intra_buf, nintra_bytes - nstart_bytes); *enc = enc_start_state; badness2 = quant_coarse_energy_impl(m, start, end, eBands, oldEBands, budget, tell, e_prob_model[LM][intra], error, enc, C, LM, 0, max_decay, lfe); if (two_pass && (badness1 < badness2 || (badness1 == badness2 && ((opus_int32)ec_tell_frac(enc))+intra_bias > tell_intra))) { *enc = enc_intra_state; /* Copy intra bits to bit-stream */ OPUS_COPY(intra_buf, intra_bits, nintra_bytes - nstart_bytes); OPUS_COPY(oldEBands, oldEBands_intra, C*m->nbEBands); OPUS_COPY(error, error_intra, C*m->nbEBands); intra = 1; } } else { OPUS_COPY(oldEBands, oldEBands_intra, C*m->nbEBands); OPUS_COPY(error, error_intra, C*m->nbEBands); } if (intra) *delayedIntra = new_distortion; else *delayedIntra = ADD32(MULT16_32_Q15(MULT16_16_Q15(pred_coef[LM], pred_coef[LM]),*delayedIntra), new_distortion); RESTORE_STACK; } void quant_fine_energy(const CELTMode *m, int start, int end, opus_val16 *oldEBands, opus_val16 *error, int *fine_quant, ec_enc *enc, int C) { int i, c; /* Encode finer resolution */ for (i=start;inbEBands]+QCONST16(.5f,DB_SHIFT))>>(DB_SHIFT-fine_quant[i]); #else q2 = (int)floor((error[i+c*m->nbEBands]+.5f)*frac); #endif if (q2 > frac-1) q2 = frac-1; if (q2<0) q2 = 0; ec_enc_bits(enc, q2, fine_quant[i]); #ifdef FIXED_POINT offset = SUB16(SHR32(SHL32(EXTEND32(q2),DB_SHIFT)+QCONST16(.5f,DB_SHIFT),fine_quant[i]),QCONST16(.5f,DB_SHIFT)); #else offset = (q2+.5f)*(1<<(14-fine_quant[i]))*(1.f/16384) - .5f; #endif oldEBands[i+c*m->nbEBands] += offset; error[i+c*m->nbEBands] -= offset; /*printf ("%f ", error[i] - offset);*/ } while (++c < C); } } void quant_energy_finalise(const CELTMode *m, int start, int end, opus_val16 *oldEBands, opus_val16 *error, int *fine_quant, int *fine_priority, int bits_left, ec_enc *enc, int C) { int i, prio, c; /* Use up the remaining bits */ for (prio=0;prio<2;prio++) { for (i=start;i=C ;i++) { if (fine_quant[i] >= MAX_FINE_BITS || fine_priority[i]!=prio) continue; c=0; do { int q2; opus_val16 offset; q2 = error[i+c*m->nbEBands]<0 ? 0 : 1; ec_enc_bits(enc, q2, 1); #ifdef FIXED_POINT offset = SHR16(SHL16(q2,DB_SHIFT)-QCONST16(.5f,DB_SHIFT),fine_quant[i]+1); #else offset = (q2-.5f)*(1<<(14-fine_quant[i]-1))*(1.f/16384); #endif oldEBands[i+c*m->nbEBands] += offset; bits_left--; } while (++c < C); } } } void unquant_coarse_energy(const CELTMode *m, int start, int end, opus_val16 *oldEBands, int intra, ec_dec *dec, int C, int LM) { const unsigned char *prob_model = e_prob_model[LM][intra]; int i, c; opus_val32 prev[2] = {0, 0}; opus_val16 coef; opus_val16 beta; opus_int32 budget; opus_int32 tell; if (intra) { coef = 0; beta = beta_intra; } else { beta = beta_coef[LM]; coef = pred_coef[LM]; } budget = dec->storage*8; /* Decode at a fixed coarse resolution */ for (i=start;i=15) { int pi; pi = 2*IMIN(i,20); qi = ec_laplace_decode(dec, prob_model[pi]<<7, prob_model[pi+1]<<6); } else if(budget-tell>=2) { qi = ec_dec_icdf(dec, small_energy_icdf, 2); qi = (qi>>1)^-(qi&1); } else if(budget-tell>=1) { qi = -ec_dec_bit_logp(dec, 1); } else qi = -1; q = (opus_val32)SHL32(EXTEND32(qi),DB_SHIFT); oldEBands[i+c*m->nbEBands] = MAX16(-QCONST16(9.f,DB_SHIFT), oldEBands[i+c*m->nbEBands]); tmp = PSHR32(MULT16_16(coef,oldEBands[i+c*m->nbEBands]),8) + prev[c] + SHL32(q,7); #ifdef FIXED_POINT tmp = MAX32(-QCONST32(28.f, DB_SHIFT+7), tmp); #endif oldEBands[i+c*m->nbEBands] = PSHR32(tmp, 7); prev[c] = prev[c] + SHL32(q,7) - MULT16_16(beta,PSHR32(q,8)); } while (++c < C); } } void unquant_fine_energy(const CELTMode *m, int start, int end, opus_val16 *oldEBands, int *fine_quant, ec_dec *dec, int C) { int i, c; /* Decode finer resolution */ for (i=start;inbEBands] += offset; } while (++c < C); } } void unquant_energy_finalise(const CELTMode *m, int start, int end, opus_val16 *oldEBands, int *fine_quant, int *fine_priority, int bits_left, ec_dec *dec, int C) { int i, prio, c; /* Use up the remaining bits */ for (prio=0;prio<2;prio++) { for (i=start;i=C ;i++) { if (fine_quant[i] >= MAX_FINE_BITS || fine_priority[i]!=prio) continue; c=0; do { int q2; opus_val16 offset; q2 = ec_dec_bits(dec, 1); #ifdef FIXED_POINT offset = SHR16(SHL16(q2,DB_SHIFT)-QCONST16(.5f,DB_SHIFT),fine_quant[i]+1); #else offset = (q2-.5f)*(1<<(14-fine_quant[i]-1))*(1.f/16384); #endif oldEBands[i+c*m->nbEBands] += offset; bits_left--; } while (++c < C); } } } void amp2Log2(const CELTMode *m, int effEnd, int end, celt_ener *bandE, opus_val16 *bandLogE, int C) { int c, i; c=0; do { for (i=0;inbEBands] = celt_log2(SHL32(bandE[i+c*m->nbEBands],2)) - SHL16((opus_val16)eMeans[i],6); for (i=effEnd;inbEBands+i] = -QCONST16(14.f,DB_SHIFT); } while (++c < C); } opus-1.1.2/celt/quant_bands.h000066400000000000000000000056361264527674100161300ustar00rootroot00000000000000/* Copyright (c) 2007-2008 CSIRO Copyright (c) 2007-2009 Xiph.Org Foundation Written by Jean-Marc Valin */ /* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - 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. 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 OWNER 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. */ #ifndef QUANT_BANDS #define QUANT_BANDS #include "arch.h" #include "modes.h" #include "entenc.h" #include "entdec.h" #include "mathops.h" #ifdef FIXED_POINT extern const signed char eMeans[25]; #else extern const opus_val16 eMeans[25]; #endif void amp2Log2(const CELTMode *m, int effEnd, int end, celt_ener *bandE, opus_val16 *bandLogE, int C); void log2Amp(const CELTMode *m, int start, int end, celt_ener *eBands, const opus_val16 *oldEBands, int C); void quant_coarse_energy(const CELTMode *m, int start, int end, int effEnd, const opus_val16 *eBands, opus_val16 *oldEBands, opus_uint32 budget, opus_val16 *error, ec_enc *enc, int C, int LM, int nbAvailableBytes, int force_intra, opus_val32 *delayedIntra, int two_pass, int loss_rate, int lfe); void quant_fine_energy(const CELTMode *m, int start, int end, opus_val16 *oldEBands, opus_val16 *error, int *fine_quant, ec_enc *enc, int C); void quant_energy_finalise(const CELTMode *m, int start, int end, opus_val16 *oldEBands, opus_val16 *error, int *fine_quant, int *fine_priority, int bits_left, ec_enc *enc, int C); void unquant_coarse_energy(const CELTMode *m, int start, int end, opus_val16 *oldEBands, int intra, ec_dec *dec, int C, int LM); void unquant_fine_energy(const CELTMode *m, int start, int end, opus_val16 *oldEBands, int *fine_quant, ec_dec *dec, int C); void unquant_energy_finalise(const CELTMode *m, int start, int end, opus_val16 *oldEBands, int *fine_quant, int *fine_priority, int bits_left, ec_dec *dec, int C); #endif /* QUANT_BANDS */ opus-1.1.2/celt/rate.c000066400000000000000000000513131264527674100145500ustar00rootroot00000000000000/* Copyright (c) 2007-2008 CSIRO Copyright (c) 2007-2009 Xiph.Org Foundation Written by Jean-Marc Valin */ /* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - 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. 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 OWNER 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. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include "modes.h" #include "cwrs.h" #include "arch.h" #include "os_support.h" #include "entcode.h" #include "rate.h" static const unsigned char LOG2_FRAC_TABLE[24]={ 0, 8,13, 16,19,21,23, 24,26,27,28,29,30,31,32, 32,33,34,34,35,36,36,37,37 }; #ifdef CUSTOM_MODES /*Determines if V(N,K) fits in a 32-bit unsigned integer. N and K are themselves limited to 15 bits.*/ static int fits_in32(int _n, int _k) { static const opus_int16 maxN[15] = { 32767, 32767, 32767, 1476, 283, 109, 60, 40, 29, 24, 20, 18, 16, 14, 13}; static const opus_int16 maxK[15] = { 32767, 32767, 32767, 32767, 1172, 238, 95, 53, 36, 27, 22, 18, 16, 15, 13}; if (_n>=14) { if (_k>=14) return 0; else return _n <= maxN[_k]; } else { return _k <= maxK[_n]; } } void compute_pulse_cache(CELTMode *m, int LM) { int C; int i; int j; int curr=0; int nbEntries=0; int entryN[100], entryK[100], entryI[100]; const opus_int16 *eBands = m->eBands; PulseCache *cache = &m->cache; opus_int16 *cindex; unsigned char *bits; unsigned char *cap; cindex = (opus_int16 *)opus_alloc(sizeof(cache->index[0])*m->nbEBands*(LM+2)); cache->index = cindex; /* Scan for all unique band sizes */ for (i=0;i<=LM+1;i++) { for (j=0;jnbEBands;j++) { int k; int N = (eBands[j+1]-eBands[j])<>1; cindex[i*m->nbEBands+j] = -1; /* Find other bands that have the same size */ for (k=0;k<=i;k++) { int n; for (n=0;nnbEBands && (k!=i || n>1) { cindex[i*m->nbEBands+j] = cindex[k*m->nbEBands+n]; break; } } } if (cache->index[i*m->nbEBands+j] == -1 && N!=0) { int K; entryN[nbEntries] = N; K = 0; while (fits_in32(N,get_pulses(K+1)) && KnbEBands+j] = curr; entryI[nbEntries] = curr; curr += K+1; nbEntries++; } } } bits = (unsigned char *)opus_alloc(sizeof(unsigned char)*curr); cache->bits = bits; cache->size = curr; /* Compute the cache for all unique sizes */ for (i=0;icaps = cap = (unsigned char *)opus_alloc(sizeof(cache->caps[0])*(LM+1)*2*m->nbEBands); for (i=0;i<=LM;i++) { for (C=1;C<=2;C++) { for (j=0;jnbEBands;j++) { int N0; int max_bits; N0 = m->eBands[j+1]-m->eBands[j]; /* N=1 bands only have a sign bit and fine bits. */ if (N0<1 are even, including custom modes.*/ if (N0 > 2) { N0>>=1; LM0--; } /* N0=1 bands can't be split down to N<2. */ else if (N0 <= 1) { LM0=IMIN(i,1); N0<<=LM0; } /* Compute the cost for the lowest-level PVQ of a fully split band. */ pcache = bits + cindex[(LM0+1)*m->nbEBands+j]; max_bits = pcache[pcache[0]]+1; /* Add in the cost of coding regular splits. */ N = N0; for(k=0;klogN[j]+((LM0+k)<>1)-QTHETA_OFFSET; /* The number of qtheta bits we'll allocate if the remainder is to be max_bits. The average measured cost for theta is 0.89701 times qb, approximated here as 459/512. */ num=459*(opus_int32)((2*N-1)*offset+max_bits); den=((opus_int32)(2*N-1)<<9)-459; qb = IMIN((num+(den>>1))/den, 57); celt_assert(qb >= 0); max_bits += qb; N <<= 1; } /* Add in the cost of a stereo split, if necessary. */ if (C==2) { max_bits <<= 1; offset = ((m->logN[j]+(i<>1)-(N==2?QTHETA_OFFSET_TWOPHASE:QTHETA_OFFSET); ndof = 2*N-1-(N==2); /* The average measured cost for theta with the step PDF is 0.95164 times qb, approximated here as 487/512. */ num = (N==2?512:487)*(opus_int32)(max_bits+ndof*offset); den = ((opus_int32)ndof<<9)-(N==2?512:487); qb = IMIN((num+(den>>1))/den, (N==2?64:61)); celt_assert(qb >= 0); max_bits += qb; } /* Add the fine bits we'll use. */ /* Compensate for the extra DoF in stereo */ ndof = C*N + ((C==2 && N>2) ? 1 : 0); /* Offset the number of fine bits by log2(N)/2 + FINE_OFFSET compared to their "fair share" of total/N */ offset = ((m->logN[j] + (i<>1)-FINE_OFFSET; /* N=2 is the only point that doesn't match the curve */ if (N==2) offset += 1<>2; /* The number of fine bits we'll allocate if the remainder is to be max_bits. */ num = max_bits+ndof*offset; den = (ndof-1)<>1))/den, MAX_FINE_BITS); celt_assert(qb >= 0); max_bits += C*qb<eBands[j+1]-m->eBands[j])<= 0); celt_assert(max_bits < 256); *cap++ = (unsigned char)max_bits; } } } } #endif /* CUSTOM_MODES */ #define ALLOC_STEPS 6 static OPUS_INLINE int interp_bits2pulses(const CELTMode *m, int start, int end, int skip_start, const int *bits1, const int *bits2, const int *thresh, const int *cap, opus_int32 total, opus_int32 *_balance, int skip_rsv, int *intensity, int intensity_rsv, int *dual_stereo, int dual_stereo_rsv, int *bits, int *ebits, int *fine_priority, int C, int LM, ec_ctx *ec, int encode, int prev, int signalBandwidth) { opus_int32 psum; int lo, hi; int i, j; int logM; int stereo; int codedBands=-1; int alloc_floor; opus_int32 left, percoeff; int done; opus_int32 balance; SAVE_STACK; alloc_floor = C<1; logM = LM<>1; psum = 0; done = 0; for (j=end;j-->start;) { int tmp = bits1[j] + (mid*(opus_int32)bits2[j]>>ALLOC_STEPS); if (tmp >= thresh[j] || done) { done = 1; /* Don't allocate more than we can actually use */ psum += IMIN(tmp, cap[j]); } else { if (tmp >= alloc_floor) psum += alloc_floor; } } if (psum > total) hi = mid; else lo = mid; } psum = 0; /*printf ("interp bisection gave %d\n", lo);*/ done = 0; for (j=end;j-->start;) { int tmp = bits1[j] + (lo*bits2[j]>>ALLOC_STEPS); if (tmp < thresh[j] && !done) { if (tmp >= alloc_floor) tmp = alloc_floor; else tmp = 0; } else done = 1; /* Don't allocate more than we can actually use */ tmp = IMIN(tmp, cap[j]); bits[j] = tmp; psum += tmp; } /* Decide which bands to skip, working backwards from the end. */ for (codedBands=end;;codedBands--) { int band_width; int band_bits; int rem; j = codedBands-1; /* Never skip the first band, nor a band that has been boosted by dynalloc. In the first case, we'd be coding a bit to signal we're going to waste all the other bits. In the second case, we'd be coding a bit to redistribute all the bits we just signaled should be cocentrated in this band. */ if (j<=skip_start) { /* Give the bit we reserved to end skipping back. */ total += skip_rsv; break; } /*Figure out how many left-over bits we would be adding to this band. This can include bits we've stolen back from higher, skipped bands.*/ left = total-psum; percoeff = celt_udiv(left, m->eBands[codedBands]-m->eBands[start]); left -= (m->eBands[codedBands]-m->eBands[start])*percoeff; rem = IMAX(left-(m->eBands[j]-m->eBands[start]),0); band_width = m->eBands[codedBands]-m->eBands[j]; band_bits = (int)(bits[j] + percoeff*band_width + rem); /*Only code a skip decision if we're above the threshold for this band. Otherwise it is force-skipped. This ensures that we have enough bits to code the skip flag.*/ if (band_bits >= IMAX(thresh[j], alloc_floor+(1< ((j>4 && j<=signalBandwidth)) #endif { ec_enc_bit_logp(ec, 1, 1); break; } ec_enc_bit_logp(ec, 0, 1); } else if (ec_dec_bit_logp(ec, 1)) { break; } /*We used a bit to skip this band.*/ psum += 1< 0) intensity_rsv = LOG2_FRAC_TABLE[j-start]; psum += intensity_rsv; if (band_bits >= alloc_floor) { /*If we have enough for a fine energy bit per channel, use it.*/ psum += alloc_floor; bits[j] = alloc_floor; } else { /*Otherwise this band gets nothing at all.*/ bits[j] = 0; } } celt_assert(codedBands > start); /* Code the intensity and dual stereo parameters. */ if (intensity_rsv > 0) { if (encode) { *intensity = IMIN(*intensity, codedBands); ec_enc_uint(ec, *intensity-start, codedBands+1-start); } else *intensity = start+ec_dec_uint(ec, codedBands+1-start); } else *intensity = 0; if (*intensity <= start) { total += dual_stereo_rsv; dual_stereo_rsv = 0; } if (dual_stereo_rsv > 0) { if (encode) ec_enc_bit_logp(ec, *dual_stereo, 1); else *dual_stereo = ec_dec_bit_logp(ec, 1); } else *dual_stereo = 0; /* Allocate the remaining bits */ left = total-psum; percoeff = celt_udiv(left, m->eBands[codedBands]-m->eBands[start]); left -= (m->eBands[codedBands]-m->eBands[start])*percoeff; for (j=start;jeBands[j+1]-m->eBands[j])); for (j=start;jeBands[j+1]-m->eBands[j]); bits[j] += tmp; left -= tmp; } /*for (j=0;j= 0); N0 = m->eBands[j+1]-m->eBands[j]; N=N0<1) { excess = MAX32(bit-cap[j],0); bits[j] = bit-excess; /* Compensate for the extra DoF in stereo */ den=(C*N+ ((C==2 && N>2 && !*dual_stereo && j<*intensity) ? 1 : 0)); NClogN = den*(m->logN[j] + logM); /* Offset for the number of fine bits by log2(N)/2 + FINE_OFFSET compared to their "fair share" of total/N */ offset = (NClogN>>1)-den*FINE_OFFSET; /* N=2 is the only point that doesn't match the curve */ if (N==2) offset += den<>2; /* Changing the offset for allocating the second and third fine energy bit */ if (bits[j] + offset < den*2<>2; else if (bits[j] + offset < den*3<>3; /* Divide with rounding */ ebits[j] = IMAX(0, (bits[j] + offset + (den<<(BITRES-1)))); ebits[j] = celt_udiv(ebits[j], den)>>BITRES; /* Make sure not to bust */ if (C*ebits[j] > (bits[j]>>BITRES)) ebits[j] = bits[j] >> stereo >> BITRES; /* More than that is useless because that's about as far as PVQ can go */ ebits[j] = IMIN(ebits[j], MAX_FINE_BITS); /* If we rounded down or capped this band, make it a candidate for the final fine energy pass */ fine_priority[j] = ebits[j]*(den<= bits[j]+offset; /* Remove the allocated fine bits; the rest are assigned to PVQ */ bits[j] -= C*ebits[j]< 0) { int extra_fine; int extra_bits; extra_fine = IMIN(excess>>(stereo+BITRES),MAX_FINE_BITS-ebits[j]); ebits[j] += extra_fine; extra_bits = extra_fine*C<= excess-balance; excess -= extra_bits; } balance = excess; celt_assert(bits[j] >= 0); celt_assert(ebits[j] >= 0); } /* Save any remaining bits over the cap for the rebalancing in quant_all_bands(). */ *_balance = balance; /* The skipped bands use all their bits for fine energy. */ for (;j> stereo >> BITRES; celt_assert(C*ebits[j]<nbEBands; skip_start = start; /* Reserve a bit to signal the end of manually skipped bands. */ skip_rsv = total >= 1<total) intensity_rsv = 0; else { total -= intensity_rsv; dual_stereo_rsv = total>=1<eBands[j+1]-m->eBands[j])<>4); /* Tilt of the allocation curve */ trim_offset[j] = C*(m->eBands[j+1]-m->eBands[j])*(alloc_trim-5-LM)*(end-j-1) *(1<<(LM+BITRES))>>6; /* Giving less resolution to single-coefficient bands because they get more benefit from having one coarse value per coefficient*/ if ((m->eBands[j+1]-m->eBands[j])<nbAllocVectors - 1; do { int done = 0; int psum = 0; int mid = (lo+hi) >> 1; for (j=end;j-->start;) { int bitsj; int N = m->eBands[j+1]-m->eBands[j]; bitsj = C*N*m->allocVectors[mid*len+j]<>2; if (bitsj > 0) bitsj = IMAX(0, bitsj + trim_offset[j]); bitsj += offsets[j]; if (bitsj >= thresh[j] || done) { done = 1; /* Don't allocate more than we can actually use */ psum += IMIN(bitsj, cap[j]); } else { if (bitsj >= C< total) hi = mid - 1; else lo = mid + 1; /*printf ("lo = %d, hi = %d\n", lo, hi);*/ } while (lo <= hi); hi = lo--; /*printf ("interp between %d and %d\n", lo, hi);*/ for (j=start;jeBands[j+1]-m->eBands[j]; bits1j = C*N*m->allocVectors[lo*len+j]<>2; bits2j = hi>=m->nbAllocVectors ? cap[j] : C*N*m->allocVectors[hi*len+j]<>2; if (bits1j > 0) bits1j = IMAX(0, bits1j + trim_offset[j]); if (bits2j > 0) bits2j = IMAX(0, bits2j + trim_offset[j]); if (lo > 0) bits1j += offsets[j]; bits2j += offsets[j]; if (offsets[j]>0) skip_start = j; bits2j = IMAX(0,bits2j-bits1j); bits1[j] = bits1j; bits2[j] = bits2j; } codedBands = interp_bits2pulses(m, start, end, skip_start, bits1, bits2, thresh, cap, total, balance, skip_rsv, intensity, intensity_rsv, dual_stereo, dual_stereo_rsv, pulses, ebits, fine_priority, C, LM, ec, encode, prev, signalBandwidth); RESTORE_STACK; return codedBands; } opus-1.1.2/celt/rate.h000066400000000000000000000063171264527674100145610ustar00rootroot00000000000000/* Copyright (c) 2007-2008 CSIRO Copyright (c) 2007-2009 Xiph.Org Foundation Written by Jean-Marc Valin */ /* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - 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. 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 OWNER 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. */ #ifndef RATE_H #define RATE_H #define MAX_PSEUDO 40 #define LOG_MAX_PSEUDO 6 #define CELT_MAX_PULSES 128 #define MAX_FINE_BITS 8 #define FINE_OFFSET 21 #define QTHETA_OFFSET 4 #define QTHETA_OFFSET_TWOPHASE 16 #include "cwrs.h" #include "modes.h" void compute_pulse_cache(CELTMode *m, int LM); static OPUS_INLINE int get_pulses(int i) { return i<8 ? i : (8 + (i&7)) << ((i>>3)-1); } static OPUS_INLINE int bits2pulses(const CELTMode *m, int band, int LM, int bits) { int i; int lo, hi; const unsigned char *cache; LM++; cache = m->cache.bits + m->cache.index[LM*m->nbEBands+band]; lo = 0; hi = cache[0]; bits--; for (i=0;i>1; /* OPT: Make sure this is implemented with a conditional move */ if ((int)cache[mid] >= bits) hi = mid; else lo = mid; } if (bits- (lo == 0 ? -1 : (int)cache[lo]) <= (int)cache[hi]-bits) return lo; else return hi; } static OPUS_INLINE int pulses2bits(const CELTMode *m, int band, int LM, int pulses) { const unsigned char *cache; LM++; cache = m->cache.bits + m->cache.index[LM*m->nbEBands+band]; return pulses == 0 ? 0 : cache[pulses]+1; } /** Compute the pulse allocation, i.e. how many pulses will go in each * band. @param m mode @param offsets Requested increase or decrease in the number of bits for each band @param total Number of bands @param pulses Number of pulses per band (returned) @return Total number of bits allocated */ int compute_allocation(const CELTMode *m, int start, int end, const int *offsets, const int *cap, int alloc_trim, int *intensity, int *dual_stero, opus_int32 total, opus_int32 *balance, int *pulses, int *ebits, int *fine_priority, int C, int LM, ec_ctx *ec, int encode, int prev, int signalBandwidth); #endif opus-1.1.2/celt/stack_alloc.h000066400000000000000000000135451264527674100161060ustar00rootroot00000000000000/* Copyright (C) 2002-2003 Jean-Marc Valin Copyright (C) 2007-2009 Xiph.Org Foundation */ /** @file stack_alloc.h @brief Temporary memory allocation on stack */ /* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - 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. 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 OWNER 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. */ #ifndef STACK_ALLOC_H #define STACK_ALLOC_H #include "opus_types.h" #include "opus_defines.h" #if (!defined (VAR_ARRAYS) && !defined (USE_ALLOCA) && !defined (NONTHREADSAFE_PSEUDOSTACK)) #error "Opus requires one of VAR_ARRAYS, USE_ALLOCA, or NONTHREADSAFE_PSEUDOSTACK be defined to select the temporary allocation mode." #endif #ifdef USE_ALLOCA # ifdef WIN32 # include # else # ifdef HAVE_ALLOCA_H # include # else # include # endif # endif #endif /** * @def ALIGN(stack, size) * * Aligns the stack to a 'size' boundary * * @param stack Stack * @param size New size boundary */ /** * @def PUSH(stack, size, type) * * Allocates 'size' elements of type 'type' on the stack * * @param stack Stack * @param size Number of elements * @param type Type of element */ /** * @def VARDECL(var) * * Declare variable on stack * * @param var Variable to declare */ /** * @def ALLOC(var, size, type) * * Allocate 'size' elements of 'type' on stack * * @param var Name of variable to allocate * @param size Number of elements * @param type Type of element */ #if defined(VAR_ARRAYS) #define VARDECL(type, var) #define ALLOC(var, size, type) type var[size] #define SAVE_STACK #define RESTORE_STACK #define ALLOC_STACK /* C99 does not allow VLAs of size zero */ #define ALLOC_NONE 1 #elif defined(USE_ALLOCA) #define VARDECL(type, var) type *var # ifdef WIN32 # define ALLOC(var, size, type) var = ((type*)_alloca(sizeof(type)*(size))) # else # define ALLOC(var, size, type) var = ((type*)alloca(sizeof(type)*(size))) # endif #define SAVE_STACK #define RESTORE_STACK #define ALLOC_STACK #define ALLOC_NONE 0 #else #ifdef CELT_C char *scratch_ptr=0; char *global_stack=0; #else extern char *global_stack; extern char *scratch_ptr; #endif /* CELT_C */ #ifdef ENABLE_VALGRIND #include #ifdef CELT_C char *global_stack_top=0; #else extern char *global_stack_top; #endif /* CELT_C */ #define ALIGN(stack, size) ((stack) += ((size) - (long)(stack)) & ((size) - 1)) #define PUSH(stack, size, type) (VALGRIND_MAKE_MEM_NOACCESS(stack, global_stack_top-stack),ALIGN((stack),sizeof(type)/sizeof(char)),VALGRIND_MAKE_MEM_UNDEFINED(stack, ((size)*sizeof(type)/sizeof(char))),(stack)+=(2*(size)*sizeof(type)/sizeof(char)),(type*)((stack)-(2*(size)*sizeof(type)/sizeof(char)))) #define RESTORE_STACK ((global_stack = _saved_stack),VALGRIND_MAKE_MEM_NOACCESS(global_stack, global_stack_top-global_stack)) #define ALLOC_STACK char *_saved_stack; ((global_stack = (global_stack==0) ? ((global_stack_top=opus_alloc_scratch(GLOBAL_STACK_SIZE*2)+(GLOBAL_STACK_SIZE*2))-(GLOBAL_STACK_SIZE*2)) : global_stack),VALGRIND_MAKE_MEM_NOACCESS(global_stack, global_stack_top-global_stack)); _saved_stack = global_stack; #else #define ALIGN(stack, size) ((stack) += ((size) - (long)(stack)) & ((size) - 1)) #define PUSH(stack, size, type) (ALIGN((stack),sizeof(type)/sizeof(char)),(stack)+=(size)*(sizeof(type)/sizeof(char)),(type*)((stack)-(size)*(sizeof(type)/sizeof(char)))) #if 0 /* Set this to 1 to instrument pseudostack usage */ #define RESTORE_STACK (printf("%ld %s:%d\n", global_stack-scratch_ptr, __FILE__, __LINE__),global_stack = _saved_stack) #else #define RESTORE_STACK (global_stack = _saved_stack) #endif #define ALLOC_STACK char *_saved_stack; (global_stack = (global_stack==0) ? (scratch_ptr=opus_alloc_scratch(GLOBAL_STACK_SIZE)) : global_stack); _saved_stack = global_stack; #endif /* ENABLE_VALGRIND */ #include "os_support.h" #define VARDECL(type, var) type *var #define ALLOC(var, size, type) var = PUSH(global_stack, size, type) #define SAVE_STACK char *_saved_stack = global_stack; #define ALLOC_NONE 0 #endif /* VAR_ARRAYS */ #ifdef ENABLE_VALGRIND #include #define OPUS_CHECK_ARRAY(ptr, len) VALGRIND_CHECK_MEM_IS_DEFINED(ptr, len*sizeof(*ptr)) #define OPUS_CHECK_VALUE(value) VALGRIND_CHECK_VALUE_IS_DEFINED(value) #define OPUS_CHECK_ARRAY_COND(ptr, len) VALGRIND_CHECK_MEM_IS_DEFINED(ptr, len*sizeof(*ptr)) #define OPUS_CHECK_VALUE_COND(value) VALGRIND_CHECK_VALUE_IS_DEFINED(value) #define OPUS_PRINT_INT(value) do {fprintf(stderr, #value " = %d at %s:%d\n", value, __FILE__, __LINE__);}while(0) #define OPUS_FPRINTF fprintf #else static OPUS_INLINE int _opus_false(void) {return 0;} #define OPUS_CHECK_ARRAY(ptr, len) _opus_false() #define OPUS_CHECK_VALUE(value) _opus_false() #define OPUS_PRINT_INT(value) do{}while(0) #define OPUS_FPRINTF (void) #endif #endif /* STACK_ALLOC_H */ opus-1.1.2/celt/static_modes_fixed.h000066400000000000000000001000631264527674100174540ustar00rootroot00000000000000/* The contents of this file was automatically generated by dump_modes.c with arguments: 48000 960 It contains static definitions for some pre-defined modes. */ #include "modes.h" #include "rate.h" #ifdef HAVE_ARM_NE10 #define OVERRIDE_FFT 1 #include "static_modes_fixed_arm_ne10.h" #endif #ifndef DEF_WINDOW120 #define DEF_WINDOW120 static const opus_val16 window120[120] = { 2, 20, 55, 108, 178, 266, 372, 494, 635, 792, 966, 1157, 1365, 1590, 1831, 2089, 2362, 2651, 2956, 3276, 3611, 3961, 4325, 4703, 5094, 5499, 5916, 6346, 6788, 7241, 7705, 8179, 8663, 9156, 9657, 10167, 10684, 11207, 11736, 12271, 12810, 13353, 13899, 14447, 14997, 15547, 16098, 16648, 17197, 17744, 18287, 18827, 19363, 19893, 20418, 20936, 21447, 21950, 22445, 22931, 23407, 23874, 24330, 24774, 25208, 25629, 26039, 26435, 26819, 27190, 27548, 27893, 28224, 28541, 28845, 29135, 29411, 29674, 29924, 30160, 30384, 30594, 30792, 30977, 31151, 31313, 31463, 31602, 31731, 31849, 31958, 32057, 32148, 32229, 32303, 32370, 32429, 32481, 32528, 32568, 32604, 32634, 32661, 32683, 32701, 32717, 32729, 32740, 32748, 32754, 32758, 32762, 32764, 32766, 32767, 32767, 32767, 32767, 32767, 32767, }; #endif #ifndef DEF_LOGN400 #define DEF_LOGN400 static const opus_int16 logN400[21] = { 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 8, 8, 16, 16, 16, 21, 21, 24, 29, 34, 36, }; #endif #ifndef DEF_PULSE_CACHE50 #define DEF_PULSE_CACHE50 static const opus_int16 cache_index50[105] = { -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, 0, 0, 41, 41, 41, 82, 82, 123, 164, 200, 222, 0, 0, 0, 0, 0, 0, 0, 0, 41, 41, 41, 41, 123, 123, 123, 164, 164, 240, 266, 283, 295, 41, 41, 41, 41, 41, 41, 41, 41, 123, 123, 123, 123, 240, 240, 240, 266, 266, 305, 318, 328, 336, 123, 123, 123, 123, 123, 123, 123, 123, 240, 240, 240, 240, 305, 305, 305, 318, 318, 343, 351, 358, 364, 240, 240, 240, 240, 240, 240, 240, 240, 305, 305, 305, 305, 343, 343, 343, 351, 351, 370, 376, 382, 387, }; static const unsigned char cache_bits50[392] = { 40, 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, 40, 15, 23, 28, 31, 34, 36, 38, 39, 41, 42, 43, 44, 45, 46, 47, 47, 49, 50, 51, 52, 53, 54, 55, 55, 57, 58, 59, 60, 61, 62, 63, 63, 65, 66, 67, 68, 69, 70, 71, 71, 40, 20, 33, 41, 48, 53, 57, 61, 64, 66, 69, 71, 73, 75, 76, 78, 80, 82, 85, 87, 89, 91, 92, 94, 96, 98, 101, 103, 105, 107, 108, 110, 112, 114, 117, 119, 121, 123, 124, 126, 128, 40, 23, 39, 51, 60, 67, 73, 79, 83, 87, 91, 94, 97, 100, 102, 105, 107, 111, 115, 118, 121, 124, 126, 129, 131, 135, 139, 142, 145, 148, 150, 153, 155, 159, 163, 166, 169, 172, 174, 177, 179, 35, 28, 49, 65, 78, 89, 99, 107, 114, 120, 126, 132, 136, 141, 145, 149, 153, 159, 165, 171, 176, 180, 185, 189, 192, 199, 205, 211, 216, 220, 225, 229, 232, 239, 245, 251, 21, 33, 58, 79, 97, 112, 125, 137, 148, 157, 166, 174, 182, 189, 195, 201, 207, 217, 227, 235, 243, 251, 17, 35, 63, 86, 106, 123, 139, 152, 165, 177, 187, 197, 206, 214, 222, 230, 237, 250, 25, 31, 55, 75, 91, 105, 117, 128, 138, 146, 154, 161, 168, 174, 180, 185, 190, 200, 208, 215, 222, 229, 235, 240, 245, 255, 16, 36, 65, 89, 110, 128, 144, 159, 173, 185, 196, 207, 217, 226, 234, 242, 250, 11, 41, 74, 103, 128, 151, 172, 191, 209, 225, 241, 255, 9, 43, 79, 110, 138, 163, 186, 207, 227, 246, 12, 39, 71, 99, 123, 144, 164, 182, 198, 214, 228, 241, 253, 9, 44, 81, 113, 142, 168, 192, 214, 235, 255, 7, 49, 90, 127, 160, 191, 220, 247, 6, 51, 95, 134, 170, 203, 234, 7, 47, 87, 123, 155, 184, 212, 237, 6, 52, 97, 137, 174, 208, 240, 5, 57, 106, 151, 192, 231, 5, 59, 111, 158, 202, 243, 5, 55, 103, 147, 187, 224, 5, 60, 113, 161, 206, 248, 4, 65, 122, 175, 224, 4, 67, 127, 182, 234, }; static const unsigned char cache_caps50[168] = { 224, 224, 224, 224, 224, 224, 224, 224, 160, 160, 160, 160, 185, 185, 185, 178, 178, 168, 134, 61, 37, 224, 224, 224, 224, 224, 224, 224, 224, 240, 240, 240, 240, 207, 207, 207, 198, 198, 183, 144, 66, 40, 160, 160, 160, 160, 160, 160, 160, 160, 185, 185, 185, 185, 193, 193, 193, 183, 183, 172, 138, 64, 38, 240, 240, 240, 240, 240, 240, 240, 240, 207, 207, 207, 207, 204, 204, 204, 193, 193, 180, 143, 66, 40, 185, 185, 185, 185, 185, 185, 185, 185, 193, 193, 193, 193, 193, 193, 193, 183, 183, 172, 138, 65, 39, 207, 207, 207, 207, 207, 207, 207, 207, 204, 204, 204, 204, 201, 201, 201, 188, 188, 176, 141, 66, 40, 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, 194, 194, 194, 184, 184, 173, 139, 65, 39, 204, 204, 204, 204, 204, 204, 204, 204, 201, 201, 201, 201, 198, 198, 198, 187, 187, 175, 140, 66, 40, }; #endif #ifndef FFT_TWIDDLES48000_960 #define FFT_TWIDDLES48000_960 static const kiss_twiddle_cpx fft_twiddles48000_960[480] = { {32767, 0}, {32766, -429}, {32757, -858}, {32743, -1287}, {32724, -1715}, {32698, -2143}, {32667, -2570}, {32631, -2998}, {32588, -3425}, {32541, -3851}, {32488, -4277}, {32429, -4701}, {32364, -5125}, {32295, -5548}, {32219, -5971}, {32138, -6393}, {32051, -6813}, {31960, -7231}, {31863, -7650}, {31760, -8067}, {31652, -8481}, {31539, -8895}, {31419, -9306}, {31294, -9716}, {31165, -10126}, {31030, -10532}, {30889, -10937}, {30743, -11340}, {30592, -11741}, {30436, -12141}, {30274, -12540}, {30107, -12935}, {29936, -13328}, {29758, -13718}, {29577, -14107}, {29390, -14493}, {29197, -14875}, {29000, -15257}, {28797, -15635}, {28590, -16010}, {28379, -16384}, {28162, -16753}, {27940, -17119}, {27714, -17484}, {27482, -17845}, {27246, -18205}, {27006, -18560}, {26760, -18911}, {26510, -19260}, {26257, -19606}, {25997, -19947}, {25734, -20286}, {25466, -20621}, {25194, -20952}, {24918, -21281}, {24637, -21605}, {24353, -21926}, {24063, -22242}, {23770, -22555}, {23473, -22865}, {23171, -23171}, {22866, -23472}, {22557, -23769}, {22244, -24063}, {21927, -24352}, {21606, -24636}, {21282, -24917}, {20954, -25194}, {20622, -25465}, {20288, -25733}, {19949, -25997}, {19607, -26255}, {19261, -26509}, {18914, -26760}, {18561, -27004}, {18205, -27246}, {17846, -27481}, {17485, -27713}, {17122, -27940}, {16755, -28162}, {16385, -28378}, {16012, -28590}, {15636, -28797}, {15258, -28999}, {14878, -29197}, {14494, -29389}, {14108, -29576}, {13720, -29757}, {13329, -29934}, {12937, -30107}, {12540, -30274}, {12142, -30435}, {11744, -30592}, {11342, -30743}, {10939, -30889}, {10534, -31030}, {10127, -31164}, {9718, -31294}, {9307, -31418}, {8895, -31537}, {8482, -31652}, {8067, -31759}, {7650, -31862}, {7233, -31960}, {6815, -32051}, {6393, -32138}, {5973, -32219}, {5549, -32294}, {5127, -32364}, {4703, -32429}, {4278, -32487}, {3852, -32541}, {3426, -32588}, {2999, -32630}, {2572, -32667}, {2144, -32698}, {1716, -32724}, {1287, -32742}, {860, -32757}, {430, -32766}, {0, -32767}, {-429, -32766}, {-858, -32757}, {-1287, -32743}, {-1715, -32724}, {-2143, -32698}, {-2570, -32667}, {-2998, -32631}, {-3425, -32588}, {-3851, -32541}, {-4277, -32488}, {-4701, -32429}, {-5125, -32364}, {-5548, -32295}, {-5971, -32219}, {-6393, -32138}, {-6813, -32051}, {-7231, -31960}, {-7650, -31863}, {-8067, -31760}, {-8481, -31652}, {-8895, -31539}, {-9306, -31419}, {-9716, -31294}, {-10126, -31165}, {-10532, -31030}, {-10937, -30889}, {-11340, -30743}, {-11741, -30592}, {-12141, -30436}, {-12540, -30274}, {-12935, -30107}, {-13328, -29936}, {-13718, -29758}, {-14107, -29577}, {-14493, -29390}, {-14875, -29197}, {-15257, -29000}, {-15635, -28797}, {-16010, -28590}, {-16384, -28379}, {-16753, -28162}, {-17119, -27940}, {-17484, -27714}, {-17845, -27482}, {-18205, -27246}, {-18560, -27006}, {-18911, -26760}, {-19260, -26510}, {-19606, -26257}, {-19947, -25997}, {-20286, -25734}, {-20621, -25466}, {-20952, -25194}, {-21281, -24918}, {-21605, -24637}, {-21926, -24353}, {-22242, -24063}, {-22555, -23770}, {-22865, -23473}, {-23171, -23171}, {-23472, -22866}, {-23769, -22557}, {-24063, -22244}, {-24352, -21927}, {-24636, -21606}, {-24917, -21282}, {-25194, -20954}, {-25465, -20622}, {-25733, -20288}, {-25997, -19949}, {-26255, -19607}, {-26509, -19261}, {-26760, -18914}, {-27004, -18561}, {-27246, -18205}, {-27481, -17846}, {-27713, -17485}, {-27940, -17122}, {-28162, -16755}, {-28378, -16385}, {-28590, -16012}, {-28797, -15636}, {-28999, -15258}, {-29197, -14878}, {-29389, -14494}, {-29576, -14108}, {-29757, -13720}, {-29934, -13329}, {-30107, -12937}, {-30274, -12540}, {-30435, -12142}, {-30592, -11744}, {-30743, -11342}, {-30889, -10939}, {-31030, -10534}, {-31164, -10127}, {-31294, -9718}, {-31418, -9307}, {-31537, -8895}, {-31652, -8482}, {-31759, -8067}, {-31862, -7650}, {-31960, -7233}, {-32051, -6815}, {-32138, -6393}, {-32219, -5973}, {-32294, -5549}, {-32364, -5127}, {-32429, -4703}, {-32487, -4278}, {-32541, -3852}, {-32588, -3426}, {-32630, -2999}, {-32667, -2572}, {-32698, -2144}, {-32724, -1716}, {-32742, -1287}, {-32757, -860}, {-32766, -430}, {-32767, 0}, {-32766, 429}, {-32757, 858}, {-32743, 1287}, {-32724, 1715}, {-32698, 2143}, {-32667, 2570}, {-32631, 2998}, {-32588, 3425}, {-32541, 3851}, {-32488, 4277}, {-32429, 4701}, {-32364, 5125}, {-32295, 5548}, {-32219, 5971}, {-32138, 6393}, {-32051, 6813}, {-31960, 7231}, {-31863, 7650}, {-31760, 8067}, {-31652, 8481}, {-31539, 8895}, {-31419, 9306}, {-31294, 9716}, {-31165, 10126}, {-31030, 10532}, {-30889, 10937}, {-30743, 11340}, {-30592, 11741}, {-30436, 12141}, {-30274, 12540}, {-30107, 12935}, {-29936, 13328}, {-29758, 13718}, {-29577, 14107}, {-29390, 14493}, {-29197, 14875}, {-29000, 15257}, {-28797, 15635}, {-28590, 16010}, {-28379, 16384}, {-28162, 16753}, {-27940, 17119}, {-27714, 17484}, {-27482, 17845}, {-27246, 18205}, {-27006, 18560}, {-26760, 18911}, {-26510, 19260}, {-26257, 19606}, {-25997, 19947}, {-25734, 20286}, {-25466, 20621}, {-25194, 20952}, {-24918, 21281}, {-24637, 21605}, {-24353, 21926}, {-24063, 22242}, {-23770, 22555}, {-23473, 22865}, {-23171, 23171}, {-22866, 23472}, {-22557, 23769}, {-22244, 24063}, {-21927, 24352}, {-21606, 24636}, {-21282, 24917}, {-20954, 25194}, {-20622, 25465}, {-20288, 25733}, {-19949, 25997}, {-19607, 26255}, {-19261, 26509}, {-18914, 26760}, {-18561, 27004}, {-18205, 27246}, {-17846, 27481}, {-17485, 27713}, {-17122, 27940}, {-16755, 28162}, {-16385, 28378}, {-16012, 28590}, {-15636, 28797}, {-15258, 28999}, {-14878, 29197}, {-14494, 29389}, {-14108, 29576}, {-13720, 29757}, {-13329, 29934}, {-12937, 30107}, {-12540, 30274}, {-12142, 30435}, {-11744, 30592}, {-11342, 30743}, {-10939, 30889}, {-10534, 31030}, {-10127, 31164}, {-9718, 31294}, {-9307, 31418}, {-8895, 31537}, {-8482, 31652}, {-8067, 31759}, {-7650, 31862}, {-7233, 31960}, {-6815, 32051}, {-6393, 32138}, {-5973, 32219}, {-5549, 32294}, {-5127, 32364}, {-4703, 32429}, {-4278, 32487}, {-3852, 32541}, {-3426, 32588}, {-2999, 32630}, {-2572, 32667}, {-2144, 32698}, {-1716, 32724}, {-1287, 32742}, {-860, 32757}, {-430, 32766}, {0, 32767}, {429, 32766}, {858, 32757}, {1287, 32743}, {1715, 32724}, {2143, 32698}, {2570, 32667}, {2998, 32631}, {3425, 32588}, {3851, 32541}, {4277, 32488}, {4701, 32429}, {5125, 32364}, {5548, 32295}, {5971, 32219}, {6393, 32138}, {6813, 32051}, {7231, 31960}, {7650, 31863}, {8067, 31760}, {8481, 31652}, {8895, 31539}, {9306, 31419}, {9716, 31294}, {10126, 31165}, {10532, 31030}, {10937, 30889}, {11340, 30743}, {11741, 30592}, {12141, 30436}, {12540, 30274}, {12935, 30107}, {13328, 29936}, {13718, 29758}, {14107, 29577}, {14493, 29390}, {14875, 29197}, {15257, 29000}, {15635, 28797}, {16010, 28590}, {16384, 28379}, {16753, 28162}, {17119, 27940}, {17484, 27714}, {17845, 27482}, {18205, 27246}, {18560, 27006}, {18911, 26760}, {19260, 26510}, {19606, 26257}, {19947, 25997}, {20286, 25734}, {20621, 25466}, {20952, 25194}, {21281, 24918}, {21605, 24637}, {21926, 24353}, {22242, 24063}, {22555, 23770}, {22865, 23473}, {23171, 23171}, {23472, 22866}, {23769, 22557}, {24063, 22244}, {24352, 21927}, {24636, 21606}, {24917, 21282}, {25194, 20954}, {25465, 20622}, {25733, 20288}, {25997, 19949}, {26255, 19607}, {26509, 19261}, {26760, 18914}, {27004, 18561}, {27246, 18205}, {27481, 17846}, {27713, 17485}, {27940, 17122}, {28162, 16755}, {28378, 16385}, {28590, 16012}, {28797, 15636}, {28999, 15258}, {29197, 14878}, {29389, 14494}, {29576, 14108}, {29757, 13720}, {29934, 13329}, {30107, 12937}, {30274, 12540}, {30435, 12142}, {30592, 11744}, {30743, 11342}, {30889, 10939}, {31030, 10534}, {31164, 10127}, {31294, 9718}, {31418, 9307}, {31537, 8895}, {31652, 8482}, {31759, 8067}, {31862, 7650}, {31960, 7233}, {32051, 6815}, {32138, 6393}, {32219, 5973}, {32294, 5549}, {32364, 5127}, {32429, 4703}, {32487, 4278}, {32541, 3852}, {32588, 3426}, {32630, 2999}, {32667, 2572}, {32698, 2144}, {32724, 1716}, {32742, 1287}, {32757, 860}, {32766, 430}, }; #ifndef FFT_BITREV480 #define FFT_BITREV480 static const opus_int16 fft_bitrev480[480] = { 0, 96, 192, 288, 384, 32, 128, 224, 320, 416, 64, 160, 256, 352, 448, 8, 104, 200, 296, 392, 40, 136, 232, 328, 424, 72, 168, 264, 360, 456, 16, 112, 208, 304, 400, 48, 144, 240, 336, 432, 80, 176, 272, 368, 464, 24, 120, 216, 312, 408, 56, 152, 248, 344, 440, 88, 184, 280, 376, 472, 4, 100, 196, 292, 388, 36, 132, 228, 324, 420, 68, 164, 260, 356, 452, 12, 108, 204, 300, 396, 44, 140, 236, 332, 428, 76, 172, 268, 364, 460, 20, 116, 212, 308, 404, 52, 148, 244, 340, 436, 84, 180, 276, 372, 468, 28, 124, 220, 316, 412, 60, 156, 252, 348, 444, 92, 188, 284, 380, 476, 1, 97, 193, 289, 385, 33, 129, 225, 321, 417, 65, 161, 257, 353, 449, 9, 105, 201, 297, 393, 41, 137, 233, 329, 425, 73, 169, 265, 361, 457, 17, 113, 209, 305, 401, 49, 145, 241, 337, 433, 81, 177, 273, 369, 465, 25, 121, 217, 313, 409, 57, 153, 249, 345, 441, 89, 185, 281, 377, 473, 5, 101, 197, 293, 389, 37, 133, 229, 325, 421, 69, 165, 261, 357, 453, 13, 109, 205, 301, 397, 45, 141, 237, 333, 429, 77, 173, 269, 365, 461, 21, 117, 213, 309, 405, 53, 149, 245, 341, 437, 85, 181, 277, 373, 469, 29, 125, 221, 317, 413, 61, 157, 253, 349, 445, 93, 189, 285, 381, 477, 2, 98, 194, 290, 386, 34, 130, 226, 322, 418, 66, 162, 258, 354, 450, 10, 106, 202, 298, 394, 42, 138, 234, 330, 426, 74, 170, 266, 362, 458, 18, 114, 210, 306, 402, 50, 146, 242, 338, 434, 82, 178, 274, 370, 466, 26, 122, 218, 314, 410, 58, 154, 250, 346, 442, 90, 186, 282, 378, 474, 6, 102, 198, 294, 390, 38, 134, 230, 326, 422, 70, 166, 262, 358, 454, 14, 110, 206, 302, 398, 46, 142, 238, 334, 430, 78, 174, 270, 366, 462, 22, 118, 214, 310, 406, 54, 150, 246, 342, 438, 86, 182, 278, 374, 470, 30, 126, 222, 318, 414, 62, 158, 254, 350, 446, 94, 190, 286, 382, 478, 3, 99, 195, 291, 387, 35, 131, 227, 323, 419, 67, 163, 259, 355, 451, 11, 107, 203, 299, 395, 43, 139, 235, 331, 427, 75, 171, 267, 363, 459, 19, 115, 211, 307, 403, 51, 147, 243, 339, 435, 83, 179, 275, 371, 467, 27, 123, 219, 315, 411, 59, 155, 251, 347, 443, 91, 187, 283, 379, 475, 7, 103, 199, 295, 391, 39, 135, 231, 327, 423, 71, 167, 263, 359, 455, 15, 111, 207, 303, 399, 47, 143, 239, 335, 431, 79, 175, 271, 367, 463, 23, 119, 215, 311, 407, 55, 151, 247, 343, 439, 87, 183, 279, 375, 471, 31, 127, 223, 319, 415, 63, 159, 255, 351, 447, 95, 191, 287, 383, 479, }; #endif #ifndef FFT_BITREV240 #define FFT_BITREV240 static const opus_int16 fft_bitrev240[240] = { 0, 48, 96, 144, 192, 16, 64, 112, 160, 208, 32, 80, 128, 176, 224, 4, 52, 100, 148, 196, 20, 68, 116, 164, 212, 36, 84, 132, 180, 228, 8, 56, 104, 152, 200, 24, 72, 120, 168, 216, 40, 88, 136, 184, 232, 12, 60, 108, 156, 204, 28, 76, 124, 172, 220, 44, 92, 140, 188, 236, 1, 49, 97, 145, 193, 17, 65, 113, 161, 209, 33, 81, 129, 177, 225, 5, 53, 101, 149, 197, 21, 69, 117, 165, 213, 37, 85, 133, 181, 229, 9, 57, 105, 153, 201, 25, 73, 121, 169, 217, 41, 89, 137, 185, 233, 13, 61, 109, 157, 205, 29, 77, 125, 173, 221, 45, 93, 141, 189, 237, 2, 50, 98, 146, 194, 18, 66, 114, 162, 210, 34, 82, 130, 178, 226, 6, 54, 102, 150, 198, 22, 70, 118, 166, 214, 38, 86, 134, 182, 230, 10, 58, 106, 154, 202, 26, 74, 122, 170, 218, 42, 90, 138, 186, 234, 14, 62, 110, 158, 206, 30, 78, 126, 174, 222, 46, 94, 142, 190, 238, 3, 51, 99, 147, 195, 19, 67, 115, 163, 211, 35, 83, 131, 179, 227, 7, 55, 103, 151, 199, 23, 71, 119, 167, 215, 39, 87, 135, 183, 231, 11, 59, 107, 155, 203, 27, 75, 123, 171, 219, 43, 91, 139, 187, 235, 15, 63, 111, 159, 207, 31, 79, 127, 175, 223, 47, 95, 143, 191, 239, }; #endif #ifndef FFT_BITREV120 #define FFT_BITREV120 static const opus_int16 fft_bitrev120[120] = { 0, 24, 48, 72, 96, 8, 32, 56, 80, 104, 16, 40, 64, 88, 112, 4, 28, 52, 76, 100, 12, 36, 60, 84, 108, 20, 44, 68, 92, 116, 1, 25, 49, 73, 97, 9, 33, 57, 81, 105, 17, 41, 65, 89, 113, 5, 29, 53, 77, 101, 13, 37, 61, 85, 109, 21, 45, 69, 93, 117, 2, 26, 50, 74, 98, 10, 34, 58, 82, 106, 18, 42, 66, 90, 114, 6, 30, 54, 78, 102, 14, 38, 62, 86, 110, 22, 46, 70, 94, 118, 3, 27, 51, 75, 99, 11, 35, 59, 83, 107, 19, 43, 67, 91, 115, 7, 31, 55, 79, 103, 15, 39, 63, 87, 111, 23, 47, 71, 95, 119, }; #endif #ifndef FFT_BITREV60 #define FFT_BITREV60 static const opus_int16 fft_bitrev60[60] = { 0, 12, 24, 36, 48, 4, 16, 28, 40, 52, 8, 20, 32, 44, 56, 1, 13, 25, 37, 49, 5, 17, 29, 41, 53, 9, 21, 33, 45, 57, 2, 14, 26, 38, 50, 6, 18, 30, 42, 54, 10, 22, 34, 46, 58, 3, 15, 27, 39, 51, 7, 19, 31, 43, 55, 11, 23, 35, 47, 59, }; #endif #ifndef FFT_STATE48000_960_0 #define FFT_STATE48000_960_0 static const kiss_fft_state fft_state48000_960_0 = { 480, /* nfft */ 17476, /* scale */ 8, /* scale_shift */ -1, /* shift */ {5, 96, 3, 32, 4, 8, 2, 4, 4, 1, 0, 0, 0, 0, 0, 0, }, /* factors */ fft_bitrev480, /* bitrev */ fft_twiddles48000_960, /* bitrev */ #ifdef OVERRIDE_FFT (arch_fft_state *)&cfg_arch_480, #else NULL, #endif }; #endif #ifndef FFT_STATE48000_960_1 #define FFT_STATE48000_960_1 static const kiss_fft_state fft_state48000_960_1 = { 240, /* nfft */ 17476, /* scale */ 7, /* scale_shift */ 1, /* shift */ {5, 48, 3, 16, 4, 4, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, }, /* factors */ fft_bitrev240, /* bitrev */ fft_twiddles48000_960, /* bitrev */ #ifdef OVERRIDE_FFT (arch_fft_state *)&cfg_arch_240, #else NULL, #endif }; #endif #ifndef FFT_STATE48000_960_2 #define FFT_STATE48000_960_2 static const kiss_fft_state fft_state48000_960_2 = { 120, /* nfft */ 17476, /* scale */ 6, /* scale_shift */ 2, /* shift */ {5, 24, 3, 8, 2, 4, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, }, /* factors */ fft_bitrev120, /* bitrev */ fft_twiddles48000_960, /* bitrev */ #ifdef OVERRIDE_FFT (arch_fft_state *)&cfg_arch_120, #else NULL, #endif }; #endif #ifndef FFT_STATE48000_960_3 #define FFT_STATE48000_960_3 static const kiss_fft_state fft_state48000_960_3 = { 60, /* nfft */ 17476, /* scale */ 5, /* scale_shift */ 3, /* shift */ {5, 12, 3, 4, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }, /* factors */ fft_bitrev60, /* bitrev */ fft_twiddles48000_960, /* bitrev */ #ifdef OVERRIDE_FFT (arch_fft_state *)&cfg_arch_60, #else NULL, #endif }; #endif #endif #ifndef MDCT_TWIDDLES960 #define MDCT_TWIDDLES960 static const opus_val16 mdct_twiddles960[1800] = { 32767, 32767, 32767, 32766, 32765, 32763, 32761, 32759, 32756, 32753, 32750, 32746, 32742, 32738, 32733, 32728, 32722, 32717, 32710, 32704, 32697, 32690, 32682, 32674, 32666, 32657, 32648, 32639, 32629, 32619, 32609, 32598, 32587, 32576, 32564, 32552, 32539, 32526, 32513, 32500, 32486, 32472, 32457, 32442, 32427, 32411, 32395, 32379, 32362, 32345, 32328, 32310, 32292, 32274, 32255, 32236, 32217, 32197, 32177, 32157, 32136, 32115, 32093, 32071, 32049, 32027, 32004, 31981, 31957, 31933, 31909, 31884, 31859, 31834, 31809, 31783, 31756, 31730, 31703, 31676, 31648, 31620, 31592, 31563, 31534, 31505, 31475, 31445, 31415, 31384, 31353, 31322, 31290, 31258, 31226, 31193, 31160, 31127, 31093, 31059, 31025, 30990, 30955, 30920, 30884, 30848, 30812, 30775, 30738, 30701, 30663, 30625, 30587, 30548, 30509, 30470, 30430, 30390, 30350, 30309, 30269, 30227, 30186, 30144, 30102, 30059, 30016, 29973, 29930, 29886, 29842, 29797, 29752, 29707, 29662, 29616, 29570, 29524, 29477, 29430, 29383, 29335, 29287, 29239, 29190, 29142, 29092, 29043, 28993, 28943, 28892, 28842, 28791, 28739, 28688, 28636, 28583, 28531, 28478, 28425, 28371, 28317, 28263, 28209, 28154, 28099, 28044, 27988, 27932, 27876, 27820, 27763, 27706, 27648, 27591, 27533, 27474, 27416, 27357, 27298, 27238, 27178, 27118, 27058, 26997, 26936, 26875, 26814, 26752, 26690, 26628, 26565, 26502, 26439, 26375, 26312, 26247, 26183, 26119, 26054, 25988, 25923, 25857, 25791, 25725, 25658, 25592, 25524, 25457, 25389, 25322, 25253, 25185, 25116, 25047, 24978, 24908, 24838, 24768, 24698, 24627, 24557, 24485, 24414, 24342, 24270, 24198, 24126, 24053, 23980, 23907, 23834, 23760, 23686, 23612, 23537, 23462, 23387, 23312, 23237, 23161, 23085, 23009, 22932, 22856, 22779, 22701, 22624, 22546, 22468, 22390, 22312, 22233, 22154, 22075, 21996, 21916, 21836, 21756, 21676, 21595, 21515, 21434, 21352, 21271, 21189, 21107, 21025, 20943, 20860, 20777, 20694, 20611, 20528, 20444, 20360, 20276, 20192, 20107, 20022, 19937, 19852, 19767, 19681, 19595, 19509, 19423, 19336, 19250, 19163, 19076, 18988, 18901, 18813, 18725, 18637, 18549, 18460, 18372, 18283, 18194, 18104, 18015, 17925, 17835, 17745, 17655, 17565, 17474, 17383, 17292, 17201, 17110, 17018, 16927, 16835, 16743, 16650, 16558, 16465, 16372, 16279, 16186, 16093, 15999, 15906, 15812, 15718, 15624, 15529, 15435, 15340, 15245, 15150, 15055, 14960, 14864, 14769, 14673, 14577, 14481, 14385, 14288, 14192, 14095, 13998, 13901, 13804, 13706, 13609, 13511, 13414, 13316, 13218, 13119, 13021, 12923, 12824, 12725, 12626, 12527, 12428, 12329, 12230, 12130, 12030, 11930, 11831, 11730, 11630, 11530, 11430, 11329, 11228, 11128, 11027, 10926, 10824, 10723, 10622, 10520, 10419, 10317, 10215, 10113, 10011, 9909, 9807, 9704, 9602, 9499, 9397, 9294, 9191, 9088, 8985, 8882, 8778, 8675, 8572, 8468, 8364, 8261, 8157, 8053, 7949, 7845, 7741, 7637, 7532, 7428, 7323, 7219, 7114, 7009, 6905, 6800, 6695, 6590, 6485, 6380, 6274, 6169, 6064, 5958, 5853, 5747, 5642, 5536, 5430, 5325, 5219, 5113, 5007, 4901, 4795, 4689, 4583, 4476, 4370, 4264, 4157, 4051, 3945, 3838, 3732, 3625, 3518, 3412, 3305, 3198, 3092, 2985, 2878, 2771, 2664, 2558, 2451, 2344, 2237, 2130, 2023, 1916, 1809, 1702, 1594, 1487, 1380, 1273, 1166, 1059, 952, 844, 737, 630, 523, 416, 308, 201, 94, -13, -121, -228, -335, -442, -550, -657, -764, -871, -978, -1086, -1193, -1300, -1407, -1514, -1621, -1728, -1835, -1942, -2049, -2157, -2263, -2370, -2477, -2584, -2691, -2798, -2905, -3012, -3118, -3225, -3332, -3439, -3545, -3652, -3758, -3865, -3971, -4078, -4184, -4290, -4397, -4503, -4609, -4715, -4821, -4927, -5033, -5139, -5245, -5351, -5457, -5562, -5668, -5774, -5879, -5985, -6090, -6195, -6301, -6406, -6511, -6616, -6721, -6826, -6931, -7036, -7140, -7245, -7349, -7454, -7558, -7663, -7767, -7871, -7975, -8079, -8183, -8287, -8390, -8494, -8597, -8701, -8804, -8907, -9011, -9114, -9217, -9319, -9422, -9525, -9627, -9730, -9832, -9934, -10037, -10139, -10241, -10342, -10444, -10546, -10647, -10748, -10850, -10951, -11052, -11153, -11253, -11354, -11455, -11555, -11655, -11756, -11856, -11955, -12055, -12155, -12254, -12354, -12453, -12552, -12651, -12750, -12849, -12947, -13046, -13144, -13242, -13340, -13438, -13536, -13633, -13731, -13828, -13925, -14022, -14119, -14216, -14312, -14409, -14505, -14601, -14697, -14793, -14888, -14984, -15079, -15174, -15269, -15364, -15459, -15553, -15647, -15741, -15835, -15929, -16023, -16116, -16210, -16303, -16396, -16488, -16581, -16673, -16766, -16858, -16949, -17041, -17133, -17224, -17315, -17406, -17497, -17587, -17678, -17768, -17858, -17948, -18037, -18127, -18216, -18305, -18394, -18483, -18571, -18659, -18747, -18835, -18923, -19010, -19098, -19185, -19271, -19358, -19444, -19531, -19617, -19702, -19788, -19873, -19959, -20043, -20128, -20213, -20297, -20381, -20465, -20549, -20632, -20715, -20798, -20881, -20963, -21046, -21128, -21210, -21291, -21373, -21454, -21535, -21616, -21696, -21776, -21856, -21936, -22016, -22095, -22174, -22253, -22331, -22410, -22488, -22566, -22643, -22721, -22798, -22875, -22951, -23028, -23104, -23180, -23256, -23331, -23406, -23481, -23556, -23630, -23704, -23778, -23852, -23925, -23998, -24071, -24144, -24216, -24288, -24360, -24432, -24503, -24574, -24645, -24716, -24786, -24856, -24926, -24995, -25064, -25133, -25202, -25270, -25339, -25406, -25474, -25541, -25608, -25675, -25742, -25808, -25874, -25939, -26005, -26070, -26135, -26199, -26264, -26327, -26391, -26455, -26518, -26581, -26643, -26705, -26767, -26829, -26891, -26952, -27013, -27073, -27133, -27193, -27253, -27312, -27372, -27430, -27489, -27547, -27605, -27663, -27720, -27777, -27834, -27890, -27946, -28002, -28058, -28113, -28168, -28223, -28277, -28331, -28385, -28438, -28491, -28544, -28596, -28649, -28701, -28752, -28803, -28854, -28905, -28955, -29006, -29055, -29105, -29154, -29203, -29251, -29299, -29347, -29395, -29442, -29489, -29535, -29582, -29628, -29673, -29719, -29764, -29808, -29853, -29897, -29941, -29984, -30027, -30070, -30112, -30154, -30196, -30238, -30279, -30320, -30360, -30400, -30440, -30480, -30519, -30558, -30596, -30635, -30672, -30710, -30747, -30784, -30821, -30857, -30893, -30929, -30964, -30999, -31033, -31068, -31102, -31135, -31168, -31201, -31234, -31266, -31298, -31330, -31361, -31392, -31422, -31453, -31483, -31512, -31541, -31570, -31599, -31627, -31655, -31682, -31710, -31737, -31763, -31789, -31815, -31841, -31866, -31891, -31915, -31939, -31963, -31986, -32010, -32032, -32055, -32077, -32099, -32120, -32141, -32162, -32182, -32202, -32222, -32241, -32260, -32279, -32297, -32315, -32333, -32350, -32367, -32383, -32399, -32415, -32431, -32446, -32461, -32475, -32489, -32503, -32517, -32530, -32542, -32555, -32567, -32579, -32590, -32601, -32612, -32622, -32632, -32641, -32651, -32659, -32668, -32676, -32684, -32692, -32699, -32706, -32712, -32718, -32724, -32729, -32734, -32739, -32743, -32747, -32751, -32754, -32757, -32760, -32762, -32764, -32765, -32767, -32767, -32767, 32767, 32767, 32765, 32761, 32756, 32750, 32742, 32732, 32722, 32710, 32696, 32681, 32665, 32647, 32628, 32608, 32586, 32562, 32538, 32512, 32484, 32455, 32425, 32393, 32360, 32326, 32290, 32253, 32214, 32174, 32133, 32090, 32046, 32001, 31954, 31906, 31856, 31805, 31753, 31700, 31645, 31588, 31530, 31471, 31411, 31349, 31286, 31222, 31156, 31089, 31020, 30951, 30880, 30807, 30733, 30658, 30582, 30504, 30425, 30345, 30263, 30181, 30096, 30011, 29924, 29836, 29747, 29656, 29564, 29471, 29377, 29281, 29184, 29086, 28987, 28886, 28784, 28681, 28577, 28471, 28365, 28257, 28147, 28037, 27925, 27812, 27698, 27583, 27467, 27349, 27231, 27111, 26990, 26868, 26744, 26620, 26494, 26367, 26239, 26110, 25980, 25849, 25717, 25583, 25449, 25313, 25176, 25038, 24900, 24760, 24619, 24477, 24333, 24189, 24044, 23898, 23751, 23602, 23453, 23303, 23152, 22999, 22846, 22692, 22537, 22380, 22223, 22065, 21906, 21746, 21585, 21423, 21261, 21097, 20933, 20767, 20601, 20434, 20265, 20096, 19927, 19756, 19584, 19412, 19239, 19065, 18890, 18714, 18538, 18361, 18183, 18004, 17824, 17644, 17463, 17281, 17098, 16915, 16731, 16546, 16361, 16175, 15988, 15800, 15612, 15423, 15234, 15043, 14852, 14661, 14469, 14276, 14083, 13889, 13694, 13499, 13303, 13107, 12910, 12713, 12515, 12317, 12118, 11918, 11718, 11517, 11316, 11115, 10913, 10710, 10508, 10304, 10100, 9896, 9691, 9486, 9281, 9075, 8869, 8662, 8455, 8248, 8040, 7832, 7623, 7415, 7206, 6996, 6787, 6577, 6366, 6156, 5945, 5734, 5523, 5311, 5100, 4888, 4675, 4463, 4251, 4038, 3825, 3612, 3399, 3185, 2972, 2758, 2544, 2330, 2116, 1902, 1688, 1474, 1260, 1045, 831, 617, 402, 188, -27, -241, -456, -670, -885, -1099, -1313, -1528, -1742, -1956, -2170, -2384, -2598, -2811, -3025, -3239, -3452, -3665, -3878, -4091, -4304, -4516, -4728, -4941, -5153, -5364, -5576, -5787, -5998, -6209, -6419, -6629, -6839, -7049, -7258, -7467, -7676, -7884, -8092, -8300, -8507, -8714, -8920, -9127, -9332, -9538, -9743, -9947, -10151, -10355, -10558, -10761, -10963, -11165, -11367, -11568, -11768, -11968, -12167, -12366, -12565, -12762, -12960, -13156, -13352, -13548, -13743, -13937, -14131, -14324, -14517, -14709, -14900, -15091, -15281, -15470, -15659, -15847, -16035, -16221, -16407, -16593, -16777, -16961, -17144, -17326, -17508, -17689, -17869, -18049, -18227, -18405, -18582, -18758, -18934, -19108, -19282, -19455, -19627, -19799, -19969, -20139, -20308, -20475, -20642, -20809, -20974, -21138, -21301, -21464, -21626, -21786, -21946, -22105, -22263, -22420, -22575, -22730, -22884, -23037, -23189, -23340, -23490, -23640, -23788, -23935, -24080, -24225, -24369, -24512, -24654, -24795, -24934, -25073, -25211, -25347, -25482, -25617, -25750, -25882, -26013, -26143, -26272, -26399, -26526, -26651, -26775, -26898, -27020, -27141, -27260, -27379, -27496, -27612, -27727, -27841, -27953, -28065, -28175, -28284, -28391, -28498, -28603, -28707, -28810, -28911, -29012, -29111, -29209, -29305, -29401, -29495, -29587, -29679, -29769, -29858, -29946, -30032, -30118, -30201, -30284, -30365, -30445, -30524, -30601, -30677, -30752, -30825, -30897, -30968, -31038, -31106, -31172, -31238, -31302, -31365, -31426, -31486, -31545, -31602, -31658, -31713, -31766, -31818, -31869, -31918, -31966, -32012, -32058, -32101, -32144, -32185, -32224, -32262, -32299, -32335, -32369, -32401, -32433, -32463, -32491, -32518, -32544, -32568, -32591, -32613, -32633, -32652, -32669, -32685, -32700, -32713, -32724, -32735, -32744, -32751, -32757, -32762, -32766, -32767, 32767, 32764, 32755, 32741, 32720, 32694, 32663, 32626, 32583, 32535, 32481, 32421, 32356, 32286, 32209, 32128, 32041, 31948, 31850, 31747, 31638, 31523, 31403, 31278, 31148, 31012, 30871, 30724, 30572, 30415, 30253, 30086, 29913, 29736, 29553, 29365, 29172, 28974, 28771, 28564, 28351, 28134, 27911, 27684, 27452, 27216, 26975, 26729, 26478, 26223, 25964, 25700, 25432, 25159, 24882, 24601, 24315, 24026, 23732, 23434, 23133, 22827, 22517, 22204, 21886, 21565, 21240, 20912, 20580, 20244, 19905, 19563, 19217, 18868, 18516, 18160, 17802, 17440, 17075, 16708, 16338, 15964, 15588, 15210, 14829, 14445, 14059, 13670, 13279, 12886, 12490, 12093, 11693, 11291, 10888, 10482, 10075, 9666, 9255, 8843, 8429, 8014, 7597, 7180, 6760, 6340, 5919, 5496, 5073, 4649, 4224, 3798, 3372, 2945, 2517, 2090, 1661, 1233, 804, 375, -54, -483, -911, -1340, -1768, -2197, -2624, -3052, -3479, -3905, -4330, -4755, -5179, -5602, -6024, -6445, -6865, -7284, -7702, -8118, -8533, -8946, -9358, -9768, -10177, -10584, -10989, -11392, -11793, -12192, -12589, -12984, -13377, -13767, -14155, -14541, -14924, -15305, -15683, -16058, -16430, -16800, -17167, -17531, -17892, -18249, -18604, -18956, -19304, -19649, -19990, -20329, -20663, -20994, -21322, -21646, -21966, -22282, -22595, -22904, -23208, -23509, -23806, -24099, -24387, -24672, -24952, -25228, -25499, -25766, -26029, -26288, -26541, -26791, -27035, -27275, -27511, -27741, -27967, -28188, -28405, -28616, -28823, -29024, -29221, -29412, -29599, -29780, -29957, -30128, -30294, -30455, -30611, -30761, -30906, -31046, -31181, -31310, -31434, -31552, -31665, -31773, -31875, -31972, -32063, -32149, -32229, -32304, -32373, -32437, -32495, -32547, -32594, -32635, -32671, -32701, -32726, -32745, -32758, -32766, 32767, 32754, 32717, 32658, 32577, 32473, 32348, 32200, 32029, 31837, 31624, 31388, 31131, 30853, 30553, 30232, 29891, 29530, 29148, 28746, 28324, 27883, 27423, 26944, 26447, 25931, 25398, 24847, 24279, 23695, 23095, 22478, 21846, 21199, 20538, 19863, 19174, 18472, 17757, 17030, 16291, 15541, 14781, 14010, 13230, 12441, 11643, 10837, 10024, 9204, 8377, 7545, 6708, 5866, 5020, 4171, 3319, 2464, 1608, 751, -107, -965, -1822, -2678, -3532, -4383, -5232, -6077, -6918, -7754, -8585, -9409, -10228, -11039, -11843, -12639, -13426, -14204, -14972, -15730, -16477, -17213, -17937, -18648, -19347, -20033, -20705, -21363, -22006, -22634, -23246, -23843, -24423, -24986, -25533, -26062, -26573, -27066, -27540, -27995, -28431, -28848, -29245, -29622, -29979, -30315, -30630, -30924, -31197, -31449, -31679, -31887, -32074, -32239, -32381, -32501, -32600, -32675, -32729, -32759, }; #endif static const CELTMode mode48000_960_120 = { 48000, /* Fs */ 120, /* overlap */ 21, /* nbEBands */ 21, /* effEBands */ {27853, 0, 4096, 8192, }, /* preemph */ eband5ms, /* eBands */ 3, /* maxLM */ 8, /* nbShortMdcts */ 120, /* shortMdctSize */ 11, /* nbAllocVectors */ band_allocation, /* allocVectors */ logN400, /* logN */ window120, /* window */ {1920, 3, {&fft_state48000_960_0, &fft_state48000_960_1, &fft_state48000_960_2, &fft_state48000_960_3, }, mdct_twiddles960}, /* mdct */ {392, cache_index50, cache_bits50, cache_caps50}, /* cache */ }; /* List of all the available modes */ #define TOTAL_MODES 1 static const CELTMode * const static_mode_list[TOTAL_MODES] = { &mode48000_960_120, }; opus-1.1.2/celt/static_modes_fixed_arm_ne10.h000066400000000000000000000611701264527674100211430ustar00rootroot00000000000000/* The contents of this file was automatically generated by * dump_mode_arm_ne10.c with arguments: 48000 960 * It contains static definitions for some pre-defined modes. */ #include #ifndef NE10_FFT_PARAMS48000_960 #define NE10_FFT_PARAMS48000_960 static const ne10_int32_t ne10_factors_480[64] = { 4, 40, 4, 30, 2, 15, 5, 3, 3, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; static const ne10_int32_t ne10_factors_240[64] = { 3, 20, 4, 15, 5, 3, 3, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; static const ne10_int32_t ne10_factors_120[64] = { 3, 10, 2, 15, 5, 3, 3, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; static const ne10_int32_t ne10_factors_60[64] = { 2, 5, 5, 3, 3, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; static const ne10_fft_cpx_int32_t ne10_twiddles_480[480] = { {0,0}, {2147483647,0}, {2147483647,0}, {2147483647,0}, {1961823921,-873460313}, {1436946998,-1595891394}, {2147483647,0}, {1436946998,-1595891394}, {-224473265,-2135719496}, {2147483647,0}, {663608871,-2042378339}, {-1737350854,-1262259096}, {2147483647,0}, {-224473265,-2135719496}, {-2100555935,446487152}, {2147483647,0}, {2100555974,-446486968}, {1961823921,-873460313}, {1737350743,-1262259248}, {1436946998,-1595891394}, {1073741769,-1859775424}, {663608871,-2042378339}, {224473078,-2135719516}, {-224473265,-2135719496}, {-663609049,-2042378281}, {-1073741932,-1859775330}, {-1436947137,-1595891268}, {-1737350854,-1262259096}, {-1961823997,-873460141}, {-2100556013,-446486785}, {2147483647,0}, {2144540595,-112390613}, {2135719506,-224473172}, {2121044558,-335940465}, {2100555974,-446486968}, {2074309912,-555809682}, {2042378310,-663608960}, {2004848691,-769589332}, {1961823921,-873460313}, {1913421927,-974937199}, {1859775377,-1073741851}, {1801031311,-1169603450}, {1737350743,-1262259248}, {1668908218,-1351455280}, {1595891331,-1436947067}, {1518500216,-1518500282}, {1436946998,-1595891394}, {1351455207,-1668908277}, {1262259172,-1737350799}, {1169603371,-1801031362}, {1073741769,-1859775424}, {974937230,-1913421912}, {873460227,-1961823959}, {769589125,-2004848771}, {663608871,-2042378339}, {555809715,-2074309903}, {446486876,-2100555994}, {335940246,-2121044593}, {224473078,-2135719516}, {112390647,-2144540593}, {2147483647,0}, {2135719506,-224473172}, {2100555974,-446486968}, {2042378310,-663608960}, {1961823921,-873460313}, {1859775377,-1073741851}, {1737350743,-1262259248}, {1595891331,-1436947067}, {1436946998,-1595891394}, {1262259172,-1737350799}, {1073741769,-1859775424}, {873460227,-1961823959}, {663608871,-2042378339}, {446486876,-2100555994}, {224473078,-2135719516}, {-94,-2147483647}, {-224473265,-2135719496}, {-446487060,-2100555955}, {-663609049,-2042378281}, {-873460398,-1961823883}, {-1073741932,-1859775330}, {-1262259116,-1737350839}, {-1436947137,-1595891268}, {-1595891628,-1436946738}, {-1737350854,-1262259096}, {-1859775343,-1073741910}, {-1961823997,-873460141}, {-2042378447,-663608538}, {-2100556013,-446486785}, {-2135719499,-224473240}, {2147483647,0}, {2121044558,-335940465}, {2042378310,-663608960}, {1913421927,-974937199}, {1737350743,-1262259248}, {1518500216,-1518500282}, {1262259172,-1737350799}, {974937230,-1913421912}, {663608871,-2042378339}, {335940246,-2121044593}, {-94,-2147483647}, {-335940431,-2121044564}, {-663609049,-2042378281}, {-974937397,-1913421827}, {-1262259116,-1737350839}, {-1518500258,-1518500240}, {-1737350854,-1262259096}, {-1913422071,-974936918}, {-2042378447,-663608538}, {-2121044568,-335940406}, {-2147483647,188}, {-2121044509,335940777}, {-2042378331,663608895}, {-1913421900,974937252}, {-1737350633,1262259400}, {-1518499993,1518500506}, {-1262258813,1737351059}, {-974936606,1913422229}, {-663609179,2042378239}, {-335940566,2121044542}, {2147483647,0}, {2147299667,-28109693}, {2146747758,-56214570}, {2145828015,-84309815}, {2144540595,-112390613}, {2142885719,-140452154}, {2140863671,-168489630}, {2138474797,-196498235}, {2135719506,-224473172}, {2132598271,-252409646}, {2129111626,-280302871}, {2125260168,-308148068}, {2121044558,-335940465}, {2116465518,-363675300}, {2111523833,-391347822}, {2106220349,-418953288}, {2100555974,-446486968}, {2094531681,-473944146}, {2088148500,-501320115}, {2081407525,-528610186}, {2074309912,-555809682}, {2066856885,-582913912}, {2059049696,-609918325}, {2050889698,-636818231}, {2042378310,-663608960}, {2033516972,-690285983}, {2024307180,-716844791}, {2014750533,-743280770}, {2004848691,-769589332}, {1994603329,-795766029}, {1984016179,-821806435}, {1973089077,-847706028}, {1961823921,-873460313}, {1950222618,-899064934}, {1938287127,-924515564}, {1926019520,-949807783}, {1913421927,-974937199}, {1900496481,-999899565}, {1887245364,-1024690661}, {1873670877,-1049306180}, {1859775377,-1073741851}, {1845561215,-1097993541}, {1831030826,-1122057097}, {1816186632,-1145928502}, {1801031311,-1169603450}, {1785567394,-1193077993}, {1769797456,-1216348214}, {1753724345,-1239409914}, {1737350743,-1262259248}, {1720679456,-1284892300}, {1703713340,-1307305194}, {1686455222,-1329494189}, {1668908218,-1351455280}, {1651075255,-1373184807}, {1632959307,-1394679144}, {1614563642,-1415934412}, {1595891331,-1436947067}, {1576945572,-1457713510}, {1557729613,-1478230181}, {1538246655,-1498493658}, {1518500216,-1518500282}, {1498493590,-1538246721}, {1478230113,-1557729677}, {1457713441,-1576945636}, {1436946998,-1595891394}, {1415934341,-1614563704}, {1394679073,-1632959368}, {1373184735,-1651075315}, {1351455207,-1668908277}, {1329494115,-1686455280}, {1307305120,-1703713397}, {1284892225,-1720679512}, {1262259172,-1737350799}, {1239409837,-1753724400}, {1216348136,-1769797510}, {1193077915,-1785567446}, {1169603371,-1801031362}, {1145928423,-1816186682}, {1122057017,-1831030875}, {1097993571,-1845561197}, {1073741769,-1859775424}, {1049305987,-1873670985}, {1024690635,-1887245378}, {999899482,-1900496524}, {974937230,-1913421912}, {949807699,-1926019561}, {924515422,-1938287195}, {899064965,-1950222603}, {873460227,-1961823959}, {847705824,-1973089164}, {821806407,-1984016190}, {795765941,-1994603364}, {769589125,-2004848771}, {743280682,-2014750566}, {716844642,-2024307233}, {690286016,-2033516961}, {663608871,-2042378339}, {636818019,-2050889764}, {609918296,-2059049705}, {582913822,-2066856911}, {555809715,-2074309903}, {528610126,-2081407540}, {501319962,-2088148536}, {473944148,-2094531680}, {446486876,-2100555994}, {418953102,-2106220386}, {391347792,-2111523838}, {363675176,-2116465540}, {335940246,-2121044593}, {308148006,-2125260177}, {280302715,-2129111646}, {252409648,-2132598271}, {224473078,-2135719516}, {196498046,-2138474814}, {168489600,-2140863674}, {140452029,-2142885728}, {112390647,-2144540593}, {84309753,-2145828017}, {56214412,-2146747762}, {28109695,-2147299667}, {2147483647,0}, {2146747758,-56214570}, {2144540595,-112390613}, {2140863671,-168489630}, {2135719506,-224473172}, {2129111626,-280302871}, {2121044558,-335940465}, {2111523833,-391347822}, {2100555974,-446486968}, {2088148500,-501320115}, {2074309912,-555809682}, {2059049696,-609918325}, {2042378310,-663608960}, {2024307180,-716844791}, {2004848691,-769589332}, {1984016179,-821806435}, {1961823921,-873460313}, {1938287127,-924515564}, {1913421927,-974937199}, {1887245364,-1024690661}, {1859775377,-1073741851}, {1831030826,-1122057097}, {1801031311,-1169603450}, {1769797456,-1216348214}, {1737350743,-1262259248}, {1703713340,-1307305194}, {1668908218,-1351455280}, {1632959307,-1394679144}, {1595891331,-1436947067}, {1557729613,-1478230181}, {1518500216,-1518500282}, {1478230113,-1557729677}, {1436946998,-1595891394}, {1394679073,-1632959368}, {1351455207,-1668908277}, {1307305120,-1703713397}, {1262259172,-1737350799}, {1216348136,-1769797510}, {1169603371,-1801031362}, {1122057017,-1831030875}, {1073741769,-1859775424}, {1024690635,-1887245378}, {974937230,-1913421912}, {924515422,-1938287195}, {873460227,-1961823959}, {821806407,-1984016190}, {769589125,-2004848771}, {716844642,-2024307233}, {663608871,-2042378339}, {609918296,-2059049705}, {555809715,-2074309903}, {501319962,-2088148536}, {446486876,-2100555994}, {391347792,-2111523838}, {335940246,-2121044593}, {280302715,-2129111646}, {224473078,-2135719516}, {168489600,-2140863674}, {112390647,-2144540593}, {56214412,-2146747762}, {-94,-2147483647}, {-56214600,-2146747757}, {-112390835,-2144540584}, {-168489787,-2140863659}, {-224473265,-2135719496}, {-280302901,-2129111622}, {-335940431,-2121044564}, {-391347977,-2111523804}, {-446487060,-2100555955}, {-501320144,-2088148493}, {-555809896,-2074309855}, {-609918476,-2059049651}, {-663609049,-2042378281}, {-716844819,-2024307170}, {-769589300,-2004848703}, {-821806581,-1984016118}, {-873460398,-1961823883}, {-924515591,-1938287114}, {-974937397,-1913421827}, {-1024690575,-1887245411}, {-1073741932,-1859775330}, {-1122057395,-1831030643}, {-1169603421,-1801031330}, {-1216348291,-1769797403}, {-1262259116,-1737350839}, {-1307305268,-1703713283}, {-1351455453,-1668908078}, {-1394679021,-1632959413}, {-1436947137,-1595891268}, {-1478230435,-1557729372}, {-1518500258,-1518500240}, {-1557729742,-1478230045}, {-1595891628,-1436946738}, {-1632959429,-1394679001}, {-1668908417,-1351455035}, {-1703713298,-1307305248}, {-1737350854,-1262259096}, {-1769797708,-1216347848}, {-1801031344,-1169603400}, {-1831030924,-1122056937}, {-1859775343,-1073741910}, {-1887245423,-1024690552}, {-1913422071,-974936918}, {-1938287125,-924515568}, {-1961823997,-873460141}, {-1984016324,-821806084}, {-2004848713,-769589276}, {-2024307264,-716844553}, {-2042378447,-663608538}, {-2059049731,-609918206}, {-2074309994,-555809377}, {-2088148499,-501320119}, {-2100556013,-446486785}, {-2111523902,-391347448}, {-2121044568,-335940406}, {-2129111659,-280302621}, {-2135719499,-224473240}, {-2140863681,-168489506}, {-2144540612,-112390298}, {-2146747758,-56214574}, {2147483647,0}, {2145828015,-84309815}, {2140863671,-168489630}, {2132598271,-252409646}, {2121044558,-335940465}, {2106220349,-418953288}, {2088148500,-501320115}, {2066856885,-582913912}, {2042378310,-663608960}, {2014750533,-743280770}, {1984016179,-821806435}, {1950222618,-899064934}, {1913421927,-974937199}, {1873670877,-1049306180}, {1831030826,-1122057097}, {1785567394,-1193077993}, {1737350743,-1262259248}, {1686455222,-1329494189}, {1632959307,-1394679144}, {1576945572,-1457713510}, {1518500216,-1518500282}, {1457713441,-1576945636}, {1394679073,-1632959368}, {1329494115,-1686455280}, {1262259172,-1737350799}, {1193077915,-1785567446}, {1122057017,-1831030875}, {1049305987,-1873670985}, {974937230,-1913421912}, {899064965,-1950222603}, {821806407,-1984016190}, {743280682,-2014750566}, {663608871,-2042378339}, {582913822,-2066856911}, {501319962,-2088148536}, {418953102,-2106220386}, {335940246,-2121044593}, {252409648,-2132598271}, {168489600,-2140863674}, {84309753,-2145828017}, {-94,-2147483647}, {-84309940,-2145828010}, {-168489787,-2140863659}, {-252409834,-2132598249}, {-335940431,-2121044564}, {-418953286,-2106220349}, {-501320144,-2088148493}, {-582914003,-2066856860}, {-663609049,-2042378281}, {-743280858,-2014750501}, {-821806581,-1984016118}, {-899065136,-1950222525}, {-974937397,-1913421827}, {-1049306374,-1873670768}, {-1122057395,-1831030643}, {-1193078284,-1785567199}, {-1262259116,-1737350839}, {-1329494061,-1686455323}, {-1394679021,-1632959413}, {-1457713485,-1576945595}, {-1518500258,-1518500240}, {-1576945613,-1457713466}, {-1632959429,-1394679001}, {-1686455338,-1329494041}, {-1737350854,-1262259096}, {-1785567498,-1193077837}, {-1831030924,-1122056937}, {-1873671031,-1049305905}, {-1913422071,-974936918}, {-1950222750,-899064648}, {-1984016324,-821806084}, {-2014750687,-743280354}, {-2042378447,-663608538}, {-2066856867,-582913978}, {-2088148499,-501320119}, {-2106220354,-418953261}, {-2121044568,-335940406}, {-2132598282,-252409555}, {-2140863681,-168489506}, {-2145828021,-84309659}, {-2147483647,188}, {-2145828006,84310034}, {-2140863651,168489881}, {-2132598237,252409928}, {-2121044509,335940777}, {-2106220281,418953629}, {-2088148411,501320484}, {-2066856765,582914339}, {-2042378331,663608895}, {-2014750557,743280706}, {-1984016181,821806431}, {-1950222593,899064989}, {-1913421900,974937252}, {-1873670848,1049306232}, {-1831030728,1122057257}, {-1785567289,1193078149}, {-1737350633,1262259400}, {-1686455106,1329494336}, {-1632959185,1394679287}, {-1576945358,1457713742}, {-1518499993,1518500506}, {-1457713209,1576945850}, {-1394678735,1632959656}, {-1329493766,1686455555}, {-1262258813,1737351059}, {-1193077546,1785567692}, {-1122056638,1831031107}, {-1049305599,1873671202}, {-974936606,1913422229}, {-899064330,1950222896}, {-821805761,1984016458}, {-743280025,2014750808}, {-663609179,2042378239}, {-582914134,2066856823}, {-501320277,2088148461}, {-418953420,2106220322}, {-335940566,2121044542}, {-252409716,2132598263}, {-168489668,2140863668}, {-84309821,2145828015}, }; static const ne10_fft_cpx_int32_t ne10_twiddles_240[240] = { {0,0}, {2147483647,0}, {2147483647,0}, {2147483647,0}, {1961823921,-873460313}, {1436946998,-1595891394}, {2147483647,0}, {1436946998,-1595891394}, {-224473265,-2135719496}, {2147483647,0}, {663608871,-2042378339}, {-1737350854,-1262259096}, {2147483647,0}, {-224473265,-2135719496}, {-2100555935,446487152}, {2147483647,0}, {2135719506,-224473172}, {2100555974,-446486968}, {2042378310,-663608960}, {1961823921,-873460313}, {1859775377,-1073741851}, {1737350743,-1262259248}, {1595891331,-1436947067}, {1436946998,-1595891394}, {1262259172,-1737350799}, {1073741769,-1859775424}, {873460227,-1961823959}, {663608871,-2042378339}, {446486876,-2100555994}, {224473078,-2135719516}, {2147483647,0}, {2100555974,-446486968}, {1961823921,-873460313}, {1737350743,-1262259248}, {1436946998,-1595891394}, {1073741769,-1859775424}, {663608871,-2042378339}, {224473078,-2135719516}, {-224473265,-2135719496}, {-663609049,-2042378281}, {-1073741932,-1859775330}, {-1436947137,-1595891268}, {-1737350854,-1262259096}, {-1961823997,-873460141}, {-2100556013,-446486785}, {2147483647,0}, {2042378310,-663608960}, {1737350743,-1262259248}, {1262259172,-1737350799}, {663608871,-2042378339}, {-94,-2147483647}, {-663609049,-2042378281}, {-1262259116,-1737350839}, {-1737350854,-1262259096}, {-2042378447,-663608538}, {-2147483647,188}, {-2042378331,663608895}, {-1737350633,1262259400}, {-1262258813,1737351059}, {-663609179,2042378239}, {2147483647,0}, {2146747758,-56214570}, {2144540595,-112390613}, {2140863671,-168489630}, {2135719506,-224473172}, {2129111626,-280302871}, {2121044558,-335940465}, {2111523833,-391347822}, {2100555974,-446486968}, {2088148500,-501320115}, {2074309912,-555809682}, {2059049696,-609918325}, {2042378310,-663608960}, {2024307180,-716844791}, {2004848691,-769589332}, {1984016179,-821806435}, {1961823921,-873460313}, {1938287127,-924515564}, {1913421927,-974937199}, {1887245364,-1024690661}, {1859775377,-1073741851}, {1831030826,-1122057097}, {1801031311,-1169603450}, {1769797456,-1216348214}, {1737350743,-1262259248}, {1703713340,-1307305194}, {1668908218,-1351455280}, {1632959307,-1394679144}, {1595891331,-1436947067}, {1557729613,-1478230181}, {1518500216,-1518500282}, {1478230113,-1557729677}, {1436946998,-1595891394}, {1394679073,-1632959368}, {1351455207,-1668908277}, {1307305120,-1703713397}, {1262259172,-1737350799}, {1216348136,-1769797510}, {1169603371,-1801031362}, {1122057017,-1831030875}, {1073741769,-1859775424}, {1024690635,-1887245378}, {974937230,-1913421912}, {924515422,-1938287195}, {873460227,-1961823959}, {821806407,-1984016190}, {769589125,-2004848771}, {716844642,-2024307233}, {663608871,-2042378339}, {609918296,-2059049705}, {555809715,-2074309903}, {501319962,-2088148536}, {446486876,-2100555994}, {391347792,-2111523838}, {335940246,-2121044593}, {280302715,-2129111646}, {224473078,-2135719516}, {168489600,-2140863674}, {112390647,-2144540593}, {56214412,-2146747762}, {2147483647,0}, {2144540595,-112390613}, {2135719506,-224473172}, {2121044558,-335940465}, {2100555974,-446486968}, {2074309912,-555809682}, {2042378310,-663608960}, {2004848691,-769589332}, {1961823921,-873460313}, {1913421927,-974937199}, {1859775377,-1073741851}, {1801031311,-1169603450}, {1737350743,-1262259248}, {1668908218,-1351455280}, {1595891331,-1436947067}, {1518500216,-1518500282}, {1436946998,-1595891394}, {1351455207,-1668908277}, {1262259172,-1737350799}, {1169603371,-1801031362}, {1073741769,-1859775424}, {974937230,-1913421912}, {873460227,-1961823959}, {769589125,-2004848771}, {663608871,-2042378339}, {555809715,-2074309903}, {446486876,-2100555994}, {335940246,-2121044593}, {224473078,-2135719516}, {112390647,-2144540593}, {-94,-2147483647}, {-112390835,-2144540584}, {-224473265,-2135719496}, {-335940431,-2121044564}, {-446487060,-2100555955}, {-555809896,-2074309855}, {-663609049,-2042378281}, {-769589300,-2004848703}, {-873460398,-1961823883}, {-974937397,-1913421827}, {-1073741932,-1859775330}, {-1169603421,-1801031330}, {-1262259116,-1737350839}, {-1351455453,-1668908078}, {-1436947137,-1595891268}, {-1518500258,-1518500240}, {-1595891628,-1436946738}, {-1668908417,-1351455035}, {-1737350854,-1262259096}, {-1801031344,-1169603400}, {-1859775343,-1073741910}, {-1913422071,-974936918}, {-1961823997,-873460141}, {-2004848713,-769589276}, {-2042378447,-663608538}, {-2074309994,-555809377}, {-2100556013,-446486785}, {-2121044568,-335940406}, {-2135719499,-224473240}, {-2144540612,-112390298}, {2147483647,0}, {2140863671,-168489630}, {2121044558,-335940465}, {2088148500,-501320115}, {2042378310,-663608960}, {1984016179,-821806435}, {1913421927,-974937199}, {1831030826,-1122057097}, {1737350743,-1262259248}, {1632959307,-1394679144}, {1518500216,-1518500282}, {1394679073,-1632959368}, {1262259172,-1737350799}, {1122057017,-1831030875}, {974937230,-1913421912}, {821806407,-1984016190}, {663608871,-2042378339}, {501319962,-2088148536}, {335940246,-2121044593}, {168489600,-2140863674}, {-94,-2147483647}, {-168489787,-2140863659}, {-335940431,-2121044564}, {-501320144,-2088148493}, {-663609049,-2042378281}, {-821806581,-1984016118}, {-974937397,-1913421827}, {-1122057395,-1831030643}, {-1262259116,-1737350839}, {-1394679021,-1632959413}, {-1518500258,-1518500240}, {-1632959429,-1394679001}, {-1737350854,-1262259096}, {-1831030924,-1122056937}, {-1913422071,-974936918}, {-1984016324,-821806084}, {-2042378447,-663608538}, {-2088148499,-501320119}, {-2121044568,-335940406}, {-2140863681,-168489506}, {-2147483647,188}, {-2140863651,168489881}, {-2121044509,335940777}, {-2088148411,501320484}, {-2042378331,663608895}, {-1984016181,821806431}, {-1913421900,974937252}, {-1831030728,1122057257}, {-1737350633,1262259400}, {-1632959185,1394679287}, {-1518499993,1518500506}, {-1394678735,1632959656}, {-1262258813,1737351059}, {-1122056638,1831031107}, {-974936606,1913422229}, {-821805761,1984016458}, {-663609179,2042378239}, {-501320277,2088148461}, {-335940566,2121044542}, {-168489668,2140863668}, }; static const ne10_fft_cpx_int32_t ne10_twiddles_120[120] = { {0,0}, {2147483647,0}, {2147483647,0}, {2147483647,0}, {1961823921,-873460313}, {1436946998,-1595891394}, {2147483647,0}, {1436946998,-1595891394}, {-224473265,-2135719496}, {2147483647,0}, {663608871,-2042378339}, {-1737350854,-1262259096}, {2147483647,0}, {-224473265,-2135719496}, {-2100555935,446487152}, {2147483647,0}, {2100555974,-446486968}, {1961823921,-873460313}, {1737350743,-1262259248}, {1436946998,-1595891394}, {1073741769,-1859775424}, {663608871,-2042378339}, {224473078,-2135719516}, {-224473265,-2135719496}, {-663609049,-2042378281}, {-1073741932,-1859775330}, {-1436947137,-1595891268}, {-1737350854,-1262259096}, {-1961823997,-873460141}, {-2100556013,-446486785}, {2147483647,0}, {2144540595,-112390613}, {2135719506,-224473172}, {2121044558,-335940465}, {2100555974,-446486968}, {2074309912,-555809682}, {2042378310,-663608960}, {2004848691,-769589332}, {1961823921,-873460313}, {1913421927,-974937199}, {1859775377,-1073741851}, {1801031311,-1169603450}, {1737350743,-1262259248}, {1668908218,-1351455280}, {1595891331,-1436947067}, {1518500216,-1518500282}, {1436946998,-1595891394}, {1351455207,-1668908277}, {1262259172,-1737350799}, {1169603371,-1801031362}, {1073741769,-1859775424}, {974937230,-1913421912}, {873460227,-1961823959}, {769589125,-2004848771}, {663608871,-2042378339}, {555809715,-2074309903}, {446486876,-2100555994}, {335940246,-2121044593}, {224473078,-2135719516}, {112390647,-2144540593}, {2147483647,0}, {2135719506,-224473172}, {2100555974,-446486968}, {2042378310,-663608960}, {1961823921,-873460313}, {1859775377,-1073741851}, {1737350743,-1262259248}, {1595891331,-1436947067}, {1436946998,-1595891394}, {1262259172,-1737350799}, {1073741769,-1859775424}, {873460227,-1961823959}, {663608871,-2042378339}, {446486876,-2100555994}, {224473078,-2135719516}, {-94,-2147483647}, {-224473265,-2135719496}, {-446487060,-2100555955}, {-663609049,-2042378281}, {-873460398,-1961823883}, {-1073741932,-1859775330}, {-1262259116,-1737350839}, {-1436947137,-1595891268}, {-1595891628,-1436946738}, {-1737350854,-1262259096}, {-1859775343,-1073741910}, {-1961823997,-873460141}, {-2042378447,-663608538}, {-2100556013,-446486785}, {-2135719499,-224473240}, {2147483647,0}, {2121044558,-335940465}, {2042378310,-663608960}, {1913421927,-974937199}, {1737350743,-1262259248}, {1518500216,-1518500282}, {1262259172,-1737350799}, {974937230,-1913421912}, {663608871,-2042378339}, {335940246,-2121044593}, {-94,-2147483647}, {-335940431,-2121044564}, {-663609049,-2042378281}, {-974937397,-1913421827}, {-1262259116,-1737350839}, {-1518500258,-1518500240}, {-1737350854,-1262259096}, {-1913422071,-974936918}, {-2042378447,-663608538}, {-2121044568,-335940406}, {-2147483647,188}, {-2121044509,335940777}, {-2042378331,663608895}, {-1913421900,974937252}, {-1737350633,1262259400}, {-1518499993,1518500506}, {-1262258813,1737351059}, {-974936606,1913422229}, {-663609179,2042378239}, {-335940566,2121044542}, }; static const ne10_fft_cpx_int32_t ne10_twiddles_60[60] = { {0,0}, {2147483647,0}, {2147483647,0}, {2147483647,0}, {1961823921,-873460313}, {1436946998,-1595891394}, {2147483647,0}, {1436946998,-1595891394}, {-224473265,-2135719496}, {2147483647,0}, {663608871,-2042378339}, {-1737350854,-1262259096}, {2147483647,0}, {-224473265,-2135719496}, {-2100555935,446487152}, {2147483647,0}, {2135719506,-224473172}, {2100555974,-446486968}, {2042378310,-663608960}, {1961823921,-873460313}, {1859775377,-1073741851}, {1737350743,-1262259248}, {1595891331,-1436947067}, {1436946998,-1595891394}, {1262259172,-1737350799}, {1073741769,-1859775424}, {873460227,-1961823959}, {663608871,-2042378339}, {446486876,-2100555994}, {224473078,-2135719516}, {2147483647,0}, {2100555974,-446486968}, {1961823921,-873460313}, {1737350743,-1262259248}, {1436946998,-1595891394}, {1073741769,-1859775424}, {663608871,-2042378339}, {224473078,-2135719516}, {-224473265,-2135719496}, {-663609049,-2042378281}, {-1073741932,-1859775330}, {-1436947137,-1595891268}, {-1737350854,-1262259096}, {-1961823997,-873460141}, {-2100556013,-446486785}, {2147483647,0}, {2042378310,-663608960}, {1737350743,-1262259248}, {1262259172,-1737350799}, {663608871,-2042378339}, {-94,-2147483647}, {-663609049,-2042378281}, {-1262259116,-1737350839}, {-1737350854,-1262259096}, {-2042378447,-663608538}, {-2147483647,188}, {-2042378331,663608895}, {-1737350633,1262259400}, {-1262258813,1737351059}, {-663609179,2042378239}, }; static const ne10_fft_state_int32_t ne10_fft_state_int32_t_480 = { 120, (ne10_int32_t *)ne10_factors_480, (ne10_fft_cpx_int32_t *)ne10_twiddles_480, NULL, (ne10_fft_cpx_int32_t *)&ne10_twiddles_480[120], }; static const arch_fft_state cfg_arch_480 = { 1, (void *)&ne10_fft_state_int32_t_480, }; static const ne10_fft_state_int32_t ne10_fft_state_int32_t_240 = { 60, (ne10_int32_t *)ne10_factors_240, (ne10_fft_cpx_int32_t *)ne10_twiddles_240, NULL, (ne10_fft_cpx_int32_t *)&ne10_twiddles_240[60], }; static const arch_fft_state cfg_arch_240 = { 1, (void *)&ne10_fft_state_int32_t_240, }; static const ne10_fft_state_int32_t ne10_fft_state_int32_t_120 = { 30, (ne10_int32_t *)ne10_factors_120, (ne10_fft_cpx_int32_t *)ne10_twiddles_120, NULL, (ne10_fft_cpx_int32_t *)&ne10_twiddles_120[30], }; static const arch_fft_state cfg_arch_120 = { 1, (void *)&ne10_fft_state_int32_t_120, }; static const ne10_fft_state_int32_t ne10_fft_state_int32_t_60 = { 15, (ne10_int32_t *)ne10_factors_60, (ne10_fft_cpx_int32_t *)ne10_twiddles_60, NULL, (ne10_fft_cpx_int32_t *)&ne10_twiddles_60[15], }; static const arch_fft_state cfg_arch_60 = { 1, (void *)&ne10_fft_state_int32_t_60, }; #endif /* end NE10_FFT_PARAMS48000_960 */ opus-1.1.2/celt/static_modes_float.h000066400000000000000000001433471264527674100174760ustar00rootroot00000000000000/* The contents of this file was automatically generated by dump_modes.c with arguments: 48000 960 It contains static definitions for some pre-defined modes. */ #include "modes.h" #include "rate.h" #ifdef HAVE_ARM_NE10 #define OVERRIDE_FFT 1 #include "static_modes_float_arm_ne10.h" #endif #ifndef DEF_WINDOW120 #define DEF_WINDOW120 static const opus_val16 window120[120] = { 6.7286966e-05f, 0.00060551348f, 0.0016815970f, 0.0032947962f, 0.0054439943f, 0.0081276923f, 0.011344001f, 0.015090633f, 0.019364886f, 0.024163635f, 0.029483315f, 0.035319905f, 0.041668911f, 0.048525347f, 0.055883718f, 0.063737999f, 0.072081616f, 0.080907428f, 0.090207705f, 0.099974111f, 0.11019769f, 0.12086883f, 0.13197729f, 0.14351214f, 0.15546177f, 0.16781389f, 0.18055550f, 0.19367290f, 0.20715171f, 0.22097682f, 0.23513243f, 0.24960208f, 0.26436860f, 0.27941419f, 0.29472040f, 0.31026818f, 0.32603788f, 0.34200931f, 0.35816177f, 0.37447407f, 0.39092462f, 0.40749142f, 0.42415215f, 0.44088423f, 0.45766484f, 0.47447104f, 0.49127978f, 0.50806798f, 0.52481261f, 0.54149077f, 0.55807973f, 0.57455701f, 0.59090049f, 0.60708841f, 0.62309951f, 0.63891306f, 0.65450896f, 0.66986776f, 0.68497077f, 0.69980010f, 0.71433873f, 0.72857055f, 0.74248043f, 0.75605424f, 0.76927895f, 0.78214257f, 0.79463430f, 0.80674445f, 0.81846456f, 0.82978733f, 0.84070669f, 0.85121779f, 0.86131698f, 0.87100183f, 0.88027111f, 0.88912479f, 0.89756398f, 0.90559094f, 0.91320904f, 0.92042270f, 0.92723738f, 0.93365955f, 0.93969656f, 0.94535671f, 0.95064907f, 0.95558353f, 0.96017067f, 0.96442171f, 0.96834849f, 0.97196334f, 0.97527906f, 0.97830883f, 0.98106616f, 0.98356480f, 0.98581869f, 0.98784191f, 0.98964856f, 0.99125274f, 0.99266849f, 0.99390969f, 0.99499004f, 0.99592297f, 0.99672162f, 0.99739874f, 0.99796667f, 0.99843728f, 0.99882195f, 0.99913147f, 0.99937606f, 0.99956527f, 0.99970802f, 0.99981248f, 0.99988613f, 0.99993565f, 0.99996697f, 0.99998518f, 0.99999457f, 0.99999859f, 0.99999982f, 1.0000000f, }; #endif #ifndef DEF_LOGN400 #define DEF_LOGN400 static const opus_int16 logN400[21] = { 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 8, 8, 16, 16, 16, 21, 21, 24, 29, 34, 36, }; #endif #ifndef DEF_PULSE_CACHE50 #define DEF_PULSE_CACHE50 static const opus_int16 cache_index50[105] = { -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, 0, 0, 41, 41, 41, 82, 82, 123, 164, 200, 222, 0, 0, 0, 0, 0, 0, 0, 0, 41, 41, 41, 41, 123, 123, 123, 164, 164, 240, 266, 283, 295, 41, 41, 41, 41, 41, 41, 41, 41, 123, 123, 123, 123, 240, 240, 240, 266, 266, 305, 318, 328, 336, 123, 123, 123, 123, 123, 123, 123, 123, 240, 240, 240, 240, 305, 305, 305, 318, 318, 343, 351, 358, 364, 240, 240, 240, 240, 240, 240, 240, 240, 305, 305, 305, 305, 343, 343, 343, 351, 351, 370, 376, 382, 387, }; static const unsigned char cache_bits50[392] = { 40, 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, 40, 15, 23, 28, 31, 34, 36, 38, 39, 41, 42, 43, 44, 45, 46, 47, 47, 49, 50, 51, 52, 53, 54, 55, 55, 57, 58, 59, 60, 61, 62, 63, 63, 65, 66, 67, 68, 69, 70, 71, 71, 40, 20, 33, 41, 48, 53, 57, 61, 64, 66, 69, 71, 73, 75, 76, 78, 80, 82, 85, 87, 89, 91, 92, 94, 96, 98, 101, 103, 105, 107, 108, 110, 112, 114, 117, 119, 121, 123, 124, 126, 128, 40, 23, 39, 51, 60, 67, 73, 79, 83, 87, 91, 94, 97, 100, 102, 105, 107, 111, 115, 118, 121, 124, 126, 129, 131, 135, 139, 142, 145, 148, 150, 153, 155, 159, 163, 166, 169, 172, 174, 177, 179, 35, 28, 49, 65, 78, 89, 99, 107, 114, 120, 126, 132, 136, 141, 145, 149, 153, 159, 165, 171, 176, 180, 185, 189, 192, 199, 205, 211, 216, 220, 225, 229, 232, 239, 245, 251, 21, 33, 58, 79, 97, 112, 125, 137, 148, 157, 166, 174, 182, 189, 195, 201, 207, 217, 227, 235, 243, 251, 17, 35, 63, 86, 106, 123, 139, 152, 165, 177, 187, 197, 206, 214, 222, 230, 237, 250, 25, 31, 55, 75, 91, 105, 117, 128, 138, 146, 154, 161, 168, 174, 180, 185, 190, 200, 208, 215, 222, 229, 235, 240, 245, 255, 16, 36, 65, 89, 110, 128, 144, 159, 173, 185, 196, 207, 217, 226, 234, 242, 250, 11, 41, 74, 103, 128, 151, 172, 191, 209, 225, 241, 255, 9, 43, 79, 110, 138, 163, 186, 207, 227, 246, 12, 39, 71, 99, 123, 144, 164, 182, 198, 214, 228, 241, 253, 9, 44, 81, 113, 142, 168, 192, 214, 235, 255, 7, 49, 90, 127, 160, 191, 220, 247, 6, 51, 95, 134, 170, 203, 234, 7, 47, 87, 123, 155, 184, 212, 237, 6, 52, 97, 137, 174, 208, 240, 5, 57, 106, 151, 192, 231, 5, 59, 111, 158, 202, 243, 5, 55, 103, 147, 187, 224, 5, 60, 113, 161, 206, 248, 4, 65, 122, 175, 224, 4, 67, 127, 182, 234, }; static const unsigned char cache_caps50[168] = { 224, 224, 224, 224, 224, 224, 224, 224, 160, 160, 160, 160, 185, 185, 185, 178, 178, 168, 134, 61, 37, 224, 224, 224, 224, 224, 224, 224, 224, 240, 240, 240, 240, 207, 207, 207, 198, 198, 183, 144, 66, 40, 160, 160, 160, 160, 160, 160, 160, 160, 185, 185, 185, 185, 193, 193, 193, 183, 183, 172, 138, 64, 38, 240, 240, 240, 240, 240, 240, 240, 240, 207, 207, 207, 207, 204, 204, 204, 193, 193, 180, 143, 66, 40, 185, 185, 185, 185, 185, 185, 185, 185, 193, 193, 193, 193, 193, 193, 193, 183, 183, 172, 138, 65, 39, 207, 207, 207, 207, 207, 207, 207, 207, 204, 204, 204, 204, 201, 201, 201, 188, 188, 176, 141, 66, 40, 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, 194, 194, 194, 184, 184, 173, 139, 65, 39, 204, 204, 204, 204, 204, 204, 204, 204, 201, 201, 201, 201, 198, 198, 198, 187, 187, 175, 140, 66, 40, }; #endif #ifndef FFT_TWIDDLES48000_960 #define FFT_TWIDDLES48000_960 static const kiss_twiddle_cpx fft_twiddles48000_960[480] = { {1.0000000f, -0.0000000f}, {0.99991433f, -0.013089596f}, {0.99965732f, -0.026176948f}, {0.99922904f, -0.039259816f}, {0.99862953f, -0.052335956f}, {0.99785892f, -0.065403129f}, {0.99691733f, -0.078459096f}, {0.99580493f, -0.091501619f}, {0.99452190f, -0.10452846f}, {0.99306846f, -0.11753740f}, {0.99144486f, -0.13052619f}, {0.98965139f, -0.14349262f}, {0.98768834f, -0.15643447f}, {0.98555606f, -0.16934950f}, {0.98325491f, -0.18223553f}, {0.98078528f, -0.19509032f}, {0.97814760f, -0.20791169f}, {0.97534232f, -0.22069744f}, {0.97236992f, -0.23344536f}, {0.96923091f, -0.24615329f}, {0.96592583f, -0.25881905f}, {0.96245524f, -0.27144045f}, {0.95881973f, -0.28401534f}, {0.95501994f, -0.29654157f}, {0.95105652f, -0.30901699f}, {0.94693013f, -0.32143947f}, {0.94264149f, -0.33380686f}, {0.93819134f, -0.34611706f}, {0.93358043f, -0.35836795f}, {0.92880955f, -0.37055744f}, {0.92387953f, -0.38268343f}, {0.91879121f, -0.39474386f}, {0.91354546f, -0.40673664f}, {0.90814317f, -0.41865974f}, {0.90258528f, -0.43051110f}, {0.89687274f, -0.44228869f}, {0.89100652f, -0.45399050f}, {0.88498764f, -0.46561452f}, {0.87881711f, -0.47715876f}, {0.87249601f, -0.48862124f}, {0.86602540f, -0.50000000f}, {0.85940641f, -0.51129309f}, {0.85264016f, -0.52249856f}, {0.84572782f, -0.53361452f}, {0.83867057f, -0.54463904f}, {0.83146961f, -0.55557023f}, {0.82412619f, -0.56640624f}, {0.81664156f, -0.57714519f}, {0.80901699f, -0.58778525f}, {0.80125381f, -0.59832460f}, {0.79335334f, -0.60876143f}, {0.78531693f, -0.61909395f}, {0.77714596f, -0.62932039f}, {0.76884183f, -0.63943900f}, {0.76040597f, -0.64944805f}, {0.75183981f, -0.65934582f}, {0.74314483f, -0.66913061f}, {0.73432251f, -0.67880075f}, {0.72537437f, -0.68835458f}, {0.71630194f, -0.69779046f}, {0.70710678f, -0.70710678f}, {0.69779046f, -0.71630194f}, {0.68835458f, -0.72537437f}, {0.67880075f, -0.73432251f}, {0.66913061f, -0.74314483f}, {0.65934582f, -0.75183981f}, {0.64944805f, -0.76040597f}, {0.63943900f, -0.76884183f}, {0.62932039f, -0.77714596f}, {0.61909395f, -0.78531693f}, {0.60876143f, -0.79335334f}, {0.59832460f, -0.80125381f}, {0.58778525f, -0.80901699f}, {0.57714519f, -0.81664156f}, {0.56640624f, -0.82412619f}, {0.55557023f, -0.83146961f}, {0.54463904f, -0.83867057f}, {0.53361452f, -0.84572782f}, {0.52249856f, -0.85264016f}, {0.51129309f, -0.85940641f}, {0.50000000f, -0.86602540f}, {0.48862124f, -0.87249601f}, {0.47715876f, -0.87881711f}, {0.46561452f, -0.88498764f}, {0.45399050f, -0.89100652f}, {0.44228869f, -0.89687274f}, {0.43051110f, -0.90258528f}, {0.41865974f, -0.90814317f}, {0.40673664f, -0.91354546f}, {0.39474386f, -0.91879121f}, {0.38268343f, -0.92387953f}, {0.37055744f, -0.92880955f}, {0.35836795f, -0.93358043f}, {0.34611706f, -0.93819134f}, {0.33380686f, -0.94264149f}, {0.32143947f, -0.94693013f}, {0.30901699f, -0.95105652f}, {0.29654157f, -0.95501994f}, {0.28401534f, -0.95881973f}, {0.27144045f, -0.96245524f}, {0.25881905f, -0.96592583f}, {0.24615329f, -0.96923091f}, {0.23344536f, -0.97236992f}, {0.22069744f, -0.97534232f}, {0.20791169f, -0.97814760f}, {0.19509032f, -0.98078528f}, {0.18223553f, -0.98325491f}, {0.16934950f, -0.98555606f}, {0.15643447f, -0.98768834f}, {0.14349262f, -0.98965139f}, {0.13052619f, -0.99144486f}, {0.11753740f, -0.99306846f}, {0.10452846f, -0.99452190f}, {0.091501619f, -0.99580493f}, {0.078459096f, -0.99691733f}, {0.065403129f, -0.99785892f}, {0.052335956f, -0.99862953f}, {0.039259816f, -0.99922904f}, {0.026176948f, -0.99965732f}, {0.013089596f, -0.99991433f}, {6.1230318e-17f, -1.0000000f}, {-0.013089596f, -0.99991433f}, {-0.026176948f, -0.99965732f}, {-0.039259816f, -0.99922904f}, {-0.052335956f, -0.99862953f}, {-0.065403129f, -0.99785892f}, {-0.078459096f, -0.99691733f}, {-0.091501619f, -0.99580493f}, {-0.10452846f, -0.99452190f}, {-0.11753740f, -0.99306846f}, {-0.13052619f, -0.99144486f}, {-0.14349262f, -0.98965139f}, {-0.15643447f, -0.98768834f}, {-0.16934950f, -0.98555606f}, {-0.18223553f, -0.98325491f}, {-0.19509032f, -0.98078528f}, {-0.20791169f, -0.97814760f}, {-0.22069744f, -0.97534232f}, {-0.23344536f, -0.97236992f}, {-0.24615329f, -0.96923091f}, {-0.25881905f, -0.96592583f}, {-0.27144045f, -0.96245524f}, {-0.28401534f, -0.95881973f}, {-0.29654157f, -0.95501994f}, {-0.30901699f, -0.95105652f}, {-0.32143947f, -0.94693013f}, {-0.33380686f, -0.94264149f}, {-0.34611706f, -0.93819134f}, {-0.35836795f, -0.93358043f}, {-0.37055744f, -0.92880955f}, {-0.38268343f, -0.92387953f}, {-0.39474386f, -0.91879121f}, {-0.40673664f, -0.91354546f}, {-0.41865974f, -0.90814317f}, {-0.43051110f, -0.90258528f}, {-0.44228869f, -0.89687274f}, {-0.45399050f, -0.89100652f}, {-0.46561452f, -0.88498764f}, {-0.47715876f, -0.87881711f}, {-0.48862124f, -0.87249601f}, {-0.50000000f, -0.86602540f}, {-0.51129309f, -0.85940641f}, {-0.52249856f, -0.85264016f}, {-0.53361452f, -0.84572782f}, {-0.54463904f, -0.83867057f}, {-0.55557023f, -0.83146961f}, {-0.56640624f, -0.82412619f}, {-0.57714519f, -0.81664156f}, {-0.58778525f, -0.80901699f}, {-0.59832460f, -0.80125381f}, {-0.60876143f, -0.79335334f}, {-0.61909395f, -0.78531693f}, {-0.62932039f, -0.77714596f}, {-0.63943900f, -0.76884183f}, {-0.64944805f, -0.76040597f}, {-0.65934582f, -0.75183981f}, {-0.66913061f, -0.74314483f}, {-0.67880075f, -0.73432251f}, {-0.68835458f, -0.72537437f}, {-0.69779046f, -0.71630194f}, {-0.70710678f, -0.70710678f}, {-0.71630194f, -0.69779046f}, {-0.72537437f, -0.68835458f}, {-0.73432251f, -0.67880075f}, {-0.74314483f, -0.66913061f}, {-0.75183981f, -0.65934582f}, {-0.76040597f, -0.64944805f}, {-0.76884183f, -0.63943900f}, {-0.77714596f, -0.62932039f}, {-0.78531693f, -0.61909395f}, {-0.79335334f, -0.60876143f}, {-0.80125381f, -0.59832460f}, {-0.80901699f, -0.58778525f}, {-0.81664156f, -0.57714519f}, {-0.82412619f, -0.56640624f}, {-0.83146961f, -0.55557023f}, {-0.83867057f, -0.54463904f}, {-0.84572782f, -0.53361452f}, {-0.85264016f, -0.52249856f}, {-0.85940641f, -0.51129309f}, {-0.86602540f, -0.50000000f}, {-0.87249601f, -0.48862124f}, {-0.87881711f, -0.47715876f}, {-0.88498764f, -0.46561452f}, {-0.89100652f, -0.45399050f}, {-0.89687274f, -0.44228869f}, {-0.90258528f, -0.43051110f}, {-0.90814317f, -0.41865974f}, {-0.91354546f, -0.40673664f}, {-0.91879121f, -0.39474386f}, {-0.92387953f, -0.38268343f}, {-0.92880955f, -0.37055744f}, {-0.93358043f, -0.35836795f}, {-0.93819134f, -0.34611706f}, {-0.94264149f, -0.33380686f}, {-0.94693013f, -0.32143947f}, {-0.95105652f, -0.30901699f}, {-0.95501994f, -0.29654157f}, {-0.95881973f, -0.28401534f}, {-0.96245524f, -0.27144045f}, {-0.96592583f, -0.25881905f}, {-0.96923091f, -0.24615329f}, {-0.97236992f, -0.23344536f}, {-0.97534232f, -0.22069744f}, {-0.97814760f, -0.20791169f}, {-0.98078528f, -0.19509032f}, {-0.98325491f, -0.18223553f}, {-0.98555606f, -0.16934950f}, {-0.98768834f, -0.15643447f}, {-0.98965139f, -0.14349262f}, {-0.99144486f, -0.13052619f}, {-0.99306846f, -0.11753740f}, {-0.99452190f, -0.10452846f}, {-0.99580493f, -0.091501619f}, {-0.99691733f, -0.078459096f}, {-0.99785892f, -0.065403129f}, {-0.99862953f, -0.052335956f}, {-0.99922904f, -0.039259816f}, {-0.99965732f, -0.026176948f}, {-0.99991433f, -0.013089596f}, {-1.0000000f, -1.2246064e-16f}, {-0.99991433f, 0.013089596f}, {-0.99965732f, 0.026176948f}, {-0.99922904f, 0.039259816f}, {-0.99862953f, 0.052335956f}, {-0.99785892f, 0.065403129f}, {-0.99691733f, 0.078459096f}, {-0.99580493f, 0.091501619f}, {-0.99452190f, 0.10452846f}, {-0.99306846f, 0.11753740f}, {-0.99144486f, 0.13052619f}, {-0.98965139f, 0.14349262f}, {-0.98768834f, 0.15643447f}, {-0.98555606f, 0.16934950f}, {-0.98325491f, 0.18223553f}, {-0.98078528f, 0.19509032f}, {-0.97814760f, 0.20791169f}, {-0.97534232f, 0.22069744f}, {-0.97236992f, 0.23344536f}, {-0.96923091f, 0.24615329f}, {-0.96592583f, 0.25881905f}, {-0.96245524f, 0.27144045f}, {-0.95881973f, 0.28401534f}, {-0.95501994f, 0.29654157f}, {-0.95105652f, 0.30901699f}, {-0.94693013f, 0.32143947f}, {-0.94264149f, 0.33380686f}, {-0.93819134f, 0.34611706f}, {-0.93358043f, 0.35836795f}, {-0.92880955f, 0.37055744f}, {-0.92387953f, 0.38268343f}, {-0.91879121f, 0.39474386f}, {-0.91354546f, 0.40673664f}, {-0.90814317f, 0.41865974f}, {-0.90258528f, 0.43051110f}, {-0.89687274f, 0.44228869f}, {-0.89100652f, 0.45399050f}, {-0.88498764f, 0.46561452f}, {-0.87881711f, 0.47715876f}, {-0.87249601f, 0.48862124f}, {-0.86602540f, 0.50000000f}, {-0.85940641f, 0.51129309f}, {-0.85264016f, 0.52249856f}, {-0.84572782f, 0.53361452f}, {-0.83867057f, 0.54463904f}, {-0.83146961f, 0.55557023f}, {-0.82412619f, 0.56640624f}, {-0.81664156f, 0.57714519f}, {-0.80901699f, 0.58778525f}, {-0.80125381f, 0.59832460f}, {-0.79335334f, 0.60876143f}, {-0.78531693f, 0.61909395f}, {-0.77714596f, 0.62932039f}, {-0.76884183f, 0.63943900f}, {-0.76040597f, 0.64944805f}, {-0.75183981f, 0.65934582f}, {-0.74314483f, 0.66913061f}, {-0.73432251f, 0.67880075f}, {-0.72537437f, 0.68835458f}, {-0.71630194f, 0.69779046f}, {-0.70710678f, 0.70710678f}, {-0.69779046f, 0.71630194f}, {-0.68835458f, 0.72537437f}, {-0.67880075f, 0.73432251f}, {-0.66913061f, 0.74314483f}, {-0.65934582f, 0.75183981f}, {-0.64944805f, 0.76040597f}, {-0.63943900f, 0.76884183f}, {-0.62932039f, 0.77714596f}, {-0.61909395f, 0.78531693f}, {-0.60876143f, 0.79335334f}, {-0.59832460f, 0.80125381f}, {-0.58778525f, 0.80901699f}, {-0.57714519f, 0.81664156f}, {-0.56640624f, 0.82412619f}, {-0.55557023f, 0.83146961f}, {-0.54463904f, 0.83867057f}, {-0.53361452f, 0.84572782f}, {-0.52249856f, 0.85264016f}, {-0.51129309f, 0.85940641f}, {-0.50000000f, 0.86602540f}, {-0.48862124f, 0.87249601f}, {-0.47715876f, 0.87881711f}, {-0.46561452f, 0.88498764f}, {-0.45399050f, 0.89100652f}, {-0.44228869f, 0.89687274f}, {-0.43051110f, 0.90258528f}, {-0.41865974f, 0.90814317f}, {-0.40673664f, 0.91354546f}, {-0.39474386f, 0.91879121f}, {-0.38268343f, 0.92387953f}, {-0.37055744f, 0.92880955f}, {-0.35836795f, 0.93358043f}, {-0.34611706f, 0.93819134f}, {-0.33380686f, 0.94264149f}, {-0.32143947f, 0.94693013f}, {-0.30901699f, 0.95105652f}, {-0.29654157f, 0.95501994f}, {-0.28401534f, 0.95881973f}, {-0.27144045f, 0.96245524f}, {-0.25881905f, 0.96592583f}, {-0.24615329f, 0.96923091f}, {-0.23344536f, 0.97236992f}, {-0.22069744f, 0.97534232f}, {-0.20791169f, 0.97814760f}, {-0.19509032f, 0.98078528f}, {-0.18223553f, 0.98325491f}, {-0.16934950f, 0.98555606f}, {-0.15643447f, 0.98768834f}, {-0.14349262f, 0.98965139f}, {-0.13052619f, 0.99144486f}, {-0.11753740f, 0.99306846f}, {-0.10452846f, 0.99452190f}, {-0.091501619f, 0.99580493f}, {-0.078459096f, 0.99691733f}, {-0.065403129f, 0.99785892f}, {-0.052335956f, 0.99862953f}, {-0.039259816f, 0.99922904f}, {-0.026176948f, 0.99965732f}, {-0.013089596f, 0.99991433f}, {-1.8369095e-16f, 1.0000000f}, {0.013089596f, 0.99991433f}, {0.026176948f, 0.99965732f}, {0.039259816f, 0.99922904f}, {0.052335956f, 0.99862953f}, {0.065403129f, 0.99785892f}, {0.078459096f, 0.99691733f}, {0.091501619f, 0.99580493f}, {0.10452846f, 0.99452190f}, {0.11753740f, 0.99306846f}, {0.13052619f, 0.99144486f}, {0.14349262f, 0.98965139f}, {0.15643447f, 0.98768834f}, {0.16934950f, 0.98555606f}, {0.18223553f, 0.98325491f}, {0.19509032f, 0.98078528f}, {0.20791169f, 0.97814760f}, {0.22069744f, 0.97534232f}, {0.23344536f, 0.97236992f}, {0.24615329f, 0.96923091f}, {0.25881905f, 0.96592583f}, {0.27144045f, 0.96245524f}, {0.28401534f, 0.95881973f}, {0.29654157f, 0.95501994f}, {0.30901699f, 0.95105652f}, {0.32143947f, 0.94693013f}, {0.33380686f, 0.94264149f}, {0.34611706f, 0.93819134f}, {0.35836795f, 0.93358043f}, {0.37055744f, 0.92880955f}, {0.38268343f, 0.92387953f}, {0.39474386f, 0.91879121f}, {0.40673664f, 0.91354546f}, {0.41865974f, 0.90814317f}, {0.43051110f, 0.90258528f}, {0.44228869f, 0.89687274f}, {0.45399050f, 0.89100652f}, {0.46561452f, 0.88498764f}, {0.47715876f, 0.87881711f}, {0.48862124f, 0.87249601f}, {0.50000000f, 0.86602540f}, {0.51129309f, 0.85940641f}, {0.52249856f, 0.85264016f}, {0.53361452f, 0.84572782f}, {0.54463904f, 0.83867057f}, {0.55557023f, 0.83146961f}, {0.56640624f, 0.82412619f}, {0.57714519f, 0.81664156f}, {0.58778525f, 0.80901699f}, {0.59832460f, 0.80125381f}, {0.60876143f, 0.79335334f}, {0.61909395f, 0.78531693f}, {0.62932039f, 0.77714596f}, {0.63943900f, 0.76884183f}, {0.64944805f, 0.76040597f}, {0.65934582f, 0.75183981f}, {0.66913061f, 0.74314483f}, {0.67880075f, 0.73432251f}, {0.68835458f, 0.72537437f}, {0.69779046f, 0.71630194f}, {0.70710678f, 0.70710678f}, {0.71630194f, 0.69779046f}, {0.72537437f, 0.68835458f}, {0.73432251f, 0.67880075f}, {0.74314483f, 0.66913061f}, {0.75183981f, 0.65934582f}, {0.76040597f, 0.64944805f}, {0.76884183f, 0.63943900f}, {0.77714596f, 0.62932039f}, {0.78531693f, 0.61909395f}, {0.79335334f, 0.60876143f}, {0.80125381f, 0.59832460f}, {0.80901699f, 0.58778525f}, {0.81664156f, 0.57714519f}, {0.82412619f, 0.56640624f}, {0.83146961f, 0.55557023f}, {0.83867057f, 0.54463904f}, {0.84572782f, 0.53361452f}, {0.85264016f, 0.52249856f}, {0.85940641f, 0.51129309f}, {0.86602540f, 0.50000000f}, {0.87249601f, 0.48862124f}, {0.87881711f, 0.47715876f}, {0.88498764f, 0.46561452f}, {0.89100652f, 0.45399050f}, {0.89687274f, 0.44228869f}, {0.90258528f, 0.43051110f}, {0.90814317f, 0.41865974f}, {0.91354546f, 0.40673664f}, {0.91879121f, 0.39474386f}, {0.92387953f, 0.38268343f}, {0.92880955f, 0.37055744f}, {0.93358043f, 0.35836795f}, {0.93819134f, 0.34611706f}, {0.94264149f, 0.33380686f}, {0.94693013f, 0.32143947f}, {0.95105652f, 0.30901699f}, {0.95501994f, 0.29654157f}, {0.95881973f, 0.28401534f}, {0.96245524f, 0.27144045f}, {0.96592583f, 0.25881905f}, {0.96923091f, 0.24615329f}, {0.97236992f, 0.23344536f}, {0.97534232f, 0.22069744f}, {0.97814760f, 0.20791169f}, {0.98078528f, 0.19509032f}, {0.98325491f, 0.18223553f}, {0.98555606f, 0.16934950f}, {0.98768834f, 0.15643447f}, {0.98965139f, 0.14349262f}, {0.99144486f, 0.13052619f}, {0.99306846f, 0.11753740f}, {0.99452190f, 0.10452846f}, {0.99580493f, 0.091501619f}, {0.99691733f, 0.078459096f}, {0.99785892f, 0.065403129f}, {0.99862953f, 0.052335956f}, {0.99922904f, 0.039259816f}, {0.99965732f, 0.026176948f}, {0.99991433f, 0.013089596f}, }; #ifndef FFT_BITREV480 #define FFT_BITREV480 static const opus_int16 fft_bitrev480[480] = { 0, 96, 192, 288, 384, 32, 128, 224, 320, 416, 64, 160, 256, 352, 448, 8, 104, 200, 296, 392, 40, 136, 232, 328, 424, 72, 168, 264, 360, 456, 16, 112, 208, 304, 400, 48, 144, 240, 336, 432, 80, 176, 272, 368, 464, 24, 120, 216, 312, 408, 56, 152, 248, 344, 440, 88, 184, 280, 376, 472, 4, 100, 196, 292, 388, 36, 132, 228, 324, 420, 68, 164, 260, 356, 452, 12, 108, 204, 300, 396, 44, 140, 236, 332, 428, 76, 172, 268, 364, 460, 20, 116, 212, 308, 404, 52, 148, 244, 340, 436, 84, 180, 276, 372, 468, 28, 124, 220, 316, 412, 60, 156, 252, 348, 444, 92, 188, 284, 380, 476, 1, 97, 193, 289, 385, 33, 129, 225, 321, 417, 65, 161, 257, 353, 449, 9, 105, 201, 297, 393, 41, 137, 233, 329, 425, 73, 169, 265, 361, 457, 17, 113, 209, 305, 401, 49, 145, 241, 337, 433, 81, 177, 273, 369, 465, 25, 121, 217, 313, 409, 57, 153, 249, 345, 441, 89, 185, 281, 377, 473, 5, 101, 197, 293, 389, 37, 133, 229, 325, 421, 69, 165, 261, 357, 453, 13, 109, 205, 301, 397, 45, 141, 237, 333, 429, 77, 173, 269, 365, 461, 21, 117, 213, 309, 405, 53, 149, 245, 341, 437, 85, 181, 277, 373, 469, 29, 125, 221, 317, 413, 61, 157, 253, 349, 445, 93, 189, 285, 381, 477, 2, 98, 194, 290, 386, 34, 130, 226, 322, 418, 66, 162, 258, 354, 450, 10, 106, 202, 298, 394, 42, 138, 234, 330, 426, 74, 170, 266, 362, 458, 18, 114, 210, 306, 402, 50, 146, 242, 338, 434, 82, 178, 274, 370, 466, 26, 122, 218, 314, 410, 58, 154, 250, 346, 442, 90, 186, 282, 378, 474, 6, 102, 198, 294, 390, 38, 134, 230, 326, 422, 70, 166, 262, 358, 454, 14, 110, 206, 302, 398, 46, 142, 238, 334, 430, 78, 174, 270, 366, 462, 22, 118, 214, 310, 406, 54, 150, 246, 342, 438, 86, 182, 278, 374, 470, 30, 126, 222, 318, 414, 62, 158, 254, 350, 446, 94, 190, 286, 382, 478, 3, 99, 195, 291, 387, 35, 131, 227, 323, 419, 67, 163, 259, 355, 451, 11, 107, 203, 299, 395, 43, 139, 235, 331, 427, 75, 171, 267, 363, 459, 19, 115, 211, 307, 403, 51, 147, 243, 339, 435, 83, 179, 275, 371, 467, 27, 123, 219, 315, 411, 59, 155, 251, 347, 443, 91, 187, 283, 379, 475, 7, 103, 199, 295, 391, 39, 135, 231, 327, 423, 71, 167, 263, 359, 455, 15, 111, 207, 303, 399, 47, 143, 239, 335, 431, 79, 175, 271, 367, 463, 23, 119, 215, 311, 407, 55, 151, 247, 343, 439, 87, 183, 279, 375, 471, 31, 127, 223, 319, 415, 63, 159, 255, 351, 447, 95, 191, 287, 383, 479, }; #endif #ifndef FFT_BITREV240 #define FFT_BITREV240 static const opus_int16 fft_bitrev240[240] = { 0, 48, 96, 144, 192, 16, 64, 112, 160, 208, 32, 80, 128, 176, 224, 4, 52, 100, 148, 196, 20, 68, 116, 164, 212, 36, 84, 132, 180, 228, 8, 56, 104, 152, 200, 24, 72, 120, 168, 216, 40, 88, 136, 184, 232, 12, 60, 108, 156, 204, 28, 76, 124, 172, 220, 44, 92, 140, 188, 236, 1, 49, 97, 145, 193, 17, 65, 113, 161, 209, 33, 81, 129, 177, 225, 5, 53, 101, 149, 197, 21, 69, 117, 165, 213, 37, 85, 133, 181, 229, 9, 57, 105, 153, 201, 25, 73, 121, 169, 217, 41, 89, 137, 185, 233, 13, 61, 109, 157, 205, 29, 77, 125, 173, 221, 45, 93, 141, 189, 237, 2, 50, 98, 146, 194, 18, 66, 114, 162, 210, 34, 82, 130, 178, 226, 6, 54, 102, 150, 198, 22, 70, 118, 166, 214, 38, 86, 134, 182, 230, 10, 58, 106, 154, 202, 26, 74, 122, 170, 218, 42, 90, 138, 186, 234, 14, 62, 110, 158, 206, 30, 78, 126, 174, 222, 46, 94, 142, 190, 238, 3, 51, 99, 147, 195, 19, 67, 115, 163, 211, 35, 83, 131, 179, 227, 7, 55, 103, 151, 199, 23, 71, 119, 167, 215, 39, 87, 135, 183, 231, 11, 59, 107, 155, 203, 27, 75, 123, 171, 219, 43, 91, 139, 187, 235, 15, 63, 111, 159, 207, 31, 79, 127, 175, 223, 47, 95, 143, 191, 239, }; #endif #ifndef FFT_BITREV120 #define FFT_BITREV120 static const opus_int16 fft_bitrev120[120] = { 0, 24, 48, 72, 96, 8, 32, 56, 80, 104, 16, 40, 64, 88, 112, 4, 28, 52, 76, 100, 12, 36, 60, 84, 108, 20, 44, 68, 92, 116, 1, 25, 49, 73, 97, 9, 33, 57, 81, 105, 17, 41, 65, 89, 113, 5, 29, 53, 77, 101, 13, 37, 61, 85, 109, 21, 45, 69, 93, 117, 2, 26, 50, 74, 98, 10, 34, 58, 82, 106, 18, 42, 66, 90, 114, 6, 30, 54, 78, 102, 14, 38, 62, 86, 110, 22, 46, 70, 94, 118, 3, 27, 51, 75, 99, 11, 35, 59, 83, 107, 19, 43, 67, 91, 115, 7, 31, 55, 79, 103, 15, 39, 63, 87, 111, 23, 47, 71, 95, 119, }; #endif #ifndef FFT_BITREV60 #define FFT_BITREV60 static const opus_int16 fft_bitrev60[60] = { 0, 12, 24, 36, 48, 4, 16, 28, 40, 52, 8, 20, 32, 44, 56, 1, 13, 25, 37, 49, 5, 17, 29, 41, 53, 9, 21, 33, 45, 57, 2, 14, 26, 38, 50, 6, 18, 30, 42, 54, 10, 22, 34, 46, 58, 3, 15, 27, 39, 51, 7, 19, 31, 43, 55, 11, 23, 35, 47, 59, }; #endif #ifndef FFT_STATE48000_960_0 #define FFT_STATE48000_960_0 static const kiss_fft_state fft_state48000_960_0 = { 480, /* nfft */ 0.002083333f, /* scale */ -1, /* shift */ {5, 96, 3, 32, 4, 8, 2, 4, 4, 1, 0, 0, 0, 0, 0, 0, }, /* factors */ fft_bitrev480, /* bitrev */ fft_twiddles48000_960, /* bitrev */ #ifdef OVERRIDE_FFT (arch_fft_state *)&cfg_arch_480, #else NULL, #endif }; #endif #ifndef FFT_STATE48000_960_1 #define FFT_STATE48000_960_1 static const kiss_fft_state fft_state48000_960_1 = { 240, /* nfft */ 0.004166667f, /* scale */ 1, /* shift */ {5, 48, 3, 16, 4, 4, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, }, /* factors */ fft_bitrev240, /* bitrev */ fft_twiddles48000_960, /* bitrev */ #ifdef OVERRIDE_FFT (arch_fft_state *)&cfg_arch_240, #else NULL, #endif }; #endif #ifndef FFT_STATE48000_960_2 #define FFT_STATE48000_960_2 static const kiss_fft_state fft_state48000_960_2 = { 120, /* nfft */ 0.008333333f, /* scale */ 2, /* shift */ {5, 24, 3, 8, 2, 4, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, }, /* factors */ fft_bitrev120, /* bitrev */ fft_twiddles48000_960, /* bitrev */ #ifdef OVERRIDE_FFT (arch_fft_state *)&cfg_arch_120, #else NULL, #endif }; #endif #ifndef FFT_STATE48000_960_3 #define FFT_STATE48000_960_3 static const kiss_fft_state fft_state48000_960_3 = { 60, /* nfft */ 0.016666667f, /* scale */ 3, /* shift */ {5, 12, 3, 4, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }, /* factors */ fft_bitrev60, /* bitrev */ fft_twiddles48000_960, /* bitrev */ #ifdef OVERRIDE_FFT (arch_fft_state *)&cfg_arch_60, #else NULL, #endif }; #endif #endif #ifndef MDCT_TWIDDLES960 #define MDCT_TWIDDLES960 static const opus_val16 mdct_twiddles960[1800] = { 0.99999994f, 0.99999321f, 0.99997580f, 0.99994773f, 0.99990886f, 0.99985933f, 0.99979913f, 0.99972820f, 0.99964654f, 0.99955416f, 0.99945110f, 0.99933738f, 0.99921292f, 0.99907774f, 0.99893188f, 0.99877530f, 0.99860805f, 0.99843007f, 0.99824142f, 0.99804211f, 0.99783206f, 0.99761140f, 0.99737996f, 0.99713790f, 0.99688518f, 0.99662173f, 0.99634761f, 0.99606287f, 0.99576741f, 0.99546129f, 0.99514455f, 0.99481714f, 0.99447906f, 0.99413031f, 0.99377096f, 0.99340093f, 0.99302030f, 0.99262899f, 0.99222708f, 0.99181455f, 0.99139136f, 0.99095762f, 0.99051321f, 0.99005818f, 0.98959261f, 0.98911643f, 0.98862964f, 0.98813224f, 0.98762429f, 0.98710573f, 0.98657662f, 0.98603696f, 0.98548669f, 0.98492593f, 0.98435456f, 0.98377270f, 0.98318028f, 0.98257732f, 0.98196387f, 0.98133987f, 0.98070538f, 0.98006040f, 0.97940493f, 0.97873890f, 0.97806245f, 0.97737551f, 0.97667813f, 0.97597027f, 0.97525197f, 0.97452319f, 0.97378403f, 0.97303438f, 0.97227436f, 0.97150391f, 0.97072303f, 0.96993178f, 0.96913016f, 0.96831810f, 0.96749574f, 0.96666300f, 0.96581990f, 0.96496642f, 0.96410263f, 0.96322852f, 0.96234411f, 0.96144938f, 0.96054435f, 0.95962906f, 0.95870346f, 0.95776761f, 0.95682150f, 0.95586514f, 0.95489854f, 0.95392174f, 0.95293468f, 0.95193744f, 0.95093000f, 0.94991243f, 0.94888461f, 0.94784665f, 0.94679856f, 0.94574034f, 0.94467193f, 0.94359344f, 0.94250488f, 0.94140619f, 0.94029742f, 0.93917859f, 0.93804967f, 0.93691075f, 0.93576175f, 0.93460274f, 0.93343377f, 0.93225473f, 0.93106574f, 0.92986679f, 0.92865789f, 0.92743903f, 0.92621022f, 0.92497152f, 0.92372292f, 0.92246443f, 0.92119598f, 0.91991776f, 0.91862965f, 0.91733170f, 0.91602397f, 0.91470635f, 0.91337901f, 0.91204184f, 0.91069490f, 0.90933824f, 0.90797186f, 0.90659571f, 0.90520984f, 0.90381432f, 0.90240908f, 0.90099424f, 0.89956969f, 0.89813554f, 0.89669174f, 0.89523834f, 0.89377540f, 0.89230281f, 0.89082074f, 0.88932908f, 0.88782793f, 0.88631725f, 0.88479710f, 0.88326746f, 0.88172835f, 0.88017982f, 0.87862182f, 0.87705445f, 0.87547767f, 0.87389153f, 0.87229604f, 0.87069118f, 0.86907703f, 0.86745358f, 0.86582077f, 0.86417878f, 0.86252749f, 0.86086690f, 0.85919720f, 0.85751826f, 0.85583007f, 0.85413277f, 0.85242635f, 0.85071075f, 0.84898609f, 0.84725231f, 0.84550947f, 0.84375757f, 0.84199661f, 0.84022665f, 0.83844769f, 0.83665979f, 0.83486289f, 0.83305705f, 0.83124226f, 0.82941860f, 0.82758605f, 0.82574469f, 0.82389444f, 0.82203537f, 0.82016748f, 0.81829083f, 0.81640542f, 0.81451124f, 0.81260836f, 0.81069672f, 0.80877650f, 0.80684757f, 0.80490994f, 0.80296379f, 0.80100900f, 0.79904562f, 0.79707366f, 0.79509324f, 0.79310423f, 0.79110676f, 0.78910083f, 0.78708643f, 0.78506362f, 0.78303236f, 0.78099275f, 0.77894479f, 0.77688843f, 0.77482378f, 0.77275085f, 0.77066964f, 0.76858020f, 0.76648247f, 0.76437658f, 0.76226246f, 0.76014024f, 0.75800985f, 0.75587130f, 0.75372469f, 0.75157005f, 0.74940729f, 0.74723655f, 0.74505776f, 0.74287105f, 0.74067634f, 0.73847371f, 0.73626316f, 0.73404479f, 0.73181850f, 0.72958434f, 0.72734243f, 0.72509271f, 0.72283524f, 0.72057003f, 0.71829706f, 0.71601641f, 0.71372813f, 0.71143216f, 0.70912862f, 0.70681745f, 0.70449871f, 0.70217246f, 0.69983864f, 0.69749737f, 0.69514859f, 0.69279242f, 0.69042879f, 0.68805778f, 0.68567938f, 0.68329364f, 0.68090063f, 0.67850029f, 0.67609268f, 0.67367786f, 0.67125577f, 0.66882652f, 0.66639012f, 0.66394657f, 0.66149592f, 0.65903819f, 0.65657341f, 0.65410155f, 0.65162271f, 0.64913690f, 0.64664418f, 0.64414448f, 0.64163786f, 0.63912445f, 0.63660413f, 0.63407701f, 0.63154310f, 0.62900239f, 0.62645501f, 0.62390089f, 0.62134010f, 0.61877263f, 0.61619854f, 0.61361790f, 0.61103064f, 0.60843682f, 0.60583651f, 0.60322970f, 0.60061646f, 0.59799677f, 0.59537065f, 0.59273821f, 0.59009939f, 0.58745426f, 0.58480281f, 0.58214509f, 0.57948118f, 0.57681108f, 0.57413477f, 0.57145232f, 0.56876373f, 0.56606907f, 0.56336832f, 0.56066155f, 0.55794877f, 0.55523002f, 0.55250537f, 0.54977477f, 0.54703826f, 0.54429591f, 0.54154772f, 0.53879374f, 0.53603399f, 0.53326851f, 0.53049731f, 0.52772039f, 0.52493787f, 0.52214974f, 0.51935595f, 0.51655668f, 0.51375180f, 0.51094145f, 0.50812566f, 0.50530440f, 0.50247771f, 0.49964568f, 0.49680826f, 0.49396557f, 0.49111754f, 0.48826426f, 0.48540577f, 0.48254207f, 0.47967321f, 0.47679919f, 0.47392011f, 0.47103590f, 0.46814668f, 0.46525243f, 0.46235323f, 0.45944905f, 0.45653993f, 0.45362595f, 0.45070711f, 0.44778344f, 0.44485497f, 0.44192174f, 0.43898380f, 0.43604112f, 0.43309379f, 0.43014181f, 0.42718524f, 0.42422408f, 0.42125839f, 0.41828820f, 0.41531351f, 0.41233435f, 0.40935081f, 0.40636289f, 0.40337059f, 0.40037400f, 0.39737311f, 0.39436796f, 0.39135858f, 0.38834500f, 0.38532731f, 0.38230544f, 0.37927949f, 0.37624949f, 0.37321547f, 0.37017745f, 0.36713544f, 0.36408952f, 0.36103970f, 0.35798600f, 0.35492846f, 0.35186714f, 0.34880206f, 0.34573323f, 0.34266070f, 0.33958447f, 0.33650464f, 0.33342120f, 0.33033419f, 0.32724363f, 0.32414958f, 0.32105204f, 0.31795108f, 0.31484672f, 0.31173897f, 0.30862790f, 0.30551350f, 0.30239585f, 0.29927495f, 0.29615086f, 0.29302359f, 0.28989318f, 0.28675964f, 0.28362307f, 0.28048345f, 0.27734083f, 0.27419522f, 0.27104670f, 0.26789525f, 0.26474094f, 0.26158381f, 0.25842386f, 0.25526115f, 0.25209570f, 0.24892756f, 0.24575676f, 0.24258332f, 0.23940729f, 0.23622867f, 0.23304754f, 0.22986393f, 0.22667783f, 0.22348931f, 0.22029841f, 0.21710514f, 0.21390954f, 0.21071166f, 0.20751151f, 0.20430915f, 0.20110460f, 0.19789790f, 0.19468907f, 0.19147816f, 0.18826519f, 0.18505022f, 0.18183327f, 0.17861435f, 0.17539354f, 0.17217083f, 0.16894630f, 0.16571994f, 0.16249183f, 0.15926196f, 0.15603039f, 0.15279715f, 0.14956227f, 0.14632578f, 0.14308774f, 0.13984816f, 0.13660708f, 0.13336454f, 0.13012058f, 0.12687522f, 0.12362850f, 0.12038045f, 0.11713112f, 0.11388054f, 0.11062872f, 0.10737573f, 0.10412160f, 0.10086634f, 0.097609997f, 0.094352618f, 0.091094226f, 0.087834857f, 0.084574550f, 0.081313334f, 0.078051247f, 0.074788325f, 0.071524605f, 0.068260118f, 0.064994894f, 0.061728980f, 0.058462404f, 0.055195201f, 0.051927410f, 0.048659060f, 0.045390189f, 0.042120833f, 0.038851023f, 0.035580799f, 0.032310195f, 0.029039243f, 0.025767982f, 0.022496443f, 0.019224664f, 0.015952680f, 0.012680525f, 0.0094082337f, 0.0061358409f, 0.0028633832f, -0.00040910527f, -0.0036815894f, -0.0069540343f, -0.010226404f, -0.013498665f, -0.016770782f, -0.020042717f, -0.023314439f, -0.026585912f, -0.029857099f, -0.033127967f, -0.036398482f, -0.039668605f, -0.042938303f, -0.046207540f, -0.049476285f, -0.052744497f, -0.056012146f, -0.059279196f, -0.062545612f, -0.065811358f, -0.069076397f, -0.072340697f, -0.075604223f, -0.078866936f, -0.082128808f, -0.085389800f, -0.088649876f, -0.091909006f, -0.095167145f, -0.098424271f, -0.10168034f, -0.10493532f, -0.10818918f, -0.11144188f, -0.11469338f, -0.11794366f, -0.12119267f, -0.12444039f, -0.12768677f, -0.13093179f, -0.13417540f, -0.13741758f, -0.14065829f, -0.14389749f, -0.14713514f, -0.15037122f, -0.15360570f, -0.15683852f, -0.16006967f, -0.16329910f, -0.16652679f, -0.16975269f, -0.17297678f, -0.17619900f, -0.17941935f, -0.18263777f, -0.18585424f, -0.18906870f, -0.19228116f, -0.19549155f, -0.19869985f, -0.20190603f, -0.20511003f, -0.20831184f, -0.21151142f, -0.21470875f, -0.21790376f, -0.22109644f, -0.22428675f, -0.22747467f, -0.23066014f, -0.23384315f, -0.23702365f, -0.24020162f, -0.24337701f, -0.24654980f, -0.24971995f, -0.25288740f, -0.25605217f, -0.25921419f, -0.26237345f, -0.26552987f, -0.26868346f, -0.27183419f, -0.27498198f, -0.27812684f, -0.28126872f, -0.28440759f, -0.28754342f, -0.29067615f, -0.29380578f, -0.29693225f, -0.30005556f, -0.30317566f, -0.30629250f, -0.30940607f, -0.31251630f, -0.31562322f, -0.31872672f, -0.32182685f, -0.32492352f, -0.32801670f, -0.33110636f, -0.33419248f, -0.33727503f, -0.34035397f, -0.34342924f, -0.34650084f, -0.34956875f, -0.35263291f, -0.35569328f, -0.35874987f, -0.36180258f, -0.36485144f, -0.36789638f, -0.37093741f, -0.37397444f, -0.37700745f, -0.38003644f, -0.38306138f, -0.38608220f, -0.38909888f, -0.39211139f, -0.39511973f, -0.39812380f, -0.40112361f, -0.40411916f, -0.40711036f, -0.41009718f, -0.41307965f, -0.41605768f, -0.41903123f, -0.42200032f, -0.42496487f, -0.42792490f, -0.43088034f, -0.43383113f, -0.43677729f, -0.43971881f, -0.44265559f, -0.44558764f, -0.44851488f, -0.45143735f, -0.45435500f, -0.45726776f, -0.46017563f, -0.46307856f, -0.46597654f, -0.46886954f, -0.47175750f, -0.47464043f, -0.47751826f, -0.48039100f, -0.48325855f, -0.48612097f, -0.48897815f, -0.49183011f, -0.49467680f, -0.49751821f, -0.50035429f, -0.50318497f, -0.50601029f, -0.50883019f, -0.51164466f, -0.51445359f, -0.51725709f, -0.52005500f, -0.52284735f, -0.52563411f, -0.52841520f, -0.53119069f, -0.53396046f, -0.53672451f, -0.53948283f, -0.54223537f, -0.54498214f, -0.54772300f, -0.55045801f, -0.55318713f, -0.55591035f, -0.55862761f, -0.56133890f, -0.56404412f, -0.56674337f, -0.56943649f, -0.57212353f, -0.57480448f, -0.57747924f, -0.58014780f, -0.58281022f, -0.58546633f, -0.58811617f, -0.59075975f, -0.59339696f, -0.59602785f, -0.59865236f, -0.60127044f, -0.60388207f, -0.60648727f, -0.60908598f, -0.61167812f, -0.61426371f, -0.61684275f, -0.61941516f, -0.62198097f, -0.62454009f, -0.62709254f, -0.62963831f, -0.63217729f, -0.63470948f, -0.63723493f, -0.63975352f, -0.64226526f, -0.64477009f, -0.64726806f, -0.64975911f, -0.65224314f, -0.65472025f, -0.65719032f, -0.65965337f, -0.66210932f, -0.66455823f, -0.66700000f, -0.66943461f, -0.67186207f, -0.67428231f, -0.67669535f, -0.67910111f, -0.68149966f, -0.68389088f, -0.68627477f, -0.68865126f, -0.69102043f, -0.69338220f, -0.69573659f, -0.69808346f, -0.70042288f, -0.70275480f, -0.70507920f, -0.70739603f, -0.70970529f, -0.71200693f, -0.71430099f, -0.71658736f, -0.71886611f, -0.72113711f, -0.72340041f, -0.72565591f, -0.72790372f, -0.73014367f, -0.73237586f, -0.73460019f, -0.73681659f, -0.73902518f, -0.74122584f, -0.74341851f, -0.74560326f, -0.74778003f, -0.74994880f, -0.75210953f, -0.75426215f, -0.75640678f, -0.75854325f, -0.76067162f, -0.76279181f, -0.76490390f, -0.76700771f, -0.76910341f, -0.77119076f, -0.77326995f, -0.77534080f, -0.77740335f, -0.77945763f, -0.78150350f, -0.78354102f, -0.78557014f, -0.78759086f, -0.78960317f, -0.79160696f, -0.79360235f, -0.79558921f, -0.79756755f, -0.79953730f, -0.80149853f, -0.80345118f, -0.80539525f, -0.80733067f, -0.80925739f, -0.81117553f, -0.81308490f, -0.81498563f, -0.81687760f, -0.81876087f, -0.82063532f, -0.82250100f, -0.82435787f, -0.82620591f, -0.82804507f, -0.82987541f, -0.83169687f, -0.83350939f, -0.83531296f, -0.83710766f, -0.83889335f, -0.84067005f, -0.84243774f, -0.84419644f, -0.84594607f, -0.84768665f, -0.84941816f, -0.85114056f, -0.85285389f, -0.85455805f, -0.85625303f, -0.85793889f, -0.85961550f, -0.86128294f, -0.86294121f, -0.86459017f, -0.86622989f, -0.86786032f, -0.86948150f, -0.87109333f, -0.87269586f, -0.87428904f, -0.87587279f, -0.87744725f, -0.87901229f, -0.88056785f, -0.88211405f, -0.88365078f, -0.88517809f, -0.88669586f, -0.88820416f, -0.88970292f, -0.89119220f, -0.89267188f, -0.89414203f, -0.89560264f, -0.89705360f, -0.89849502f, -0.89992678f, -0.90134889f, -0.90276134f, -0.90416414f, -0.90555727f, -0.90694070f, -0.90831441f, -0.90967834f, -0.91103262f, -0.91237706f, -0.91371179f, -0.91503674f, -0.91635185f, -0.91765714f, -0.91895264f, -0.92023826f, -0.92151409f, -0.92277998f, -0.92403603f, -0.92528218f, -0.92651838f, -0.92774469f, -0.92896110f, -0.93016750f, -0.93136400f, -0.93255049f, -0.93372697f, -0.93489349f, -0.93604994f, -0.93719643f, -0.93833286f, -0.93945926f, -0.94057560f, -0.94168180f, -0.94277799f, -0.94386405f, -0.94494003f, -0.94600588f, -0.94706154f, -0.94810712f, -0.94914252f, -0.95016778f, -0.95118284f, -0.95218778f, -0.95318246f, -0.95416695f, -0.95514119f, -0.95610523f, -0.95705903f, -0.95800257f, -0.95893586f, -0.95985889f, -0.96077162f, -0.96167403f, -0.96256620f, -0.96344805f, -0.96431959f, -0.96518075f, -0.96603161f, -0.96687216f, -0.96770233f, -0.96852213f, -0.96933156f, -0.97013056f, -0.97091925f, -0.97169751f, -0.97246534f, -0.97322279f, -0.97396982f, -0.97470641f, -0.97543252f, -0.97614825f, -0.97685349f, -0.97754824f, -0.97823256f, -0.97890645f, -0.97956979f, -0.98022264f, -0.98086500f, -0.98149687f, -0.98211825f, -0.98272908f, -0.98332942f, -0.98391914f, -0.98449844f, -0.98506713f, -0.98562527f, -0.98617285f, -0.98670989f, -0.98723638f, -0.98775226f, -0.98825759f, -0.98875231f, -0.98923647f, -0.98971003f, -0.99017298f, -0.99062532f, -0.99106705f, -0.99149817f, -0.99191868f, -0.99232858f, -0.99272782f, -0.99311644f, -0.99349445f, -0.99386179f, -0.99421853f, -0.99456459f, -0.99489999f, -0.99522477f, -0.99553883f, -0.99584228f, -0.99613506f, -0.99641716f, -0.99668860f, -0.99694937f, -0.99719942f, -0.99743885f, -0.99766755f, -0.99788558f, -0.99809295f, -0.99828959f, -0.99847561f, -0.99865085f, -0.99881548f, -0.99896932f, -0.99911255f, -0.99924499f, -0.99936682f, -0.99947786f, -0.99957830f, -0.99966794f, -0.99974692f, -0.99981517f, -0.99987274f, -0.99991959f, -0.99995571f, -0.99998116f, -0.99999589f, 0.99999964f, 0.99997288f, 0.99990326f, 0.99979085f, 0.99963558f, 0.99943751f, 0.99919659f, 0.99891287f, 0.99858636f, 0.99821711f, 0.99780506f, 0.99735034f, 0.99685282f, 0.99631262f, 0.99572974f, 0.99510419f, 0.99443603f, 0.99372530f, 0.99297196f, 0.99217612f, 0.99133772f, 0.99045694f, 0.98953366f, 0.98856801f, 0.98756003f, 0.98650974f, 0.98541719f, 0.98428243f, 0.98310548f, 0.98188645f, 0.98062533f, 0.97932225f, 0.97797716f, 0.97659022f, 0.97516143f, 0.97369087f, 0.97217858f, 0.97062469f, 0.96902919f, 0.96739221f, 0.96571374f, 0.96399397f, 0.96223283f, 0.96043050f, 0.95858705f, 0.95670253f, 0.95477700f, 0.95281059f, 0.95080340f, 0.94875544f, 0.94666684f, 0.94453770f, 0.94236809f, 0.94015813f, 0.93790787f, 0.93561745f, 0.93328691f, 0.93091643f, 0.92850608f, 0.92605597f, 0.92356616f, 0.92103678f, 0.91846794f, 0.91585976f, 0.91321236f, 0.91052586f, 0.90780038f, 0.90503591f, 0.90223277f, 0.89939094f, 0.89651060f, 0.89359182f, 0.89063478f, 0.88763964f, 0.88460642f, 0.88153529f, 0.87842643f, 0.87527996f, 0.87209594f, 0.86887461f, 0.86561602f, 0.86232042f, 0.85898781f, 0.85561842f, 0.85221243f, 0.84876984f, 0.84529096f, 0.84177583f, 0.83822471f, 0.83463764f, 0.83101481f, 0.82735640f, 0.82366252f, 0.81993335f, 0.81616908f, 0.81236988f, 0.80853581f, 0.80466717f, 0.80076402f, 0.79682660f, 0.79285502f, 0.78884947f, 0.78481019f, 0.78073722f, 0.77663082f, 0.77249116f, 0.76831841f, 0.76411277f, 0.75987434f, 0.75560343f, 0.75130010f, 0.74696463f, 0.74259710f, 0.73819780f, 0.73376691f, 0.72930455f, 0.72481096f, 0.72028631f, 0.71573079f, 0.71114463f, 0.70652801f, 0.70188117f, 0.69720417f, 0.69249737f, 0.68776089f, 0.68299496f, 0.67819971f, 0.67337549f, 0.66852236f, 0.66364062f, 0.65873051f, 0.65379208f, 0.64882571f, 0.64383155f, 0.63880974f, 0.63376063f, 0.62868434f, 0.62358117f, 0.61845124f, 0.61329484f, 0.60811216f, 0.60290343f, 0.59766883f, 0.59240872f, 0.58712316f, 0.58181250f, 0.57647687f, 0.57111657f, 0.56573176f, 0.56032276f, 0.55488980f, 0.54943299f, 0.54395270f, 0.53844911f, 0.53292239f, 0.52737290f, 0.52180082f, 0.51620632f, 0.51058978f, 0.50495136f, 0.49929130f, 0.49360985f, 0.48790723f, 0.48218375f, 0.47643960f, 0.47067502f, 0.46489030f, 0.45908567f, 0.45326138f, 0.44741765f, 0.44155475f, 0.43567297f, 0.42977250f, 0.42385364f, 0.41791660f, 0.41196167f, 0.40598908f, 0.39999911f, 0.39399201f, 0.38796803f, 0.38192743f, 0.37587047f, 0.36979741f, 0.36370850f, 0.35760403f, 0.35148421f, 0.34534934f, 0.33919969f, 0.33303553f, 0.32685706f, 0.32066461f, 0.31445843f, 0.30823877f, 0.30200592f, 0.29576012f, 0.28950164f, 0.28323078f, 0.27694780f, 0.27065292f, 0.26434645f, 0.25802869f, 0.25169984f, 0.24536023f, 0.23901010f, 0.23264973f, 0.22627939f, 0.21989937f, 0.21350993f, 0.20711134f, 0.20070387f, 0.19428782f, 0.18786344f, 0.18143101f, 0.17499080f, 0.16854310f, 0.16208819f, 0.15562633f, 0.14915779f, 0.14268288f, 0.13620184f, 0.12971498f, 0.12322257f, 0.11672486f, 0.11022217f, 0.10371475f, 0.097202882f, 0.090686858f, 0.084166944f, 0.077643424f, 0.071116582f, 0.064586692f, 0.058054037f, 0.051518895f, 0.044981543f, 0.038442269f, 0.031901345f, 0.025359053f, 0.018815678f, 0.012271495f, 0.0057267868f, -0.00081816671f, -0.0073630852f, -0.013907688f, -0.020451695f, -0.026994826f, -0.033536803f, -0.040077340f, -0.046616159f, -0.053152986f, -0.059687532f, -0.066219524f, -0.072748676f, -0.079274714f, -0.085797355f, -0.092316322f, -0.098831341f, -0.10534211f, -0.11184838f, -0.11834986f, -0.12484626f, -0.13133731f, -0.13782275f, -0.14430228f, -0.15077563f, -0.15724251f, -0.16370267f, -0.17015581f, -0.17660165f, -0.18303993f, -0.18947038f, -0.19589271f, -0.20230664f, -0.20871192f, -0.21510825f, -0.22149536f, -0.22787298f, -0.23424086f, -0.24059868f, -0.24694622f, -0.25328314f, -0.25960925f, -0.26592422f, -0.27222782f, -0.27851975f, -0.28479972f, -0.29106751f, -0.29732284f, -0.30356544f, -0.30979502f, -0.31601134f, -0.32221413f, -0.32840309f, -0.33457801f, -0.34073856f, -0.34688455f, -0.35301566f, -0.35913166f, -0.36523229f, -0.37131724f, -0.37738630f, -0.38343921f, -0.38947567f, -0.39549544f, -0.40149832f, -0.40748394f, -0.41345215f, -0.41940263f, -0.42533514f, -0.43124944f, -0.43714526f, -0.44302234f, -0.44888046f, -0.45471936f, -0.46053877f, -0.46633846f, -0.47211814f, -0.47787762f, -0.48361665f, -0.48933494f, -0.49503228f, -0.50070840f, -0.50636309f, -0.51199609f, -0.51760709f, -0.52319598f, -0.52876246f, -0.53430629f, -0.53982723f, -0.54532504f, -0.55079949f, -0.55625033f, -0.56167740f, -0.56708032f, -0.57245898f, -0.57781315f, -0.58314258f, -0.58844697f, -0.59372622f, -0.59897995f, -0.60420811f, -0.60941035f, -0.61458647f, -0.61973625f, -0.62485951f, -0.62995601f, -0.63502556f, -0.64006782f, -0.64508271f, -0.65007001f, -0.65502942f, -0.65996075f, -0.66486382f, -0.66973841f, -0.67458433f, -0.67940134f, -0.68418926f, -0.68894786f, -0.69367695f, -0.69837630f, -0.70304573f, -0.70768511f, -0.71229410f, -0.71687263f, -0.72142041f, -0.72593731f, -0.73042315f, -0.73487765f, -0.73930067f, -0.74369204f, -0.74805158f, -0.75237900f, -0.75667429f, -0.76093709f, -0.76516730f, -0.76936477f, -0.77352923f, -0.77766061f, -0.78175867f, -0.78582323f, -0.78985411f, -0.79385114f, -0.79781419f, -0.80174309f, -0.80563760f, -0.80949765f, -0.81332302f, -0.81711352f, -0.82086903f, -0.82458937f, -0.82827437f, -0.83192390f, -0.83553779f, -0.83911592f, -0.84265804f, -0.84616417f, -0.84963393f, -0.85306740f, -0.85646427f, -0.85982448f, -0.86314780f, -0.86643422f, -0.86968350f, -0.87289548f, -0.87607014f, -0.87920725f, -0.88230664f, -0.88536829f, -0.88839203f, -0.89137769f, -0.89432514f, -0.89723432f, -0.90010506f, -0.90293723f, -0.90573072f, -0.90848541f, -0.91120118f, -0.91387796f, -0.91651553f, -0.91911387f, -0.92167282f, -0.92419231f, -0.92667222f, -0.92911243f, -0.93151283f, -0.93387336f, -0.93619382f, -0.93847424f, -0.94071442f, -0.94291431f, -0.94507378f, -0.94719279f, -0.94927126f, -0.95130903f, -0.95330608f, -0.95526224f, -0.95717752f, -0.95905179f, -0.96088499f, -0.96267700f, -0.96442777f, -0.96613729f, -0.96780539f, -0.96943200f, -0.97101706f, -0.97256058f, -0.97406244f, -0.97552258f, -0.97694093f, -0.97831738f, -0.97965199f, -0.98094457f, -0.98219514f, -0.98340368f, -0.98457009f, -0.98569429f, -0.98677629f, -0.98781598f, -0.98881340f, -0.98976845f, -0.99068111f, -0.99155134f, -0.99237907f, -0.99316430f, -0.99390697f, -0.99460709f, -0.99526459f, -0.99587947f, -0.99645168f, -0.99698120f, -0.99746799f, -0.99791211f, -0.99831343f, -0.99867201f, -0.99898779f, -0.99926084f, -0.99949104f, -0.99967843f, -0.99982297f, -0.99992472f, -0.99998361f, 0.99999869f, 0.99989158f, 0.99961317f, 0.99916345f, 0.99854255f, 0.99775058f, 0.99678761f, 0.99565387f, 0.99434954f, 0.99287480f, 0.99122995f, 0.98941529f, 0.98743105f, 0.98527765f, 0.98295540f, 0.98046476f, 0.97780609f, 0.97497988f, 0.97198665f, 0.96882683f, 0.96550101f, 0.96200979f, 0.95835376f, 0.95453346f, 0.95054960f, 0.94640291f, 0.94209403f, 0.93762374f, 0.93299282f, 0.92820197f, 0.92325211f, 0.91814411f, 0.91287869f, 0.90745693f, 0.90187967f, 0.89614785f, 0.89026248f, 0.88422459f, 0.87803519f, 0.87169534f, 0.86520612f, 0.85856867f, 0.85178405f, 0.84485358f, 0.83777827f, 0.83055943f, 0.82319832f, 0.81569612f, 0.80805415f, 0.80027372f, 0.79235619f, 0.78430289f, 0.77611518f, 0.76779449f, 0.75934225f, 0.75075996f, 0.74204898f, 0.73321080f, 0.72424710f, 0.71515924f, 0.70594883f, 0.69661748f, 0.68716675f, 0.67759830f, 0.66791373f, 0.65811473f, 0.64820296f, 0.63818014f, 0.62804794f, 0.61780810f, 0.60746247f, 0.59701276f, 0.58646071f, 0.57580817f, 0.56505698f, 0.55420899f, 0.54326600f, 0.53222996f, 0.52110273f, 0.50988621f, 0.49858227f, 0.48719296f, 0.47572014f, 0.46416581f, 0.45253196f, 0.44082057f, 0.42903364f, 0.41717321f, 0.40524128f, 0.39323992f, 0.38117120f, 0.36903715f, 0.35683987f, 0.34458145f, 0.33226398f, 0.31988961f, 0.30746040f, 0.29497850f, 0.28244606f, 0.26986524f, 0.25723818f, 0.24456702f, 0.23185398f, 0.21910121f, 0.20631088f, 0.19348522f, 0.18062639f, 0.16773662f, 0.15481812f, 0.14187308f, 0.12890373f, 0.11591230f, 0.10290100f, 0.089872077f, 0.076827750f, 0.063770257f, 0.050701842f, 0.037624735f, 0.024541186f, 0.011453429f, -0.0016362892f, -0.014725727f, -0.027812643f, -0.040894791f, -0.053969935f, -0.067035832f, -0.080090240f, -0.093130924f, -0.10615565f, -0.11916219f, -0.13214831f, -0.14511178f, -0.15805040f, -0.17096193f, -0.18384418f, -0.19669491f, -0.20951195f, -0.22229309f, -0.23503613f, -0.24773891f, -0.26039925f, -0.27301496f, -0.28558388f, -0.29810387f, -0.31057280f, -0.32298848f, -0.33534884f, -0.34765175f, -0.35989508f, -0.37207675f, -0.38419467f, -0.39624676f, -0.40823093f, -0.42014518f, -0.43198743f, -0.44375566f, -0.45544785f, -0.46706200f, -0.47859612f, -0.49004826f, -0.50141639f, -0.51269865f, -0.52389306f, -0.53499764f, -0.54601061f, -0.55693001f, -0.56775403f, -0.57848072f, -0.58910829f, -0.59963489f, -0.61005878f, -0.62037814f, -0.63059121f, -0.64069623f, -0.65069145f, -0.66057515f, -0.67034572f, -0.68000144f, -0.68954057f, -0.69896162f, -0.70826286f, -0.71744281f, -0.72649974f, -0.73543227f, -0.74423873f, -0.75291771f, -0.76146764f, -0.76988715f, -0.77817470f, -0.78632891f, -0.79434842f, -0.80223179f, -0.80997771f, -0.81758487f, -0.82505190f, -0.83237761f, -0.83956063f, -0.84659988f, -0.85349399f, -0.86024189f, -0.86684239f, -0.87329435f, -0.87959671f, -0.88574833f, -0.89174819f, -0.89759529f, -0.90328854f, -0.90882701f, -0.91420978f, -0.91943592f, -0.92450452f, -0.92941469f, -0.93416560f, -0.93875647f, -0.94318646f, -0.94745487f, -0.95156091f, -0.95550388f, -0.95928317f, -0.96289814f, -0.96634805f, -0.96963239f, -0.97275060f, -0.97570217f, -0.97848648f, -0.98110318f, -0.98355180f, -0.98583186f, -0.98794299f, -0.98988485f, -0.99165714f, -0.99325943f, -0.99469161f, -0.99595332f, -0.99704438f, -0.99796462f, -0.99871385f, -0.99929196f, -0.99969882f, -0.99993443f, 0.99999464f, 0.99956632f, 0.99845290f, 0.99665523f, 0.99417448f, 0.99101239f, 0.98717111f, 0.98265326f, 0.97746199f, 0.97160077f, 0.96507365f, 0.95788515f, 0.95004016f, 0.94154406f, 0.93240267f, 0.92262226f, 0.91220951f, 0.90117162f, 0.88951606f, 0.87725091f, 0.86438453f, 0.85092574f, 0.83688372f, 0.82226819f, 0.80708915f, 0.79135692f, 0.77508235f, 0.75827658f, 0.74095112f, 0.72311783f, 0.70478898f, 0.68597710f, 0.66669506f, 0.64695615f, 0.62677377f, 0.60616189f, 0.58513457f, 0.56370622f, 0.54189157f, 0.51970547f, 0.49716324f, 0.47428027f, 0.45107225f, 0.42755505f, 0.40374488f, 0.37965798f, 0.35531086f, 0.33072025f, 0.30590299f, 0.28087607f, 0.25565663f, 0.23026201f, 0.20470956f, 0.17901683f, 0.15320139f, 0.12728097f, 0.10127331f, 0.075196236f, 0.049067631f, 0.022905400f, -0.0032725304f, -0.029448219f, -0.055603724f, -0.081721120f, -0.10778251f, -0.13377003f, -0.15966587f, -0.18545228f, -0.21111161f, -0.23662624f, -0.26197869f, -0.28715160f, -0.31212771f, -0.33688989f, -0.36142120f, -0.38570482f, -0.40972409f, -0.43346253f, -0.45690393f, -0.48003218f, -0.50283146f, -0.52528608f, -0.54738069f, -0.56910020f, -0.59042966f, -0.61135447f, -0.63186026f, -0.65193301f, -0.67155898f, -0.69072473f, -0.70941705f, -0.72762316f, -0.74533063f, -0.76252723f, -0.77920127f, -0.79534131f, -0.81093621f, -0.82597536f, -0.84044844f, -0.85434550f, -0.86765707f, -0.88037395f, -0.89248747f, -0.90398932f, -0.91487163f, -0.92512697f, -0.93474823f, -0.94372886f, -0.95206273f, -0.95974404f, -0.96676767f, -0.97312868f, -0.97882277f, -0.98384601f, -0.98819500f, -0.99186671f, -0.99485862f, -0.99716878f, -0.99879545f, -0.99973762f, }; #endif static const CELTMode mode48000_960_120 = { 48000, /* Fs */ 120, /* overlap */ 21, /* nbEBands */ 21, /* effEBands */ {0.85000610f, 0.0000000f, 1.0000000f, 1.0000000f, }, /* preemph */ eband5ms, /* eBands */ 3, /* maxLM */ 8, /* nbShortMdcts */ 120, /* shortMdctSize */ 11, /* nbAllocVectors */ band_allocation, /* allocVectors */ logN400, /* logN */ window120, /* window */ {1920, 3, {&fft_state48000_960_0, &fft_state48000_960_1, &fft_state48000_960_2, &fft_state48000_960_3, }, mdct_twiddles960}, /* mdct */ {392, cache_index50, cache_bits50, cache_caps50}, /* cache */ }; /* List of all the available modes */ #define TOTAL_MODES 1 static const CELTMode * const static_mode_list[TOTAL_MODES] = { &mode48000_960_120, }; opus-1.1.2/celt/static_modes_float_arm_ne10.h000066400000000000000000000677041264527674100211620ustar00rootroot00000000000000/* The contents of this file was automatically generated by * dump_mode_arm_ne10.c with arguments: 48000 960 * It contains static definitions for some pre-defined modes. */ #include #ifndef NE10_FFT_PARAMS48000_960 #define NE10_FFT_PARAMS48000_960 static const ne10_int32_t ne10_factors_480[64] = { 4, 40, 4, 30, 2, 15, 5, 3, 3, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; static const ne10_int32_t ne10_factors_240[64] = { 3, 20, 4, 15, 5, 3, 3, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; static const ne10_int32_t ne10_factors_120[64] = { 3, 10, 2, 15, 5, 3, 3, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; static const ne10_int32_t ne10_factors_60[64] = { 2, 5, 5, 3, 3, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; static const ne10_fft_cpx_float32_t ne10_twiddles_480[480] = { {1.0000000f,0.0000000f}, {1.0000000f,-0.0000000f}, {1.0000000f,-0.0000000f}, {1.0000000f,-0.0000000f}, {0.91354543f,-0.40673664f}, {0.66913056f,-0.74314487f}, {1.0000000f,-0.0000000f}, {0.66913056f,-0.74314487f}, {-0.10452851f,-0.99452192f}, {1.0000000f,-0.0000000f}, {0.30901697f,-0.95105654f}, {-0.80901700f,-0.58778518f}, {1.0000000f,-0.0000000f}, {-0.10452851f,-0.99452192f}, {-0.97814757f,0.20791179f}, {1.0000000f,-0.0000000f}, {0.97814763f,-0.20791170f}, {0.91354543f,-0.40673664f}, {0.80901700f,-0.58778524f}, {0.66913056f,-0.74314487f}, {0.49999997f,-0.86602545f}, {0.30901697f,-0.95105654f}, {0.10452842f,-0.99452192f}, {-0.10452851f,-0.99452192f}, {-0.30901703f,-0.95105648f}, {-0.50000006f,-0.86602533f}, {-0.66913068f,-0.74314475f}, {-0.80901700f,-0.58778518f}, {-0.91354549f,-0.40673658f}, {-0.97814763f,-0.20791161f}, {1.0000000f,-0.0000000f}, {0.99862951f,-0.052335959f}, {0.99452192f,-0.10452846f}, {0.98768836f,-0.15643448f}, {0.97814763f,-0.20791170f}, {0.96592581f,-0.25881904f}, {0.95105648f,-0.30901700f}, {0.93358040f,-0.35836795f}, {0.91354543f,-0.40673664f}, {0.89100653f,-0.45399052f}, {0.86602545f,-0.50000000f}, {0.83867055f,-0.54463905f}, {0.80901700f,-0.58778524f}, {0.77714598f,-0.62932038f}, {0.74314475f,-0.66913062f}, {0.70710677f,-0.70710683f}, {0.66913056f,-0.74314487f}, {0.62932038f,-0.77714598f}, {0.58778524f,-0.80901700f}, {0.54463899f,-0.83867055f}, {0.49999997f,-0.86602545f}, {0.45399052f,-0.89100653f}, {0.40673661f,-0.91354549f}, {0.35836786f,-0.93358046f}, {0.30901697f,-0.95105654f}, {0.25881907f,-0.96592581f}, {0.20791166f,-0.97814763f}, {0.15643437f,-0.98768836f}, {0.10452842f,-0.99452192f}, {0.052335974f,-0.99862951f}, {1.0000000f,-0.0000000f}, {0.99452192f,-0.10452846f}, {0.97814763f,-0.20791170f}, {0.95105648f,-0.30901700f}, {0.91354543f,-0.40673664f}, {0.86602545f,-0.50000000f}, {0.80901700f,-0.58778524f}, {0.74314475f,-0.66913062f}, {0.66913056f,-0.74314487f}, {0.58778524f,-0.80901700f}, {0.49999997f,-0.86602545f}, {0.40673661f,-0.91354549f}, {0.30901697f,-0.95105654f}, {0.20791166f,-0.97814763f}, {0.10452842f,-0.99452192f}, {-4.3711388e-08f,-1.0000000f}, {-0.10452851f,-0.99452192f}, {-0.20791174f,-0.97814757f}, {-0.30901703f,-0.95105648f}, {-0.40673670f,-0.91354543f}, {-0.50000006f,-0.86602533f}, {-0.58778518f,-0.80901700f}, {-0.66913068f,-0.74314475f}, {-0.74314493f,-0.66913044f}, {-0.80901700f,-0.58778518f}, {-0.86602539f,-0.50000006f}, {-0.91354549f,-0.40673658f}, {-0.95105654f,-0.30901679f}, {-0.97814763f,-0.20791161f}, {-0.99452192f,-0.10452849f}, {1.0000000f,-0.0000000f}, {0.98768836f,-0.15643448f}, {0.95105648f,-0.30901700f}, {0.89100653f,-0.45399052f}, {0.80901700f,-0.58778524f}, {0.70710677f,-0.70710683f}, {0.58778524f,-0.80901700f}, {0.45399052f,-0.89100653f}, {0.30901697f,-0.95105654f}, {0.15643437f,-0.98768836f}, {-4.3711388e-08f,-1.0000000f}, {-0.15643445f,-0.98768836f}, {-0.30901703f,-0.95105648f}, {-0.45399061f,-0.89100647f}, {-0.58778518f,-0.80901700f}, {-0.70710677f,-0.70710677f}, {-0.80901700f,-0.58778518f}, {-0.89100659f,-0.45399037f}, {-0.95105654f,-0.30901679f}, {-0.98768836f,-0.15643445f}, {-1.0000000f,8.7422777e-08f}, {-0.98768830f,0.15643461f}, {-0.95105654f,0.30901697f}, {-0.89100653f,0.45399055f}, {-0.80901694f,0.58778536f}, {-0.70710665f,0.70710689f}, {-0.58778507f,0.80901712f}, {-0.45399022f,0.89100665f}, {-0.30901709f,0.95105648f}, {-0.15643452f,0.98768830f}, {1.0000000f,-0.0000000f}, {0.99991435f,-0.013089596f}, {0.99965733f,-0.026176950f}, {0.99922901f,-0.039259817f}, {0.99862951f,-0.052335959f}, {0.99785894f,-0.065403134f}, {0.99691731f,-0.078459099f}, {0.99580491f,-0.091501623f}, {0.99452192f,-0.10452846f}, {0.99306846f,-0.11753740f}, {0.99144489f,-0.13052620f}, {0.98965138f,-0.14349262f}, {0.98768836f,-0.15643448f}, {0.98555607f,-0.16934951f}, {0.98325491f,-0.18223552f}, {0.98078525f,-0.19509032f}, {0.97814763f,-0.20791170f}, {0.97534233f,-0.22069745f}, {0.97236991f,-0.23344538f}, {0.96923089f,-0.24615330f}, {0.96592581f,-0.25881904f}, {0.96245521f,-0.27144045f}, {0.95881975f,-0.28401536f}, {0.95501995f,-0.29654160f}, {0.95105648f,-0.30901700f}, {0.94693011f,-0.32143945f}, {0.94264150f,-0.33380687f}, {0.93819129f,-0.34611708f}, {0.93358040f,-0.35836795f}, {0.92880952f,-0.37055743f}, {0.92387956f,-0.38268346f}, {0.91879117f,-0.39474389f}, {0.91354543f,-0.40673664f}, {0.90814316f,-0.41865975f}, {0.90258527f,-0.43051112f}, {0.89687270f,-0.44228873f}, {0.89100653f,-0.45399052f}, {0.88498765f,-0.46561453f}, {0.87881708f,-0.47715878f}, {0.87249601f,-0.48862126f}, {0.86602545f,-0.50000000f}, {0.85940641f,-0.51129311f}, {0.85264015f,-0.52249855f}, {0.84572786f,-0.53361452f}, {0.83867055f,-0.54463905f}, {0.83146960f,-0.55557024f}, {0.82412618f,-0.56640625f}, {0.81664151f,-0.57714522f}, {0.80901700f,-0.58778524f}, {0.80125380f,-0.59832460f}, {0.79335332f,-0.60876143f}, {0.78531694f,-0.61909395f}, {0.77714598f,-0.62932038f}, {0.76884180f,-0.63943899f}, {0.76040596f,-0.64944810f}, {0.75183982f,-0.65934587f}, {0.74314475f,-0.66913062f}, {0.73432249f,-0.67880076f}, {0.72537434f,-0.68835455f}, {0.71630192f,-0.69779050f}, {0.70710677f,-0.70710683f}, {0.69779044f,-0.71630198f}, {0.68835455f,-0.72537440f}, {0.67880070f,-0.73432255f}, {0.66913056f,-0.74314487f}, {0.65934581f,-0.75183982f}, {0.64944804f,-0.76040596f}, {0.63943899f,-0.76884186f}, {0.62932038f,-0.77714598f}, {0.61909395f,-0.78531694f}, {0.60876137f,-0.79335338f}, {0.59832460f,-0.80125386f}, {0.58778524f,-0.80901700f}, {0.57714516f,-0.81664151f}, {0.56640625f,-0.82412618f}, {0.55557019f,-0.83146960f}, {0.54463899f,-0.83867055f}, {0.53361452f,-0.84572786f}, {0.52249849f,-0.85264015f}, {0.51129311f,-0.85940641f}, {0.49999997f,-0.86602545f}, {0.48862118f,-0.87249601f}, {0.47715876f,-0.87881708f}, {0.46561447f,-0.88498765f}, {0.45399052f,-0.89100653f}, {0.44228867f,-0.89687276f}, {0.43051103f,-0.90258533f}, {0.41865975f,-0.90814316f}, {0.40673661f,-0.91354549f}, {0.39474380f,-0.91879129f}, {0.38268343f,-0.92387956f}, {0.37055740f,-0.92880958f}, {0.35836786f,-0.93358046f}, {0.34611705f,-0.93819135f}, {0.33380681f,-0.94264150f}, {0.32143947f,-0.94693011f}, {0.30901697f,-0.95105654f}, {0.29654151f,-0.95501995f}, {0.28401533f,-0.95881975f}, {0.27144039f,-0.96245527f}, {0.25881907f,-0.96592581f}, {0.24615327f,-0.96923089f}, {0.23344530f,-0.97236991f}, {0.22069745f,-0.97534233f}, {0.20791166f,-0.97814763f}, {0.19509023f,-0.98078531f}, {0.18223552f,-0.98325491f}, {0.16934945f,-0.98555607f}, {0.15643437f,-0.98768836f}, {0.14349259f,-0.98965138f}, {0.13052613f,-0.99144489f}, {0.11753740f,-0.99306846f}, {0.10452842f,-0.99452192f}, {0.091501534f,-0.99580491f}, {0.078459084f,-0.99691731f}, {0.065403074f,-0.99785894f}, {0.052335974f,-0.99862951f}, {0.039259788f,-0.99922901f}, {0.026176875f,-0.99965733f}, {0.013089597f,-0.99991435f}, {1.0000000f,-0.0000000f}, {0.99965733f,-0.026176950f}, {0.99862951f,-0.052335959f}, {0.99691731f,-0.078459099f}, {0.99452192f,-0.10452846f}, {0.99144489f,-0.13052620f}, {0.98768836f,-0.15643448f}, {0.98325491f,-0.18223552f}, {0.97814763f,-0.20791170f}, {0.97236991f,-0.23344538f}, {0.96592581f,-0.25881904f}, {0.95881975f,-0.28401536f}, {0.95105648f,-0.30901700f}, {0.94264150f,-0.33380687f}, {0.93358040f,-0.35836795f}, {0.92387956f,-0.38268346f}, {0.91354543f,-0.40673664f}, {0.90258527f,-0.43051112f}, {0.89100653f,-0.45399052f}, {0.87881708f,-0.47715878f}, {0.86602545f,-0.50000000f}, {0.85264015f,-0.52249855f}, {0.83867055f,-0.54463905f}, {0.82412618f,-0.56640625f}, {0.80901700f,-0.58778524f}, {0.79335332f,-0.60876143f}, {0.77714598f,-0.62932038f}, {0.76040596f,-0.64944810f}, {0.74314475f,-0.66913062f}, {0.72537434f,-0.68835455f}, {0.70710677f,-0.70710683f}, {0.68835455f,-0.72537440f}, {0.66913056f,-0.74314487f}, {0.64944804f,-0.76040596f}, {0.62932038f,-0.77714598f}, {0.60876137f,-0.79335338f}, {0.58778524f,-0.80901700f}, {0.56640625f,-0.82412618f}, {0.54463899f,-0.83867055f}, {0.52249849f,-0.85264015f}, {0.49999997f,-0.86602545f}, {0.47715876f,-0.87881708f}, {0.45399052f,-0.89100653f}, {0.43051103f,-0.90258533f}, {0.40673661f,-0.91354549f}, {0.38268343f,-0.92387956f}, {0.35836786f,-0.93358046f}, {0.33380681f,-0.94264150f}, {0.30901697f,-0.95105654f}, {0.28401533f,-0.95881975f}, {0.25881907f,-0.96592581f}, {0.23344530f,-0.97236991f}, {0.20791166f,-0.97814763f}, {0.18223552f,-0.98325491f}, {0.15643437f,-0.98768836f}, {0.13052613f,-0.99144489f}, {0.10452842f,-0.99452192f}, {0.078459084f,-0.99691731f}, {0.052335974f,-0.99862951f}, {0.026176875f,-0.99965733f}, {-4.3711388e-08f,-1.0000000f}, {-0.026176963f,-0.99965733f}, {-0.052336060f,-0.99862951f}, {-0.078459173f,-0.99691731f}, {-0.10452851f,-0.99452192f}, {-0.13052621f,-0.99144489f}, {-0.15643445f,-0.98768836f}, {-0.18223560f,-0.98325491f}, {-0.20791174f,-0.97814757f}, {-0.23344538f,-0.97236991f}, {-0.25881916f,-0.96592581f}, {-0.28401542f,-0.95881969f}, {-0.30901703f,-0.95105648f}, {-0.33380687f,-0.94264150f}, {-0.35836795f,-0.93358040f}, {-0.38268352f,-0.92387950f}, {-0.40673670f,-0.91354543f}, {-0.43051112f,-0.90258527f}, {-0.45399061f,-0.89100647f}, {-0.47715873f,-0.87881708f}, {-0.50000006f,-0.86602533f}, {-0.52249867f,-0.85264009f}, {-0.54463905f,-0.83867055f}, {-0.56640631f,-0.82412612f}, {-0.58778518f,-0.80901700f}, {-0.60876143f,-0.79335332f}, {-0.62932050f,-0.77714586f}, {-0.64944804f,-0.76040596f}, {-0.66913068f,-0.74314475f}, {-0.68835467f,-0.72537428f}, {-0.70710677f,-0.70710677f}, {-0.72537446f,-0.68835449f}, {-0.74314493f,-0.66913044f}, {-0.76040596f,-0.64944804f}, {-0.77714604f,-0.62932026f}, {-0.79335332f,-0.60876143f}, {-0.80901700f,-0.58778518f}, {-0.82412624f,-0.56640613f}, {-0.83867055f,-0.54463899f}, {-0.85264021f,-0.52249849f}, {-0.86602539f,-0.50000006f}, {-0.87881714f,-0.47715873f}, {-0.89100659f,-0.45399037f}, {-0.90258527f,-0.43051112f}, {-0.91354549f,-0.40673658f}, {-0.92387956f,-0.38268328f}, {-0.93358040f,-0.35836792f}, {-0.94264150f,-0.33380675f}, {-0.95105654f,-0.30901679f}, {-0.95881975f,-0.28401530f}, {-0.96592587f,-0.25881892f}, {-0.97236991f,-0.23344538f}, {-0.97814763f,-0.20791161f}, {-0.98325491f,-0.18223536f}, {-0.98768836f,-0.15643445f}, {-0.99144489f,-0.13052608f}, {-0.99452192f,-0.10452849f}, {-0.99691737f,-0.078459039f}, {-0.99862957f,-0.052335810f}, {-0.99965733f,-0.026176952f}, {1.0000000f,-0.0000000f}, {0.99922901f,-0.039259817f}, {0.99691731f,-0.078459099f}, {0.99306846f,-0.11753740f}, {0.98768836f,-0.15643448f}, {0.98078525f,-0.19509032f}, {0.97236991f,-0.23344538f}, {0.96245521f,-0.27144045f}, {0.95105648f,-0.30901700f}, {0.93819129f,-0.34611708f}, {0.92387956f,-0.38268346f}, {0.90814316f,-0.41865975f}, {0.89100653f,-0.45399052f}, {0.87249601f,-0.48862126f}, {0.85264015f,-0.52249855f}, {0.83146960f,-0.55557024f}, {0.80901700f,-0.58778524f}, {0.78531694f,-0.61909395f}, {0.76040596f,-0.64944810f}, {0.73432249f,-0.67880076f}, {0.70710677f,-0.70710683f}, {0.67880070f,-0.73432255f}, {0.64944804f,-0.76040596f}, {0.61909395f,-0.78531694f}, {0.58778524f,-0.80901700f}, {0.55557019f,-0.83146960f}, {0.52249849f,-0.85264015f}, {0.48862118f,-0.87249601f}, {0.45399052f,-0.89100653f}, {0.41865975f,-0.90814316f}, {0.38268343f,-0.92387956f}, {0.34611705f,-0.93819135f}, {0.30901697f,-0.95105654f}, {0.27144039f,-0.96245527f}, {0.23344530f,-0.97236991f}, {0.19509023f,-0.98078531f}, {0.15643437f,-0.98768836f}, {0.11753740f,-0.99306846f}, {0.078459084f,-0.99691731f}, {0.039259788f,-0.99922901f}, {-4.3711388e-08f,-1.0000000f}, {-0.039259877f,-0.99922901f}, {-0.078459173f,-0.99691731f}, {-0.11753749f,-0.99306846f}, {-0.15643445f,-0.98768836f}, {-0.19509032f,-0.98078525f}, {-0.23344538f,-0.97236991f}, {-0.27144048f,-0.96245521f}, {-0.30901703f,-0.95105648f}, {-0.34611711f,-0.93819129f}, {-0.38268352f,-0.92387950f}, {-0.41865984f,-0.90814310f}, {-0.45399061f,-0.89100647f}, {-0.48862135f,-0.87249595f}, {-0.52249867f,-0.85264009f}, {-0.55557036f,-0.83146954f}, {-0.58778518f,-0.80901700f}, {-0.61909389f,-0.78531694f}, {-0.64944804f,-0.76040596f}, {-0.67880076f,-0.73432249f}, {-0.70710677f,-0.70710677f}, {-0.73432249f,-0.67880070f}, {-0.76040596f,-0.64944804f}, {-0.78531694f,-0.61909389f}, {-0.80901700f,-0.58778518f}, {-0.83146966f,-0.55557019f}, {-0.85264021f,-0.52249849f}, {-0.87249607f,-0.48862115f}, {-0.89100659f,-0.45399037f}, {-0.90814322f,-0.41865960f}, {-0.92387956f,-0.38268328f}, {-0.93819135f,-0.34611690f}, {-0.95105654f,-0.30901679f}, {-0.96245521f,-0.27144048f}, {-0.97236991f,-0.23344538f}, {-0.98078531f,-0.19509031f}, {-0.98768836f,-0.15643445f}, {-0.99306846f,-0.11753736f}, {-0.99691737f,-0.078459039f}, {-0.99922901f,-0.039259743f}, {-1.0000000f,8.7422777e-08f}, {-0.99922901f,0.039259918f}, {-0.99691731f,0.078459218f}, {-0.99306846f,0.11753753f}, {-0.98768830f,0.15643461f}, {-0.98078525f,0.19509049f}, {-0.97236985f,0.23344554f}, {-0.96245515f,0.27144065f}, {-0.95105654f,0.30901697f}, {-0.93819135f,0.34611705f}, {-0.92387956f,0.38268346f}, {-0.90814316f,0.41865975f}, {-0.89100653f,0.45399055f}, {-0.87249601f,0.48862129f}, {-0.85264015f,0.52249861f}, {-0.83146960f,0.55557030f}, {-0.80901694f,0.58778536f}, {-0.78531688f,0.61909401f}, {-0.76040590f,0.64944816f}, {-0.73432243f,0.67880082f}, {-0.70710665f,0.70710689f}, {-0.67880058f,0.73432261f}, {-0.64944792f,0.76040608f}, {-0.61909378f,0.78531706f}, {-0.58778507f,0.80901712f}, {-0.55557001f,0.83146977f}, {-0.52249837f,0.85264033f}, {-0.48862100f,0.87249613f}, {-0.45399022f,0.89100665f}, {-0.41865945f,0.90814328f}, {-0.38268313f,0.92387968f}, {-0.34611672f,0.93819147f}, {-0.30901709f,0.95105648f}, {-0.27144054f,0.96245521f}, {-0.23344545f,0.97236991f}, {-0.19509038f,0.98078525f}, {-0.15643452f,0.98768830f}, {-0.11753743f,0.99306846f}, {-0.078459114f,0.99691731f}, {-0.039259821f,0.99922901f}, }; static const ne10_fft_cpx_float32_t ne10_twiddles_240[240] = { {1.0000000f,0.0000000f}, {1.0000000f,-0.0000000f}, {1.0000000f,-0.0000000f}, {1.0000000f,-0.0000000f}, {0.91354543f,-0.40673664f}, {0.66913056f,-0.74314487f}, {1.0000000f,-0.0000000f}, {0.66913056f,-0.74314487f}, {-0.10452851f,-0.99452192f}, {1.0000000f,-0.0000000f}, {0.30901697f,-0.95105654f}, {-0.80901700f,-0.58778518f}, {1.0000000f,-0.0000000f}, {-0.10452851f,-0.99452192f}, {-0.97814757f,0.20791179f}, {1.0000000f,-0.0000000f}, {0.99452192f,-0.10452846f}, {0.97814763f,-0.20791170f}, {0.95105648f,-0.30901700f}, {0.91354543f,-0.40673664f}, {0.86602545f,-0.50000000f}, {0.80901700f,-0.58778524f}, {0.74314475f,-0.66913062f}, {0.66913056f,-0.74314487f}, {0.58778524f,-0.80901700f}, {0.49999997f,-0.86602545f}, {0.40673661f,-0.91354549f}, {0.30901697f,-0.95105654f}, {0.20791166f,-0.97814763f}, {0.10452842f,-0.99452192f}, {1.0000000f,-0.0000000f}, {0.97814763f,-0.20791170f}, {0.91354543f,-0.40673664f}, {0.80901700f,-0.58778524f}, {0.66913056f,-0.74314487f}, {0.49999997f,-0.86602545f}, {0.30901697f,-0.95105654f}, {0.10452842f,-0.99452192f}, {-0.10452851f,-0.99452192f}, {-0.30901703f,-0.95105648f}, {-0.50000006f,-0.86602533f}, {-0.66913068f,-0.74314475f}, {-0.80901700f,-0.58778518f}, {-0.91354549f,-0.40673658f}, {-0.97814763f,-0.20791161f}, {1.0000000f,-0.0000000f}, {0.95105648f,-0.30901700f}, {0.80901700f,-0.58778524f}, {0.58778524f,-0.80901700f}, {0.30901697f,-0.95105654f}, {-4.3711388e-08f,-1.0000000f}, {-0.30901703f,-0.95105648f}, {-0.58778518f,-0.80901700f}, {-0.80901700f,-0.58778518f}, {-0.95105654f,-0.30901679f}, {-1.0000000f,8.7422777e-08f}, {-0.95105654f,0.30901697f}, {-0.80901694f,0.58778536f}, {-0.58778507f,0.80901712f}, {-0.30901709f,0.95105648f}, {1.0000000f,-0.0000000f}, {0.99965733f,-0.026176950f}, {0.99862951f,-0.052335959f}, {0.99691731f,-0.078459099f}, {0.99452192f,-0.10452846f}, {0.99144489f,-0.13052620f}, {0.98768836f,-0.15643448f}, {0.98325491f,-0.18223552f}, {0.97814763f,-0.20791170f}, {0.97236991f,-0.23344538f}, {0.96592581f,-0.25881904f}, {0.95881975f,-0.28401536f}, {0.95105648f,-0.30901700f}, {0.94264150f,-0.33380687f}, {0.93358040f,-0.35836795f}, {0.92387956f,-0.38268346f}, {0.91354543f,-0.40673664f}, {0.90258527f,-0.43051112f}, {0.89100653f,-0.45399052f}, {0.87881708f,-0.47715878f}, {0.86602545f,-0.50000000f}, {0.85264015f,-0.52249855f}, {0.83867055f,-0.54463905f}, {0.82412618f,-0.56640625f}, {0.80901700f,-0.58778524f}, {0.79335332f,-0.60876143f}, {0.77714598f,-0.62932038f}, {0.76040596f,-0.64944810f}, {0.74314475f,-0.66913062f}, {0.72537434f,-0.68835455f}, {0.70710677f,-0.70710683f}, {0.68835455f,-0.72537440f}, {0.66913056f,-0.74314487f}, {0.64944804f,-0.76040596f}, {0.62932038f,-0.77714598f}, {0.60876137f,-0.79335338f}, {0.58778524f,-0.80901700f}, {0.56640625f,-0.82412618f}, {0.54463899f,-0.83867055f}, {0.52249849f,-0.85264015f}, {0.49999997f,-0.86602545f}, {0.47715876f,-0.87881708f}, {0.45399052f,-0.89100653f}, {0.43051103f,-0.90258533f}, {0.40673661f,-0.91354549f}, {0.38268343f,-0.92387956f}, {0.35836786f,-0.93358046f}, {0.33380681f,-0.94264150f}, {0.30901697f,-0.95105654f}, {0.28401533f,-0.95881975f}, {0.25881907f,-0.96592581f}, {0.23344530f,-0.97236991f}, {0.20791166f,-0.97814763f}, {0.18223552f,-0.98325491f}, {0.15643437f,-0.98768836f}, {0.13052613f,-0.99144489f}, {0.10452842f,-0.99452192f}, {0.078459084f,-0.99691731f}, {0.052335974f,-0.99862951f}, {0.026176875f,-0.99965733f}, {1.0000000f,-0.0000000f}, {0.99862951f,-0.052335959f}, {0.99452192f,-0.10452846f}, {0.98768836f,-0.15643448f}, {0.97814763f,-0.20791170f}, {0.96592581f,-0.25881904f}, {0.95105648f,-0.30901700f}, {0.93358040f,-0.35836795f}, {0.91354543f,-0.40673664f}, {0.89100653f,-0.45399052f}, {0.86602545f,-0.50000000f}, {0.83867055f,-0.54463905f}, {0.80901700f,-0.58778524f}, {0.77714598f,-0.62932038f}, {0.74314475f,-0.66913062f}, {0.70710677f,-0.70710683f}, {0.66913056f,-0.74314487f}, {0.62932038f,-0.77714598f}, {0.58778524f,-0.80901700f}, {0.54463899f,-0.83867055f}, {0.49999997f,-0.86602545f}, {0.45399052f,-0.89100653f}, {0.40673661f,-0.91354549f}, {0.35836786f,-0.93358046f}, {0.30901697f,-0.95105654f}, {0.25881907f,-0.96592581f}, {0.20791166f,-0.97814763f}, {0.15643437f,-0.98768836f}, {0.10452842f,-0.99452192f}, {0.052335974f,-0.99862951f}, {-4.3711388e-08f,-1.0000000f}, {-0.052336060f,-0.99862951f}, {-0.10452851f,-0.99452192f}, {-0.15643445f,-0.98768836f}, {-0.20791174f,-0.97814757f}, {-0.25881916f,-0.96592581f}, {-0.30901703f,-0.95105648f}, {-0.35836795f,-0.93358040f}, {-0.40673670f,-0.91354543f}, {-0.45399061f,-0.89100647f}, {-0.50000006f,-0.86602533f}, {-0.54463905f,-0.83867055f}, {-0.58778518f,-0.80901700f}, {-0.62932050f,-0.77714586f}, {-0.66913068f,-0.74314475f}, {-0.70710677f,-0.70710677f}, {-0.74314493f,-0.66913044f}, {-0.77714604f,-0.62932026f}, {-0.80901700f,-0.58778518f}, {-0.83867055f,-0.54463899f}, {-0.86602539f,-0.50000006f}, {-0.89100659f,-0.45399037f}, {-0.91354549f,-0.40673658f}, {-0.93358040f,-0.35836792f}, {-0.95105654f,-0.30901679f}, {-0.96592587f,-0.25881892f}, {-0.97814763f,-0.20791161f}, {-0.98768836f,-0.15643445f}, {-0.99452192f,-0.10452849f}, {-0.99862957f,-0.052335810f}, {1.0000000f,-0.0000000f}, {0.99691731f,-0.078459099f}, {0.98768836f,-0.15643448f}, {0.97236991f,-0.23344538f}, {0.95105648f,-0.30901700f}, {0.92387956f,-0.38268346f}, {0.89100653f,-0.45399052f}, {0.85264015f,-0.52249855f}, {0.80901700f,-0.58778524f}, {0.76040596f,-0.64944810f}, {0.70710677f,-0.70710683f}, {0.64944804f,-0.76040596f}, {0.58778524f,-0.80901700f}, {0.52249849f,-0.85264015f}, {0.45399052f,-0.89100653f}, {0.38268343f,-0.92387956f}, {0.30901697f,-0.95105654f}, {0.23344530f,-0.97236991f}, {0.15643437f,-0.98768836f}, {0.078459084f,-0.99691731f}, {-4.3711388e-08f,-1.0000000f}, {-0.078459173f,-0.99691731f}, {-0.15643445f,-0.98768836f}, {-0.23344538f,-0.97236991f}, {-0.30901703f,-0.95105648f}, {-0.38268352f,-0.92387950f}, {-0.45399061f,-0.89100647f}, {-0.52249867f,-0.85264009f}, {-0.58778518f,-0.80901700f}, {-0.64944804f,-0.76040596f}, {-0.70710677f,-0.70710677f}, {-0.76040596f,-0.64944804f}, {-0.80901700f,-0.58778518f}, {-0.85264021f,-0.52249849f}, {-0.89100659f,-0.45399037f}, {-0.92387956f,-0.38268328f}, {-0.95105654f,-0.30901679f}, {-0.97236991f,-0.23344538f}, {-0.98768836f,-0.15643445f}, {-0.99691737f,-0.078459039f}, {-1.0000000f,8.7422777e-08f}, {-0.99691731f,0.078459218f}, {-0.98768830f,0.15643461f}, {-0.97236985f,0.23344554f}, {-0.95105654f,0.30901697f}, {-0.92387956f,0.38268346f}, {-0.89100653f,0.45399055f}, {-0.85264015f,0.52249861f}, {-0.80901694f,0.58778536f}, {-0.76040590f,0.64944816f}, {-0.70710665f,0.70710689f}, {-0.64944792f,0.76040608f}, {-0.58778507f,0.80901712f}, {-0.52249837f,0.85264033f}, {-0.45399022f,0.89100665f}, {-0.38268313f,0.92387968f}, {-0.30901709f,0.95105648f}, {-0.23344545f,0.97236991f}, {-0.15643452f,0.98768830f}, {-0.078459114f,0.99691731f}, }; static const ne10_fft_cpx_float32_t ne10_twiddles_120[120] = { {1.0000000f,0.0000000f}, {1.0000000f,-0.0000000f}, {1.0000000f,-0.0000000f}, {1.0000000f,-0.0000000f}, {0.91354543f,-0.40673664f}, {0.66913056f,-0.74314487f}, {1.0000000f,-0.0000000f}, {0.66913056f,-0.74314487f}, {-0.10452851f,-0.99452192f}, {1.0000000f,-0.0000000f}, {0.30901697f,-0.95105654f}, {-0.80901700f,-0.58778518f}, {1.0000000f,-0.0000000f}, {-0.10452851f,-0.99452192f}, {-0.97814757f,0.20791179f}, {1.0000000f,-0.0000000f}, {0.97814763f,-0.20791170f}, {0.91354543f,-0.40673664f}, {0.80901700f,-0.58778524f}, {0.66913056f,-0.74314487f}, {0.49999997f,-0.86602545f}, {0.30901697f,-0.95105654f}, {0.10452842f,-0.99452192f}, {-0.10452851f,-0.99452192f}, {-0.30901703f,-0.95105648f}, {-0.50000006f,-0.86602533f}, {-0.66913068f,-0.74314475f}, {-0.80901700f,-0.58778518f}, {-0.91354549f,-0.40673658f}, {-0.97814763f,-0.20791161f}, {1.0000000f,-0.0000000f}, {0.99862951f,-0.052335959f}, {0.99452192f,-0.10452846f}, {0.98768836f,-0.15643448f}, {0.97814763f,-0.20791170f}, {0.96592581f,-0.25881904f}, {0.95105648f,-0.30901700f}, {0.93358040f,-0.35836795f}, {0.91354543f,-0.40673664f}, {0.89100653f,-0.45399052f}, {0.86602545f,-0.50000000f}, {0.83867055f,-0.54463905f}, {0.80901700f,-0.58778524f}, {0.77714598f,-0.62932038f}, {0.74314475f,-0.66913062f}, {0.70710677f,-0.70710683f}, {0.66913056f,-0.74314487f}, {0.62932038f,-0.77714598f}, {0.58778524f,-0.80901700f}, {0.54463899f,-0.83867055f}, {0.49999997f,-0.86602545f}, {0.45399052f,-0.89100653f}, {0.40673661f,-0.91354549f}, {0.35836786f,-0.93358046f}, {0.30901697f,-0.95105654f}, {0.25881907f,-0.96592581f}, {0.20791166f,-0.97814763f}, {0.15643437f,-0.98768836f}, {0.10452842f,-0.99452192f}, {0.052335974f,-0.99862951f}, {1.0000000f,-0.0000000f}, {0.99452192f,-0.10452846f}, {0.97814763f,-0.20791170f}, {0.95105648f,-0.30901700f}, {0.91354543f,-0.40673664f}, {0.86602545f,-0.50000000f}, {0.80901700f,-0.58778524f}, {0.74314475f,-0.66913062f}, {0.66913056f,-0.74314487f}, {0.58778524f,-0.80901700f}, {0.49999997f,-0.86602545f}, {0.40673661f,-0.91354549f}, {0.30901697f,-0.95105654f}, {0.20791166f,-0.97814763f}, {0.10452842f,-0.99452192f}, {-4.3711388e-08f,-1.0000000f}, {-0.10452851f,-0.99452192f}, {-0.20791174f,-0.97814757f}, {-0.30901703f,-0.95105648f}, {-0.40673670f,-0.91354543f}, {-0.50000006f,-0.86602533f}, {-0.58778518f,-0.80901700f}, {-0.66913068f,-0.74314475f}, {-0.74314493f,-0.66913044f}, {-0.80901700f,-0.58778518f}, {-0.86602539f,-0.50000006f}, {-0.91354549f,-0.40673658f}, {-0.95105654f,-0.30901679f}, {-0.97814763f,-0.20791161f}, {-0.99452192f,-0.10452849f}, {1.0000000f,-0.0000000f}, {0.98768836f,-0.15643448f}, {0.95105648f,-0.30901700f}, {0.89100653f,-0.45399052f}, {0.80901700f,-0.58778524f}, {0.70710677f,-0.70710683f}, {0.58778524f,-0.80901700f}, {0.45399052f,-0.89100653f}, {0.30901697f,-0.95105654f}, {0.15643437f,-0.98768836f}, {-4.3711388e-08f,-1.0000000f}, {-0.15643445f,-0.98768836f}, {-0.30901703f,-0.95105648f}, {-0.45399061f,-0.89100647f}, {-0.58778518f,-0.80901700f}, {-0.70710677f,-0.70710677f}, {-0.80901700f,-0.58778518f}, {-0.89100659f,-0.45399037f}, {-0.95105654f,-0.30901679f}, {-0.98768836f,-0.15643445f}, {-1.0000000f,8.7422777e-08f}, {-0.98768830f,0.15643461f}, {-0.95105654f,0.30901697f}, {-0.89100653f,0.45399055f}, {-0.80901694f,0.58778536f}, {-0.70710665f,0.70710689f}, {-0.58778507f,0.80901712f}, {-0.45399022f,0.89100665f}, {-0.30901709f,0.95105648f}, {-0.15643452f,0.98768830f}, }; static const ne10_fft_cpx_float32_t ne10_twiddles_60[60] = { {1.0000000f,0.0000000f}, {1.0000000f,-0.0000000f}, {1.0000000f,-0.0000000f}, {1.0000000f,-0.0000000f}, {0.91354543f,-0.40673664f}, {0.66913056f,-0.74314487f}, {1.0000000f,-0.0000000f}, {0.66913056f,-0.74314487f}, {-0.10452851f,-0.99452192f}, {1.0000000f,-0.0000000f}, {0.30901697f,-0.95105654f}, {-0.80901700f,-0.58778518f}, {1.0000000f,-0.0000000f}, {-0.10452851f,-0.99452192f}, {-0.97814757f,0.20791179f}, {1.0000000f,-0.0000000f}, {0.99452192f,-0.10452846f}, {0.97814763f,-0.20791170f}, {0.95105648f,-0.30901700f}, {0.91354543f,-0.40673664f}, {0.86602545f,-0.50000000f}, {0.80901700f,-0.58778524f}, {0.74314475f,-0.66913062f}, {0.66913056f,-0.74314487f}, {0.58778524f,-0.80901700f}, {0.49999997f,-0.86602545f}, {0.40673661f,-0.91354549f}, {0.30901697f,-0.95105654f}, {0.20791166f,-0.97814763f}, {0.10452842f,-0.99452192f}, {1.0000000f,-0.0000000f}, {0.97814763f,-0.20791170f}, {0.91354543f,-0.40673664f}, {0.80901700f,-0.58778524f}, {0.66913056f,-0.74314487f}, {0.49999997f,-0.86602545f}, {0.30901697f,-0.95105654f}, {0.10452842f,-0.99452192f}, {-0.10452851f,-0.99452192f}, {-0.30901703f,-0.95105648f}, {-0.50000006f,-0.86602533f}, {-0.66913068f,-0.74314475f}, {-0.80901700f,-0.58778518f}, {-0.91354549f,-0.40673658f}, {-0.97814763f,-0.20791161f}, {1.0000000f,-0.0000000f}, {0.95105648f,-0.30901700f}, {0.80901700f,-0.58778524f}, {0.58778524f,-0.80901700f}, {0.30901697f,-0.95105654f}, {-4.3711388e-08f,-1.0000000f}, {-0.30901703f,-0.95105648f}, {-0.58778518f,-0.80901700f}, {-0.80901700f,-0.58778518f}, {-0.95105654f,-0.30901679f}, {-1.0000000f,8.7422777e-08f}, {-0.95105654f,0.30901697f}, {-0.80901694f,0.58778536f}, {-0.58778507f,0.80901712f}, {-0.30901709f,0.95105648f}, }; static const ne10_fft_state_float32_t ne10_fft_state_float32_t_480 = { 120, (ne10_int32_t *)ne10_factors_480, (ne10_fft_cpx_float32_t *)ne10_twiddles_480, NULL, (ne10_fft_cpx_float32_t *)&ne10_twiddles_480[120], /* is_forward_scaled = true */ (ne10_int32_t) 1, /* is_backward_scaled = false */ (ne10_int32_t) 0, }; static const arch_fft_state cfg_arch_480 = { 1, (void *)&ne10_fft_state_float32_t_480, }; static const ne10_fft_state_float32_t ne10_fft_state_float32_t_240 = { 60, (ne10_int32_t *)ne10_factors_240, (ne10_fft_cpx_float32_t *)ne10_twiddles_240, NULL, (ne10_fft_cpx_float32_t *)&ne10_twiddles_240[60], /* is_forward_scaled = true */ (ne10_int32_t) 1, /* is_backward_scaled = false */ (ne10_int32_t) 0, }; static const arch_fft_state cfg_arch_240 = { 1, (void *)&ne10_fft_state_float32_t_240, }; static const ne10_fft_state_float32_t ne10_fft_state_float32_t_120 = { 30, (ne10_int32_t *)ne10_factors_120, (ne10_fft_cpx_float32_t *)ne10_twiddles_120, NULL, (ne10_fft_cpx_float32_t *)&ne10_twiddles_120[30], /* is_forward_scaled = true */ (ne10_int32_t) 1, /* is_backward_scaled = false */ (ne10_int32_t) 0, }; static const arch_fft_state cfg_arch_120 = { 1, (void *)&ne10_fft_state_float32_t_120, }; static const ne10_fft_state_float32_t ne10_fft_state_float32_t_60 = { 15, (ne10_int32_t *)ne10_factors_60, (ne10_fft_cpx_float32_t *)ne10_twiddles_60, NULL, (ne10_fft_cpx_float32_t *)&ne10_twiddles_60[15], /* is_forward_scaled = true */ (ne10_int32_t) 1, /* is_backward_scaled = false */ (ne10_int32_t) 0, }; static const arch_fft_state cfg_arch_60 = { 1, (void *)&ne10_fft_state_float32_t_60, }; #endif /* end NE10_FFT_PARAMS48000_960 */ opus-1.1.2/celt/tests/000077500000000000000000000000001264527674100146105ustar00rootroot00000000000000opus-1.1.2/celt/tests/test_unit_cwrs32.c000066400000000000000000000105701264527674100202000ustar00rootroot00000000000000/* Copyright (c) 2008-2011 Xiph.Org Foundation, Mozilla Corporation, Gregory Maxwell Written by Jean-Marc Valin, Gregory Maxwell, and Timothy B. Terriberry */ /* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - 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. 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 OWNER 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. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #ifndef CUSTOM_MODES #define CUSTOM_MODES #else #define TEST_CUSTOM_MODES #endif #define CELT_C #include "stack_alloc.h" #include "entenc.c" #include "entdec.c" #include "entcode.c" #include "cwrs.c" #include "mathops.c" #include "rate.h" #define NMAX (240) #define KMAX (128) #ifdef TEST_CUSTOM_MODES #define NDIMS (44) static const int pn[NDIMS]={ 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 18, 20, 22, 24, 26, 28, 30, 32, 36, 40, 44, 48, 52, 56, 60, 64, 72, 80, 88, 96, 104, 112, 120, 128, 144, 160, 176, 192, 208 }; static const int pkmax[NDIMS]={ 128, 128, 128, 128, 88, 52, 36, 26, 22, 18, 16, 15, 13, 12, 12, 11, 10, 9, 9, 8, 8, 7, 7, 7, 7, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4 }; #else /* TEST_CUSTOM_MODES */ #define NDIMS (22) static const int pn[NDIMS]={ 2, 3, 4, 6, 8, 9, 11, 12, 16, 18, 22, 24, 32, 36, 44, 48, 64, 72, 88, 96, 144, 176 }; static const int pkmax[NDIMS]={ 128, 128, 128, 88, 36, 26, 18, 16, 12, 11, 9, 9, 7, 7, 6, 6, 5, 5, 5, 5, 4, 4 }; #endif int main(void){ int t; int n; ALLOC_STACK; for(t=0;tpkmax[t])break; printf("Testing CWRS with N=%i, K=%i...\n",n,k); #if defined(SMALL_FOOTPRINT) nc=ncwrs_urow(n,k,uu); #else nc=CELT_PVQ_V(n,k); #endif inc=nc/20000; if(inc<1)inc=1; for(i=0;i");*/ #if defined(SMALL_FOOTPRINT) ii=icwrs(n,k,&v,y,u); #else ii=icwrs(n,y); v=CELT_PVQ_V(n,k); #endif if(ii!=i){ fprintf(stderr,"Combination-index mismatch (%lu!=%lu).\n", (long)ii,(long)i); return 1; } if(v!=nc){ fprintf(stderr,"Combination count mismatch (%lu!=%lu).\n", (long)v,(long)nc); return 2; } /*printf(" %6u\n",i);*/ } /*printf("\n");*/ } } return 0; } opus-1.1.2/celt/tests/test_unit_dft.c000066400000000000000000000116761264527674100176420ustar00rootroot00000000000000/* Copyright (c) 2008 Xiph.Org Foundation Written by Jean-Marc Valin */ /* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - 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. 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 OWNER 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. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #define SKIP_CONFIG_H #ifndef CUSTOM_MODES #define CUSTOM_MODES #endif #include #define CELT_C #define TEST_UNIT_DFT_C #include "stack_alloc.h" #include "kiss_fft.h" #include "kiss_fft.c" #include "mathops.c" #include "entcode.c" #if defined(OPUS_X86_MAY_HAVE_SSE2) || defined(OPUS_X86_MAY_HAVE_SSE4_1) # include "x86/x86cpu.c" #elif defined(OPUS_ARM_ASM) || defined(OPUS_ARM_MAY_HAVE_NEON_INTR) # include "arm/armcpu.c" # include "celt_lpc.c" # include "pitch.c" # if defined(OPUS_ARM_MAY_HAVE_NEON_INTR) # include "arm/celt_neon_intr.c" # if defined(HAVE_ARM_NE10) # include "mdct.c" # include "arm/celt_ne10_fft.c" # include "arm/celt_ne10_mdct.c" # endif # endif # include "arm/arm_celt_map.c" #endif #ifndef M_PI #define M_PI 3.141592653 #endif int ret = 0; void check(kiss_fft_cpx * in,kiss_fft_cpx * out,int nfft,int isinverse) { int bin,k; double errpow=0,sigpow=0, snr; for (bin=0;bin1) { int k; for (k=1;k #include #include #include #include "entcode.h" #include "entenc.h" #include "entdec.h" #include #include "entenc.c" #include "entdec.c" #include "entcode.c" #ifndef M_LOG2E # define M_LOG2E 1.4426950408889634074 #endif #define DATA_SIZE 10000000 #define DATA_SIZE2 10000 int main(int _argc,char **_argv){ ec_enc enc; ec_dec dec; long nbits; long nbits2; double entropy; int ft; int ftb; int sz; int i; int ret; unsigned int sym; unsigned int seed; unsigned char *ptr; const char *env_seed; ret=0; entropy=0; if (_argc > 2) { fprintf(stderr, "Usage: %s []\n", _argv[0]); return 1; } env_seed = getenv("SEED"); if (_argc > 1) seed = atoi(_argv[1]); else if (env_seed) seed = atoi(env_seed); else seed = time(NULL); /*Testing encoding of raw bit values.*/ ptr = (unsigned char *)malloc(DATA_SIZE); ec_enc_init(&enc,ptr, DATA_SIZE); for(ft=2;ft<1024;ft++){ for(i=0;i>(rand()%11U))+1U)+10; sz=rand()/((RAND_MAX>>(rand()%9U))+1U); data=(unsigned *)malloc(sz*sizeof(*data)); tell=(unsigned *)malloc((sz+1)*sizeof(*tell)); ec_enc_init(&enc,ptr,DATA_SIZE2); zeros = rand()%13==0; tell[0]=ec_tell_frac(&enc); for(j=0;j>(rand()%9U))+1U); logp1=(unsigned *)malloc(sz*sizeof(*logp1)); data=(unsigned *)malloc(sz*sizeof(*data)); tell=(unsigned *)malloc((sz+1)*sizeof(*tell)); enc_method=(unsigned *)malloc(sz*sizeof(*enc_method)); ec_enc_init(&enc,ptr,DATA_SIZE2); tell[0]=ec_tell_frac(&enc); for(j=0;j>1)+1); logp1[j]=(rand()%15)+1; enc_method[j]=rand()/((RAND_MAX>>2)+1); switch(enc_method[j]){ case 0:{ ec_encode(&enc,data[j]?(1<>2)+1); switch(dec_method){ case 0:{ fs=ec_decode(&dec,1<=(1<=(1< #include #include "laplace.h" #define CELT_C #include "stack_alloc.h" #include "entenc.c" #include "entdec.c" #include "entcode.c" #include "laplace.c" #define DATA_SIZE 40000 int ec_laplace_get_start_freq(int decay) { opus_uint32 ft = 32768 - LAPLACE_MINP*(2*LAPLACE_NMIN+1); int fs = (ft*(16384-decay))/(16384+decay); return fs+LAPLACE_MINP; } int main(void) { int i; int ret = 0; ec_enc enc; ec_dec dec; unsigned char *ptr; int val[10000], decay[10000]; ALLOC_STACK; ptr = (unsigned char *)malloc(DATA_SIZE); ec_enc_init(&enc,ptr,DATA_SIZE); val[0] = 3; decay[0] = 6000; val[1] = 0; decay[1] = 5800; val[2] = -1; decay[2] = 5600; for (i=3;i<10000;i++) { val[i] = rand()%15-7; decay[i] = rand()%11000+5000; } for (i=0;i<10000;i++) ec_laplace_encode(&enc, &val[i], ec_laplace_get_start_freq(decay[i]), decay[i]); ec_enc_done(&enc); ec_dec_init(&dec,ec_get_buffer(&enc),ec_range_bytes(&enc)); for (i=0;i<10000;i++) { int d = ec_laplace_decode(&dec, ec_laplace_get_start_freq(decay[i]), decay[i]); if (d != val[i]) { fprintf (stderr, "Got %d instead of %d\n", d, val[i]); ret = 1; } } free(ptr); return ret; } opus-1.1.2/celt/tests/test_unit_mathops.c000066400000000000000000000167111264527674100205330ustar00rootroot00000000000000/* Copyright (c) 2008-2011 Xiph.Org Foundation, Mozilla Corporation, Gregory Maxwell Written by Jean-Marc Valin, Gregory Maxwell, and Timothy B. Terriberry */ /* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - 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. 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 OWNER 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. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #ifndef CUSTOM_MODES #define CUSTOM_MODES #endif #define CELT_C #include #include #include "mathops.c" #include "entenc.c" #include "entdec.c" #include "entcode.c" #include "bands.c" #include "quant_bands.c" #include "laplace.c" #include "vq.c" #include "cwrs.c" #include "pitch.c" #include "celt_lpc.c" #include "celt.c" #if defined(OPUS_X86_MAY_HAVE_SSE) || defined(OPUS_X86_MAY_HAVE_SSE2) || defined(OPUS_X86_MAY_HAVE_SSE4_1) # if defined(OPUS_X86_MAY_HAVE_SSE) # include "x86/pitch_sse.c" # endif # if defined(OPUS_X86_MAY_HAVE_SSE2) # include "x86/pitch_sse2.c" # endif # if defined(OPUS_X86_MAY_HAVE_SSE4_1) # include "x86/pitch_sse4_1.c" # include "x86/celt_lpc_sse.c" # endif # include "x86/x86_celt_map.c" #elif defined(OPUS_ARM_ASM) || defined(OPUS_ARM_MAY_HAVE_NEON_INTR) # include "arm/armcpu.c" # if defined(OPUS_ARM_MAY_HAVE_NEON_INTR) # include "arm/celt_neon_intr.c" # if defined(HAVE_ARM_NE10) # include "kiss_fft.c" # include "mdct.c" # include "arm/celt_ne10_fft.c" # include "arm/celt_ne10_mdct.c" # endif # endif # include "arm/arm_celt_map.c" #endif #ifdef FIXED_POINT #define WORD "%d" #else #define WORD "%f" #endif int ret = 0; void testdiv(void) { opus_int32 i; for (i=1;i<=327670;i++) { double prod; opus_val32 val; val = celt_rcp(i); #ifdef FIXED_POINT prod = (1./32768./65526.)*val*i; #else prod = val*i; #endif if (fabs(prod-1) > .00025) { fprintf (stderr, "div failed: 1/%d="WORD" (product = %f)\n", i, val, prod); ret = 1; } } } void testsqrt(void) { opus_int32 i; for (i=1;i<=1000000000;i++) { double ratio; opus_val16 val; val = celt_sqrt(i); ratio = val/sqrt(i); if (fabs(ratio - 1) > .0005 && fabs(val-sqrt(i)) > 2) { fprintf (stderr, "sqrt failed: sqrt(%d)="WORD" (ratio = %f)\n", i, val, ratio); ret = 1; } i+= i>>10; } } void testbitexactcos(void) { int i; opus_int32 min_d,max_d,last,chk; chk=max_d=0; last=min_d=32767; for(i=64;i<=16320;i++) { opus_int32 d; opus_int32 q=bitexact_cos(i); chk ^= q*i; d = last - q; if (d>max_d)max_d=d; if (dmax_d)max_d=d; if (d0.0009) { fprintf (stderr, "celt_log2 failed: fabs((1.442695040888963387*log(x))-celt_log2(x))>0.001 (x = %f, error = %f)\n", x,error); ret = 1; } } } void testexp2(void) { float x; for (x=-11.0;x<24.0;x+=0.0007) { float error = fabs(x-(1.442695040888963387*log(celt_exp2(x)))); if (error>0.0002) { fprintf (stderr, "celt_exp2 failed: fabs(x-(1.442695040888963387*log(celt_exp2(x))))>0.0005 (x = %f, error = %f)\n", x,error); ret = 1; } } } void testexp2log2(void) { float x; for (x=-11.0;x<24.0;x+=0.0007) { float error = fabs(x-(celt_log2(celt_exp2(x)))); if (error>0.001) { fprintf (stderr, "celt_log2/celt_exp2 failed: fabs(x-(celt_log2(celt_exp2(x))))>0.001 (x = %f, error = %f)\n", x,error); ret = 1; } } } #else void testlog2(void) { opus_val32 x; for (x=8;x<1073741824;x+=(x>>3)) { float error = fabs((1.442695040888963387*log(x/16384.0))-celt_log2(x)/1024.0); if (error>0.003) { fprintf (stderr, "celt_log2 failed: x = %ld, error = %f\n", (long)x,error); ret = 1; } } } void testexp2(void) { opus_val16 x; for (x=-32768;x<15360;x++) { float error1 = fabs(x/1024.0-(1.442695040888963387*log(celt_exp2(x)/65536.0))); float error2 = fabs(exp(0.6931471805599453094*x/1024.0)-celt_exp2(x)/65536.0); if (error1>0.0002&&error2>0.00004) { fprintf (stderr, "celt_exp2 failed: x = "WORD", error1 = %f, error2 = %f\n", x,error1,error2); ret = 1; } } } void testexp2log2(void) { opus_val32 x; for (x=8;x<65536;x+=(x>>3)) { float error = fabs(x-0.25*celt_exp2(celt_log2(x)))/16384; if (error>0.004) { fprintf (stderr, "celt_log2/celt_exp2 failed: fabs(x-(celt_exp2(celt_log2(x))))>0.001 (x = %ld, error = %f)\n", (long)x,error); ret = 1; } } } void testilog2(void) { opus_val32 x; for (x=1;x<=268435455;x+=127) { opus_val32 lg; opus_val32 y; lg = celt_ilog2(x); if (lg<0 || lg>=31) { printf("celt_ilog2 failed: 0<=celt_ilog2(x)<31 (x = %d, celt_ilog2(x) = %d)\n",x,lg); ret = 1; } y = 1<>1)>=y) { printf("celt_ilog2 failed: 2**celt_ilog2(x)<=x<2**(celt_ilog2(x)+1) (x = %d, 2**celt_ilog2(x) = %d)\n",x,y); ret = 1; } } } #endif int main(void) { testbitexactcos(); testbitexactlog2tan(); testdiv(); testsqrt(); testlog2(); testexp2(); testexp2log2(); #ifdef FIXED_POINT testilog2(); #endif return ret; } opus-1.1.2/celt/tests/test_unit_mdct.c000066400000000000000000000140621264527674100200040ustar00rootroot00000000000000/* Copyright (c) 2008-2011 Xiph.Org Foundation Written by Jean-Marc Valin */ /* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - 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. 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 OWNER 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. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #define SKIP_CONFIG_H #ifndef CUSTOM_MODES #define CUSTOM_MODES #endif #include #define CELT_C #include "mdct.h" #include "stack_alloc.h" #include "kiss_fft.c" #include "mdct.c" #include "mathops.c" #include "entcode.c" #if defined(OPUS_X86_MAY_HAVE_SSE2) || defined(OPUS_X86_MAY_HAVE_SSE4_1) # include "x86/x86cpu.c" #elif defined(OPUS_ARM_ASM) || defined(OPUS_ARM_MAY_HAVE_NEON_INTR) # include "arm/armcpu.c" # include "pitch.c" # include "celt_lpc.c" # if defined(OPUS_ARM_MAY_HAVE_NEON_INTR) # include "arm/celt_neon_intr.c" # if defined(HAVE_ARM_NE10) # include "arm/celt_ne10_fft.c" # include "arm/celt_ne10_mdct.c" # endif # endif # include "arm/arm_celt_map.c" #endif #ifndef M_PI #define M_PI 3.141592653 #endif int ret = 0; void check(kiss_fft_scalar * in,kiss_fft_scalar * out,int nfft,int isinverse) { int bin,k; double errpow=0,sigpow=0; double snr; for (bin=0;bin1) { int k; for (k=1;k #include #include "vq.c" #include "cwrs.c" #include "entcode.c" #include "entenc.c" #include "entdec.c" #include "mathops.c" #include "bands.h" #include "pitch.c" #include "celt_lpc.c" #include "celt.c" #include #if defined(OPUS_X86_MAY_HAVE_SSE) || defined(OPUS_X86_MAY_HAVE_SSE2) || defined(OPUS_X86_MAY_HAVE_SSE4_1) # if defined(OPUS_X86_MAY_HAVE_SSE) # include "x86/pitch_sse.c" # endif # if defined(OPUS_X86_MAY_HAVE_SSE2) # include "x86/pitch_sse2.c" # endif # if defined(OPUS_X86_MAY_HAVE_SSE4_1) # include "x86/pitch_sse4_1.c" # include "x86/celt_lpc_sse.c" # endif # include "x86/x86_celt_map.c" #elif defined(OPUS_ARM_ASM) || defined(OPUS_ARM_MAY_HAVE_NEON_INTR) # include "arm/armcpu.c" # if defined(OPUS_ARM_MAY_HAVE_NEON_INTR) # include "arm/celt_neon_intr.c" # if defined(HAVE_ARM_NE10) # include "kiss_fft.c" # include "mdct.c" # include "arm/celt_ne10_fft.c" # include "arm/celt_ne10_mdct.c" # endif # endif # include "arm/arm_celt_map.c" #endif #define MAX_SIZE 100 int ret=0; void test_rotation(int N, int K) { int i; double err = 0, ener = 0, snr, snr0; opus_val16 x0[MAX_SIZE]; opus_val16 x1[MAX_SIZE]; for (i=0;i 20) { fprintf(stderr, "FAIL!\n"); ret = 1; } } int main(void) { ALLOC_STACK; test_rotation(15, 3); test_rotation(23, 5); test_rotation(50, 3); test_rotation(80, 1); return ret; } opus-1.1.2/celt/tests/test_unit_types.c000066400000000000000000000033301264527674100202150ustar00rootroot00000000000000/* Copyright (c) 2008-2011 Xiph.Org Foundation Written by Jean-Marc Valin */ /* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - 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. 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 OWNER 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. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "opus_types.h" #include int main(void) { opus_int16 i = 1; i <<= 14; if (i>>14 != 1) { fprintf(stderr, "opus_int16 isn't 16 bits\n"); return 1; } if (sizeof(opus_int16)*2 != sizeof(opus_int32)) { fprintf(stderr, "16*2 != 32\n"); return 1; } return 0; } opus-1.1.2/celt/vq.c000066400000000000000000000263411264527674100142460ustar00rootroot00000000000000/* Copyright (c) 2007-2008 CSIRO Copyright (c) 2007-2009 Xiph.Org Foundation Written by Jean-Marc Valin */ /* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - 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. 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 OWNER 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. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "mathops.h" #include "cwrs.h" #include "vq.h" #include "arch.h" #include "os_support.h" #include "bands.h" #include "rate.h" #include "pitch.h" #ifndef OVERRIDE_vq_exp_rotation1 static void exp_rotation1(celt_norm *X, int len, int stride, opus_val16 c, opus_val16 s) { int i; opus_val16 ms; celt_norm *Xptr; Xptr = X; ms = NEG16(s); for (i=0;i=0;i--) { celt_norm x1, x2; x1 = Xptr[0]; x2 = Xptr[stride]; Xptr[stride] = EXTRACT16(PSHR32(MAC16_16(MULT16_16(c, x2), s, x1), 15)); *Xptr-- = EXTRACT16(PSHR32(MAC16_16(MULT16_16(c, x1), ms, x2), 15)); } } #endif /* OVERRIDE_vq_exp_rotation1 */ static void exp_rotation(celt_norm *X, int len, int dir, int stride, int K, int spread) { static const int SPREAD_FACTOR[3]={15,10,5}; int i; opus_val16 c, s; opus_val16 gain, theta; int stride2=0; int factor; if (2*K>=len || spread==SPREAD_NONE) return; factor = SPREAD_FACTOR[spread-1]; gain = celt_div((opus_val32)MULT16_16(Q15_ONE,len),(opus_val32)(len+factor*K)); theta = HALF16(MULT16_16_Q15(gain,gain)); c = celt_cos_norm(EXTEND32(theta)); s = celt_cos_norm(EXTEND32(SUB16(Q15ONE,theta))); /* sin(theta) */ if (len>=8*stride) { stride2 = 1; /* This is just a simple (equivalent) way of computing sqrt(len/stride) with rounding. It's basically incrementing long as (stride2+0.5)^2 < len/stride. */ while ((stride2*stride2+stride2)*stride + (stride>>2) < len) stride2++; } /*NOTE: As a minor optimization, we could be passing around log2(B), not B, for both this and for extract_collapse_mask().*/ len = celt_udiv(len, stride); for (i=0;i>1; #endif t = VSHR32(Ryy, 2*(k-7)); g = MULT16_16_P15(celt_rsqrt_norm(t),gain); i=0; do X[i] = EXTRACT16(PSHR32(MULT16_16(g, iy[i]), k+1)); while (++i < N); } static unsigned extract_collapse_mask(int *iy, int N, int B) { unsigned collapse_mask; int N0; int i; if (B<=1) return 1; /*NOTE: As a minor optimization, we could be passing around log2(B), not B, for both this and for exp_rotation().*/ N0 = celt_udiv(N, B); collapse_mask = 0; i=0; do { int j; unsigned tmp=0; j=0; do { tmp |= iy[i*N0+j]; } while (++j0, "alg_quant() needs at least one pulse"); celt_assert2(N>1, "alg_quant() needs at least two dimensions"); ALLOC(y, N, celt_norm); ALLOC(iy, N, int); ALLOC(signx, N, opus_val16); exp_rotation(X, N, 1, B, K, spread); /* Get rid of the sign */ sum = 0; j=0; do { if (X[j]>0) signx[j]=1; else { signx[j]=-1; X[j]=-X[j]; } iy[j] = 0; y[j] = 0; } while (++j (N>>1)) { opus_val16 rcp; j=0; do { sum += X[j]; } while (++j EPSILON && sum < 64)) #endif { X[0] = QCONST16(1.f,14); j=1; do X[j]=0; while (++j=1, "Allocated too many pulses in the quick pass"); /* This should never happen, but just in case it does (e.g. on silence) we fill the first bin with pulses. */ #ifdef FIXED_POINT_DEBUG celt_assert2(pulsesLeft<=N+3, "Not enough pulses in the quick pass"); #endif if (pulsesLeft > N+3) { opus_val16 tmp = (opus_val16)pulsesLeft; yy = MAC16_16(yy, tmp, tmp); yy = MAC16_16(yy, tmp, y[0]); iy[0] += pulsesLeft; pulsesLeft=0; } s = 1; for (i=0;i= best_num/best_den, but that way we can do it without any division */ /* OPT: Make sure to use conditional moves here */ if (MULT16_16(best_den, Rxy) > MULT16_16(Ryy, best_num)) { best_den = Ryy; best_num = Rxy; best_id = j; } } while (++j0, "alg_unquant() needs at least one pulse"); celt_assert2(N>1, "alg_unquant() needs at least two dimensions"); ALLOC(iy, N, int); Ryy = decode_pulses(iy, N, K, dec); normalise_residual(iy, X, N, Ryy, gain); exp_rotation(X, N, -1, B, K, spread); collapse_mask = extract_collapse_mask(iy, N, B); RESTORE_STACK; return collapse_mask; } #ifndef OVERRIDE_renormalise_vector void renormalise_vector(celt_norm *X, int N, opus_val16 gain, int arch) { int i; #ifdef FIXED_POINT int k; #endif opus_val32 E; opus_val16 g; opus_val32 t; celt_norm *xptr; E = EPSILON + celt_inner_prod(X, X, N, arch); #ifdef FIXED_POINT k = celt_ilog2(E)>>1; #endif t = VSHR32(E, 2*(k-7)); g = MULT16_16_P15(celt_rsqrt_norm(t),gain); xptr = X; for (i=0;i #include #include #include "celt_lpc.h" #include "stack_alloc.h" #include "mathops.h" #include "pitch.h" #include "x86cpu.h" #if defined(FIXED_POINT) void celt_fir_sse4_1(const opus_val16 *_x, const opus_val16 *num, opus_val16 *_y, int N, int ord, opus_val16 *mem, int arch) { int i,j; VARDECL(opus_val16, rnum); VARDECL(opus_val16, x); __m128i vecNoA; opus_int32 noA ; SAVE_STACK; ALLOC(rnum, ord, opus_val16); ALLOC(x, N+ord, opus_val16); for(i=0;i> 1; vecNoA = _mm_set_epi32(noA, noA, noA, noA); for (i=0;i #include "arch.h" void xcorr_kernel_sse(const opus_val16 *x, const opus_val16 *y, opus_val32 sum[4], int len) { int j; __m128 xsum1, xsum2; xsum1 = _mm_loadu_ps(sum); xsum2 = _mm_setzero_ps(); for (j = 0; j < len-3; j += 4) { __m128 x0 = _mm_loadu_ps(x+j); __m128 yj = _mm_loadu_ps(y+j); __m128 y3 = _mm_loadu_ps(y+j+3); xsum1 = _mm_add_ps(xsum1,_mm_mul_ps(_mm_shuffle_ps(x0,x0,0x00),yj)); xsum2 = _mm_add_ps(xsum2,_mm_mul_ps(_mm_shuffle_ps(x0,x0,0x55), _mm_shuffle_ps(yj,y3,0x49))); xsum1 = _mm_add_ps(xsum1,_mm_mul_ps(_mm_shuffle_ps(x0,x0,0xaa), _mm_shuffle_ps(yj,y3,0x9e))); xsum2 = _mm_add_ps(xsum2,_mm_mul_ps(_mm_shuffle_ps(x0,x0,0xff),y3)); } if (j < len) { xsum1 = _mm_add_ps(xsum1,_mm_mul_ps(_mm_load1_ps(x+j),_mm_loadu_ps(y+j))); if (++j < len) { xsum2 = _mm_add_ps(xsum2,_mm_mul_ps(_mm_load1_ps(x+j),_mm_loadu_ps(y+j))); if (++j < len) { xsum1 = _mm_add_ps(xsum1,_mm_mul_ps(_mm_load1_ps(x+j),_mm_loadu_ps(y+j))); } } } _mm_storeu_ps(sum,_mm_add_ps(xsum1,xsum2)); } void dual_inner_prod_sse(const opus_val16 *x, const opus_val16 *y01, const opus_val16 *y02, int N, opus_val32 *xy1, opus_val32 *xy2) { int i; __m128 xsum1, xsum2; xsum1 = _mm_setzero_ps(); xsum2 = _mm_setzero_ps(); for (i=0;i #include #include "macros.h" #include "celt_lpc.h" #include "stack_alloc.h" #include "mathops.h" #include "pitch.h" #if defined(OPUS_X86_MAY_HAVE_SSE2) && defined(FIXED_POINT) opus_val32 celt_inner_prod_sse2(const opus_val16 *x, const opus_val16 *y, int N) { opus_int i, dataSize16; opus_int32 sum; __m128i inVec1_76543210, inVec1_FEDCBA98, acc1; __m128i inVec2_76543210, inVec2_FEDCBA98, acc2; sum = 0; dataSize16 = N & ~15; acc1 = _mm_setzero_si128(); acc2 = _mm_setzero_si128(); for (i=0;i= 8) { inVec1_76543210 = _mm_loadu_si128((__m128i *)(&x[i + 0])); inVec2_76543210 = _mm_loadu_si128((__m128i *)(&y[i + 0])); inVec1_76543210 = _mm_madd_epi16(inVec1_76543210, inVec2_76543210); acc1 = _mm_add_epi32(acc1, inVec1_76543210); i += 8; } acc1 = _mm_add_epi32(acc1, _mm_unpackhi_epi64( acc1, acc1)); acc1 = _mm_add_epi32(acc1, _mm_shufflelo_epi16( acc1, 0x0E)); sum += _mm_cvtsi128_si32(acc1); for (;i #include #include "macros.h" #include "celt_lpc.h" #include "stack_alloc.h" #include "mathops.h" #include "pitch.h" #if defined(OPUS_X86_MAY_HAVE_SSE4_1) && defined(FIXED_POINT) #include #include "x86cpu.h" opus_val32 celt_inner_prod_sse4_1(const opus_val16 *x, const opus_val16 *y, int N) { opus_int i, dataSize16; opus_int32 sum; __m128i inVec1_76543210, inVec1_FEDCBA98, acc1; __m128i inVec2_76543210, inVec2_FEDCBA98, acc2; __m128i inVec1_3210, inVec2_3210; sum = 0; dataSize16 = N & ~15; acc1 = _mm_setzero_si128(); acc2 = _mm_setzero_si128(); for (i=0;i= 8) { inVec1_76543210 = _mm_loadu_si128((__m128i *)(&x[i + 0])); inVec2_76543210 = _mm_loadu_si128((__m128i *)(&y[i + 0])); inVec1_76543210 = _mm_madd_epi16(inVec1_76543210, inVec2_76543210); acc1 = _mm_add_epi32(acc1, inVec1_76543210); i += 8; } if (N - i >= 4) { inVec1_3210 = OP_CVTEPI16_EPI32_M64(&x[i + 0]); inVec2_3210 = OP_CVTEPI16_EPI32_M64(&y[i + 0]); inVec1_3210 = _mm_mullo_epi32(inVec1_3210, inVec2_3210); acc1 = _mm_add_epi32(acc1, inVec1_3210); i += 4; } acc1 = _mm_add_epi32(acc1, _mm_unpackhi_epi64(acc1, acc1)); acc1 = _mm_add_epi32(acc1, _mm_shufflelo_epi16(acc1, 0x0E)); sum += _mm_cvtsi128_si32(acc1); for (;i= 3); sum0 = _mm_setzero_si128(); sum1 = _mm_setzero_si128(); sum2 = _mm_setzero_si128(); sum3 = _mm_setzero_si128(); for (j=0;j<(len-7);j+=8) { vecX = _mm_loadu_si128((__m128i *)(&x[j + 0])); vecY0 = _mm_loadu_si128((__m128i *)(&y[j + 0])); vecY1 = _mm_loadu_si128((__m128i *)(&y[j + 1])); vecY2 = _mm_loadu_si128((__m128i *)(&y[j + 2])); vecY3 = _mm_loadu_si128((__m128i *)(&y[j + 3])); sum0 = _mm_add_epi32(sum0, _mm_madd_epi16(vecX, vecY0)); sum1 = _mm_add_epi32(sum1, _mm_madd_epi16(vecX, vecY1)); sum2 = _mm_add_epi32(sum2, _mm_madd_epi16(vecX, vecY2)); sum3 = _mm_add_epi32(sum3, _mm_madd_epi16(vecX, vecY3)); } sum0 = _mm_add_epi32(sum0, _mm_unpackhi_epi64( sum0, sum0)); sum0 = _mm_add_epi32(sum0, _mm_shufflelo_epi16( sum0, 0x0E)); sum1 = _mm_add_epi32(sum1, _mm_unpackhi_epi64( sum1, sum1)); sum1 = _mm_add_epi32(sum1, _mm_shufflelo_epi16( sum1, 0x0E)); sum2 = _mm_add_epi32(sum2, _mm_unpackhi_epi64( sum2, sum2)); sum2 = _mm_add_epi32(sum2, _mm_shufflelo_epi16( sum2, 0x0E)); sum3 = _mm_add_epi32(sum3, _mm_unpackhi_epi64( sum3, sum3)); sum3 = _mm_add_epi32(sum3, _mm_shufflelo_epi16( sum3, 0x0E)); vecSum = _mm_unpacklo_epi64(_mm_unpacklo_epi32(sum0, sum1), _mm_unpacklo_epi32(sum2, sum3)); for (;j<(len-3);j+=4) { vecX = OP_CVTEPI16_EPI32_M64(&x[j + 0]); vecX0 = _mm_shuffle_epi32(vecX, 0x00); vecX1 = _mm_shuffle_epi32(vecX, 0x55); vecX2 = _mm_shuffle_epi32(vecX, 0xaa); vecX3 = _mm_shuffle_epi32(vecX, 0xff); vecY0 = OP_CVTEPI16_EPI32_M64(&y[j + 0]); vecY1 = OP_CVTEPI16_EPI32_M64(&y[j + 1]); vecY2 = OP_CVTEPI16_EPI32_M64(&y[j + 2]); vecY3 = OP_CVTEPI16_EPI32_M64(&y[j + 3]); sum0 = _mm_mullo_epi32(vecX0, vecY0); sum1 = _mm_mullo_epi32(vecX1, vecY1); sum2 = _mm_mullo_epi32(vecX2, vecY2); sum3 = _mm_mullo_epi32(vecX3, vecY3); sum0 = _mm_add_epi32(sum0, sum1); sum2 = _mm_add_epi32(sum2, sum3); vecSum = _mm_add_epi32(vecSum, sum0); vecSum = _mm_add_epi32(vecSum, sum2); } for (;j static _inline void cpuid(unsigned int CPUInfo[4], unsigned int InfoType) { __cpuid((int*)CPUInfo, InfoType); } #else #if defined(CPU_INFO_BY_C) #include #endif static void cpuid(unsigned int CPUInfo[4], unsigned int InfoType) { #if defined(CPU_INFO_BY_ASM) #if defined(__i386__) && defined(__PIC__) /* %ebx is PIC register in 32-bit, so mustn't clobber it. */ __asm__ __volatile__ ( "xchg %%ebx, %1\n" "cpuid\n" "xchg %%ebx, %1\n": "=a" (CPUInfo[0]), "=r" (CPUInfo[1]), "=c" (CPUInfo[2]), "=d" (CPUInfo[3]) : "0" (InfoType) ); #else __asm__ __volatile__ ( "cpuid": "=a" (CPUInfo[0]), "=b" (CPUInfo[1]), "=c" (CPUInfo[2]), "=d" (CPUInfo[3]) : "0" (InfoType) ); #endif #elif defined(CPU_INFO_BY_C) __get_cpuid(InfoType, &(CPUInfo[0]), &(CPUInfo[1]), &(CPUInfo[2]), &(CPUInfo[3])); #endif } #endif typedef struct CPU_Feature{ /* SIMD: 128-bit */ int HW_SSE; int HW_SSE2; int HW_SSE41; /* SIMD: 256-bit */ int HW_AVX; } CPU_Feature; static void opus_cpu_feature_check(CPU_Feature *cpu_feature) { unsigned int info[4] = {0}; unsigned int nIds = 0; cpuid(info, 0); nIds = info[0]; if (nIds >= 1){ cpuid(info, 1); cpu_feature->HW_SSE = (info[3] & (1 << 25)) != 0; cpu_feature->HW_SSE2 = (info[3] & (1 << 26)) != 0; cpu_feature->HW_SSE41 = (info[2] & (1 << 19)) != 0; cpu_feature->HW_AVX = (info[2] & (1 << 28)) != 0; } else { cpu_feature->HW_SSE = 0; cpu_feature->HW_SSE2 = 0; cpu_feature->HW_SSE41 = 0; cpu_feature->HW_AVX = 0; } } int opus_select_arch(void) { CPU_Feature cpu_feature; int arch; opus_cpu_feature_check(&cpu_feature); arch = 0; if (!cpu_feature.HW_SSE) { return arch; } arch++; if (!cpu_feature.HW_SSE2) { return arch; } arch++; if (!cpu_feature.HW_SSE41) { return arch; } arch++; if (!cpu_feature.HW_AVX) { return arch; } arch++; return arch; } #endif opus-1.1.2/celt/x86/x86cpu.h000066400000000000000000000067411264527674100154110ustar00rootroot00000000000000/* Copyright (c) 2014, Cisco Systems, INC Written by XiangMingZhu WeiZhou MinPeng YanWang Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - 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. 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 OWNER 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. */ #if !defined(X86CPU_H) # define X86CPU_H # if defined(OPUS_X86_MAY_HAVE_SSE) # define MAY_HAVE_SSE(name) name ## _sse # else # define MAY_HAVE_SSE(name) name ## _c # endif # if defined(OPUS_X86_MAY_HAVE_SSE2) # define MAY_HAVE_SSE2(name) name ## _sse2 # else # define MAY_HAVE_SSE2(name) name ## _c # endif # if defined(OPUS_X86_MAY_HAVE_SSE4_1) # define MAY_HAVE_SSE4_1(name) name ## _sse4_1 # else # define MAY_HAVE_SSE4_1(name) name ## _c # endif # if defined(OPUS_X86_MAY_HAVE_AVX) # define MAY_HAVE_AVX(name) name ## _avx # else # define MAY_HAVE_AVX(name) name ## _c # endif # if defined(OPUS_HAVE_RTCD) int opus_select_arch(void); # endif /*gcc appears to emit MOVDQA's to load the argument of an _mm_cvtepi8_epi32() or _mm_cvtepi16_epi32() when optimizations are disabled, even though the actual PMOVSXWD instruction takes an m32 or m64. Unlike a normal memory reference, these require 16-byte alignment and load a full 16 bytes (instead of 4 or 8), possibly reading out of bounds. We can insert an explicit MOVD or MOVQ using _mm_cvtsi32_si128() or _mm_loadl_epi64(), which should have the same semantics as an m32 or m64 reference in the PMOVSXWD instruction itself, but gcc is not smart enough to optimize this out when optimizations ARE enabled. Clang, in contrast, requires us to do this always for _mm_cvtepi8_epi32 (which is fair, since technically the compiler is always allowed to do the dereference before invoking the function implementing the intrinsic). However, it is smart enough to eliminate the extra MOVD instruction. For _mm_cvtepi16_epi32, it does the right thing, though does *not* optimize out the extra MOVQ if it's specified explicitly */ # if defined(__clang__) || !defined(__OPTIMIZE__) # define OP_CVTEPI8_EPI32_M32(x) \ (_mm_cvtepi8_epi32(_mm_cvtsi32_si128(*(int *)(x)))) # else # define OP_CVTEPI8_EPI32_M32(x) \ (_mm_cvtepi8_epi32(*(__m128i *)(x))) #endif # if !defined(__OPTIMIZE__) # define OP_CVTEPI16_EPI32_M64(x) \ (_mm_cvtepi16_epi32(_mm_loadl_epi64((__m128i *)(x)))) # else # define OP_CVTEPI16_EPI32_M64(x) \ (_mm_cvtepi16_epi32(*(__m128i *)(x))) # endif #endif opus-1.1.2/celt_headers.mk000066400000000000000000000021121264527674100154660ustar00rootroot00000000000000CELT_HEAD = \ celt/arch.h \ celt/bands.h \ celt/celt.h \ celt/cpu_support.h \ include/opus_types.h \ include/opus_defines.h \ include/opus_custom.h \ celt/cwrs.h \ celt/ecintrin.h \ celt/entcode.h \ celt/entdec.h \ celt/entenc.h \ celt/fixed_debug.h \ celt/fixed_generic.h \ celt/float_cast.h \ celt/_kiss_fft_guts.h \ celt/kiss_fft.h \ celt/laplace.h \ celt/mathops.h \ celt/mdct.h \ celt/mfrngcod.h \ celt/modes.h \ celt/os_support.h \ celt/pitch.h \ celt/celt_lpc.h \ celt/x86/celt_lpc_sse.h \ celt/quant_bands.h \ celt/rate.h \ celt/stack_alloc.h \ celt/vq.h \ celt/static_modes_float.h \ celt/static_modes_fixed.h \ celt/static_modes_float_arm_ne10.h \ celt/static_modes_fixed_arm_ne10.h \ celt/arm/armcpu.h \ celt/arm/fixed_armv4.h \ celt/arm/fixed_armv5e.h \ celt/arm/kiss_fft_armv4.h \ celt/arm/kiss_fft_armv5e.h \ celt/arm/pitch_arm.h \ celt/arm/fft_arm.h \ celt/arm/mdct_arm.h \ celt/mips/celt_mipsr1.h \ celt/mips/fixed_generic_mipsr1.h \ celt/mips/kiss_fft_mipsr1.h \ celt/mips/mdct_mipsr1.h \ celt/mips/pitch_mipsr1.h \ celt/mips/vq_mipsr1.h \ celt/x86/pitch_sse.h \ celt/x86/x86cpu.h opus-1.1.2/celt_sources.mk000066400000000000000000000014711264527674100155450ustar00rootroot00000000000000CELT_SOURCES = celt/bands.c \ celt/celt.c \ celt/celt_encoder.c \ celt/celt_decoder.c \ celt/cwrs.c \ celt/entcode.c \ celt/entdec.c \ celt/entenc.c \ celt/kiss_fft.c \ celt/laplace.c \ celt/mathops.c \ celt/mdct.c \ celt/modes.c \ celt/pitch.c \ celt/celt_lpc.c \ celt/quant_bands.c \ celt/rate.c \ celt/vq.c CELT_SOURCES_SSE = celt/x86/x86cpu.c \ celt/x86/x86_celt_map.c \ celt/x86/pitch_sse.c CELT_SOURCES_SSE2 = celt/x86/pitch_sse2.c CELT_SOURCES_SSE4_1 = celt/x86/celt_lpc_sse.c \ celt/x86/pitch_sse4_1.c CELT_SOURCES_ARM = \ celt/arm/armcpu.c \ celt/arm/arm_celt_map.c CELT_SOURCES_ARM_ASM = \ celt/arm/celt_pitch_xcorr_arm.s CELT_AM_SOURCES_ARM_ASM = \ celt/arm/armopts.s.in CELT_SOURCES_ARM_NEON_INTR = \ celt/arm/celt_neon_intr.c CELT_SOURCES_ARM_NE10= \ celt/arm/celt_ne10_fft.c \ celt/arm/celt_ne10_mdct.c opus-1.1.2/compile000077500000000000000000000162451264527674100141050ustar00rootroot00000000000000#! /bin/sh # Wrapper for compilers which do not understand '-c -o'. scriptversion=2012-10-14.11; # UTC # Copyright (C) 1999-2013 Free Software Foundation, Inc. # Written by Tom Tromey . # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # This file is maintained in Automake, please report # bugs to or send patches to # . nl=' ' # We need space, tab and new line, in precisely that order. Quoting is # there to prevent tools from complaining about whitespace usage. IFS=" "" $nl" file_conv= # func_file_conv build_file lazy # Convert a $build file to $host form and store it in $file # Currently only supports Windows hosts. If the determined conversion # type is listed in (the comma separated) LAZY, no conversion will # take place. func_file_conv () { file=$1 case $file in / | /[!/]*) # absolute file, and not a UNC file if test -z "$file_conv"; then # lazily determine how to convert abs files case `uname -s` in MINGW*) file_conv=mingw ;; CYGWIN*) file_conv=cygwin ;; *) file_conv=wine ;; esac fi case $file_conv/,$2, in *,$file_conv,*) ;; mingw/*) file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` ;; cygwin/*) file=`cygpath -m "$file" || echo "$file"` ;; wine/*) file=`winepath -w "$file" || echo "$file"` ;; esac ;; esac } # func_cl_dashL linkdir # Make cl look for libraries in LINKDIR func_cl_dashL () { func_file_conv "$1" if test -z "$lib_path"; then lib_path=$file else lib_path="$lib_path;$file" fi linker_opts="$linker_opts -LIBPATH:$file" } # func_cl_dashl library # Do a library search-path lookup for cl func_cl_dashl () { lib=$1 found=no save_IFS=$IFS IFS=';' for dir in $lib_path $LIB do IFS=$save_IFS if $shared && test -f "$dir/$lib.dll.lib"; then found=yes lib=$dir/$lib.dll.lib break fi if test -f "$dir/$lib.lib"; then found=yes lib=$dir/$lib.lib break fi if test -f "$dir/lib$lib.a"; then found=yes lib=$dir/lib$lib.a break fi done IFS=$save_IFS if test "$found" != yes; then lib=$lib.lib fi } # func_cl_wrapper cl arg... # Adjust compile command to suit cl func_cl_wrapper () { # Assume a capable shell lib_path= shared=: linker_opts= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as 'compile cc -o foo foo.c'. eat=1 case $2 in *.o | *.[oO][bB][jJ]) func_file_conv "$2" set x "$@" -Fo"$file" shift ;; *) func_file_conv "$2" set x "$@" -Fe"$file" shift ;; esac ;; -I) eat=1 func_file_conv "$2" mingw set x "$@" -I"$file" shift ;; -I*) func_file_conv "${1#-I}" mingw set x "$@" -I"$file" shift ;; -l) eat=1 func_cl_dashl "$2" set x "$@" "$lib" shift ;; -l*) func_cl_dashl "${1#-l}" set x "$@" "$lib" shift ;; -L) eat=1 func_cl_dashL "$2" ;; -L*) func_cl_dashL "${1#-L}" ;; -static) shared=false ;; -Wl,*) arg=${1#-Wl,} save_ifs="$IFS"; IFS=',' for flag in $arg; do IFS="$save_ifs" linker_opts="$linker_opts $flag" done IFS="$save_ifs" ;; -Xlinker) eat=1 linker_opts="$linker_opts $2" ;; -*) set x "$@" "$1" shift ;; *.cc | *.CC | *.cxx | *.CXX | *.[cC]++) func_file_conv "$1" set x "$@" -Tp"$file" shift ;; *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO]) func_file_conv "$1" mingw set x "$@" "$file" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -n "$linker_opts"; then linker_opts="-link$linker_opts" fi exec "$@" $linker_opts exit 1 } eat= case $1 in '') echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: compile [--help] [--version] PROGRAM [ARGS] Wrapper for compilers which do not understand '-c -o'. Remove '-o dest.o' from ARGS, run PROGRAM with the remaining arguments, and rename the output as expected. If you are trying to build a whole package this is not the right script to run: please start by reading the file 'INSTALL'. Report bugs to . EOF exit $? ;; -v | --v*) echo "compile $scriptversion" exit $? ;; cl | *[/\\]cl | cl.exe | *[/\\]cl.exe ) func_cl_wrapper "$@" # Doesn't return... ;; esac ofile= cfile= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as 'compile cc -o foo foo.c'. # So we strip '-o arg' only if arg is an object. eat=1 case $2 in *.o | *.obj) ofile=$2 ;; *) set x "$@" -o "$2" shift ;; esac ;; *.c) cfile=$1 set x "$@" "$1" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -z "$ofile" || test -z "$cfile"; then # If no '-o' option was seen then we might have been invoked from a # pattern rule where we don't need one. That is ok -- this is a # normal compilation that the losing compiler can handle. If no # '.c' file was seen then we are probably linking. That is also # ok. exec "$@" fi # Name of file we expect compiler to create. cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` # Create the lock directory. # Note: use '[/\\:.-]' here to ensure that we don't use the same name # that we are using for the .o file. Also, base the name on the expected # object file name, since that is what matters with a parallel build. lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d while true; do if mkdir "$lockdir" >/dev/null 2>&1; then break fi sleep 1 done # FIXME: race condition here if user kills between mkdir and trap. trap "rmdir '$lockdir'; exit 1" 1 2 15 # Run the compile. "$@" ret=$? if test -f "$cofile"; then test "$cofile" = "$ofile" || mv "$cofile" "$ofile" elif test -f "${cofile}bj"; then test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" fi rmdir "$lockdir" exit $ret # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: opus-1.1.2/config.guess000077500000000000000000001235501264527674100150450ustar00rootroot00000000000000#! /bin/sh # Attempt to guess a canonical system name. # Copyright 1992-2014 Free Software Foundation, Inc. timestamp='2014-03-23' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that # program. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # # Originally written by Per Bothner. # # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD # # Please send patches with a ChangeLog entry to config-patches@gnu.org. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright 1992-2014 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown case "${UNAME_SYSTEM}" in Linux|GNU|GNU/*) # If the system lacks a compiler, then just pick glibc. # We could probably try harder. LIBC=gnu eval $set_cc_for_build cat <<-EOF > $dummy.c #include #if defined(__UCLIBC__) LIBC=uclibc #elif defined(__dietlibc__) LIBC=dietlibc #else LIBC=gnu #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` ;; esac # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "${UNAME_VERSION}" in Debian*) release='-gnu' ;; *) release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit ;; *:Bitrig:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; *:SolidBSD:*:*) echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} exit ;; macppc:MirBSD:*:*) echo powerpc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE="alpha" ;; "EV4.5 (21064)") UNAME_MACHINE="alpha" ;; "LCA4 (21066/21068)") UNAME_MACHINE="alpha" ;; "EV5 (21164)") UNAME_MACHINE="alphaev5" ;; "EV5.6 (21164A)") UNAME_MACHINE="alphaev56" ;; "EV5.6 (21164PC)") UNAME_MACHINE="alphapca56" ;; "EV5.7 (21164PC)") UNAME_MACHINE="alphapca57" ;; "EV6 (21264)") UNAME_MACHINE="alphaev6" ;; "EV6.7 (21264A)") UNAME_MACHINE="alphaev67" ;; "EV6.8CB (21264C)") UNAME_MACHINE="alphaev68" ;; "EV6.8AL (21264B)") UNAME_MACHINE="alphaev68" ;; "EV6.8CX (21264D)") UNAME_MACHINE="alphaev68" ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE="alphaev69" ;; "EV7 (21364)") UNAME_MACHINE="alphaev7" ;; "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` # Reset EXIT trap before exiting to avoid spurious non-zero exit code. exitcode=$? trap '' 0 exit $exitcode ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit ;; *:OS400:*:*) echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; arm*:riscos:*:*|arm*:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; s390x:SunOS:*:*) echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) echo i386-pc-auroraux${UNAME_RELEASE} exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) eval $set_cc_for_build SUN_ARCH="i386" # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then SUN_ARCH="x86_64" fi fi echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`$dummy $dummyarg` && { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos${UNAME_RELEASE} exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` then echo "$SYSTEM_NAME" else echo rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit ;; *:AIX:*:[4567]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ ${HP_ARCH} = "hppa2.0w" ] then eval $set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # generating 64-bit code. GNU and HP use different nomenclature: # # $ CC_FOR_BUILD=cc ./config.guess # => hppa2.0w-hp-hpux11.23 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | grep -q __LP64__ then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) UNAME_PROCESSOR=`/usr/bin/uname -p` case ${UNAME_PROCESSOR} in amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; *:MINGW64*:*) echo ${UNAME_MACHINE}-pc-mingw64 exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; *:MSYS*:*) echo ${UNAME_MACHINE}-pc-msys exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; *:Interix*:*) case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; authenticamd | genuineintel | EM64T) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; IA64) echo ia64-unknown-interix${UNAME_RELEASE} exit ;; esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; 8664:Windows_NT:*) echo x86_64-pc-mks exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; aarch64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 if test "$?" = 0 ; then LIBC="gnulibc1" ; fi echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; arc:Linux:*:* | arceb:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then echo ${UNAME_MACHINE}-unknown-linux-${LIBC} else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi else echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf fi fi exit ;; avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; cris:Linux:*:*) echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; crisv32:Linux:*:*) echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; frv:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; hexagon:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:Linux:*:*) echo ${UNAME_MACHINE}-pc-linux-${LIBC} exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef ${UNAME_MACHINE} #undef ${UNAME_MACHINE}el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=${UNAME_MACHINE}el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=${UNAME_MACHINE} #else CPU= #endif #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } ;; openrisc*:Linux:*:*) echo or1k-unknown-linux-${LIBC} exit ;; or32:Linux:*:* | or1k*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; padre:Linux:*:*) echo sparc-unknown-linux-${LIBC} exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-${LIBC} exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; *) echo hppa-unknown-linux-${LIBC} ;; esac exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-${LIBC} exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-${LIBC} exit ;; ppc64le:Linux:*:*) echo powerpc64le-unknown-linux-${LIBC} exit ;; ppcle:Linux:*:*) echo powerpcle-unknown-linux-${LIBC} exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux-${LIBC} exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; tile*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-${LIBC} exit ;; x86_64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit ;; i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i586. # Note: whatever this is, it MUST be the same as what config.sub # prints for the "djgpp" host, or else GDB configury will decide that # this is a cross-build. echo i586-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; paragon:*:*:*) echo i860-intel-osf1 exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; NCR*:*:4.2:* | MPRAS*:*:4.2:*) OS_REL='.3' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo ${UNAME_MACHINE}-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; BePC:Haiku:*:*) # Haiku running on Intel PC compatible. echo i586-pc-haiku exit ;; x86_64:Haiku:*:*) echo x86_64-unknown-haiku exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; SX-7:SUPER-UX:*:*) echo sx7-nec-superux${UNAME_RELEASE} exit ;; SX-8:SUPER-UX:*:*) echo sx8-nec-superux${UNAME_RELEASE} exit ;; SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux${UNAME_RELEASE} exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown eval $set_cc_for_build if test "$UNAME_PROCESSOR" = unknown ; then UNAME_PROCESSOR=powerpc fi if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then case $UNAME_PROCESSOR in i386) UNAME_PROCESSOR=x86_64 ;; powerpc) UNAME_PROCESSOR=powerpc64 ;; esac fi fi elif test "$UNAME_PROCESSOR" = i386 ; then # Avoid executing cc on OS X 10.9, as it ships with a stub # that puts up a graphical alert prompting to install # developer tools. Any system running Mac OS X 10.7 or # later (Darwin 11 and later) is required to have a 64-bit # processor. This is not true of the ARM version of Darwin # that Apple uses in portable devices. UNAME_PROCESSOR=x86_64 fi echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; NEO-?:NONSTOP_KERNEL:*:*) echo neo-tandem-nsk${UNAME_RELEASE} exit ;; NSE-*:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit ;; *:ITS:*:*) echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit ;; i*86:skyos:*:*) echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' exit ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos exit ;; i*86:AROS:*:*) echo ${UNAME_MACHINE}-pc-aros exit ;; x86_64:VMkernel:*:*) echo ${UNAME_MACHINE}-unknown-esx exit ;; esac cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: opus-1.1.2/config.h.in000066400000000000000000000121431264527674100145430ustar00rootroot00000000000000/* config.h.in. Generated from configure.ac by autoheader. */ /* Get CPU Info by asm method */ #undef CPU_INFO_BY_ASM /* Get CPU Info by c method */ #undef CPU_INFO_BY_C /* Custom modes */ #undef CUSTOM_MODES /* Do not build the float API */ #undef DISABLE_FLOAT_API /* Assertions */ #undef ENABLE_ASSERTIONS /* Debug fixed-point implementation */ #undef FIXED_DEBUG /* Compile as fixed-point (for machines without a fast enough FPU) */ #undef FIXED_POINT /* Float approximations */ #undef FLOAT_APPROX /* Fuzzing */ #undef FUZZING /* Define to 1 if you have the header file. */ #undef HAVE_ALLOCA_H /* NE10 library is installed on host. Make sure it is on target! */ #undef HAVE_ARM_NE10 /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the `lrint' function. */ #undef HAVE_LRINT /* Define to 1 if you have the `lrintf' function. */ #undef HAVE_LRINTF /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define to 1 if you have the `__malloc_hook' function. */ #undef HAVE___MALLOC_HOOK /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #undef LT_OBJDIR /* Make use of ARM asm optimization */ #undef OPUS_ARM_ASM /* Use generic ARMv4 inline asm optimizations */ #undef OPUS_ARM_INLINE_ASM /* Use ARMv5E inline asm optimizations */ #undef OPUS_ARM_INLINE_EDSP /* Use ARMv6 inline asm optimizations */ #undef OPUS_ARM_INLINE_MEDIA /* Use ARM NEON inline asm optimizations */ #undef OPUS_ARM_INLINE_NEON /* Define if assembler supports EDSP instructions */ #undef OPUS_ARM_MAY_HAVE_EDSP /* Define if assembler supports ARMv6 media instructions */ #undef OPUS_ARM_MAY_HAVE_MEDIA /* Define if compiler supports NEON instructions */ #undef OPUS_ARM_MAY_HAVE_NEON /* Compiler supports ARMv7 Neon Intrinsics */ #undef OPUS_ARM_MAY_HAVE_NEON_INTR /* Define if binary requires EDSP instruction support */ #undef OPUS_ARM_PRESUME_EDSP /* Define if binary requires ARMv6 media instruction support */ #undef OPUS_ARM_PRESUME_MEDIA /* Define if binary requires NEON instruction support */ #undef OPUS_ARM_PRESUME_NEON /* Define if binary requires NEON intrinsics support */ #undef OPUS_ARM_PRESUME_NEON_INTR /* This is a build of OPUS */ #undef OPUS_BUILD /* Use run-time CPU capabilities detection */ #undef OPUS_HAVE_RTCD /* Compiler supports X86 AVX Intrinsics */ #undef OPUS_X86_MAY_HAVE_AVX /* Compiler supports X86 SSE Intrinsics */ #undef OPUS_X86_MAY_HAVE_SSE /* Compiler supports X86 SSE2 Intrinsics */ #undef OPUS_X86_MAY_HAVE_SSE2 /* Compiler supports X86 SSE4.1 Intrinsics */ #undef OPUS_X86_MAY_HAVE_SSE4_1 /* Define if binary requires AVX intrinsics support */ #undef OPUS_X86_PRESUME_AVX /* Define if binary requires SSE intrinsics support */ #undef OPUS_X86_PRESUME_SSE /* Define if binary requires SSE2 intrinsics support */ #undef OPUS_X86_PRESUME_SSE2 /* Define if binary requires SSE4.1 intrinsics support */ #undef OPUS_X86_PRESUME_SSE4_1 /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the home page for this package. */ #undef PACKAGE_URL /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Make use of alloca */ #undef USE_ALLOCA /* Use C99 variable-size arrays */ #undef VAR_ARRAYS /* Define to empty if `const' does not conform to ANSI C. */ #undef const /* Define to `__inline__' or `__inline' if that's what the C compiler calls it, or to nothing if 'inline' is not supported under any name. */ #ifndef __cplusplus #undef inline #endif /* Define to the equivalent of the C99 'restrict' keyword, or to nothing if this is not supported. Do not define if restrict is supported directly. */ #undef restrict /* Work around a bug in Sun C++: it does not support _Restrict or __restrict__, even though the corresponding Sun C compiler ends up with "#define restrict _Restrict" or "#define restrict __restrict__" in the previous line. Perhaps some future version of Sun C++ will work with restrict; if so, hopefully it defines __RESTRICT like Sun C does. */ #if defined __SUNPRO_CC && !defined __RESTRICT # define _Restrict # define __restrict__ #endif opus-1.1.2/config.sub000077500000000000000000001057751264527674100145210ustar00rootroot00000000000000#! /bin/sh # Configuration validation subroutine script. # Copyright 1992-2014 Free Software Foundation, Inc. timestamp='2014-09-11' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that # program. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # Please send patches with a ChangeLog entry to config-patches@gnu.org. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright 1992-2014 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit ;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ knetbsd*-gnu* | netbsd*-gnu* | \ kopensolaris*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; android-linux) os=-linux-android basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis | -knuth | -cray | -microblaze*) os= basic_machine=$1 ;; -bluegene*) os=-cnk ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco6) os=-sco5v6 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5v6*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*178) os=-lynxos178 ;; -lynx*5) os=-lynxos5 ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | aarch64 | aarch64_be \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arceb \ | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ | avr | avr32 \ | be32 | be64 \ | bfin \ | c4x | c8051 | clipper \ | d10v | d30v | dlx | dsp16xx \ | epiphany \ | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | hexagon \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | k1om \ | le32 | le64 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64octeon | mips64octeonel \ | mips64orion | mips64orionel \ | mips64r5900 | mips64r5900el \ | mips64vr | mips64vrel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa32r6 | mipsisa32r6el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64r6 | mipsisa64r6el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipsr5900 | mipsr5900el \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ | nds32 | nds32le | nds32be \ | nios | nios2 | nios2eb | nios2el \ | ns16k | ns32k \ | open8 | or1k | or1knd | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle \ | pyramid \ | riscv32 | riscv64 \ | rl78 | rx \ | score \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | spu \ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ | ubicom32 \ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ | we32k \ | x86 | xc16x | xstormy16 | xtensa \ | z8k | z80) basic_machine=$basic_machine-unknown ;; c54x) basic_machine=tic54x-unknown ;; c55x) basic_machine=tic55x-unknown ;; c6x) basic_machine=tic6x-unknown ;; m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; ms1) basic_machine=mt-unknown ;; strongarm | thumb | xscale) basic_machine=arm-unknown ;; xgate) basic_machine=$basic_machine-unknown os=-none ;; xscaleeb) basic_machine=armeb-unknown ;; xscaleel) basic_machine=armel-unknown ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | aarch64-* | aarch64_be-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | be32-* | be64-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \ | c8051-* | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | hexagon-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | k1om-* \ | le32-* | le64-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ | microblaze-* | microblazeel-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64octeon-* | mips64octeonel-* \ | mips64orion-* | mips64orionel-* \ | mips64r5900-* | mips64r5900el-* \ | mips64vr-* | mips64vrel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa32r6-* | mipsisa32r6el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64r6-* | mipsisa64r6el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipsr5900-* | mipsr5900el-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nds32-* | nds32le-* | nds32be-* \ | nios-* | nios2-* | nios2eb-* | nios2el-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | open8-* \ | or1k*-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ | pyramid-* \ | rl78-* | romp-* | rs6000-* | rx-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ | tahoe-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tile*-* \ | tron-* \ | ubicom32-* \ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ | vax-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* \ | xstormy16-* | xtensa*-* \ | ymp-* \ | z8k-* | z80-*) ;; # Recognize the basic CPU types without company name, with glob match. xtensa*) basic_machine=$basic_machine-unknown ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; abacus) basic_machine=abacus-unknown ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amd64) basic_machine=x86_64-pc ;; amd64-*) basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aros) basic_machine=i386-pc os=-aros ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; blackfin) basic_machine=bfin-unknown os=-linux ;; blackfin-*) basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; bluegene*) basic_machine=powerpc-ibm os=-cnk ;; c54x-*) basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c55x-*) basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c6x-*) basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c90) basic_machine=c90-cray os=-unicos ;; cegcc) basic_machine=arm-unknown os=-cegcc ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; craynv) basic_machine=craynv-cray os=-unicosmp ;; cr16 | cr16-*) basic_machine=cr16-unknown os=-elf ;; crds | unos) basic_machine=m68k-crds ;; crisv32 | crisv32-* | etraxfs*) basic_machine=crisv32-axis ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; crx) basic_machine=crx-unknown os=-elf ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; dicos) basic_machine=i686-pc os=-dicos ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; m68knommu) basic_machine=m68k-unknown os=-linux ;; m68knommu-*) basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; microblaze*) basic_machine=microblaze-xilinx ;; mingw64) basic_machine=x86_64-pc os=-mingw64 ;; mingw32) basic_machine=i686-pc os=-mingw32 ;; mingw32ce) basic_machine=arm-unknown os=-mingw32ce ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; moxiebox) basic_machine=moxie-unknown os=-moxiebox ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; msys) basic_machine=i686-pc os=-msys ;; mvs) basic_machine=i370-ibm os=-mvs ;; nacl) basic_machine=le32-unknown os=-nacl ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; neo-tandem) basic_machine=neo-tandem ;; nse-tandem) basic_machine=nse-tandem ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; openrisc | openrisc-*) basic_machine=or32-unknown ;; os400) basic_machine=powerpc-ibm os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; parisc) basic_machine=hppa-unknown os=-linux ;; parisc-*) basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pc98) basic_machine=i386-pc ;; pc98-*) basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc | ppcbe) basic_machine=powerpc-unknown ;; ppc-* | ppcbe-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rdos | rdos64) basic_machine=x86_64-pc os=-rdos ;; rdos32) basic_machine=i386-pc os=-rdos ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sde) basic_machine=mipsisa32-sde os=-elf ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh5el) basic_machine=sh5le-unknown ;; sh64) basic_machine=sh64-unknown ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; strongarm-* | thumb-*) basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tile*) basic_machine=$basic_machine-unknown os=-linux-gnu ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; tpf) basic_machine=s390x-ibm os=-tpf ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xbox) basic_machine=i686-pc os=-mingw32 ;; xps | xps100) basic_machine=xps100-honeywell ;; xscale-* | xscalee[bl]-*) basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; z80-*-coff) basic_machine=z80-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; mmix) basic_machine=mmix-knuth ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -auroraux) os=-auroraux ;; -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ | -sym* | -kopensolaris* | -plan9* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* | -aros* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | -bitrig* | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* | -cegcc* \ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ | -linux-newlib* | -linux-musl* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -os400*) os=-os400 ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -syllable*) os=-syllable ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -tpf*) os=-tpf ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -zvmoe) os=-zvmoe ;; -dicos*) os=-dicos ;; -nacl*) ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in score-*) os=-elf ;; spu-*) os=-elf ;; *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; c8051-*) os=-elf ;; hexagon-*) os=-elf ;; tic54x-*) os=-coff ;; tic55x-*) os=-coff ;; tic6x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 ;; m68*-cisco) os=-aout ;; mep-*) os=-elf ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-haiku) os=-haiku ;; *-ibm) os=-aix ;; *-knuth) os=-mmixware ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -cnk*|-aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -os400*) vendor=ibm ;; -ptx*) vendor=sequent ;; -tpf*) vendor=ibm ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: opus-1.1.2/configure000077500000000000000000016576341264527674100144540ustar00rootroot00000000000000#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69 for opus 1.1.1. # # Report bugs to . # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then _as_can_reexec=no; export _as_can_reexec; # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 as_fn_exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1 test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1 test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : export CONFIG_SHELL # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org and opus@xiph.org $0: about your system, including any error possibly output $0: before this message. Then install a modern shell, or $0: manually run the script under such a shell if you do $0: have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall # in an infinite loop. This has already happened in practice. _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" SHELL=${CONFIG_SHELL-/bin/sh} test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME='opus' PACKAGE_TARNAME='opus' PACKAGE_VERSION='1.1.1' PACKAGE_STRING='opus 1.1.1' PACKAGE_BUGREPORT='opus@xiph.org' PACKAGE_URL='' ac_unique_file="src/opus_encoder.c" # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBOBJS PC_BUILD EXTRA_PROGRAMS_FALSE EXTRA_PROGRAMS_TRUE HAVE_DOXYGEN_FALSE HAVE_DOXYGEN_TRUE HAVE_DOXYGEN OPUS_HAVE_RTCD HAVE_ARM_NE10_FALSE HAVE_ARM_NE10_TRUE OPUS_ARM_NEON_INTR_FALSE OPUS_ARM_NEON_INTR_TRUE CPU_ARM_FALSE CPU_ARM_TRUE OPUS_X86_AVX_CFLAGS OPUS_X86_SSE4_1_CFLAGS OPUS_X86_SSE2_CFLAGS OPUS_X86_SSE_CFLAGS NE10_LIBS NE10_CFLAGS HAVE_ARM_NE10 OPUS_ARM_NEON_INTR_CFLAGS ARM_NEON_INTR_CFLAGS X86_AVX_CFLAGS X86_SSE4_1_CFLAGS X86_SSE2_CFLAGS X86_SSE_CFLAGS HAVE_AVX_FALSE HAVE_AVX_TRUE HAVE_SSE4_1_FALSE HAVE_SSE4_1_TRUE HAVE_SSE2_FALSE HAVE_SSE2_TRUE HAVE_SSE_FALSE HAVE_SSE_TRUE ARM2GNU_PARAMS OPUS_ARM_MAY_HAVE_NEON OPUS_ARM_MAY_HAVE_MEDIA OPUS_ARM_MAY_HAVE_EDSP OPUS_ARM_EXTERNAL_ASM_FALSE OPUS_ARM_EXTERNAL_ASM_TRUE HAVE_PERL OPUS_ARM_INLINE_ASM_FALSE OPUS_ARM_INLINE_ASM_TRUE CUSTOM_MODES_FALSE CUSTOM_MODES_TRUE DISABLE_FLOAT_API_FALSE DISABLE_FLOAT_API_TRUE FIXED_POINT_FALSE FIXED_POINT_TRUE LIBM am__fastdepCCAS_FALSE am__fastdepCCAS_TRUE CCASDEPMODE CCASFLAGS CCAS CPP OTOOL64 OTOOL LIPO NMEDIT DSYMUTIL MANIFEST_TOOL RANLIB ac_ct_AR AR DLLTOOL OBJDUMP LN_S NM ac_ct_DUMPBIN DUMPBIN LD FGREP EGREP GREP SED am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__quote am__include DEPDIR OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC LIBTOOL host_os host_vendor host_cpu host build_os build_vendor build_cpu build MAINT MAINTAINER_MODE_FALSE MAINTAINER_MODE_TRUE am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM OPUS_LT_AGE OPUS_LT_REVISION OPUS_LT_CURRENT AM_BACKSLASH AM_DEFAULT_VERBOSITY AM_DEFAULT_V AM_V target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking enable_silent_rules enable_maintainer_mode enable_shared enable_static with_pic enable_fast_install enable_dependency_tracking with_gnu_ld with_sysroot enable_libtool_lock enable_fixed_point enable_fixed_point_debug enable_float_api enable_custom_modes enable_float_approx enable_asm enable_rtcd enable_intrinsics with_NE10 with_NE10_libraries with_NE10_includes enable_assertions enable_fuzzing enable_doc enable_extra_programs ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP CCAS CCASFLAGS X86_SSE_CFLAGS X86_SSE2_CFLAGS X86_SSE4_1_CFLAGS X86_AVX_CFLAGS ARM_NEON_INTR_CFLAGS' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error $? "unrecognized option: \`$ac_option' Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures opus 1.1.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/opus] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of opus 1.1.1:";; esac cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-silent-rules less verbose build output (undo: "make V=1") --disable-silent-rules verbose build output (undo: "make V=0") --disable-maintainer-mode disable make rules and dependencies not useful (and sometimes confusing) to the casual installer --enable-shared[=PKGS] build shared libraries [default=yes] --enable-static[=PKGS] build static libraries [default=yes] --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --enable-dependency-tracking do not reject slow dependency extractors --disable-dependency-tracking speeds up one-time build --disable-libtool-lock avoid locking (might break parallel builds) --enable-fixed-point compile without floating point (for machines without a fast enough FPU) --enable-fixed-point-debug debug fixed-point implementation --disable-float-api compile without the floating point API (for machines with no float library) --enable-custom-modes enable non-Opus modes, e.g. 44.1 kHz & 2^n frames --enable-float-approx enable fast approximations for floating point --disable-asm Disable assembly optimizations --disable-rtcd Disable run-time CPU capabilities detection --enable-intrinsics Enable intrinsics optimizations for ARM(float) X86(fixed) --enable-assertions enable additional software error checking --enable-fuzzing causes the encoder to make random decisions --disable-doc Do not build API documentation --disable-extra-programs Do not build extra programs (demo and tests) Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use both] --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-sysroot=DIR Search for dependent libraries within DIR (or the compiler's sysroot if not specified). --with-NE10=PFX Prefix where libNE10 is installed (optional) --with-NE10-libraries=DIR Directory where libNE10 library is installed (optional) --with-NE10-includes=DIR Directory where libNE10 header files are installed (optional) Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor CCAS assembler compiler command (defaults to CC) CCASFLAGS assembler compiler flags (defaults to CFLAGS) X86_SSE_CFLAGS C compiler flags to compile SSE intrinsics [default=-msse] X86_SSE2_CFLAGS C compiler flags to compile SSE2 intrinsics [default=-msse2] X86_SSE4_1_CFLAGS C compiler flags to compile SSE4.1 intrinsics [default=-msse4.1] X86_AVX_CFLAGS C compiler flags to compile AVX intrinsics [default=-mavx] ARM_NEON_INTR_CFLAGS C compiler flags to compile ARM NEON intrinsics [default=-mfpu=neon / -mfpu=neon -mfloat-abi=softfp] Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF opus configure 1.1.1 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## # ac_fn_c_try_compile LINENO # -------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_link # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in # INCLUDES, setting the cache variable VAR accordingly. ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile # ac_fn_c_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_cpp # ac_fn_c_try_run LINENO # ---------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_run # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$2 || defined __stub___$2 choke me #endif int main () { return $2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists, giving a warning if it cannot be compiled using # the include files in INCLUDES and setting the cache variable VAR # accordingly. ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 $as_echo_n "checking $2 presence... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$2> _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( yes:no: ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; no:yes:* ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ( $as_echo "## ---------------------------- ## ## Report this to opus@xiph.org ## ## ---------------------------- ##" ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_mongrel cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by opus $as_me 1.1.1, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then # We do not want a PATH search for config.site. case $CONFIG_SITE in #(( -*) ac_site_file1=./$CONFIG_SITE;; */*) ac_site_file1=$CONFIG_SITE;; *) ac_site_file1=./$CONFIG_SITE;; esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Check whether --enable-silent-rules was given. if test "${enable_silent_rules+set}" = set; then : enableval=$enable_silent_rules; fi case $enable_silent_rules in # ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=0;; esac am_make=${MAKE-make} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 $as_echo_n "checking whether $am_make supports nested variables... " >&6; } if ${am_cv_make_support_nested_variables+:} false; then : $as_echo_n "(cached) " >&6 else if $as_echo 'TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 $as_echo "$am_cv_make_support_nested_variables" >&6; } if test $am_cv_make_support_nested_variables = yes; then AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AM_BACKSLASH='\' # For libtool. OPUS_LT_CURRENT=5 OPUS_LT_REVISION=2 OPUS_LT_AGE=5 am__api_version='1.14' ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in #(( ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; esac # Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi if test "$2" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done test "$2" = conftest.file ) then # Ok. : else as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi rm -f conftest.file test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # Expand $ac_aux_dir to an absolute path. am_aux_dir=`cd "$ac_aux_dir" && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} fi if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # Installed binaries are usually stripped using 'strip' when the user # run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the 'STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if ${ac_cv_path_mkdir+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi test -d ./--version && rmdir ./--version if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE='opus' VERSION='1.1.1' # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # mkdir_p='$(MKDIR_P)' # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AMTAR='$${TAR-tar}' # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar pax cpio none' am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' # POSIX will say in a future version that running "rm -f" with no argument # is OK; and we want to be able to make that assumption in our Makefile # recipes. So use an aggressive probe to check that the usage we want is # actually supported "in the wild" to an acceptable degree. # See automake bug#10828. # To make any issue more visible, cause the running configure to be aborted # by default if the 'rm' program in use doesn't match our expectations; the # user can still override this though. if rm -f && rm -fr && rm -rf; then : OK; else cat >&2 <<'END' Oops! Your 'rm' program seems unable to run without file operands specified on the command line, even when the '-f' option is present. This is contrary to the behaviour of most rm programs out there, and not conforming with the upcoming POSIX standard: Please tell bug-automake@gnu.org about your system, including the value of your $PATH and any error possibly output before this message. This can help us improve future automake versions. END if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then echo 'Configuration will proceed anyway, since you have set the' >&2 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 echo >&2 else cat >&2 <<'END' Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM to "yes", and re-run configure. END as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } # Check whether --enable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then : enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval else USE_MAINTAINER_MODE=yes fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 $as_echo "$USE_MAINTAINER_MODE" >&6; } if test $USE_MAINTAINER_MODE = yes; then MAINTAINER_MODE_TRUE= MAINTAINER_MODE_FALSE='#' else MAINTAINER_MODE_TRUE='#' MAINTAINER_MODE_FALSE= fi MAINT=$MAINTAINER_MODE_TRUE # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } if ${ac_cv_build+:} false; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } if ${ac_cv_host+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac case $host_os in *mingw32* ) MINGW32=yes;; * ) MINGW32=no;; esac case `pwd` in *\ * | *\ *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 $as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; esac macro_version='2.4.2' macro_revision='1.3337' ltmain="$ac_aux_dir/ltmain.sh" # Backslashify metacharacters that are still active within # double-quoted strings. sed_quote_subst='s/\(["`$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 $as_echo_n "checking how to print strings... " >&6; } # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='printf %s\n' else # Use this function as a fallback that always works. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } ECHO='func_fallback_echo' fi # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "" } case "$ECHO" in printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 $as_echo "printf" >&6; } ;; print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 $as_echo "print -r" >&6; } ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 $as_echo "cat" >&6; } ;; esac DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 $as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 $as_echo "$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then : enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi if test -z "$ac_file"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 $as_echo_n "checking whether $CC understands -c and -o together... " >&6; } if ${am_cv_prog_cc_c_o+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 $as_echo "$am_cv_prog_cc_c_o" >&6; } if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 $as_echo_n "checking for a sed that does not truncate output... " >&6; } if ${ac_cv_path_SED+:} false; then : $as_echo_n "(cached) " >&6 else ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for ac_i in 1 2 3 4 5 6 7; do ac_script="$ac_script$as_nl$ac_script" done echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed { ac_script=; unset ac_script;} if test -z "$SED"; then ac_path_SED_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_SED" || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED case `"$ac_path_SED" --version 2>&1` in *GNU*) ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo '' >> "conftest.nl" "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_SED_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_SED="$ac_path_SED" ac_path_SED_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_SED_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi else ac_cv_path_SED=$SED fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 $as_echo "$ac_cv_path_SED" >&6; } SED="$ac_cv_path_SED" rm -f conftest.sed test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 $as_echo_n "checking for fgrep... " >&6; } if ${ac_cv_path_FGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 then ac_cv_path_FGREP="$GREP -F" else if test -z "$FGREP"; then ac_path_FGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in fgrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_FGREP" || continue # Check for GNU ac_path_FGREP and select it if it is found. # Check for GNU $ac_path_FGREP case `"$ac_path_FGREP" --version 2>&1` in *GNU*) ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'FGREP' >> "conftest.nl" "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_FGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_FGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_FGREP"; then as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_FGREP=$FGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 $as_echo "$ac_cv_path_FGREP" >&6; } FGREP="$ac_cv_path_FGREP" test -z "$GREP" && GREP=grep # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if ${lt_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if ${lt_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } if ${lt_cv_path_NM+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done : ${lt_cv_path_NM=no} fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 $as_echo "$lt_cv_path_NM" >&6; } if test "$lt_cv_path_NM" != "no"; then NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else if test -n "$ac_tool_prefix"; then for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DUMPBIN"; then ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DUMPBIN=$ac_cv_prog_DUMPBIN if test -n "$DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 $as_echo "$DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$DUMPBIN" && break done fi if test -z "$DUMPBIN"; then ac_ct_DUMPBIN=$DUMPBIN for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DUMPBIN"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN if test -n "$ac_ct_DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 $as_echo "$ac_ct_DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_DUMPBIN" && break done if test "x$ac_ct_DUMPBIN" = x; then DUMPBIN=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DUMPBIN=$ac_ct_DUMPBIN fi fi case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols" ;; *) DUMPBIN=: ;; esac fi if test "$DUMPBIN" != ":"; then NM="$DUMPBIN" fi fi test -z "$NM" && NM=nm { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 $as_echo_n "checking the name lister ($NM) interface... " >&6; } if ${lt_cv_nm_interface+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 (eval echo "\"\$as_me:$LINENO: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 $as_echo "$lt_cv_nm_interface" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 $as_echo_n "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 $as_echo "no, using $LN_S" >&6; } fi # find the maximum length of command line arguments { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 $as_echo_n "checking the maximum length of command line arguments... " >&6; } if ${lt_cv_sys_max_cmd_len+:} false; then : $as_echo_n "(cached) " >&6 else i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; mint*) # On MiNT this can take a long time and run out of memory. lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; os2*) # The test takes a long time on OS/2. lt_cv_sys_max_cmd_len=8192 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len" && \ test undefined != "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8 ; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac fi if test -n $lt_cv_sys_max_cmd_len ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 $as_echo "$lt_cv_sys_max_cmd_len" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 $as_echo "none" >&6; } fi max_cmd_len=$lt_cv_sys_max_cmd_len : ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5 $as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ = c,a/b,b/c, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5 $as_echo "$xsi_shell" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5 $as_echo_n "checking whether the shell understands \"+=\"... " >&6; } lt_shell_append=no ( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ >/dev/null 2>&1 \ && lt_shell_append=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5 $as_echo "$lt_shell_append" >&6; } if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 $as_echo_n "checking how to convert $build file names to $host format... " >&6; } if ${lt_cv_to_host_file_cmd+:} false; then : $as_echo_n "(cached) " >&6 else case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ;; esac ;; *-*-cygwin* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_noop ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ;; esac ;; * ) # unhandled hosts (and "normal" native builds) lt_cv_to_host_file_cmd=func_convert_file_noop ;; esac fi to_host_file_cmd=$lt_cv_to_host_file_cmd { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 $as_echo "$lt_cv_to_host_file_cmd" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 $as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } if ${lt_cv_to_tool_file_cmd+:} false; then : $as_echo_n "(cached) " >&6 else #assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ;; esac ;; esac fi to_tool_file_cmd=$lt_cv_to_tool_file_cmd { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 $as_echo "$lt_cv_to_tool_file_cmd" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 $as_echo_n "checking for $LD option to reload object files... " >&6; } if ${lt_cv_ld_reload_flag+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_reload_flag='-r' fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 $as_echo "$lt_cv_ld_reload_flag" >&6; } reload_flag=$lt_cv_ld_reload_flag case $reload_flag in "" | " "*) ;; *) reload_flag=" $reload_flag" ;; esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in cygwin* | mingw* | pw32* | cegcc*) if test "$GCC" != yes; then reload_cmds=false fi ;; darwin*) if test "$GCC" = yes; then reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' else reload_cmds='$LD$reload_flag -o $output$reload_objs' fi ;; esac if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 $as_echo "$OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OBJDUMP="objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 $as_echo "$ac_ct_OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then OBJDUMP="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OBJDUMP=$ac_ct_OBJDUMP fi else OBJDUMP="$ac_cv_prog_OBJDUMP" fi test -z "$OBJDUMP" && OBJDUMP=objdump { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 $as_echo_n "checking how to recognize dependent libraries... " >&6; } if ${lt_cv_deplibs_check_method+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # `unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # which responds to the $file_magic_cmd with a given extended regex. # If you have `file' or equivalent on your system and you're not sure # whether `pass_all' will *always* work, you probably want this one. case $host_os in aix[4-9]*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi[45]*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else # Keep this pattern in sync with the one in func_win32_libid. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; haiku*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]' lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[3-9]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) lt_cv_deplibs_check_method=pass_all ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 $as_echo "$lt_cv_deplibs_check_method" >&6; } file_magic_glob= want_nocaseglob=no if test "$build" = "$host"; then case $host_os in mingw* | pw32*) if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then want_nocaseglob=yes else file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` fi ;; esac fi file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ac_tool_prefix}dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DLLTOOL"; then ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DLLTOOL=$ac_cv_prog_DLLTOOL if test -n "$DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 $as_echo "$DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DLLTOOL"; then ac_ct_DLLTOOL=$DLLTOOL # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DLLTOOL"; then ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL if test -n "$ac_ct_DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 $as_echo "$ac_ct_DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DLLTOOL" = x; then DLLTOOL="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DLLTOOL=$ac_ct_DLLTOOL fi else DLLTOOL="$ac_cv_prog_DLLTOOL" fi test -z "$DLLTOOL" && DLLTOOL=dlltool { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 $as_echo_n "checking how to associate runtime and link libraries... " >&6; } if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in cygwin* | mingw* | pw32* | cegcc*) # two different shell functions defined in ltmain.sh # decide which to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ;; *) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ;; esac ;; *) # fallback: assume linklib IS sharedlib lt_cv_sharedlib_from_linklib_cmd="$ECHO" ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 $as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO if test -n "$ac_tool_prefix"; then for ac_prog in ar do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AR="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 $as_echo "$AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AR" && break done fi if test -z "$AR"; then ac_ct_AR=$AR for ac_prog in ar do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AR="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 $as_echo "$ac_ct_AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_AR" && break done if test "x$ac_ct_AR" = x; then AR="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi fi : ${AR=ar} : ${AR_FLAGS=cru} { $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 $as_echo_n "checking for archiver @FILE support... " >&6; } if ${lt_cv_ar_at_file+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ar_at_file=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test "$ac_status" -eq 0; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test "$ac_status" -ne 0; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 $as_echo "$lt_cv_ar_at_file" >&6; } if test "x$lt_cv_ar_at_file" = xno; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi test -z "$STRIP" && STRIP=: if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi test -z "$RANLIB" && RANLIB=: # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in darwin*) lock_old_archive_extraction=yes ;; *) lock_old_archive_extraction=no ;; esac # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Check for command to grab the raw symbol name followed by C symbol from nm. { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } if ${lt_cv_sys_global_symbol_pipe+:} false; then : $as_echo_n "(cached) " >&6 else # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[BCDEGRST]' # Regexp to match symbols that can be accessed directly from C. sympat='\([_A-Za-z][_A-Za-z0-9]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[BCDT]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[ABCDGISTW]' ;; hpux*) if test "$host_cpu" = ia64; then symcode='[ABCDEGRST]' fi ;; irix* | nonstopux*) symcode='[BCDEGRST]' ;; osf*) symcode='[BCDEGQRST]' ;; solaris*) symcode='[BDRT]' ;; sco3.2v5*) symcode='[DT]' ;; sysv4.2uw2*) symcode='[DT]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[ABDT]' ;; sysv4) symcode='[DFNSTU]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[ABCDGIRSTW]' ;; esac # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function # and D for any global variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK '"\ " {last_section=section; section=\$ 3};"\ " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ " s[1]~/^[@?]/{print s[1], s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # Now try to grab the symbols. nlist=conftest.nm if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) /* DATA imports from DLLs on WIN32 con't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST #elif defined(__osf__) /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else # define LT_DLSYM_CONST const #endif #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ LT_DLSYM_CONST struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&5 fi else echo "cannot find nm_test_var in $nlist" >&5 fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 fi else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done fi if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 $as_echo "failed" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } fi # Response file support. if test "$lt_cv_nm_interface" = "MS dumpbin"; then nm_file_list_spec='@' elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then nm_file_list_spec='@' fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 $as_echo_n "checking for sysroot... " >&6; } # Check whether --with-sysroot was given. if test "${with_sysroot+set}" = set; then : withval=$with_sysroot; else with_sysroot=no fi lt_sysroot= case ${with_sysroot} in #( yes) if test "$GCC" = yes; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( /*) lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` ;; #( no|'') ;; #( *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5 $as_echo "${with_sysroot}" >&6; } as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 $as_echo "${lt_sysroot:-no}" >&6; } # Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then : enableval=$enable_libtool_lock; fi test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '#line '$LINENO' "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) case `/usr/bin/file conftest.o` in *x86-64*) LD="${LD-ld} -m elf32_x86_64" ;; *) LD="${LD-ld} -m elf_i386" ;; esac ;; powerpc64le-*) LD="${LD-ld} -m elf32lppclinux" ;; powerpc64-*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; powerpcle-*) LD="${LD-ld} -m elf64lppc" ;; powerpc-*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 $as_echo_n "checking whether the C compiler needs -belf... " >&6; } if ${lt_cv_cc_needs_belf+:} false; then : $as_echo_n "(cached) " >&6 else ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_cc_needs_belf=yes else lt_cv_cc_needs_belf=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 $as_echo "$lt_cv_cc_needs_belf" >&6; } if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; *-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) case $host in i?86-*-solaris*) LD="${LD-ld} -m elf_x86_64" ;; sparc*-*-solaris*) LD="${LD-ld} -m elf64_sparc" ;; esac # GNU ld 2.21 introduced _sol2 emulations. Use them if available. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then LD="${LD-ld}_sol2" fi ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks="$enable_libtool_lock" if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. set dummy ${ac_tool_prefix}mt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_MANIFEST_TOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$MANIFEST_TOOL"; then ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL if test -n "$MANIFEST_TOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 $as_echo "$MANIFEST_TOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_MANIFEST_TOOL"; then ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL # Extract the first word of "mt", so it can be a program name with args. set dummy mt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_MANIFEST_TOOL"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL if test -n "$ac_ct_MANIFEST_TOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 $as_echo "$ac_ct_MANIFEST_TOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_MANIFEST_TOOL" = x; then MANIFEST_TOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL fi else MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" fi test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 $as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } if ${lt_cv_path_mainfest_tool+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&5 if $GREP 'Manifest Tool' conftest.out > /dev/null; then lt_cv_path_mainfest_tool=yes fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 $as_echo "$lt_cv_path_mainfest_tool" >&6; } if test "x$lt_cv_path_mainfest_tool" != xyes; then MANIFEST_TOOL=: fi case $host_os in rhapsody* | darwin*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DSYMUTIL"; then ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DSYMUTIL=$ac_cv_prog_DSYMUTIL if test -n "$DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 $as_echo "$DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DSYMUTIL"; then ac_ct_DSYMUTIL=$DSYMUTIL # Extract the first word of "dsymutil", so it can be a program name with args. set dummy dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DSYMUTIL"; then ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL if test -n "$ac_ct_DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 $as_echo "$ac_ct_DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DSYMUTIL" = x; then DSYMUTIL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DSYMUTIL=$ac_ct_DSYMUTIL fi else DSYMUTIL="$ac_cv_prog_DSYMUTIL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. set dummy ${ac_tool_prefix}nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NMEDIT"; then ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi NMEDIT=$ac_cv_prog_NMEDIT if test -n "$NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 $as_echo "$NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_NMEDIT"; then ac_ct_NMEDIT=$NMEDIT # Extract the first word of "nmedit", so it can be a program name with args. set dummy nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_NMEDIT"; then ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_NMEDIT="nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT if test -n "$ac_ct_NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 $as_echo "$ac_ct_NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_NMEDIT" = x; then NMEDIT=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac NMEDIT=$ac_ct_NMEDIT fi else NMEDIT="$ac_cv_prog_NMEDIT" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. set dummy ${ac_tool_prefix}lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$LIPO"; then ac_cv_prog_LIPO="$LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_LIPO="${ac_tool_prefix}lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi LIPO=$ac_cv_prog_LIPO if test -n "$LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 $as_echo "$LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_LIPO"; then ac_ct_LIPO=$LIPO # Extract the first word of "lipo", so it can be a program name with args. set dummy lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_LIPO"; then ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_LIPO="lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO if test -n "$ac_ct_LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 $as_echo "$ac_ct_LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_LIPO" = x; then LIPO=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac LIPO=$ac_ct_LIPO fi else LIPO="$ac_cv_prog_LIPO" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. set dummy ${ac_tool_prefix}otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL"; then ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL="${ac_tool_prefix}otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL=$ac_cv_prog_OTOOL if test -n "$OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 $as_echo "$OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL"; then ac_ct_OTOOL=$OTOOL # Extract the first word of "otool", so it can be a program name with args. set dummy otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL"; then ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL="otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL if test -n "$ac_ct_OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 $as_echo "$ac_ct_OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL" = x; then OTOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL=$ac_ct_OTOOL fi else OTOOL="$ac_cv_prog_OTOOL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. set dummy ${ac_tool_prefix}otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL64"; then ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL64=$ac_cv_prog_OTOOL64 if test -n "$OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 $as_echo "$OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL64"; then ac_ct_OTOOL64=$OTOOL64 # Extract the first word of "otool64", so it can be a program name with args. set dummy otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL64"; then ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL64="otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 if test -n "$ac_ct_OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 $as_echo "$ac_ct_OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL64" = x; then OTOOL64=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL64=$ac_ct_OTOOL64 fi else OTOOL64="$ac_cv_prog_OTOOL64" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 $as_echo_n "checking for -single_module linker flag... " >&6; } if ${lt_cv_apple_cc_single_mod+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_apple_cc_single_mod=no if test -z "${LT_MULTI_MODULE}"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&5 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? # If there is a non-empty error log, and "single_module" # appears in it, assume the flag caused a linker warning if test -s conftest.err && $GREP single_module conftest.err; then cat conftest.err >&5 # Otherwise, if the output was created with a 0 exit code from # the compiler, it worked. elif test -f libconftest.dylib && test $_lt_result -eq 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&5 fi rm -rf libconftest.dylib* rm -f conftest.* fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 $as_echo "$lt_cv_apple_cc_single_mod" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } if ${lt_cv_ld_exported_symbols_list+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_ld_exported_symbols_list=yes else lt_cv_ld_exported_symbols_list=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 $as_echo_n "checking for -force_load linker flag... " >&6; } if ${lt_cv_ld_force_load+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 echo "$AR cru libconftest.a conftest.o" >&5 $AR cru libconftest.a conftest.o 2>&5 echo "$RANLIB libconftest.a" >&5 $RANLIB libconftest.a 2>&5 cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? if test -s conftest.err && $GREP force_load conftest.err; then cat conftest.err >&5 elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then lt_cv_ld_force_load=yes else cat conftest.err >&5 fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 $as_echo "$lt_cv_ld_force_load" >&6; } case $host_os in rhapsody* | darwin1.[012]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[91]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[012]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; then _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' fi if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in dlfcn.h do : ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default " if test "x$ac_cv_header_dlfcn_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_DLFCN_H 1 _ACEOF fi done # Set options enable_dlopen=no enable_win32_dll=no # Check whether --enable-shared was given. if test "${enable_shared+set}" = set; then : enableval=$enable_shared; p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac else enable_shared=yes fi # Check whether --enable-static was given. if test "${enable_static+set}" = set; then : enableval=$enable_static; p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac else enable_static=yes fi # Check whether --with-pic was given. if test "${with_pic+set}" = set; then : withval=$with_pic; lt_p=${PACKAGE-default} case $withval in yes|no) pic_mode=$withval ;; *) pic_mode=default # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for lt_pkg in $withval; do IFS="$lt_save_ifs" if test "X$lt_pkg" = "X$lt_p"; then pic_mode=yes fi done IFS="$lt_save_ifs" ;; esac else pic_mode=default fi test -z "$pic_mode" && pic_mode=default # Check whether --enable-fast-install was given. if test "${enable_fast_install+set}" = set; then : enableval=$enable_fast_install; p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac else enable_fast_install=yes fi # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ltmain" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' test -z "$LN_S" && LN_S="ln -s" if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 $as_echo_n "checking for objdir... " >&6; } if ${lt_cv_objdir+:} false; then : $as_echo_n "(cached) " >&6 else rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 $as_echo "$lt_cv_objdir" >&6; } objdir=$lt_cv_objdir cat >>confdefs.h <<_ACEOF #define LT_OBJDIR "$lt_cv_objdir/" _ACEOF case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld="$lt_cv_prog_gnu_ld" old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/${ac_tool_prefix}file; then lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 $as_echo_n "checking for file... " >&6; } if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/file; then lt_cv_path_MAGIC_CMD="$ac_dir/file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi else MAGIC_CMD=: fi fi fi ;; esac # Use C for the default configuration in the libtool script lt_save_CC="$CC" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o objext=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then lt_prog_compiler_no_builtin_flag= if test "$GCC" = yes; then case $cc_basename in nvcc*) lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; *) lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl= lt_prog_compiler_pic= lt_prog_compiler_static= if test "$GCC" = yes; then lt_prog_compiler_wl='-Wl,' lt_prog_compiler_static='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support lt_prog_compiler_pic='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. lt_prog_compiler_static= ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) lt_prog_compiler_pic='-fPIC' ;; esac ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic=-Kconform_pic fi ;; *) lt_prog_compiler_pic='-fPIC' ;; esac case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 lt_prog_compiler_wl='-Xlinker ' if test -n "$lt_prog_compiler_pic"; then lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic" fi ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' else lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' fi ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; # Lahey Fortran 8.1. lf95*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='--shared' lt_prog_compiler_static='--static' ;; nagfor*) # NAG Fortran compiler lt_prog_compiler_wl='-Wl,-Wl,,' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; ccc*) lt_prog_compiler_wl='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static='-non_shared' ;; xl* | bgxl* | bgf* | mpixl*) # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-qpic' lt_prog_compiler_static='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='' ;; *Sun\ F* | *Sun*Fortran*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Qoption ld ' ;; *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Wl,' ;; *Intel*\ [CF]*Compiler*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; *Portland\ Group*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; esac ;; esac ;; newsos6) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static='-non_shared' ;; rdos*) lt_prog_compiler_static='-non_shared' ;; solaris*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) lt_prog_compiler_wl='-Qoption ld ';; *) lt_prog_compiler_wl='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl='-Qoption ld ' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic='-Kconform_pic' lt_prog_compiler_static='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; unicos*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_can_build_shared=no ;; uts4*) lt_prog_compiler_pic='-pic' lt_prog_compiler_static='-Bstatic' ;; *) lt_prog_compiler_can_build_shared=no ;; esac fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic= ;; *) lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } if ${lt_cv_prog_compiler_pic+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic=$lt_prog_compiler_pic fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 $as_echo "$lt_cv_prog_compiler_pic" >&6; } lt_prog_compiler_pic=$lt_cv_prog_compiler_pic # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } if ${lt_cv_prog_compiler_pic_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; } if test x"$lt_cv_prog_compiler_pic_works" = xyes; then case $lt_prog_compiler_pic in "" | " "*) ;; *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; esac else lt_prog_compiler_pic= lt_prog_compiler_can_build_shared=no fi fi # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if ${lt_cv_prog_compiler_static_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works=yes fi else lt_cv_prog_compiler_static_works=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 $as_echo "$lt_cv_prog_compiler_static_works" >&6; } if test x"$lt_cv_prog_compiler_static_works" = xyes; then : else lt_prog_compiler_static= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test "$hard_links" = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } runpath_var= allow_undefined_flag= always_export_symbols=no archive_cmds= archive_expsym_cmds= compiler_needs_object=no enable_shared_with_static_runtimes=no export_dynamic_flag_spec= export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' hardcode_automatic=no hardcode_direct=no hardcode_direct_absolute=no hardcode_libdir_flag_spec= hardcode_libdir_separator= hardcode_minus_L=no hardcode_shlibpath_var=unsupported inherit_rpath=no link_all_deplibs=unknown module_cmds= module_expsym_cmds= old_archive_from_new_cmds= old_archive_from_expsyms_cmds= thread_safe_flag_spec= whole_archive_flag_spec= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; linux* | k*bsd*-gnu | gnu*) link_all_deplibs=no ;; esac ld_shlibs=yes # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no if test "$with_gnu_ld" = yes; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility # with the native linker. However, as the warning in the GNU ld # block says, versions before 2.19.5* couldn't really create working # shared libraries, regardless of the interface used. case `$LD -v 2>&1` in *\ \(GNU\ Binutils\)\ 2.19.5*) ;; *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; *\ \(GNU\ Binutils\)\ [3-9]*) ;; *) lt_use_gnu_ld_interface=yes ;; esac ;; *) lt_use_gnu_ld_interface=yes ;; esac fi if test "$lt_use_gnu_ld_interface" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' export_dynamic_flag_spec='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec= fi supports_anon_versioning=no case `$LD -v 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to install binutils *** 2.20 or above, or modify your PATH so that a non-GNU linker is found. *** You will then need to restart the configuration process. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then allow_undefined_flag=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' export_dynamic_flag_spec='${wl}--export-all-symbols' allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs=no fi ;; haiku*) archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' link_all_deplibs=yes ;; interix[3-9]*) hardcode_direct=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 whole_archive_flag_spec= tmp_sharedflag='--shared' ;; xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi case $cc_basename in xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else ld_shlibs=no fi ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac ;; sunos4*) archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct=yes hardcode_shlibpath_var=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac if test "$ld_shlibs" = no; then runpath_var= hardcode_libdir_flag_spec= export_dynamic_flag_spec= whole_archive_flag_spec= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag=unsupported always_export_symbols=yes archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm # Also, AIX nm treats weak defined symbols like other global # defined symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds='' hardcode_direct=yes hardcode_direct_absolute=yes hardcode_libdir_separator=':' link_all_deplibs=yes file_list_spec='${wl}-f,' if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi link_all_deplibs=no else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi export_dynamic_flag_spec='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an # empty executable. if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_="/usr/lib:/lib" fi fi aix_libpath=$lt_cv_aix_libpath_ fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag="-z nodefs" archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_="/usr/lib:/lib" fi fi aix_libpath=$lt_cv_aix_libpath_ fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag=' ${wl}-bernotok' allow_undefined_flag=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec='$convenience' fi archive_cmds_need_lc=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; bsdi[45]*) export_dynamic_flag_spec=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in cl*) # Native MSVC hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported always_export_symbols=yes file_list_spec='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, )='true' enable_shared_with_static_runtimes=yes exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib old_postinstall_cmds='chmod 644 $oldlib' postlink_cmds='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile="$lt_outputfile.exe" lt_tool_outputfile="$lt_tool_outputfile.exe" ;; esac~ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # Assume MSVC wrapper hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_from_new_cmds='true' # FIXME: Should let the user specify the lib program. old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' enable_shared_with_static_runtimes=yes ;; esac ;; darwin* | rhapsody*) archive_cmds_need_lc=no hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported if test "$lt_cv_ld_force_load" = "yes"; then whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' else whole_archive_flag_spec='' fi link_all_deplibs=yes allow_undefined_flag="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=func_echo_all archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" else ld_shlibs=no fi ;; dgux*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2.*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes export_dynamic_flag_spec='${wl}-E' ;; hpux10*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes fi ;; hpux11*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 $as_echo_n "checking if $CC understands -b... " >&6; } if ${lt_cv_prog_compiler__b+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler__b=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -b" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler__b=yes fi else lt_cv_prog_compiler__b=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 $as_echo "$lt_cv_prog_compiler__b" >&6; } if test x"$lt_cv_prog_compiler__b" = xyes; then archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi ;; esac fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: case $host_cpu in hppa*64*|ia64*) hardcode_direct=no hardcode_shlibpath_var=no ;; *) hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 $as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } if ${lt_cv_irix_exported_symbol+:} false; then : $as_echo_n "(cached) " >&6 else save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int foo (void) { return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_irix_exported_symbol=yes else lt_cv_irix_exported_symbol=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 $as_echo "$lt_cv_irix_exported_symbol" >&6; } if test "$lt_cv_irix_exported_symbol" = yes; then archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' fi else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: inherit_rpath=yes link_all_deplibs=yes ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; newsos6) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: hardcode_shlibpath_var=no ;; *nto* | *qnx*) ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes hardcode_shlibpath_var=no hardcode_direct_absolute=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-R$libdir' ;; *) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; esac fi else ld_shlibs=no fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi archive_cmds_need_lc='no' hardcode_libdir_separator=: ;; solaris*) no_undefined_flag=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='${wl}' archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi hardcode_libdir_flag_spec='-R$libdir' hardcode_shlibpath_var=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else whole_archive_flag_spec='-z allextract$convenience -z defaultextract' fi ;; esac link_all_deplibs=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; sysv4) case $host_vendor in sni) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds='$CC -r -o $output$reload_objs' hardcode_direct=no ;; motorola) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no ;; sysv4.3*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no export_dynamic_flag_spec='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag='${wl}-z,text' archive_cmds_need_lc=no hardcode_shlibpath_var=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag='${wl}-z,text' allow_undefined_flag='${wl}-z,nodefs' archive_cmds_need_lc=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-R,$libdir' hardcode_libdir_separator=':' link_all_deplibs=yes export_dynamic_flag_spec='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; *) ld_shlibs=no ;; esac if test x$host_vendor = xsni; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) export_dynamic_flag_spec='${wl}-Blargedynsym' ;; esac fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 $as_echo "$ld_shlibs" >&6; } test "$ld_shlibs" = no && can_build_shared=no with_gnu_ld=$with_gnu_ld # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc" in x|xyes) # Assume -lc should be added archive_cmds_need_lc=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } if ${lt_cv_archive_cmds_need_lc+:} false; then : $as_echo_n "(cached) " >&6 else $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl pic_flag=$lt_prog_compiler_pic compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag allow_undefined_flag= if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then lt_cv_archive_cmds_need_lc=no else lt_cv_archive_cmds_need_lc=yes fi allow_undefined_flag=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 $as_echo "$lt_cv_archive_cmds_need_lc" >&6; } archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc ;; esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac case $host_os in mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;; *) lt_sed_strip_eq="s,=/,/,g" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in *\;*) # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` ;; *) lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` ;; esac # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[lt_foo]++; } if (lt_freq[lt_foo] == 1) { print lt_foo; } }'` # AWK program above erroneously prepends '/' to C:/dos/paths # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ $SED 's,/\([A-Za-z]:\),\1,g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[4-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' library_names_spec='${libname}.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec="$LIB" if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[23].*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=yes sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[3-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH if ${lt_cv_shlibpath_overrides_runpath+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : lt_cv_shlibpath_overrides_runpath=yes fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir fi shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action= if test -n "$hardcode_libdir_flag_spec" || test -n "$runpath_var" || test "X$hardcode_automatic" = "Xyes" ; then # We can hardcode non-existent directories. if test "$hardcode_direct" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no && test "$hardcode_minus_L" != no; then # Linking always hardcodes the temporary library directory. hardcode_action=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action=unsupported fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 $as_echo "$hardcode_action" >&6; } if test "$hardcode_action" = relink || test "$inherit_rpath" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes fi ;; *) ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" if test "x$ac_cv_func_shl_load" = xyes; then : lt_cv_dlopen="shl_load" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 $as_echo_n "checking for shl_load in -ldld... " >&6; } if ${ac_cv_lib_dld_shl_load+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shl_load (); int main () { return shl_load (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_shl_load=yes else ac_cv_lib_dld_shl_load=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 $as_echo "$ac_cv_lib_dld_shl_load" >&6; } if test "x$ac_cv_lib_dld_shl_load" = xyes; then : lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" else ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" if test "x$ac_cv_func_dlopen" = xyes; then : lt_cv_dlopen="dlopen" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 $as_echo_n "checking for dlopen in -lsvld... " >&6; } if ${ac_cv_lib_svld_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_svld_dlopen=yes else ac_cv_lib_svld_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 $as_echo "$ac_cv_lib_svld_dlopen" >&6; } if test "x$ac_cv_lib_svld_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 $as_echo_n "checking for dld_link in -ldld... " >&6; } if ${ac_cv_lib_dld_dld_link+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dld_link (); int main () { return dld_link (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_dld_link=yes else ac_cv_lib_dld_dld_link=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 $as_echo "$ac_cv_lib_dld_dld_link" >&6; } if test "x$ac_cv_lib_dld_dld_link" = xyes; then : lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" fi fi fi fi fi fi ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 $as_echo_n "checking whether a program can dlopen itself... " >&6; } if ${lt_cv_dlopen_self+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 $as_echo "$lt_cv_dlopen_self" >&6; } if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } if ${lt_cv_dlopen_self_static+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 $as_echo "$lt_cv_dlopen_self_static" >&6; } fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi striplib= old_striplib= { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 $as_echo_n "checking whether stripping libraries is possible... " >&6; } if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ;; esac fi # Report which library types will actually be built { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 $as_echo_n "checking if libtool supports shared libraries... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 $as_echo "$can_build_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 $as_echo_n "checking whether to build shared libraries... " >&6; } test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[4-9]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 $as_echo "$enable_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 $as_echo_n "checking whether to build static libraries... " >&6; } # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 $as_echo "$enable_static" >&6; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC="$lt_save_CC" ac_config_commands="$ac_config_commands libtool" # Only expand once: { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5 $as_echo_n "checking for $CC option to accept ISO C99... " >&6; } if ${ac_cv_prog_cc_c99+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c99=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include #include // Check varargs macros. These examples are taken from C99 6.10.3.5. #define debug(...) fprintf (stderr, __VA_ARGS__) #define showlist(...) puts (#__VA_ARGS__) #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__)) static void test_varargs_macros (void) { int x = 1234; int y = 5678; debug ("Flag"); debug ("X = %d\n", x); showlist (The first, second, and third items.); report (x>y, "x is %d but y is %d", x, y); } // Check long long types. #define BIG64 18446744073709551615ull #define BIG32 4294967295ul #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0) #if !BIG_OK your preprocessor is broken; #endif #if BIG_OK #else your preprocessor is broken; #endif static long long int bignum = -9223372036854775807LL; static unsigned long long int ubignum = BIG64; struct incomplete_array { int datasize; double data[]; }; struct named_init { int number; const wchar_t *name; double average; }; typedef const char *ccp; static inline int test_restrict (ccp restrict text) { // See if C++-style comments work. // Iterate through items via the restricted pointer. // Also check for declarations in for loops. for (unsigned int i = 0; *(text+i) != '\0'; ++i) continue; return 0; } // Check varargs and va_copy. static void test_varargs (const char *format, ...) { va_list args; va_start (args, format); va_list args_copy; va_copy (args_copy, args); const char *str; int number; float fnumber; while (*format) { switch (*format++) { case 's': // string str = va_arg (args_copy, const char *); break; case 'd': // int number = va_arg (args_copy, int); break; case 'f': // float fnumber = va_arg (args_copy, double); break; default: break; } } va_end (args_copy); va_end (args); } int main () { // Check bool. _Bool success = false; // Check restrict. if (test_restrict ("String literal") == 0) success = true; char *restrict newvar = "Another string"; // Check varargs. test_varargs ("s, d' f .", "string", 65, 34.234); test_varargs_macros (); // Check flexible array members. struct incomplete_array *ia = malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10)); ia->datasize = 10; for (int i = 0; i < ia->datasize; ++i) ia->data[i] = i * 1.234; // Check named initializers. struct named_init ni = { .number = 34, .name = L"Test wide string", .average = 543.34343, }; ni.number = 58; int dynamic_array[ni.number]; dynamic_array[ni.number - 1] = 543; // work around unused variable warnings return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x' || dynamic_array[ni.number - 1] != 543); ; return 0; } _ACEOF for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99 do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c99=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c99" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c99" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c99" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 $as_echo "$ac_cv_prog_cc_c99" >&6; } ;; esac if test "x$ac_cv_prog_cc_c99" != xno; then : fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 $as_echo_n "checking for an ANSI C-conforming const... " >&6; } if ${ac_cv_c_const+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __cplusplus /* Ultrix mips cc rejects this sort of thing. */ typedef int charset[2]; const charset cs = { 0, 0 }; /* SunOS 4.1.1 cc rejects this. */ char const *const *pcpcc; char **ppc; /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; /* AIX XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ const char *g = "string"; pcpcc = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ ++pcpcc; ppc = (char**) pcpcc; pcpcc = (char const *const *) ppc; { /* SCO 3.2v4 cc rejects this sort of thing. */ char tx; char *t = &tx; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; if (s) return 0; } { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ int x[] = {25, 17}; const int *foo = &x[0]; ++foo; } { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ typedef const int *iptr; iptr p = 0; ++p; } { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; } bx; struct s *b = &bx; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; if (!foo) return 0; } return !cs[0] && !zero.x; #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_const=yes else ac_cv_c_const=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 $as_echo "$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then $as_echo "#define const /**/" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 $as_echo_n "checking for inline... " >&6; } if ${ac_cv_c_inline+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __cplusplus typedef int foo_t; static $ac_kw foo_t static_foo () {return 0; } $ac_kw foo_t foo () {return 0; } #endif _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_inline=$ac_kw fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext test "$ac_cv_c_inline" != no && break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 $as_echo "$ac_cv_c_inline" >&6; } case $ac_cv_c_inline in inline | yes) ;; *) case $ac_cv_c_inline in no) ac_val=;; *) ac_val=$ac_cv_c_inline;; esac cat >>confdefs.h <<_ACEOF #ifndef __cplusplus #define inline $ac_val #endif _ACEOF ;; esac # By default we simply use the C compiler to build assembly code. test "${CCAS+set}" = set || CCAS=$CC test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS depcc="$CCAS" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CCAS_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CCAS_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CCAS_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CCAS_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CCAS_dependencies_compiler_type" >&5 $as_echo "$am_cv_CCAS_dependencies_compiler_type" >&6; } CCASDEPMODE=depmode=$am_cv_CCAS_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CCAS_dependencies_compiler_type" = gcc3; then am__fastdepCCAS_TRUE= am__fastdepCCAS_FALSE='#' else am__fastdepCCAS_TRUE='#' am__fastdepCCAS_FALSE= fi $as_echo "#define OPUS_BUILD /**/" >>confdefs.h #Use a hacked up version of autoconf's AC_C_RESTRICT because it's not #strong enough a test to detect old buggy versions of GCC (e.g. 2.95.3) #Note: Both this and the test for variable-size arrays below are also # done by AC_PROG_CC_C99, but not thoroughly enough apparently. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5 $as_echo_n "checking for C/C++ restrict keyword... " >&6; } if ${ac_cv_c_restrict+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_c_restrict=no # The order here caters to the fact that C++ does not require restrict. for ac_kw in __restrict __restrict__ _Restrict restrict; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ typedef int * int_ptr; int foo (int_ptr $ac_kw ip, int * $ac_kw baz[]) { return ip[0]; } int main () { int s[1]; int * $ac_kw t = s; t[0] = 0; return foo(t, (void *)0) ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_restrict=$ac_kw fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext test "$ac_cv_c_restrict" != no && break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5 $as_echo "$ac_cv_c_restrict" >&6; } case $ac_cv_c_restrict in restrict) ;; no) $as_echo "#define restrict /**/" >>confdefs.h ;; *) cat >>confdefs.h <<_ACEOF #define restrict $ac_cv_c_restrict _ACEOF ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C99 variable-size arrays" >&5 $as_echo_n "checking for C99 variable-size arrays... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { static int x; char a[++x]; a[sizeof a - 1] = 0; int N; return a[0]; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : has_var_arrays=yes use_alloca="no (using var arrays)" $as_echo "#define VAR_ARRAYS 1" >>confdefs.h else has_var_arrays=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_var_arrays" >&5 $as_echo "$has_var_arrays" >&6; } if test "$has_var_arrays" = "no"; then : for ac_header in alloca.h do : ac_fn_c_check_header_mongrel "$LINENO" "alloca.h" "ac_cv_header_alloca_h" "$ac_includes_default" if test "x$ac_cv_header_alloca_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_ALLOCA_H 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 $as_echo_n "checking for alloca... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { int foo=10; int *array = alloca(foo); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : use_alloca=yes; $as_echo "#define USE_ALLOCA /**/" >>confdefs.h else use_alloca=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $use_alloca" >&5 $as_echo "$use_alloca" >&6; } fi LIBM= case $host in *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mwvalidcheckl in -lmw" >&5 $as_echo_n "checking for _mwvalidcheckl in -lmw... " >&6; } if ${ac_cv_lib_mw__mwvalidcheckl+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lmw $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char _mwvalidcheckl (); int main () { return _mwvalidcheckl (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_mw__mwvalidcheckl=yes else ac_cv_lib_mw__mwvalidcheckl=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mw__mwvalidcheckl" >&5 $as_echo "$ac_cv_lib_mw__mwvalidcheckl" >&6; } if test "x$ac_cv_lib_mw__mwvalidcheckl" = xyes; then : LIBM="-lmw" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5 $as_echo_n "checking for cos in -lm... " >&6; } if ${ac_cv_lib_m_cos+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char cos (); int main () { return cos (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_m_cos=yes else ac_cv_lib_m_cos=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5 $as_echo "$ac_cv_lib_m_cos" >&6; } if test "x$ac_cv_lib_m_cos" = xyes; then : LIBM="$LIBM -lm" fi ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5 $as_echo_n "checking for cos in -lm... " >&6; } if ${ac_cv_lib_m_cos+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char cos (); int main () { return cos (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_m_cos=yes else ac_cv_lib_m_cos=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5 $as_echo "$ac_cv_lib_m_cos" >&6; } if test "x$ac_cv_lib_m_cos" = xyes; then : LIBM="-lm" fi ;; esac # Check whether --enable-fixed-point was given. if test "${enable_fixed_point+set}" = set; then : enableval=$enable_fixed_point; else enable_fixed_point=no fi if test "$enable_fixed_point" = "yes"; then : enable_float="no" $as_echo "#define FIXED_POINT 1" >>confdefs.h PC_BUILD="fixed-point" else enable_float="yes"; PC_BUILD="floating-point" fi if test "$enable_fixed_point" = "yes"; then FIXED_POINT_TRUE= FIXED_POINT_FALSE='#' else FIXED_POINT_TRUE='#' FIXED_POINT_FALSE= fi # Check whether --enable-fixed-point-debug was given. if test "${enable_fixed_point_debug+set}" = set; then : enableval=$enable_fixed_point_debug; else enable_fixed_point_debug=no fi if test "$enable_fixed_point_debug" = "yes"; then : $as_echo "#define FIXED_DEBUG 1" >>confdefs.h fi # Check whether --enable-float_api was given. if test "${enable_float_api+set}" = set; then : enableval=$enable_float_api; else enable_float_api=yes fi if test "$enable_float_api" = "no"; then DISABLE_FLOAT_API_TRUE= DISABLE_FLOAT_API_FALSE='#' else DISABLE_FLOAT_API_TRUE='#' DISABLE_FLOAT_API_FALSE= fi if test "$enable_float_api" = "no"; then : $as_echo "#define DISABLE_FLOAT_API 1" >>confdefs.h fi # Check whether --enable-custom-modes was given. if test "${enable_custom_modes+set}" = set; then : enableval=$enable_custom_modes; else enable_custom_modes=no fi if test "$enable_custom_modes" = "yes"; then : $as_echo "#define CUSTOM_MODES 1" >>confdefs.h PC_BUILD="$PC_BUILD, custom modes" fi if test "$enable_custom_modes" = "yes"; then CUSTOM_MODES_TRUE= CUSTOM_MODES_FALSE='#' else CUSTOM_MODES_TRUE='#' CUSTOM_MODES_FALSE= fi has_float_approx=no #case "$host_cpu" in #i[[3456]]86 | x86_64 | powerpc64 | powerpc32 | ia64) # has_float_approx=yes # ;; #esac # Check whether --enable-float-approx was given. if test "${enable_float_approx+set}" = set; then : enableval=$enable_float_approx; if test "$enable_float_approx" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Floating point approximations are not supported on all platforms." >&5 $as_echo "$as_me: WARNING: Floating point approximations are not supported on all platforms." >&2;} fi else enable_float_approx=$has_float_approx fi if test "$enable_float_approx" = "yes"; then : $as_echo "#define FLOAT_APPROX 1" >>confdefs.h fi # Check whether --enable-asm was given. if test "${enable_asm+set}" = set; then : enableval=$enable_asm; else enable_asm=yes fi # Check whether --enable-rtcd was given. if test "${enable_rtcd+set}" = set; then : enableval=$enable_rtcd; else enable_rtcd=yes fi # Check whether --enable-intrinsics was given. if test "${enable_intrinsics+set}" = set; then : enableval=$enable_intrinsics; else enable_intrinsics=no fi rtcd_support=no cpu_arm=no if test x"${enable_asm}" = x"yes"; then : inline_optimization="No inline ASM for your platform, please send patches" case $host_cpu in arm*) if test "$enable_float" != "yes"; then : cpu_arm=yes $as_echo "#define OPUS_ARM_ASM /**/" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports gcc-style inline assembly" >&5 $as_echo_n "checking if compiler supports gcc-style inline assembly... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifdef __GNUC_MINOR__ #if (__GNUC__ * 1000 + __GNUC_MINOR__) < 3004 #error GCC before 3.4 has critical bugs compiling inline assembly #endif #endif __asm__ (""::) ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : flag_ok=yes else flag_ok=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test "X$flag_ok" = Xyes ; then inline_optimization="ARM" true else inline_optimization="disabled" true fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $flag_ok" >&5 $as_echo "$flag_ok" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking if assembler supports EDSP instructions on ARM" >&5 $as_echo_n "checking if assembler supports EDSP instructions on ARM... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { __asm__("qadd r3,r3,r3") ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } OPUS_ARM_INLINE_EDSP=1 else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } OPUS_ARM_INLINE_EDSP=0 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: checking if assembler supports ARMv6 media instructions on ARM" >&5 $as_echo_n "checking if assembler supports ARMv6 media instructions on ARM... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { __asm__("shadd8 r3,r3,r3") ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } OPUS_ARM_INLINE_MEDIA=1 else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } OPUS_ARM_INLINE_MEDIA=0 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: checking if assembler supports NEON instructions on ARM" >&5 $as_echo_n "checking if assembler supports NEON instructions on ARM... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { __asm__("vorr d0,d0,d0") ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } OPUS_ARM_INLINE_NEON=1 else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } OPUS_ARM_INLINE_NEON=0 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test x"$inline_optimization" = x"ARM"; then : if true; then OPUS_ARM_INLINE_ASM_TRUE= OPUS_ARM_INLINE_ASM_FALSE='#' else OPUS_ARM_INLINE_ASM_TRUE='#' OPUS_ARM_INLINE_ASM_FALSE= fi $as_echo "#define OPUS_ARM_INLINE_ASM 1" >>confdefs.h if test x"$OPUS_ARM_INLINE_EDSP" = x"1"; then : $as_echo "#define OPUS_ARM_INLINE_EDSP 1" >>confdefs.h inline_optimization="$inline_optimization (EDSP)" fi if test x"$OPUS_ARM_INLINE_MEDIA" = x"1"; then : $as_echo "#define OPUS_ARM_INLINE_MEDIA 1" >>confdefs.h inline_optimization="$inline_optimization (Media)" fi if test x"$OPUS_ARM_INLINE_NEON" = x"1"; then : $as_echo "#define OPUS_ARM_INLINE_NEON 1" >>confdefs.h inline_optimization="$inline_optimization (NEON)" fi fi # Extract the first word of "perl", so it can be a program name with args. set dummy perl; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_HAVE_PERL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$HAVE_PERL"; then ac_cv_prog_HAVE_PERL="$HAVE_PERL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_HAVE_PERL="yes" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_prog_HAVE_PERL" && ac_cv_prog_HAVE_PERL="no" fi fi HAVE_PERL=$ac_cv_prog_HAVE_PERL if test -n "$HAVE_PERL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_PERL" >&5 $as_echo "$HAVE_PERL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test x"$HAVE_PERL" = x"yes"; then : if true; then OPUS_ARM_EXTERNAL_ASM_TRUE= OPUS_ARM_EXTERNAL_ASM_FALSE='#' else OPUS_ARM_EXTERNAL_ASM_TRUE='#' OPUS_ARM_EXTERNAL_ASM_FALSE= fi asm_optimization="ARM" if test x"$OPUS_ARM_INLINE_EDSP" = x"1"; then : OPUS_ARM_PRESUME_EDSP=1 OPUS_ARM_MAY_HAVE_EDSP=1 else OPUS_ARM_PRESUME_EDSP=0 OPUS_ARM_MAY_HAVE_EDSP=0 fi if test x"$OPUS_ARM_INLINE_MEDIA" = x"1"; then : OPUS_ARM_PRESUME_MEDIA=1 OPUS_ARM_MAY_HAVE_MEDIA=1 else OPUS_ARM_PRESUME_MEDIA=0 OPUS_ARM_MAY_HAVE_MEDIA=0 fi if test x"$OPUS_ARM_INLINE_NEON" = x"1"; then : OPUS_ARM_PRESUME_NEON=1 OPUS_ARM_MAY_HAVE_NEON=1 else OPUS_ARM_PRESUME_NEON=0 OPUS_ARM_MAY_HAVE_NEON=0 fi if test x"$enable_rtcd" = x"yes"; then : if test x"$OPUS_ARM_MAY_HAVE_EDSP" != x"1"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to force-enable armv5e EDSP instructions..." >&5 $as_echo "$as_me: Trying to force-enable armv5e EDSP instructions..." >&6;} { $as_echo "$as_me:${as_lineno-$LINENO}: checking if assembler supports EDSP instructions on ARM" >&5 $as_echo_n "checking if assembler supports EDSP instructions on ARM... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { __asm__(".arch armv5te\n.object_arch armv4t\nqadd r3,r3,r3") ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } OPUS_ARM_MAY_HAVE_EDSP=1 else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test x"$OPUS_ARM_MAY_HAVE_MEDIA" != x"1"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to force-enable ARMv6 media instructions..." >&5 $as_echo "$as_me: Trying to force-enable ARMv6 media instructions..." >&6;} { $as_echo "$as_me:${as_lineno-$LINENO}: checking if assembler supports ARMv6 media instructions on ARM" >&5 $as_echo_n "checking if assembler supports ARMv6 media instructions on ARM... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { __asm__(".arch armv6\n.object_arch armv4t\nshadd8 r3,r3,r3") ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } OPUS_ARM_MAY_HAVE_MEDIA=1 else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test x"$OPUS_ARM_MAY_HAVE_NEON" != x"1"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to force-enable NEON instructions..." >&5 $as_echo "$as_me: Trying to force-enable NEON instructions..." >&6;} { $as_echo "$as_me:${as_lineno-$LINENO}: checking if assembler supports NEON instructions on ARM" >&5 $as_echo_n "checking if assembler supports NEON instructions on ARM... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { __asm__(".arch armv7-a\n.fpu neon\n.object_arch armv4t\nvorr d0,d0,d0") ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } OPUS_ARM_MAY_HAVE_NEON=1 else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi fi rtcd_support= if test x"$OPUS_ARM_MAY_HAVE_EDSP" = x"1"; then : $as_echo "#define OPUS_ARM_MAY_HAVE_EDSP 1" >>confdefs.h if test x"$OPUS_ARM_PRESUME_EDSP" = x"1"; then : $as_echo "#define OPUS_ARM_PRESUME_EDSP 1" >>confdefs.h asm_optimization="$asm_optimization (EDSP)" else rtcd_support="$rtcd_support (EDSP)" fi fi if test x"$OPUS_ARM_MAY_HAVE_MEDIA" = x"1"; then : $as_echo "#define OPUS_ARM_MAY_HAVE_MEDIA 1" >>confdefs.h if test x"$OPUS_ARM_PRESUME_MEDIA" = x"1"; then : $as_echo "#define OPUS_ARM_PRESUME_MEDIA 1" >>confdefs.h asm_optimization="$asm_optimization (Media)" else rtcd_support="$rtcd_support (Media)" fi fi if test x"$OPUS_ARM_MAY_HAVE_NEON" = x"1"; then : $as_echo "#define OPUS_ARM_MAY_HAVE_NEON 1" >>confdefs.h if test x"$OPUS_ARM_PRESUME_NEON" = x"1"; then : $as_echo "#define OPUS_ARM_PRESUME_NEON 1" >>confdefs.h asm_optimization="$asm_optimization (NEON)" else rtcd_support="$rtcd_support (NEON)" fi fi if test x"$rtcd_support" != x""; then : rtcd_support=ARM"$rtcd_support" else rtcd_support="no" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for apple style tools" >&5 $as_echo_n "checking for apple style tools... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __APPLE__ #error 1 #endif int main () { ; return 0; } _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; }; ARM2GNU_PARAMS="--apple" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; }; ARM2GNU_PARAMS="" fi rm -f conftest.err conftest.i conftest.$ac_ext else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** ARM assembly requires perl -- disabling optimizations" >&5 $as_echo "$as_me: WARNING: *** ARM assembly requires perl -- disabling optimizations" >&2;} asm_optimization="(missing perl dependency for ARM)" fi fi ;; esac else inline_optimization="disabled" asm_optimization="disabled" fi if test x"${inline_optimization%% *}" = x"ARM"; then OPUS_ARM_INLINE_ASM_TRUE= OPUS_ARM_INLINE_ASM_FALSE='#' else OPUS_ARM_INLINE_ASM_TRUE='#' OPUS_ARM_INLINE_ASM_FALSE= fi if test x"${asm_optimization%% *}" = x"ARM"; then OPUS_ARM_EXTERNAL_ASM_TRUE= OPUS_ARM_EXTERNAL_ASM_FALSE='#' else OPUS_ARM_EXTERNAL_ASM_TRUE='#' OPUS_ARM_EXTERNAL_ASM_FALSE= fi if false; then HAVE_SSE_TRUE= HAVE_SSE_FALSE='#' else HAVE_SSE_TRUE='#' HAVE_SSE_FALSE= fi if false; then HAVE_SSE2_TRUE= HAVE_SSE2_FALSE='#' else HAVE_SSE2_TRUE='#' HAVE_SSE2_FALSE= fi if false; then HAVE_SSE4_1_TRUE= HAVE_SSE4_1_FALSE='#' else HAVE_SSE4_1_TRUE='#' HAVE_SSE4_1_FALSE= fi if false; then HAVE_AVX_TRUE= HAVE_AVX_FALSE='#' else HAVE_AVX_TRUE='#' HAVE_AVX_FALSE= fi # With GCC on ARM32 softfp architectures (e.g. Android, or older Ubuntu) you need to specify # -mfloat-abi=softfp for -mfpu=neon to work. However, on ARM32 hardfp architectures (e.g. newer Ubuntu), # this option will break things. # As a heuristic, if host matches arm*eabi* but not arm*hf*, it's probably soft-float. case $host in #( arm*hf*) : RESOLVED_DEFAULT_ARM_NEON_INTR_CFLAGS="-mfpu=neon" ;; #( arm*eabi*) : RESOLVED_DEFAULT_ARM_NEON_INTR_CFLAGS="-mfpu=neon -mfloat-abi=softfp" ;; #( *) : RESOLVED_DEFAULT_ARM_NEON_INTR_CFLAGS="-mfpu=neon" ;; esac if ${X86_SSE_CFLAGS+:} false; then : else X86_SSE_CFLAGS="-msse" fi if ${X86_SSE2_CFLAGS+:} false; then : else X86_SSE2_CFLAGS="-msse2" fi if ${X86_SSE4_1_CFLAGS+:} false; then : else X86_SSE4_1_CFLAGS="-msse4.1" fi if ${X86_AVX_CFLAGS+:} false; then : else X86_AVX_CFLAGS="-mavx" fi if ${ARM_NEON_INTR_CFLAGS+:} false; then : else ARM_NEON_INTR_CFLAGS="$RESOLVED_DEFAULT_ARM_NEON_INTR_CFLAGS" fi if test x"$enable_intrinsics" = x"yes"; then : intrinsics_support="" case $host_cpu in #( arm*) : cpu_arm=yes { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports ARM Neon intrinsics" >&5 $as_echo_n "checking if compiler supports ARM Neon intrinsics... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { static float32x4_t A0, A1, SUMM; SUMM = vmlaq_f32(SUMM, A0, A1); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : OPUS_ARM_MAY_HAVE_NEON_INTR=1 OPUS_ARM_PRESUME_NEON_INTR=1 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else OPUS_ARM_PRESUME_NEON_INTR=0 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports ARM Neon intrinsics with $ARM_NEON_INTR_CFLAGS" >&5 $as_echo_n "checking if compiler supports ARM Neon intrinsics with $ARM_NEON_INTR_CFLAGS... " >&6; } save_CFLAGS="$CFLAGS"; CFLAGS="$ARM_NEON_INTR_CFLAGS $CFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { static float32x4_t A0, A1, SUMM; SUMM = vmlaq_f32(SUMM, A0, A1); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } OPUS_ARM_MAY_HAVE_NEON_INTR=1 else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } OPUS_ARM_MAY_HAVE_NEON_INTR=0 fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext CFLAGS="$save_CFLAGS" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test x"$OPUS_ARM_MAY_HAVE_NEON_INTR" = x"1" && test x"$OPUS_ARM_PRESUME_NEON_INTR" != x"1"; then : OPUS_ARM_NEON_INTR_CFLAGS="$ARM_NEON_INTR_CFLAGS" fi if test x"$OPUS_ARM_MAY_HAVE_NEON_INTR" = x"1"; then : $as_echo "#define OPUS_ARM_MAY_HAVE_NEON_INTR 1" >>confdefs.h intrinsics_support="$intrinsics_support (Neon_Intrinsics)" if test x"enable_rtcd" != x"" && test x"$OPUS_ARM_PRESUME_NEON_INTR" != x"1"; then : rtcd_support="$rtcd_support (ARMv7_Neon_Intrinsics)" fi if test x"$OPUS_ARM_PRESUME_NEON_INTR" = x"1"; then : $as_echo "#define OPUS_ARM_PRESUME_NEON_INTR 1" >>confdefs.h fi # Check whether --with-NE10 was given. if test "${with_NE10+set}" = set; then : withval=$with_NE10; NE10_prefix="$withval" else NE10_prefix="" fi # Check whether --with-NE10-libraries was given. if test "${with_NE10_libraries+set}" = set; then : withval=$with_NE10_libraries; NE10_libraries="$withval" else NE10_libraries="" fi # Check whether --with-NE10-includes was given. if test "${with_NE10_includes+set}" = set; then : withval=$with_NE10_includes; NE10_includes="$withval" else NE10_includes="" fi if test "x$NE10_libraries" != "x" ; then NE10_LIBS="-L$NE10_libraries" elif test "x$NE10_prefix" = "xno" || test "x$NE10_prefix" = "xyes" ; then NE10_LIBS="" elif test "x$NE10_prefix" != "x" ; then NE10_LIBS="-L$NE10_prefix/lib" elif test "x$prefix" != "xNONE" ; then NE10_LIBS="-L$prefix/lib" fi if test "x$NE10_prefix" != "xno" ; then NE10_LIBS="$NE10_LIBS -lNE10" fi if test "x$NE10_includes" != "x" ; then NE10_CFLAGS="-I$NE10_includes" elif test "x$NE10_prefix" = "xno" || test "x$NE10_prefix" = "xyes" ; then NE10_CFLAGS="" elif test "x$ogg_prefix" != "x" ; then NE10_CFLAGS="-I$NE10_prefix/include" elif test "x$prefix" != "xNONE"; then NE10_CFLAGS="-I$prefix/include" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NE10" >&5 $as_echo_n "checking for NE10... " >&6; } save_CFLAGS="$CFLAGS"; CFLAGS="$NE10_CFLAGS" save_LIBS="$LIBS"; LIBS="$NE10_LIBS $LIBM" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { ne10_fft_cfg_float32_t cfg; cfg = ne10_fft_alloc_c2c_float32_neon(480); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : HAVE_ARM_NE10=1 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else HAVE_ARM_NE10=0 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } NE10_CFLAGS="" NE10_LIBS="" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext CFLAGS="$save_CFLAGS"; LIBS="$save_LIBS" #Now we know if libNE10 is installed or not if test x"$HAVE_ARM_NE10" = x"1"; then : $as_echo "#define HAVE_ARM_NE10 1" >>confdefs.h fi if test x"$NE10_LIBS" != x""; then : intrinsics_support="$intrinsics_support (NE10)" if test x"enable_rtcd" != x"" \ && test x"$OPUS_ARM_PRESUME_NEON_INTR" != x"1"; then : rtcd_support="$rtcd_support (NE10)" fi fi if test x"$rtcd_support" = x""; then : rtcd_support=no fi if test x"$intrinsics_support" = x""; then : intrinsics_support=no else intrinsics_support="arm$intrinsics_support" fi else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Compiler does not support ARM intrinsics" >&5 $as_echo "$as_me: WARNING: Compiler does not support ARM intrinsics" >&2;} intrinsics_support=no fi ;; #( i?86|x86_64) : { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports SSE intrinsics" >&5 $as_echo_n "checking if compiler supports SSE intrinsics... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { static __m128 mtest; mtest = _mm_setzero_ps(); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : OPUS_X86_MAY_HAVE_SSE=1 OPUS_X86_PRESUME_SSE=1 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else OPUS_X86_PRESUME_SSE=0 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports SSE intrinsics with $X86_SSE_CFLAGS" >&5 $as_echo_n "checking if compiler supports SSE intrinsics with $X86_SSE_CFLAGS... " >&6; } save_CFLAGS="$CFLAGS"; CFLAGS="$X86_SSE_CFLAGS $CFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { static __m128 mtest; mtest = _mm_setzero_ps(); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } OPUS_X86_MAY_HAVE_SSE=1 else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } OPUS_X86_MAY_HAVE_SSE=0 fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext CFLAGS="$save_CFLAGS" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test x"$OPUS_X86_MAY_HAVE_SSE" = x"1" && test x"$OPUS_X86_PRESUME_SSE" != x"1"; then : OPUS_X86_SSE_CFLAGS="$X86_SSE_CFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports SSE2 intrinsics" >&5 $as_echo_n "checking if compiler supports SSE2 intrinsics... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { static __m128i mtest; mtest = _mm_setzero_si128(); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : OPUS_X86_MAY_HAVE_SSE2=1 OPUS_X86_PRESUME_SSE2=1 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else OPUS_X86_PRESUME_SSE2=0 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports SSE2 intrinsics with $X86_SSE2_CFLAGS" >&5 $as_echo_n "checking if compiler supports SSE2 intrinsics with $X86_SSE2_CFLAGS... " >&6; } save_CFLAGS="$CFLAGS"; CFLAGS="$X86_SSE2_CFLAGS $CFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { static __m128i mtest; mtest = _mm_setzero_si128(); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } OPUS_X86_MAY_HAVE_SSE2=1 else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } OPUS_X86_MAY_HAVE_SSE2=0 fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext CFLAGS="$save_CFLAGS" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test x"$OPUS_X86_MAY_HAVE_SSE2" = x"1" && test x"$OPUS_X86_PRESUME_SSE2" != x"1"; then : OPUS_X86_SSE2_CFLAGS="$X86_SSE2_CFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports SSE4.1 intrinsics" >&5 $as_echo_n "checking if compiler supports SSE4.1 intrinsics... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { static __m128i mtest; mtest = _mm_setzero_si128(); mtest = _mm_cmpeq_epi64(mtest, mtest); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : OPUS_X86_MAY_HAVE_SSE4_1=1 OPUS_X86_PRESUME_SSE4_1=1 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else OPUS_X86_PRESUME_SSE4_1=0 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports SSE4.1 intrinsics with $X86_SSE4_1_CFLAGS" >&5 $as_echo_n "checking if compiler supports SSE4.1 intrinsics with $X86_SSE4_1_CFLAGS... " >&6; } save_CFLAGS="$CFLAGS"; CFLAGS="$X86_SSE4_1_CFLAGS $CFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { static __m128i mtest; mtest = _mm_setzero_si128(); mtest = _mm_cmpeq_epi64(mtest, mtest); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } OPUS_X86_MAY_HAVE_SSE4_1=1 else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } OPUS_X86_MAY_HAVE_SSE4_1=0 fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext CFLAGS="$save_CFLAGS" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test x"$OPUS_X86_MAY_HAVE_SSE4_1" = x"1" && test x"$OPUS_X86_PRESUME_SSE4_1" != x"1"; then : OPUS_X86_SSE4_1_CFLAGS="$X86_SSE4_1_CFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports AVX intrinsics" >&5 $as_echo_n "checking if compiler supports AVX intrinsics... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { static __m256 mtest; mtest = _mm256_setzero_ps(); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : OPUS_X86_MAY_HAVE_AVX=1 OPUS_X86_PRESUME_AVX=1 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else OPUS_X86_PRESUME_AVX=0 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports AVX intrinsics with $X86_AVX_CFLAGS" >&5 $as_echo_n "checking if compiler supports AVX intrinsics with $X86_AVX_CFLAGS... " >&6; } save_CFLAGS="$CFLAGS"; CFLAGS="$X86_AVX_CFLAGS $CFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { static __m256 mtest; mtest = _mm256_setzero_ps(); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } OPUS_X86_MAY_HAVE_AVX=1 else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } OPUS_X86_MAY_HAVE_AVX=0 fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext CFLAGS="$save_CFLAGS" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test x"$OPUS_X86_MAY_HAVE_AVX" = x"1" && test x"$OPUS_X86_PRESUME_AVX" != x"1"; then : OPUS_X86_AVX_CFLAGS="$X86_AVX_CFLAGS" fi if test x"$rtcd_support" = x"no"; then : rtcd_support="" fi if test x"$OPUS_X86_MAY_HAVE_SSE" = x"1"; then : $as_echo "#define OPUS_X86_MAY_HAVE_SSE 1" >>confdefs.h intrinsics_support="$intrinsics_support SSE" if test x"$OPUS_X86_PRESUME_SSE" = x"1"; then : $as_echo "#define OPUS_X86_PRESUME_SSE 1" >>confdefs.h else rtcd_support="$rtcd_support SSE" fi else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Compiler does not support SSE intrinsics" >&5 $as_echo "$as_me: WARNING: Compiler does not support SSE intrinsics" >&2;} fi if test x"$OPUS_X86_MAY_HAVE_SSE2" = x"1"; then : $as_echo "#define OPUS_X86_MAY_HAVE_SSE2 1" >>confdefs.h intrinsics_support="$intrinsics_support SSE2" if test x"$OPUS_X86_PRESUME_SSE2" = x"1"; then : $as_echo "#define OPUS_X86_PRESUME_SSE2 1" >>confdefs.h else rtcd_support="$rtcd_support SSE2" fi else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Compiler does not support SSE2 intrinsics" >&5 $as_echo "$as_me: WARNING: Compiler does not support SSE2 intrinsics" >&2;} fi if test x"$OPUS_X86_MAY_HAVE_SSE4_1" = x"1"; then : $as_echo "#define OPUS_X86_MAY_HAVE_SSE4_1 1" >>confdefs.h intrinsics_support="$intrinsics_support SSE4.1" if test x"$OPUS_X86_PRESUME_SSE4_1" = x"1"; then : $as_echo "#define OPUS_X86_PRESUME_SSE4_1 1" >>confdefs.h else rtcd_support="$rtcd_support SSE4.1" fi else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Compiler does not support SSE4.1 intrinsics" >&5 $as_echo "$as_me: WARNING: Compiler does not support SSE4.1 intrinsics" >&2;} fi if test x"$OPUS_X86_MAY_HAVE_AVX" = x"1"; then : $as_echo "#define OPUS_X86_MAY_HAVE_AVX 1" >>confdefs.h intrinsics_support="$intrinsics_support AVX" if test x"$OPUS_X86_PRESUME_AVX" = x"1"; then : $as_echo "#define OPUS_X86_PRESUME_AVX 1" >>confdefs.h else rtcd_support="$rtcd_support AVX" fi else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Compiler does not support AVX intrinsics" >&5 $as_echo "$as_me: WARNING: Compiler does not support AVX intrinsics" >&2;} fi if test x"$intrinsics_support" = x""; then : intrinsics_support=no else intrinsics_support="x86$intrinsics_support" fi if test x"$rtcd_support" = x""; then : rtcd_support=no elif rtcd_support="x86$rtcd_support"; then : fi if test x"$enable_rtcd" = x"yes" && test x"$rtcd_support" != x""; then : get_cpuid_by_asm="no" { $as_echo "$as_me:${as_lineno-$LINENO}: checking How to get X86 CPU Info" >&5 $as_echo_n "checking How to get X86 CPU Info... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { unsigned int CPUInfo0; unsigned int CPUInfo1; unsigned int CPUInfo2; unsigned int CPUInfo3; unsigned int InfoType; __asm__ __volatile__ ( "cpuid": "=a" (CPUInfo0), "=b" (CPUInfo1), "=c" (CPUInfo2), "=d" (CPUInfo3) : "a" (InfoType), "c" (0) ); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : get_cpuid_by_asm="yes" { $as_echo "$as_me:${as_lineno-$LINENO}: result: Inline Assembly" >&5 $as_echo "Inline Assembly" >&6; } $as_echo "#define CPU_INFO_BY_ASM 1" >>confdefs.h else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { unsigned int CPUInfo0; unsigned int CPUInfo1; unsigned int CPUInfo2; unsigned int CPUInfo3; unsigned int InfoType; __get_cpuid(InfoType, &CPUInfo0, &CPUInfo1, &CPUInfo2, &CPUInfo3); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: C method" >&5 $as_echo "C method" >&6; } $as_echo "#define CPU_INFO_BY_C 1" >>confdefs.h else as_fn_error $? "no supported Get CPU Info method, please disable intrinsics" "$LINENO" 5 fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi ;; #( *) : { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No intrinsics support for your architecture" >&5 $as_echo "$as_me: WARNING: No intrinsics support for your architecture" >&2;} intrinsics_support="no" ;; esac else intrinsics_support="no" fi if test "$cpu_arm" = "yes"; then CPU_ARM_TRUE= CPU_ARM_FALSE='#' else CPU_ARM_TRUE='#' CPU_ARM_FALSE= fi if test x"$OPUS_ARM_MAY_HAVE_NEON_INTR" = x"1"; then OPUS_ARM_NEON_INTR_TRUE= OPUS_ARM_NEON_INTR_FALSE='#' else OPUS_ARM_NEON_INTR_TRUE='#' OPUS_ARM_NEON_INTR_FALSE= fi if test x"$HAVE_ARM_NE10" = x"1"; then HAVE_ARM_NE10_TRUE= HAVE_ARM_NE10_FALSE='#' else HAVE_ARM_NE10_TRUE='#' HAVE_ARM_NE10_FALSE= fi if test x"$OPUS_X86_MAY_HAVE_SSE" = x"1"; then HAVE_SSE_TRUE= HAVE_SSE_FALSE='#' else HAVE_SSE_TRUE='#' HAVE_SSE_FALSE= fi if test x"$OPUS_X86_MAY_HAVE_SSE2" = x"1"; then HAVE_SSE2_TRUE= HAVE_SSE2_FALSE='#' else HAVE_SSE2_TRUE='#' HAVE_SSE2_FALSE= fi if test x"$OPUS_X86_MAY_HAVE_SSE4_1" = x"1"; then HAVE_SSE4_1_TRUE= HAVE_SSE4_1_FALSE='#' else HAVE_SSE4_1_TRUE='#' HAVE_SSE4_1_FALSE= fi if test x"$OPUS_X86_MAY_HAVE_AVX" = x"1"; then HAVE_AVX_TRUE= HAVE_AVX_FALSE='#' else HAVE_AVX_TRUE='#' HAVE_AVX_FALSE= fi if test x"$enable_rtcd" = x"yes"; then : if test x"$rtcd_support" != x"no"; then : $as_echo "#define OPUS_HAVE_RTCD 1" >>confdefs.h OPUS_HAVE_RTCD=1 fi else rtcd_support="disabled" fi # Check whether --enable-assertions was given. if test "${enable_assertions+set}" = set; then : enableval=$enable_assertions; else enable_assertions=no fi if test "$enable_assertions" = "yes"; then : $as_echo "#define ENABLE_ASSERTIONS 1" >>confdefs.h fi # Check whether --enable-fuzzing was given. if test "${enable_fuzzing+set}" = set; then : enableval=$enable_fuzzing; else enable_fuzzing=no fi if test "$enable_fuzzing" = "yes"; then : $as_echo "#define FUZZING 1" >>confdefs.h fi # Check whether --enable-doc was given. if test "${enable_doc+set}" = set; then : enableval=$enable_doc; else enable_doc=yes fi if test "$enable_doc" = "yes"; then : # Extract the first word of "doxygen", so it can be a program name with args. set dummy doxygen; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_HAVE_DOXYGEN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$HAVE_DOXYGEN"; then ac_cv_prog_HAVE_DOXYGEN="$HAVE_DOXYGEN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_HAVE_DOXYGEN="yes" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_prog_HAVE_DOXYGEN" && ac_cv_prog_HAVE_DOXYGEN="no" fi fi HAVE_DOXYGEN=$ac_cv_prog_HAVE_DOXYGEN if test -n "$HAVE_DOXYGEN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_DOXYGEN" >&5 $as_echo "$HAVE_DOXYGEN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi else HAVE_DOXYGEN=no fi if test "$HAVE_DOXYGEN" = "yes"; then HAVE_DOXYGEN_TRUE= HAVE_DOXYGEN_FALSE='#' else HAVE_DOXYGEN_TRUE='#' HAVE_DOXYGEN_FALSE= fi # Check whether --enable-extra-programs was given. if test "${enable_extra_programs+set}" = set; then : enableval=$enable_extra_programs; else enable_extra_programs=yes fi if test "$enable_extra_programs" = "yes"; then EXTRA_PROGRAMS_TRUE= EXTRA_PROGRAMS_FALSE='#' else EXTRA_PROGRAMS_TRUE='#' EXTRA_PROGRAMS_FALSE= fi saved_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -fvisibility=hidden" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ${CC} supports -fvisibility=hidden" >&5 $as_echo_n "checking if ${CC} supports -fvisibility=hidden... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ char foo; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } CFLAGS="$saved_CFLAGS" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$CFLAGS -W" warn_CFLAGS="-Wall -Wextra -Wcast-align -Wnested-externs -Wshadow -Wstrict-prototypes" saved_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $warn_CFLAGS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ${CC} supports ${warn_CFLAGS}" >&5 $as_echo_n "checking if ${CC} supports ${warn_CFLAGS}... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ char foo; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } CFLAGS="$saved_CFLAGS" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext saved_LIBS="$LIBS" LIBS="$LIBS $LIBM" for ac_func in lrintf do : ac_fn_c_check_func "$LINENO" "lrintf" "ac_cv_func_lrintf" if test "x$ac_cv_func_lrintf" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LRINTF 1 _ACEOF fi done for ac_func in lrint do : ac_fn_c_check_func "$LINENO" "lrint" "ac_cv_func_lrint" if test "x$ac_cv_func_lrint" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LRINT 1 _ACEOF fi done LIBS="$saved_LIBS" for ac_func in __malloc_hook do : ac_fn_c_check_func "$LINENO" "__malloc_hook" "ac_cv_func___malloc_hook" if test "x$ac_cv_func___malloc_hook" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE___MALLOC_HOOK 1 _ACEOF fi done ac_config_files="$ac_config_files Makefile opus.pc opus-uninstalled.pc celt/arm/armopts.s doc/Makefile doc/Doxyfile" ac_config_headers="$ac_config_headers config.h" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else case $cache_file in #( */* | ?:*) mv -f confcache "$cache_file"$$ && mv -f "$cache_file"$$ "$cache_file" ;; #( *) mv -f confcache "$cache_file" ;; esac fi fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs { $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 $as_echo_n "checking that generated files are newer than configure... " >&6; } if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 $as_echo "done" >&6; } if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= fi if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then as_fn_error $? "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCCAS_TRUE}" && test -z "${am__fastdepCCAS_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCCAS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${FIXED_POINT_TRUE}" && test -z "${FIXED_POINT_FALSE}"; then as_fn_error $? "conditional \"FIXED_POINT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${DISABLE_FLOAT_API_TRUE}" && test -z "${DISABLE_FLOAT_API_FALSE}"; then as_fn_error $? "conditional \"DISABLE_FLOAT_API\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${CUSTOM_MODES_TRUE}" && test -z "${CUSTOM_MODES_FALSE}"; then as_fn_error $? "conditional \"CUSTOM_MODES\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${OPUS_ARM_INLINE_ASM_TRUE}" && test -z "${OPUS_ARM_INLINE_ASM_FALSE}"; then as_fn_error $? "conditional \"OPUS_ARM_INLINE_ASM\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${OPUS_ARM_EXTERNAL_ASM_TRUE}" && test -z "${OPUS_ARM_EXTERNAL_ASM_FALSE}"; then as_fn_error $? "conditional \"OPUS_ARM_EXTERNAL_ASM\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${OPUS_ARM_INLINE_ASM_TRUE}" && test -z "${OPUS_ARM_INLINE_ASM_FALSE}"; then as_fn_error $? "conditional \"OPUS_ARM_INLINE_ASM\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${OPUS_ARM_EXTERNAL_ASM_TRUE}" && test -z "${OPUS_ARM_EXTERNAL_ASM_FALSE}"; then as_fn_error $? "conditional \"OPUS_ARM_EXTERNAL_ASM\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_SSE_TRUE}" && test -z "${HAVE_SSE_FALSE}"; then as_fn_error $? "conditional \"HAVE_SSE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_SSE2_TRUE}" && test -z "${HAVE_SSE2_FALSE}"; then as_fn_error $? "conditional \"HAVE_SSE2\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_SSE4_1_TRUE}" && test -z "${HAVE_SSE4_1_FALSE}"; then as_fn_error $? "conditional \"HAVE_SSE4_1\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_AVX_TRUE}" && test -z "${HAVE_AVX_FALSE}"; then as_fn_error $? "conditional \"HAVE_AVX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${CPU_ARM_TRUE}" && test -z "${CPU_ARM_FALSE}"; then as_fn_error $? "conditional \"CPU_ARM\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${OPUS_ARM_NEON_INTR_TRUE}" && test -z "${OPUS_ARM_NEON_INTR_FALSE}"; then as_fn_error $? "conditional \"OPUS_ARM_NEON_INTR\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_ARM_NE10_TRUE}" && test -z "${HAVE_ARM_NE10_FALSE}"; then as_fn_error $? "conditional \"HAVE_ARM_NE10\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_SSE_TRUE}" && test -z "${HAVE_SSE_FALSE}"; then as_fn_error $? "conditional \"HAVE_SSE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_SSE2_TRUE}" && test -z "${HAVE_SSE2_FALSE}"; then as_fn_error $? "conditional \"HAVE_SSE2\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_SSE4_1_TRUE}" && test -z "${HAVE_SSE4_1_FALSE}"; then as_fn_error $? "conditional \"HAVE_SSE4_1\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_AVX_TRUE}" && test -z "${HAVE_AVX_FALSE}"; then as_fn_error $? "conditional \"HAVE_AVX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_DOXYGEN_TRUE}" && test -z "${HAVE_DOXYGEN_FALSE}"; then as_fn_error $? "conditional \"HAVE_DOXYGEN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EXTRA_PROGRAMS_TRUE}" && test -z "${EXTRA_PROGRAMS_FALSE}"; then as_fn_error $? "conditional \"EXTRA_PROGRAMS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by opus $as_me 1.1.1, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ opus config.status 1.1.1 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; --*=) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`' host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`' build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`' build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`' SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`' Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`' GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`' EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`' FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`' LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`' NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`' LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`' max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`' ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`' exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`' old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`' lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`' CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`' CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`' compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`' GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`' OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`' libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`' shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`' extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`' archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`' enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`' export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`' whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`' compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`' old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`' archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`' archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`' module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`' module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`' with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`' allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`' no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`' hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`' hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`' hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`' hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`' hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`' hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`' version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`' runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`' shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`' shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`' libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`' library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`' soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`' install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`' postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`' postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`' finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`' finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`' hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`' old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`' striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`' LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$1 _LTECHO_EOF' } # Quote evaled strings. for var in SHELL \ ECHO \ PATH_SEPARATOR \ SED \ GREP \ EGREP \ FGREP \ LD \ NM \ LN_S \ lt_SP2NL \ lt_NL2SP \ reload_flag \ OBJDUMP \ deplibs_check_method \ file_magic_cmd \ file_magic_glob \ want_nocaseglob \ DLLTOOL \ sharedlib_from_linklib_cmd \ AR \ AR_FLAGS \ archiver_list_spec \ STRIP \ RANLIB \ CC \ CFLAGS \ compiler \ lt_cv_sys_global_symbol_pipe \ lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ nm_file_list_spec \ lt_prog_compiler_no_builtin_flag \ lt_prog_compiler_pic \ lt_prog_compiler_wl \ lt_prog_compiler_static \ lt_cv_prog_compiler_c_o \ need_locks \ MANIFEST_TOOL \ DSYMUTIL \ NMEDIT \ LIPO \ OTOOL \ OTOOL64 \ shrext_cmds \ export_dynamic_flag_spec \ whole_archive_flag_spec \ compiler_needs_object \ with_gnu_ld \ allow_undefined_flag \ no_undefined_flag \ hardcode_libdir_flag_spec \ hardcode_libdir_separator \ exclude_expsyms \ include_expsyms \ file_list_spec \ variables_saved_for_relink \ libname_spec \ library_names_spec \ soname_spec \ install_override_mode \ finish_eval \ old_striplib \ striplib; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in reload_cmds \ old_postinstall_cmds \ old_postuninstall_cmds \ old_archive_cmds \ extract_expsyms_cmds \ old_archive_from_new_cmds \ old_archive_from_expsyms_cmds \ archive_cmds \ archive_expsym_cmds \ module_cmds \ module_expsym_cmds \ export_symbols_cmds \ prelink_cmds \ postlink_cmds \ postinstall_cmds \ postuninstall_cmds \ finish_cmds \ sys_lib_search_path_spec \ sys_lib_dlsearch_path_spec; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done ac_aux_dir='$ac_aux_dir' xsi_shell='$xsi_shell' lt_shell_append='$lt_shell_append' # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi PACKAGE='$PACKAGE' VERSION='$VERSION' TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile' _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "opus.pc") CONFIG_FILES="$CONFIG_FILES opus.pc" ;; "opus-uninstalled.pc") CONFIG_FILES="$CONFIG_FILES opus-uninstalled.pc" ;; "celt/arm/armopts.s") CONFIG_FILES="$CONFIG_FILES celt/arm/armopts.s" ;; "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; "doc/Doxyfile") CONFIG_FILES="$CONFIG_FILES doc/Doxyfile" ;; "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= ac_tmp= trap 'exit_status=$? : "${ac_tmp:=$tmp}" { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_tt=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_tt"; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #undef with comments. This is necessary, for example, # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" case $ac_file in -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$_am_arg" : 'X\(//\)[^/]' \| \ X"$_am_arg" : 'X\(//\)$' \| \ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`/stamp-h$_am_stamp_count ;; :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named 'Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running 'make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "$am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir=$dirpart/$fdir; as_fn_mkdir_p # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ;; "libtool":C) # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi cfgfile="${ofile}T" trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. # # GNU Libtool is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of # the License, or (at your option) any later version. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, or # obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # The names of the tagged configurations supported by this script. available_tags="" # ### BEGIN LIBTOOL CONFIG # Which release of libtool.m4 was used? macro_version=$macro_version macro_revision=$macro_revision # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # What type of objects to build. pic_mode=$pic_mode # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # An echo program that protects backslashes. ECHO=$lt_ECHO # The PATH separator for the build system. PATH_SEPARATOR=$lt_PATH_SEPARATOR # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="\$SED -e 1s/^X//" # A grep program that handles long lines. GREP=$lt_GREP # An ERE matcher. EGREP=$lt_EGREP # A literal string matcher. FGREP=$lt_FGREP # A BSD- or MS-compatible name lister. NM=$lt_NM # Whether we need soft or hard links. LN_S=$lt_LN_S # What is the maximum length of a command? max_cmd_len=$max_cmd_len # Object file suffix (normally "o"). objext=$ac_objext # Executable file suffix (normally ""). exeext=$exeext # whether the shell understands "unset". lt_unset=$lt_unset # turn spaces into newlines. SP2NL=$lt_lt_SP2NL # turn newlines into spaces. NL2SP=$lt_lt_NL2SP # convert \$build file names to \$host format. to_host_file_cmd=$lt_cv_to_host_file_cmd # convert \$build files to toolchain format. to_tool_file_cmd=$lt_cv_to_tool_file_cmd # An object symbol dumper. OBJDUMP=$lt_OBJDUMP # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method = "file_magic". file_magic_cmd=$lt_file_magic_cmd # How to find potential files when deplibs_check_method = "file_magic". file_magic_glob=$lt_file_magic_glob # Find potential files using nocaseglob when deplibs_check_method = "file_magic". want_nocaseglob=$lt_want_nocaseglob # DLL creation program. DLLTOOL=$lt_DLLTOOL # Command to associate shared and link libraries. sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd # The archiver. AR=$lt_AR # Flags to create an archive. AR_FLAGS=$lt_AR_FLAGS # How to feed a file listing to the archiver. archiver_list_spec=$lt_archiver_list_spec # A symbol stripping program. STRIP=$lt_STRIP # Commands used to install an old-style archive. RANLIB=$lt_RANLIB old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Whether to use a lock for old archive extraction. lock_old_archive_extraction=$lock_old_archive_extraction # A C compiler. LTCC=$lt_CC # LTCC compiler flags. LTCFLAGS=$lt_CFLAGS # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration. global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair. global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # Transform the output of nm in a C name address pair when lib prefix is needed. global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix # Specify filename containing input files for \$NM. nm_file_list_spec=$lt_nm_file_list_spec # The root where to search for dependent libraries,and in which our libraries should be installed. lt_sysroot=$lt_sysroot # The name of the directory that contains temporary libtool files. objdir=$objdir # Used to examine libraries when file_magic_cmd begins with "file". MAGIC_CMD=$MAGIC_CMD # Must we lock files when doing compilation? need_locks=$lt_need_locks # Manifest tool. MANIFEST_TOOL=$lt_MANIFEST_TOOL # Tool to manipulate archived DWARF debug symbol files on Mac OS X. DSYMUTIL=$lt_DSYMUTIL # Tool to change global to local symbols on Mac OS X. NMEDIT=$lt_NMEDIT # Tool to manipulate fat objects and archives on Mac OS X. LIPO=$lt_LIPO # ldd/readelf like tool for Mach-O binaries on Mac OS X. OTOOL=$lt_OTOOL # ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. OTOOL64=$lt_OTOOL64 # Old archive suffix (normally "a"). libext=$libext # Shared library suffix (normally ".so"). shrext_cmds=$lt_shrext_cmds # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Variables whose values should be saved in libtool wrapper scripts and # restored at link time. variables_saved_for_relink=$lt_variables_saved_for_relink # Do we need the "lib" prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Library versioning type. version_type=$version_type # Shared library runtime path variable. runpath_var=$runpath_var # Shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Permission mode override for installation of shared libraries. install_override_mode=$lt_install_override_mode # Command to use after installation of a shared archive. postinstall_cmds=$lt_postinstall_cmds # Command to use after uninstallation of a shared archive. postuninstall_cmds=$lt_postuninstall_cmds # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # As "finish_cmds", except a single script fragment to be evaled but # not shown. finish_eval=$lt_finish_eval # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Compile-time system search path for libraries. sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries. sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # The linker used to build libraries. LD=$lt_LD # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds # A language specific compiler. CC=$lt_compiler # Is the compiler the GNU compiler? with_gcc=$GCC # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc # Whether or not to disallow shared libs when runtime libs are static. allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec # Whether the compiler copes with passing no objects directly. compiler_needs_object=$lt_compiler_needs_object # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds # Commands used to build a shared archive. archive_cmds=$lt_archive_cmds archive_expsym_cmds=$lt_archive_expsym_cmds # Commands used to build a loadable module if different from building # a shared archive. module_cmds=$lt_module_cmds module_expsym_cmds=$lt_module_expsym_cmds # Whether we are building with GNU ld or not. with_gnu_ld=$lt_with_gnu_ld # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag # Flag that enforces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary and the resulting library dependency is # "absolute",i.e impossible to change by setting \${shlibpath_var} if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute # Set to "yes" if using the -LDIR flag during linking hardcodes DIR # into the resulting binary. hardcode_minus_L=$hardcode_minus_L # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR # into the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var # Set to "yes" if building a shared library automatically hardcodes DIR # into the library and all subsequent libraries and executables linked # against it. hardcode_automatic=$hardcode_automatic # Set to yes if linker adds runtime paths of dependent libraries # to runtime path list. inherit_rpath=$inherit_rpath # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms # Symbols that must always be exported. include_expsyms=$lt_include_expsyms # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds # Commands necessary for finishing linking programs. postlink_cmds=$lt_postlink_cmds # Specify filename containing input files. file_list_spec=$lt_file_list_spec # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action # ### END LIBTOOL CONFIG _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac ltmain="$ac_aux_dir/ltmain.sh" # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) if test x"$xsi_shell" = xyes; then sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ func_dirname ()\ {\ \ case ${1} in\ \ */*) func_dirname_result="${1%/*}${2}" ;;\ \ * ) func_dirname_result="${3}" ;;\ \ esac\ } # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_basename ()$/,/^} # func_basename /c\ func_basename ()\ {\ \ func_basename_result="${1##*/}"\ } # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ func_dirname_and_basename ()\ {\ \ case ${1} in\ \ */*) func_dirname_result="${1%/*}${2}" ;;\ \ * ) func_dirname_result="${3}" ;;\ \ esac\ \ func_basename_result="${1##*/}"\ } # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ func_stripname ()\ {\ \ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ \ # positional parameters, so assign one to ordinary parameter first.\ \ func_stripname_result=${3}\ \ func_stripname_result=${func_stripname_result#"${1}"}\ \ func_stripname_result=${func_stripname_result%"${2}"}\ } # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ func_split_long_opt ()\ {\ \ func_split_long_opt_name=${1%%=*}\ \ func_split_long_opt_arg=${1#*=}\ } # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ func_split_short_opt ()\ {\ \ func_split_short_opt_arg=${1#??}\ \ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ } # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ func_lo2o ()\ {\ \ case ${1} in\ \ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ \ *) func_lo2o_result=${1} ;;\ \ esac\ } # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_xform ()$/,/^} # func_xform /c\ func_xform ()\ {\ func_xform_result=${1%.*}.lo\ } # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_arith ()$/,/^} # func_arith /c\ func_arith ()\ {\ func_arith_result=$(( $* ))\ } # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_len ()$/,/^} # func_len /c\ func_len ()\ {\ func_len_result=${#1}\ } # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: fi if test x"$lt_shell_append" = xyes; then sed -e '/^func_append ()$/,/^} # func_append /c\ func_append ()\ {\ eval "${1}+=\\${2}"\ } # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ func_append_quoted ()\ {\ \ func_quote_for_eval "${2}"\ \ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ } # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: # Save a `func_append' function call where possible by direct use of '+=' sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: else # Save a `func_append' function call even when '+=' is not available sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: fi if test x"$_lt_function_replace_fail" = x":"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 $as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} fi mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi { $as_echo "$as_me:${as_lineno-$LINENO}: ------------------------------------------------------------------------ $PACKAGE_NAME $PACKAGE_VERSION: Automatic configuration OK. Compiler support: C99 var arrays: ................ ${has_var_arrays} C99 lrintf: .................... ${ac_cv_func_lrintf} Use alloca: .................... ${use_alloca} General configuration: Floating point support: ........ ${enable_float} Fast float approximations: ..... ${enable_float_approx} Fixed point debugging: ......... ${enable_fixed_point_debug} Inline Assembly Optimizations: . ${inline_optimization} External Assembly Optimizations: ${asm_optimization} Intrinsics Optimizations.......: ${intrinsics_support} Run-time CPU detection: ........ ${rtcd_support} Custom modes: .................. ${enable_custom_modes} Assertion checking: ............ ${enable_assertions} Fuzzing: ....................... ${enable_fuzzing} API documentation: ............. ${enable_doc} Extra programs: ................ ${enable_extra_programs} ------------------------------------------------------------------------ Type \"make; make install\" to compile and install Type \"make check\" to run the test suite " >&5 $as_echo "$as_me: ------------------------------------------------------------------------ $PACKAGE_NAME $PACKAGE_VERSION: Automatic configuration OK. Compiler support: C99 var arrays: ................ ${has_var_arrays} C99 lrintf: .................... ${ac_cv_func_lrintf} Use alloca: .................... ${use_alloca} General configuration: Floating point support: ........ ${enable_float} Fast float approximations: ..... ${enable_float_approx} Fixed point debugging: ......... ${enable_fixed_point_debug} Inline Assembly Optimizations: . ${inline_optimization} External Assembly Optimizations: ${asm_optimization} Intrinsics Optimizations.......: ${intrinsics_support} Run-time CPU detection: ........ ${rtcd_support} Custom modes: .................. ${enable_custom_modes} Assertion checking: ............ ${enable_assertions} Fuzzing: ....................... ${enable_fuzzing} API documentation: ............. ${enable_doc} Extra programs: ................ ${enable_extra_programs} ------------------------------------------------------------------------ Type \"make; make install\" to compile and install Type \"make check\" to run the test suite " >&6;} opus-1.1.2/configure.ac000066400000000000000000000734601264527674100150170ustar00rootroot00000000000000dnl Process this file with autoconf to produce a configure script. -*-m4-*- dnl The package_version file will be automatically synced to the git revision dnl by the update_version script when configured in the repository, but will dnl remain constant in tarball releases unless it is manually edited. m4_define([CURRENT_VERSION], m4_esyscmd([ ./update_version 2>/dev/null || true if test -e package_version; then . ./package_version printf "$PACKAGE_VERSION" else printf "unknown" fi ])) AC_INIT([opus],[CURRENT_VERSION],[opus@xiph.org]) AC_CONFIG_SRCDIR(src/opus_encoder.c) AC_CONFIG_MACRO_DIR([m4]) dnl enable silent rules on automake 1.11 and later m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) # For libtool. dnl Please update these for releases. OPUS_LT_CURRENT=5 OPUS_LT_REVISION=2 OPUS_LT_AGE=5 AC_SUBST(OPUS_LT_CURRENT) AC_SUBST(OPUS_LT_REVISION) AC_SUBST(OPUS_LT_AGE) AM_INIT_AUTOMAKE([no-define]) AM_MAINTAINER_MODE([enable]) AC_CANONICAL_HOST AC_MINGW32 AM_PROG_LIBTOOL AM_PROG_CC_C_O AC_PROG_CC_C99 AC_C_CONST AC_C_INLINE AM_PROG_AS AC_DEFINE([OPUS_BUILD], [], [This is a build of OPUS]) #Use a hacked up version of autoconf's AC_C_RESTRICT because it's not #strong enough a test to detect old buggy versions of GCC (e.g. 2.95.3) #Note: Both this and the test for variable-size arrays below are also # done by AC_PROG_CC_C99, but not thoroughly enough apparently. AC_CACHE_CHECK([for C/C++ restrict keyword], ac_cv_c_restrict, [ac_cv_c_restrict=no # The order here caters to the fact that C++ does not require restrict. for ac_kw in __restrict __restrict__ _Restrict restrict; do AC_COMPILE_IFELSE([AC_LANG_PROGRAM( [[typedef int * int_ptr; int foo (int_ptr $ac_kw ip, int * $ac_kw baz[]) { return ip[0]; }]], [[int s[1]; int * $ac_kw t = s; t[0] = 0; return foo(t, (void *)0)]])], [ac_cv_c_restrict=$ac_kw]) test "$ac_cv_c_restrict" != no && break done ]) AH_VERBATIM([restrict], [/* Define to the equivalent of the C99 'restrict' keyword, or to nothing if this is not supported. Do not define if restrict is supported directly. */ #undef restrict /* Work around a bug in Sun C++: it does not support _Restrict or __restrict__, even though the corresponding Sun C compiler ends up with "#define restrict _Restrict" or "#define restrict __restrict__" in the previous line. Perhaps some future version of Sun C++ will work with restrict; if so, hopefully it defines __RESTRICT like Sun C does. */ #if defined __SUNPRO_CC && !defined __RESTRICT # define _Restrict # define __restrict__ #endif]) case $ac_cv_c_restrict in restrict) ;; no) AC_DEFINE([restrict], []) ;; *) AC_DEFINE_UNQUOTED([restrict], [$ac_cv_c_restrict]) ;; esac AC_MSG_CHECKING(for C99 variable-size arrays) AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [[static int x; char a[++x]; a[sizeof a - 1] = 0; int N; return a[0];]])], [ has_var_arrays=yes use_alloca="no (using var arrays)" AC_DEFINE([VAR_ARRAYS], [1], [Use C99 variable-size arrays]) ],[ has_var_arrays=no ]) AC_MSG_RESULT([$has_var_arrays]) AS_IF([test "$has_var_arrays" = "no"], [ AC_CHECK_HEADERS([alloca.h]) AC_MSG_CHECKING(for alloca) AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[int foo=10; int *array = alloca(foo);]])], [ use_alloca=yes; AC_DEFINE([USE_ALLOCA], [], [Make use of alloca]) ],[ use_alloca=no ]) AC_MSG_RESULT([$use_alloca]) ]) LT_LIB_M AC_ARG_ENABLE([fixed-point], [AS_HELP_STRING([--enable-fixed-point], [compile without floating point (for machines without a fast enough FPU)])],, [enable_fixed_point=no]) AS_IF([test "$enable_fixed_point" = "yes"],[ enable_float="no" AC_DEFINE([FIXED_POINT], [1], [Compile as fixed-point (for machines without a fast enough FPU)]) PC_BUILD="fixed-point" ],[ enable_float="yes"; PC_BUILD="floating-point" ]) AM_CONDITIONAL([FIXED_POINT], [test "$enable_fixed_point" = "yes"]) AC_ARG_ENABLE([fixed-point-debug], [AS_HELP_STRING([--enable-fixed-point-debug], [debug fixed-point implementation])],, [enable_fixed_point_debug=no]) AS_IF([test "$enable_fixed_point_debug" = "yes"],[ AC_DEFINE([FIXED_DEBUG], [1], [Debug fixed-point implementation]) ]) AC_ARG_ENABLE([float_api], [AS_HELP_STRING([--disable-float-api], [compile without the floating point API (for machines with no float library)])],, [enable_float_api=yes]) AM_CONDITIONAL([DISABLE_FLOAT_API], [test "$enable_float_api" = "no"]) AS_IF([test "$enable_float_api" = "no"],[ AC_DEFINE([DISABLE_FLOAT_API], [1], [Do not build the float API]) ]) AC_ARG_ENABLE([custom-modes], [AS_HELP_STRING([--enable-custom-modes], [enable non-Opus modes, e.g. 44.1 kHz & 2^n frames])],, [enable_custom_modes=no]) AS_IF([test "$enable_custom_modes" = "yes"],[ AC_DEFINE([CUSTOM_MODES], [1], [Custom modes]) PC_BUILD="$PC_BUILD, custom modes" ]) AM_CONDITIONAL([CUSTOM_MODES], [test "$enable_custom_modes" = "yes"]) has_float_approx=no #case "$host_cpu" in #i[[3456]]86 | x86_64 | powerpc64 | powerpc32 | ia64) # has_float_approx=yes # ;; #esac AC_ARG_ENABLE([float-approx], [AS_HELP_STRING([--enable-float-approx], [enable fast approximations for floating point])], [if test "$enable_float_approx" = "yes"; then AC_WARN([Floating point approximations are not supported on all platforms.]) fi ], [enable_float_approx=$has_float_approx]) AS_IF([test "$enable_float_approx" = "yes"],[ AC_DEFINE([FLOAT_APPROX], [1], [Float approximations]) ]) AC_ARG_ENABLE([asm], [AS_HELP_STRING([--disable-asm], [Disable assembly optimizations])],, [enable_asm=yes]) AC_ARG_ENABLE([rtcd], [AS_HELP_STRING([--disable-rtcd], [Disable run-time CPU capabilities detection])],, [enable_rtcd=yes]) AC_ARG_ENABLE([intrinsics], [AS_HELP_STRING([--enable-intrinsics], [Enable intrinsics optimizations for ARM(float) X86(fixed)])],, [enable_intrinsics=no]) rtcd_support=no cpu_arm=no AS_IF([test x"${enable_asm}" = x"yes"],[ inline_optimization="No inline ASM for your platform, please send patches" case $host_cpu in arm*) dnl Currently we only have asm for fixed-point AS_IF([test "$enable_float" != "yes"],[ cpu_arm=yes AC_DEFINE([OPUS_ARM_ASM], [], [Make use of ARM asm optimization]) AS_GCC_INLINE_ASSEMBLY( [inline_optimization="ARM"], [inline_optimization="disabled"] ) AS_ASM_ARM_EDSP([OPUS_ARM_INLINE_EDSP=1],[OPUS_ARM_INLINE_EDSP=0]) AS_ASM_ARM_MEDIA([OPUS_ARM_INLINE_MEDIA=1], [OPUS_ARM_INLINE_MEDIA=0]) AS_ASM_ARM_NEON([OPUS_ARM_INLINE_NEON=1],[OPUS_ARM_INLINE_NEON=0]) AS_IF([test x"$inline_optimization" = x"ARM"],[ AM_CONDITIONAL([OPUS_ARM_INLINE_ASM],[true]) AC_DEFINE([OPUS_ARM_INLINE_ASM], 1, [Use generic ARMv4 inline asm optimizations]) AS_IF([test x"$OPUS_ARM_INLINE_EDSP" = x"1"],[ AC_DEFINE([OPUS_ARM_INLINE_EDSP], [1], [Use ARMv5E inline asm optimizations]) inline_optimization="$inline_optimization (EDSP)" ]) AS_IF([test x"$OPUS_ARM_INLINE_MEDIA" = x"1"],[ AC_DEFINE([OPUS_ARM_INLINE_MEDIA], [1], [Use ARMv6 inline asm optimizations]) inline_optimization="$inline_optimization (Media)" ]) AS_IF([test x"$OPUS_ARM_INLINE_NEON" = x"1"],[ AC_DEFINE([OPUS_ARM_INLINE_NEON], 1, [Use ARM NEON inline asm optimizations]) inline_optimization="$inline_optimization (NEON)" ]) ]) dnl We need Perl to translate RVCT-syntax asm to gas syntax. AC_CHECK_PROG([HAVE_PERL], perl, yes, no) AS_IF([test x"$HAVE_PERL" = x"yes"],[ AM_CONDITIONAL([OPUS_ARM_EXTERNAL_ASM],[true]) asm_optimization="ARM" AS_IF([test x"$OPUS_ARM_INLINE_EDSP" = x"1"], [ OPUS_ARM_PRESUME_EDSP=1 OPUS_ARM_MAY_HAVE_EDSP=1 ], [ OPUS_ARM_PRESUME_EDSP=0 OPUS_ARM_MAY_HAVE_EDSP=0 ]) AS_IF([test x"$OPUS_ARM_INLINE_MEDIA" = x"1"], [ OPUS_ARM_PRESUME_MEDIA=1 OPUS_ARM_MAY_HAVE_MEDIA=1 ], [ OPUS_ARM_PRESUME_MEDIA=0 OPUS_ARM_MAY_HAVE_MEDIA=0 ]) AS_IF([test x"$OPUS_ARM_INLINE_NEON" = x"1"], [ OPUS_ARM_PRESUME_NEON=1 OPUS_ARM_MAY_HAVE_NEON=1 ], [ OPUS_ARM_PRESUME_NEON=0 OPUS_ARM_MAY_HAVE_NEON=0 ]) AS_IF([test x"$enable_rtcd" = x"yes"],[ AS_IF([test x"$OPUS_ARM_MAY_HAVE_EDSP" != x"1"],[ AC_MSG_NOTICE( [Trying to force-enable armv5e EDSP instructions...]) AS_ASM_ARM_EDSP_FORCE([OPUS_ARM_MAY_HAVE_EDSP=1]) ]) AS_IF([test x"$OPUS_ARM_MAY_HAVE_MEDIA" != x"1"],[ AC_MSG_NOTICE( [Trying to force-enable ARMv6 media instructions...]) AS_ASM_ARM_MEDIA_FORCE([OPUS_ARM_MAY_HAVE_MEDIA=1]) ]) AS_IF([test x"$OPUS_ARM_MAY_HAVE_NEON" != x"1"],[ AC_MSG_NOTICE( [Trying to force-enable NEON instructions...]) AS_ASM_ARM_NEON_FORCE([OPUS_ARM_MAY_HAVE_NEON=1]) ]) ]) rtcd_support= AS_IF([test x"$OPUS_ARM_MAY_HAVE_EDSP" = x"1"],[ AC_DEFINE(OPUS_ARM_MAY_HAVE_EDSP, 1, [Define if assembler supports EDSP instructions]) AS_IF([test x"$OPUS_ARM_PRESUME_EDSP" = x"1"],[ AC_DEFINE(OPUS_ARM_PRESUME_EDSP, 1, [Define if binary requires EDSP instruction support]) asm_optimization="$asm_optimization (EDSP)" ], [rtcd_support="$rtcd_support (EDSP)"] ) ]) AC_SUBST(OPUS_ARM_MAY_HAVE_EDSP) AS_IF([test x"$OPUS_ARM_MAY_HAVE_MEDIA" = x"1"],[ AC_DEFINE(OPUS_ARM_MAY_HAVE_MEDIA, 1, [Define if assembler supports ARMv6 media instructions]) AS_IF([test x"$OPUS_ARM_PRESUME_MEDIA" = x"1"],[ AC_DEFINE(OPUS_ARM_PRESUME_MEDIA, 1, [Define if binary requires ARMv6 media instruction support]) asm_optimization="$asm_optimization (Media)" ], [rtcd_support="$rtcd_support (Media)"] ) ]) AC_SUBST(OPUS_ARM_MAY_HAVE_MEDIA) AS_IF([test x"$OPUS_ARM_MAY_HAVE_NEON" = x"1"],[ AC_DEFINE(OPUS_ARM_MAY_HAVE_NEON, 1, [Define if compiler supports NEON instructions]) AS_IF([test x"$OPUS_ARM_PRESUME_NEON" = x"1"], [ AC_DEFINE(OPUS_ARM_PRESUME_NEON, 1, [Define if binary requires NEON instruction support]) asm_optimization="$asm_optimization (NEON)" ], [rtcd_support="$rtcd_support (NEON)"] ) ]) AC_SUBST(OPUS_ARM_MAY_HAVE_NEON) dnl Make sure turning on RTCD gets us at least one dnl instruction set. AS_IF([test x"$rtcd_support" != x""], [rtcd_support=ARM"$rtcd_support"], [rtcd_support="no"] ) AC_MSG_CHECKING([for apple style tools]) AC_PREPROC_IFELSE([AC_LANG_PROGRAM([ #ifndef __APPLE__ #error 1 #endif],[])], [AC_MSG_RESULT([yes]); ARM2GNU_PARAMS="--apple"], [AC_MSG_RESULT([no]); ARM2GNU_PARAMS=""]) AC_SUBST(ARM2GNU_PARAMS) ], [ AC_MSG_WARN( [*** ARM assembly requires perl -- disabling optimizations]) asm_optimization="(missing perl dependency for ARM)" ]) ]) ;; esac ],[ inline_optimization="disabled" asm_optimization="disabled" ]) AM_CONDITIONAL([OPUS_ARM_INLINE_ASM], [test x"${inline_optimization%% *}" = x"ARM"]) AM_CONDITIONAL([OPUS_ARM_EXTERNAL_ASM], [test x"${asm_optimization%% *}" = x"ARM"]) AM_CONDITIONAL([HAVE_SSE], [false]) AM_CONDITIONAL([HAVE_SSE2], [false]) AM_CONDITIONAL([HAVE_SSE4_1], [false]) AM_CONDITIONAL([HAVE_AVX], [false]) m4_define([DEFAULT_X86_SSE_CFLAGS], [-msse]) m4_define([DEFAULT_X86_SSE2_CFLAGS], [-msse2]) m4_define([DEFAULT_X86_SSE4_1_CFLAGS], [-msse4.1]) m4_define([DEFAULT_X86_AVX_CFLAGS], [-mavx]) m4_define([DEFAULT_ARM_NEON_INTR_CFLAGS], [-mfpu=neon]) # With GCC on ARM32 softfp architectures (e.g. Android, or older Ubuntu) you need to specify # -mfloat-abi=softfp for -mfpu=neon to work. However, on ARM32 hardfp architectures (e.g. newer Ubuntu), # this option will break things. # As a heuristic, if host matches arm*eabi* but not arm*hf*, it's probably soft-float. m4_define([DEFAULT_ARM_NEON_SOFTFP_INTR_CFLAGS], [-mfpu=neon -mfloat-abi=softfp]) AS_CASE([$host], [arm*hf*], [AS_VAR_SET([RESOLVED_DEFAULT_ARM_NEON_INTR_CFLAGS], "DEFAULT_ARM_NEON_INTR_CFLAGS")], [arm*eabi*], [AS_VAR_SET([RESOLVED_DEFAULT_ARM_NEON_INTR_CFLAGS], "DEFAULT_ARM_NEON_SOFTFP_INTR_CFLAGS")], [AS_VAR_SET([RESOLVED_DEFAULT_ARM_NEON_INTR_CFLAGS], "DEFAULT_ARM_NEON_INTR_CFLAGS")]) AC_ARG_VAR([X86_SSE_CFLAGS], [C compiler flags to compile SSE intrinsics @<:@default=]DEFAULT_X86_SSE_CFLAGS[@:>@]) AC_ARG_VAR([X86_SSE2_CFLAGS], [C compiler flags to compile SSE2 intrinsics @<:@default=]DEFAULT_X86_SSE2_CFLAGS[@:>@]) AC_ARG_VAR([X86_SSE4_1_CFLAGS], [C compiler flags to compile SSE4.1 intrinsics @<:@default=]DEFAULT_X86_SSE4_1_CFLAGS[@:>@]) AC_ARG_VAR([X86_AVX_CFLAGS], [C compiler flags to compile AVX intrinsics @<:@default=]DEFAULT_X86_AVX_CFLAGS[@:>@]) AC_ARG_VAR([ARM_NEON_INTR_CFLAGS], [C compiler flags to compile ARM NEON intrinsics @<:@default=]DEFAULT_ARM_NEON_INTR_CFLAGS / DEFAULT_ARM_NEON_SOFTFP_INTR_CFLAGS[@:>@]) AS_VAR_SET_IF([X86_SSE_CFLAGS], [], [AS_VAR_SET([X86_SSE_CFLAGS], "DEFAULT_X86_SSE_CFLAGS")]) AS_VAR_SET_IF([X86_SSE2_CFLAGS], [], [AS_VAR_SET([X86_SSE2_CFLAGS], "DEFAULT_X86_SSE2_CFLAGS")]) AS_VAR_SET_IF([X86_SSE4_1_CFLAGS], [], [AS_VAR_SET([X86_SSE4_1_CFLAGS], "DEFAULT_X86_SSE4_1_CFLAGS")]) AS_VAR_SET_IF([X86_AVX_CFLAGS], [], [AS_VAR_SET([X86_AVX_CFLAGS], "DEFAULT_X86_AVX_CFLAGS")]) AS_VAR_SET_IF([ARM_NEON_INTR_CFLAGS], [], [AS_VAR_SET([ARM_NEON_INTR_CFLAGS], ["$RESOLVED_DEFAULT_ARM_NEON_INTR_CFLAGS"])]) AC_DEFUN([OPUS_PATH_NE10], [ AC_ARG_WITH(NE10, AC_HELP_STRING([--with-NE10=PFX],[Prefix where libNE10 is installed (optional)]), NE10_prefix="$withval", NE10_prefix="") AC_ARG_WITH(NE10-libraries, AC_HELP_STRING([--with-NE10-libraries=DIR], [Directory where libNE10 library is installed (optional)]), NE10_libraries="$withval", NE10_libraries="") AC_ARG_WITH(NE10-includes, AC_HELP_STRING([--with-NE10-includes=DIR], [Directory where libNE10 header files are installed (optional)]), NE10_includes="$withval", NE10_includes="") if test "x$NE10_libraries" != "x" ; then NE10_LIBS="-L$NE10_libraries" elif test "x$NE10_prefix" = "xno" || test "x$NE10_prefix" = "xyes" ; then NE10_LIBS="" elif test "x$NE10_prefix" != "x" ; then NE10_LIBS="-L$NE10_prefix/lib" elif test "x$prefix" != "xNONE" ; then NE10_LIBS="-L$prefix/lib" fi if test "x$NE10_prefix" != "xno" ; then NE10_LIBS="$NE10_LIBS -lNE10" fi if test "x$NE10_includes" != "x" ; then NE10_CFLAGS="-I$NE10_includes" elif test "x$NE10_prefix" = "xno" || test "x$NE10_prefix" = "xyes" ; then NE10_CFLAGS="" elif test "x$ogg_prefix" != "x" ; then NE10_CFLAGS="-I$NE10_prefix/include" elif test "x$prefix" != "xNONE"; then NE10_CFLAGS="-I$prefix/include" fi AC_MSG_CHECKING(for NE10) save_CFLAGS="$CFLAGS"; CFLAGS="$NE10_CFLAGS" save_LIBS="$LIBS"; LIBS="$NE10_LIBS $LIBM" AC_LINK_IFELSE( [ AC_LANG_PROGRAM( [[#include ]], [[ ne10_fft_cfg_float32_t cfg; cfg = ne10_fft_alloc_c2c_float32_neon(480); ]] ) ],[ HAVE_ARM_NE10=1 AC_MSG_RESULT([yes]) ],[ HAVE_ARM_NE10=0 AC_MSG_RESULT([no]) NE10_CFLAGS="" NE10_LIBS="" ] ) CFLAGS="$save_CFLAGS"; LIBS="$save_LIBS" #Now we know if libNE10 is installed or not AS_IF([test x"$HAVE_ARM_NE10" = x"1"], [ AC_DEFINE([HAVE_ARM_NE10], 1, [NE10 library is installed on host. Make sure it is on target!]) AC_SUBST(HAVE_ARM_NE10) AC_SUBST(NE10_CFLAGS) AC_SUBST(NE10_LIBS) ] ) ] ) AS_IF([test x"$enable_intrinsics" = x"yes"],[ intrinsics_support="" AS_CASE([$host_cpu], [arm*], [ cpu_arm=yes OPUS_CHECK_INTRINSICS( [ARM Neon], [$ARM_NEON_INTR_CFLAGS], [OPUS_ARM_MAY_HAVE_NEON_INTR], [OPUS_ARM_PRESUME_NEON_INTR], [[#include ]], [[ static float32x4_t A0, A1, SUMM; SUMM = vmlaq_f32(SUMM, A0, A1); ]] ) AS_IF([test x"$OPUS_ARM_MAY_HAVE_NEON_INTR" = x"1" && test x"$OPUS_ARM_PRESUME_NEON_INTR" != x"1"], [ OPUS_ARM_NEON_INTR_CFLAGS="$ARM_NEON_INTR_CFLAGS" AC_SUBST([OPUS_ARM_NEON_INTR_CFLAGS]) ] ) AS_IF([test x"$OPUS_ARM_MAY_HAVE_NEON_INTR" = x"1"], [ AC_DEFINE([OPUS_ARM_MAY_HAVE_NEON_INTR], 1, [Compiler supports ARMv7 Neon Intrinsics]) intrinsics_support="$intrinsics_support (Neon_Intrinsics)" AS_IF([test x"enable_rtcd" != x"" && test x"$OPUS_ARM_PRESUME_NEON_INTR" != x"1"], [rtcd_support="$rtcd_support (ARMv7_Neon_Intrinsics)"]) AS_IF([test x"$OPUS_ARM_PRESUME_NEON_INTR" = x"1"], [AC_DEFINE([OPUS_ARM_PRESUME_NEON_INTR], 1, [Define if binary requires NEON intrinsics support])]) OPUS_PATH_NE10() AS_IF([test x"$NE10_LIBS" != x""], [ intrinsics_support="$intrinsics_support (NE10)" AS_IF([test x"enable_rtcd" != x"" \ && test x"$OPUS_ARM_PRESUME_NEON_INTR" != x"1"], [rtcd_support="$rtcd_support (NE10)"]) ]) AS_IF([test x"$rtcd_support" = x""], [rtcd_support=no]) AS_IF([test x"$intrinsics_support" = x""], [intrinsics_support=no], [intrinsics_support="arm$intrinsics_support"]) ], [ AC_MSG_WARN([Compiler does not support ARM intrinsics]) intrinsics_support=no ]) ], [i?86|x86_64], [ OPUS_CHECK_INTRINSICS( [SSE], [$X86_SSE_CFLAGS], [OPUS_X86_MAY_HAVE_SSE], [OPUS_X86_PRESUME_SSE], [[#include ]], [[ static __m128 mtest; mtest = _mm_setzero_ps(); ]] ) AS_IF([test x"$OPUS_X86_MAY_HAVE_SSE" = x"1" && test x"$OPUS_X86_PRESUME_SSE" != x"1"], [ OPUS_X86_SSE_CFLAGS="$X86_SSE_CFLAGS" AC_SUBST([OPUS_X86_SSE_CFLAGS]) ] ) OPUS_CHECK_INTRINSICS( [SSE2], [$X86_SSE2_CFLAGS], [OPUS_X86_MAY_HAVE_SSE2], [OPUS_X86_PRESUME_SSE2], [[#include ]], [[ static __m128i mtest; mtest = _mm_setzero_si128(); ]] ) AS_IF([test x"$OPUS_X86_MAY_HAVE_SSE2" = x"1" && test x"$OPUS_X86_PRESUME_SSE2" != x"1"], [ OPUS_X86_SSE2_CFLAGS="$X86_SSE2_CFLAGS" AC_SUBST([OPUS_X86_SSE2_CFLAGS]) ] ) OPUS_CHECK_INTRINSICS( [SSE4.1], [$X86_SSE4_1_CFLAGS], [OPUS_X86_MAY_HAVE_SSE4_1], [OPUS_X86_PRESUME_SSE4_1], [[#include ]], [[ static __m128i mtest; mtest = _mm_setzero_si128(); mtest = _mm_cmpeq_epi64(mtest, mtest); ]] ) AS_IF([test x"$OPUS_X86_MAY_HAVE_SSE4_1" = x"1" && test x"$OPUS_X86_PRESUME_SSE4_1" != x"1"], [ OPUS_X86_SSE4_1_CFLAGS="$X86_SSE4_1_CFLAGS" AC_SUBST([OPUS_X86_SSE4_1_CFLAGS]) ] ) OPUS_CHECK_INTRINSICS( [AVX], [$X86_AVX_CFLAGS], [OPUS_X86_MAY_HAVE_AVX], [OPUS_X86_PRESUME_AVX], [[#include ]], [[ static __m256 mtest; mtest = _mm256_setzero_ps(); ]] ) AS_IF([test x"$OPUS_X86_MAY_HAVE_AVX" = x"1" && test x"$OPUS_X86_PRESUME_AVX" != x"1"], [ OPUS_X86_AVX_CFLAGS="$X86_AVX_CFLAGS" AC_SUBST([OPUS_X86_AVX_CFLAGS]) ] ) AS_IF([test x"$rtcd_support" = x"no"], [rtcd_support=""]) AS_IF([test x"$OPUS_X86_MAY_HAVE_SSE" = x"1"], [ AC_DEFINE([OPUS_X86_MAY_HAVE_SSE], 1, [Compiler supports X86 SSE Intrinsics]) intrinsics_support="$intrinsics_support SSE" AS_IF([test x"$OPUS_X86_PRESUME_SSE" = x"1"], [AC_DEFINE([OPUS_X86_PRESUME_SSE], 1, [Define if binary requires SSE intrinsics support])], [rtcd_support="$rtcd_support SSE"]) ], [ AC_MSG_WARN([Compiler does not support SSE intrinsics]) ]) AS_IF([test x"$OPUS_X86_MAY_HAVE_SSE2" = x"1"], [ AC_DEFINE([OPUS_X86_MAY_HAVE_SSE2], 1, [Compiler supports X86 SSE2 Intrinsics]) intrinsics_support="$intrinsics_support SSE2" AS_IF([test x"$OPUS_X86_PRESUME_SSE2" = x"1"], [AC_DEFINE([OPUS_X86_PRESUME_SSE2], 1, [Define if binary requires SSE2 intrinsics support])], [rtcd_support="$rtcd_support SSE2"]) ], [ AC_MSG_WARN([Compiler does not support SSE2 intrinsics]) ]) AS_IF([test x"$OPUS_X86_MAY_HAVE_SSE4_1" = x"1"], [ AC_DEFINE([OPUS_X86_MAY_HAVE_SSE4_1], 1, [Compiler supports X86 SSE4.1 Intrinsics]) intrinsics_support="$intrinsics_support SSE4.1" AS_IF([test x"$OPUS_X86_PRESUME_SSE4_1" = x"1"], [AC_DEFINE([OPUS_X86_PRESUME_SSE4_1], 1, [Define if binary requires SSE4.1 intrinsics support])], [rtcd_support="$rtcd_support SSE4.1"]) ], [ AC_MSG_WARN([Compiler does not support SSE4.1 intrinsics]) ]) AS_IF([test x"$OPUS_X86_MAY_HAVE_AVX" = x"1"], [ AC_DEFINE([OPUS_X86_MAY_HAVE_AVX], 1, [Compiler supports X86 AVX Intrinsics]) intrinsics_support="$intrinsics_support AVX" AS_IF([test x"$OPUS_X86_PRESUME_AVX" = x"1"], [AC_DEFINE([OPUS_X86_PRESUME_AVX], 1, [Define if binary requires AVX intrinsics support])], [rtcd_support="$rtcd_support AVX"]) ], [ AC_MSG_WARN([Compiler does not support AVX intrinsics]) ]) AS_IF([test x"$intrinsics_support" = x""], [intrinsics_support=no], [intrinsics_support="x86$intrinsics_support"] ) AS_IF([test x"$rtcd_support" = x""], [rtcd_support=no], [rtcd_support="x86$rtcd_support"], ) AS_IF([test x"$enable_rtcd" = x"yes" && test x"$rtcd_support" != x""],[ get_cpuid_by_asm="no" AC_MSG_CHECKING([How to get X86 CPU Info]) AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #include ]],[[ unsigned int CPUInfo0; unsigned int CPUInfo1; unsigned int CPUInfo2; unsigned int CPUInfo3; unsigned int InfoType; __asm__ __volatile__ ( "cpuid": "=a" (CPUInfo0), "=b" (CPUInfo1), "=c" (CPUInfo2), "=d" (CPUInfo3) : "a" (InfoType), "c" (0) ); ]])], [get_cpuid_by_asm="yes" AC_MSG_RESULT([Inline Assembly]) AC_DEFINE([CPU_INFO_BY_ASM], [1], [Get CPU Info by asm method])], [AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #include ]],[[ unsigned int CPUInfo0; unsigned int CPUInfo1; unsigned int CPUInfo2; unsigned int CPUInfo3; unsigned int InfoType; __get_cpuid(InfoType, &CPUInfo0, &CPUInfo1, &CPUInfo2, &CPUInfo3); ]])], [AC_MSG_RESULT([C method]) AC_DEFINE([CPU_INFO_BY_C], [1], [Get CPU Info by c method])], [AC_MSG_ERROR([no supported Get CPU Info method, please disable intrinsics])])])]) ], [ AC_MSG_WARN([No intrinsics support for your architecture]) intrinsics_support="no" ]) ], [ intrinsics_support="no" ]) AM_CONDITIONAL([CPU_ARM], [test "$cpu_arm" = "yes"]) AM_CONDITIONAL([OPUS_ARM_NEON_INTR], [test x"$OPUS_ARM_MAY_HAVE_NEON_INTR" = x"1"]) AM_CONDITIONAL([HAVE_ARM_NE10], [test x"$HAVE_ARM_NE10" = x"1"]) AM_CONDITIONAL([HAVE_SSE], [test x"$OPUS_X86_MAY_HAVE_SSE" = x"1"]) AM_CONDITIONAL([HAVE_SSE2], [test x"$OPUS_X86_MAY_HAVE_SSE2" = x"1"]) AM_CONDITIONAL([HAVE_SSE4_1], [test x"$OPUS_X86_MAY_HAVE_SSE4_1" = x"1"]) AM_CONDITIONAL([HAVE_AVX], [test x"$OPUS_X86_MAY_HAVE_AVX" = x"1"]) AS_IF([test x"$enable_rtcd" = x"yes"],[ AS_IF([test x"$rtcd_support" != x"no"],[ AC_DEFINE([OPUS_HAVE_RTCD], [1], [Use run-time CPU capabilities detection]) OPUS_HAVE_RTCD=1 AC_SUBST(OPUS_HAVE_RTCD) ]) ],[ rtcd_support="disabled" ]) AC_ARG_ENABLE([assertions], [AS_HELP_STRING([--enable-assertions],[enable additional software error checking])],, [enable_assertions=no]) AS_IF([test "$enable_assertions" = "yes"], [ AC_DEFINE([ENABLE_ASSERTIONS], [1], [Assertions]) ]) AC_ARG_ENABLE([fuzzing], [AS_HELP_STRING([--enable-fuzzing],[causes the encoder to make random decisions])],, [enable_fuzzing=no]) AS_IF([test "$enable_fuzzing" = "yes"], [ AC_DEFINE([FUZZING], [1], [Fuzzing]) ]) AC_ARG_ENABLE([doc], [AS_HELP_STRING([--disable-doc], [Do not build API documentation])],, [enable_doc=yes]) AS_IF([test "$enable_doc" = "yes"], [ AC_CHECK_PROG(HAVE_DOXYGEN, [doxygen], [yes], [no]) ],[ HAVE_DOXYGEN=no ]) AM_CONDITIONAL([HAVE_DOXYGEN], [test "$HAVE_DOXYGEN" = "yes"]) AC_ARG_ENABLE([extra-programs], [AS_HELP_STRING([--disable-extra-programs], [Do not build extra programs (demo and tests)])],, [enable_extra_programs=yes]) AM_CONDITIONAL([EXTRA_PROGRAMS], [test "$enable_extra_programs" = "yes"]) saved_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -fvisibility=hidden" AC_MSG_CHECKING([if ${CC} supports -fvisibility=hidden]) AC_COMPILE_IFELSE([AC_LANG_SOURCE([[char foo;]])], [ AC_MSG_RESULT([yes]) ], [ AC_MSG_RESULT([no]) CFLAGS="$saved_CFLAGS" ]) CFLAGS="$CFLAGS -W" warn_CFLAGS="-Wall -Wextra -Wcast-align -Wnested-externs -Wshadow -Wstrict-prototypes" saved_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $warn_CFLAGS" AC_MSG_CHECKING([if ${CC} supports ${warn_CFLAGS}]) AC_COMPILE_IFELSE([AC_LANG_SOURCE([[char foo;]])], [ AC_MSG_RESULT([yes]) ], [ AC_MSG_RESULT([no]) CFLAGS="$saved_CFLAGS" ]) saved_LIBS="$LIBS" LIBS="$LIBS $LIBM" AC_CHECK_FUNCS([lrintf]) AC_CHECK_FUNCS([lrint]) LIBS="$saved_LIBS" AC_CHECK_FUNCS([__malloc_hook]) AC_SUBST([PC_BUILD]) AC_CONFIG_FILES([ Makefile opus.pc opus-uninstalled.pc celt/arm/armopts.s doc/Makefile doc/Doxyfile ]) AC_CONFIG_HEADERS([config.h]) AC_OUTPUT AC_MSG_NOTICE([ ------------------------------------------------------------------------ $PACKAGE_NAME $PACKAGE_VERSION: Automatic configuration OK. Compiler support: C99 var arrays: ................ ${has_var_arrays} C99 lrintf: .................... ${ac_cv_func_lrintf} Use alloca: .................... ${use_alloca} General configuration: Floating point support: ........ ${enable_float} Fast float approximations: ..... ${enable_float_approx} Fixed point debugging: ......... ${enable_fixed_point_debug} Inline Assembly Optimizations: . ${inline_optimization} External Assembly Optimizations: ${asm_optimization} Intrinsics Optimizations.......: ${intrinsics_support} Run-time CPU detection: ........ ${rtcd_support} Custom modes: .................. ${enable_custom_modes} Assertion checking: ............ ${enable_assertions} Fuzzing: ....................... ${enable_fuzzing} API documentation: ............. ${enable_doc} Extra programs: ................ ${enable_extra_programs} ------------------------------------------------------------------------ Type "make; make install" to compile and install Type "make check" to run the test suite ]) opus-1.1.2/depcomp000077500000000000000000000560161264527674100141040ustar00rootroot00000000000000#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2013-05-30.07; # UTC # Copyright (C) 1999-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Alexandre Oliva . case $1 in '') echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by 'PROGRAMS ARGS'. object Object file output by 'PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputting dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac # Get the directory component of the given path, and save it in the # global variables '$dir'. Note that this directory component will # be either empty or ending with a '/' character. This is deliberate. set_dir_from () { case $1 in */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;; *) dir=;; esac } # Get the suffix-stripped basename of the given path, and save it the # global variable '$base'. set_base_from () { base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'` } # If no dependency file was actually created by the compiler invocation, # we still have to create a dummy depfile, to avoid errors with the # Makefile "include basename.Plo" scheme. make_dummy_depfile () { echo "#dummy" > "$depfile" } # Factor out some common post-processing of the generated depfile. # Requires the auxiliary global variable '$tmpdepfile' to be set. aix_post_process_depfile () { # If the compiler actually managed to produce a dependency file, # post-process it. if test -f "$tmpdepfile"; then # Each line is of the form 'foo.o: dependency.h'. # Do two passes, one to just change these to # $object: dependency.h # and one to simply output # dependency.h: # which is needed to avoid the deleted-header problem. { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile" sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile" } > "$depfile" rm -f "$tmpdepfile" else make_dummy_depfile fi } # A tabulation character. tab=' ' # A newline character. nl=' ' # Character ranges might be problematic outside the C locale. # These definitions help. upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ lower=abcdefghijklmnopqrstuvwxyz digits=0123456789 alpha=${upper}${lower} if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Avoid interferences from the environment. gccflag= dashmflag= # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi cygpath_u="cygpath -u -f -" if test "$depmode" = msvcmsys; then # This is just like msvisualcpp but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvisualcpp fi if test "$depmode" = msvc7msys; then # This is just like msvc7 but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvc7 fi if test "$depmode" = xlc; then # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information. gccflag=-qmakedep=gcc,-MF depmode=gcc fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. ## Unfortunately, FreeBSD c89 acceptance of flags depends upon ## the command line argument order; so add the flags where they ## appear in depend2.am. Note that the slowdown incurred here ## affects only configure: in makefiles, %FASTDEP% shortcuts this. for arg do case $arg in -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; *) set fnord "$@" "$arg" ;; esac shift # fnord shift # $arg done "$@" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## Note that this doesn't just cater to obsosete pre-3.x GCC compilers. ## but also to in-use compilers like IMB xlc/xlC and the HP C compiler. ## (see the conditional assignment to $gccflag above). ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). Also, it might not be ## supported by the other compilers which use the 'gcc' depmode. ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # The second -e expression handles DOS-style file names with drive # letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the "deleted header file" problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. ## Some versions of gcc put a space before the ':'. On the theory ## that the space means something, we add a space to the output as ## well. hp depmode also adds that space, but also prefixes the VPATH ## to the object. Take care to not repeat it in the output. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like '#:fec' to the end of the # dependency line. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \ | tr "$nl" ' ' >> "$depfile" echo >> "$depfile" # The second pass generates a dummy entry for each header file. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> "$depfile" else make_dummy_depfile fi rm -f "$tmpdepfile" ;; xlc) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts '$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.u tmpdepfile2=$base.u tmpdepfile3=$dir.libs/$base.u "$@" -Wc,-M else tmpdepfile1=$dir$base.u tmpdepfile2=$dir$base.u tmpdepfile3=$dir$base.u "$@" -M fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done aix_post_process_depfile ;; tcc) # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26 # FIXME: That version still under development at the moment of writing. # Make that this statement remains true also for stable, released # versions. # It will wrap lines (doesn't matter whether long or short) with a # trailing '\', as in: # # foo.o : \ # foo.c \ # foo.h \ # # It will put a trailing '\' even on the last line, and will use leading # spaces rather than leading tabs (at least since its commit 0394caf7 # "Emit spaces for -MD"). "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'. # We have to change lines of the first kind to '$object: \'. sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile" # And for each line of the second kind, we have to emit a 'dep.h:' # dummy dependency, to avoid the deleted-header problem. sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile" rm -f "$tmpdepfile" ;; ## The order of this option in the case statement is important, since the ## shell code in configure will try each of these formats in the order ## listed in this file. A plain '-MD' option would be understood by many ## compilers, so we must ensure this comes after the gcc and icc options. pgcc) # Portland's C compiler understands '-MD'. # Will always output deps to 'file.d' where file is the root name of the # source file under compilation, even if file resides in a subdirectory. # The object file name does not affect the name of the '.d' file. # pgcc 10.2 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using '\' : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... set_dir_from "$object" # Use the source, not the object, to determine the base name, since # that's sadly what pgcc will do too. set_base_from "$source" tmpdepfile=$base.d # For projects that build the same source file twice into different object # files, the pgcc approach of using the *source* file root name can cause # problems in parallel builds. Use a locking strategy to avoid stomping on # the same $tmpdepfile. lockdir=$base.d-lock trap " echo '$0: caught signal, cleaning up...' >&2 rmdir '$lockdir' exit 1 " 1 2 13 15 numtries=100 i=$numtries while test $i -gt 0; do # mkdir is a portable test-and-set. if mkdir "$lockdir" 2>/dev/null; then # This process acquired the lock. "$@" -MD stat=$? # Release the lock. rmdir "$lockdir" break else # If the lock is being held by a different process, wait # until the winning process is done or we timeout. while test -d "$lockdir" && test $i -gt 0; do sleep 1 i=`expr $i - 1` done fi i=`expr $i - 1` done trap - 1 2 13 15 if test $i -le 0; then echo "$0: failed to acquire lock after $numtries attempts" >&2 echo "$0: check lockdir '$lockdir'" >&2 exit 1 fi if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form `foo.o: dependent.h', # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp2) # The "hp" stanza above does not work with aCC (C++) and HP's ia64 # compilers, which have integrated preprocessors. The correct option # to use with these is +Maked; it writes dependencies to a file named # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d "$@" -Wc,+Maked else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d "$@" +Maked fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile" # Add 'dependent.h:' lines. sed -ne '2,${ s/^ *// s/ \\*$// s/$/:/ p }' "$tmpdepfile" >> "$depfile" else make_dummy_depfile fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in 'foo.d' instead, so we check for that too. # Subdirectories are respected. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then # Libtool generates 2 separate objects for the 2 libraries. These # two compilations output dependencies in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is # automatically cleaned when .libs/ is deleted, while ignoring # the former would cause a distcleancheck panic. tmpdepfile1=$dir$base.o.d # libtool 1.5 tmpdepfile2=$dir.libs/$base.o.d # Likewise. tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d "$@" -MD fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done # Same post-processing that is required for AIX mode. aix_post_process_depfile ;; msvc7) if test "$libtool" = yes; then showIncludes=-Wc,-showIncludes else showIncludes=-showIncludes fi "$@" $showIncludes > "$tmpdepfile" stat=$? grep -v '^Note: including file: ' "$tmpdepfile" if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # The first sed program below extracts the file names and escapes # backslashes for cygpath. The second sed program outputs the file # name when reading, but also accumulates all include files in the # hold buffer in order to output them again at the end. This only # works with sed implementations that can handle large buffers. sed < "$tmpdepfile" -n ' /^Note: including file: *\(.*\)/ { s//\1/ s/\\/\\\\/g p }' | $cygpath_u | sort -u | sed -n ' s/ /\\ /g s/\(.*\)/'"$tab"'\1 \\/p s/.\(.*\) \\/\1:/ H $ { s/.*/'"$tab"'/ G p }' >> "$depfile" echo >> "$depfile" # make sure the fragment doesn't end with a backslash rm -f "$tmpdepfile" ;; msvc7msys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove '-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for ':' # in the target name. This is to cope with DOS-style filenames: # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise. "$@" $dashmflag | sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this sed invocation # correctly. Breaking it into two sed invocations is a workaround. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # X makedepend shift cleared=no eat=no for arg do case $cleared in no) set ""; shift cleared=yes ;; esac if test $eat = yes; then eat=no continue fi case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -arch) eat=yes ;; -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix=`echo "$object" | sed 's/^.*\././'` touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" # makedepend may prepend the VPATH from the source file name to the object. # No need to regex-escape $object, excess matching of '.' is harmless. sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process the last invocation # correctly. Breaking it into two sed invocations is a workaround. sed '1,2d' "$tmpdepfile" \ | tr ' ' "$nl" \ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove '-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E \ | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi IFS=" " for arg do case "$arg" in -o) shift ;; $object) shift ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E 2>/dev/null | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile" echo "$tab" >> "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; msvcmsys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: opus-1.1.2/doc/000077500000000000000000000000001264527674100132645ustar00rootroot00000000000000opus-1.1.2/doc/Doxyfile.in000066400000000000000000002164571264527674100154160ustar00rootroot00000000000000# Doxyfile 1.7.4 # This file describes the settings to be used by the documentation system # doxygen (www.doxygen.org) for a project. # # All text after a hash (#) is considered a comment and will be ignored. # The format is: # TAG = value [value, ...] # For lists items can also be appended using: # TAG += value [value, ...] # Values that contain spaces should be placed between quotes (" "). #--------------------------------------------------------------------------- # Project related configuration options #--------------------------------------------------------------------------- # This tag specifies the encoding used for all characters in the config file # that follow. The default is UTF-8 which is also the encoding used for all # text before the first occurrence of this tag. Doxygen uses libiconv (or the # iconv built into libc) for the transcoding. See # http://www.gnu.org/software/libiconv for the list of possible encodings. DOXYFILE_ENCODING = UTF-8 # The PROJECT_NAME tag is a single word (or a sequence of words surrounded # by quotes) that should identify the project. PROJECT_NAME = Opus # The PROJECT_NUMBER tag can be used to enter a project or revision number. # This could be handy for archiving the generated documentation or # if some version control system is used. PROJECT_NUMBER = @VERSION@ # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer # a quick idea about the purpose of the project. Keep the description short. PROJECT_BRIEF = "Opus audio codec (RFC 6716): API and operations manual" # With the PROJECT_LOGO tag one can specify an logo or icon that is # included in the documentation. The maximum height of the logo should not # exceed 55 pixels and the maximum width should not exceed 200 pixels. # Doxygen will copy the logo to the output directory. PROJECT_LOGO = # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) # base path where the generated documentation will be put. # If a relative path is entered, it will be relative to the location # where doxygen was started. If left blank the current directory will be used. OUTPUT_DIRECTORY = # If the CREATE_SUBDIRS tag is set to YES, then doxygen will create # 4096 sub-directories (in 2 levels) under the output directory of each output # format and will distribute the generated files over these directories. # Enabling this option can be useful when feeding doxygen a huge amount of # source files, where putting all generated files in the same directory would # otherwise cause performance problems for the file system. CREATE_SUBDIRS = NO # The OUTPUT_LANGUAGE tag is used to specify the language in which all # documentation generated by doxygen is written. Doxygen will use this # information to generate all constant output in the proper language. # The default language is English, other supported languages are: # Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, # Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German, # Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English # messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, # Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak, # Slovene, Spanish, Swedish, Ukrainian, and Vietnamese. OUTPUT_LANGUAGE = English # If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will # include brief member descriptions after the members that are listed in # the file and class documentation (similar to JavaDoc). # Set to NO to disable this. BRIEF_MEMBER_DESC = YES # If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend # the brief description of a member or function before the detailed description. # Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the # brief descriptions will be completely suppressed. REPEAT_BRIEF = YES # This tag implements a quasi-intelligent brief description abbreviator # that is used to form the text in various listings. Each string # in this list, if found as the leading text of the brief description, will be # stripped from the text and the result after processing the whole list, is # used as the annotated text. Otherwise, the brief description is used as-is. # If left blank, the following values are used ("$name" is automatically # replaced with the name of the entity): "The $name class" "The $name widget" # "The $name file" "is" "provides" "specifies" "contains" # "represents" "a" "an" "the" ABBREVIATE_BRIEF = # If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then # Doxygen will generate a detailed section even if there is only a brief # description. ALWAYS_DETAILED_SEC = NO # If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all # inherited members of a class in the documentation of that class as if those # members were ordinary class members. Constructors, destructors and assignment # operators of the base classes will not be shown. INLINE_INHERITED_MEMB = NO # If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full # path before files name in the file list and in the header files. If set # to NO the shortest path that makes the file name unique will be used. FULL_PATH_NAMES = NO # If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag # can be used to strip a user-defined part of the path. Stripping is # only done if one of the specified strings matches the left-hand part of # the path. The tag can be used to show relative paths in the file list. # If left blank the directory from which doxygen is run is used as the # path to strip. STRIP_FROM_PATH = # The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of # the path mentioned in the documentation of a class, which tells # the reader which header file to include in order to use a class. # If left blank only the name of the header file containing the class # definition is used. Otherwise one should specify the include paths that # are normally passed to the compiler using the -I flag. STRIP_FROM_INC_PATH = # If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter # (but less readable) file names. This can be useful if your file system # doesn't support long names like on DOS, Mac, or CD-ROM. SHORT_NAMES = NO # If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen # will interpret the first line (until the first dot) of a JavaDoc-style # comment as the brief description. If set to NO, the JavaDoc # comments will behave just like regular Qt-style comments # (thus requiring an explicit @brief command for a brief description.) JAVADOC_AUTOBRIEF = YES # If the QT_AUTOBRIEF tag is set to YES then Doxygen will # interpret the first line (until the first dot) of a Qt-style # comment as the brief description. If set to NO, the comments # will behave just like regular Qt-style comments (thus requiring # an explicit \brief command for a brief description.) QT_AUTOBRIEF = NO # The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen # treat a multi-line C++ special comment block (i.e. a block of //! or /// # comments) as a brief description. This used to be the default behaviour. # The new default is to treat a multi-line C++ comment block as a detailed # description. Set this tag to YES if you prefer the old behaviour instead. MULTILINE_CPP_IS_BRIEF = NO # If the INHERIT_DOCS tag is set to YES (the default) then an undocumented # member inherits the documentation from any documented member that it # re-implements. INHERIT_DOCS = YES # If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce # a new page for each member. If set to NO, the documentation of a member will # be part of the file/class/namespace that contains it. SEPARATE_MEMBER_PAGES = NO # The TAB_SIZE tag can be used to set the number of spaces in a tab. # Doxygen uses this value to replace tabs by spaces in code fragments. TAB_SIZE = 8 # This tag can be used to specify a number of aliases that acts # as commands in the documentation. An alias has the form "name=value". # For example adding "sideeffect=\par Side Effects:\n" will allow you to # put the command \sideeffect (or @sideeffect) in the documentation, which # will result in a user-defined paragraph with heading "Side Effects:". # You can put \n's in the value part of an alias to insert newlines. ALIASES = # Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C # sources only. Doxygen will then generate output that is more tailored for C. # For instance, some of the names that are used will be different. The list # of all members will be omitted, etc. OPTIMIZE_OUTPUT_FOR_C = YES # Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java # sources only. Doxygen will then generate output that is more tailored for # Java. For instance, namespaces will be presented as packages, qualified # scopes will look different, etc. OPTIMIZE_OUTPUT_JAVA = NO # Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran # sources only. Doxygen will then generate output that is more tailored for # Fortran. OPTIMIZE_FOR_FORTRAN = NO # Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL # sources. Doxygen will then generate output that is tailored for # VHDL. OPTIMIZE_OUTPUT_VHDL = NO # Doxygen selects the parser to use depending on the extension of the files it # parses. With this tag you can assign which parser to use for a given extension. # Doxygen has a built-in mapping, but you can override or extend it using this # tag. The format is ext=language, where ext is a file extension, and language # is one of the parsers supported by doxygen: IDL, Java, Javascript, CSharp, C, # C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, C++. For instance to make # doxygen treat .inc files as Fortran files (default is PHP), and .f files as C # (default is Fortran), use: inc=Fortran f=C. Note that for custom extensions # you also need to set FILE_PATTERNS otherwise the files are not read by doxygen. EXTENSION_MAPPING = # If you use STL classes (i.e. std::string, std::vector, etc.) but do not want # to include (a tag file for) the STL sources as input, then you should # set this tag to YES in order to let doxygen match functions declarations and # definitions whose arguments contain STL classes (e.g. func(std::string); v.s. # func(std::string) {}). This also makes the inheritance and collaboration # diagrams that involve STL classes more complete and accurate. BUILTIN_STL_SUPPORT = NO # If you use Microsoft's C++/CLI language, you should set this option to YES to # enable parsing support. CPP_CLI_SUPPORT = NO # Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. # Doxygen will parse them like normal C++ but will assume all classes use public # instead of private inheritance when no explicit protection keyword is present. SIP_SUPPORT = NO # For Microsoft's IDL there are propget and propput attributes to indicate getter # and setter methods for a property. Setting this option to YES (the default) # will make doxygen replace the get and set methods by a property in the # documentation. This will only work if the methods are indeed getting or # setting a simple type. If this is not the case, or you want to show the # methods anyway, you should set this option to NO. IDL_PROPERTY_SUPPORT = YES # If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC # tag is set to YES, then doxygen will reuse the documentation of the first # member in the group (if any) for the other members of the group. By default # all members of a group must be documented explicitly. DISTRIBUTE_GROUP_DOC = NO # Set the SUBGROUPING tag to YES (the default) to allow class member groups of # the same type (for instance a group of public functions) to be put as a # subgroup of that type (e.g. under the Public Functions section). Set it to # NO to prevent subgrouping. Alternatively, this can be done per class using # the \nosubgrouping command. SUBGROUPING = YES # When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and # unions are shown inside the group in which they are included (e.g. using # @ingroup) instead of on a separate page (for HTML and Man pages) or # section (for LaTeX and RTF). INLINE_GROUPED_CLASSES = NO # When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum # is documented as struct, union, or enum with the name of the typedef. So # typedef struct TypeS {} TypeT, will appear in the documentation as a struct # with name TypeT. When disabled the typedef will appear as a member of a file, # namespace, or class. And the struct will be named TypeS. This can typically # be useful for C code in case the coding convention dictates that all compound # types are typedef'ed and only the typedef is referenced, never the tag name. TYPEDEF_HIDES_STRUCT = NO # The SYMBOL_CACHE_SIZE determines the size of the internal cache use to # determine which symbols to keep in memory and which to flush to disk. # When the cache is full, less often used symbols will be written to disk. # For small to medium size projects (<1000 input files) the default value is # probably good enough. For larger projects a too small cache size can cause # doxygen to be busy swapping symbols to and from disk most of the time # causing a significant performance penalty. # If the system has enough physical memory increasing the cache will improve the # performance by keeping more symbols in memory. Note that the value works on # a logarithmic scale so increasing the size by one will roughly double the # memory usage. The cache size is given by this formula: # 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, # corresponding to a cache size of 2^16 = 65536 symbols SYMBOL_CACHE_SIZE = 0 #--------------------------------------------------------------------------- # Build related configuration options #--------------------------------------------------------------------------- # If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in # documentation are documented, even if no documentation was available. # Private class members and static file members will be hidden unless # the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES EXTRACT_ALL = YES # If the EXTRACT_PRIVATE tag is set to YES all private members of a class # will be included in the documentation. EXTRACT_PRIVATE = NO # If the EXTRACT_STATIC tag is set to YES all static members of a file # will be included in the documentation. EXTRACT_STATIC = NO # If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) # defined locally in source files will be included in the documentation. # If set to NO only classes defined in header files are included. EXTRACT_LOCAL_CLASSES = YES # This flag is only useful for Objective-C code. When set to YES local # methods, which are defined in the implementation section but not in # the interface are included in the documentation. # If set to NO (the default) only methods in the interface are included. EXTRACT_LOCAL_METHODS = NO # If this flag is set to YES, the members of anonymous namespaces will be # extracted and appear in the documentation as a namespace called # 'anonymous_namespace{file}', where file will be replaced with the base # name of the file that contains the anonymous namespace. By default # anonymous namespaces are hidden. EXTRACT_ANON_NSPACES = NO # If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all # undocumented members of documented classes, files or namespaces. # If set to NO (the default) these members will be included in the # various overviews, but no documentation section is generated. # This option has no effect if EXTRACT_ALL is enabled. HIDE_UNDOC_MEMBERS = NO # If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all # undocumented classes that are normally visible in the class hierarchy. # If set to NO (the default) these classes will be included in the various # overviews. This option has no effect if EXTRACT_ALL is enabled. HIDE_UNDOC_CLASSES = NO # If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all # friend (class|struct|union) declarations. # If set to NO (the default) these declarations will be included in the # documentation. HIDE_FRIEND_COMPOUNDS = NO # If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any # documentation blocks found inside the body of a function. # If set to NO (the default) these blocks will be appended to the # function's detailed documentation block. HIDE_IN_BODY_DOCS = NO # The INTERNAL_DOCS tag determines if documentation # that is typed after a \internal command is included. If the tag is set # to NO (the default) then the documentation will be excluded. # Set it to YES to include the internal documentation. INTERNAL_DOCS = NO # If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate # file names in lower-case letters. If set to YES upper-case letters are also # allowed. This is useful if you have classes or files whose names only differ # in case and if your file system supports case sensitive file names. Windows # and Mac users are advised to set this option to NO. CASE_SENSE_NAMES = YES # If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen # will show members with their full class and namespace scopes in the # documentation. If set to YES the scope will be hidden. HIDE_SCOPE_NAMES = NO # If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen # will put a list of the files that are included by a file in the documentation # of that file. SHOW_INCLUDE_FILES = YES # If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen # will list include files with double quotes in the documentation # rather than with sharp brackets. FORCE_LOCAL_INCLUDES = NO # If the INLINE_INFO tag is set to YES (the default) then a tag [inline] # is inserted in the documentation for inline members. INLINE_INFO = YES # If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen # will sort the (detailed) documentation of file and class members # alphabetically by member name. If set to NO the members will appear in # declaration order. SORT_MEMBER_DOCS = YES # If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the # brief documentation of file, namespace and class members alphabetically # by member name. If set to NO (the default) the members will appear in # declaration order. SORT_BRIEF_DOCS = NO # If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen # will sort the (brief and detailed) documentation of class members so that # constructors and destructors are listed first. If set to NO (the default) # the constructors will appear in the respective orders defined by # SORT_MEMBER_DOCS and SORT_BRIEF_DOCS. # This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO # and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO. SORT_MEMBERS_CTORS_1ST = NO # If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the # hierarchy of group names into alphabetical order. If set to NO (the default) # the group names will appear in their defined order. SORT_GROUP_NAMES = NO # If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be # sorted by fully-qualified names, including namespaces. If set to # NO (the default), the class list will be sorted only by class name, # not including the namespace part. # Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. # Note: This option applies only to the class list, not to the # alphabetical list. SORT_BY_SCOPE_NAME = NO # If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to # do proper type resolution of all parameters of a function it will reject a # match between the prototype and the implementation of a member function even # if there is only one candidate or it is obvious which candidate to choose # by doing a simple string match. By disabling STRICT_PROTO_MATCHING doxygen # will still accept a match between prototype and implementation in such cases. STRICT_PROTO_MATCHING = NO # The GENERATE_TODOLIST tag can be used to enable (YES) or # disable (NO) the todo list. This list is created by putting \todo # commands in the documentation. GENERATE_TODOLIST = YES # The GENERATE_TESTLIST tag can be used to enable (YES) or # disable (NO) the test list. This list is created by putting \test # commands in the documentation. GENERATE_TESTLIST = YES # The GENERATE_BUGLIST tag can be used to enable (YES) or # disable (NO) the bug list. This list is created by putting \bug # commands in the documentation. GENERATE_BUGLIST = YES # The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or # disable (NO) the deprecated list. This list is created by putting # \deprecated commands in the documentation. GENERATE_DEPRECATEDLIST= YES # The ENABLED_SECTIONS tag can be used to enable conditional # documentation sections, marked by \if sectionname ... \endif. ENABLED_SECTIONS = # The MAX_INITIALIZER_LINES tag determines the maximum number of lines # the initial value of a variable or macro consists of for it to appear in # the documentation. If the initializer consists of more lines than specified # here it will be hidden. Use a value of 0 to hide initializers completely. # The appearance of the initializer of individual variables and macros in the # documentation can be controlled using \showinitializer or \hideinitializer # command in the documentation regardless of this setting. MAX_INITIALIZER_LINES = 30 # Set the SHOW_USED_FILES tag to NO to disable the list of files generated # at the bottom of the documentation of classes and structs. If set to YES the # list will mention the files that were used to generate the documentation. SHOW_USED_FILES = YES # If the sources in your project are distributed over multiple directories # then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy # in the documentation. The default is NO. SHOW_DIRECTORIES = NO # Set the SHOW_FILES tag to NO to disable the generation of the Files page. # This will remove the Files entry from the Quick Index and from the # Folder Tree View (if specified). The default is YES. SHOW_FILES = YES # Set the SHOW_NAMESPACES tag to NO to disable the generation of the # Namespaces page. # This will remove the Namespaces entry from the Quick Index # and from the Folder Tree View (if specified). The default is YES. SHOW_NAMESPACES = YES # The FILE_VERSION_FILTER tag can be used to specify a program or script that # doxygen should invoke to get the current version for each file (typically from # the version control system). Doxygen will invoke the program by executing (via # popen()) the command , where is the value of # the FILE_VERSION_FILTER tag, and is the name of an input file # provided by doxygen. Whatever the program writes to standard output # is used as the file version. See the manual for examples. FILE_VERSION_FILTER = # The LAYOUT_FILE tag can be used to specify a layout file which will be parsed # by doxygen. The layout file controls the global structure of the generated # output files in an output format independent way. The create the layout file # that represents doxygen's defaults, run doxygen with the -l option. # You can optionally specify a file name after the option, if omitted # DoxygenLayout.xml will be used as the name of the layout file. LAYOUT_FILE = #--------------------------------------------------------------------------- # configuration options related to warning and progress messages #--------------------------------------------------------------------------- # The QUIET tag can be used to turn on/off the messages that are generated # by doxygen. Possible values are YES and NO. If left blank NO is used. QUIET = YES # The WARNINGS tag can be used to turn on/off the warning messages that are # generated by doxygen. Possible values are YES and NO. If left blank # NO is used. WARNINGS = YES # If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings # for undocumented members. If EXTRACT_ALL is set to YES then this flag will # automatically be disabled. WARN_IF_UNDOCUMENTED = YES # If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for # potential errors in the documentation, such as not documenting some # parameters in a documented function, or documenting parameters that # don't exist or using markup commands wrongly. WARN_IF_DOC_ERROR = YES # The WARN_NO_PARAMDOC option can be enabled to get warnings for # functions that are documented, but have no documentation for their parameters # or return value. If set to NO (the default) doxygen will only warn about # wrong or incomplete parameter documentation, but not about the absence of # documentation. WARN_NO_PARAMDOC = NO # The WARN_FORMAT tag determines the format of the warning messages that # doxygen can produce. The string should contain the $file, $line, and $text # tags, which will be replaced by the file and line number from which the # warning originated and the warning text. Optionally the format may contain # $version, which will be replaced by the version of the file (if it could # be obtained via FILE_VERSION_FILTER) WARN_FORMAT = "$file:$line: $text" # The WARN_LOGFILE tag can be used to specify a file to which warning # and error messages should be written. If left blank the output is written # to stderr. WARN_LOGFILE = #--------------------------------------------------------------------------- # configuration options related to the input files #--------------------------------------------------------------------------- # The INPUT tag can be used to specify the files and/or directories that contain # documented source files. You may enter file names like "myfile.cpp" or # directories like "/usr/src/myproject". Separate the files or directories # with spaces. INPUT = @top_srcdir@/include/opus.h \ @top_srcdir@/include/opus_types.h \ @top_srcdir@/include/opus_defines.h \ @top_srcdir@/include/opus_multistream.h \ @top_srcdir@/include/opus_custom.h # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is # also the default input encoding. Doxygen uses libiconv (or the iconv built # into libc) for the transcoding. See http://www.gnu.org/software/libiconv for # the list of possible encodings. INPUT_ENCODING = UTF-8 # If the value of the INPUT tag contains directories, you can use the # FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp # and *.h) to filter out the source-files in the directories. If left # blank the following patterns are tested: # *.c *.cc *.cxx *.cpp *.c++ *.d *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh # *.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.dox *.py # *.f90 *.f *.for *.vhd *.vhdl FILE_PATTERNS = # The RECURSIVE tag can be used to turn specify whether or not subdirectories # should be searched for input files as well. Possible values are YES and NO. # If left blank NO is used. RECURSIVE = NO # The EXCLUDE tag can be used to specify files and/or directories that should # excluded from the INPUT source files. This way you can easily exclude a # subdirectory from a directory tree whose root is specified with the INPUT tag. EXCLUDE = # The EXCLUDE_SYMLINKS tag can be used select whether or not files or # directories that are symbolic links (a Unix file system feature) are excluded # from the input. EXCLUDE_SYMLINKS = NO # If the value of the INPUT tag contains directories, you can use the # EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude # certain files from those directories. Note that the wildcards are matched # against the file with absolute path, so to exclude all test directories # for example use the pattern */test/* EXCLUDE_PATTERNS = # The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names # (namespaces, classes, functions, etc.) that should be excluded from the # output. The symbol name can be a fully qualified name, a word, or if the # wildcard * is used, a substring. Examples: ANamespace, AClass, # AClass::ANamespace, ANamespace::*Test EXCLUDE_SYMBOLS = # The EXAMPLE_PATH tag can be used to specify one or more files or # directories that contain example code fragments that are included (see # the \include command). EXAMPLE_PATH = # If the value of the EXAMPLE_PATH tag contains directories, you can use the # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp # and *.h) to filter out the source-files in the directories. If left # blank all files are included. EXAMPLE_PATTERNS = # If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be # searched for input files to be used with the \include or \dontinclude # commands irrespective of the value of the RECURSIVE tag. # Possible values are YES and NO. If left blank NO is used. EXAMPLE_RECURSIVE = NO # The IMAGE_PATH tag can be used to specify one or more files or # directories that contain image that are included in the documentation (see # the \image command). IMAGE_PATH = # The INPUT_FILTER tag can be used to specify a program that doxygen should # invoke to filter for each input file. Doxygen will invoke the filter program # by executing (via popen()) the command , where # is the value of the INPUT_FILTER tag, and is the name of an # input file. Doxygen will then use the output that the filter program writes # to standard output. # If FILTER_PATTERNS is specified, this tag will be # ignored. INPUT_FILTER = # The FILTER_PATTERNS tag can be used to specify filters on a per file pattern # basis. # Doxygen will compare the file name with each pattern and apply the # filter if there is a match. # The filters are a list of the form: # pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further # info on how filters are used. If FILTER_PATTERNS is empty or if # non of the patterns match the file name, INPUT_FILTER is applied. FILTER_PATTERNS = # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using # INPUT_FILTER) will be used to filter the input files when producing source # files to browse (i.e. when SOURCE_BROWSER is set to YES). FILTER_SOURCE_FILES = NO # The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file # pattern. A pattern will override the setting for FILTER_PATTERN (if any) # and it is also possible to disable source filtering for a specific pattern # using *.ext= (so without naming a filter). This option only has effect when # FILTER_SOURCE_FILES is enabled. FILTER_SOURCE_PATTERNS = #--------------------------------------------------------------------------- # configuration options related to source browsing #--------------------------------------------------------------------------- # If the SOURCE_BROWSER tag is set to YES then a list of source files will # be generated. Documented entities will be cross-referenced with these sources. # Note: To get rid of all source code in the generated output, make sure also # VERBATIM_HEADERS is set to NO. SOURCE_BROWSER = NO # Setting the INLINE_SOURCES tag to YES will include the body # of functions and classes directly in the documentation. INLINE_SOURCES = NO # Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct # doxygen to hide any special comment blocks from generated source code # fragments. Normal C and C++ comments will always remain visible. STRIP_CODE_COMMENTS = YES # If the REFERENCED_BY_RELATION tag is set to YES # then for each documented function all documented # functions referencing it will be listed. REFERENCED_BY_RELATION = NO # If the REFERENCES_RELATION tag is set to YES # then for each documented function all documented entities # called/used by that function will be listed. REFERENCES_RELATION = NO # If the REFERENCES_LINK_SOURCE tag is set to YES (the default) # and SOURCE_BROWSER tag is set to YES, then the hyperlinks from # functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will # link to the source code. # Otherwise they will link to the documentation. REFERENCES_LINK_SOURCE = YES # If the USE_HTAGS tag is set to YES then the references to source code # will point to the HTML generated by the htags(1) tool instead of doxygen # built-in source browser. The htags tool is part of GNU's global source # tagging system (see http://www.gnu.org/software/global/global.html). You # will need version 4.8.6 or higher. USE_HTAGS = NO # If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen # will generate a verbatim copy of the header file for each class for # which an include is specified. Set to NO to disable this. VERBATIM_HEADERS = YES #--------------------------------------------------------------------------- # configuration options related to the alphabetical class index #--------------------------------------------------------------------------- # If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index # of all compounds will be generated. Enable this if the project # contains a lot of classes, structs, unions or interfaces. ALPHABETICAL_INDEX = NO # If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then # the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns # in which this list will be split (can be a number in the range [1..20]) COLS_IN_ALPHA_INDEX = 5 # In case all classes in a project start with a common prefix, all # classes will be put under the same header in the alphabetical index. # The IGNORE_PREFIX tag can be used to specify one or more prefixes that # should be ignored while generating the index headers. IGNORE_PREFIX = #--------------------------------------------------------------------------- # configuration options related to the HTML output #--------------------------------------------------------------------------- # If the GENERATE_HTML tag is set to YES (the default) Doxygen will # generate HTML output. GENERATE_HTML = YES # The HTML_OUTPUT tag is used to specify where the HTML docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `html' will be used as the default path. HTML_OUTPUT = html # The HTML_FILE_EXTENSION tag can be used to specify the file extension for # each generated HTML page (for example: .htm,.php,.asp). If it is left blank # doxygen will generate files with .html extension. HTML_FILE_EXTENSION = .html # The HTML_HEADER tag can be used to specify a personal HTML header for # each generated HTML page. If it is left blank doxygen will generate a # standard header. Note that when using a custom header you are responsible # for the proper inclusion of any scripts and style sheets that doxygen # needs, which is dependent on the configuration options used. # It is advised to generate a default header using "doxygen -w html # header.html footer.html stylesheet.css YourConfigFile" and then modify # that header. Note that the header is subject to change so you typically # have to redo this when upgrading to a newer version of doxygen or when changing the value of configuration settings such as GENERATE_TREEVIEW! HTML_HEADER = @top_srcdir@/doc/header.html # The HTML_FOOTER tag can be used to specify a personal HTML footer for # each generated HTML page. If it is left blank doxygen will generate a # standard footer. HTML_FOOTER = @top_srcdir@/doc/footer.html # If the HTML_TIMESTAMP tag is set to YES then the generated HTML documentation will contain the timesstamp. HTML_TIMESTAMP = NO # The HTML_STYLESHEET tag can be used to specify a user-defined cascading # style sheet that is used by each HTML page. It can be used to # fine-tune the look of the HTML output. If the tag is left blank doxygen # will generate a default style sheet. Note that doxygen will try to copy # the style sheet file to the HTML output directory, so don't put your own # stylesheet in the HTML output directory as well, or it will be erased! HTML_STYLESHEET = @top_srcdir@/doc/customdoxygen.css # The HTML_EXTRA_FILES tag can be used to specify one or more extra images or # other source files which should be copied to the HTML output directory. Note # that these files will be copied to the base HTML output directory. Use the # $relpath$ marker in the HTML_HEADER and/or HTML_FOOTER files to load these # files. In the HTML_STYLESHEET file, use the file name only. Also note that # the files will be copied as-is; there are no commands or markers available. HTML_EXTRA_FILES = @top_srcdir@/doc/opus_logo.svg # The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. # Doxygen will adjust the colors in the stylesheet and background images # according to this color. Hue is specified as an angle on a colorwheel, # see http://en.wikipedia.org/wiki/Hue for more information. # For instance the value 0 represents red, 60 is yellow, 120 is green, # 180 is cyan, 240 is blue, 300 purple, and 360 is red again. # The allowed range is 0 to 359. HTML_COLORSTYLE_HUE = 220 # The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of # the colors in the HTML output. For a value of 0 the output will use # grayscales only. A value of 255 will produce the most vivid colors. HTML_COLORSTYLE_SAT = 0 # The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to # the luminance component of the colors in the HTML output. Values below # 100 gradually make the output lighter, whereas values above 100 make # the output darker. The value divided by 100 is the actual gamma applied, # so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2, # and 100 does not change the gamma. HTML_COLORSTYLE_GAMMA = 80 # If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML # page will contain the date and time when the page was generated. Setting # this to NO can help when comparing the output of multiple runs. HTML_TIMESTAMP = YES # If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, # files or namespaces will be aligned in HTML using tables. If set to # NO a bullet list will be used. HTML_ALIGN_MEMBERS = YES # If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML # documentation will contain sections that can be hidden and shown after the # page has loaded. For this to work a browser that supports # JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox # Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari). HTML_DYNAMIC_SECTIONS = NO # If the GENERATE_DOCSET tag is set to YES, additional index files # will be generated that can be used as input for Apple's Xcode 3 # integrated development environment, introduced with OSX 10.5 (Leopard). # To create a documentation set, doxygen will generate a Makefile in the # HTML output directory. Running make will produce the docset in that # directory and running "make install" will install the docset in # ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find # it at startup. # See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html # for more information. GENERATE_DOCSET = NO # When GENERATE_DOCSET tag is set to YES, this tag determines the name of the # feed. A documentation feed provides an umbrella under which multiple # documentation sets from a single provider (such as a company or product suite) # can be grouped. DOCSET_FEEDNAME = "Doxygen generated docs" # When GENERATE_DOCSET tag is set to YES, this tag specifies a string that # should uniquely identify the documentation set bundle. This should be a # reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen # will append .docset to the name. DOCSET_BUNDLE_ID = org.doxygen.Project # When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely identify # the documentation publisher. This should be a reverse domain-name style # string, e.g. com.mycompany.MyDocSet.documentation. DOCSET_PUBLISHER_ID = org.doxygen.Publisher # The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher. DOCSET_PUBLISHER_NAME = Publisher # If the GENERATE_HTMLHELP tag is set to YES, additional index files # will be generated that can be used as input for tools like the # Microsoft HTML help workshop to generate a compiled HTML help file (.chm) # of the generated HTML documentation. GENERATE_HTMLHELP = NO # If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can # be used to specify the file name of the resulting .chm file. You # can add a path in front of the file if the result should not be # written to the html output directory. CHM_FILE = # If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can # be used to specify the location (absolute path including file name) of # the HTML help compiler (hhc.exe). If non-empty doxygen will try to run # the HTML help compiler on the generated index.hhp. HHC_LOCATION = # If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag # controls if a separate .chi index file is generated (YES) or that # it should be included in the master .chm file (NO). GENERATE_CHI = NO # If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING # is used to encode HtmlHelp index (hhk), content (hhc) and project file # content. CHM_INDEX_ENCODING = # If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag # controls whether a binary table of contents is generated (YES) or a # normal table of contents (NO) in the .chm file. BINARY_TOC = NO # The TOC_EXPAND flag can be set to YES to add extra items for group members # to the contents of the HTML help documentation and to the tree view. TOC_EXPAND = NO # If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and # QHP_VIRTUAL_FOLDER are set, an additional index file will be generated # that can be used as input for Qt's qhelpgenerator to generate a # Qt Compressed Help (.qch) of the generated HTML documentation. GENERATE_QHP = NO # If the QHG_LOCATION tag is specified, the QCH_FILE tag can # be used to specify the file name of the resulting .qch file. # The path specified is relative to the HTML output folder. QCH_FILE = # The QHP_NAMESPACE tag specifies the namespace to use when generating # Qt Help Project output. For more information please see # http://doc.trolltech.com/qthelpproject.html#namespace QHP_NAMESPACE = org.doxygen.Project # The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating # Qt Help Project output. For more information please see # http://doc.trolltech.com/qthelpproject.html#virtual-folders QHP_VIRTUAL_FOLDER = doc # If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to # add. For more information please see # http://doc.trolltech.com/qthelpproject.html#custom-filters QHP_CUST_FILTER_NAME = # The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the # custom filter to add. For more information please see # # Qt Help Project / Custom Filters. QHP_CUST_FILTER_ATTRS = # The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this # project's # filter section matches. # # Qt Help Project / Filter Attributes. QHP_SECT_FILTER_ATTRS = # If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can # be used to specify the location of Qt's qhelpgenerator. # If non-empty doxygen will try to run qhelpgenerator on the generated # .qhp file. QHG_LOCATION = # If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files # will be generated, which together with the HTML files, form an Eclipse help # plugin. To install this plugin and make it available under the help contents # menu in Eclipse, the contents of the directory containing the HTML and XML # files needs to be copied into the plugins directory of eclipse. The name of # the directory within the plugins directory should be the same as # the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before # the help appears. GENERATE_ECLIPSEHELP = NO # A unique identifier for the eclipse help plugin. When installing the plugin # the directory name containing the HTML and XML files should also have # this name. ECLIPSE_DOC_ID = org.doxygen.Project # The DISABLE_INDEX tag can be used to turn on/off the condensed index at # top of each HTML page. The value NO (the default) enables the index and # the value YES disables it. DISABLE_INDEX = NO # The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values # (range [0,1..20]) that doxygen will group on one line in the generated HTML # documentation. Note that a value of 0 will completely suppress the enum # values from appearing in the overview section. ENUM_VALUES_PER_LINE = 4 # The GENERATE_TREEVIEW tag is used to specify whether a tree-like index # structure should be generated to display hierarchical information. # If the tag value is set to YES, a side panel will be generated # containing a tree-like index structure (just like the one that # is generated for HTML Help). For this to work a browser that supports # JavaScript, DHTML, CSS and frames is required (i.e. any modern browser). # Windows users are probably better off using the HTML help feature. GENERATE_TREEVIEW = NO # By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories, # and Class Hierarchy pages using a tree view instead of an ordered list. USE_INLINE_TREES = NO # If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be # used to set the initial width (in pixels) of the frame in which the tree # is shown. TREEVIEW_WIDTH = 250 # When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open # links to external symbols imported via tag files in a separate window. EXT_LINKS_IN_WINDOW = NO # Use this tag to change the font size of Latex formulas included # as images in the HTML documentation. The default is 10. Note that # when you change the font size after a successful doxygen run you need # to manually remove any form_*.png images from the HTML output directory # to force them to be regenerated. FORMULA_FONTSIZE = 10 # Use the FORMULA_TRANPARENT tag to determine whether or not the images # generated for formulas are transparent PNGs. Transparent PNGs are # not supported properly for IE 6.0, but are supported on all modern browsers. # Note that when changing this option you need to delete any form_*.png files # in the HTML output before the changes have effect. FORMULA_TRANSPARENT = YES # Enable the USE_MATHJAX option to render LaTeX formulas using MathJax # (see http://www.mathjax.org) which uses client side Javascript for the # rendering instead of using prerendered bitmaps. Use this if you do not # have LaTeX installed or if you want to formulas look prettier in the HTML # output. When enabled you also need to install MathJax separately and # configure the path to it using the MATHJAX_RELPATH option. USE_MATHJAX = NO # When MathJax is enabled you need to specify the location relative to the # HTML output directory using the MATHJAX_RELPATH option. The destination # directory should contain the MathJax.js script. For instance, if the mathjax # directory is located at the same level as the HTML output directory, then # MATHJAX_RELPATH should be ../mathjax. The default value points to the # mathjax.org site, so you can quickly see the result without installing # MathJax, but it is strongly recommended to install a local copy of MathJax # before deployment. MATHJAX_RELPATH = http://www.mathjax.org/mathjax # When the SEARCHENGINE tag is enabled doxygen will generate a search box # for the HTML output. The underlying search engine uses javascript # and DHTML and should work on any modern browser. Note that when using # HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets # (GENERATE_DOCSET) there is already a search function so this one should # typically be disabled. For large projects the javascript based search engine # can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution. SEARCHENGINE = YES # When the SERVER_BASED_SEARCH tag is enabled the search engine will be # implemented using a PHP enabled web server instead of at the web client # using Javascript. Doxygen will generate the search PHP script and index # file to put on the web server. The advantage of the server # based approach is that it scales better to large projects and allows # full text search. The disadvantages are that it is more difficult to setup # and does not have live searching capabilities. SERVER_BASED_SEARCH = NO #--------------------------------------------------------------------------- # configuration options related to the LaTeX output #--------------------------------------------------------------------------- # If the GENERATE_LATEX tag is set to YES (the default) Doxygen will # generate Latex output. GENERATE_LATEX = YES # The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `latex' will be used as the default path. LATEX_OUTPUT = latex # The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be # invoked. If left blank `latex' will be used as the default command name. # Note that when enabling USE_PDFLATEX this option is only used for # generating bitmaps for formulas in the HTML output, but not in the # Makefile that is written to the output directory. LATEX_CMD_NAME = latex # The MAKEINDEX_CMD_NAME tag can be used to specify the command name to # generate index for LaTeX. If left blank `makeindex' will be used as the # default command name. MAKEINDEX_CMD_NAME = makeindex # If the COMPACT_LATEX tag is set to YES Doxygen generates more compact # LaTeX documents. This may be useful for small projects and may help to # save some trees in general. COMPACT_LATEX = NO # The PAPER_TYPE tag can be used to set the paper type that is used # by the printer. Possible values are: a4, letter, legal and # executive. If left blank a4wide will be used. PAPER_TYPE = letter # The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX # packages that should be included in the LaTeX output. EXTRA_PACKAGES = # The LATEX_HEADER tag can be used to specify a personal LaTeX header for # the generated latex document. The header should contain everything until # the first chapter. If it is left blank doxygen will generate a # standard header. Notice: only use this tag if you know what you are doing! LATEX_HEADER = # The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for # the generated latex document. The footer should contain everything after # the last chapter. If it is left blank doxygen will generate a # standard footer. Notice: only use this tag if you know what you are doing! LATEX_FOOTER = # If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated # is prepared for conversion to pdf (using ps2pdf). The pdf file will # contain links (just like the HTML output) instead of page references # This makes the output suitable for online browsing using a pdf viewer. PDF_HYPERLINKS = YES # If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of # plain latex in the generated Makefile. Set this option to YES to get a # higher quality PDF documentation. USE_PDFLATEX = YES # If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. # command to the generated LaTeX files. This will instruct LaTeX to keep # running if errors occur, instead of asking the user for help. # This option is also used when generating formulas in HTML. LATEX_BATCHMODE = NO # If LATEX_HIDE_INDICES is set to YES then doxygen will not # include the index chapters (such as File Index, Compound Index, etc.) # in the output. LATEX_HIDE_INDICES = NO # If LATEX_SOURCE_CODE is set to YES then doxygen will include # source code with syntax highlighting in the LaTeX output. # Note that which sources are shown also depends on other settings # such as SOURCE_BROWSER. LATEX_SOURCE_CODE = NO #--------------------------------------------------------------------------- # configuration options related to the RTF output #--------------------------------------------------------------------------- # If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output # The RTF output is optimized for Word 97 and may not look very pretty with # other RTF readers or editors. GENERATE_RTF = NO # The RTF_OUTPUT tag is used to specify where the RTF docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `rtf' will be used as the default path. RTF_OUTPUT = rtf # If the COMPACT_RTF tag is set to YES Doxygen generates more compact # RTF documents. This may be useful for small projects and may help to # save some trees in general. COMPACT_RTF = NO # If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated # will contain hyperlink fields. The RTF file will # contain links (just like the HTML output) instead of page references. # This makes the output suitable for online browsing using WORD or other # programs which support those fields. # Note: wordpad (write) and others do not support links. RTF_HYPERLINKS = NO # Load stylesheet definitions from file. Syntax is similar to doxygen's # config file, i.e. a series of assignments. You only have to provide # replacements, missing definitions are set to their default value. RTF_STYLESHEET_FILE = # Set optional variables used in the generation of an rtf document. # Syntax is similar to doxygen's config file. RTF_EXTENSIONS_FILE = #--------------------------------------------------------------------------- # configuration options related to the man page output #--------------------------------------------------------------------------- # If the GENERATE_MAN tag is set to YES (the default) Doxygen will # generate man pages GENERATE_MAN = YES # The MAN_OUTPUT tag is used to specify where the man pages will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `man' will be used as the default path. MAN_OUTPUT = man # The MAN_EXTENSION tag determines the extension that is added to # the generated man pages (default is the subroutine's section .3) MAN_EXTENSION = .3 # If the MAN_LINKS tag is set to YES and Doxygen generates man output, # then it will generate one additional man file for each entity # documented in the real man page(s). These additional files # only source the real man page, but without them the man command # would be unable to find the correct page. The default is NO. MAN_LINKS = NO #--------------------------------------------------------------------------- # configuration options related to the XML output #--------------------------------------------------------------------------- # If the GENERATE_XML tag is set to YES Doxygen will # generate an XML file that captures the structure of # the code including all documentation. GENERATE_XML = NO # The XML_OUTPUT tag is used to specify where the XML pages will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `xml' will be used as the default path. XML_OUTPUT = xml # The XML_SCHEMA tag can be used to specify an XML schema, # which can be used by a validating XML parser to check the # syntax of the XML files. XML_SCHEMA = # The XML_DTD tag can be used to specify an XML DTD, # which can be used by a validating XML parser to check the # syntax of the XML files. XML_DTD = # If the XML_PROGRAMLISTING tag is set to YES Doxygen will # dump the program listings (including syntax highlighting # and cross-referencing information) to the XML output. Note that # enabling this will significantly increase the size of the XML output. XML_PROGRAMLISTING = YES #--------------------------------------------------------------------------- # configuration options for the AutoGen Definitions output #--------------------------------------------------------------------------- # If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will # generate an AutoGen Definitions (see autogen.sf.net) file # that captures the structure of the code including all # documentation. Note that this feature is still experimental # and incomplete at the moment. GENERATE_AUTOGEN_DEF = NO #--------------------------------------------------------------------------- # configuration options related to the Perl module output #--------------------------------------------------------------------------- # If the GENERATE_PERLMOD tag is set to YES Doxygen will # generate a Perl module file that captures the structure of # the code including all documentation. Note that this # feature is still experimental and incomplete at the # moment. GENERATE_PERLMOD = NO # If the PERLMOD_LATEX tag is set to YES Doxygen will generate # the necessary Makefile rules, Perl scripts and LaTeX code to be able # to generate PDF and DVI output from the Perl module output. PERLMOD_LATEX = NO # If the PERLMOD_PRETTY tag is set to YES the Perl module output will be # nicely formatted so it can be parsed by a human reader. # This is useful # if you want to understand what is going on. # On the other hand, if this # tag is set to NO the size of the Perl module output will be much smaller # and Perl will parse it just the same. PERLMOD_PRETTY = YES # The names of the make variables in the generated doxyrules.make file # are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. # This is useful so different doxyrules.make files included by the same # Makefile don't overwrite each other's variables. PERLMOD_MAKEVAR_PREFIX = #--------------------------------------------------------------------------- # Configuration options related to the preprocessor #--------------------------------------------------------------------------- # If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will # evaluate all C-preprocessor directives found in the sources and include # files. ENABLE_PREPROCESSING = YES # If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro # names in the source code. If set to NO (the default) only conditional # compilation will be performed. Macro expansion can be done in a controlled # way by setting EXPAND_ONLY_PREDEF to YES. MACRO_EXPANSION = YES # If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES # then the macro expansion is limited to the macros specified with the # PREDEFINED and EXPAND_AS_DEFINED tags. EXPAND_ONLY_PREDEF = YES # If the SEARCH_INCLUDES tag is set to YES (the default) the includes files # pointed to by INCLUDE_PATH will be searched when a #include is found. SEARCH_INCLUDES = YES # The INCLUDE_PATH tag can be used to specify one or more directories that # contain include files that are not input files but should be processed by # the preprocessor. INCLUDE_PATH = # You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard # patterns (like *.h and *.hpp) to filter out the header-files in the # directories. If left blank, the patterns specified with FILE_PATTERNS will # be used. INCLUDE_FILE_PATTERNS = # The PREDEFINED tag can be used to specify one or more macro names that # are defined before the preprocessor is started (similar to the -D option of # gcc). The argument of the tag is a list of macros of the form: name # or name=definition (no spaces). If the definition and the = are # omitted =1 is assumed. To prevent a macro definition from being # undefined via #undef or recursively expanded use the := operator # instead of the = operator. PREDEFINED = OPUS_EXPORT= OPUS_CUSTOM_EXPORT= OPUS_CUSTOM_EXPORT_STATIC= OPUS_WARN_UNUSED_RESULT= OPUS_ARG_NONNULL(_x)= # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then # this tag can be used to specify a list of macro names that should be expanded. # The macro definition that is found in the sources will be used. # Use the PREDEFINED tag if you want to use a different macro definition that # overrules the definition found in the source code. EXPAND_AS_DEFINED = # If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then # doxygen's preprocessor will remove all references to function-like macros # that are alone on a line, have an all uppercase name, and do not end with a # semicolon, because these will confuse the parser if not removed. SKIP_FUNCTION_MACROS = YES #--------------------------------------------------------------------------- # Configuration::additions related to external references #--------------------------------------------------------------------------- # The TAGFILES option can be used to specify one or more tagfiles. # Optionally an initial location of the external documentation # can be added for each tagfile. The format of a tag file without # this location is as follows: # # TAGFILES = file1 file2 ... # Adding location for the tag files is done as follows: # # TAGFILES = file1=loc1 "file2 = loc2" ... # where "loc1" and "loc2" can be relative or absolute paths or # URLs. If a location is present for each tag, the installdox tool # does not have to be run to correct the links. # Note that each tag file must have a unique name # (where the name does NOT include the path) # If a tag file is not located in the directory in which doxygen # is run, you must also specify the path to the tagfile here. TAGFILES = # When a file name is specified after GENERATE_TAGFILE, doxygen will create # a tag file that is based on the input files it reads. GENERATE_TAGFILE = # If the ALLEXTERNALS tag is set to YES all external classes will be listed # in the class index. If set to NO only the inherited external classes # will be listed. ALLEXTERNALS = NO # If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed # in the modules index. If set to NO, only the current project's groups will # be listed. EXTERNAL_GROUPS = YES # The PERL_PATH should be the absolute path and name of the perl script # interpreter (i.e. the result of `which perl'). PERL_PATH = /usr/bin/perl #--------------------------------------------------------------------------- # Configuration options related to the dot tool #--------------------------------------------------------------------------- # If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will # generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base # or super classes. Setting the tag to NO turns the diagrams off. Note that # this option also works with HAVE_DOT disabled, but it is recommended to # install and use dot, since it yields more powerful graphs. CLASS_DIAGRAMS = YES # You can define message sequence charts within doxygen comments using the \msc # command. Doxygen will then run the mscgen tool (see # http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the # documentation. The MSCGEN_PATH tag allows you to specify the directory where # the mscgen tool resides. If left empty the tool is assumed to be found in the # default search path. MSCGEN_PATH = # If set to YES, the inheritance and collaboration graphs will hide # inheritance and usage relations if the target is undocumented # or is not a class. HIDE_UNDOC_RELATIONS = YES # If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is # available from the path. This tool is part of Graphviz, a graph visualization # toolkit from AT&T and Lucent Bell Labs. The other options in this section # have no effect if this option is set to NO (the default) HAVE_DOT = NO # The DOT_NUM_THREADS specifies the number of dot invocations doxygen is # allowed to run in parallel. When set to 0 (the default) doxygen will # base this on the number of processors available in the system. You can set it # explicitly to a value larger than 0 to get control over the balance # between CPU load and processing speed. DOT_NUM_THREADS = 0 # By default doxygen will write a font called Helvetica to the output # directory and reference it in all dot files that doxygen generates. # When you want a differently looking font you can specify the font name # using DOT_FONTNAME. You need to make sure dot is able to find the font, # which can be done by putting it in a standard location or by setting the # DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory # containing the font. DOT_FONTNAME = Helvetica # The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. # The default size is 10pt. DOT_FONTSIZE = 10 # By default doxygen will tell dot to use the output directory to look for the # FreeSans.ttf font (which doxygen will put there itself). If you specify a # different font using DOT_FONTNAME you can set the path where dot # can find it using this tag. DOT_FONTPATH = # If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen # will generate a graph for each documented class showing the direct and # indirect inheritance relations. Setting this tag to YES will force the # the CLASS_DIAGRAMS tag to NO. CLASS_GRAPH = YES # If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen # will generate a graph for each documented class showing the direct and # indirect implementation dependencies (inheritance, containment, and # class references variables) of the class with other documented classes. COLLABORATION_GRAPH = YES # If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen # will generate a graph for groups, showing the direct groups dependencies GROUP_GRAPHS = YES # If the UML_LOOK tag is set to YES doxygen will generate inheritance and # collaboration diagrams in a style similar to the OMG's Unified Modeling # Language. UML_LOOK = NO # If set to YES, the inheritance and collaboration graphs will show the # relations between templates and their instances. TEMPLATE_RELATIONS = NO # If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT # tags are set to YES then doxygen will generate a graph for each documented # file showing the direct and indirect include dependencies of the file with # other documented files. INCLUDE_GRAPH = YES # If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and # HAVE_DOT tags are set to YES then doxygen will generate a graph for each # documented header file showing the documented files that directly or # indirectly include this file. INCLUDED_BY_GRAPH = YES # If the CALL_GRAPH and HAVE_DOT options are set to YES then # doxygen will generate a call dependency graph for every global function # or class method. Note that enabling this option will significantly increase # the time of a run. So in most cases it will be better to enable call graphs # for selected functions only using the \callgraph command. CALL_GRAPH = NO # If the CALLER_GRAPH and HAVE_DOT tags are set to YES then # doxygen will generate a caller dependency graph for every global function # or class method. Note that enabling this option will significantly increase # the time of a run. So in most cases it will be better to enable caller # graphs for selected functions only using the \callergraph command. CALLER_GRAPH = NO # If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen # will generate a graphical hierarchy of all classes instead of a textual one. GRAPHICAL_HIERARCHY = YES # If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES # then doxygen will show the dependencies a directory has on other directories # in a graphical way. The dependency relations are determined by the #include # relations between the files in the directories. DIRECTORY_GRAPH = YES # The DOT_IMAGE_FORMAT tag can be used to set the image format of the images # generated by dot. Possible values are svg, png, jpg, or gif. # If left blank png will be used. DOT_IMAGE_FORMAT = png # The tag DOT_PATH can be used to specify the path where the dot tool can be # found. If left blank, it is assumed the dot tool can be found in the path. DOT_PATH = # The DOTFILE_DIRS tag can be used to specify one or more directories that # contain dot files that are included in the documentation (see the # \dotfile command). DOTFILE_DIRS = # The MSCFILE_DIRS tag can be used to specify one or more directories that # contain msc files that are included in the documentation (see the # \mscfile command). MSCFILE_DIRS = # The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of # nodes that will be shown in the graph. If the number of nodes in a graph # becomes larger than this value, doxygen will truncate the graph, which is # visualized by representing a node as a red box. Note that doxygen if the # number of direct children of the root node in a graph is already larger than # DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note # that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. DOT_GRAPH_MAX_NODES = 50 # The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the # graphs generated by dot. A depth value of 3 means that only nodes reachable # from the root by following a path via at most 3 edges will be shown. Nodes # that lay further from the root node will be omitted. Note that setting this # option to 1 or 2 may greatly reduce the computation time needed for large # code bases. Also note that the size of a graph can be further restricted by # DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. MAX_DOT_GRAPH_DEPTH = 0 # Set the DOT_TRANSPARENT tag to YES to generate images with a transparent # background. This is disabled by default, because dot on Windows does not # seem to support this out of the box. Warning: Depending on the platform used, # enabling this option may lead to badly anti-aliased labels on the edges of # a graph (i.e. they become hard to read). DOT_TRANSPARENT = NO # Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output # files in one run (i.e. multiple -o and -T options on the command line). This # makes dot run faster, but since only newer versions of dot (>1.8.10) # support this, this feature is disabled by default. DOT_MULTI_TARGETS = NO # If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will # generate a legend page explaining the meaning of the various boxes and # arrows in the dot generated graphs. GENERATE_LEGEND = YES # If the DOT_CLEANUP tag is set to YES (the default) Doxygen will # remove the intermediate dot files that are used to generate # the various graphs. DOT_CLEANUP = YES opus-1.1.2/doc/Makefile.am000066400000000000000000000023021264527674100153150ustar00rootroot00000000000000## Process this file with automake to produce Makefile.in DOCINPUTS = $(top_srcdir)/include/opus.h \ $(top_srcdir)/include/opus_multistream.h \ $(top_srcdir)/include/opus_defines.h \ $(top_srcdir)/include/opus_types.h \ $(top_srcdir)/include/opus_custom.h \ $(top_srcdir)/doc/header.html \ $(top_srcdir)/doc/footer.html \ $(top_srcdir)/doc/customdoxygen.css EXTRA_DIST = customdoxygen.css Doxyfile.in footer.html header.html \ opus_logo.svg trivial_example.c if HAVE_DOXYGEN all-local: doxygen-build.stamp doxygen-build.stamp: Doxyfile $(DOCINPUTS) doxygen touch $@ install-data-local: $(INSTALL) -d $(DESTDIR)$(docdir)/html/search for f in `find html -type f \! -name "installdox"`; do \ $(INSTALL_DATA) $$f $(DESTDIR)$(docdir)/$$f; \ done $(INSTALL) -d $(DESTDIR)$(mandir)/man3 cd man && find man3 -type f -name opus_*.3 \ -exec $(INSTALL_DATA) \{} $(DESTDIR)$(mandir)/man3 \; clean-local: $(RM) -r html $(RM) -r latex $(RM) -r man $(RM) doxygen-build.stamp uninstall-local: $(RM) -r $(DESTDIR)$(docdir)/html $(RM) $(DESTDIR)$(mandir)/man3/opus_*.3 $(DESTDIR)$(mandir)/man3/opus.h.3 endif opus-1.1.2/doc/Makefile.in000066400000000000000000000346021264527674100153360ustar00rootroot00000000000000# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = doc DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(srcdir)/Doxyfile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/as-gcc-inline-assembly.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/opus-intrinsics.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = Doxyfile CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ ARM2GNU_PARAMS = @ARM2GNU_PARAMS@ ARM_NEON_INTR_CFLAGS = @ARM_NEON_INTR_CFLAGS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ HAVE_ARM_NE10 = @HAVE_ARM_NE10@ HAVE_DOXYGEN = @HAVE_DOXYGEN@ HAVE_PERL = @HAVE_PERL@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NE10_CFLAGS = @NE10_CFLAGS@ NE10_LIBS = @NE10_LIBS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPUS_ARM_MAY_HAVE_EDSP = @OPUS_ARM_MAY_HAVE_EDSP@ OPUS_ARM_MAY_HAVE_MEDIA = @OPUS_ARM_MAY_HAVE_MEDIA@ OPUS_ARM_MAY_HAVE_NEON = @OPUS_ARM_MAY_HAVE_NEON@ OPUS_ARM_NEON_INTR_CFLAGS = @OPUS_ARM_NEON_INTR_CFLAGS@ OPUS_HAVE_RTCD = @OPUS_HAVE_RTCD@ OPUS_LT_AGE = @OPUS_LT_AGE@ OPUS_LT_CURRENT = @OPUS_LT_CURRENT@ OPUS_LT_REVISION = @OPUS_LT_REVISION@ OPUS_X86_AVX_CFLAGS = @OPUS_X86_AVX_CFLAGS@ OPUS_X86_SSE2_CFLAGS = @OPUS_X86_SSE2_CFLAGS@ OPUS_X86_SSE4_1_CFLAGS = @OPUS_X86_SSE4_1_CFLAGS@ OPUS_X86_SSE_CFLAGS = @OPUS_X86_SSE_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PC_BUILD = @PC_BUILD@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ X86_AVX_CFLAGS = @X86_AVX_CFLAGS@ X86_SSE2_CFLAGS = @X86_SSE2_CFLAGS@ X86_SSE4_1_CFLAGS = @X86_SSE4_1_CFLAGS@ X86_SSE_CFLAGS = @X86_SSE_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ DOCINPUTS = $(top_srcdir)/include/opus.h \ $(top_srcdir)/include/opus_multistream.h \ $(top_srcdir)/include/opus_defines.h \ $(top_srcdir)/include/opus_types.h \ $(top_srcdir)/include/opus_custom.h \ $(top_srcdir)/doc/header.html \ $(top_srcdir)/doc/footer.html \ $(top_srcdir)/doc/customdoxygen.css EXTRA_DIST = customdoxygen.css Doxyfile.in footer.html header.html \ opus_logo.svg trivial_example.c all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu doc/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): Doxyfile: $(top_builddir)/config.status $(srcdir)/Doxyfile.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am @HAVE_DOXYGEN_FALSE@all-local: all-am: Makefile all-local installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." @HAVE_DOXYGEN_FALSE@clean-local: @HAVE_DOXYGEN_FALSE@uninstall-local: @HAVE_DOXYGEN_FALSE@install-data-local: clean: clean-am clean-am: clean-generic clean-libtool clean-local mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-data-local install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-local .MAKE: install-am install-strip .PHONY: all all-am all-local check check-am clean clean-generic \ clean-libtool clean-local cscopelist-am ctags-am distclean \ distclean-generic distclean-libtool distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-data-local install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \ uninstall-am uninstall-local @HAVE_DOXYGEN_TRUE@all-local: doxygen-build.stamp @HAVE_DOXYGEN_TRUE@doxygen-build.stamp: Doxyfile $(DOCINPUTS) @HAVE_DOXYGEN_TRUE@ doxygen @HAVE_DOXYGEN_TRUE@ touch $@ @HAVE_DOXYGEN_TRUE@install-data-local: @HAVE_DOXYGEN_TRUE@ $(INSTALL) -d $(DESTDIR)$(docdir)/html/search @HAVE_DOXYGEN_TRUE@ for f in `find html -type f \! -name "installdox"`; do \ @HAVE_DOXYGEN_TRUE@ $(INSTALL_DATA) $$f $(DESTDIR)$(docdir)/$$f; \ @HAVE_DOXYGEN_TRUE@ done @HAVE_DOXYGEN_TRUE@ $(INSTALL) -d $(DESTDIR)$(mandir)/man3 @HAVE_DOXYGEN_TRUE@ cd man && find man3 -type f -name opus_*.3 \ @HAVE_DOXYGEN_TRUE@ -exec $(INSTALL_DATA) \{} $(DESTDIR)$(mandir)/man3 \; @HAVE_DOXYGEN_TRUE@clean-local: @HAVE_DOXYGEN_TRUE@ $(RM) -r html @HAVE_DOXYGEN_TRUE@ $(RM) -r latex @HAVE_DOXYGEN_TRUE@ $(RM) -r man @HAVE_DOXYGEN_TRUE@ $(RM) doxygen-build.stamp @HAVE_DOXYGEN_TRUE@uninstall-local: @HAVE_DOXYGEN_TRUE@ $(RM) -r $(DESTDIR)$(docdir)/html @HAVE_DOXYGEN_TRUE@ $(RM) $(DESTDIR)$(mandir)/man3/opus_*.3 $(DESTDIR)$(mandir)/man3/opus.h.3 # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: opus-1.1.2/doc/build_draft.sh000077500000000000000000000100761264527674100161060ustar00rootroot00000000000000#!/bin/sh # Copyright (c) 2011-2012 Xiph.Org Foundation and Mozilla Corporation # # This file is extracted from RFC6716. Please see that RFC for additional # information. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # - Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # # - 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. # # - Neither the name of Internet Society, IETF or IETF Trust, nor the # names of specific 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 OWNER # 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. #Stop on errors set -e #Set the CWD to the location of this script [ -n "${0%/*}" ] && cd "${0%/*}" toplevel=".." destdir="opus_source" echo packaging source code rm -rf "${destdir}" mkdir "${destdir}" mkdir "${destdir}/src" mkdir "${destdir}/silk" mkdir "${destdir}/silk/float" mkdir "${destdir}/silk/fixed" mkdir "${destdir}/celt" mkdir "${destdir}/include" for f in `cat "${toplevel}"/opus_sources.mk "${toplevel}"/celt_sources.mk \ "${toplevel}"/silk_sources.mk "${toplevel}"/opus_headers.mk \ "${toplevel}"/celt_headers.mk "${toplevel}"/silk_headers.mk \ | grep '\.[ch]' | sed -e 's/^.*=//' -e 's/\\\\//'` ; do cp -a "${toplevel}/${f}" "${destdir}/${f}" done cp -a "${toplevel}"/src/opus_demo.c "${destdir}"/src/ cp -a "${toplevel}"/src/opus_compare.c "${destdir}"/src/ cp -a "${toplevel}"/celt/opus_custom_demo.c "${destdir}"/celt/ cp -a "${toplevel}"/Makefile.unix "${destdir}"/Makefile cp -a "${toplevel}"/opus_sources.mk "${destdir}"/ cp -a "${toplevel}"/celt_sources.mk "${destdir}"/ cp -a "${toplevel}"/silk_sources.mk "${destdir}"/ cp -a "${toplevel}"/README.draft "${destdir}"/README cp -a "${toplevel}"/COPYING "${destdir}"/COPYING cp -a "${toplevel}"/tests/run_vectors.sh "${destdir}"/ GZIP=-9 tar --owner=root --group=root --format=v7 -czf opus_source.tar.gz "${destdir}" echo building base64 version cat opus_source.tar.gz| base64 | tr -d '\n' | fold -w 64 | \ sed -e 's/^/\###/' -e 's/$/\<\/spanx\>\/' > \ opus_source.base64 #echo '
' > opus_compare_escaped.c #echo '' >> opus_compare_escaped.c #echo '> opus_compare_escaped.c #cat opus_compare.c >> opus_compare_escaped.c #echo ']]>' >> opus_compare_escaped.c #echo '' >> opus_compare_escaped.c #echo '
' >> opus_compare_escaped.c if [[ ! -d ../opus_testvectors ]] ; then echo "Downloading test vectors..." wget 'http://opus-codec.org/testvectors/opus_testvectors.tar.gz' tar -C .. -xvzf opus_testvectors.tar.gz fi echo '
' > testvectors_sha1 echo '' >> testvectors_sha1 echo '> testvectors_sha1 (cd ../opus_testvectors; sha1sum *.bit *.dec) >> testvectors_sha1 #cd opus_testvectors #sha1sum *.bit *.dec >> ../testvectors_sha1 #cd .. echo ']]>' >> testvectors_sha1 echo '' >> testvectors_sha1 echo '
' >> testvectors_sha1 echo running xml2rfc xml2rfc draft-ietf-codec-opus.xml draft-ietf-codec-opus.html & xml2rfc draft-ietf-codec-opus.xml wait opus-1.1.2/doc/build_isobmff.sh000077500000000000000000000041101264527674100164230ustar00rootroot00000000000000#!/bin/sh # Copyright (c) 2014 Xiph.Org Foundation and Mozilla Foundation # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # - Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # # - 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. # # 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 OWNER # 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. #Stop on errors set -e #Set the CWD to the location of this script [ -n "${0%/*}" ] && cd "${0%/*}" HTML=opus_in_isobmff.html echo downloading updates... CSS=${HTML%%.html}.css wget -q http://vfrmaniac.fushizen.eu/contents/${HTML} -O ${HTML} wget -q http://vfrmaniac.fushizen.eu/style.css -O ${CSS} echo updating links... cat ${HTML} | sed -e "s/\\.\\.\\/style.css/${CSS}/" > ${HTML}+ && mv ${HTML}+ ${HTML} echo stripping... cat ${HTML} | sed -e 's///g' > ${HTML}+ && mv ${HTML}+ ${HTML} cat ${HTML} | sed -e 's/ *$//g' > ${HTML}+ && mv ${HTML}+ ${HTML} cat ${CSS} | sed -e 's/ *$//g' > ${CSS}+ && mv ${CSS}+ ${CSS} VERSION=$(fgrep Version ${HTML} | sed 's/.*Version \([0-9]\.[0-9]\.[0-9]\).*/\1/') echo Now at version ${VERSION} opus-1.1.2/doc/build_oggdraft.sh000077500000000000000000000041761264527674100166070ustar00rootroot00000000000000#!/bin/sh # Copyright (c) 2012 Xiph.Org Foundation and Mozilla Corporation # # This file is extracted from RFC6716. Please see that RFC for additional # information. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # - Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # # - 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. # # - Neither the name of Internet Society, IETF or IETF Trust, nor the # names of specific 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 OWNER # 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. #Stop on errors set -e #Set the CWD to the location of this script [ -n "${0%/*}" ] && cd "${0%/*}" if test -z `which xml2rfc 2> /dev/null`; then echo "Error: couldn't find xml2rfc." echo echo "Please install xml2rfc version 2 or later." echo "E.g. 'pip install xml2rfc' or follow the instructions" echo "on http://pypi.python.org/pypi/xml2rfc/ or tools.ietf.org." exit 1 fi echo running xml2rfc # version 2 syntax xml2rfc draft-ietf-codec-oggopus.xml --text --html opus-1.1.2/doc/customdoxygen.css000066400000000000000000000427121264527674100167140ustar00rootroot00000000000000/* The standard CSS for doxygen */ body, table, div, p, dl { font-family: Lucida Grande, Verdana, Geneva, Arial, sans-serif; font-size: 13px; line-height: 1.3; } /* @group Heading Levels */ h1 { font-size: 150%; } .title { font-size: 150%; font-weight: bold; margin: 10px 2px; } h2 { font-size: 120%; } h3 { font-size: 100%; } dt { font-weight: bold; } div.multicol { -moz-column-gap: 1em; -webkit-column-gap: 1em; -moz-column-count: 3; -webkit-column-count: 3; } p.startli, p.startdd, p.starttd { margin-top: 2px; } p.endli { margin-bottom: 0px; } p.enddd { margin-bottom: 4px; } p.endtd { margin-bottom: 2px; } /* @end */ caption { font-weight: bold; } span.legend { font-size: 70%; text-align: center; } h3.version { font-size: 90%; text-align: center; } div.qindex, div.navtab{ background-color: #F1F1F1; border: 1px solid #BDBDBD; text-align: center; } div.qindex, div.navpath { width: 100%; line-height: 140%; } div.navtab { margin-right: 15px; } /* @group Link Styling */ a { color: #646464; font-weight: normal; text-decoration: none; } .contents a:visited { color: #747474; } a:hover { text-decoration: underline; } a.qindex { font-weight: bold; } a.qindexHL { font-weight: bold; background-color: #B8B8B8; color: #ffffff; border: 1px double #A8A8A8; } .contents a.qindexHL:visited { color: #ffffff; } a.el { font-weight: bold; } a.elRef { } a.code, a.code:visited { color: #4665A2; } a.codeRef, a.codeRef:visited { color: #4665A2; } /* @end */ dl.el { margin-left: -1cm; } .fragment { font-family: monospace, fixed; font-size: 105%; } pre.fragment { border: 1px solid #D5D5D5; background-color: #FCFCFC; padding: 4px 6px; margin: 4px 8px 4px 2px; overflow: auto; word-wrap: break-word; font-size: 9pt; line-height: 125%; } div.ah { background-color: black; font-weight: bold; color: #ffffff; margin-bottom: 3px; margin-top: 3px; padding: 0.2em; border: solid thin #333; border-radius: 0.5em; -webkit-border-radius: .5em; -moz-border-radius: .5em; box-shadow: 2px 2px 3px #999; -webkit-box-shadow: 2px 2px 3px #999; -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px; background-image: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#000),color-stop(0.3, #444)); background-image: -moz-linear-gradient(center top, #eee 0%, #444 40%, #000); } div.groupHeader { margin-left: 16px; margin-top: 12px; font-weight: bold; } div.groupText { margin-left: 16px; font-style: italic; } body { background-color: white; color: black; margin: 0; } div.contents { margin-top: 10px; margin-left: 8px; margin-right: 8px; } td.indexkey { background-color: #F1F1F1; font-weight: bold; border: 1px solid #D5D5D5; margin: 2px 0px 2px 0; padding: 2px 10px; white-space: nowrap; vertical-align: top; } td.indexvalue { background-color: #F1F1F1; border: 1px solid #D5D5D5; padding: 2px 10px; margin: 2px 0px; } tr.memlist { background-color: #F2F2F2; } p.formulaDsp { text-align: center; } img.formulaDsp { } img.formulaInl { vertical-align: middle; } div.center { text-align: center; margin-top: 0px; margin-bottom: 0px; padding: 0px; } div.center img { border: 0px; } address.footer { text-align: right; padding-right: 12px; } img.footer { border: 0px; vertical-align: middle; } /* @group Code Colorization */ span.keyword { color: #008000 } span.keywordtype { color: #604020 } span.keywordflow { color: #e08000 } span.comment { color: #800000 } span.preprocessor { color: #806020 } span.stringliteral { color: #002080 } span.charliteral { color: #008080 } span.vhdldigit { color: #ff00ff } span.vhdlchar { color: #000000 } span.vhdlkeyword { color: #700070 } span.vhdllogic { color: #ff0000 } blockquote { background-color: #F9F9F9; border-left: 2px solid #B8B8B8; margin: 0 24px 0 4px; padding: 0 12px 0 16px; } /* @end */ /* .search { color: #003399; font-weight: bold; } form.search { margin-bottom: 0px; margin-top: 0px; } input.search { font-size: 75%; color: #000080; font-weight: normal; background-color: #e8eef2; } */ td.tiny { font-size: 75%; } .dirtab { padding: 4px; border-collapse: collapse; border: 1px solid #BDBDBD; } th.dirtab { background: #F1F1F1; font-weight: bold; } hr { height: 0px; border: none; border-top: 1px solid #7A7A7A; } hr.footer { height: 1px; } /* @group Member Descriptions */ table.memberdecls { border-spacing: 0px; padding: 0px; } .mdescLeft, .mdescRight, .memItemLeft, .memItemRight, .memTemplItemLeft, .memTemplItemRight, .memTemplParams { background-color: #FAFAFA; border: none; margin: 4px; padding: 1px 0 0 8px; } .mdescLeft, .mdescRight { padding: 0px 8px 4px 8px; color: #555; } .memItemLeft, .memItemRight, .memTemplParams { border-top: 1px solid #D5D5D5; } .memItemLeft, .memTemplItemLeft { white-space: nowrap; } .memItemRight { width: 100%; } .memTemplParams { color: #747474; white-space: nowrap; } /* @end */ /* @group Member Details */ /* Styles for detailed member documentation */ .memtemplate { font-size: 80%; color: #747474; font-weight: normal; margin-left: 9px; } .memnav { background-color: #F1F1F1; border: 1px solid #BDBDBD; text-align: center; margin: 2px; margin-right: 15px; padding: 2px; } .mempage { width: 100%; } .memitem { padding: 0; margin-bottom: 10px; margin-right: 5px; } .memname { white-space: nowrap; font-weight: bold; margin-left: 6px; } .memproto, dl.reflist dt { border-top: 1px solid #C0C0C0; border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0; padding: 6px 0px 6px 0px; color: #3D3D3D; font-weight: bold; text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); /* opera specific markup */ box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); border-top-right-radius: 8px; border-top-left-radius: 8px; /* firefox specific markup */ -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; -moz-border-radius-topright: 8px; -moz-border-radius-topleft: 8px; /* webkit specific markup */ -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); -webkit-border-top-right-radius: 8px; -webkit-border-top-left-radius: 8px; background-image:url('nav_f.png'); background-repeat:repeat-x; background-color: #EAEAEA; } .memdoc, dl.reflist dd { border-bottom: 1px solid #C0C0C0; border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0; padding: 2px 5px; background-color: #FCFCFC; border-top-width: 0; /* opera specific markup */ border-bottom-left-radius: 8px; border-bottom-right-radius: 8px; box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); /* firefox specific markup */ -moz-border-radius-bottomleft: 8px; -moz-border-radius-bottomright: 8px; -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; background-image: -moz-linear-gradient(center top, #FFFFFF 0%, #FFFFFF 60%, #F9F9F9 95%, #F2F2F2); /* webkit specific markup */ -webkit-border-bottom-left-radius: 8px; -webkit-border-bottom-right-radius: 8px; -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); background-image: -webkit-gradient(linear,center top,center bottom,from(#FFFFFF), color-stop(0.6,#FFFFFF), color-stop(0.60,#FFFFFF), color-stop(0.95,#F9F9F9), to(#F2F2F2)); } dl.reflist dt { padding: 5px; } dl.reflist dd { margin: 0px 0px 10px 0px; padding: 5px; } .paramkey { text-align: right; } .paramtype { white-space: nowrap; } .paramname { color: #602020; white-space: nowrap; } .paramname em { font-style: normal; } .params, .retval, .exception, .tparams { border-spacing: 6px 2px; } .params .paramname, .retval .paramname { font-weight: bold; vertical-align: top; } .params .paramtype { font-style: italic; vertical-align: top; } .params .paramdir { font-family: "courier new",courier,monospace; vertical-align: top; } /* @end */ /* @group Directory (tree) */ /* for the tree view */ .ftvtree { font-family: sans-serif; margin: 0px; } /* these are for tree view when used as main index */ .directory { font-size: 9pt; font-weight: bold; margin: 5px; } .directory h3 { margin: 0px; margin-top: 1em; font-size: 11pt; } /* The following two styles can be used to replace the root node title with an image of your choice. Simply uncomment the next two styles, specify the name of your image and be sure to set 'height' to the proper pixel height of your image. */ /* .directory h3.swap { height: 61px; background-repeat: no-repeat; background-image: url("yourimage.gif"); } .directory h3.swap span { display: none; } */ .directory > h3 { margin-top: 0; } .directory p { margin: 0px; white-space: nowrap; } .directory div { display: none; margin: 0px; } .directory img { vertical-align: -30%; } /* these are for tree view when not used as main index */ .directory-alt { font-size: 100%; font-weight: bold; } .directory-alt h3 { margin: 0px; margin-top: 1em; font-size: 11pt; } .directory-alt > h3 { margin-top: 0; } .directory-alt p { margin: 0px; white-space: nowrap; } .directory-alt div { display: none; margin: 0px; } .directory-alt img { vertical-align: -30%; } /* @end */ div.dynheader { margin-top: 8px; } address { font-style: normal; color: #464646; } table.doxtable { border-collapse:collapse; margin-top: 4px; margin-bottom: 4px; } table.doxtable td, table.doxtable th { border: 1px solid #4A4A4A; padding: 3px 7px 2px; } table.doxtable th { background-color: #5B5B5B; color: #FFFFFF; font-size: 110%; padding-bottom: 4px; padding-top: 5px; } table.fieldtable { width: 100%; margin-bottom: 10px; border: 1px solid #C0C0C0; border-spacing: 0px; -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px; -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px; -webkit-box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15); box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15); } .fieldtable td, .fieldtable th { padding: 3px 7px 2px; } .fieldtable td.fieldtype, .fieldtable td.fieldname { white-space: nowrap; border-right: 1px solid #C0C0C0; border-bottom: 1px solid #C0C0C0; vertical-align: top; } .fieldtable td.fielddoc { border-bottom: 1px solid #C0C0C0; width: 100%; } .fieldtable tr:last-child td { border-bottom: none; } .fieldtable th { background-image:url('nav_f.png'); background-repeat:repeat-x; background-color: #EAEAEA; font-size: 90%; color: #3D3D3D; padding-bottom: 4px; padding-top: 5px; text-align:left; -moz-border-radius-topleft: 4px; -moz-border-radius-topright: 4px; -webkit-border-top-left-radius: 4px; -webkit-border-top-right-radius: 4px; border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom: 1px solid #C0C0C0; } .tabsearch { top: 0px; left: 10px; height: 36px; background-image: url('tab_b.png'); z-index: 101; overflow: hidden; font-size: 13px; } .navpath ul { font-size: 11px; background-image:url('tab_b.png'); background-repeat:repeat-x; height:30px; line-height:30px; color:#ABABAB; border:solid 1px #D3D3D3; overflow:hidden; margin:0px; padding:0px; } .navpath li { list-style-type:none; float:left; padding-left:10px; padding-right:15px; background-image:url('bc_s.png'); background-repeat:no-repeat; background-position:right; color:#595959; } .navpath li.navelem a { height:32px; display:block; text-decoration: none; outline: none; } .navpath li.navelem a:hover { color:#929292; } .navpath li.footer { list-style-type:none; float:right; padding-left:10px; padding-right:15px; background-image:none; background-repeat:no-repeat; background-position:right; color:#595959; font-size: 8pt; } div.summary { float: right; font-size: 8pt; padding-right: 5px; width: 50%; text-align: right; } div.summary a { white-space: nowrap; } div.ingroups { margin-left: 5px; font-size: 8pt; padding-left: 5px; width: 50%; text-align: left; } div.ingroups a { white-space: nowrap; } div.header { background-image:url('nav_h.png'); background-repeat:repeat-x; background-color: #FAFAFA; margin: 0px; border-bottom: 1px solid #D5D5D5; } div.headertitle { padding: 5px 5px 5px 7px; } dl { padding: 0 0 0 10px; } /* dl.note, dl.warning, dl.attention, dl.pre, dl.post, dl.invariant, dl.deprecated, dl.todo, dl.test, dl.bug */ dl.section { border-left:4px solid; padding: 0 0 0 6px; } dl.note { border-color: #D0C000; } dl.warning, dl.attention { border-color: #FF0000; } dl.pre, dl.post, dl.invariant { border-color: #00D000; } dl.deprecated { border-color: #505050; } dl.todo { border-color: #00C0E0; } dl.test { border-color: #3030E0; } dl.bug { border-color: #C08050; } dl.section dd { margin-bottom: 6px; } #projectlogo { text-align: center; vertical-align: bottom; border-collapse: separate; } #projectlogo img { border: 0px none; } #projectname { font: 300% Tahoma, Arial,sans-serif; margin: 0px; padding: 2px 0px; } #projectbrief { font: 120% Tahoma, Arial,sans-serif; margin: 0px; padding: 0px; } #projectnumber { font: 100% Tahoma, Arial,sans-serif; margin: 0px; padding: 0px; } #titlearea { padding: 0px; margin: 0px; width: 100%; border-bottom: 1px solid #848484; } .image { text-align: center; } .dotgraph { text-align: center; } .mscgraph { text-align: center; } .caption { font-weight: bold; } div.zoom { border: 1px solid #AFAFAF; } dl.citelist { margin-bottom:50px; } dl.citelist dt { color:#545454; float:left; font-weight:bold; margin-right:10px; padding:5px; } dl.citelist dd { margin:2px 0; padding:5px 0; } div.toc { padding: 14px 25px; background-color: #F7F7F7; border: 1px solid #E3E3E3; border-radius: 7px 7px 7px 7px; float: right; height: auto; margin: 0 20px 10px 10px; width: 200px; } div.toc li { background: url("bdwn.png") no-repeat scroll 0 5px transparent; font: 10px/1.2 Verdana,DejaVu Sans,Geneva,sans-serif; margin-top: 5px; padding-left: 10px; padding-top: 2px; } div.toc h3 { font: bold 12px/1.2 Arial,FreeSans,sans-serif; color: #747474; border-bottom: 0 none; margin: 0; } div.toc ul { list-style: none outside none; border: medium none; padding: 0px; } div.toc li.level1 { margin-left: 0px; } div.toc li.level2 { margin-left: 15px; } div.toc li.level3 { margin-left: 30px; } div.toc li.level4 { margin-left: 45px; } @media print { #top { display: none; } #side-nav { display: none; } #nav-path { display: none; } body { overflow:visible; } h1, h2, h3, h4, h5, h6 { page-break-after: avoid; } .summary { display: none; } .memitem { page-break-inside: avoid; } #doc-content { margin-left:0 !important; height:auto !important; width:auto !important; overflow:inherit; display:inline; } pre.fragment { overflow: visible; text-wrap: unrestricted; white-space: -moz-pre-wrap; /* Moz */ white-space: -pre-wrap; /* Opera 4-6 */ white-space: -o-pre-wrap; /* Opera 7 */ white-space: pre-wrap; /* CSS3 */ word-wrap: break-word; /* IE 5.5+ */ } } opus-1.1.2/doc/draft-ietf-codec-oggopus.xml000066400000000000000000002202601264527674100205710ustar00rootroot00000000000000 ]> Ogg Encapsulation for the Opus Audio Codec Mozilla Corporation
650 Castro Street Mountain View CA 94041 USA +1 650 903-0800 tterribe@xiph.org
Voicetronix
246 Pulteney Street, Level 1 Adelaide SA 5000 Australia +61 8 8232 9112 ron@debian.org
Mozilla Corporation
163 West Hastings Street Vancouver BC V6B 1H5 Canada +1 778 785 1540 giles@xiph.org
RAI codec This document defines the Ogg encapsulation for the Opus interactive speech and audio codec. This allows data encoded in the Opus format to be stored in an Ogg logical bitstream.
The IETF Opus codec is a low-latency audio codec optimized for both voice and general-purpose audio. See for technical details. This document defines the encapsulation of Opus in a continuous, logical Ogg bitstream . Ogg encapsulation provides Opus with a long-term storage format supporting all of the essential features, including metadata, fast and accurate seeking, corruption detection, recapture after errors, low overhead, and the ability to multiplex Opus with other codecs (including video) with minimal buffering. It also provides a live streamable format, capable of delivery over a reliable stream-oriented transport, without requiring all the data, or even the total length of the data, up-front, in a form that is identical to the on-disk storage format. Ogg bitstreams are made up of a series of 'pages', each of which contains data from one or more 'packets'. Pages are the fundamental unit of multiplexing in an Ogg stream. Each page is associated with a particular logical stream and contains a capture pattern and checksum, flags to mark the beginning and end of the logical stream, and a 'granule position' that represents an absolute position in the stream, to aid seeking. A single page can contain up to 65,025 octets of packet data from up to 255 different packets. Packets can be split arbitrarily across pages, and continued from one page to the next (allowing packets much larger than would fit on a single page). Each page contains 'lacing values' that indicate how the data is partitioned into packets, allowing a demultiplexer (demuxer) to recover the packet boundaries without examining the encoded data. A packet is said to 'complete' on a page when the page contains the final lacing value corresponding to that packet. This encapsulation defines the contents of the packet data, including the necessary headers, the organization of those packets into a logical stream, and the interpretation of the codec-specific granule position field. It does not attempt to describe or specify the existing Ogg container format. Readers unfamiliar with the basic concepts mentioned above are encouraged to review the details in .
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in .
An Ogg Opus stream is organized as follows. There are two mandatory header packets. The first packet in the logical Ogg bitstream MUST contain the identification (ID) header, which uniquely identifies a stream as Opus audio. The format of this header is defined in . It is placed alone (without any other packet data) on the first page of the logical Ogg bitstream, and completes on that page. This page has its 'beginning of stream' flag set. The second packet in the logical Ogg bitstream MUST contain the comment header, which contains user-supplied metadata. The format of this header is defined in . It MAY span multiple pages, beginning on the second page of the logical stream. However many pages it spans, the comment header packet MUST finish the page on which it completes. All subsequent pages are audio data pages, and the Ogg packets they contain are audio data packets. Each audio data packet contains one Opus packet for each of N different streams, where N is typically one for mono or stereo, but MAY be greater than one for multichannel audio. The value N is specified in the ID header (see ), and is fixed over the entire length of the logical Ogg bitstream. The first (N - 1) Opus packets, if any, are packed one after another into the Ogg packet, using the self-delimiting framing from Appendix B of . The remaining Opus packet is packed at the end of the Ogg packet using the regular, undelimited framing from Section 3 of . All of the Opus packets in a single Ogg packet MUST be constrained to have the same duration. An implementation of this specification SHOULD treat any Opus packet whose duration is different from that of the first Opus packet in an Ogg packet as if it were a malformed Opus packet with an invalid Table Of Contents (TOC) sequence. The TOC sequence at the beginning of each Opus packet indicates the coding mode, audio bandwidth, channel count, duration (frame size), and number of frames per packet, as described in Section 3.1 of . The coding mode is one of SILK, Hybrid, or Constrained Energy Lapped Transform (CELT). The combination of coding mode, audio bandwidth, and frame size is referred to as the configuration of an Opus packet. Packets are placed into Ogg pages in order until the end of stream. Audio data packets might span page boundaries. The first audio data page could have the 'continued packet' flag set (indicating the first audio data packet is continued from a previous page) if, for example, it was a live stream joined mid-broadcast, with the headers pasted on the front. A demuxer SHOULD NOT attempt to decode the data for the first packet on a page with the 'continued packet' flag set if the previous page with packet data does not end in a continued packet (i.e., did not end with a lacing value of 255) or if the page sequence numbers are not consecutive, unless the demuxer has some special knowledge that would allow it to interpret this data despite the missing pieces. An implementation MUST treat a zero-octet audio data packet as if it were a malformed Opus packet as described in Section 3.4 of . A logical stream ends with a page with the 'end of stream' flag set, but implementations need to be prepared to deal with truncated streams that do not have a page marked 'end of stream'. There is no reason for the final packet on the last page to be a continued packet, i.e., for the final lacing value to be less than 255. However, demuxers might encounter such streams, possibly as the result of a transfer that did not complete or of corruption. A demuxer SHOULD NOT attempt to decode the data from a packet that continues onto a subsequent page (i.e., when the page ends with a lacing value of 255) if the next page with packet data does not have the 'continued packet' flag set or does not exist, or if the page sequence numbers are not consecutive, unless the demuxer has some special knowledge that would allow it to interpret this data despite the missing pieces. There MUST NOT be any more pages in an Opus logical bitstream after a page marked 'end of stream'.
The granule position MUST be zero for the ID header page and the page where the comment header completes. That is, the first page in the logical stream, and the last header page before the first audio data page both have a granule position of zero. The granule position of an audio data page encodes the total number of PCM samples in the stream up to and including the last fully-decodable sample from the last packet completed on that page. The granule position of the first audio data page will usually be larger than zero, as described in . A page that is entirely spanned by a single packet (that completes on a subsequent page) has no granule position, and the granule position field is set to the special value '-1' in two's complement. The granule position of an audio data page is in units of PCM audio samples at a fixed rate of 48 kHz (per channel; a stereo stream's granule position does not increment at twice the speed of a mono stream). It is possible to run an Opus decoder at other sampling rates, but the value in the granule position field always counts samples assuming a 48 kHz decoding rate, and the rest of this specification makes the same assumption. The duration of an Opus packet can be any multiple of 2.5 ms, up to a maximum of 120 ms. This duration is encoded in the TOC sequence at the beginning of each packet. The number of samples returned by a decoder corresponds to this duration exactly, even for the first few packets. For example, a 20 ms packet fed to a decoder running at 48 kHz will always return 960 samples. A demuxer can parse the TOC sequence at the beginning of each Ogg packet to work backwards or forwards from a packet with a known granule position (i.e., the last packet completed on some page) in order to assign granule positions to every packet, or even every individual sample. The one exception is the last page in the stream, as described below. All other pages with completed packets after the first MUST have a granule position equal to the number of samples contained in packets that complete on that page plus the granule position of the most recent page with completed packets. This guarantees that a demuxer can assign individual packets the same granule position when working forwards as when working backwards. For this to work, there cannot be any gaps.
In order to support capturing a real-time stream that has lost or not transmitted packets, a multiplexer (muxer) SHOULD emit packets that explicitly request the use of Packet Loss Concealment (PLC) in place of the missing packets. Implementations that fail to do so still MUST NOT increment the granule position for a page by anything other than the number of samples contained in packets that actually complete on that page. Only gaps that are a multiple of 2.5 ms are repairable, as these are the only durations that can be created by packet loss or discontinuous transmission. Muxers need not handle other gap sizes. Creating the necessary packets involves synthesizing a TOC byte (defined in Section 3.1 of )—and whatever additional internal framing is needed—to indicate the packet duration for each stream. The actual length of each missing Opus frame inside the packet is zero bytes, as defined in Section 3.2.1 of . Zero-byte frames MAY be packed into packets using any of codes 0, 1, 2, or 3. When successive frames have the same configuration, the higher code packings reduce overhead. Likewise, if the TOC configuration matches, the muxer MAY further combine the empty frames with previous or subsequent non-zero-length frames (using code 2 or VBR code 3). does not impose any requirements on the PLC, but this section outlines choices that are expected to have a positive influence on most PLC implementations, including the reference implementation. Synthesized TOC sequences SHOULD maintain the same mode, audio bandwidth, channel count, and frame size as the previous packet (if any). This is the simplest and usually the most well-tested case for the PLC to handle and it covers all losses that do not include a configuration switch, as defined in Section 4.5 of . When a previous packet is available, keeping the audio bandwidth and channel count the same allows the PLC to provide maximum continuity in the concealment data it generates. However, if the size of the gap is not a multiple of the most recent frame size, then the frame size will have to change for at least some frames. Such changes SHOULD be delayed as long as possible to simplify things for PLC implementations. As an example, a 95 ms gap could be encoded as nineteen 5 ms frames in two bytes with a single CBR code 3 packet. If the previous frame size was 20 ms, using four 20 ms frames followed by three 5 ms frames requires 4 bytes (plus an extra byte of Ogg lacing overhead), but allows the PLC to use its well-tested steady state behavior for as long as possible. The total bitrate of the latter approach, including Ogg overhead, is about 0.4 kbps, so the impact on file size is minimal. Changing modes is discouraged, since this causes some decoder implementations to reset their PLC state. However, SILK and Hybrid mode frames cannot fill gaps that are not a multiple of 10 ms. If switching to CELT mode is needed to match the gap size, a muxer SHOULD do so at the end of the gap to allow the PLC to function for as long as possible. In the example above, if the previous frame was a 20 ms SILK mode frame, the better solution is to synthesize a packet describing four 20 ms SILK frames, followed by a packet with a single 10 ms SILK frame, and finally a packet with a 5 ms CELT frame, to fill the 95 ms gap. This also requires four bytes to describe the synthesized packet data (two bytes for a CBR code 3 and one byte each for two code 0 packets) but three bytes of Ogg lacing overhead are needed to mark the packet boundaries. At 0.6 kbps, this is still a minimal bitrate impact over a naive, low quality solution. Since medium-band audio is an option only in the SILK mode, wideband frames SHOULD be generated if switching from that configuration to CELT mode, to ensure that any PLC implementation which does try to migrate state between the modes will be able to preserve all of the available audio bandwidth.
There is some amount of latency introduced during the decoding process, to allow for overlap in the CELT mode, stereo mixing in the SILK mode, and resampling. The encoder might have introduced additional latency through its own resampling and analysis (though the exact amount is not specified). Therefore, the first few samples produced by the decoder do not correspond to real input audio, but are instead composed of padding inserted by the encoder to compensate for this latency. These samples need to be stored and decoded, as Opus is an asymptotically convergent predictive codec, meaning the decoded contents of each frame depend on the recent history of decoder inputs. However, a player will want to skip these samples after decoding them. A 'pre-skip' field in the ID header (see ) signals the number of samples that SHOULD be skipped (decoded but discarded) at the beginning of the stream, though some specific applications might have a reason for looking at that data. This amount need not be a multiple of 2.5 ms, MAY be smaller than a single packet, or MAY span the contents of several packets. These samples are not valid audio. For example, if the first Opus frame uses the CELT mode, it will always produce 120 samples of windowed overlap-add data. However, the overlap data is initially all zeros (since there is no prior frame), meaning this cannot, in general, accurately represent the original audio. The SILK mode requires additional delay to account for its analysis and resampling latency. The encoder delays the original audio to avoid this problem. The pre-skip field MAY also be used to perform sample-accurate cropping of already encoded streams. In this case, a value of at least 3840 samples (80 ms) provides sufficient history to the decoder that it will have converged before the stream's output begins.
The PCM sample position is determined from the granule position using the formula
For example, if the granule position of the first audio data page is 59,971, and the pre-skip is 11,971, then the PCM sample position of the last decoded sample from that page is 48,000. This can be converted into a playback time using the formula
The initial PCM sample position before any samples are played is normally '0'. In this case, the PCM sample position of the first audio sample to be played starts at '1', because it marks the time on the clock after that sample has been played, and a stream that is exactly one second long has a final PCM sample position of '48000', as in the example here. Vorbis streams use a granule position smaller than the number of audio samples contained in the first audio data page to indicate that some of those samples are trimmed from the output (see ). However, to do so, Vorbis requires that the first audio data page contains exactly two packets, in order to allow the decoder to perform PCM position adjustments before needing to return any PCM data. Opus uses the pre-skip mechanism for this purpose instead, since the encoder might introduce more than a single packet's worth of latency, and since very large packets in streams with a very large number of channels might not fit on a single page.
The page with the 'end of stream' flag set MAY have a granule position that indicates the page contains less audio data than would normally be returned by decoding up through the final packet. This is used to end the stream somewhere other than an even frame boundary. The granule position of the most recent audio data page with completed packets is used to make this determination, or '0' is used if there were no previous audio data pages with a completed packet. The difference between these granule positions indicates how many samples to keep after decoding the packets that completed on the final page. The remaining samples are discarded. The number of discarded samples SHOULD be no larger than the number decoded from the last packet.
The granule position of the first audio data page with a completed packet MAY be larger than the number of samples contained in packets that complete on that page, however it MUST NOT be smaller, unless that page has the 'end of stream' flag set. Allowing a granule position larger than the number of samples allows the beginning of a stream to be cropped or a live stream to be joined without rewriting the granule position of all the remaining pages. This means that the PCM sample position just before the first sample to be played MAY be larger than '0'. Synchronization when multiplexing with other logical streams still uses the PCM sample position relative to '0' to compute sample times. This does not affect the behavior of pre-skip: exactly 'pre-skip' samples SHOULD be skipped from the beginning of the decoded output, even if the initial PCM sample position is greater than zero. On the other hand, a granule position that is smaller than the number of decoded samples prevents a demuxer from working backwards to assign each packet or each individual sample a valid granule position, since granule positions are non-negative. An implementation MUST reject as invalid any stream where the granule position is smaller than the number of samples contained in packets that complete on the first audio data page with a completed packet, unless that page has the 'end of stream' flag set. It MAY defer this action until it decodes the last packet completed on that page. If that page has the 'end of stream' flag set, a demuxer MUST reject as invalid any stream where its granule position is smaller than the 'pre-skip' amount. This would indicate that there are more samples to be skipped from the initial decoded output than exist in the stream. If the granule position is smaller than the number of decoded samples produced by the packets that complete on that page, then a demuxer MUST use an initial granule position of '0', and can work forwards from '0' to timestamp individual packets. If the granule position is larger than the number of decoded samples available, then the demuxer MUST still work backwards as described above, even if the 'end of stream' flag is set, to determine the initial granule position, and thus the initial PCM sample position. Both of these will be greater than '0' in this case.
Seeking in Ogg files is best performed using a bisection search for a page whose granule position corresponds to a PCM position at or before the seek target. With appropriately weighted bisection, accurate seeking can be performed in just one or two bisections on average, even in multi-gigabyte files. See for an example of general implementation guidance. When seeking within an Ogg Opus stream, an implementation SHOULD start decoding (and discarding the output) at least 3840 samples (80 ms) prior to the seek target in order to ensure that the output audio is correct by the time it reaches the seek target. This 'pre-roll' is separate from, and unrelated to, the 'pre-skip' used at the beginning of the stream. If the point 80 ms prior to the seek target comes before the initial PCM sample position, an implementation SHOULD start decoding from the beginning of the stream, applying pre-skip as normal, regardless of whether the pre-skip is larger or smaller than 80 ms, and then continue to discard samples to reach the seek target (if any).
An Ogg Opus logical stream contains exactly two mandatory header packets: an identification header and a comment header.
The fields in the identification (ID) header have the following meaning: Magic Signature: This is an 8-octet (64-bit) field that allows codec identification and is human-readable. It contains, in order, the magic numbers: 0x4F 'O' 0x70 'p' 0x75 'u' 0x73 's' 0x48 'H' 0x65 'e' 0x61 'a' 0x64 'd' Starting with "Op" helps distinguish it from audio data packets, as this is an invalid TOC sequence. Version (8 bits, unsigned): The version number MUST always be '1' for this version of the encapsulation specification. Implementations SHOULD treat streams where the upper four bits of the version number match that of a recognized specification as backwards-compatible with that specification. That is, the version number can be split into "major" and "minor" version sub-fields, with changes to the "minor" sub-field (in the lower four bits) signaling compatible changes. For example, an implementation of this specification SHOULD accept any stream with a version number of '15' or less, and SHOULD assume any stream with a version number '16' or greater is incompatible. The initial version '1' was chosen to keep implementations from relying on this octet as a null terminator for the "OpusHead" string. Output Channel Count 'C' (8 bits, unsigned): This is the number of output channels. This might be different than the number of encoded channels, which can change on a packet-by-packet basis. This value MUST NOT be zero. The maximum allowable value depends on the channel mapping family, and might be as large as 255. See for details. Pre-skip (16 bits, unsigned, little endian): This is the number of samples (at 48 kHz) to discard from the decoder output when starting playback, and also the number to subtract from a page's granule position to calculate its PCM sample position. When cropping the beginning of existing Ogg Opus streams, a pre-skip of at least 3,840 samples (80 ms) is RECOMMENDED to ensure complete convergence in the decoder. Input Sample Rate (32 bits, unsigned, little endian): This is the sample rate of the original input (before encoding), in Hz. This field is not the sample rate to use for playback of the encoded data. Opus can switch between internal audio bandwidths of 4, 6, 8, 12, and 20 kHz. Each packet in the stream can have a different audio bandwidth. Regardless of the audio bandwidth, the reference decoder supports decoding any stream at a sample rate of 8, 12, 16, 24, or 48 kHz. The original sample rate of the audio passed to the encoder is not preserved by the lossy compression. An Ogg Opus player SHOULD select the playback sample rate according to the following procedure: If the hardware supports 48 kHz playback, decode at 48 kHz. Otherwise, if the hardware's highest available sample rate is a supported rate, decode at this sample rate. Otherwise, if the hardware's highest available sample rate is less than 48 kHz, decode at the next higher Opus supported rate above the highest available hardware rate and resample. Otherwise, decode at 48 kHz and resample. However, the 'Input Sample Rate' field allows the muxer to pass the sample rate of the original input stream as metadata. This is useful when the user requires the output sample rate to match the input sample rate. For example, when not playing the output, an implementation writing PCM format samples to disk might choose to resample the audio back to the original input sample rate to reduce surprise to the user, who might reasonably expect to get back a file with the same sample rate. A value of zero indicates 'unspecified'. Muxers SHOULD write the actual input sample rate or zero, but implementations which do something with this field SHOULD take care to behave sanely if given crazy values (e.g., do not actually upsample the output to 10 MHz if requested). Implementations SHOULD support input sample rates between 8 kHz and 192 kHz (inclusive). Rates outside this range MAY be ignored by falling back to the default rate of 48 kHz instead. Output Gain (16 bits, signed, little endian): This is a gain to be applied when decoding. It is 20*log10 of the factor by which to scale the decoder output to achieve the desired playback volume, stored in a 16-bit, signed, two's complement fixed-point value with 8 fractional bits (i.e., Q7.8). To apply the gain, an implementation could use
where output_gain is the raw 16-bit value from the header. Players and media frameworks SHOULD apply it by default. If a player chooses to apply any volume adjustment or gain modification, such as the R128_TRACK_GAIN (see ), the adjustment MUST be applied in addition to this output gain in order to achieve playback at the normalized volume. A muxer SHOULD set this field to zero, and instead apply any gain prior to encoding, when this is possible and does not conflict with the user's wishes. A nonzero output gain indicates the gain was adjusted after encoding, or that a user wished to adjust the gain for playback while preserving the ability to recover the original signal amplitude. Although the output gain has enormous range (+/- 128 dB, enough to amplify inaudible sounds to the threshold of physical pain), most applications can only reasonably use a small portion of this range around zero. The large range serves in part to ensure that gain can always be losslessly transferred between OpusHead and R128 gain tags (see below) without saturating.
Channel Mapping Family (8 bits, unsigned): This octet indicates the order and semantic meaning of the output channels. Each currently specified value of this octet indicates a mapping family, which defines a set of allowed channel counts, and the ordered set of channel names for each allowed channel count. The details are described in . Channel Mapping Table: This table defines the mapping from encoded streams to output channels. Its contents are specified in .
All fields in the ID headers are REQUIRED, except for the channel mapping table, which MUST be omitted when the channel mapping family is 0, but is REQUIRED otherwise. Implementations SHOULD reject streams with ID headers that do not contain enough data for these fields, even if they contain a valid Magic Signature. Future versions of this specification, even backwards-compatible versions, might include additional fields in the ID header. If an ID header has a compatible major version, but a larger minor version, an implementation MUST NOT reject it for containing additional data not specified here, provided it still completes on the first page.
An Ogg Opus stream allows mapping one number of Opus streams (N) to a possibly larger number of decoded channels (M + N) to yet another number of output channels (C), which might be larger or smaller than the number of decoded channels. The order and meaning of these channels are defined by a channel mapping, which consists of the 'channel mapping family' octet and, for channel mapping families other than family 0, a channel mapping table, as illustrated in .
The fields in the channel mapping table have the following meaning: Stream Count 'N' (8 bits, unsigned): This is the total number of streams encoded in each Ogg packet. This value is necessary to correctly parse the packed Opus packets inside an Ogg packet, as described in . This value MUST NOT be zero, as without at least one Opus packet with a valid TOC sequence, a demuxer cannot recover the duration of an Ogg packet. For channel mapping family 0, this value defaults to 1, and is not coded. Coupled Stream Count 'M' (8 bits, unsigned): This is the number of streams whose decoders are to be configured to produce two channels (stereo). This MUST be no larger than the total number of streams, N. Each packet in an Opus stream has an internal channel count of 1 or 2, which can change from packet to packet. This is selected by the encoder depending on the bitrate and the audio being encoded. The original channel count of the audio passed to the encoder is not necessarily preserved by the lossy compression. Regardless of the internal channel count, any Opus stream can be decoded as mono (a single channel) or stereo (two channels) by appropriate initialization of the decoder. The 'coupled stream count' field indicates that the decoders for the first M Opus streams are to be initialized for stereo (two-channel) output, and the remaining (N - M) decoders are to be initialized for mono (a single channel) only. The total number of decoded channels, (M + N), MUST be no larger than 255, as there is no way to index more channels than that in the channel mapping. For channel mapping family 0, this value defaults to (C - 1) (i.e., 0 for mono and 1 for stereo), and is not coded. Channel Mapping (8*C bits): This contains one octet per output channel, indicating which decoded channel is to be used for each one. Let 'index' be the value of this octet for a particular output channel. This value MUST either be smaller than (M + N), or be the special value 255. If 'index' is less than 2*M, the output MUST be taken from decoding stream ('index'/2) as stereo and selecting the left channel if 'index' is even, and the right channel if 'index' is odd. If 'index' is 2*M or larger, but less than 255, the output MUST be taken from decoding stream ('index' - M) as mono. If 'index' is 255, the corresponding output channel MUST contain pure silence. The number of output channels, C, is not constrained to match the number of decoded channels (M + N). A single index value MAY appear multiple times, i.e., the same decoded channel might be mapped to multiple output channels. Some decoded channels might not be assigned to any output channel, as well. For channel mapping family 0, the first index defaults to 0, and if C == 2, the second index defaults to 1. Neither index is coded. After producing the output channels, the channel mapping family determines the semantic meaning of each one. There are three defined mapping families in this specification.
Allowed numbers of channels: 1 or 2. RTP mapping. This is the same channel interpretation as . 1 channel: monophonic (mono). 2 channels: stereo (left, right). Special mapping: This channel mapping value also indicates that the contents consists of a single Opus stream that is stereo if and only if C == 2, with stream index 0 mapped to output channel 0 (mono, or left channel) and stream index 1 mapped to output channel 1 (right channel) if stereo. When the 'channel mapping family' octet has this value, the channel mapping table MUST be omitted from the ID header packet.
Allowed numbers of channels: 1...8. Vorbis channel order (see below). Each channel is assigned to a speaker location in a conventional surround arrangement. Specific locations depend on the number of channels, and are given below in order of the corresponding channel indices. 1 channel: monophonic (mono). 2 channels: stereo (left, right). 3 channels: linear surround (left, center, right) 4 channels: quadraphonic (front left, front right, rear left, rear right). 5 channels: 5.0 surround (front left, front center, front right, rear left, rear right). 6 channels: 5.1 surround (front left, front center, front right, rear left, rear right, LFE). 7 channels: 6.1 surround (front left, front center, front right, side left, side right, rear center, LFE). 8 channels: 7.1 surround (front left, front center, front right, side left, side right, rear left, rear right, LFE) This set of surround options and speaker location orderings is the same as those used by the Vorbis codec . The ordering is different from the one used by the WAVE and Free Lossless Audio Codec (FLAC) formats, so correct ordering requires permutation of the output channels when decoding to or encoding from those formats. 'LFE' here refers to a Low Frequency Effects channel, often mapped to a subwoofer with no particular spatial position. Implementations SHOULD identify 'side' or 'rear' speaker locations with 'surround' and 'back' as appropriate when interfacing with audio formats or systems which prefer that terminology.
Allowed numbers of channels: 1...255. No defined channel meaning. Channels are unidentified. General-purpose players SHOULD NOT attempt to play these streams. Offline implementations MAY deinterleave the output into separate PCM files, one per channel. Implementations SHOULD NOT produce output for channels mapped to stream index 255 (pure silence) unless they have no other way to indicate the index of non-silent channels.
The remaining channel mapping families (2...254) are reserved. A demuxer implementation encountering a reserved channel mapping family value SHOULD act as though the value is 255.
An Ogg Opus player MUST support any valid channel mapping with a channel mapping family of 0 or 1, even if the number of channels does not match the physically connected audio hardware. Players SHOULD perform channel mixing to increase or reduce the number of channels as needed. Implementations MAY use the following matrices to implement downmixing from multichannel files using Channel Mapping Family 1, which are known to give acceptable results for stereo. Matrices for 3 and 4 channels are normalized so each coefficient row sums to 1 to avoid clipping. For 5 or more channels they are normalized to 2 as a compromise between clipping and dynamic range reduction. In these matrices the front left and front right channels are generally passed through directly. When a surround channel is split between both the left and right stereo channels, coefficients are chosen so their squares sum to 1, which helps preserve the perceived intensity. Rear channels are mixed more diffusely or attenuated to maintain focus on the front channels.
Exact coefficient values are 1 and 1/sqrt(2), multiplied by 1/(1 + 1/sqrt(2)) for normalization.
Exact coefficient values are 1, sqrt(3)/2 and 1/2, multiplied by 1/(1 + sqrt(3)/2 + 1/2) for normalization.
Exact coefficient values are 1, 1/sqrt(2), sqrt(3)/2 and 1/2, multiplied by 2/(1 + 1/sqrt(2) + sqrt(3)/2 + 1/2) for normalization.
Exact coefficient values are 1, 1/sqrt(2), sqrt(3)/2 and 1/2, multiplied by 2/(1 + 1/sqrt(2) + sqrt(3)/2 + 1/2 + 1/sqrt(2)) for normalization.
Exact coefficient values are 1, 1/sqrt(2), sqrt(3)/2, 1/2 and sqrt(3)/2/sqrt(2), multiplied by 2/(1 + 1/sqrt(2) + sqrt(3)/2 + 1/2 + sqrt(3)/2/sqrt(2) + 1/sqrt(2)) for normalization. The coefficients are in the same order as in , and the matrices above.
Exact coefficient values are 1, 1/sqrt(2), sqrt(3)/2 and 1/2, multiplied by 2/(2 + 2/sqrt(2) + sqrt(3)) for normalization. The coefficients are in the same order as in , and the matrices above.
The comment header consists of a 64-bit magic signature, followed by data in the same format as the header used in Ogg Vorbis, except (like Ogg Theora and Speex) the final "framing bit" specified in the Vorbis spec is not present. Magic Signature: This is an 8-octet (64-bit) field that allows codec identification and is human-readable. It contains, in order, the magic numbers: 0x4F 'O' 0x70 'p' 0x75 'u' 0x73 's' 0x54 'T' 0x61 'a' 0x67 'g' 0x73 's' Starting with "Op" helps distinguish it from audio data packets, as this is an invalid TOC sequence. Vendor String Length (32 bits, unsigned, little endian): This field gives the length of the following vendor string, in octets. It MUST NOT indicate that the vendor string is longer than the rest of the packet. Vendor String (variable length, UTF-8 vector): This is a simple human-readable tag for vendor information, encoded as a UTF-8 string . No terminating null octet is necessary. This tag is intended to identify the codec encoder and encapsulation implementations, for tracing differences in technical behavior. User-facing applications can use the 'ENCODER' user comment tag to identify themselves. User Comment List Length (32 bits, unsigned, little endian): This field indicates the number of user-supplied comments. It MAY indicate there are zero user-supplied comments, in which case there are no additional fields in the packet. It MUST NOT indicate that there are so many comments that the comment string lengths would require more data than is available in the rest of the packet. User Comment #i String Length (32 bits, unsigned, little endian): This field gives the length of the following user comment string, in octets. There is one for each user comment indicated by the 'user comment list length' field. It MUST NOT indicate that the string is longer than the rest of the packet. User Comment #i String (variable length, UTF-8 vector): This field contains a single user comment string. There is one for each user comment indicated by the 'user comment list length' field. The vendor string length and user comment list length are REQUIRED, and implementations SHOULD reject comment headers that do not contain enough data for these fields, or that do not contain enough data for the corresponding vendor string or user comments they describe. Making this check before allocating the associated memory to contain the data helps prevent a possible Denial-of-Service (DoS) attack from small comment headers that claim to contain strings longer than the entire packet or more user comments than than could possibly fit in the packet. Immediately following the user comment list, the comment header MAY contain zero-padding or other binary data which is not specified here. If the least-significant bit of the first byte of this data is 1, then editors SHOULD preserve the contents of this data when updating the tags, but if this bit is 0, all such data MAY be treated as padding, and truncated or discarded as desired. This allows informal experimentation with the format of this binary data until it can be specified later. The comment header can be arbitrarily large and might be spread over a large number of Ogg pages. Implementations MUST avoid attempting to allocate excessive amounts of memory when presented with a very large comment header. To accomplish this, implementations MAY reject a comment header larger than 125,829,120 octets, and MAY ignore individual comments that are not fully contained within the first 61,440 octets of the comment header.
The user comment strings follow the NAME=value format described by with the same recommended tag names: ARTIST, TITLE, DATE, ALBUM, and so on. Two new comment tags are introduced here: First, an optional gain for track normalization:
representing the volume shift needed to normalize the track's volume during isolated playback, in random shuffle, and so on. The gain is a Q7.8 fixed point number in dB, as in the ID header's 'output gain' field. This tag is similar to the REPLAYGAIN_TRACK_GAIN tag in Vorbis , except that the normal volume reference is the standard. Second, an optional gain for album normalization:
representing the volume shift needed to normalize the overall volume when played as part of a particular collection of tracks. The gain is also a Q7.8 fixed point number in dB, as in the ID header's 'output gain' field. An Ogg Opus stream MUST NOT have more than one of each of these tags, and if present their values MUST be an integer from -32768 to 32767, inclusive, represented in ASCII as a base 10 number with no whitespace. A leading '+' or '-' character is valid. Leading zeros are also permitted, but the value MUST be represented by no more than 6 characters. Other non-digit characters MUST NOT be present. If present, R128_TRACK_GAIN and R128_ALBUM_GAIN MUST correctly represent the R128 normalization gain relative to the 'output gain' field specified in the ID header. If a player chooses to make use of the R128_TRACK_GAIN tag or the R128_ALBUM_GAIN tag, it MUST apply those gains in addition to the 'output gain' value. If a tool modifies the ID header's 'output gain' field, it MUST also update or remove the R128_TRACK_GAIN and R128_ALBUM_GAIN comment tags if present. A muxer SHOULD place the gain it wants other tools to use by default into the 'output gain' field, and not the comment tag. To avoid confusion with multiple normalization schemes, an Opus comment header SHOULD NOT contain any of the REPLAYGAIN_TRACK_GAIN, REPLAYGAIN_TRACK_PEAK, REPLAYGAIN_ALBUM_GAIN, or REPLAYGAIN_ALBUM_PEAK tags, unless they are only to be used in some context where there is guaranteed to be no such confusion. normalization is preferred to the earlier REPLAYGAIN schemes because of its clear definition and adoption by industry. Peak normalizations are difficult to calculate reliably for lossy codecs because of variation in excursion heights due to decoder differences. In the authors' investigations they were not applied consistently or broadly enough to merit inclusion here.
Technically, valid Opus packets can be arbitrarily large due to the padding format, although the amount of non-padding data they can contain is bounded. These packets might be spread over a similarly enormous number of Ogg pages. When encoding, implementations SHOULD limit the use of padding in audio data packets to no more than is necessary to make a variable bitrate (VBR) stream constant bitrate (CBR), unless they have no reasonable way to determine what is necessary. Demuxers SHOULD reject audio data packets (treat them as if they were malformed Opus packets with an invalid TOC sequence) larger than 61,440 octets per Opus stream, unless they have a specific reason for allowing extra padding. Such packets necessarily contain more padding than needed to make a stream CBR. Demuxers MUST avoid attempting to allocate excessive amounts of memory when presented with a very large packet. Demuxers MAY reject or partially process audio data packets larger than 61,440 octets in an Ogg Opus stream with channel mapping families 0 or 1. Demuxers MAY reject or partially process audio data packets in any Ogg Opus stream if the packet is larger than 61,440 octets and also larger than 7,680 octets per Opus stream. The presence of an extremely large packet in the stream could indicate a memory exhaustion attack or stream corruption. In an Ogg Opus stream, the largest possible valid packet that does not use padding has a size of (61,298*N - 2) octets. With 255 streams, this is 15,630,988 octets and can span up to 61,298 Ogg pages, all but one of which will have a granule position of -1. This is of course a very extreme packet, consisting of 255 streams, each containing 120 ms of audio encoded as 2.5 ms frames, each frame using the maximum possible number of octets (1275) and stored in the least efficient manner allowed (a VBR code 3 Opus packet). Even in such a packet, most of the data will be zeros as 2.5 ms frames cannot actually use all 1275 octets. The largest packet consisting of entirely useful data is (15,326*N - 2) octets. This corresponds to 120 ms of audio encoded as 10 ms frames in either SILK or Hybrid mode, but at a data rate of over 1 Mbps, which makes little sense for the quality achieved. A more reasonable limit is (7,664*N - 2) octets. This corresponds to 120 ms of audio encoded as 20 ms stereo CELT mode frames, with a total bitrate just under 511 kbps (not counting the Ogg encapsulation overhead). For channel mapping family 1, N=8 provides a reasonable upper bound, as it allows for each of the 8 possible output channels to be decoded from a separate stereo Opus stream. This gives a size of 61,310 octets, which is rounded up to a multiple of 1,024 octets to yield the audio data packet size of 61,440 octets that any implementation is expected to be able to process successfully.
When encoding Opus streams, Ogg muxers SHOULD take into account the algorithmic delay of the Opus encoder. In encoders derived from the reference implementation , the number of samples can be queried with:
To achieve good quality in the very first samples of a stream, implementations MAY use linear predictive coding (LPC) extrapolation to generate at least 120 extra samples at the beginning to avoid the Opus encoder having to encode a discontinuous signal. For more information on linear prediction, see . For an input file containing 'length' samples, the implementation SHOULD set the pre-skip header value to (delay_samples + extra_samples), encode at least (length + delay_samples + extra_samples) samples, and set the granule position of the last page to (length + delay_samples + extra_samples). This ensures that the encoded file has the same duration as the original, with no time offset. The best way to pad the end of the stream is to also use LPC extrapolation, but zero-padding is also acceptable.
The first step in LPC extrapolation is to compute linear prediction coefficients. When extending the end of the signal, order-N (typically with N ranging from 8 to 40) LPC analysis is performed on a window near the end of the signal. The last N samples are used as memory to an infinite impulse response (IIR) filter. The filter is then applied on a zero input to extrapolate the end of the signal. Let a(k) be the kth LPC coefficient and x(n) be the nth sample of the signal, each new sample past the end of the signal is computed as:
The process is repeated independently for each channel. It is possible to extend the beginning of the signal by applying the same process backward in time. When extending the beginning of the signal, it is best to apply a "fade in" to the extrapolated signal, e.g. by multiplying it by a half-Hanning window .
In some applications, such as Internet radio, it is desirable to cut a long stream into smaller chains, e.g. so the comment header can be updated. This can be done simply by separating the input streams into segments and encoding each segment independently. The drawback of this approach is that it creates a small discontinuity at the boundary due to the lossy nature of Opus. A muxer MAY avoid this discontinuity by using the following procedure: Encode the last frame of the first segment as an independent frame by turning off all forms of inter-frame prediction. De-emphasis is allowed. Set the granule position of the last page to a point near the end of the last frame. Begin the second segment with a copy of the last frame of the first segment. Set the pre-skip value of the second stream in such a way as to properly join the two streams. Continue the encoding process normally from there, without any reset to the encoder. In encoders derived from the reference implementation, inter-frame prediction can be turned off by calling:
For best results, this implementation requires that prediction be explicitly enabled again before resuming normal encoding, even after a reset.
A brief summary of major implementations of this draft is available at , along with their status. [Note to RFC Editor: please remove this entire section before final publication per , along with its references.]
Implementations of the Opus codec need to take appropriate security considerations into account, as outlined in . This is just as much a problem for the container as it is for the codec itself. Robustness against malicious payloads is extremely important. Malicious payloads MUST NOT cause an implementation to overrun its allocated memory or to take an excessive amount of resources to decode. Although problems in encoding applications are typically rarer, the same applies to the muxer. Malicious audio input streams MUST NOT cause an implementation to overrun its allocated memory or consume excessive resources because this would allow an attacker to attack transcoding gateways. Like most other container formats, Ogg Opus streams SHOULD NOT be used with insecure ciphers or cipher modes that are vulnerable to known-plaintext attacks. Elements such as the Ogg page capture pattern and the magic signatures in the ID header and the comment header all have easily predictable values, in addition to various elements of the codec data itself.
An "Ogg Opus file" consists of one or more sequentially multiplexed segments, each containing exactly one Ogg Opus stream. The RECOMMENDED mime-type for Ogg Opus files is "audio/ogg". If more specificity is desired, one MAY indicate the presence of Opus streams using the codecs parameter defined in and , e.g.,
for an Ogg Opus file. The RECOMMENDED filename extension for Ogg Opus files is '.opus'. When Opus is concurrently multiplexed with other streams in an Ogg container, one SHOULD use one of the "audio/ogg", "video/ogg", or "application/ogg" mime-types, as defined in . Such streams are not strictly "Ogg Opus files" as described above, since they contain more than a single Opus stream per sequentially multiplexed segment, e.g. video or multiple audio tracks. In such cases the the '.opus' filename extension is NOT RECOMMENDED. In either case, this document updates to add 'opus' as a codecs parameter value with char[8]: 'OpusHead' as Codec Identifier.
This document updates the IANA Media Types registry to add .opus as a file extension for "audio/ogg", and to add itself as a reference alongside for "audio/ogg", "video/ogg", and "application/ogg" Media Types. This document defines a new registry "Opus Channel Mapping Families" to indicate how the semantic meanings of the channels in a multi-channel Opus stream are described. IANA SHALL create a new name space of "Opus Channel Mapping Families". All maintenance within and additions to the contents of this name space MUST be according to the "Specification Requried with Expert Review" registration policy as defined in . Each registry entry consists of a Channel Mapping Family Number, which is specified in decimal in the range 0 to 255, inclusive, and a Reference (or list of references) Each Reference must point to sufficient documentation to describe what information is coded in the Opus identification header for this channel mapping family, how a demuxer determines the Stream Count ('N') and Coupled Stream Count ('M') from this information, and how it determines the proper interpretation of each of the decoded channels. This document defines three initial assignments for this registry. ValueReference 0[RFCXXXX] 1[RFCXXXX] 255[RFCXXXX] The designated expert will determine if the Reference points to a specification that meets the requirements for permanence and ready availability laid out in  and that it specifies the information described above with sufficient clarity to allow interoperable implementations.
Thanks to Ben Campbell, Mark Harris, Greg Maxwell, Christopher "Monty" Montgomery, Jean-Marc Valin, and Mo Zanaty for their valuable contributions to this document. Additional thanks to Andrew D'Addesio, Greg Maxwell, and Vincent Penquerc'h for their feedback based on early implementations.
In , "RFCXXXX" is to be replaced with the RFC number assigned to this draft. In the Copyright Notice at the start of the document, the following paragraph is to be appended after the regular copyright notice text: "The licenses granted by the IETF Trust to this RFC under Section 3.c of the Trust Legal Provisions shall also include the right to extract text from Sections 1 through 14 of this RFC and create derivative works from these extracts, and to copy, publish, display, and distribute such derivative works in any medium and for any purpose, provided that no such derivative work shall be presented, displayed, or published in a manner that states or implies that it is part of this RFC or any other IETF Document."
&rfc2119; &rfc3533; &rfc3629; &rfc4732; &rfc5226; &rfc5334; &rfc6381; &rfc6716; Loudness Recommendation EBU R128 EBU Technical Committee Ogg Vorbis I Format Specification: Comment Field and Header Specification &rfc6982; &rfc7587; FLAC - Free Lossless Audio Codec Format Description Hann window Wikipedia Linear Predictive Coding Wikipedia Autocorrelation LPC coeff generation algorithm (Vorbis source code) VorbisComment: Replay Gain Granulepos Encoding and How Seeking Really Works The Vorbis I Specification, Section 4.3.9 Output Channel Order The Vorbis I Specification, Appendix A: Embedding Vorbis into an Ogg stream Multiple Channel Audio Data and WAVE Files Microsoft Corporation
opus-1.1.2/doc/draft-ietf-codec-opus-update.xml000066400000000000000000000234201264527674100213530ustar00rootroot00000000000000 Updates to the Opus Audio Codec Mozilla Corporation
331 E. Evelyn Avenue Mountain View CA 94041 USA +1 650 903-0800 jmvalin@jmvalin.ca
vocTone
koenvos74@gmail.com
This document addresses minor issues that were found in the specification of the Opus audio codec in RFC 6716.
This document addresses minor issues that were discovered in the reference implementation of the Opus codec that serves as the specification in RFC 6716. Only issues affecting the decoder are listed here. An up-to-date implementation of the Opus encoder can be found at http://opus-codec.org/. The updated specification remains fully compatible with the original specification and only one of the changes results in any difference in the audio output.
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.
The reference implementation does not reinitialize the stereo state during a mode switch. The old stereo memory can produce a brief impulse (i.e. single sample) in the decoded audio. This can be fixed by changing silk/dec_API.c at line 72:
sStereo, 0, + sizeof(((silk_decoder *)decState)->sStereo)); + /* Not strictly needed, but it's cleaner that way */ + ((silk_decoder *)decState)->prev_decode_only_middle = 0; return ret; } ]]>
This change affects the normative part of the decoder. Fortunately, the modified decoder is still compliant with the original specification because it still easily passes the testvectors. For example, for the float decoder at 48 kHz, the opus_compare (arbitrary) "quality score" changes from from 99.9333% to 99.925%.
It was discovered that some invalid packets of very large size could trigger an out-of-bounds read in the Opus packet parsing code responsible for padding. This is due to an integer overflow if the signaled padding exceeds 2^31-1 bytes (the actual packet may be smaller). The code can be fixed by applying the following changes at line 596 of src/opus_decoder.c:
This packet parsing issue is limited to reading memory up to about 60 kB beyond the compressed buffer. This can only be triggered by a compressed packet more than about 16 MB long, so it's not a problem for RTP. In theory, it could crash a file decoder (e.g. Opus in Ogg) if the memory just after the incoming packet is out-of-range, but our attempts to trigger such a crash in a production application built using an affected version of the Opus decoder failed.
The SILK resampler had the following issues: The calls to memcpy() were using sizeof(opus_int32), but the type of the local buffer was opus_int16. Because the size was wrong, this potentially allowed the source and destination regions of the memcpy() to overlap. We believe that nSamplesIn is at least fs_in_khZ, which is at least 8. Since RESAMPLER_ORDER_FIR_12 is only 8, that should not be a problem once the type size is fixed. The size of the buffer used RESAMPLER_MAX_BATCH_SIZE_IN, but the data stored in it was actually _twice_ the input batch size (nSamplesIn<<1). The fact that the code never produced any error in testing (including when run under the Valgrind memory debugger), suggests that in practice the batch sizes are reasonable enough that none of the issues above was ever a problem. However, proving that is non-obvious. The code can be fixed by applying the following changes to line 70 of silk/resampler_private_IIR_FIR.c:
sFIR, RESAMPLER_ORDER_FIR_12 \ * sizeof( opus_int32 ) ); + silk_memcpy( buf, S->sFIR, RESAMPLER_ORDER_FIR_12 \ * sizeof( opus_int16 ) ); /* Iterate over blocks of frameSizeIn input samples */ index_increment_Q16 = S->invRatio_Q16; while( 1 ) { nSamplesIn = silk_min( inLen, S->batchSize ); /* Upsample 2x */ silk_resampler_private_up2_HQ( S->sIIR, &buf[ \ RESAMPLER_ORDER_FIR_12 ], in, nSamplesIn ); max_index_Q16 = silk_LSHIFT32( nSamplesIn, 16 + 1 \ ); /* + 1 because 2x upsampling */ out = silk_resampler_private_IIR_FIR_INTERPOL( out, \ buf, max_index_Q16, index_increment_Q16 ); in += nSamplesIn; inLen -= nSamplesIn; if( inLen > 0 ) { /* More iterations to do; copy last part of \ filtered signal to beginning of buffer */ - silk_memcpy( buf, &buf[ nSamplesIn << 1 ], \ RESAMPLER_ORDER_FIR_12 * sizeof( opus_int32 ) ); + silk_memmove( buf, &buf[ nSamplesIn << 1 ], \ RESAMPLER_ORDER_FIR_12 * sizeof( opus_int16 ) ); } else { break; } } /* Copy last part of filtered signal to the state for \ the next call */ - silk_memcpy( S->sFIR, &buf[ nSamplesIn << 1 ], \ RESAMPLER_ORDER_FIR_12 * sizeof( opus_int32 ) ); + silk_memcpy( S->sFIR, &buf[ nSamplesIn << 1 ], \ RESAMPLER_ORDER_FIR_12 * sizeof( opus_int16 ) ); } ]]>
Note: due to RFC formatting conventions, lines exceeding the column width in the patch above are split using a backslash character. The backslashes at the end of a line and the white space at the beginning of the following line are not part of the patch. A properly formatted patch including the three changes above is available at .
The last issue is not strictly a bug, but it is an issue that has been reported when downmixing an Opus decoded stream to mono, whether this is done inside the decoder or as a post-processing step on the stereo decoder output. Opus intensity stereo allows optionally coding the two channels 180-degrees out of phase on a per-band basis. This provides better stereo quality than forcing the two channels to be in phase, but when the output is downmixed to mono, the energy in the affected bands is cancelled sometimes resulting in audible artefacts. As a work-around for this issue, the decoder MAY choose not to apply the 180-degree phase shift when the output is meant to be downmixed (inside or outside of the decoder).
This document makes no request of IANA. Note to RFC Editor: this section may be removed on publication as an RFC.
We would like to thank Juri Aedla for reporting the issue with the parsing of the Opus padding.
opus-1.1.2/doc/draft-ietf-codec-opus.xml000066400000000000000000013265311264527674100201050ustar00rootroot00000000000000 Definition of the Opus Audio Codec Mozilla Corporation
650 Castro Street Mountain View CA 94041 USA +1 650 903-0800 jmvalin@jmvalin.ca
Skype Technologies S.A.
Soder Malarstrand 43 Stockholm 11825 SE +46 73 085 7619 koen.vos@skype.net
Mozilla Corporation
650 Castro Street Mountain View CA 94041 USA +1 650 903-0800 tterriberry@mozilla.com
General This document defines the Opus interactive speech and audio codec. Opus is designed to handle a wide range of interactive audio applications, including Voice over IP, videoconferencing, in-game chat, and even live, distributed music performances. It scales from low bitrate narrowband speech at 6 kb/s to very high quality stereo music at 510 kb/s. Opus uses both linear prediction (LP) and the Modified Discrete Cosine Transform (MDCT) to achieve good compression of both speech and music.
The Opus codec is a real-time interactive audio codec designed to meet the requirements described in . It is composed of a linear prediction (LP)-based layer and a Modified Discrete Cosine Transform (MDCT)-based layer. The main idea behind using two layers is that in speech, linear prediction techniques (such as Code-Excited Linear Prediction, or CELP) code low frequencies more efficiently than transform (e.g., MDCT) domain techniques, while the situation is reversed for music and higher speech frequencies. Thus a codec with both layers available can operate over a wider range than either one alone and, by combining them, achieve better quality than either one individually. The primary normative part of this specification is provided by the source code in . Only the decoder portion of this software is normative, though a significant amount of code is shared by both the encoder and decoder. provides a decoder conformance test. The decoder contains a great deal of integer and fixed-point arithmetic which needs to be performed exactly, including all rounding considerations, so any useful specification requires domain-specific symbolic language to adequately define these operations. Additionally, any conflict between the symbolic representation and the included reference implementation must be resolved. For the practical reasons of compatibility and testability it would be advantageous to give the reference implementation priority in any disagreement. The C language is also one of the most widely understood human-readable symbolic representations for machine behavior. For these reasons this RFC uses the reference implementation as the sole symbolic representation of the codec. While the symbolic representation is unambiguous and complete it is not always the easiest way to understand the codec's operation. For this reason this document also describes significant parts of the codec in English and takes the opportunity to explain the rationale behind many of the more surprising elements of the design. These descriptions are intended to be accurate and informative, but the limitations of common English sometimes result in ambiguity, so it is expected that the reader will always read them alongside the symbolic representation. Numerous references to the implementation are provided for this purpose. The descriptions sometimes differ from the reference in ordering or through mathematical simplification wherever such deviation makes an explanation easier to understand. For example, the right shift and left shift operations in the reference implementation are often described using division and multiplication in the text. In general, the text is focused on the "what" and "why" while the symbolic representation most clearly provides the "how".
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119 . Various operations in the codec require bit-exact fixed-point behavior, even when writing a floating point implementation. The notation "Q<n>", where n is an integer, denotes the number of binary digits to the right of the decimal point in a fixed-point number. For example, a signed Q14 value in a 16-bit word can represent values from -2.0 to 1.99993896484375, inclusive. This notation is for informational purposes only. Arithmetic, when described, always operates on the underlying integer. E.g., the text will explicitly indicate any shifts required after a multiplication. Expressions, where included in the text, follow C operator rules and precedence, with the exception that the syntax "x**y" indicates x raised to the power y. The text also makes use of the following functions:
The smallest of two values x and y.
The largest of two values x and y.
With this definition, if lo > hi, the lower bound is the one that is enforced.
The sign of x, i.e.,
0 . ]]>
The absolute value of x, i.e.,
The largest integer z such that z <= f.
The smallest integer z such that z >= f.
The integer z nearest to f, with ties rounded towards negative infinity, i.e.,
The base-two logarithm of f.
The minimum number of bits required to store a positive integer n in two's complement notation, or 0 for a non-positive integer n.
0 ]]>
Examples: ilog(-1) = 0 ilog(0) = 0 ilog(1) = 1 ilog(2) = 2 ilog(3) = 2 ilog(4) = 3 ilog(7) = 3
The Opus codec scales from 6 kb/s narrowband mono speech to 510 kb/s fullband stereo music, with algorithmic delays ranging from 5 ms to 65.2 ms. At any given time, either the LP layer, the MDCT layer, or both, may be active. It can seamlessly switch between all of its various operating modes, giving it a great deal of flexibility to adapt to varying content and network conditions without renegotiating the current session. The codec allows input and output of various audio bandwidths, defined as follows: Abbreviation Audio Bandwidth Sample Rate (Effective) NB (narrowband) 4 kHz 8 kHz MB (medium-band) 6 kHz 12 kHz WB (wideband) 8 kHz 16 kHz SWB (super-wideband) 12 kHz 24 kHz FB (fullband) 20 kHz (*) 48 kHz (*) Although the sampling theorem allows a bandwidth as large as half the sampling rate, Opus never codes audio above 20 kHz, as that is the generally accepted upper limit of human hearing. Opus defines super-wideband (SWB) with an effective sample rate of 24 kHz, unlike some other audio coding standards that use 32 kHz. This was chosen for a number of reasons. The band layout in the MDCT layer naturally allows skipping coefficients for frequencies over 12 kHz, but does not allow cleanly dropping just those frequencies over 16 kHz. A sample rate of 24 kHz also makes resampling in the MDCT layer easier, as 24 evenly divides 48, and when 24 kHz is sufficient, it can save computation in other processing, such as Acoustic Echo Cancellation (AEC). Experimental changes to the band layout to allow a 16 kHz cutoff (32 kHz effective sample rate) showed potential quality degradations at other sample rates, and at typical bitrates the number of bits saved by using such a cutoff instead of coding in fullband (FB) mode is very small. Therefore, if an application wishes to process a signal sampled at 32 kHz, it should just use FB. The LP layer is based on the SILK codec . It supports NB, MB, or WB audio and frame sizes from 10 ms to 60 ms, and requires an additional 5 ms look-ahead for noise shaping estimation. A small additional delay (up to 1.5 ms) may be required for sampling rate conversion. Like Vorbis and many other modern codecs, SILK is inherently designed for variable-bitrate (VBR) coding, though the encoder can also produce constant-bitrate (CBR) streams. The version of SILK used in Opus is substantially modified from, and not compatible with, the stand-alone SILK codec previously deployed by Skype. This document does not serve to define that format, but those interested in the original SILK codec should see instead. The MDCT layer is based on the CELT codec . It supports NB, WB, SWB, or FB audio and frame sizes from 2.5 ms to 20 ms, and requires an additional 2.5 ms look-ahead due to the overlapping MDCT windows. The CELT codec is inherently designed for CBR coding, but unlike many CBR codecs it is not limited to a set of predetermined rates. It internally allocates bits to exactly fill any given target budget, and an encoder can produce a VBR stream by varying the target on a per-frame basis. The MDCT layer is not used for speech when the audio bandwidth is WB or less, as it is not useful there. On the other hand, non-speech signals are not always adequately coded using linear prediction, so for music only the MDCT layer should be used. A "Hybrid" mode allows the use of both layers simultaneously with a frame size of 10 or 20 ms and a SWB or FB audio bandwidth. The LP layer codes the low frequencies by resampling the signal down to WB. The MDCT layer follows, coding the high frequency portion of the signal. The cutoff between the two lies at 8 kHz, the maximum WB audio bandwidth. In the MDCT layer, all bands below 8 kHz are discarded, so there is no coding redundancy between the two layers. The sample rate (in contrast to the actual audio bandwidth) can be chosen independently on the encoder and decoder side, e.g., a fullband signal can be decoded as wideband, or vice versa. This approach ensures a sender and receiver can always interoperate, regardless of the capabilities of their actual audio hardware. Internally, the LP layer always operates at a sample rate of twice the audio bandwidth, up to a maximum of 16 kHz, which it continues to use for SWB and FB. The decoder simply resamples its output to support different sample rates. The MDCT layer always operates internally at a sample rate of 48 kHz. Since all the supported sample rates evenly divide this rate, and since the the decoder may easily zero out the high frequency portion of the spectrum in the frequency domain, it can simply decimate the MDCT layer output to achieve the other supported sample rates very cheaply. After conversion to the common, desired output sample rate, the decoder simply adds the output from the two layers together. To compensate for the different look-ahead required by each layer, the CELT encoder input is delayed by an additional 2.7 ms. This ensures that low frequencies and high frequencies arrive at the same time. This extra delay may be reduced by an encoder by using less look-ahead for noise shaping or using a simpler resampler in the LP layer, but this will reduce quality. However, the base 2.5 ms look-ahead in the CELT layer cannot be reduced in the encoder because it is needed for the MDCT overlap, whose size is fixed by the decoder. Both layers use the same entropy coder, avoiding any waste from "padding bits" between them. The hybrid approach makes it easy to support both CBR and VBR coding. Although the LP layer is VBR, the bit allocation of the MDCT layer can produce a final stream that is CBR by using all the bits left unused by the LP layer.
The Opus codec includes a number of control parameters which can be changed dynamically during regular operation of the codec, without interrupting the audio stream from the encoder to the decoder. These parameters only affect the encoder since any impact they have on the bit-stream is signaled in-band such that a decoder can decode any Opus stream without any out-of-band signaling. Any Opus implementation can add or modify these control parameters without affecting interoperability. The most important encoder control parameters in the reference encoder are listed below.
Opus supports all bitrates from 6 kb/s to 510 kb/s. All other parameters being equal, higher bitrate results in higher quality. For a frame size of 20 ms, these are the bitrate "sweet spots" for Opus in various configurations: 8-12 kb/s for NB speech, 16-20 kb/s for WB speech, 28-40 kb/s for FB speech, 48-64 kb/s for FB mono music, and 64-128 kb/s for FB stereo music.
Opus can transmit either mono or stereo frames within a single stream. When decoding a mono frame in a stereo decoder, the left and right channels are identical, and when decoding a stereo frame in a mono decoder, the mono output is the average of the left and right channels. In some cases, it is desirable to encode a stereo input stream in mono (e.g., because the bitrate is too low to encode stereo with sufficient quality). The number of channels encoded can be selected in real-time, but by default the reference encoder attempts to make the best decision possible given the current bitrate.
The audio bandwidths supported by Opus are listed in . Just like for the number of channels, any decoder can decode audio encoded at any bandwidth. For example, any Opus decoder operating at 8 kHz can decode a FB Opus frame, and any Opus decoder operating at 48 kHz can decode a NB frame. Similarly, the reference encoder can take a 48 kHz input signal and encode it as NB. The higher the audio bandwidth, the higher the required bitrate to achieve acceptable quality. The audio bandwidth can be explicitly specified in real-time, but by default the reference encoder attempts to make the best bandwidth decision possible given the current bitrate.
Opus can encode frames of 2.5, 5, 10, 20, 40 or 60 ms. It can also combine multiple frames into packets of up to 120 ms. For real-time applications, sending fewer packets per second reduces the bitrate, since it reduces the overhead from IP, UDP, and RTP headers. However, it increases latency and sensitivity to packet losses, as losing one packet constitutes a loss of a bigger chunk of audio. Increasing the frame duration also slightly improves coding efficiency, but the gain becomes small for frame sizes above 20 ms. For this reason, 20 ms frames are a good choice for most applications.
There are various aspects of the Opus encoding process where trade-offs can be made between CPU complexity and quality/bitrate. In the reference encoder, the complexity is selected using an integer from 0 to 10, where 0 is the lowest complexity and 10 is the highest. Examples of computations for which such trade-offs may occur are: The order of the pitch analysis whitening filter , The order of the short-term noise shaping filter, The number of states in delayed decision quantization of the residual signal, and The use of certain bit-stream features such as variable time-frequency resolution and the pitch post-filter.
Audio codecs often exploit inter-frame correlations to reduce the bitrate at a cost in error propagation: after losing one packet several packets need to be received before the decoder is able to accurately reconstruct the speech signal. The extent to which Opus exploits inter-frame dependencies can be adjusted on the fly to choose a trade-off between bitrate and amount of error propagation.
Another mechanism providing robustness against packet loss is the in-band Forward Error Correction (FEC). Packets that are determined to contain perceptually important speech information, such as onsets or transients, are encoded again at a lower bitrate and this re-encoded information is added to a subsequent packet.
Opus is more efficient when operating with variable bitrate (VBR), which is the default. However, in some (rare) applications, constant bitrate (CBR) is required. There are two main reasons to operate in CBR mode: When the transport only supports a fixed size for each compressed frame When encryption is used for an audio stream that is either highly constrained (e.g. yes/no, recorded prompts) or highly sensitive When low-latency transmission is required over a relatively slow connection, then constrained VBR can also be used. This uses VBR in a way that simulates a "bit reservoir" and is equivalent to what MP3 (MPEG 1, Layer 3) and AAC (Advanced Audio Coding) call CBR (i.e., not true CBR due to the bit reservoir).
Discontinuous Transmission (DTX) reduces the bitrate during silence or background noise. When DTX is enabled, only one frame is encoded every 400 milliseconds.
The Opus encoder produces "packets", which are each a contiguous set of bytes meant to be transmitted as a single unit. The packets described here do not include such things as IP, UDP, or RTP headers which are normally found in a transport-layer packet. A single packet may contain multiple audio frames, so long as they share a common set of parameters, including the operating mode, audio bandwidth, frame size, and channel count (mono vs. stereo). This section describes the possible combinations of these parameters and the internal framing used to pack multiple frames into a single packet. This framing is not self-delimiting. Instead, it assumes that a higher layer (such as UDP or RTP or Ogg or Matroska ) will communicate the length, in bytes, of the packet, and it uses this information to reduce the framing overhead in the packet itself. A decoder implementation MUST support the framing described in this section. An alternative, self-delimiting variant of the framing is described in . Support for that variant is OPTIONAL. All bit diagrams in this document number the bits so that bit 0 is the most significant bit of the first byte, and bit 7 is the least significant. Bit 8 is thus the most significant bit of the second byte, etc. Well-formed Opus packets obey certain requirements, marked [R1] through [R7] below. These are summarized in along with appropriate means of handling malformed packets.
A well-formed Opus packet MUST contain at least one byte [R1]. This byte forms a table-of-contents (TOC) header that signals which of the various modes and configurations a given packet uses. It is composed of a configuration number, "config", a stereo flag, "s", and a frame count code, "c", arranged as illustrated in . A description of each of these fields follows.
The top five bits of the TOC byte, labeled "config", encode one of 32 possible configurations of operating mode, audio bandwidth, and frame size. As described, the LP (SILK) layer and MDCT (CELT) layer can be combined in three possible operating modes: A SILK-only mode for use in low bitrate connections with an audio bandwidth of WB or less, A Hybrid (SILK+CELT) mode for SWB or FB speech at medium bitrates, and A CELT-only mode for very low delay speech transmission as well as music transmission (NB to FB). The 32 possible configurations each identify which one of these operating modes the packet uses, as well as the audio bandwidth and the frame size. lists the parameters for each configuration. Configuration Number(s) Mode Bandwidth Frame Sizes 0...3 SILK-only NB 10, 20, 40, 60 ms 4...7 SILK-only MB 10, 20, 40, 60 ms 8...11 SILK-only WB 10, 20, 40, 60 ms 12...13 Hybrid SWB 10, 20 ms 14...15 Hybrid FB 10, 20 ms 16...19 CELT-only NB 2.5, 5, 10, 20 ms 20...23 CELT-only WB 2.5, 5, 10, 20 ms 24...27 CELT-only SWB 2.5, 5, 10, 20 ms 28...31 CELT-only FB 2.5, 5, 10, 20 ms The configuration numbers in each range (e.g., 0...3 for NB SILK-only) correspond to the various choices of frame size, in the same order. For example, configuration 0 has a 10 ms frame size and configuration 3 has a 60 ms frame size. One additional bit, labeled "s", signals mono vs. stereo, with 0 indicating mono and 1 indicating stereo. The remaining two bits of the TOC byte, labeled "c", code the number of frames per packet (codes 0 to 3) as follows: 0: 1 frame in the packet 1: 2 frames in the packet, each with equal compressed size 2: 2 frames in the packet, with different compressed sizes 3: an arbitrary number of frames in the packet This draft refers to a packet as a code 0 packet, code 1 packet, etc., based on the value of "c".
This section describes how frames are packed according to each possible value of "c" in the TOC byte.
When a packet contains multiple VBR frames (i.e., code 2 or 3), the compressed length of one or more of these frames is indicated with a one- or two-byte sequence, with the meaning of the first byte as follows: 0: No frame (discontinuous transmission (DTX) or lost packet) 1...251: Length of the frame in bytes 252...255: A second byte is needed. The total length is (second_byte*4)+first_byte The special length 0 indicates that no frame is available, either because it was dropped during transmission by some intermediary or because the encoder chose not to transmit it. Any Opus frame in any mode MAY have a length of 0. The maximum representable length is 255*4+255=1275 bytes. For 20 ms frames, this represents a bitrate of 510 kb/s, which is approximately the highest useful rate for lossily compressed fullband stereo music. Beyond this point, lossless codecs are more appropriate. It is also roughly the maximum useful rate of the MDCT layer, as shortly thereafter quality no longer improves with additional bits due to limitations on the codebook sizes. No length is transmitted for the last frame in a VBR packet, or for any of the frames in a CBR packet, as it can be inferred from the total size of the packet and the size of all other data in the packet. However, the length of any individual frame MUST NOT exceed 1275 bytes [R2], to allow for repacketization by gateways, conference bridges, or other software.
For code 0 packets, the TOC byte is immediately followed by N-1 bytes of compressed data for a single frame (where N is the size of the packet), as illustrated in .
For code 1 packets, the TOC byte is immediately followed by the (N-1)/2 bytes of compressed data for the first frame, followed by (N-1)/2 bytes of compressed data for the second frame, as illustrated in . The number of payload bytes available for compressed data, N-1, MUST be even for all code 1 packets [R3].
For code 2 packets, the TOC byte is followed by a one- or two-byte sequence indicating the length of the first frame (marked N1 in ), followed by N1 bytes of compressed data for the first frame. The remaining N-N1-2 or N-N1-3 bytes are the compressed data for the second frame. This is illustrated in . A code 2 packet MUST contain enough bytes to represent a valid length. For example, a 1-byte code 2 packet is always invalid, and a 2-byte code 2 packet whose second byte is in the range 252...255 is also invalid. The length of the first frame, N1, MUST also be no larger than the size of the payload remaining after decoding that length for all code 2 packets [R4]. This makes, for example, a 2-byte code 2 packet with a second byte in the range 1...251 invalid as well (the only valid 2-byte code 2 packet is one where the length of both frames is zero).
Code 3 packets signal the number of frames, as well as additional padding, called "Opus padding" to indicate that this padding is added at the Opus layer, rather than at the transport layer. Code 3 packets MUST have at least 2 bytes [R6,R7]. The TOC byte is followed by a byte encoding the number of frames in the packet in bits 2 to 7 (marked "M" in ), with bit 1 indicating whether or not Opus padding is inserted (marked "p" in ), and bit 0 indicating VBR (marked "v" in ). M MUST NOT be zero, and the audio duration contained within a packet MUST NOT exceed 120 ms [R5]. This limits the maximum frame count for any frame size to 48 (for 2.5 ms frames), with lower limits for longer frame sizes. illustrates the layout of the frame count byte.
When Opus padding is used, the number of bytes of padding is encoded in the bytes following the frame count byte. Values from 0...254 indicate that 0...254 bytes of padding are included, in addition to the byte(s) used to indicate the size of the padding. If the value is 255, then the size of the additional padding is 254 bytes, plus the padding value encoded in the next byte. There MUST be at least one more byte in the packet in this case [R6,R7]. The additional padding bytes appear at the end of the packet, and MUST be set to zero by the encoder to avoid creating a covert channel. The decoder MUST accept any value for the padding bytes, however. Although this encoding provides multiple ways to indicate a given number of padding bytes, each uses a different number of bytes to indicate the padding size, and thus will increase the total packet size by a different amount. For example, to add 255 bytes to a packet, set the padding bit, p, to 1, insert a single byte after the frame count byte with a value of 254, and append 254 padding bytes with the value zero to the end of the packet. To add 256 bytes to a packet, set the padding bit to 1, insert two bytes after the frame count byte with the values 255 and 0, respectively, and append 254 padding bytes with the value zero to the end of the packet. By using the value 255 multiple times, it is possible to create a packet of any specific, desired size. Let P be the number of header bytes used to indicate the padding size plus the number of padding bytes themselves (i.e., P is the total number of bytes added to the packet). Then P MUST be no more than N-2 [R6,R7]. In the CBR case, let R=N-2-P be the number of bytes remaining in the packet after subtracting the (optional) padding. Then the compressed length of each frame in bytes is equal to R/M. The value R MUST be a non-negative integer multiple of M [R6]. The compressed data for all M frames follows, each of size R/M bytes, as illustrated in .
In the VBR case, the (optional) padding length is followed by M-1 frame lengths (indicated by "N1" to "N[M-1]" in ), each encoded in a one- or two-byte sequence as described above. The packet MUST contain enough data for the M-1 lengths after removing the (optional) padding, and the sum of these lengths MUST be no larger than the number of bytes remaining in the packet after decoding them [R7]. The compressed data for all M frames follows, each frame consisting of the indicated number of bytes, with the final frame consuming any remaining bytes before the final padding, as illustrated in . The number of header bytes (TOC byte, frame count byte, padding length bytes, and frame length bytes), plus the signaled length of the first M-1 frames themselves, plus the signaled length of the padding MUST be no larger than N, the total size of the packet.
Simplest case, one NB mono 20 ms SILK frame:
Two FB mono 5 ms CELT frames of the same compressed size:
Two FB mono 20 ms Hybrid frames of different compressed size:
Four FB stereo 20 ms CELT frames of the same compressed size:
A receiver MUST NOT process packets which violate any of the rules above as normal Opus packets. They are reserved for future applications, such as in-band headers (containing metadata, etc.). Packets which violate these constraints may cause implementations of this specification to treat them as malformed, and discard them. These constraints are summarized here for reference: Packets are at least one byte. No implicit frame length is larger than 1275 bytes. Code 1 packets have an odd total length, N, so that (N-1)/2 is an integer. Code 2 packets have enough bytes after the TOC for a valid frame length, and that length is no larger than the number of bytes remaining in the packet. Code 3 packets contain at least one frame, but no more than 120 ms of audio total. The length of a CBR code 3 packet, N, is at least two bytes, the number of bytes added to indicate the padding size plus the trailing padding bytes themselves, P, is no more than N-2, and the frame count, M, satisfies the constraint that (N-2-P) is a non-negative integer multiple of M. VBR code 3 packets are large enough to contain all the header bytes (TOC byte, frame count byte, any padding length bytes, and any frame length bytes), plus the length of the first M-1 frames, plus any trailing padding bytes.
The Opus decoder consists of two main blocks: the SILK decoder and the CELT decoder. At any given time, one or both of the SILK and CELT decoders may be active. The output of the Opus decode is the sum of the outputs from the SILK and CELT decoders with proper sample rate conversion and delay compensation on the SILK side, and optional decimation (when decoding to sample rates less than 48 kHz) on the CELT side, as illustrated in the block diagram below.
| Decoder |--->| Rate |----+ Bit- +---------+ | | | | Conversion | v stream | Range |---+ +---------+ +------------+ /---\ Audio ------->| Decoder | | + |------> | |---+ +---------+ +------------+ \---/ +---------+ | | CELT | | Decimation | ^ +->| Decoder |--->| (Optional) |----+ | | | | +---------+ +------------+ ]]>
Opus uses an entropy coder based on range coding , which is itself a rediscovery of the FIFO arithmetic code introduced by . It is very similar to arithmetic encoding, except that encoding is done with digits in any base instead of with bits, so it is faster when using larger bases (i.e., a byte). All of the calculations in the range coder must use bit-exact integer arithmetic. Symbols may also be coded as "raw bits" packed directly into the bitstream, bypassing the range coder. These are packed backwards starting at the end of the frame, as illustrated in . This reduces complexity and makes the stream more resilient to bit errors, as corruption in the raw bits will not desynchronize the decoding process, unlike corruption in the input to the range decoder. Raw bits are only used in the CELT layer.
: + + : : + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ : | <- Boundary occurs at an arbitrary bit position : +-+-+-+ + : <- Raw bits data (packed LSB to MSB) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ]]>
Each symbol coded by the range coder is drawn from a finite alphabet and coded in a separate "context", which describes the size of the alphabet and the relative frequency of each symbol in that alphabet. Suppose there is a context with n symbols, identified with an index that ranges from 0 to n-1. The parameters needed to encode or decode symbol k in this context are represented by a three-tuple (fl[k], fh[k], ft), with 0 <= fl[k] < fh[k] <= ft <= 65535. The values of this tuple are derived from the probability model for the symbol, represented by traditional "frequency counts". Because Opus uses static contexts these are not updated as symbols are decoded. Let f[i] be the frequency of symbol i. Then the three-tuple corresponding to symbol k is given by
The range decoder extracts the symbols and integers encoded using the range encoder in . The range decoder maintains an internal state vector composed of the two-tuple (val, rng), representing the difference between the high end of the current range and the actual coded value, minus one, and the size of the current range, respectively. Both val and rng are 32-bit unsigned integer values.
Let b0 be the first input byte (or zero if there are no bytes in this Opus frame). The decoder initializes rng to 128 and initializes val to (127 - (b0>>1)), where (b0>>1) is the top 7 bits of the first input byte. It saves the remaining bit, (b0&1), for use in the renormalization procedure described in , which the decoder invokes immediately after initialization to read additional bits and establish the invariant that rng > 2**23.
Decoding a symbol is a two-step process. The first step determines a 16-bit unsigned value fs, which lies within the range of some symbol in the current context. The second step updates the range decoder state with the three-tuple (fl[k], fh[k], ft) corresponding to that symbol. The first step is implemented by ec_decode() (entdec.c), which computes
The divisions here are integer division.
The decoder then identifies the symbol in the current context corresponding to fs; i.e., the value of k whose three-tuple (fl[k], fh[k], ft) satisfies fl[k] <= fs < fh[k]. It uses this tuple to update val according to
If fl[k] is greater than zero, then the decoder updates rng using
Otherwise, it updates rng using
Using a special case for the first symbol (rather than the last symbol, as is commonly done in other arithmetic coders) ensures that all the truncation error from the finite precision arithmetic accumulates in symbol 0. This makes the cost of coding a 0 slightly smaller, on average, than its estimated probability indicates and makes the cost of coding any other symbol slightly larger. When contexts are designed so that 0 is the most probable symbol, which is often the case, this strategy minimizes the inefficiency introduced by the finite precision. It also makes some of the special-case decoding routines in particularly simple. After the updates, implemented by ec_dec_update() (entdec.c), the decoder normalizes the range using the procedure in the next section, and returns the index k.
To normalize the range, the decoder repeats the following process, implemented by ec_dec_normalize() (entdec.c), until rng > 2**23. If rng is already greater than 2**23, the entire process is skipped. First, it sets rng to (rng<<8). Then it reads the next byte of the Opus frame and forms an 8-bit value sym, using the left-over bit buffered from the previous byte as the high bit and the top 7 bits of the byte just read as the other 7 bits of sym. The remaining bit in the byte just read is buffered for use in the next iteration. If no more input bytes remain, it uses zero bits instead. See for the initialization used to process the first byte. Then, it sets
It is normal and expected that the range decoder will read several bytes into the raw bits data (if any) at the end of the packet by the time the frame is completely decoded, as illustrated in . This same data MUST also be returned as raw bits when requested. The encoder is expected to terminate the stream in such a way that the decoder will decode the intended values regardless of the data contained in the raw bits. describes a procedure for doing this. If the range decoder consumes all of the bytes belonging to the current frame, it MUST continue to use zero when any further input bytes are required, even if there is additional data in the current packet from padding or other frames.
| : +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ^ ^ | End of data buffered by the range coder | ...-----------------------------------------------+ | | End of data consumed by raw bits +-------------------------------------------------------... ]]>
The reference implementation uses three additional decoding methods that are exactly equivalent to the above, but make assumptions and simplifications that allow for a more efficient implementation.
The first is ec_decode_bin() (entdec.c), defined using the parameter ftb instead of ft. It is mathematically equivalent to calling ec_decode() with ft = (1<<ftb), but avoids one of the divisions.
The next is ec_dec_bit_logp() (entdec.c), which decodes a single binary symbol, replacing both the ec_decode() and ec_dec_update() steps. The context is described by a single parameter, logp, which is the absolute value of the base-2 logarithm of the probability of a "1". It is mathematically equivalent to calling ec_decode() with ft = (1<<logp), followed by ec_dec_update() with the 3-tuple (fl[k] = 0, fh[k] = (1<<logp) - 1, ft = (1<<logp)) if the returned value of fs is less than (1<<logp) - 1 (a "0" was decoded), and with (fl[k] = (1<<logp) - 1, fh[k] = ft = (1<<logp)) otherwise (a "1" was decoded). The implementation requires no multiplications or divisions.
The last is ec_dec_icdf() (entdec.c), which decodes a single symbol with a table-based context of up to 8 bits, also replacing both the ec_decode() and ec_dec_update() steps, as well as the search for the decoded symbol in between. The context is described by two parameters, an icdf ("inverse" cumulative distribution function) table and ftb. As with ec_decode_bin(), (1<<ftb) is equivalent to ft. idcf[k], on the other hand, stores (1<<ftb)-fh[k], which is equal to (1<<ftb) - fl[k+1]. fl[0] is assumed to be 0, and the table is terminated by a value of 0 (where fh[k] == ft). The function is mathematically equivalent to calling ec_decode() with ft = (1<<ftb), using the returned value fs to search the table for the first entry where fs < (1<<ftb)-icdf[k], and calling ec_dec_update() with fl[k] = (1<<ftb) - icdf[k-1] (or 0 if k == 0), fh[k] = (1<<ftb) - idcf[k], and ft = (1<<ftb). Combining the search with the update allows the division to be replaced by a series of multiplications (which are usually much cheaper), and using an inverse CDF allows the use of an ftb as large as 8 in an 8-bit table without any special cases. This is the primary interface with the range decoder in the SILK layer, though it is used in a few places in the CELT layer as well. Although icdf[k] is more convenient for the code, the frequency counts, f[k], are a more natural representation of the probability distribution function (PDF) for a given symbol. Therefore this draft lists the latter, not the former, when describing the context in which a symbol is coded as a list, e.g., {4, 4, 4, 4}/16 for a uniform context with four possible values and ft = 16. The value of ft after the slash is always the sum of the entries in the PDF, but is included for convenience. Contexts with identical probabilities, f[k]/ft, but different values of ft (or equivalently, ftb) are not the same, and cannot, in general, be used in place of one another. An icdf table is also not capable of representing a PDF where the first symbol has 0 probability. In such contexts, ec_dec_icdf() can decode the symbol by using a table that drops the entries for any initial zero-probability values and adding the constant offset of the first value with a non-zero probability to its return value.
The raw bits used by the CELT layer are packed at the end of the packet, with the least significant bit of the first value packed in the least significant bit of the last byte, filling up to the most significant bit in the last byte, continuing on to the least significant bit of the penultimate byte, and so on. The reference implementation reads them using ec_dec_bits() (entdec.c). Because the range decoder must read several bytes ahead in the stream, as described in , the input consumed by the raw bits may overlap with the input consumed by the range coder, and a decoder MUST allow this. The format should render it impossible to attempt to read more raw bits than there are actual bits in the frame, though a decoder may wish to check for this and report an error.
The function ec_dec_uint() (entdec.c) decodes one of ft equiprobable values in the range 0 to (ft - 1), inclusive, each with a frequency of 1, where ft may be as large as (2**32 - 1). Because ec_decode() is limited to a total frequency of (2**16 - 1), it splits up the value into a range coded symbol representing up to 8 of the high bits, and, if necessary, raw bits representing the remainder of the value. The limit of 8 bits in the range coded symbol is a trade-off between implementation complexity, modeling error (since the symbols no longer truly have equal coding cost), and rounding error introduced by the range coder itself (which gets larger as more bits are included). Using raw bits reduces the maximum number of divisions required in the worst case, but means that it may be possible to decode a value outside the range 0 to (ft - 1), inclusive. ec_dec_uint() takes a single, positive parameter, ft, which is not necessarily a power of two, and returns an integer, t, whose value lies between 0 and (ft - 1), inclusive. Let ftb = ilog(ft - 1), i.e., the number of bits required to store (ft - 1) in two's complement notation. If ftb is 8 or less, then t is decoded with t = ec_decode(ft), and the range coder state is updated using the three-tuple (t, t + 1, ft). If ftb is greater than 8, then the top 8 bits of t are decoded using
> (ftb - 8)) + 1) , ]]>
the decoder state is updated using the three-tuple (t, t + 1, ((ft - 1) >> (ftb - 8)) + 1), and the remaining bits are decoded as raw bits, setting
If, at this point, t >= ft, then the current frame is corrupt. In that case, the decoder should assume there has been an error in the coding, decoding, or transmission and SHOULD take measures to conceal the error and/or report to the application that the error has occurred.
The bit allocation routines in the CELT decoder need a conservative upper bound on the number of bits that have been used from the current frame thus far, including both range coder bits and raw bits. This drives allocation decisions that must match those made in the encoder. The upper bound is computed in the reference implementation to whole-bit precision by the function ec_tell() (entcode.h) and to fractional 1/8th bit precision by the function ec_tell_frac() (entcode.c). Like all operations in the range coder, it must be implemented in a bit-exact manner, and must produce exactly the same value returned by the same functions in the encoder after encoding the same symbols. ec_tell() is guaranteed to return ceil(ec_tell_frac()/8.0). In various places the codec will check to ensure there is enough room to contain a symbol before attempting to decode it. In practice, although the number of bits used so far is an upper bound, decoding a symbol whose probability model suggests it has a worst-case cost of p 1/8th bits may actually advance the return value of ec_tell_frac() by p-1, p, or p+1 1/8th bits, due to approximation error in that upper bound, truncation error in the range coder, and for large values of ft, modeling error in ec_dec_uint(). However, this error is bounded, and periodic calls to ec_tell() or ec_tell_frac() at precisely defined points in the decoding process prevent it from accumulating. For a range coder symbol that requires a whole number of bits (i.e., for which ft/(fh[k] - fl[k]) is a power of two), where there are at least p 1/8th bits available, decoding the symbol will never cause ec_tell() or ec_tell_frac() to exceed the size of the frame ("bust the budget"). In this case the return value of ec_tell_frac() will only advance by more than p 1/8th bits if there was an additional, fractional number of bits remaining, and it will never advance beyond the next whole-bit boundary, which is safe, since frames always contain a whole number of bits. However, when p is not a whole number of bits, an extra 1/8th bit is required to ensure that decoding the symbol will not bust the budget. The reference implementation keeps track of the total number of whole bits that have been processed by the decoder so far in the variable nbits_total, including the (possibly fractional) number of bits that are currently buffered, but not consumed, inside the range coder. nbits_total is initialized to 9 just before the initial range renormalization process completes (or equivalently, it can be initialized to 33 after the first renormalization). The extra two bits over the actual amount buffered by the range coder guarantees that it is an upper bound and that there is enough room for the encoder to terminate the stream. Each iteration through the range coder's renormalization loop increases nbits_total by 8. Reading raw bits increases nbits_total by the number of raw bits read.
The whole number of bits buffered in rng may be estimated via lg = ilog(rng). ec_tell() then becomes a simple matter of removing these bits from the total. It returns (nbits_total - lg). In a newly initialized decoder, before any symbols have been read, this reports that 1 bit has been used. This is the bit reserved for termination of the encoder.
ec_tell_frac() estimates the number of bits buffered in rng to fractional precision. Since rng must be greater than 2**23 after renormalization, lg must be at least 24. Let
> (lg-16) , ]]>
so that 32768 <= r_Q15 < 65536, an unsigned Q15 value representing the fractional part of rng. Then the following procedure can be used to add one bit of precision to lg. First, update
> 15 . ]]>
Then add the 16th bit of r_Q15 to lg via
> 16) . ]]>
Finally, if this bit was a 1, reduce r_Q15 by a factor of two via
> 1 , ]]>
so that it once again lies in the range 32768 <= r_Q15 < 65536.
This procedure is repeated three times to extend lg to 1/8th bit precision. ec_tell_frac() then returns (nbits_total*8 - lg).
The decoder's LP layer uses a modified version of the SILK codec (herein simply called "SILK"), which runs a decoded excitation signal through adaptive long-term and short-term prediction synthesis filters. It runs at NB, MB, and WB sample rates internally. When used in a SWB or FB Hybrid frame, the LP layer itself still only runs in WB.
An overview of the decoder is given in .
| Range |--->| Decode |---------------------------+ 1 | Decoder | 2 | Parameters |----------+ 5 | +---------+ +------------+ 4 | | 3 | | | \/ \/ \/ +------------+ +------------+ +------------+ | Generate |-->| LTP |-->| LPC | | Excitation | | Synthesis | | Synthesis | +------------+ +------------+ +------------+ ^ | | | +-------------------+----------------+ | 6 | +------------+ +-------------+ +-->| Stereo |-->| Sample Rate |--> | Unmixing | 7 | Conversion | 8 +------------+ +-------------+ 1: Range encoded bitstream 2: Coded parameters 3: Pulses, LSBs, and signs 4: Pitch lags, Long-Term Prediction (LTP) coefficients 5: Linear Predictive Coding (LPC) coefficients and gains 6: Decoded signal (mono or mid-side stereo) 7: Unmixed signal (mono or left-right stereo) 8: Resampled signal ]]>
The decoder feeds the bitstream (1) to the range decoder from , and then decodes the parameters in it (2) using the procedures detailed in Sections  through . These parameters (3, 4, 5) are used to generate an excitation signal (see ), which is fed to an optional long-term prediction (LTP) filter (voiced frames only, see ) and then a short-term prediction filter (see ), producing the decoded signal (6). For stereo streams, the mid-side representation is converted to separate left and right channels (7). The result is finally resampled to the desired output sample rate (e.g., 48 kHz) so that the resampled signal (8) can be mixed with the CELT layer.
Internally, the LP layer of a single Opus frame is composed of either a single 10 ms regular SILK frame or between one and three 20 ms regular SILK frames. A stereo Opus frame may double the number of regular SILK frames (up to a total of six), since it includes separate frames for a mid channel and, optionally, a side channel. Optional Low Bit-Rate Redundancy (LBRR) frames, which are reduced-bitrate encodings of previous SILK frames, may be included to aid in recovery from packet loss. If present, these appear before the regular SILK frames. They are in most respects identical to regular, active SILK frames, except that they are usually encoded with a lower bitrate. This draft uses "SILK frame" to refer to either one and "regular SILK frame" if it needs to draw a distinction between the two. Logically, each SILK frame is in turn composed of either two or four 5 ms subframes. Various parameters, such as the quantization gain of the excitation and the pitch lag and filter coefficients can vary on a subframe-by-subframe basis. Physically, the parameters for each subframe are interleaved in the bitstream, as described in the relevant sections for each parameter. All of these frames and subframes are decoded from the same range coder, with no padding between them. Thus packing multiple SILK frames in a single Opus frame saves, on average, half a byte per SILK frame. It also allows some parameters to be predicted from prior SILK frames in the same Opus frame, since this does not degrade packet loss robustness (beyond any penalty for merely using fewer, larger packets to store multiple frames). Stereo support in SILK uses a variant of mid-side coding, allowing a mono decoder to simply decode the mid channel. However, the data for the two channels is interleaved, so a mono decoder must still unpack the data for the side channel. It would be required to do so anyway for Hybrid Opus frames, or to support decoding individual 20 ms frames. summarizes the overall grouping of the contents of the LP layer. Figures  and  illustrate the ordering of the various SILK frames for a 60 ms Opus frame, for both mono and stereo, respectively. Symbol(s) PDF(s) Condition Voice Activity Detection (VAD) flags {1, 1}/2 LBRR flag {1, 1}/2 Per-frame LBRR flags LBRR Frame(s) Regular SILK Frame(s)
The LP layer begins with two to eight header bits, decoded in silk_Decode() (dec_API.c). These consist of one Voice Activity Detection (VAD) bit per frame (up to 3), followed by a single flag indicating the presence of LBRR frames. For a stereo packet, these first flags correspond to the mid channel, and a second set of flags is included for the side channel. Because these are the first symbols decoded by the range coder and because they are coded as binary values with uniform probability, they can be extracted directly from the most significant bits of the first byte of compressed data. Thus, a receiver can determine if an Opus frame contains any active SILK frames without the overhead of using the range decoder.
For Opus frames longer than 20 ms, a set of LBRR flags is decoded for each channel that has its LBRR flag set. Each set contains one flag per 20 ms SILK frame. 40 ms Opus frames use the 2-frame LBRR flag PDF from , and 60 ms Opus frames use the 3-frame LBRR flag PDF. For each channel, the resulting 2- or 3-bit integer contains the corresponding LBRR flag for each frame, packed in order from the LSB to the MSB. Frame Size PDF 40 ms {0, 53, 53, 150}/256 60 ms {0, 41, 20, 29, 41, 15, 28, 82}/256 A 10 or 20 ms Opus frame does not contain any per-frame LBRR flags, as there may be at most one LBRR frame per channel. The global LBRR flag in the header bits (see ) is already sufficient to indicate the presence of that single LBRR frame.
The LBRR frames, if present, contain an encoded representation of the signal immediately prior to the current Opus frame as if it were encoded with the current mode, frame size, audio bandwidth, and channel count, even if those differ from the prior Opus frame. When one of these parameters changes from one Opus frame to the next, this implies that the LBRR frames of the current Opus frame may not be simple drop-in replacements for the contents of the previous Opus frame. For example, when switching from 20 ms to 60 ms, the 60 ms Opus frame may contain LBRR frames covering up to three prior 20 ms Opus frames, even if those frames already contained LBRR frames covering some of the same time periods. When switching from 20 ms to 10 ms, the 10 ms Opus frame can contain an LBRR frame covering at most half the prior 20 ms Opus frame, potentially leaving a hole that needs to be concealed from even a single packet loss (see ). When switching from mono to stereo, the LBRR frames in the first stereo Opus frame MAY contain a non-trivial side channel. In order to properly produce LBRR frames under all conditions, an encoder might need to buffer up to 60 ms of audio and re-encode it during these transitions. However, the reference implementation opts to disable LBRR frames at the transition point for simplicity. Since transitions are relatively infrequent in normal usage, this does not have a significant impact on packet loss robustness. The LBRR frames immediately follow the LBRR flags, prior to any regular SILK frames. describes their exact contents. LBRR frames do not include their own separate VAD flags. LBRR frames are only meant to be transmitted for active speech, thus all LBRR frames are treated as active. In a stereo Opus frame longer than 20 ms, although the per-frame LBRR flags for the mid channel are coded as a unit before the per-frame LBRR flags for the side channel, the LBRR frames themselves are interleaved. The decoder parses an LBRR frame for the mid channel of a given 20 ms interval (if present) and then immediately parses the corresponding LBRR frame for the side channel (if present), before proceeding to the next 20 ms interval.
The regular SILK frame(s) follow the LBRR frames (if any). describes their contents, as well. Unlike the LBRR frames, a regular SILK frame is coded for each time interval in an Opus frame, even if the corresponding VAD flags are unset. For stereo Opus frames longer than 20 ms, the regular mid and side SILK frames for each 20 ms interval are interleaved, just as with the LBRR frames. The side frame may be skipped by coding an appropriate flag, as detailed in .
Each SILK frame includes a set of side information that encodes The frame type and quantization type (), Quantization gains (), Short-term prediction filter coefficients (), A Line Spectral Frequencies (LSF) interpolation weight (), Long-term prediction filter lags and gains (), and A linear congruential generator (LCG) seed (). The quantized excitation signal (see ) follows these at the end of the frame. details the overall organization of a SILK frame. Symbol(s) PDF(s) Condition Stereo Prediction Weights Mid-only Flag Frame Type Subframe Gains Normalized LSF Stage-1 Index Normalized LSF Stage-2 Residual Normalized LSF Interpolation Weight 20 ms frame Primary Pitch Lag Voiced frame Subframe Pitch Contour Voiced frame Periodicity Index Voiced frame LTP Filter Voiced frame LTP Scaling LCG Seed Excitation Rate Level Excitation Pulse Counts Excitation Pulse Locations Non-zero pulse count Excitation LSBs Excitation Signs
A SILK frame corresponding to the mid channel of a stereo Opus frame begins with a pair of side channel prediction weights, designed such that zeros indicate normal mid-side coupling. Since these weights can change on every frame, the first portion of each frame linearly interpolates between the previous weights and the current ones, using zeros for the previous weights if none are available. These prediction weights are never included in a mono Opus frame, and the previous weights are reset to zeros on any transition from mono to stereo. They are also not included in an LBRR frame for the side channel, even if the LBRR flags indicate the corresponding mid channel was not coded. In that case, the previous weights are used, again substituting in zeros if no previous weights are available since the last decoder reset (see ). To summarize, these weights are coded if and only if This is a stereo Opus frame (), and The current SILK frame corresponds to the mid channel. The prediction weights are coded in three separate pieces, which are decoded by silk_stereo_decode_pred() (decode_stereo_pred.c). The first piece jointly codes the high-order part of a table index for both weights. The second piece codes the low-order part of each table index. The third piece codes an offset used to linearly interpolate between table indices. The details are as follows. Let n be an index decoded with the 25-element stage-1 PDF in . Then let i0 and i1 be indices decoded with the stage-2 and stage-3 PDFs in , respectively, and let i2 and i3 be two more indices decoded with the stage-2 and stage-3 PDFs, all in that order. Stage PDF Stage 1 {7, 2, 1, 1, 1, 10, 24, 8, 1, 1, 3, 23, 92, 23, 3, 1, 1, 8, 24, 10, 1, 1, 1, 2, 7}/256 Stage 2 {85, 86, 85}/256 Stage 3 {51, 51, 52, 51, 51}/256 Then use n, i0, and i2 to form two table indices, wi0 and wi1, according to
where the division is integer division. The range of these indices is 0 to 14, inclusive. Let w[i] be the i'th weight from . Then the two prediction weights, w0_Q13 and w1_Q13, are
> 16)*(2*i3 + 1) w0_Q13 = w_Q13[wi0] + ((w_Q13[wi0+1] - w_Q13[wi0])*6554) >> 16)*(2*i1 + 1) - w1_Q13 ]]>
N.b., w1_Q13 is computed first here, because w0_Q13 depends on it. The constant 6554 is approximately 0.1 in Q16. Although wi0 and wi1 only have 15 possible values, contains 16 entries to allow interpolation between entry wi0 and (wi0 + 1) (and likewise for wi1).
Index Weight (Q13) 0 -13732 1 -10050 2 -8266 3 -7526 4 -6500 5 -5000 6 -2950 7 -820 8 820 9 2950 10 5000 11 6500 12 7526 13 8266 14 10050 15 13732
A flag appears after the stereo prediction weights that indicates if only the mid channel is coded for this time interval. It appears only when This is a stereo Opus frame (see ), The current SILK frame corresponds to the mid channel, and Either This is a regular SILK frame where the VAD flags (see ) indicate that the corresponding side channel is not active. This is an LBRR frame where the LBRR flags (see and ) indicate that the corresponding side channel is not coded. It is omitted when there are no stereo weights, for all of the same reasons. It is also omitted for a regular SILK frame when the VAD flag of the corresponding side channel frame is set (indicating it is active). The side channel must be coded in this case, making the mid-only flag redundant. It is also omitted for an LBRR frame when the corresponding LBRR flags indicate the side channel is coded. When the flag is present, the decoder reads a single value using the PDF in , as implemented in silk_stereo_decode_mid_only() (decode_stereo_pred.c). If the flag is set, then there is no corresponding SILK frame for the side channel, the entire decoding process for the side channel is skipped, and zeros are fed to the stereo unmixing process (see ) instead. As stated above, LBRR frames still include this flag when the LBRR flag indicates that the side channel is not coded. In that case, if this flag is zero (indicating that there should be a side channel), then Packet Loss Concealment (PLC, see ) SHOULD be invoked to recover a side channel signal. Otherwise, the stereo image will collapse. PDF {192, 64}/256
Each SILK frame contains a single "frame type" symbol that jointly codes the signal type and quantization offset type of the corresponding frame. If the current frame is a regular SILK frame whose VAD bit was not set (an "inactive" frame), then the frame type symbol takes on a value of either 0 or 1 and is decoded using the first PDF in . If the frame is an LBRR frame or a regular SILK frame whose VAD flag was set (an "active" frame), then the value of the symbol may range from 2 to 5, inclusive, and is decoded using the second PDF in . translates between the value of the frame type symbol and the corresponding signal type and quantization offset type. VAD Flag PDF Inactive {26, 230, 0, 0, 0, 0}/256 Active {0, 0, 24, 74, 148, 10}/256 Frame Type Signal Type Quantization Offset Type 0 Inactive Low 1 Inactive High 2 Unvoiced Low 3 Unvoiced High 4 Voiced Low 5 Voiced High
A separate quantization gain is coded for each 5 ms subframe. These gains control the step size between quantization levels of the excitation signal and, therefore, the quality of the reconstruction. They are independent of and unrelated to the pitch contours coded for voiced frames. The quantization gains are themselves uniformly quantized to 6 bits on a log scale, giving them a resolution of approximately 1.369 dB and a range of approximately 1.94 dB to 88.21 dB. The subframe gains are either coded independently, or relative to the gain from the most recent coded subframe in the same channel. Independent coding is used if and only if This is the first subframe in the current SILK frame, and Either This is the first SILK frame of its type (LBRR or regular) for this channel in the current Opus frame, or The previous SILK frame of the same type (LBRR or regular) for this channel in the same Opus frame was not coded. In an independently coded subframe gain, the 3 most significant bits of the quantization gain are decoded using a PDF selected from based on the decoded signal type (see ). Signal Type PDF Inactive {32, 112, 68, 29, 12, 1, 1, 1}/256 Unvoiced {2, 17, 45, 60, 62, 47, 19, 4}/256 Voiced {1, 3, 26, 71, 94, 50, 9, 2}/256 The 3 least significant bits are decoded using a uniform PDF: PDF {32, 32, 32, 32, 32, 32, 32, 32}/256 These 6 bits are combined to form a value, gain_index, between 0 and 63. When the gain for the previous subframe is available, then the current gain is limited as follows:
This may help some implementations limit the change in precision of their internal LTP history. The indices which this clamp applies to cannot simply be removed from the codebook, because previous_log_gain will not be available after packet loss. The clamping is skipped after a decoder reset, and in the side channel if the previous frame in the side channel was not coded, since there is no value for previous_log_gain available. It MAY also be skipped after packet loss.
For subframes which do not have an independent gain (including the first subframe of frames not listed as using independent coding above), the quantization gain is coded relative to the gain from the previous subframe (in the same channel). The PDF in yields a delta_gain_index value between 0 and 40, inclusive. PDF {6, 5, 11, 31, 132, 21, 8, 4, 3, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}/256 The following formula translates this index into a quantization gain for the current subframe using the gain from the previous subframe:
silk_gains_dequant() (gain_quant.c) dequantizes log_gain for the k'th subframe and converts it into a linear Q16 scale factor via
>16) + 2090) ]]>
The function silk_log2lin() (log2lin.c) computes an approximation of 2**(inLog_Q7/128.0), where inLog_Q7 is its Q7 input. Let i = inLog_Q7>>7 be the integer part of inLogQ7 and f = inLog_Q7&127 be the fractional part. Then
>16)+f)*((1<>7) ]]>
yields the approximate exponential. The final Q16 gain values lies between 81920 and 1686110208, inclusive (representing scale factors of 1.25 to 25728, respectively).
A set of normalized Line Spectral Frequency (LSF) coefficients follow the quantization gains in the bitstream, and represent the Linear Predictive Coding (LPC) coefficients for the current SILK frame. Once decoded, the normalized LSFs form an increasing list of Q15 values between 0 and 1. These represent the interleaved zeros on the upper half of the unit circle (between 0 and pi, hence "normalized") in the standard decomposition of the LPC filter into a symmetric part and an anti-symmetric part (P and Q in ). Because of non-linear effects in the decoding process, an implementation SHOULD match the fixed-point arithmetic described in this section exactly. An encoder SHOULD also use the same process. The normalized LSFs are coded using a two-stage vector quantizer (VQ) ( and ). NB and MB frames use an order-10 predictor, while WB frames use an order-16 predictor, and thus have different sets of tables. After reconstructing the normalized LSFs (), the decoder runs them through a stabilization process (), interpolates them between frames (), converts them back into LPC coefficients (), and then runs them through further processes to limit the range of the coefficients () and the gain of the filter (). All of this is necessary to ensure the reconstruction process is stable.
The first VQ stage uses a 32-element codebook, coded with one of the PDFs in , depending on the audio bandwidth and the signal type of the current SILK frame. This yields a single index, I1, for the entire frame, which Indexes an element in a coarse codebook, Selects the PDFs for the second stage of the VQ, and Selects the prediction weights used to remove intra-frame redundancy from the second stage. The actual codebook elements are listed in and , but they are not needed until the last stages of reconstructing the LSF coefficients. Audio Bandwidth Signal Type PDF NB or MB Inactive or unvoiced {44, 34, 30, 19, 21, 12, 11, 3, 3, 2, 16, 2, 2, 1, 5, 2, 1, 3, 3, 1, 1, 2, 2, 2, 3, 1, 9, 9, 2, 7, 2, 1}/256 NB or MB Voiced {1, 10, 1, 8, 3, 8, 8, 14, 13, 14, 1, 14, 12, 13, 11, 11, 12, 11, 10, 10, 11, 8, 9, 8, 7, 8, 1, 1, 6, 1, 6, 5}/256 WB Inactive or unvoiced {31, 21, 3, 17, 1, 8, 17, 4, 1, 18, 16, 4, 2, 3, 1, 10, 1, 3, 16, 11, 16, 2, 2, 3, 2, 11, 1, 4, 9, 8, 7, 3}/256 WB Voiced {1, 4, 16, 5, 18, 11, 5, 14, 15, 1, 3, 12, 13, 14, 14, 6, 14, 12, 2, 6, 1, 12, 12, 11, 10, 3, 10, 5, 1, 1, 1, 3}/256
A total of 16 PDFs are available for the LSF residual in the second stage: the 8 (a...h) for NB and MB frames given in , and the 8 (i...p) for WB frames given in . Which PDF is used for which coefficient is driven by the index, I1, decoded in the first stage. lists the letter of the corresponding PDF for each normalized LSF coefficient for NB and MB, and lists the same information for WB. Codebook PDF a {1, 1, 1, 15, 224, 11, 1, 1, 1}/256 b {1, 1, 2, 34, 183, 32, 1, 1, 1}/256 c {1, 1, 4, 42, 149, 55, 2, 1, 1}/256 d {1, 1, 8, 52, 123, 61, 8, 1, 1}/256 e {1, 3, 16, 53, 101, 74, 6, 1, 1}/256 f {1, 3, 17, 55, 90, 73, 15, 1, 1}/256 g {1, 7, 24, 53, 74, 67, 26, 3, 1}/256 h {1, 1, 18, 63, 78, 58, 30, 6, 1}/256 Codebook PDF i {1, 1, 1, 9, 232, 9, 1, 1, 1}/256 j {1, 1, 2, 28, 186, 35, 1, 1, 1}/256 k {1, 1, 3, 42, 152, 53, 2, 1, 1}/256 l {1, 1, 10, 49, 126, 65, 2, 1, 1}/256 m {1, 4, 19, 48, 100, 77, 5, 1, 1}/256 n {1, 1, 14, 54, 100, 72, 12, 1, 1}/256 o {1, 1, 15, 61, 87, 61, 25, 4, 1}/256 p {1, 7, 21, 50, 77, 81, 17, 1, 1}/256 I1 Coefficient 0 1 2 3 4 5 6 7 8 9 0 a a a a a a a a a a 1 b d b c c b c b b b 2 c b b b b b b b b b 3 b c c c c b c b b b 4 c d d d d c c c c c 5 a f d d c c c c b b g a c c c c c c c c b 7 c d g e e e f e f f 8 c e f f e f e g e e 9 c e e h e f e f f e 10 e d d d c d c c c c 11 b f f g e f e f f f 12 c h e g f f f f f f 13 c h f f f f f g f e 14 d d f e e f e f e e 15 c d d f f e e e e e 16 c e e g e f e f f f 17 c f e g f f f e f e 18 c h e f e f e f f f 19 c f e g h g f g f e 20 d g h e g f f g e f 21 c h g e e e f e f f 22 e f f e g g f g f e 23 c f f g f g e g e e 24 e f f f d h e f f e 25 c d e f f g e f f e 26 c d c d d e c d d d 27 b b c c c c c d c c 28 e f f g g g f g e f 29 d f f e e e e d d c 30 c f d h f f e e f e 31 e e f e f g f g f e I1 Coefficient 0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 0 i  i  i  i  i  i  i  i  i  i  i  i  i  i  i  i 1 k  l  l  l  l  l  k  k  k  k  k  j  j  j  i  l 2 k  n  n  l  p  m  m  n  k  n  m  n  n  m  l  l 3 i  k  j  k  k  j  j  j  j  j  i  i  i  i  i  j 4 i  o  n  m  o  m  p  n  m  m  m  n  n  m  m  l 5 i  l  n  n  m  l  l  n  l  l  l  l  l  l  k  m 6 i  i  i  i  i  i  i  i  i  i  i  i  i  i  i  i 7 i  k  o  l  p  k  n  l  m  n  n  m  l  l  k  l 8 i  o  k  o  o  m  n  m  o  n  m  m  n  l  l  l 9 k  j  i  i  i  i  i  i  i  i  i  i  i  i  i  i 10 i  j  i  i  i  i  i  i  i  i  i  i  i  i  i  j 11 k  k  l  m  n  l  l  l  l  l  l  l  k  k  j  l 12 k  k  l  l  m  l  l  l  l  l  l  l  l  k  j  l 13 l  m  m  m  o  m  m  n  l  n  m  m  n  m  l  m 14 i  o  m  n  m  p  n  k  o  n  p  m  m  l  n  l 15 i  j  i  j  j  j  j  j  j  j  i  i  i  i  j  i 16 j  o  n  p  n  m  n  l  m  n  m  m  m  l  l  m 17 j  l  l  m  m  l  l  n  k  l  l  n  n  n  l  m 18 k  l  l  k  k  k  l  k  j  k  j  k  j  j  j  m 19 i  k  l  n  l  l  k  k  k  j  j  i  i  i  i  i 20 l  m  l  n  l  l  k  k  j  j  j  j  j  k  k  m 21 k  o  l  p  p  m  n  m  n  l  n  l  l  k  l  l 22 k  l  n  o  o  l  n  l  m  m  l  l  l  l  k  m 23 j  l  l  m  m  m  m  l  n  n  n  l  j  j  j  j 24 k  n  l  o  o  m  p  m  m  n  l  m  m  l  l  l 25 i  o  j  j  i  i  i  i  i  i  i  i  i  i  i  i 26 i  o  o  l  n  k  n  n  l  m  m  p  p  m  m  m 27 l  l  p  l  n  m  l  l  l  k  k  l  l  l  k  l 28 i  i  j  i  i  i  k  j  k  j  j  k  k  k  j  j 29 i  l  k  n  l  l  k  l  k  j  i  i  j  i  i  j 30 l  n  n  m  p  n  l  l  k  l  k  k  j  i  j  i 31 k  l  n  l  m  l  l  l  k  j  k  o  m  i  i  i Decoding the second stage residual proceeds as follows. For each coefficient, the decoder reads a symbol using the PDF corresponding to I1 from either or , and subtracts 4 from the result to give an index in the range -4 to 4, inclusive. If the index is either -4 or 4, it reads a second symbol using the PDF in , and adds the value of this second symbol to the index, using the same sign. This gives the index, I2[k], a total range of -10 to 10, inclusive. PDF {156, 60, 24, 9, 4, 2, 1}/256 The decoded indices from both stages are translated back into normalized LSF coefficients in silk_NLSF_decode() (NLSF_decode.c). The stage-2 indices represent residuals after both the first stage of the VQ and a separate backwards-prediction step. The backwards prediction process in the encoder subtracts a prediction from each residual formed by a multiple of the coefficient that follows it. The decoder must undo this process. contains lists of prediction weights for each coefficient. There are two lists for NB and MB, and another two lists for WB, giving two possible prediction weights for each coefficient. Coefficient A B C D 0 179 116 175 68 1 138 67 148 62 2 140 82 160 66 3 148 59 176 60 4 151 92 178 72 5 149 72 173 117 6 153 100 174 85 7 151 89 164 90 8 163 92 177 118 9 174 136 10 196 151 11 182 142 12 198 160 13 192 142 14 182 155 The prediction is undone using the procedure implemented in silk_NLSF_residual_dequant() (NLSF_decode.c), which is as follows. Each coefficient selects its prediction weight from one of the two lists based on the stage-1 index, I1. gives the selections for each coefficient for NB and MB, and gives the selections for WB. Let d_LPC be the order of the codebook, i.e., 10 for NB and MB, and 16 for WB, and let pred_Q8[k] be the weight for the k'th coefficient selected by this process for 0 <= k < d_LPC-1. Then, the stage-2 residual for each coefficient is computed via
>8 : 0) + ((((I2[k]<<10) - sign(I2[k])*102)*qstep)>>16) , ]]>
where qstep is the Q16 quantization step size, which is 11796 for NB and MB and 9830 for WB (representing step sizes of approximately 0.18 and 0.15, respectively).
I1 Coefficient 0 1 2 3 4 5 6 7 8 0 A B A A A A A A A 1 B A A A A A A A A 2 A A A A A A A A A 3 B B B A A A A B A 4 A B A A A A A A A 5 A B A A A A A A A 6 B A B B A A A B A 7 A B B A A B B A A 8 A A B B A B A B B 9 A A B B A A B B B 10 A A A A A A A A A 11 A B A B B B B B A 12 A B A B B B B B A 13 A B B B B B B B A 14 B A B B A B B B B 15 A B B B B B A B A 16 A A B B A B A B A 17 A A B B B A B B B 18 A B B A A B B B A 19 A A A B B B A B A 20 A B B A A B A B A 21 A B B A A A B B A 22 A A A A A B B B B 23 A A B B A A A B B 24 A A A B A B B B B 25 A B B B B B B B A 26 A A A A A A A A A 27 A A A A A A A A A 28 A A B A B B A B A 29 B A A B A A A A A 30 A A A B B A B A B 31 B A B B A B B B B I1 Coefficient 0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 0 C  C  C  C  C  C  C  C  C  C  C  C  C  C  D 1 C  C  C  C  C  C  C  C  C  C  C  C  C  C  C 2 C  C  D  C  C  D  D  D  C  D  D  D  D  C  C 3 C  C  C  C  C  C  C  C  C  C  C  C  D  C  C 4 C  D  D  C  D  C  D  D  C  D  D  D  D  D  C 5 C  C  D  C  C  C  C  C  C  C  C  C  C  C  C 6 D  C  C  C  C  C  C  C  C  C  C  D  C  D  C 7 C  D  D  C  C  C  D  C  D  D  D  C  D  C  D 8 C  D  C  D  D  C  D  C  D  C  D  D  D  D  D 9 C  C  C  C  C  C  C  C  C  C  C  C  C  C  D 10 C  D  C  C  C  C  C  C  C  C  C  C  C  C  C 11 C  C  D  C  D  D  D  D  D  D  D  C  D  C  C 12 C  C  D  C  C  D  C  D  C  D  C  C  D  C  C 13 C  C  C  C  D  D  C  D  C  D  D  D  D  C  C 14 C  D  C  C  C  D  D  C  D  D  D  C  D  D  D 15 C  C  D  D  C  C  C  C  C  C  C  C  D  D  C 16 C  D  D  C  D  C  D  D  D  D  D  C  D  C  C 17 C  C  D  C  C  C  C  D  C  C  D  D  D  C  C 18 C  C  C  C  C  C  C  C  C  C  C  C  C  C  D 19 C  C  C  C  C  C  C  C  C  C  C  C  D  C  C 20 C  C  C  C  C  C  C  C  C  C  C  C  C  C  C 21 C  D  C  D  C  D  D  C  D  C  D  C  D  D  C 22 C  C  D  D  D  D  C  D  D  C  C  D  D  C  C 23 C  D  D  C  D  C  D  C  D  C  C  C  C  D  C 24 C  C  C  D  D  C  D  C  D  D  D  D  D  D  D 25 C  C  C  C  C  C  C  C  C  C  C  C  C  C  D 26 C  D  D  C  C  C  D  D  C  C  D  D  D  D  D 27 C  C  C  C  C  D  C  D  D  D  D  C  D  D  D 28 C  C  C  C  C  C  C  C  C  C  C  C  C  C  D 29 C  C  C  C  C  C  C  C  C  C  C  C  C  C  D 30 D  C  C  C  C  C  C  C  C  C  C  D  C  C  C 31 C  C  D  C  C  D  D  D  C  C  D  C  C  D  C
Once the stage-1 index I1 and the stage-2 residual res_Q10[] have been decoded, the final normalized LSF coefficients can be reconstructed. The spectral distortion introduced by the quantization of each LSF coefficient varies, so the stage-2 residual is weighted accordingly, using the low-complexity Inverse Harmonic Mean Weighting (IHMW) function proposed in . The weights are derived directly from the stage-1 codebook vector. Let cb1_Q8[k] be the k'th entry of the stage-1 codebook vector from or . Then for 0 <= k < d_LPC the following expression computes the square of the weight as a Q18 value:
where cb1_Q8[-1] = 0 and cb1_Q8[d_LPC] = 256, and the division is integer division. This is reduced to an unsquared, Q9 value using the following square-root approximation:
>(i-8)) & 127 y = ((i&1) ? 32768 : 46214) >> ((32-i)>>1) w_Q9[k] = y + ((213*f*y)>>16) ]]>
The constant 46214 here is approximately the square root of 2 in Q15. The cb1_Q8[] vector completely determines these weights, and they may be tabulated and stored as 13-bit unsigned values (with a range of 1819 to 5227, inclusive) to avoid computing them when decoding. The reference implementation already requires code to compute these weights on unquantized coefficients in the encoder, in silk_NLSF_VQ_weights_laroia() (NLSF_VQ_weights_laroia.c) and its callers, so it reuses that code in the decoder instead of using a pre-computed table to reduce the amount of ROM required.
I1 Codebook (Q8)  0   1   2   3   4   5   6   7   8   9 0 12  35  60  83 108 132 157 180 206 228 1 15  32  55  77 101 125 151 175 201 225 2 19  42  66  89 114 137 162 184 209 230 3 12  25  50  72  97 120 147 172 200 223 4 26  44  69  90 114 135 159 180 205 225 5 13  22  53  80 106 130 156 180 205 228 6 15  25  44  64  90 115 142 168 196 222 7 19  24  62  82 100 120 145 168 190 214 8 22  31  50  79 103 120 151 170 203 227 9 21  29  45  65 106 124 150 171 196 224 10 30  49  75  97 121 142 165 186 209 229 11 19  25  52  70  93 116 143 166 192 219 12 26  34  62  75  97 118 145 167 194 217 13 25  33  56  70  91 113 143 165 196 223 14 21  34  51  72  97 117 145 171 196 222 15 20  29  50  67  90 117 144 168 197 221 16 22  31  48  66  95 117 146 168 196 222 17 24  33  51  77 116 134 158 180 200 224 18 21  28  70  87 106 124 149 170 194 217 19 26  33  53  64  83 117 152 173 204 225 20 27  34  65  95 108 129 155 174 210 225 21 20  26  72  99 113 131 154 176 200 219 22 34  43  61  78  93 114 155 177 205 229 23 23  29  54  97 124 138 163 179 209 229 24 30  38  56  89 118 129 158 178 200 231 25 21  29  49  63  85 111 142 163 193 222 26 27  48  77 103 133 158 179 196 215 232 27 29  47  74  99 124 151 176 198 220 237 28 33  42  61  76  93 121 155 174 207 225 29 29  53  87 112 136 154 170 188 208 227 30 24  30  52  84 131 150 166 186 203 229 31 37  48  64  84 104 118 156 177 201 230 I1 Codebook (Q8)  0  1  2  3  4   5   6   7   8   9  10  11  12  13  14  15 0  7 23 38 54 69  85 100 116 131 147 162 178 193 208 223 239 1 13 25 41 55 69  83  98 112 127 142 157 171 187 203 220 236 2 15 21 34 51 61  78  92 106 126 136 152 167 185 205 225 240 3 10 21 36 50 63  79  95 110 126 141 157 173 189 205 221 237 4 17 20 37 51 59  78  89 107 123 134 150 164 184 205 224 240 5 10 15 32 51 67  81  96 112 129 142 158 173 189 204 220 236 6  8 21 37 51 65  79  98 113 126 138 155 168 179 192 209 218 7 12 15 34 55 63  78  87 108 118 131 148 167 185 203 219 236 8 16 19 32 36 56  79  91 108 118 136 154 171 186 204 220 237 9 11 28 43 58 74  89 105 120 135 150 165 180 196 211 226 241 10  6 16 33 46 60  75  92 107 123 137 156 169 185 199 214 225 11 11 19 30 44 57  74  89 105 121 135 152 169 186 202 218 234 12 12 19 29 46 57  71  88 100 120 132 148 165 182 199 216 233 13 17 23 35 46 56  77  92 106 123 134 152 167 185 204 222 237 14 14 17 45 53 63  75  89 107 115 132 151 171 188 206 221 240 15  9 16 29 40 56  71  88 103 119 137 154 171 189 205 222 237 16 16 19 36 48 57  76  87 105 118 132 150 167 185 202 218 236 17 12 17 29 54 71  81  94 104 126 136 149 164 182 201 221 237 18 15 28 47 62 79  97 115 129 142 155 168 180 194 208 223 238 19  8 14 30 45 62  78  94 111 127 143 159 175 192 207 223 239 20 17 30 49 62 79  92 107 119 132 145 160 174 190 204 220 235 21 14 19 36 45 61  76  91 108 121 138 154 172 189 205 222 238 22 12 18 31 45 60  76  91 107 123 138 154 171 187 204 221 236 23 13 17 31 43 53  70  83 103 114 131 149 167 185 203 220 237 24 17 22 35 42 58  78  93 110 125 139 155 170 188 206 224 240 25  8 15 34 50 67  83  99 115 131 146 162 178 193 209 224 239 26 13 16 41 66 73  86  95 111 128 137 150 163 183 206 225 241 27 17 25 37 52 63  75  92 102 119 132 144 160 175 191 212 231 28 19 31 49 65 83 100 117 133 147 161 174 187 200 213 227 242 29 18 31 52 68 88 103 117 126 138 149 163 177 192 207 223 239 30 16 29 47 61 76  90 106 119 133 147 161 176 193 209 224 240 31 15 21 35 50 61  73  86  97 110 119 129 141 175 198 218 237 Given the stage-1 codebook entry cb1_Q8[], the stage-2 residual res_Q10[], and their corresponding weights, w_Q9[], the reconstructed normalized LSF coefficients are
where the division is integer division. However, nothing in either the reconstruction process or the quantization process in the encoder thus far guarantees that the coefficients are monotonically increasing and separated well enough to ensure a stable filter . When using the reference encoder, roughly 2% of frames violate this constraint. The next section describes a stabilization procedure used to make these guarantees.
The normalized LSF stabilization procedure is implemented in silk_NLSF_stabilize() (NLSF_stabilize.c). This process ensures that consecutive values of the normalized LSF coefficients, NLSF_Q15[], are spaced some minimum distance apart (predetermined to be the 0.01 percentile of a large training set). gives the minimum spacings for NB and MB and those for WB, where row k is the minimum allowed value of NLSF_Q[k]-NLSF_Q[k-1]. For the purposes of computing this spacing for the first and last coefficient, NLSF_Q15[-1] is taken to be 0, and NLSF_Q15[d_LPC] is taken to be 32768. Coefficient NB and MB WB 0 250 100 1 3 3 2 6 40 3 3 3 4 3 3 5 3 3 6 4 5 7 3 14 8 3 14 9 3 10 10 461 11 11 3 12 8 13 9 14 7 15 3 16 347 The procedure starts off by trying to make small adjustments which attempt to minimize the amount of distortion introduced. After 20 such adjustments, it falls back to a more direct method which guarantees the constraints are enforced but may require large adjustments. Let NDeltaMin_Q15[k] be the minimum required spacing for the current audio bandwidth from . First, the procedure finds the index i where NLSF_Q15[i] - NLSF_Q15[i-1] - NDeltaMin_Q15[i] is the smallest, breaking ties by using the lower value of i. If this value is non-negative, then the stabilization stops; the coefficients satisfy all the constraints. Otherwise, if i == 0, it sets NLSF_Q15[0] to NDeltaMin_Q15[0], and if i == d_LPC, it sets NLSF_Q15[d_LPC-1] to (32768 - NDeltaMin_Q15[d_LPC]). For all other values of i, both NLSF_Q15[i-1] and NLSF_Q15[i] are updated as follows:
>1) + \ NDeltaMin_Q15[k] /_ k=0 d_LPC __ max_center_Q15 = 32768 - (NDeltaMin_Q15[i]>>1) - \ NDeltaMin_Q15[k] /_ k=i+1 center_freq_Q15 = clamp(min_center_Q15[i], (NLSF_Q15[i-1] + NLSF_Q15[i] + 1)>>1, max_center_Q15[i]) NLSF_Q15[i-1] = center_freq_Q15 - (NDeltaMin_Q15[i]>>1) NLSF_Q15[i] = NLSF_Q15[i-1] + NDeltaMin_Q15[i] . ]]>
Then the procedure repeats again, until it has either executed 20 times or has stopped because the coefficients satisfy all the constraints.
After the 20th repetition of the above procedure, the following fallback procedure executes once. First, the values of NLSF_Q15[k] for 0 <= k < d_LPC are sorted in ascending order. Then for each value of k from 0 to d_LPC-1, NLSF_Q15[k] is set to
Next, for each value of k from d_LPC-1 down to 0, NLSF_Q15[k] is set to
For 20 ms SILK frames, the first half of the frame (i.e., the first two subframes) may use normalized LSF coefficients that are interpolated between the decoded LSFs for the most recent coded frame (in the same channel) and the current frame. A Q2 interpolation factor follows the LSF coefficient indices in the bitstream, which is decoded using the PDF in . This happens in silk_decode_indices() (decode_indices.c). After either An uncoded regular SILK frame in the side channel, or A decoder reset (see ), the decoder still decodes this factor, but ignores its value and always uses 4 instead. For 10 ms SILK frames, this factor is not stored at all. PDF {13, 22, 29, 11, 181}/256 Let n2_Q15[k] be the normalized LSF coefficients decoded by the procedure in , n0_Q15[k] be the LSF coefficients decoded for the prior frame, and w_Q2 be the interpolation factor. Then the normalized LSF coefficients used for the first half of a 20 ms frame, n1_Q15[k], are
> 2) . ]]>
This interpolation is performed in silk_decode_parameters() (decode_parameters.c).
Any LPC filter A(z) can be split into a symmetric part P(z) and an anti-symmetric part Q(z) such that
with
The even normalized LSF coefficients correspond to a pair of conjugate roots of P(z), while the odd coefficients correspond to a pair of conjugate roots of Q(z), all of which lie on the unit circle. In addition, P(z) has a root at pi and Q(z) has a root at 0. Thus, they may be reconstructed mathematically from a set of normalized LSF coefficients, n[k], as
However, SILK performs this reconstruction using a fixed-point approximation so that all decoders can reproduce it in a bit-exact manner to avoid prediction drift. The function silk_NLSF2A() (NLSF2A.c) implements this procedure. To start, it approximates cos(pi*n[k]) using a table lookup with linear interpolation. The encoder SHOULD use the inverse of this piecewise linear approximation, rather than the true inverse of the cosine function, when deriving the normalized LSF coefficients. These values are also re-ordered to improve numerical accuracy when constructing the LPC polynomials. Coefficient NB and MB WB 0 0 0 1 9 15 2 6 8 3 3 7 4 4 4 5 5 11 6 8 12 7 1 3 8 2 2 9 7 13 10 10 11 5 12 6 13 9 14 14 15 1 The top 7 bits of each normalized LSF coefficient index a value in the table, and the next 8 bits interpolate between it and the next value. Let i = (n[k] >> 8) be the integer index and f = (n[k] & 255) be the fractional part of a given coefficient. Then the re-ordered, approximated cosine, c_Q17[ordering[k]], is
> 3 , ]]>
where ordering[k] is the k'th entry of the column of corresponding to the current audio bandwidth and cos_Q12[i] is the i'th entry of .
i +0 +1 +2 +3 0 4096 4095 4091 4085 4 4076 4065 4052 4036 8 4017 3997 3973 3948 12 3920 3889 3857 3822 16 3784 3745 3703 3659 20 3613 3564 3513 3461 24 3406 3349 3290 3229 28 3166 3102 3035 2967 32 2896 2824 2751 2676 36 2599 2520 2440 2359 40 2276 2191 2106 2019 44 1931 1842 1751 1660 48 1568 1474 1380 1285 52 1189 1093 995 897 56 799 700 601 501 60 401 301 201 101 64 0 -101 -201 -301 68 -401 -501 -601 -700 72 -799 -897 -995 -1093 76 -1189-1285-1380-1474 80 -1568-1660-1751-1842 84 -1931-2019-2106-2191 88 -2276-2359-2440-2520 92 -2599-2676-2751-2824 96 -2896-2967-3035-3102 100 -3166-3229-3290-3349 104 -3406-3461-3513-3564 108 -3613-3659-3703-3745 112 -3784-3822-3857-3889 116 -3920-3948-3973-3997 120 -4017-4036-4052-4065 124 -4076-4085-4091-4095 128 -4096 Given the list of cosine values, silk_NLSF2A_find_poly() (NLSF2A.c) computes the coefficients of P and Q, described here via a simple recurrence. Let p_Q16[k][j] and q_Q16[k][j] be the coefficients of the products of the first (k+1) root pairs for P and Q, with j indexing the coefficient number. Only the first (k+2) coefficients are needed, as the products are symmetric. Let p_Q16[0][0] = q_Q16[0][0] = 1<<16, p_Q16[0][1] = -c_Q17[0], q_Q16[0][1] = -c_Q17[1], and d2 = d_LPC/2. As boundary conditions, assume p_Q16[k][j] = q_Q16[k][j] = 0 for all j < 0. Also, assume p_Q16[k][k+2] = p_Q16[k][k] and q_Q16[k][k+2] = q_Q16[k][k] (because of the symmetry). Then, for 0 < k < d2 and 0 <= j <= k+1,
>16) , q_Q16[k][j] = q_Q16[k-1][j] + q_Q16[k-1][j-2] - ((c_Q17[2*k+1]*q_Q16[k-1][j-1] + 32768)>>16) . ]]>
The use of Q17 values for the cosine terms in an otherwise Q16 expression implicitly scales them by a factor of 2. The multiplications in this recurrence may require up to 48 bits of precision in the result to avoid overflow. In practice, each row of the recurrence only depends on the previous row, so an implementation does not need to store all of them.
silk_NLSF2A() uses the values from the last row of this recurrence to reconstruct a 32-bit version of the LPC filter (without the leading 1.0 coefficient), a32_Q17[k], 0 <= k < d2:
The sum and difference of two terms from each of the p_Q16 and q_Q16 coefficient lists reflect the (1 + z**-1) and (1 - z**-1) factors of P and Q, respectively. The promotion of the expression from Q16 to Q17 implicitly scales the result by 1/2.
The a32_Q17[] coefficients are too large to fit in a 16-bit value, which significantly increases the cost of applying this filter in fixed-point decoders. Reducing them to Q12 precision doesn't incur any significant quality loss, but still does not guarantee they will fit. silk_NLSF2A() applies up to 10 rounds of bandwidth expansion to limit the dynamic range of these coefficients. Even floating-point decoders SHOULD perform these steps, to avoid mismatch. For each round, the process first finds the index k such that abs(a32_Q17[k]) is largest, breaking ties by choosing the lowest value of k. Then, it computes the corresponding Q12 precision value, maxabs_Q12, subject to an upper bound to avoid overflow in subsequent computations:
> 5, 163838) . ]]>
If this is larger than 32767, the procedure derives the chirp factor, sc_Q16[0], to use in the bandwidth expansion as
> 2 ]]>
where the division here is integer division. This is an approximation of the chirp factor needed to reduce the target coefficient to 32767, though it is both less than 0.999 and, for k > 0 when maxabs_Q12 is much greater than 32767, still slightly too large. The upper bound on maxabs_Q12, 163838, was chosen because it is equal to ((2**31 - 1) >> 14) + 32767, i.e., the largest value of maxabs_Q12 that would not overflow the numerator in the equation above when stored in a signed 32-bit integer.
silk_bwexpander_32() (bwexpander_32.c) performs the bandwidth expansion (again, only when maxabs_Q12 is greater than 32767) using the following recurrence:
> 16 sc_Q16[k+1] = (sc_Q16[0]*sc_Q16[k] + 32768) >> 16 ]]>
The first multiply may require up to 48 bits of precision in the result to avoid overflow. The second multiply must be unsigned to avoid overflow with only 32 bits of precision. The reference implementation uses a slightly more complex formulation that avoids the 32-bit overflow using signed multiplication, but is otherwise equivalent.
After 10 rounds of bandwidth expansion are performed, they are simply saturated to 16 bits:
> 5, 32767) << 5 . ]]>
Because this performs the actual saturation in the Q12 domain, but converts the coefficients back to the Q17 domain for the purposes of prediction gain limiting, this step must be performed after the 10th round of bandwidth expansion, regardless of whether or not the Q12 version of any coefficient still overflows a 16-bit integer. This saturation is not performed if maxabs_Q12 drops to 32767 or less prior to the 10th round.
The prediction gain of an LPC synthesis filter is the square-root of the output energy when the filter is excited by a unit-energy impulse. Even if the Q12 coefficients would fit, the resulting filter may still have a significant gain (especially for voiced sounds), making the filter unstable. silk_NLSF2A() applies up to 18 additional rounds of bandwidth expansion to limit the prediction gain. Instead of controlling the amount of bandwidth expansion using the prediction gain itself (which may diverge to infinity for an unstable filter), silk_NLSF2A() uses silk_LPC_inverse_pred_gain_QA() (LPC_inv_pred_gain.c) to compute the reflection coefficients associated with the filter. The filter is stable if and only if the magnitude of these coefficients is sufficiently less than one. The reflection coefficients, rc[k], can be computed using a simple Levinson recurrence, initialized with the LPC coefficients a[d_LPC-1][n] = a[n], and then updated via
However, silk_LPC_inverse_pred_gain_QA() approximates this using fixed-point arithmetic to guarantee reproducible results across platforms and implementations. Since small changes in the coefficients can make a stable filter unstable, it takes the real Q12 coefficients that will be used during reconstruction as input. Thus, let
> 5 ]]>
be the Q12 version of the LPC coefficients that will eventually be used. As a simple initial check, the decoder computes the DC response as
and if DC_resp > 4096, the filter is unstable.
Increasing the precision of these Q12 coefficients to Q24 for intermediate computations allows more accurate computation of the reflection coefficients, so the decoder initializes the recurrence via
Then for each k from d_LPC-1 down to 0, if abs(a32_Q24[k][k]) > 16773022, the filter is unstable and the recurrence stops. The constant 16773022 here is approximately 0.99975 in Q24. Otherwise, row k-1 of a32_Q24 is computed from row k as
> 32) , b1[k] = ilog(div_Q30[k]) , b2[k] = b1[k] - 16 , (1<<29) - 1 inv_Qb2[k] = ----------------------- , div_Q30[k] >> (b2[k]+1) err_Q29[k] = (1<<29) - ((div_Q30[k]<<(15-b2[k]))*inv_Qb2[k] >> 16) , gain_Qb1[k] = ((inv_Qb2[k] << 16) + (err_Q29[k]*inv_Qb2[k] >> 13)) , num_Q24[k-1][n] = a32_Q24[k][n] - ((a32_Q24[k][k-n-1]*rc_Q31[k] + (1<<30)) >> 31) , a32_Q24[k-1][n] = (num_Q24[k-1][n]*gain_Qb1[k] + (1<<(b1[k]-1))) >> b1[k] , ]]>
where 0 <= n < k. Here, rc_Q30[k] are the reflection coefficients. div_Q30[k] is the denominator for each iteration, and gain_Qb1[k] is its multiplicative inverse (with b1[k] fractional bits, where b1[k] ranges from 20 to 31). inv_Qb2[k], which ranges from 16384 to 32767, is a low-precision version of that inverse (with b2[k] fractional bits). err_Q29[k] is the residual error, ranging from -32763 to 32392, which is used to improve the accuracy. The values t_Q24[k-1][n] for each n are the numerators for the next row of coefficients in the recursion, and a32_Q24[k-1][n] is the final version of that row. Every multiply in this procedure except the one used to compute gain_Qb1[k] requires more than 32 bits of precision, but otherwise all intermediate results fit in 32 bits or less. In practice, because each row only depends on the next one, an implementation does not need to store them all.
If abs(a32_Q24[k][k]) <= 16773022 for 0 <= k < d_LPC, then the filter is considered stable. However, the problem of determining stability is ill-conditioned when the filter contains several reflection coefficients whose magnitude is very close to one. This fixed-point algorithm is not mathematically guaranteed to correctly classify filters as stable or unstable in this case, though it does very well in practice. On round i, 1 <= i <= 18, if the filter passes these stability checks, then this procedure stops, and the final LPC coefficients to use for reconstruction in are
> 5 . ]]>
Otherwise, a round of bandwidth expansion is applied using the same procedure as in , with
During the 15th round, sc_Q16[0] becomes 0 in the above equation, so a_Q12[k] is set to 0 for all k, guaranteeing a stable filter.
After the normalized LSF indices and, for 20 ms frames, the LSF interpolation index, voiced frames (see ) include additional LTP parameters. There is one primary lag index for each SILK frame, but this is refined to produce a separate lag index per subframe using a vector quantizer. Each subframe also gets its own prediction gain coefficient.
The primary lag index is coded either relative to the primary lag of the prior frame in the same channel, or as an absolute index. Absolute coding is used if and only if This is the first SILK frame of its type (LBRR or regular) for this channel in the current Opus frame, The previous SILK frame of the same type (LBRR or regular) for this channel in the same Opus frame was not coded, or That previous SILK frame was coded, but was not voiced (see ). With absolute coding, the primary pitch lag may range from 2 ms (inclusive) up to 18 ms (exclusive), corresponding to pitches from 500 Hz down to 55.6 Hz, respectively. It is comprised of a high part and a low part, where the decoder reads the high part using the 32-entry codebook in and the low part using the codebook corresponding to the current audio bandwidth from . The final primary pitch lag is then
where lag_high is the high part, lag_low is the low part, and lag_scale and lag_min are the values from the "Scale" and "Minimum Lag" columns of , respectively.
PDF {3, 3, 6, 11, 21, 30, 32, 19, 11, 10, 12, 13, 13, 12, 11, 9, 8, 7, 6, 4, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1}/256 Audio Bandwidth PDF Scale Minimum Lag Maximum Lag NB {64, 64, 64, 64}/256 4 16 144 MB {43, 42, 43, 43, 42, 43}/256 6 24 216 WB {32, 32, 32, 32, 32, 32, 32, 32}/256 8 32 288 All frames that do not use absolute coding for the primary lag index use relative coding instead. The decoder reads a single delta value using the 21-entry PDF in . If the resulting value is zero, it falls back to the absolute coding procedure from the prior paragraph. Otherwise, the final primary pitch lag is then
where previous_lag is the primary pitch lag from the most recent frame in the same channel and delta_lag_index is the value just decoded. This allows a per-frame change in the pitch lag of -8 to +11 samples. The decoder does no clamping at this point, so this value can fall outside the range of 2 ms to 18 ms, and the decoder must use this unclamped value when using relative coding in the next SILK frame (if any). However, because an Opus frame can use relative coding for at most two consecutive SILK frames, integer overflow should not be an issue.
PDF {46, 2, 2, 3, 4, 6, 10, 15, 26, 38, 30, 22, 15, 10, 7, 6, 4, 4, 2, 2, 2}/256 After the primary pitch lag, a "pitch contour", stored as a single entry from one of four small VQ codebooks, gives lag offsets for each subframe in the current SILK frame. The codebook index is decoded using one of the PDFs in depending on the current frame size and audio bandwidth. Tables  through  give the corresponding offsets to apply to the primary pitch lag for each subframe given the decoded codebook index. Audio Bandwidth SILK Frame Size Codebook Size PDF NB 10 ms 3 {143, 50, 63}/256 NB 20 ms 11 {68, 12, 21, 17, 19, 22, 30, 24, 17, 16, 10}/256 MB or WB 10 ms 12 {91, 46, 39, 19, 14, 12, 8, 7, 6, 5, 5, 4}/256 MB or WB 20 ms 34 {33, 22, 18, 16, 15, 14, 14, 13, 13, 10, 9, 9, 8, 6, 6, 6, 5, 4, 4, 4, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1}/256 Index Subframe Offsets 0  0  0 1  1  0 2  0  1 Index Subframe Offsets 0  0  0  0  0 1  2  1  0 -1 2 -1  0  1  2 3 -1  0  0  1 4 -1  0  0  0 5  0  0  0  1 6  0  0  1  1 7  1  1  0  0 8  1  0  0  0 9  0  0  0 -1 10  1  0  0 -1 Index Subframe Offsets 0  0  0 1  0  1 2  1  0 3 -1  1 4  1 -1 5 -1  2 6  2 -1 7 -2  2 8  2 -2 9 -2  3 10  3 -2 11 -3  3 Index Subframe Offsets 0  0  0  0  0 1  0  0  1  1 2  1  1  0  0 3 -1  0  0  0 4  0  0  0  1 5  1  0  0  0 6 -1  0  0  1 7  0  0  0 -1 8 -1  0  1  2 9  1  0  0 -1 10 -2 -1  1  2 11  2  1  0 -1 12 -2  0  0  2 13 -2  0  1  3 14  2  1 -1 -2 15 -3 -1  1  3 16  2  0  0 -2 17  3  1  0 -2 18 -3 -1  2  4 19 -4 -1  1  4 20  3  1 -1 -3 21 -4 -1  2  5 22  4  2 -1 -3 23  4  1 -1 -4 24 -5 -1  2  6 25  5  2 -1 -4 26 -6 -2  2  6 27 -5 -2  2  5 28  6  2 -1 -5 29 -7 -2  3  8 30  6  2 -2 -6 31  5  2 -2 -5 32  8  3 -2 -7 33 -9 -3  3  9 The final pitch lag for each subframe is assembled in silk_decode_pitch() (decode_pitch.c). Let lag be the primary pitch lag for the current SILK frame, contour_index be index of the VQ codebook, and lag_cb[contour_index][k] be the corresponding entry of the codebook from the appropriate table given above for the k'th subframe. Then the final pitch lag for that subframe is
where lag_min and lag_max are the values from the "Minimum Lag" and "Maximum Lag" columns of , respectively.
SILK uses a separate 5-tap pitch filter for each subframe, selected from one of three codebooks. The three codebooks each represent different rate-distortion trade-offs, with average rates of 1.61 bits/subframe, 3.68 bits/subframe, and 4.85 bits/subframe, respectively. The importance of the filter coefficients generally depends on two factors: the periodicity of the signal and relative energy between the current subframe and the signal from one period earlier. Greater periodicity and decaying energy both lead to more important filter coefficients, and thus should be coded with lower distortion and higher rate. These properties are relatively stable over the duration of a single SILK frame, hence all of the subframes in a SILK frame choose their filter from the same codebook. This is signaled with an explicitly-coded "periodicity index". This immediately follows the subframe pitch lags, and is coded using the 3-entry PDF from . PDF {77, 80, 99}/256 The indices of the filters for each subframe follow. They are all coded using the PDF from corresponding to the periodicity index. Tables  through  contain the corresponding filter taps as signed Q7 integers. Periodicity Index Codebook Size PDF 0 8 {185, 15, 13, 13, 9, 9, 6, 6}/256 1 16 {57, 34, 21, 20, 15, 13, 12, 13, 10, 10, 9, 10, 9, 8, 7, 8}/256 2 32 {15, 16, 14, 12, 12, 12, 11, 11, 11, 10, 9, 9, 9, 9, 8, 8, 8, 8, 7, 7, 6, 6, 5, 4, 5, 4, 4, 4, 3, 4, 3, 2}/256 Index Filter Taps (Q7) 0   4   6  24   7   5 1   0   0   2   0   0 2  12  28  41  13  -4 3  -9  15  42  25  14 4   1  -2  62  41  -9 5 -10  37  65  -4   3 6  -6   4  66   7  -8 7  16  14  38  -3  33 Index Filter Taps (Q7) 0  13  22  39  23  12 1  -1  36  64  27  -6 2  -7  10  55  43  17 3   1   1   8   1   1 4   6 -11  74  53  -9 5 -12  55  76 -12   8 6  -3   3  93  27  -4 7  26  39  59   3  -8 8   2   0  77  11   9 9  -8  22  44  -6   7 10  40   9  26   3   9 11  -7  20 101  -7   4 12   3  -8  42  26   0 13 -15  33  68   2  23 14  -2  55  46  -2  15 15   3  -1  21  16  41 Index Filter Taps (Q7) 0  -6  27  61  39   5 1 -11  42  88   4   1 2  -2  60  65   6  -4 3  -1  -5  73  56   1 4  -9  19  94  29  -9 5   0  12  99   6   4 6   8 -19 102  46 -13 7   3   2  13   3   2 8   9 -21  84  72 -18 9 -11  46 104 -22   8 10  18  38  48  23   0 11 -16  70  83 -21  11 12   5 -11 117  22  -8 13  -6  23 117 -12   3 14   3  -8  95  28   4 15 -10  15  77  60 -15 16  -1   4 124   2  -4 17   3  38  84  24 -25 18   2  13  42  13  31 19  21  -4  56  46  -1 20  -1  35  79 -13  19 21  -7  65  88  -9 -14 22  20   4  81  49 -29 23  20   0  75   3 -17 24   5  -9  44  92  -8 25   1  -3  22  69  31 26  -6  95  41 -12   5 27  39  67  16  -4   1 28   0  -6 120  55 -36 29 -13  44 122   4 -24 30  81   5  11   3   7 31   2   0   9  10  88
An LTP scaling parameter appears after the LTP filter coefficients if and only if This is a voiced frame (see ), and Either This SILK frame corresponds to the first time interval of the current Opus frame for its type (LBRR or regular), or This is an LBRR frame where the LBRR flags (see ) indicate the previous LBRR frame in the same channel is not coded. This allows the encoder to trade off the prediction gain between packets against the recovery time after packet loss. Unlike absolute-coding for pitch lags, regular SILK frames that are not at the start of an Opus frame (i.e., that do not correspond to the first 20 ms time interval in Opus frames of 40 or 60 ms) do not include this field, even if the prior frame was not voiced, or (in the case of the side channel) not even coded. After an uncoded frame in the side channel, the LTP buffer (see ) is cleared to zero, and is thus in a known state. In contrast, LBRR frames do include this field when the prior frame was not coded, since the LTP buffer contains the output of the PLC, which is non-normative. If present, the decoder reads a value using the 3-entry PDF in . The three possible values represent Q14 scale factors of 15565, 12288, and 8192, respectively (corresponding to approximately 0.95, 0.75, and 0.5). Frames that do not code the scaling parameter use the default factor of 15565 (approximately 0.95). PDF {128, 64, 64}/256
As described in , SILK uses a linear congruential generator (LCG) to inject pseudorandom noise into the quantized excitation. To ensure synchronization of this process between the encoder and decoder, each SILK frame stores a 2-bit seed after the LTP parameters (if any). The encoder may consider the choice of seed during quantization, and the flexibility of this choice lets it reduce distortion, helping to pay for the bit cost required to signal it. The decoder reads the seed using the uniform 4-entry PDF in , yielding a value between 0 and 3, inclusive. PDF {64, 64, 64, 64}/256
SILK codes the excitation using a modified version of the Pyramid Vector Quantization (PVQ) codebook . The PVQ codebook is designed for Laplace-distributed values and consists of all sums of K signed, unit pulses in a vector of dimension N, where two pulses at the same position are required to have the same sign. Thus the codebook includes all integer codevectors y of dimension N that satisfy
Unlike regular PVQ, SILK uses a variable-length, rather than fixed-length, encoding. This encoding is better suited to the more Gaussian-like distribution of the coefficient magnitudes and the non-uniform distribution of their signs (caused by the quantization offset described below). SILK also handles large codebooks by coding the least significant bits (LSBs) of each coefficient directly. This adds a small coding efficiency loss, but greatly reduces the computation time and ROM size required for decoding, as implemented in silk_decode_pulses() (decode_pulses.c).
SILK fixes the dimension of the codebook to N = 16. The excitation is made up of a number of "shell blocks", each 16 samples in size. lists the number of shell blocks required for a SILK frame for each possible audio bandwidth and frame size. 10 ms MB frames nominally contain 120 samples (10 ms at 12 kHz), which is not a multiple of 16. This is handled by coding 8 shell blocks (128 samples) and discarding the final 8 samples of the last block. The decoder contains no special case that prevents an encoder from placing pulses in these samples, and they must be correctly parsed from the bitstream if present, but they are otherwise ignored. Audio Bandwidth Frame Size Number of Shell Blocks NB 10 ms 5 MB 10 ms 8 WB 10 ms 10 NB 20 ms 10 MB 20 ms 15 WB 20 ms 20
The first symbol in the excitation is a "rate level", which is an index from 0 to 8, inclusive, coded using the PDF in corresponding to the signal type of the current frame (from ). The rate level selects the PDF used to decode the number of pulses in the individual shell blocks. It does not directly convey any information about the bitrate or the number of pulses itself, but merely changes the probability of the symbols in . Level 0 provides a more efficient encoding at low rates generally, and level 8 provides a more efficient encoding at high rates generally, though the most efficient level for a particular SILK frame may depend on the exact distribution of the coded symbols. An encoder should, but is not required to, use the most efficient rate level. Signal Type PDF Inactive or Unvoiced {15, 51, 12, 46, 45, 13, 33, 27, 14}/256 Voiced {33, 30, 36, 17, 34, 49, 18, 21, 18}/256
The total number of pulses in each of the shell blocks follows the rate level. The pulse counts for all of the shell blocks are coded consecutively, before the content of any of the blocks. Each block may have anywhere from 0 to 16 pulses, inclusive, coded using the 18-entry PDF in corresponding to the rate level from . The special value 17 indicates that this block has one or more additional LSBs to decode for each coefficient. If the decoder encounters this value, it decodes another value for the actual pulse count of the block, but uses the PDF corresponding to the special rate level 9 instead of the normal rate level. This process repeats until the decoder reads a value less than 17, and it then sets the number of extra LSBs used to the number of 17's decoded for that block. If it reads the value 17 ten times, then the next iteration uses the special rate level 10 instead of 9. The probability of decoding a 17 when using the PDF for rate level 10 is zero, ensuring that the number of LSBs for a block will not exceed 10. The cumulative distribution for rate level 10 is just a shifted version of that for 9 and thus does not require any additional storage. Rate Level PDF 0 {131, 74, 25, 8, 3, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}/256 1 {58, 93, 60, 23, 7, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}/256 2 {43, 51, 46, 33, 24, 16, 11, 8, 6, 3, 3, 3, 2, 1, 1, 2, 1, 2}/256 3 {17, 52, 71, 57, 31, 12, 5, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}/256 4 {6, 21, 41, 53, 49, 35, 21, 11, 6, 3, 2, 2, 1, 1, 1, 1, 1, 1}/256 5 {7, 14, 22, 28, 29, 28, 25, 20, 17, 13, 11, 9, 7, 5, 4, 4, 3, 10}/256 6 {2, 5, 14, 29, 42, 46, 41, 31, 19, 11, 6, 3, 2, 1, 1, 1, 1, 1}/256 7 {1, 2, 4, 10, 19, 29, 35, 37, 34, 28, 20, 14, 8, 5, 4, 2, 2, 2}/256 8 {1, 2, 2, 5, 9, 14, 20, 24, 27, 28, 26, 23, 20, 15, 11, 8, 6, 15}/256 9 {1, 1, 1, 6, 27, 58, 56, 39, 25, 14, 10, 6, 3, 3, 2, 1, 1, 2}/256 10 {2, 1, 6, 27, 58, 56, 39, 25, 14, 10, 6, 3, 3, 2, 1, 1, 2, 0}/256
The locations of the pulses in each shell block follow the pulse counts, as decoded by silk_shell_decoder() (shell_coder.c). As with the pulse counts, these locations are coded for all the shell blocks before any of the remaining information for each block. Unlike many other codecs, SILK places no restriction on the distribution of pulses within a shell block. All of the pulses may be placed in a single location, or each one in a unique location, or anything in between. The location of pulses is coded by recursively partitioning each block into halves, and coding how many pulses fall on the left side of the split. All remaining pulses must fall on the right side of the split. The process then recurses into the left half, and after that returns, the right half (preorder traversal). The PDF to use is chosen by the size of the current partition (16, 8, 4, or 2) and the number of pulses in the partition (1 to 16, inclusive). Tables  through  list the PDFs used for each partition size and pulse count. This process skips partitions without any pulses, i.e., where the initial pulse count from was zero, or where the split in the prior level indicated that all of the pulses fell on the other side. These partitions have nothing to code, so they require no PDF. Pulse Count PDF 1 {126, 130}/256 2 {56, 142, 58}/256 3 {25, 101, 104, 26}/256 4 {12, 60, 108, 64, 12}/256 5 {7, 35, 84, 87, 37, 6}/256 6 {4, 20, 59, 86, 63, 21, 3}/256 7 {3, 12, 38, 72, 75, 42, 12, 2}/256 8 {2, 8, 25, 54, 73, 59, 27, 7, 1}/256 9 {2, 5, 17, 39, 63, 65, 42, 18, 4, 1}/256 10 {1, 4, 12, 28, 49, 63, 54, 30, 11, 3, 1}/256 11 {1, 4, 8, 20, 37, 55, 57, 41, 22, 8, 2, 1}/256 12 {1, 3, 7, 15, 28, 44, 53, 48, 33, 16, 6, 1, 1}/256 13 {1, 2, 6, 12, 21, 35, 47, 48, 40, 25, 12, 5, 1, 1}/256 14 {1, 1, 4, 10, 17, 27, 37, 47, 43, 33, 21, 9, 4, 1, 1}/256 15 {1, 1, 1, 8, 14, 22, 33, 40, 43, 38, 28, 16, 8, 1, 1, 1}/256 16 {1, 1, 1, 1, 13, 18, 27, 36, 41, 41, 34, 24, 14, 1, 1, 1, 1}/256 Pulse Count PDF 1 {127, 129}/256 2 {53, 149, 54}/256 3 {22, 105, 106, 23}/256 4 {11, 61, 111, 63, 10}/256 5 {6, 35, 86, 88, 36, 5}/256 6 {4, 20, 59, 87, 62, 21, 3}/256 7 {3, 13, 40, 71, 73, 41, 13, 2}/256 8 {3, 9, 27, 53, 70, 56, 28, 9, 1}/256 9 {3, 8, 19, 37, 57, 61, 44, 20, 6, 1}/256 10 {3, 7, 15, 28, 44, 54, 49, 33, 17, 5, 1}/256 11 {1, 7, 13, 22, 34, 46, 48, 38, 28, 14, 4, 1}/256 12 {1, 1, 11, 22, 27, 35, 42, 47, 33, 25, 10, 1, 1}/256 13 {1, 1, 6, 14, 26, 37, 43, 43, 37, 26, 14, 6, 1, 1}/256 14 {1, 1, 4, 10, 20, 31, 40, 42, 40, 31, 20, 10, 4, 1, 1}/256 15 {1, 1, 3, 8, 16, 26, 35, 38, 38, 35, 26, 16, 8, 3, 1, 1}/256 16 {1, 1, 2, 6, 12, 21, 30, 36, 38, 36, 30, 21, 12, 6, 2, 1, 1}/256 Pulse Count PDF 1 {127, 129}/256 2 {49, 157, 50}/256 3 {20, 107, 109, 20}/256 4 {11, 60, 113, 62, 10}/256 5 {7, 36, 84, 87, 36, 6}/256 6 {6, 24, 57, 82, 60, 23, 4}/256 7 {5, 18, 39, 64, 68, 42, 16, 4}/256 8 {6, 14, 29, 47, 61, 52, 30, 14, 3}/256 9 {1, 15, 23, 35, 51, 50, 40, 30, 10, 1}/256 10 {1, 1, 21, 32, 42, 52, 46, 41, 18, 1, 1}/256 11 {1, 6, 16, 27, 36, 42, 42, 36, 27, 16, 6, 1}/256 12 {1, 5, 12, 21, 31, 38, 40, 38, 31, 21, 12, 5, 1}/256 13 {1, 3, 9, 17, 26, 34, 38, 38, 34, 26, 17, 9, 3, 1}/256 14 {1, 3, 7, 14, 22, 29, 34, 36, 34, 29, 22, 14, 7, 3, 1}/256 15 {1, 2, 5, 11, 18, 25, 31, 35, 35, 31, 25, 18, 11, 5, 2, 1}/256 16 {1, 1, 4, 9, 15, 21, 28, 32, 34, 32, 28, 21, 15, 9, 4, 1, 1}/256 Pulse Count PDF 1 {128, 128}/256 2 {42, 172, 42}/256 3 {21, 107, 107, 21}/256 4 {12, 60, 112, 61, 11}/256 5 {8, 34, 86, 86, 35, 7}/256 6 {8, 23, 55, 90, 55, 20, 5}/256 7 {5, 15, 38, 72, 72, 36, 15, 3}/256 8 {6, 12, 27, 52, 77, 47, 20, 10, 5}/256 9 {6, 19, 28, 35, 40, 40, 35, 28, 19, 6}/256 10 {4, 14, 22, 31, 37, 40, 37, 31, 22, 14, 4}/256 11 {3, 10, 18, 26, 33, 38, 38, 33, 26, 18, 10, 3}/256 12 {2, 8, 13, 21, 29, 36, 38, 36, 29, 21, 13, 8, 2}/256 13 {1, 5, 10, 17, 25, 32, 38, 38, 32, 25, 17, 10, 5, 1}/256 14 {1, 4, 7, 13, 21, 29, 35, 36, 35, 29, 21, 13, 7, 4, 1}/256 15 {1, 2, 5, 10, 17, 25, 32, 36, 36, 32, 25, 17, 10, 5, 2, 1}/256 16 {1, 2, 4, 7, 13, 21, 28, 34, 36, 34, 28, 21, 13, 7, 4, 2, 1}/256
After the decoder reads the pulse locations for all blocks, it reads the LSBs (if any) for each block in turn. Inside each block, it reads all the LSBs for each coefficient in turn, even those where no pulses were allocated, before proceeding to the next one. For 10 ms MB frames, it reads LSBs even for the extra 8 samples in the last block. The LSBs are coded from most significant to least significant, and they all use the PDF in . PDF {136, 120}/256 The number of LSBs read for each coefficient in a block is determined in . The magnitude of the coefficient is initially equal to the number of pulses placed at that location in . As each LSB is decoded, the magnitude is doubled, and then the value of the LSB added to it, to obtain an updated magnitude.
After decoding the pulse locations and the LSBs, the decoder knows the magnitude of each coefficient in the excitation. It then decodes a sign for all coefficients with a non-zero magnitude, using one of the PDFs from . If the value decoded is 0, then the coefficient magnitude is negated. Otherwise, it remains positive. The decoder chooses the PDF for the sign based on the signal type and quantization offset type (from ) and the number of pulses in the block (from ). The number of pulses in the block does not take into account any LSBs. Most PDFs are skewed towards negative signs because of the quantization offset, but the PDFs for zero pulses are highly skewed towards positive signs. If a block contains many positive coefficients, it is sometimes beneficial to code it solely using LSBs (i.e., with zero pulses), since the encoder may be able to save enough bits on the signs to justify the less efficient coefficient magnitude encoding. Signal Type Quantization Offset Type Pulse Count PDF Inactive Low 0 {2, 254}/256 Inactive Low 1 {207, 49}/256 Inactive Low 2 {189, 67}/256 Inactive Low 3 {179, 77}/256 Inactive Low 4 {174, 82}/256 Inactive Low 5 {163, 93}/256 Inactive Low 6 or more {157, 99}/256 Inactive High 0 {58, 198}/256 Inactive High 1 {245, 11}/256 Inactive High 2 {238, 18}/256 Inactive High 3 {232, 24}/256 Inactive High 4 {225, 31}/256 Inactive High 5 {220, 36}/256 Inactive High 6 or more {211, 45}/256 Unvoiced Low 0 {1, 255}/256 Unvoiced Low 1 {210, 46}/256 Unvoiced Low 2 {190, 66}/256 Unvoiced Low 3 {178, 78}/256 Unvoiced Low 4 {169, 87}/256 Unvoiced Low 5 {162, 94}/256 Unvoiced Low 6 or more {152, 104}/256 Unvoiced High 0 {48, 208}/256 Unvoiced High 1 {242, 14}/256 Unvoiced High 2 {235, 21}/256 Unvoiced High 3 {224, 32}/256 Unvoiced High 4 {214, 42}/256 Unvoiced High 5 {205, 51}/256 Unvoiced High 6 or more {190, 66}/256 Voiced Low 0 {1, 255}/256 Voiced Low 1 {162, 94}/256 Voiced Low 2 {152, 104}/256 Voiced Low 3 {147, 109}/256 Voiced Low 4 {144, 112}/256 Voiced Low 5 {141, 115}/256 Voiced Low 6 or more {138, 118}/256 Voiced High 0 {8, 248}/256 Voiced High 1 {203, 53}/256 Voiced High 2 {187, 69}/256 Voiced High 3 {176, 80}/256 Voiced High 4 {168, 88}/256 Voiced High 5 {161, 95}/256 Voiced High 6 or more {154, 102}/256
After the signs have been read, there is enough information to reconstruct the complete excitation signal. This requires adding a constant quantization offset to each non-zero sample, and then pseudorandomly inverting and offsetting every sample. The constant quantization offset varies depending on the signal type and quantization offset type (see ). Signal Type Quantization Offset Type Quantization Offset (Q23) Inactive Low 25 Inactive High 60 Unvoiced Low 25 Unvoiced High 60 Voiced Low 8 Voiced High 25 Let e_raw[i] be the raw excitation value at position i, with a magnitude composed of the pulses at that location (see ) combined with any additional LSBs (see ), and with the corresponding sign decoded in . Additionally, let seed be the current pseudorandom seed, which is initialized to the value decoded from for the first sample in the current SILK frame, and updated for each subsequent sample according to the procedure below. Finally, let offset_Q23 be the quantization offset from . Then the following procedure produces the final reconstructed excitation value, e_Q23[i]:
When e_raw[i] is zero, sign() returns 0 by the definition in , so the factor of 20 does not get added. The final e_Q23[i] value may require more than 16 bits per sample, but will not require more than 23, including the sign.
The remainder of the reconstruction process for the frame does not need to be bit-exact, as small errors should only introduce proportionally small distortions. Although the reference implementation only includes a fixed-point version of the remaining steps, this section describes them in terms of a floating-point version for simplicity. This produces a signal with a nominal range of -1.0 to 1.0. silk_decode_core() (decode_core.c) contains the code for the main reconstruction process. It proceeds subframe-by-subframe, since quantization gains, LTP parameters, and (in 20 ms SILK frames) LPC coefficients can vary from one to the next. Let a_Q12[k] be the LPC coefficients for the current subframe. If this is the first or second subframe of a 20 ms SILK frame and the LSF interpolation factor, w_Q2 (see ), is less than 4, then these correspond to the final LPC coefficients produced by from the interpolated LSF coefficients, n1_Q15[k] (computed in ). Otherwise, they correspond to the final LPC coefficients produced from the uninterpolated LSF coefficients for the current frame, n2_Q15[k]. Also, let n be the number of samples in a subframe (40 for NB, 60 for MB, and 80 for WB), s be the index of the current subframe in this SILK frame (0 or 1 for 10 ms frames, or 0 to 3 for 20 ms frames), and j be the index of the first sample in the residual corresponding to the current subframe.
Voiced SILK frames (see ) pass the excitation through an LTP filter using the parameters decoded in to produce an LPC residual. The LTP filter requires LPC residual values from before the current subframe as input. However, since the LPC coefficients may have changed, it obtains this residual by "rewhitening" the corresponding output signal using the LPC coefficients from the current subframe. Let out[i] for (j - pitch_lags[s] - d_LPC - 2) <= i < j be the fully reconstructed output signal from the last (pitch_lags[s] + d_LPC + 2) samples of previous subframes (see ), where pitch_lags[s] is the pitch lag for the current subframe from . During reconstruction of the first subframe for this channel after either An uncoded regular SILK frame (if this is the side channel), or A decoder reset (see ), out[] is rewhitened into an LPC residual, res[i], via
This requires storage to buffer up to 306 values of out[i] from previous subframes. This corresponds to WB with a maximum pitch lag of 18 ms * 16 kHz samples, plus 16 samples for d_LPC, plus 2 samples for the width of the LTP filter.
Let e_Q23[i] for j <= i < (j + n) be the excitation for the current subframe, and b_Q7[k] for 0 <= k < 5 be the coefficients of the LTP filter taken from the codebook entry in one of Tables  through  corresponding to the index decoded for the current subframe in . Then for i such that j <= i < (j + n), the LPC residual is
For unvoiced frames, the LPC residual for j <= i < (j + n) is simply a normalized copy of the excitation signal, i.e.,
LPC synthesis uses the short-term LPC filter to predict the next output coefficient. For i such that (j - d_LPC) <= i < j, let lpc[i] be the result of LPC synthesis from the last d_LPC samples of the previous subframe, or zeros in the first subframe for this channel after either An uncoded regular SILK frame (if this is the side channel), or A decoder reset (see ). Then for i such that j <= i < (j + n), the result of LPC synthesis for the current subframe is
The decoder saves the final d_LPC values, i.e., lpc[i] such that (j + n - d_LPC) <= i < (j + n), to feed into the LPC synthesis of the next subframe. This requires storage for up to 16 values of lpc[i] (for WB frames).
Then, the signal is clamped into the final nominal range:
This clamping occurs entirely after the LPC synthesis filter has run. The decoder saves the unclamped values, lpc[i], to feed into the LPC filter for the next subframe, but saves the clamped values, out[i], for rewhitening in voiced frames.
For stereo streams, after decoding a frame from each channel, the decoder must convert the mid-side (MS) representation into a left-right (LR) representation. The function silk_stereo_MS_to_LR (stereo_MS_to_LR.c) implements this process. In it, the decoder predicts the side channel using a) a simple low-passed version of the mid channel, and b) the unfiltered mid channel, using the prediction weights decoded in . This simple low-pass filter imposes a one-sample delay, and the unfiltered mid channel is also delayed by one sample. In order to allow seamless switching between stereo and mono, mono streams must also impose the same one-sample delay. The encoder requires an additional one-sample delay for both mono and stereo streams, though an encoder may omit the delay for mono if it knows it will never switch to stereo. The unmixing process operates in two phases. The first phase lasts for 8 ms, during which it interpolates the prediction weights from the previous frame, prev_w0_Q13 and prev_w1_Q13, to the values for the current frame, w0_Q13 and w1_Q13. The second phase simply uses these weights for the remainder of the frame. Let mid[i] and side[i] be the contents of out[i] (from ) for the current mid and side channels, respectively, and let left[i] and right[i] be the corresponding stereo output channels. If the side channel is not coded (see ), then side[i] is set to zero. Also let j be defined as in , n1 be the number of samples in phase 1 (64 for NB, 96 for MB, and 128 for WB), and n2 be the total number of samples in the frame. Then for i such that j <= i < (j + n2), the left and right channel output is
These formulas require two samples prior to index j, the start of the frame, for the mid channel, and one prior sample for the side channel. For the first frame after a decoder reset, zeros are used instead.
After stereo unmixing (if any), the decoder applies resampling to convert the decoded SILK output to the sample rate desired by the application. This is necessary when decoding a Hybrid frame at SWB or FB sample rates, or whenever the decoder wants the output at a different sample rate than the internal SILK sampling rate (e.g., to allow a constant sample rate when the audio bandwidth changes, or to allow mixing with audio from other applications). The resampler itself is non-normative, and a decoder can use any method it wants to perform the resampling. However, a minimum amount of delay is imposed to allow the resampler to operate, and this delay is normative, so that the corresponding delay can be applied to the MDCT layer in the encoder. A decoder is always free to use a resampler which requires more delay than allowed for here (e.g., to improve quality), but it must then delay the output of the MDCT layer by this extra amount. Keeping as much delay as possible on the encoder side allows an encoder which knows it will never use any of the SILK or Hybrid modes to skip this delay. By contrast, if it were all applied by the decoder, then a decoder which processes audio in fixed-size blocks would be forced to delay the output of CELT frames just in case of a later switch to a SILK or Hybrid mode. gives the maximum resampler delay in samples at 48 kHz for each SILK audio bandwidth. Because the actual output rate may not be 48 kHz, it may not be possible to achieve exactly these delays while using a whole number of input or output samples. The reference implementation is able to resample to any of the supported output sampling rates (8, 12, 16, 24, or 48 kHz) within or near this delay constraint. Some resampling filters (including those used by the reference implementation) may add a delay that is not an exact integer, or is not linear-phase, and so cannot be represented by a single delay at all frequencies. However, such deviations are unlikely to be perceptible, and the comparison tool described in is designed to be relatively insensitive to them. The delays listed here are the ones that should be targeted by the encoder. Audio Bandwidth Delay in millisecond NB 0.538 MB 0.692 WB 0.706 NB is given a smaller decoder delay allocation than MB and WB to allow a higher-order filter when resampling to 8 kHz in both the encoder and decoder. This implies that the audio content of two SILK frames operating at different bandwidths are not perfectly aligned in time. This is not an issue for any transitions described in , because they all involve a SILK decoder reset. When the decoder is reset, any samples remaining in the resampling buffer are discarded, and the resampler is re-initialized with silence.
The CELT layer of Opus is based on the Modified Discrete Cosine Transform with partially overlapping windows of 5 to 22.5 ms. The main principle behind CELT is that the MDCT spectrum is divided into bands that (roughly) follow the Bark scale, i.e., the scale of the ear's critical bands . The normal CELT layer uses 21 of those bands, though Opus Custom (see ) may use a different number of bands. In Hybrid mode, the first 17 bands (up to 8 kHz) are not coded. A band can contain as little as one MDCT bin per channel, and as many as 176 bins per channel, as detailed in . In each band, the gain (energy) is coded separately from the shape of the spectrum. Coding the gain explicitly makes it easy to preserve the spectral envelope of the signal. The remaining unit-norm shape vector is encoded using a Pyramid Vector Quantizer (PVQ) . Frame Size: 2.5 ms 5 ms 10 ms 20 ms Start Frequency Stop Frequency Band Bins: 0 1 2 4 8 0 Hz 200 Hz 1 1 2 4 8 200 Hz 400 Hz 2 1 2 4 8 400 Hz 600 Hz 3 1 2 4 8 600 Hz 800 Hz 4 1 2 4 8 800 Hz 1000 Hz 5 1 2 4 8 1000 Hz 1200 Hz 6 1 2 4 8 1200 Hz 1400 Hz 7 1 2 4 8 1400 Hz 1600 Hz 8 2 4 8 16 1600 Hz 2000 Hz 9 2 4 8 16 2000 Hz 2400 Hz 10 2 4 8 16 2400 Hz 2800 Hz 11 2 4 8 16 2800 Hz 3200 Hz 12 4 8 16 32 3200 Hz 4000 Hz 13 4 8 16 32 4000 Hz 4800 Hz 14 4 8 16 32 4800 Hz 5600 Hz 15 6 12 24 48 5600 Hz 6800 Hz 16 6 12 24 48 6800 Hz 8000 Hz 17 8 16 32 64 8000 Hz 9600 Hz 18 12 24 48 96 9600 Hz 12000 Hz 19 18 36 72 144 12000 Hz 15600 Hz 20 22 44 88 176 15600 Hz 20000 Hz Transients are notoriously difficult for transform codecs to code. CELT uses two different strategies for them: Using multiple smaller MDCTs instead of a single large MDCT, and Dynamic time-frequency resolution changes (See ). To improve quality on highly tonal and periodic signals, CELT includes a prefilter/postfilter combination. The prefilter on the encoder side attenuates the signal's harmonics. The postfilter on the decoder side restores the original gain of the harmonics, while shaping the coding noise to roughly follow the harmonics. Such noise shaping reduces the perception of the noise. When coding a stereo signal, three coding methods are available: mid-side stereo: encodes the mean and the difference of the left and right channels, intensity stereo: only encodes the mean of the left and right channels (discards the difference), dual stereo: encodes the left and right channels separately. An overview of the decoder is given in .
| decoder |----+ | +---------+ | | | | +---------+ v | | Fine | +---+ +->| decoder |->| + | | +---------+ +---+ | ^ | +---------+ | | | | Range | | +----------+ v | Decoder |-+ | Bit | +------+ +---------+ | |Allocation| | 2**x | | +----------+ +------+ | | | | v v +--------+ | +---------+ +---+ +-------+ | pitch | +->| PVQ |->| * |->| IMDCT |->| post- |---> | | decoder | +---+ +-------+ | filter | | +---------+ +--------+ | ^ +--------------------------------------+ ]]>
The decoder is based on the following symbols and sets of symbols: Symbol(s) PDF Condition silence {32767, 1}/32768 post-filter {1, 1}/2 octave uniform (6)post-filter period raw bits (4+octave)post-filter gain raw bits (3)post-filter tapset {2, 1, 1}/4post-filter transient {7, 1}/8 intra {7, 1}/8 coarse energy tf_change tf_select {1, 1}/2 spread {7, 2, 21, 2}/32 dyn. alloc. alloc. trim {2, 2, 5, 10, 22, 46, 22, 10, 5, 2, 2}/128 skip {1, 1}/2 intensity uniform dual {1, 1}/2 fine energy residual anti-collapse{1, 1}/2 finalize The decoder extracts information from the range-coded bitstream in the order described in . In some circumstances, it is possible for a decoded value to be out of range due to a very small amount of redundancy in the encoding of large integers by the range coder. In that case, the decoder should assume there has been an error in the coding, decoding, or transmission and SHOULD take measures to conceal the error and/or report to the application that a problem has occurred. Such out of range errors cannot occur in the SILK layer.
The "transient" flag indicates whether the frame uses a single long MDCT or several short MDCTs. When it is set, then the MDCT coefficients represent multiple short MDCTs in the frame. When not set, the coefficients represent a single long MDCT for the frame. The flag is encoded in the bitstream with a probability of 1/8. In addition to the global transient flag is a per-band binary flag to change the time-frequency (tf) resolution independently in each band. The change in tf resolution is defined in tf_select_table[][] in celt.c and depends on the frame size, whether the transient flag is set, and the value of tf_select. The tf_select flag uses a 1/2 probability, but is only decoded if it can have an impact on the result knowing the value of all per-band tf_change flags.
It is important to quantize the energy with sufficient resolution because any energy quantization error cannot be compensated for at a later stage. Regardless of the resolution used for encoding the spectral shape of a band, it is perceptually important to preserve the energy in each band. CELT uses a three-step coarse-fine-fine strategy for encoding the energy in the base-2 log domain, as implemented in quant_bands.c
Coarse quantization of the energy uses a fixed resolution of 6 dB (integer part of base-2 log). To minimize the bitrate, prediction is applied both in time (using the previous frame) and in frequency (using the previous bands). The part of the prediction that is based on the previous frame can be disabled, creating an "intra" frame where the energy is coded without reference to prior frames. The decoder first reads the intra flag to determine what prediction is used. The 2-D z-transform of the prediction filter is:
where b is the band index and l is the frame index. The prediction coefficients applied depend on the frame size in use when not using intra energy and are alpha=0, beta=4915/32768 when using intra energy. The time-domain prediction is based on the final fine quantization of the previous frame, while the frequency domain (within the current frame) prediction is based on coarse quantization only (because the fine quantization has not been computed yet). The prediction is clamped internally so that fixed point implementations with limited dynamic range always remain in the same state as floating point implementations. We approximate the ideal probability distribution of the prediction error using a Laplace distribution with separate parameters for each frame size in intra- and inter-frame modes. These parameters are held in the e_prob_model table in quant_bands.c. The coarse energy quantization is performed by unquant_coarse_energy() and unquant_coarse_energy_impl() (quant_bands.c). The encoding of the Laplace-distributed values is implemented in ec_laplace_decode() (laplace.c).
The number of bits assigned to fine energy quantization in each band is determined by the bit allocation computation described in . Let B_i be the number of fine energy bits for band i; the refinement is an integer f in the range [0,2**B_i-1]. The mapping between f and the correction applied to the coarse energy is equal to (f+1/2)/2**B_i - 1/2. Fine energy quantization is implemented in quant_fine_energy() (quant_bands.c). When some bits are left "unused" after all other flags have been decoded, these bits are assigned to a "final" step of fine allocation. In effect, these bits are used to add one extra fine energy bit per band per channel. The allocation process determines two "priorities" for the final fine bits. Any remaining bits are first assigned only to bands of priority 0, starting from band 0 and going up. If all bands of priority 0 have received one bit per channel, then bands of priority 1 are assigned an extra bit per channel, starting from band 0. If any bits are left after this, they are left unused. This is implemented in unquant_energy_finalise() (quant_bands.c).
Because the bit allocation drives the decoding of the range-coder stream, it MUST be recovered exactly so that identical coding decisions are made in the encoder and decoder. Any deviation from the reference's resulting bit allocation will result in corrupted output, though implementers are free to implement the procedure in any way which produces identical results. The per-band gain-shape structure of the CELT layer ensures that using the same number of bits for the spectral shape of a band in every frame will result in a roughly constant signal-to-noise ratio in that band. This results in coding noise that has the same spectral envelope as the signal. The masking curve produced by a standard psychoacoustic model also closely follows the spectral envelope of the signal. This structure means that the ideal allocation is more consistent from frame to frame than it is for other codecs without an equivalent structure, and that a fixed allocation provides fairly consistent perceptual performance . Many codecs transmit significant amounts of side information to control the bit allocation within a frame. Often this control is only indirect, and must be exercised carefully to achieve the desired rate constraints. The CELT layer, however, can adapt over a very wide range of rates, and thus has a large number of codebook sizes to choose from for each band. Explicitly signaling the size of each of these codebooks would impose considerable overhead, even though the allocation is relatively static from frame to frame. This is because all of the information required to compute these codebook sizes must be derived from a single frame by itself, in order to retain robustness to packet loss, so the signaling cannot take advantage of knowledge of the allocation in neighboring frames. This problem is exacerbated in low-latency (small frame size) applications, which would include this overhead in every frame. For this reason, in the MDCT mode Opus uses a primarily implicit bit allocation. The available bitstream capacity is known in advance to both the encoder and decoder without additional signaling, ultimately from the packet sizes expressed by a higher-level protocol. Using this information, the codec interpolates an allocation from a hard-coded table. While the band-energy structure effectively models intra-band masking, it ignores the weaker inter-band masking, band-temporal masking, and other less significant perceptual effects. While these effects can often be ignored, they can become significant for particular samples. One mechanism available to encoders would be to simply increase the overall rate for these frames, but this is not possible in a constant rate mode and can be fairly inefficient. As a result three explicitly signaled mechanisms are provided to alter the implicit allocation: Band boost Allocation trim Band skipping The first of these mechanisms, band boost, allows an encoder to boost the allocation in specific bands. The second, allocation trim, works by biasing the overall allocation towards higher or lower frequency bands. The third, band skipping, selects which low-precision high frequency bands will be allocated no shape bits at all. In stereo mode there are two additional parameters potentially coded as part of the allocation procedure: a parameter to allow the selective elimination of allocation for the 'side' (i.e., intensity stereo) in jointly coded bands, and a flag to deactivate joint coding (i.e., dual stereo). These values are not signaled if they would be meaningless in the overall context of the allocation. Because every signaled adjustment increases overhead and implementation complexity, none were included speculatively: the reference encoder makes use of all of these mechanisms. While the decision logic in the reference was found to be effective enough to justify the overhead and complexity, further analysis techniques may be discovered which increase the effectiveness of these parameters. As with other signaled parameters, an encoder is free to choose the values in any manner, but unless a technique is known to deliver superior perceptual results the methods used by the reference implementation should be used. The allocation process consists of the following steps: determining the per-band maximum allocation vector, decoding the boosts, decoding the tilt, determining the remaining capacity of the frame, searching the mode table for the entry nearest but not exceeding the available space (subject to the tilt, boosts, band maximums, and band minimums), linear interpolation, reallocation of unused bits with concurrent skip decoding, determination of the fine-energy vs. shape split, and final reallocation. This process results in a per-band shape allocation (in 1/8th bit units), a per-band fine-energy allocation (in 1 bit per channel units), a set of band priorities for controlling the use of remaining bits at the end of the frame, and a remaining balance of unallocated space, which is usually zero except at very high rates. The "static" bit allocation (in 1/8 bits) for a quality q, excluding the minimums, maximums, tilt and boosts, is equal to channels*N*alloc[band][q]<<LM>>2, where alloc[][] is given in and LM=log2(frame_size/120). The allocation is obtained by linearly interpolating between two values of q (in steps of 1/64) to find the highest allocation that does not exceed the number of bits remaining. Rows indicate the MDCT bands, columns are the different quality (q) parameters. The units are 1/32 bit per MDCT bin. 0 1 2 3 4 5 6 7 8 9 10 090110118126134144152162172200 080100110119127137145155165200 07590103112120130138148158200 0698493104114124132142152200 063788695103113123133143200 05671808997107117127137200 04965758391101111121131200 0405870788595105115125200 034516572788898108118198 029455966728292102112193 02039536066768696106188 01832475460708090100183 0102640475464748494178 002031394757677787173 001223324151617181168 00015253545556575163 0004172939495969158 0000122333435363153 000011626364656148 000001015203045129 00000111120104 The maximum allocation vector is an approximation of the maximum space that can be used by each band for a given mode. The value is approximate because the shape encoding is variable rate (due to entropy coding of splitting parameters). Setting the maximum too low reduces the maximum achievable quality in a band while setting it too high may result in waste: bitstream capacity available at the end of the frame which can not be put to any use. The maximums specified by the codec reflect the average maximum. In the reference implementation, the maximums in bits/sample are precomputed in a static table (see cache_caps50[] in static_modes_float.h) for each band, for each value of LM, and for both mono and stereo. Implementations are expected to simply use the same table data, but the procedure for generating this table is included in rate.c as part of compute_pulse_cache(). To convert the values in cache.caps into the actual maximums: first set nbBands to the maximum number of bands for this mode, and stereo to zero if stereo is not in use and one otherwise. For each band set N to the number of MDCT bins covered by the band (for one channel), set LM to the shift value for the frame size, then set i to nbBands*(2*LM+stereo). Then set the maximum for the band to the i-th index of cache.caps + 64 and multiply by the number of channels in the current frame (one or two) and by N, then divide the result by 4 using integer division. The resulting vector will be called cap[]. The elements fit in signed 16-bit integers but do not fit in 8 bits. This procedure is implemented in the reference in the function init_caps() in celt.c. The band boosts are represented by a series of binary symbols which are entropy coded with very low probability. Each band can potentially be boosted multiple times, subject to the frame actually having enough room to obey the boost and having enough room to code the boost symbol. The default coding cost for a boost starts out at six bits (probability p=1/64), but subsequent boosts in a band cost only a single bit and every time a band is boosted the initial cost is reduced (down to a minimum of two bits, or p=1/4). Since the initial cost of coding a boost is 6 bits, the coding cost of the boost symbols when completely unused is 0.48 bits/frame for a 21 band mode (21*-log2(1-1/2**6)). To decode the band boosts: First set 'dynalloc_logp' to 6, the initial amount of storage required to signal a boost in bits, 'total_bits' to the size of the frame in 8th bits, 'total_boost' to zero, and 'tell' to the total number of 8th bits decoded so far. For each band from the coding start (0 normally, but 17 in Hybrid mode) to the coding end (which changes depending on the signaled bandwidth), the boost quanta in units of 1/8 bit is calculated as quanta = min(8*N, max(48, N)). This represents a boost step size of six bits, subject to a lower limit of 1/8th bit/sample and an upper limit of 1 bit/sample. Set 'boost' to zero and 'dynalloc_loop_logp' to dynalloc_logp. While dynalloc_loop_log (the current worst case symbol cost) in 8th bits plus tell is less than total_bits plus total_boost and boost is less than cap[] for this band: Decode a bit from the bitstream with a with dynalloc_loop_logp as the cost of a one, update tell to reflect the current used capacity, if the decoded value is zero break the loop otherwise add quanta to boost and total_boost, subtract quanta from total_bits, and set dynalloc_loop_log to 1. When the while loop finishes boost contains the boost for this band. If boost is non-zero and dynalloc_logp is greater than 2, decrease dynalloc_logp. Once this process has been executed on all bands, the band boosts have been decoded. This procedure is implemented around line 2474 of celt.c. At very low rates it is possible that there won't be enough available space to execute the inner loop even once. In these cases band boost is not possible but its overhead is completely eliminated. Because of the high cost of band boost when activated, a reasonable encoder should not be using it at very low rates. The reference implements its dynalloc decision logic around line 1304 of celt.c. The allocation trim is a integer value from 0-10. The default value of 5 indicates no trim. The trim parameter is entropy coded in order to lower the coding cost of less extreme adjustments. Values lower than 5 bias the allocation towards lower frequencies and values above 5 bias it towards higher frequencies. Like other signaled parameters, signaling of the trim is gated so that it is not included if there is insufficient space available in the bitstream. To decode the trim, first set the trim value to 5, then if and only if the count of decoded 8th bits so far (ec_tell_frac) plus 48 (6 bits) is less than or equal to the total frame size in 8th bits minus total_boost (a product of the above band boost procedure), decode the trim value using the PDF in . PDF {1, 1, 2, 5, 10, 22, 46, 22, 10, 5, 2, 2}/128 For 10 ms and 20 ms frames using short blocks and that have at least LM+2 bits left prior to the allocation process, then one anti-collapse bit is reserved in the allocation process so it can be decoded later. Following the the anti-collapse reservation, one bit is reserved for skip if available. For stereo frames, bits are reserved for intensity stereo and for dual stereo. Intensity stereo requires ilog2(end-start) bits. Those bits are reserved if there is enough bits left. Following this, one bit is reserved for dual stereo if available. The allocation computation begins by setting up some initial conditions. 'total' is set to the remaining available 8th bits, computed by taking the size of the coded frame times 8 and subtracting ec_tell_frac(). From this value, one (8th bit) is subtracted to ensure that the resulting allocation will be conservative. 'anti_collapse_rsv' is set to 8 (8th bits) if and only if the frame is a transient, LM is greater than 1, and total is greater than or equal to (LM+2) * 8. Total is then decremented by anti_collapse_rsv and clamped to be equal to or greater than zero. 'skip_rsv' is set to 8 (8th bits) if total is greater than 8, otherwise it is zero. Total is then decremented by skip_rsv. This reserves space for the final skipping flag. If the current frame is stereo, intensity_rsv is set to the conservative log2 in 8th bits of the number of coded bands for this frame (given by the table LOG2_FRAC_TABLE in rate.c). If intensity_rsv is greater than total then intensity_rsv is set to zero. Otherwise total is decremented by intensity_rsv, and if total is still greater than 8, dual_stereo_rsv is set to 8 and total is decremented by dual_stereo_rsv. The allocation process then computes a vector representing the hard minimum amounts allocation any band will receive for shape. This minimum is higher than the technical limit of the PVQ process, but very low rate allocations produce an excessively sparse spectrum and these bands are better served by having no allocation at all. For each coded band, set thresh[band] to twenty-four times the number of MDCT bins in the band and divide by 16. If 8 times the number of channels is greater, use that instead. This sets the minimum allocation to one bit per channel or 48 128th bits per MDCT bin, whichever is greater. The band-size dependent part of this value is not scaled by the channel count, because at the very low rates where this limit is applicable there will usually be no bits allocated to the side. The previously decoded allocation trim is used to derive a vector of per-band adjustments, 'trim_offsets[]'. For each coded band take the alloc_trim and subtract 5 and LM. Then multiply the result by the number of channels, the number of MDCT bins in the shortest frame size for this mode, the number of remaining bands, 2**LM, and 8. Then divide this value by 64. Finally, if the number of MDCT bins in the band per channel is only one, 8 times the number of channels is subtracted in order to diminish the allocation by one bit, because width 1 bands receive greater benefit from the coarse energy coding.
In each band, the normalized "shape" is encoded using a vector quantization scheme called a "pyramid vector quantizer". In the simplest case, the number of bits allocated in is converted to a number of pulses as described by . Knowing the number of pulses and the number of samples in the band, the decoder calculates the size of the codebook as detailed in . The size is used to decode an unsigned integer (uniform probability model), which is the codeword index. This index is converted into the corresponding vector as explained in . This vector is then scaled to unit norm.
Although the allocation is performed in 1/8th bit units, the quantization requires an integer number of pulses K. To do this, the encoder searches for the value of K that produces the number of bits nearest to the allocated value (rounding down if exactly halfway between two values), not to exceed the total number of bits available. For efficiency reasons, the search is performed against a precomputed allocation table which only permits some K values for each N. The number of codebook entries can be computed as explained in . The difference between the number of bits allocated and the number of bits used is accumulated to a "balance" (initialized to zero) that helps adjust the allocation for the next bands. One third of the balance is applied to the bit allocation of each band to help achieve the target allocation. The only exceptions are the band before the last and the last band, for which half the balance and the whole balance are applied, respectively.
Decoding of PVQ vectors is implemented in decode_pulses() (cwrs.c). The unique codeword index is decoded as a uniformly-distributed integer value between 0 and V(N,K)-1, where V(N,K) is the number of possible combinations of K pulses in N samples. The index is then converted to a vector in the same way specified in . The indexing is based on the calculation of V(N,K) (denoted N(L,K) in ). The number of combinations can be computed recursively as V(N,K) = V(N-1,K) + V(N,K-1) + V(N-1,K-1), with V(N,0) = 1 and V(0,K) = 0, K != 0. There are many different ways to compute V(N,K), including precomputed tables and direct use of the recursive formulation. The reference implementation applies the recursive formulation one line (or column) at a time to save on memory use, along with an alternate, univariate recurrence to initialize an arbitrary line, and direct polynomial solutions for small N. All of these methods are equivalent, and have different trade-offs in speed, memory usage, and code size. Implementations MAY use any methods they like, as long as they are equivalent to the mathematical definition. The decoded vector X is recovered as follows. Let i be the index decoded with the procedure in with ft = V(N,K), so that 0 <= i < V(N,K). Let k = K. Then for j = 0 to (N - 1), inclusive, do: Let p = (V(N-j-1,k) + V(N-j,k))/2. If i < p, then let sgn = 1, else let sgn = -1 and set i = i - p. Let k0 = k and set p = p - V(N-j-1,k). While p > i, set k = k - 1 and p = p - V(N-j-1,k). Set X[j] = sgn*(k0 - k) and i = i - p. The decoded vector X is then normalized such that its L2-norm equals one.
The normalized vector decoded in is then rotated for the purpose of avoiding tonal artifacts. The rotation gain is equal to
where N is the number of dimensions, K is the number of pulses, and f_r depends on the value of the "spread" parameter in the bit-stream.
Spread value f_r 0 infinite (no rotation) 1 15 2 10 3 5 The rotation angle is then calculated as
A 2-D rotation R(i,j) between points x_i and x_j is defined as:
An N-D rotation is then achieved by applying a series of 2-D rotations back and forth, in the following order: R(x_1, x_2), R(x_2, x_3), ..., R(x_N-2, X_N-1), R(x_N-1, X_N), R(x_N-2, X_N-1), ..., R(x_1, x_2).
If the decoded vector represents more than one time block, then this spreading process is applied separately on each time block. Also, if each block represents 8 samples or more, then another N-D rotation, by (pi/2-theta), is applied before the rotation described above. This extra rotation is applied in an interleaved manner with a stride equal to round(sqrt(N/nb_blocks)), i.e., it is applied independently for each set of sample S_k = {stride*n + k}, n=0..N/stride-1.
To avoid the need for multi-precision calculations when decoding PVQ codevectors, the maximum size allowed for codebooks is 32 bits. When larger codebooks are needed, the vector is instead split in two sub-vectors of size N/2. A quantized gain parameter with precision derived from the current allocation is entropy coded to represent the relative gains of each side of the split, and the entire decoding process is recursively applied. Multiple levels of splitting may be applied up to a limit of LM+1 splits. The same recursive mechanism is applied for the joint coding of stereo audio.
The time-frequency (TF) parameters are used to control the time-frequency resolution tradeoff in each coded band. For each band, there are two possible TF choices. For the first band coded, the PDF is {3, 1}/4 for frames marked as transient and {15, 1}/16 for the other frames. For subsequent bands, the TF choice is coded relative to the previous TF choice with probability {15, 1}/15 for transient frames and {31, 1}/32 otherwise. The mapping between the decoded TF choices and the adjustment in TF resolution is shown in the tables below. Frame size (ms) 0 1 2.5 0 -1 5 0 -1 10 0 -2 20 0 -2 Frame size (ms) 0 1 2.5 0 -1 5 0 -2 10 0 -3 20 0 -3 Frame size (ms) 0 1 2.5 0 -1 5 1 0 10 2 0 20 3 0 Frame size (ms) 0 1 2.5 0 -1 5 1 -1 10 1 -1 20 1 -1 A negative TF adjustment means that the temporal resolution is increased, while a positive TF adjustment means that the frequency resolution is increased. Changes in TF resolution are implemented using the Hadamard transform . To increase the time resolution by N, N "levels" of the Hadamard transform are applied to the decoded vector for each interleaved MDCT vector. To increase the frequency resolution (assumes a transient frame), then N levels of the Hadamard transform are applied across the interleaved MDCT vector. In the case of increased time resolution the decoder uses the "sequency order" because the input vector is sorted in time.
The anti-collapse feature is designed to avoid the situation where the use of multiple short MDCTs causes the energy in one or more of the MDCTs to be zero for some bands, causing unpleasant artifacts. When the frame has the transient bit set, an anti-collapse bit is decoded. When anti-collapse is set, the energy in each small MDCT is prevented from collapsing to zero. For each band of each MDCT where a collapse is detected, a pseudo-random signal is inserted with an energy corresponding to the minimum energy over the two previous frames. A renormalization step is then required to ensure that the anti-collapse step did not alter the energy preservation property.
Just as each band was normalized in the encoder, the last step of the decoder before the inverse MDCT is to denormalize the bands. Each decoded normalized band is multiplied by the square root of the decoded energy. This is done by denormalise_bands() (bands.c).
The inverse MDCT implementation has no special characteristics. The input is N frequency-domain samples and the output is 2*N time-domain samples, while scaling by 1/2. A "low-overlap" window reduces the algorithmic delay. It is derived from a basic (full overlap) 240-sample version of the window used by the Vorbis codec:
The low-overlap window is created by zero-padding the basic window and inserting ones in the middle, such that the resulting window still satisfies power complementarity . The IMDCT and windowing are performed by mdct_backward (mdct.c).
The output of the inverse MDCT (after weighted overlap-add) is sent to the post-filter. Although the post-filter is applied at the end, the post-filter parameters are encoded at the beginning, just after the silence flag. The post-filter can be switched on or off using one bit (logp=1). If the post-filter is enabled, then the octave is decoded as an integer value between 0 and 6 of uniform probability. Once the octave is known, the fine pitch within the octave is decoded using 4+octave raw bits. The final pitch period is equal to (16<<octave)+fine_pitch-1 so it is bounded between 15 and 1022, inclusively. Next, the gain is decoded as three raw bits and is equal to G=3*(int_gain+1)/32. The set of post-filter taps is decoded last, using a pdf equal to {2, 1, 1}/4. Tapset zero corresponds to the filter coefficients g0 = 0.3066406250, g1 = 0.2170410156, g2 = 0.1296386719. Tapset one corresponds to the filter coefficients g0 = 0.4638671875, g1 = 0.2680664062, g2 = 0, and tapset two uses filter coefficients g0 = 0.7998046875, g1 = 0.1000976562, g2 = 0. The post-filter response is thus computed as:
During a transition between different gains, a smooth transition is calculated using the square of the MDCT window. It is important that values of y(n) be interpolated one at a time such that the past value of y(n) used is interpolated.
After the post-filter, the signal is de-emphasized using the inverse of the pre-emphasis filter used in the encoder:
where alpha_p=0.8500061035.
Packet loss concealment (PLC) is an optional decoder-side feature that SHOULD be included when receiving from an unreliable channel. Because PLC is not part of the bitstream, there are many acceptable ways to implement PLC with different complexity/quality trade-offs. The PLC in the reference implementation depends on the mode of last packet received. In CELT mode, the PLC finds a periodicity in the decoded signal and repeats the windowed waveform using the pitch offset. The windowed waveform is overlapped in such a way as to preserve the time-domain aliasing cancellation with the previous frame and the next frame. This is implemented in celt_decode_lost() (mdct.c). In SILK mode, the PLC uses LPC extrapolation from the previous frame, implemented in silk_PLC() (PLC.c).
Clock drift refers to the gradual desynchronization of two endpoints whose sample clocks run at different frequencies while they are streaming live audio. Differences in clock frequencies are generally attributable to manufacturing variation in the endpoints' clock hardware. For long-lived streams, the time difference between sender and receiver can grow without bound. When the sender's clock runs slower than the receiver's, the effect is similar to packet loss: too few packets are received. The receiver can distinguish between drift and loss if the transport provides packet timestamps. A receiver for live streams SHOULD conceal the effects of drift, and MAY do so by invoking the PLC. When the sender's clock runs faster than the receiver's, too many packets will be received. The receiver MAY respond by skipping any packet (i.e., not submitting the packet for decoding). This is likely to produce a less severe artifact than if the frame were dropped after decoding. A decoder MAY employ a more sophisticated drift compensation method. For example, the NetEQ component of the Google WebRTC codebase compensates for drift by adding or removing one period when the signal is highly periodic. The reference implementation of Opus allows a caller to learn whether the current frame's signal is highly periodic, and if so what the period is, using the OPUS_GET_PITCH() request.
Switching between the Opus coding modes, audio bandwidths, and channel counts requires careful consideration to avoid audible glitches. Switching between any two configurations of the CELT-only mode, any two configurations of the Hybrid mode, or from WB SILK to Hybrid mode does not require any special treatment in the decoder, as the MDCT overlap will smooth the transition. Switching from Hybrid mode to WB SILK requires adding in the final contents of the CELT overlap buffer to the first SILK-only packet. This can be done by decoding a 2.5 ms silence frame with the CELT decoder using the channel count of the SILK-only packet (and any choice of audio bandwidth), which will correctly handle the cases when the channel count changes as well. When changing the channel count for SILK-only or Hybrid packets, the encoder can avoid glitches by smoothly varying the stereo width of the input signal before or after the transition, and SHOULD do so. However, other transitions between SILK-only packets or between NB or MB SILK and Hybrid packets may cause glitches, because neither the LSF coefficients nor the LTP, LPC, stereo unmixing, and resampler buffers are available at the new sample rate. These switches SHOULD be delayed by the encoder until quiet periods or transients, where the inevitable glitches will be less audible. Additionally, the bit-stream MAY include redundant side information ("redundancy"), in the form of additional CELT frames embedded in each of the Opus frames around the transition. The other transitions that cannot be easily handled are those where the lower frequencies switch between the SILK LP-based model and the CELT MDCT model. However, an encoder may not have an opportunity to delay such a switch to a convenient point. For example, if the content switches from speech to music, and the encoder does not have enough latency in its analysis to detect this in advance, there may be no convenient silence period during which to make the transition for quite some time. To avoid or reduce glitches during these problematic mode transitions, and also between audio bandwidth changes in the SILK-only modes, transitions MAY include redundant side information ("redundancy"), in the form of an additional CELT frame embedded in the Opus frame. A transition between coding the lower frequencies with the LP model and the MDCT model or a transition that involves changing the SILK bandwidth is only normatively specified when it includes redundancy. For those without redundancy, it is RECOMMENDED that the decoder use a concealment technique (e.g., make use of a PLC algorithm) to "fill in" the gap or discontinuity caused by the mode transition. Therefore, PLC MUST NOT be applied during any normative transition, i.e., when A packet includes redundancy for this transition (as described below), The transition is between any WB SILK packet and any Hybrid packet, or vice versa, The transition is between any two Hybrid mode packets, or The transition is between any two CELT mode packets, unless there is actual packet loss.
Transitions with side information include an extra 5 ms "redundant" CELT frame within the Opus frame. This frame is designed to fill in the gap or discontinuity in the different layers without requiring the decoder to conceal it. For transitions from CELT-only to SILK-only or Hybrid, the redundant frame is inserted in the first Opus frame after the transition (i.e., the first SILK-only or Hybrid frame). For transitions from SILK-only or Hybrid to CELT-only, the redundant frame is inserted in the last Opus frame before the transition (i.e., the last SILK-only or Hybrid frame).
The presence of redundancy is signaled in all SILK-only and Hybrid frames, not just those involved in a mode transition. This allows the frames to be decoded correctly even if an adjacent frame is lost. For SILK-only frames, this signaling is implicit, based on the size of the of the Opus frame and the number of bits consumed decoding the SILK portion of it. After decoding the SILK portion of the Opus frame, the decoder uses ec_tell() (see ) to check if there are at least 17 bits remaining. If so, then the frame contains redundancy. For Hybrid frames, this signaling is explicit. After decoding the SILK portion of the Opus frame, the decoder uses ec_tell() (see ) to ensure there are at least 37 bits remaining. If so, it reads a symbol with the PDF in , and if the value is 1, then the frame contains redundancy. Otherwise (if there were fewer than 37 bits left or the value was 0), the frame does not contain redundancy. PDF {4095, 1}/4096
Since the current frame is a SILK-only or a Hybrid frame, it must be at least 10 ms. Therefore, it needs an additional flag to indicate whether the redundant 5 ms CELT frame should be mixed into the beginning of the current frame, or the end. After determining that a frame contains redundancy, the decoder reads a 1 bit symbol with a uniform PDF (). PDF {1, 1}/2 If the value is zero, this is the first frame in the transition, and the redundancy belongs at the end. If the value is one, this is the second frame in the transition, and the redundancy belongs at the beginning. There is no way to specify that an Opus frame contains separate redundant CELT frames at both the beginning and the end.
Unlike the CELT portion of a Hybrid frame, the redundant CELT frame does not use the same entropy coder state as the rest of the Opus frame, because this would break the CELT bit allocation mechanism in Hybrid frames. Thus, a redundant CELT frame always starts and ends on a byte boundary, even in SILK-only frames, where this is not strictly necessary. For SILK-only frames, the number of bytes in the redundant CELT frame is simply the number of whole bytes remaining, which must be at least 2, due to the space check in . For Hybrid frames, the number of bytes is equal to 2, plus a decoded unsigned integer less than 256 (see ). This may be more than the number of whole bytes remaining in the Opus frame, in which case the frame is invalid. However, a decoder is not required to ignore the entire frame, as this may be the result of a bit error that desynchronized the range coder. There may still be useful data before the error, and a decoder MAY keep any audio decoded so far instead of invoking the PLC, but it is RECOMMENDED that the decoder stop decoding and discard the rest of the current Opus frame. It would have been possible to avoid these invalid states in the design of Opus by limiting the range of the explicit length decoded from Hybrid frames by the actual number of whole bytes remaining. However, this would require an encoder to determine the rate allocation for the MDCT layer up front, before it began encoding that layer. By allowing some invalid sizes, the encoder is able to defer that decision until much later. When encoding Hybrid frames which do not include redundancy, the encoder must still decide up-front if it wishes to use the minimum 37 bits required to trigger encoding of the redundancy flag, but this is a much looser restriction. After determining the size of the redundant CELT frame, the decoder reduces the size of the buffer currently in use by the range coder by that amount. The CELT layer read any raw bits from the end of this reduced buffer, and all calculations of the number of bits remaining in the buffer must be done using this new, reduced size, rather than the original size of the Opus frame.
The redundant frame is decoded like any other CELT-only frame, with the exception that it does not contain a TOC byte. The frame size is fixed at 5 ms, the channel count is set to that of the current frame, and the audio bandwidth is also set to that of the current frame, with the exception that for MB SILK frames, it is set to WB. If the redundancy belongs at the beginning (in a CELT-only to SILK-only or Hybrid transition), the final reconstructed output uses the first 2.5 ms of audio output by the decoder for the redundant frame as-is, discarding the corresponding output from the SILK-only or Hybrid portion of the frame. The remaining 2.5 ms is cross-lapped with the decoded SILK/Hybrid signal using the CELT's power-complementary MDCT window to ensure a smooth transition. If the redundancy belongs at the end (in a SILK-only or Hybrid to CELT-only transition), only the second half (2.5 ms) of the audio output by the decoder for the redundant frame is used. In that case, the second half of the redundant frame is cross-lapped with the end of the SILK/Hybrid signal, again using CELT's power-complementary MDCT window to ensure a smooth transition.
When a transition occurs, the state of the SILK or the CELT decoder (or both) may need to be reset before decoding a frame in the new mode. This avoids reusing "out of date" memory, which may not have been updated in some time or may not be in a well-defined state due to, e.g., PLC. The SILK state is reset before every SILK-only or Hybrid frame where the previous frame was CELT-only. The CELT state is reset every time the operating mode changes and the new mode is either Hybrid or CELT-only, except when the transition uses redundancy as described above. When switching from SILK-only or Hybrid to CELT-only with redundancy, the CELT state is reset before decoding the redundant CELT frame embedded in the SILK-only or Hybrid frame, but it is not reset before decoding the following CELT-only frame. When switching from CELT-only mode to SILK-only or Hybrid mode with redundancy, the CELT decoder is not reset for decoding the redundant CELT frame.
illustrates all of the normative transitions involving a mode change, an audio bandwidth change, or both. Each one uses an S, H, or C to represent an Opus frame in the corresponding mode. In addition, an R indicates the presence of redundancy in the Opus frame it is cross-lapped with. Its location in the first or last 5 ms is assumed to correspond to whether it is the frame before or after the transition. Other uses of redundancy are non-normative. Finally, a c indicates the contents of the CELT overlap buffer after the previously decoded frame (i.e., as extracted by decoding a silence frame).
S -> S & !R -> R & ;S -> S -> S NB or MB SILK to Hybrid with Redundancy: S -> S -> S & !R ->;H -> H -> H WB SILK to Hybrid: S -> S -> S ->!H -> H -> H SILK to CELT with Redundancy: S -> S -> S & !R -> C -> C -> C Hybrid to NB or MB SILK with Redundancy: H -> H -> H & !R -> R & ;S -> S -> S Hybrid to WB SILK: H -> H -> H -> c \ + > S -> S -> S Hybrid to CELT with Redundancy: H -> H -> H & !R -> C -> C -> C CELT to SILK with Redundancy: C -> C -> C -> R & ;S -> S -> S CELT to Hybrid with Redundancy: C -> C -> C -> R & |H -> H -> H Key: S SILK-only frame ; SILK decoder reset H Hybrid frame | CELT and SILK decoder resets C CELT-only frame ! CELT decoder reset c CELT overlap + Direct mixing R Redundant CELT frame & Windowed cross-lap ]]>
The first two and the last two Opus frames in each example are illustrative, i.e., there is no requirement that a stream remain in the same configuration for three consecutive frames before or after a switch.
The behavior of transitions without redundancy where PLC is allowed is non-normative. An encoder might still wish to use these transitions if, for example, it doesn't want to add the extra bitrate required for redundancy or if it makes a decision to switch after it has already transmitted the frame that would have had to contain the redundancy. illustrates the recommended cross-lapping and decoder resets for these transitions.
S -> S ;S -> S -> S NB or MB SILK to Hybrid: S -> S -> S |H -> H -> H SILK to CELT without Redundancy: S -> S -> S -> P & !C -> C -> C Hybrid to NB or MB SILK: H -> H -> H -> c + ;S -> S -> S Hybrid to CELT without Redundancy: H -> H -> H -> P & !C -> C -> C CELT to SILK without Redundancy: C -> C -> C -> P & ;S -> S -> S CELT to Hybrid without Redundancy: C -> C -> C -> P & |H -> H -> H Key: S SILK-only frame ; SILK decoder reset H Hybrid frame | CELT and SILK decoder resets C CELT-only frame ! CELT decoder reset c CELT overlap + Direct mixing P Packet Loss Concealment & Windowed cross-lap ]]>
Encoders SHOULD NOT use other transitions, e.g., those that involve redundancy in ways not illustrated in .
Just like the decoder, the Opus encoder also normally consists of two main blocks: the SILK encoder and the CELT encoder. However, unlike the case of the decoder, a valid (though potentially suboptimal) Opus encoder is not required to support all modes and may thus only include a SILK encoder module or a CELT encoder module. The output bit-stream of the Opus encoding contains bits from the SILK and CELT encoders, though these are not separable due to the use of a range coder. A block diagram of the encoder is illustrated below.
| Rate |--->| Encoder | V +-----------+ | | Conversion | | | +---------+ | Optional | | +------------+ +---------+ | Range | ->| High-pass |--+ | Encoder |----> | Filter | | +--------------+ +---------+ | | Bit- +-----------+ | | Delay | | CELT | +---------+ stream +->| Compensation |->| Encoder | ^ | | | |------+ +--------------+ +---------+ ]]>
For a normal encoder where both the SILK and the CELT modules are included, an optimal encoder should select which coding mode to use at run-time depending on the conditions. In the reference implementation, the frame size is selected by the application, but the other configuration parameters (number of channels, bandwidth, mode) are automatically selected (unless explicitly overridden by the application) depend on the following: Requested bitrate Input sampling rate Type of signal (speech vs music) Frame size in use The type of signal currently needs to be provided by the application (though it can be changed in real-time). An Opus encoder implementation could also do automatic detection, but since Opus is an interactive codec, such an implementation would likely have to either delay the signal (for non-interactive applications) or delay the mode switching decisions (for interactive applications). When the encoder is configured for voice over IP applications, the input signal is filtered by a high-pass filter to remove the lowest part of the spectrum that contains little speech energy and may contain background noise. This is a second order Auto Regressive Moving Average (i.e., with poles and zeros) filter with a cut-off frequency around 50 Hz. In the future, a music detector may also be used to lower the cut-off frequency when the input signal is detected to be music rather than speech.
The range coder acts as the bit-packer for Opus. It is used in three different ways: to encode Entropy-coded symbols with a fixed probability model using ec_encode() (entenc.c), Integers from 0 to (2**M - 1) using ec_enc_uint() or ec_enc_bits() (entenc.c), Integers from 0 to (ft - 1) (where ft is not a power of two) using ec_enc_uint() (entenc.c). The range encoder maintains an internal state vector composed of the four-tuple (val, rng, rem, ext) representing the low end of the current range, the size of the current range, a single buffered output byte, and a count of additional carry-propagating output bytes. Both val and rng are 32-bit unsigned integer values, rem is a byte value or less than 255 or the special value -1, and ext is an unsigned integer with at least 11 bits. This state vector is initialized at the start of each each frame to the value (0, 2**31, -1, 0). After encoding a sequence of symbols, the value of rng in the encoder should exactly match the value of rng in the decoder after decoding the same sequence of symbols. This is a powerful tool for detecting errors in either an encoder or decoder implementation. The value of val, on the other hand, represents different things in the encoder and decoder, and is not expected to match. The decoder has no analog for rem and ext. These are used to perform carry propagation in the renormalization loop below. Each iteration of this loop produces 9 bits of output, consisting of 8 data bits and a carry flag. The encoder cannot determine the final value of the output bytes until it propagates these carry flags. Therefore the reference implementation buffers a single non-propagating output byte (i.e., one less than 255) in rem and keeps a count of additional propagating (i.e., 255) output bytes in ext. An implementation may choose to use any mathematically equivalent scheme to perform carry propagation.
The main encoding function is ec_encode() (entenc.c), which encodes symbol k in the current context using the same three-tuple (fl[k], fh[k], ft) as the decoder to describe the range of the symbol (see ). ec_encode() updates the state of the encoder as follows. If fl[k] is greater than zero, then
Otherwise, val is unchanged and
The divisions here are integer division.
After this update, the range is normalized using a procedure very similar to that of , implemented by ec_enc_normalize() (entenc.c). The following process is repeated until rng > 2**23. First, the top 9 bits of val, (val>>23), are sent to the carry buffer, described in . Then, the encoder sets
The function ec_enc_carry_out() (entenc.c) implements carry propagation and output buffering. It takes as input a 9-bit value, c, consisting of 8 data bits and an additional carry bit. If c is equal to the value 255, then ext is simply incremented, and no other state updates are performed. Otherwise, let b = (c>>8) be the carry bit. Then, If the buffered byte rem contains a value other than -1, the encoder outputs the byte (rem + b). Otherwise, if rem is -1, no byte is output. If ext is non-zero, then the encoder outputs ext bytes---all with a value of 0 if b is set, or 255 if b is unset---and sets ext to 0. rem is set to the 8 data bits:
The reference implementation uses three additional encoding methods that are exactly equivalent to the above, but make assumptions and simplifications that allow for a more efficient implementation.
The first is ec_encode_bin() (entenc.c), defined using the parameter ftb instead of ft. It is mathematically equivalent to calling ec_encode() with ft = (1<<ftb), but avoids using division.
The next is ec_enc_bit_logp() (entenc.c), which encodes a single binary symbol. The context is described by a single parameter, logp, which is the absolute value of the base-2 logarithm of the probability of a "1". It is mathematically equivalent to calling ec_encode() with the 3-tuple (fl[k] = 0, fh[k] = (1<<logp) - 1, ft = (1<<logp)) if k is 0 and with (fl[k] = (1<<logp) - 1, fh[k] = ft = (1<<logp)) if k is 1. The implementation requires no multiplications or divisions.
The last is ec_enc_icdf() (entenc.c), which encodes a single binary symbol with a table-based context of up to 8 bits. This uses the same icdf table as ec_dec_icdf() from . The function is mathematically equivalent to calling ec_encode() with fl[k] = (1<<ftb) - icdf[k-1] (or 0 if k == 0), fh[k] = (1<<ftb) - icdf[k], and ft = (1<<ftb). This only saves a few arithmetic operations over ec_encode_bin(), but allows the encoder to use the same icdf tables as the decoder.
The raw bits used by the CELT layer are packed at the end of the buffer using ec_enc_bits() (entenc.c). Because the raw bits may continue into the last byte output by the range coder if there is room in the low-order bits, the encoder must be prepared to merge these values into a single byte. The procedure in does this in a way that ensures both the range coded data and the raw bits can be decoded successfully.
The function ec_enc_uint() (entenc.c) encodes one of ft equiprobable symbols in the range 0 to (ft - 1), inclusive, each with a frequency of 1, where ft may be as large as (2**32 - 1). Like the decoder (see ), it splits up the value into a range coded symbol representing up to 8 of the high bits, and, if necessary, raw bits representing the remainder of the value. ec_enc_uint() takes a two-tuple (t, ft), where t is the value to be encoded, 0 <= t < ft, and ft is not necessarily a power of two. Let ftb = ilog(ft - 1), i.e., the number of bits required to store (ft - 1) in two's complement notation. If ftb is 8 or less, then t is encoded directly using ec_encode() with the three-tuple (t, t + 1, ft). If ftb is greater than 8, then the top 8 bits of t are encoded using the three-tuple (t>>(ftb - 8), (t>>(ftb - 8)) + 1, ((ft - 1)>>(ftb - 8)) + 1), and the remaining bits, (t & ((1<<(ftb - 8)) - 1), are encoded as raw bits with ec_enc_bits().
After all symbols are encoded, the stream must be finalized by outputting a value inside the current range. Let end be the integer in the interval [val, val + rng) with the largest number of trailing zero bits, b, such that (end + (1<<b) - 1) is also in the interval [val, val + rng). This choice of end allows the maximum number of trailing bits to be set to arbitrary values while still ensuring the range coded part of the buffer can be decoded correctly. Then, while end is not zero, the top 9 bits of end, i.e., (end>>23), are passed to the carry buffer in accordance with the procedure in , and end is updated via
Finally, if the buffered output byte, rem, is neither zero nor the special value -1, or the carry count, ext, is greater than zero, then 9 zero bits are sent to the carry buffer to flush it to the output buffer. When outputting the final byte from the range coder, if it would overlap any raw bits already packed into the end of the output buffer, they should be ORed into the same byte. The bit allocation routines in the CELT layer should ensure that this can be done without corrupting the range coder data so long as end is chosen as described above. If there is any space between the end of the range coder data and the end of the raw bits, it is padded with zero bits. This entire process is implemented by ec_enc_done() (entenc.c).
The bit allocation routines in Opus need to be able to determine a conservative upper bound on the number of bits that have been used to encode the current frame thus far. This drives allocation decisions and ensures that the range coder and raw bits will not overflow the output buffer. This is computed in the reference implementation to whole-bit precision by the function ec_tell() (entcode.h) and to fractional 1/8th bit precision by the function ec_tell_frac() (entcode.c). Like all operations in the range coder, it must be implemented in a bit-exact manner, and must produce exactly the same value returned by the same functions in the decoder after decoding the same symbols.
In many respects the SILK encoder mirrors the SILK decoder described in . Details such as the quantization and range coder tables can be found there, while this section describes the high-level design choices that were made. The diagram below shows the basic modules of the SILK encoder.
| Rate |--->| Mixing |--->| Core |----------> Input |Conversion| | | | Encoder | Bitstream +----------+ +--------+ +---------+ ]]>
The input signal's sampling rate is adjusted by a sample rate conversion module so that it matches the SILK internal sampling rate. The input to the sample rate converter is delayed by a number of samples depending on the sample rate ratio, such that the overall delay is constant for all input and output sample rates.
The stereo mixer is only used for stereo input signals. It converts a stereo left/right signal into an adaptive mid/side representation. The first step is to compute non-adaptive mid/side signals as half the sum and difference between left and right signals. The side signal is then minimized in energy by subtracting a prediction of it based on the mid signal. This prediction works well when the left and right signals exhibit linear dependency, for instance for an amplitude-panned input signal. Like in the decoder, the prediction coefficients are linearly interpolated during the first 8 ms of the frame. The mid signal is always encoded, whereas the residual side signal is only encoded if it has sufficient energy compared to the mid signal's energy. If it has not, the "mid_only_flag" is set without encoding the side signal. The predictor coefficients are coded regardless of whether the side signal is encoded. For each frame, two predictor coefficients are computed, one that predicts between low-passed mid and side channels, and one that predicts between high-passed mid and side channels. The low-pass filter is a simple three-tap filter and creates a delay of one sample. The high-pass filtered signal is the difference between the mid signal delayed by one sample and the low-passed signal. Instead of explicitly computing the high-passed signal, it is computationally more efficient to transform the prediction coefficients before applying them to the filtered mid signal, as follows
where w0 and w1 are the low-pass and high-pass prediction coefficients, mid(n-1) is the mid signal delayed by one sample, LP(n) and HP(n) are the low-passed and high-passed signals and pred(n) is the prediction signal that is subtracted from the side signal.
What follows is a description of the core encoder and its components. For simplicity, the core encoder is referred to simply as the encoder in the remainder of this section. An overview of the encoder is given in .
| | +---------+ | +---------+ | | |Voice | | |LTP |12 | | +-->|Activity |--+ +----->|Scaling |-----------+---->| | | |Detector |3 | | |Control |<--+ | | | | +---------+ | | +---------+ | | | | | | | +---------+ | | | | | | | |Gains | | | | | | | | +-->|Processor|---|---+---|---->| R | | | | | | |11 | | | | a | | \/ | | +---------+ | | | | n | | +---------+ | | +---------+ | | | | g | | |Pitch | | | |LSF | | | | | e | | +->|Analysis |---+ | |Quantizer|---|---|---|---->| | | | | |4 | | | |8 | | | | E |--> | | +---------+ | | +---------+ | | | | n | 2 | | | | 9/\ 10| | | | | c | | | | | | \/ | | | | o | | | +---------+ | | +----------+ | | | | d | | | |Noise | +--|-->|Prediction|--+---|---|---->| e | | +->|Shaping |---|--+ |Analysis |7 | | | | r | | | |Analysis |5 | | | | | | | | | | | +---------+ | | +----------+ | | | | | | | | | /\ | | | | | | | +----------|--|--------+ | | | | | | | | \/ \/ \/ \/ \/ | | | | | +---------+ +------------+ | | | | | | | |Noise | | | -+-------+-----+------>|Prefilter|--------->|Shaping |-->| | 1 | | 6 |Quantization|13 | | +---------+ +------------+ +---+ 1: Input speech signal 2: Range encoded bitstream 3: Voice activity estimate 4: Pitch lags (per 5 ms) and voicing decision (per 20 ms) 5: Noise shaping quantization coefficients - Short term synthesis and analysis noise shaping coefficients (per 5 ms) - Long term synthesis and analysis noise shaping coefficients (per 5 ms and for voiced speech only) - Noise shaping tilt (per 5 ms) - Quantizer gain/step size (per 5 ms) 6: Input signal filtered with analysis noise shaping filters 7: Short and long term prediction coefficients LTP (per 5 ms) and LPC (per 20 ms) 8: LSF quantization indices 9: LSF coefficients 10: Quantized LSF coefficients 11: Processed gains, and synthesis noise shape coefficients 12: LTP state scaling coefficient. Controlling error propagation / prediction gain trade-off 13: Quantized signal ]]>
The input signal is processed by a Voice Activity Detector (VAD) to produce a measure of voice activity, spectral tilt, and signal-to-noise estimates for each frame. The VAD uses a sequence of half-band filterbanks to split the signal into four subbands: 0...Fs/16, Fs/16...Fs/8, Fs/8...Fs/4, and Fs/4...Fs/2, where Fs is the sampling frequency (8, 12, 16, or 24 kHz). The lowest subband, from 0 - Fs/16, is high-pass filtered with a first-order moving average (MA) filter (with transfer function H(z) = 1-z**(-1)) to reduce the energy at the lowest frequencies. For each frame, the signal energy per subband is computed. In each subband, a noise level estimator tracks the background noise level and a Signal-to-Noise Ratio (SNR) value is computed as the logarithm of the ratio of energy to noise level. Using these intermediate variables, the following parameters are calculated for use in other SILK modules: Average SNR. The average of the subband SNR values. Smoothed subband SNRs. Temporally smoothed subband SNR values. Speech activity level. Based on the average SNR and a weighted average of the subband energies. Spectral tilt. A weighted average of the subband SNRs, with positive weights for the low subbands and negative weights for the high subbands.
The input signal is processed by the open loop pitch estimator shown in .
|sampling|->|Correlator| | | | | | | |4 | +--------+ +----------+ \/ | | 2 +-------+ | | +-->|Speech |5 +---------+ +--------+ | \/ | |Type |-> |LPC | |Down | | +----------+ | | +->|Analysis | +->|sample |-+------------->|Time- | +-------+ | | | | |to 8 kHz| |Correlator|-----------> | +---------+ | +--------+ |__________| 6 | | | |3 | \/ | \/ | +---------+ | +----------+ | |Whitening| | |Time- | -+->|Filter |-+--------------------------->|Correlator|-----------> 1 | | | | 7 +---------+ +----------+ 1: Input signal 2: Lag candidates from stage 1 3: Lag candidates from stage 2 4: Correlation threshold 5: Voiced/unvoiced flag 6: Pitch correlation 7: Pitch lags ]]>
The pitch analysis finds a binary voiced/unvoiced classification, and, for frames classified as voiced, four pitch lags per frame - one for each 5 ms subframe - and a pitch correlation indicating the periodicity of the signal. The input is first whitened using a Linear Prediction (LP) whitening filter, where the coefficients are computed through standard Linear Prediction Coding (LPC) analysis. The order of the whitening filter is 16 for best results, but is reduced to 12 for medium complexity and 8 for low complexity modes. The whitened signal is analyzed to find pitch lags for which the time correlation is high. The analysis consists of three stages for reducing the complexity: In the first stage, the whitened signal is downsampled to 4 kHz (from 8 kHz) and the current frame is correlated to a signal delayed by a range of lags, starting from a shortest lag corresponding to 500 Hz, to a longest lag corresponding to 56 Hz. The second stage operates on an 8 kHz signal (downsampled from 12, 16, or 24 kHz) and measures time correlations only near the lags corresponding to those that had sufficiently high correlations in the first stage. The resulting correlations are adjusted for a small bias towards short lags to avoid ending up with a multiple of the true pitch lag. The highest adjusted correlation is compared to a threshold depending on: Whether the previous frame was classified as voiced The speech activity level The spectral tilt. If the threshold is exceeded, the current frame is classified as voiced and the lag with the highest adjusted correlation is stored for a final pitch analysis of the highest precision in the third stage. The last stage operates directly on the whitened input signal to compute time correlations for each of the four subframes independently in a narrow range around the lag with highest correlation from the second stage.
The noise shaping analysis finds gains and filter coefficients used in the prefilter and noise shaping quantizer. These parameters are chosen such that they will fulfill several requirements: Balancing quantization noise and bitrate. The quantization gains determine the step size between reconstruction levels of the excitation signal. Therefore, increasing the quantization gain amplifies quantization noise, but also reduces the bitrate by lowering the entropy of the quantization indices. Spectral shaping of the quantization noise; the noise shaping quantizer is capable of reducing quantization noise in some parts of the spectrum at the cost of increased noise in other parts without substantially changing the bitrate. By shaping the noise such that it follows the signal spectrum, it becomes less audible. In practice, best results are obtained by making the shape of the noise spectrum slightly flatter than the signal spectrum. De-emphasizing spectral valleys; by using different coefficients in the analysis and synthesis part of the prefilter and noise shaping quantizer, the levels of the spectral valleys can be decreased relative to the levels of the spectral peaks such as speech formants and harmonics. This reduces the entropy of the signal, which is the difference between the coded signal and the quantization noise, thus lowering the bitrate. Matching the levels of the decoded speech formants to the levels of the original speech formants; an adjustment gain and a first order tilt coefficient are computed to compensate for the effect of the noise shaping quantization on the level and spectral tilt.
Frequency 1: Input signal spectrum 2: De-emphasized and level matched spectrum 3: Quantization noise spectrum ]]>
shows an example of an input signal spectrum (1). After de-emphasis and level matching, the spectrum has deeper valleys (2). The quantization noise spectrum (3) more or less follows the input signal spectrum, while having slightly less pronounced peaks. The entropy, which provides a lower bound on the bitrate for encoding the excitation signal, is proportional to the area between the de-emphasized spectrum (2) and the quantization noise spectrum (3). Without de-emphasis, the entropy is proportional to the area between input spectrum (1) and quantization noise (3) - clearly higher.
The transformation from input signal to de-emphasized signal can be described as a filtering operation with a filter
having an adjustment gain G, a first order tilt adjustment filter with tilt coefficient c_tilt, and where
is the analysis part of the de-emphasis filter, consisting of the short-term shaping filter with coefficients a_ana(k), and the long-term shaping filter with coefficients b_ana(k) and pitch lag L. The parameter d determines the number of long-term shaping filter taps.
Similarly, but without the tilt adjustment, the synthesis part can be written as
All noise shaping parameters are computed and applied per subframe of 5 ms. First, an LPC analysis is performed on a windowed signal block of 15 ms. The signal block has a look-ahead of 5 ms relative to the current subframe, and the window is an asymmetric sine window. The LPC analysis is done with the autocorrelation method, with an order of between 8, in lowest-complexity mode, and 16, for best quality. Optionally the LPC analysis and noise shaping filters are warped by replacing the delay elements by first-order allpass filters. This increases the frequency resolution at low frequencies and reduces it at high ones, which better matches the human auditory system and improves quality. The warped analysis and filtering comes at a cost in complexity and is therefore only done in higher complexity modes. The quantization gain is found by taking the square root of the residual energy from the LPC analysis and multiplying it by a value inversely proportional to the coding quality control parameter and the pitch correlation. Next the two sets of short-term noise shaping coefficients a_ana(k) and a_syn(k) are obtained by applying different amounts of bandwidth expansion to the coefficients found in the LPC analysis. This bandwidth expansion moves the roots of the LPC polynomial towards the origin, using the formulas
where a(k) is the k'th LPC coefficient, and the bandwidth expansion factors g_ana and g_syn are calculated as
where C is the coding quality control parameter between 0 and 1. Applying more bandwidth expansion to the analysis part than to the synthesis part gives the desired de-emphasis of spectral valleys in between formants.
The long-term shaping is applied only during voiced frames. It uses three filter taps, described by
For unvoiced frames these coefficients are set to 0. The multiplication factors F_ana and F_syn are chosen between 0 and 1, depending on the coding quality control parameter, as well as the calculated pitch correlation and smoothed subband SNR of the lowest subband. By having F_ana less than F_syn, the pitch harmonics are emphasized relative to the valleys in between the harmonics.
The tilt coefficient c_tilt is for unvoiced frames chosen as
and as
for voiced frames, where V is the voice activity level between 0 and 1.
The adjustment gain G serves to correct any level mismatch between the original and decoded signals that might arise from the noise shaping and de-emphasis. This gain is computed as the ratio of the prediction gain of the short-term analysis and synthesis filter coefficients. The prediction gain of an LPC synthesis filter is the square root of the output energy when the filter is excited by a unit-energy impulse on the input. An efficient way to compute the prediction gain is by first computing the reflection coefficients from the LPC coefficients through the step-down algorithm, and extracting the prediction gain from the reflection coefficients as
where r_k is the k'th reflection coefficient.
Initial values for the quantization gains are computed as the square-root of the residual energy of the LPC analysis, adjusted by the coding quality control parameter. These quantization gains are later adjusted based on the results of the prediction analysis.
The prediction analysis is performed in one of two ways depending on how the pitch estimator classified the frame. The processing for voiced and unvoiced speech is described in and , respectively. Inputs to this function include the pre-whitened signal from the pitch estimator (see ).
For a frame of voiced speech the pitch pulses will remain dominant in the pre-whitened input signal. Further whitening is desirable as it leads to higher quality at the same available bitrate. To achieve this, a Long-Term Prediction (LTP) analysis is carried out to estimate the coefficients of a fifth-order LTP filter for each of four subframes. The LTP coefficients are quantized using the method described in , and the quantized LTP coefficients are used to compute the LTP residual signal. This LTP residual signal is the input to an LPC analysis where the LPC coefficients are estimated using Burg's method , such that the residual energy is minimized. The estimated LPC coefficients are converted to a Line Spectral Frequency (LSF) vector and quantized as described in . After quantization, the quantized LSF vector is converted back to LPC coefficients using the full procedure in . By using quantized LTP coefficients and LPC coefficients derived from the quantized LSF coefficients, the encoder remains fully synchronized with the decoder. The quantized LPC and LTP coefficients are also used to filter the input signal and measure residual energy for each of the four subframes.
For a speech signal that has been classified as unvoiced, there is no need for LTP filtering, as it has already been determined that the pre-whitened input signal is not periodic enough within the allowed pitch period range for LTP analysis to be worth the cost in terms of complexity and bitrate. The pre-whitened input signal is therefore discarded, and instead the input signal is used for LPC analysis using Burg's method. The resulting LPC coefficients are converted to an LSF vector and quantized as described in the following section. They are then transformed back to obtain quantized LPC coefficients, which are then used to filter the input signal and measure residual energy for each of the four subframes.
The main purpose of linear prediction in SILK is to reduce the bitrate by minimizing the residual energy. At least at high bitrates, perceptual aspects are handled independently by the noise shaping filter. Burg's method is used because it provides higher prediction gain than the autocorrelation method and, unlike the covariance method, produces stable filters (assuming numerical errors don't spoil that). SILK's implementation of Burg's method is also computationally faster than the autocovariance method. The implementation of Burg's method differs from traditional implementations in two aspects. The first difference is that it operates on autocorrelations, similar to the Schur algorithm , but with a simple update to the autocorrelations after finding each reflection coefficient to make the result identical to Burg's method. This brings down the complexity of Burg's method to near that of the autocorrelation method. The second difference is that the signal in each subframe is scaled by the inverse of the residual quantization step size. Subframes with a small quantization step size will on average spend more bits for a given amount of residual energy than subframes with a large step size. Without scaling, Burg's method minimizes the total residual energy in all subframes, which doesn't necessarily minimize the total number of bits needed for coding the quantized residual. The residual energy of the scaled subframes is a better measure for that number of bits.
Unlike many other speech codecs, SILK uses variable bitrate coding for the LSFs. This improves the average rate-distortion (R-D) tradeoff and reduces outliers. The variable bitrate coding minimizes a linear combination of the weighted quantization errors and the bitrate. The weights for the quantization errors are the Inverse Harmonic Mean Weighting (IHMW) function proposed by Laroia et al. (see ). These weights are referred to here as Laroia weights. The LSF quantizer consists of two stages. The first stage is an (unweighted) vector quantizer (VQ), with a codebook size of 32 vectors. The quantization errors for the codebook vector are sorted, and for the N best vectors a second stage quantizer is run. By varying the number N a tradeoff is made between R-D performance and computational efficiency. For each of the N codebook vectors the Laroia weights corresponding to that vector (and not to the input vector) are calculated. Then the residual between the input LSF vector and the codebook vector is scaled by the square roots of these Laroia weights. This scaling partially normalizes error sensitivity for the residual vector, so that a uniform quantizer with fixed step sizes can be used in the second stage without too much performance loss. And by scaling with Laroia weights determined from the first-stage codebook vector, the process can be reversed in the decoder. The second stage uses predictive delayed decision scalar quantization. The quantization error is weighted by Laroia weights determined from the LSF input vector. The predictor multiplies the previous quantized residual value by a prediction coefficient that depends on the vector index from the first stage VQ and on the location in the LSF vector. The prediction is subtracted from the LSF residual value before quantizing the result, and added back afterwards. This subtraction can be interpreted as shifting the quantization levels of the scalar quantizer, and as a result the quantization error of each value depends on the quantization decision of the previous value. This dependency is exploited by the delayed decision mechanism to search for a quantization sequency with best R-D performance with a Viterbi-like algorithm . The quantizer processes the residual LSF vector in reverse order (i.e., it starts with the highest residual LSF value). This is done because the prediction works slightly better in the reverse direction. The quantization index of the first stage is entropy coded. The quantization sequence from the second stage is also entropy coded, where for each element the probability table is chosen depending on the vector index from the first stage and the location of that element in the LSF vector.
If the input is stable, finding the best candidate usually results in a quantized vector that is also stable. Because of the two-stage approach, however, it is possible that the best quantization candidate is unstable. The encoder applies the same stabilization procedure applied by the decoder (see to ensure the LSF parameters are within their valid range, increasingly sorted, and have minimum distances between each other and the border values.
For voiced frames, the prediction analysis described in resulted in four sets (one set per subframe) of five LTP coefficients, plus four weighting matrices. The LTP coefficients for each subframe are quantized using entropy constrained vector quantization. A total of three vector codebooks are available for quantization, with different rate-distortion trade-offs. The three codebooks have 10, 20, and 40 vectors and average rates of about 3, 4, and 5 bits per vector, respectively. Consequently, the first codebook has larger average quantization distortion at a lower rate, whereas the last codebook has smaller average quantization distortion at a higher rate. Given the weighting matrix W_ltp and LTP vector b, the weighted rate-distortion measure for a codebook vector cb_i with rate r_i is give by
where u is a fixed, heuristically-determined parameter balancing the distortion and rate. Which codebook gives the best performance for a given LTP vector depends on the weighting matrix for that LTP vector. For example, for a low valued W_ltp, it is advantageous to use the codebook with 10 vectors as it has a lower average rate. For a large W_ltp, on the other hand, it is often better to use the codebook with 40 vectors, as it is more likely to contain the best codebook vector. The weighting matrix W_ltp depends mostly on two aspects of the input signal. The first is the periodicity of the signal; the more periodic, the larger W_ltp. The second is the change in signal energy in the current subframe, relative to the signal one pitch lag earlier. A decaying energy leads to a larger W_ltp than an increasing energy. Both aspects fluctuate relatively slowly, which causes the W_ltp matrices for different subframes of one frame often to be similar. Because of this, one of the three codebooks typically gives good performance for all subframes, and therefore the codebook search for the subframe LTP vectors is constrained to only allow codebook vectors to be chosen from the same codebook, resulting in a rate reduction.
To find the best codebook, each of the three vector codebooks is used to quantize all subframe LTP vectors and produce a combined weighted rate-distortion measure for each vector codebook. The vector codebook with the lowest combined rate-distortion over all subframes is chosen. The quantized LTP vectors are used in the noise shaping quantizer, and the index of the codebook plus the four indices for the four subframe codebook vectors are passed on to the range encoder.
In the prefilter the input signal is filtered using the spectral valley de-emphasis filter coefficients from the noise shaping analysis (see ). By applying only the noise shaping analysis filter to the input signal, it provides the input to the noise shaping quantizer.
The noise shaping quantizer independently shapes the signal and coding noise spectra to obtain a perceptually higher quality at the same bitrate. The prefilter output signal is multiplied with a compensation gain G computed in the noise shaping analysis. Then the output of a synthesis shaping filter is added, and the output of a prediction filter is subtracted to create a residual signal. The residual signal is multiplied by the inverse quantized quantization gain from the noise shaping analysis, and input to a scalar quantizer. The quantization indices of the scalar quantizer represent a signal of pulses that is input to the pyramid range encoder. The scalar quantizer also outputs a quantization signal, which is multiplied by the quantized quantization gain from the noise shaping analysis to create an excitation signal. The output of the prediction filter is added to the excitation signal to form the quantized output signal y(n). The quantized output signal y(n) is input to the synthesis shaping and prediction filters. Optionally the noise shaping quantizer operates in a delayed decision mode. In this mode it uses a Viterbi algorithm to keep track of multiple rounding choices in the quantizer and select the best one after a delay of 32 samples. This improves the rate/distortion performance of the quantizer.
SILK was designed to run in Variable Bitrate (VBR) mode. However the reference implementation also has a Constant Bitrate (CBR) mode for SILK. In CBR mode SILK will attempt to encode each packet with no more than the allowed number of bits. The Opus wrapper code then pads the bitstream if any unused bits are left in SILK mode, or encodes the high band with the remaining number of bits in Hybrid mode. The number of payload bits is adjusted by changing the quantization gains and the rate/distortion tradeoff in the noise shaping quantizer, in an iterative loop around the noise shaping quantizer and entropy coding. Compared to the SILK VBR mode, the CBR mode has lower audio quality at a given average bitrate, and also has higher computational complexity.
Most of the aspects of the CELT encoder can be directly derived from the description of the decoder. For example, the filters and rotations in the encoder are simply the inverse of the operation performed by the decoder. Similarly, the quantizers generally optimize for the mean square error (because noise shaping is part of the bit-stream itself), so no special search is required. For this reason, only the less straightforward aspects of the encoder are described here.
The pitch prefilter is applied after the pre-emphasis. It is applied in such a way as to be the inverse of the decoder's post-filter. The main non-obvious aspect of the prefilter is the selection of the pitch period. The pitch search should be optimized for the following criteria: continuity: it is important that the pitch period does not change abruptly between frames; and avoidance of pitch multiples: when the period used is a multiple of the real period (lower frequency fundamental), the post-filter loses most of its ability to reduce noise
The MDCT output is divided into bands that are designed to match the ear's critical bands for the smallest (2.5 ms) frame size. The larger frame sizes use integer multiples of the 2.5 ms layout. For each band, the encoder computes the energy that will later be encoded. Each band is then normalized by the square root of the unquantized energy, such that each band now forms a unit vector X. The energy and the normalization are computed by compute_band_energies() and normalise_bands() (bands.c), respectively.
Energy quantization (both coarse and fine) can be easily understood from the decoding process. For all useful bitrates, the coarse quantizer always chooses the quantized log energy value that minimizes the error for each band. Only at very low rate does the encoder allow larger errors to minimize the rate and avoid using more bits than are available. When the available CPU requirements allow it, it is best to try encoding the coarse energy both with and without inter-frame prediction such that the best prediction mode can be selected. The optimal mode depends on the coding rate, the available bitrate, and the current rate of packet loss. The fine energy quantizer always chooses the quantized log energy value that minimizes the error for each band because the rate of the fine quantization depends only on the bit allocation and not on the values that are coded.
The encoder must use exactly the same bit allocation process as used by the decoder and described in . The three mechanisms that can be used by the encoder to adjust the bitrate on a frame-by-frame basis are band boost, allocation trim, and band skipping.
The reference encoder makes a decision to boost a band when the energy of that band is significantly higher than that of the neighboring bands. Let E_j be the log-energy of band j, we define D_j = 2*E_j - E_j-1 - E_j+1 The allocation of band j is boosted once if D_j > t1 and twice if D_j > t2. For LM>=1, t1=2 and t2=4, while for LM<1, t1=3 and t2=5.
The allocation trim is a value between 0 and 10 (inclusively) that controls the allocation balance between the low and high frequencies. The encoder starts with a safe "default" of 5 and deviates from that default in two different ways. First the trim can deviate by +/- 2 depending on the spectral tilt of the input signal. For signals with more low frequencies, the trim is increased by up to 2, while for signals with more high frequencies, the trim is decreased by up to 2. For stereo inputs, the trim value can be decreased by up to 4 when the inter-channel correlation at low frequency (first 8 bands) is high.
The encoder uses band skipping to ensure that the shape of the bands is only coded if there is at least 1/2 bit per sample available for the PVQ. If not, then no bit is allocated and folding is used instead. To ensure continuity in the allocation, some amount of hysteresis is added to the process, such that a band that received PVQ bits in the previous frame only needs 7/16 bit/sample to be coded for the current frame, while a band that did not receive PVQ bits in the previous frames needs at least 9/16 bit/sample to be coded.
Because CELT applies mid-side stereo coupling in the normalized domain, it does not suffer from important stereo image problems even when the two channels are completely uncorrelated. For this reason it is always safe to use stereo coupling on any audio frame. That being said, there are some frames for which dual (independent) stereo is still more efficient. This decision is made by comparing the estimated entropy with and without coupling over the first 13 bands, taking into account the fact that all bands with more than two MDCT bins require one extra degree of freedom when coded in mid-side. Let L1_ms and L1_lr be the L1-norm of the mid-side vector and the L1-norm of the left-right vector, respectively. The decision to use mid-side is made if and only if
where bins is the number of MDCT bins in the first 13 bands and E is the number of extra degrees of freedom for mid-side coding. For LM>1, E=13, otherwise E=5.
The reference encoder decides on the intensity stereo threshold based on the bitrate alone. After taking into account the frame size by subtracting 80 bits per frame for coarse energy, the first band using intensity coding is as follows: bitrate (kb/s) start band <35 8 35-50 12 50-68 16 84-84 18 84-102 19 102-130 20 >130 disabled
The choice of time-frequency resolution used in is based on R-D optimization. The distortion is the L1-norm (sum of absolute values) of each band after each TF resolution under consideration. The L1 norm is used because it represents the entropy for a Laplacian source. The number of bits required to code a change in TF resolution between two bands is higher than the cost of having those two bands use the same resolution, which is what requires the R-D optimization. The optimal decision is computed using the Viterbi algorithm. See tf_analysis() in celt/celt.c.
The choice of the spreading value in has an impact on the nature of the coding noise introduced by CELT. The larger the f_r value, the lower the impact of the rotation, and the more tonal the coding noise. The more tonal the signal, the more tonal the noise should be, so the CELT encoder determines the optimal value for f_r by estimating how tonal the signal is. The tonality estimate is based on discrete pdf (4-bin histogram) of each band. Bands that have a large number of small values are considered more tonal and a decision is made by combining all bands with more than 8 samples. See spreading_decision() in celt/bands.c.
CELT uses a Pyramid Vector Quantization (PVQ) codebook for quantizing the details of the spectrum in each band that have not been predicted by the pitch predictor. The PVQ codebook consists of all sums of K signed pulses in a vector of N samples, where two pulses at the same position are required to have the same sign. Thus the codebook includes all integer codevectors y of N dimensions that satisfy sum(abs(y(j))) = K. In bands where there are sufficient bits allocated PVQ is used to encode the unit vector that results from the normalization in directly. Given a PVQ codevector y, the unit vector X is obtained as X = y/||y||, where ||.|| denotes the L2 norm.
The search for the best codevector y is performed by alg_quant() (vq.c). There are several possible approaches to the search, with a trade-off between quality and complexity. The method used in the reference implementation computes an initial codeword y1 by projecting the normalized spectrum X onto the codebook pyramid of K-1 pulses: y0 = truncate_towards_zero( (K-1) * X / sum(abs(X))) Depending on N, K and the input data, the initial codeword y0 may contain from 0 to K-1 non-zero values. All the remaining pulses, with the exception of the last one, are found iteratively with a greedy search that minimizes the normalized correlation between y and X:
The search described above is considered to be a good trade-off between quality and computational cost. However, there are other possible ways to search the PVQ codebook and the implementers MAY use any other search methods. See alg_quant() in celt/vq.c.
The vector to encode, X, is converted into an index i such that 0 <= i < V(N,K) as follows. Let i = 0 and k = 0. Then for j = (N - 1) down to 0, inclusive, do: If k > 0, set i = i + (V(N-j-1,k-1) + V(N-j,k-1))/2. Set k = k + abs(X[j]). If X[j] < 0, set i = i + (V(N-j-1,k) + V(N-j,k))/2. The index i is then encoded using the procedure in with ft = V(N,K).
It is our intention to allow the greatest possible choice of freedom in implementing the specification. For this reason, outside of the exceptions noted in this section, conformance is defined through the reference implementation of the decoder provided in . Although this document includes an English description of the codec, should the description contradict the source code of the reference implementation, the latter shall take precedence. Compliance with this specification means that in addition to following the normative keywords in this document, a decoder's output MUST also be within the thresholds specified by the opus_compare.c tool (included with the code) when compared to the reference implementation for each of the test vectors provided (see ) and for each output sampling rate and channel count supported. In addition, a compliant decoder implementation MUST have the same final range decoder state as that of the reference decoder. It is therefore RECOMMENDED that the decoder implement the same functional behavior as the reference. A decoder implementation is not required to support all output sampling rates or all output channel counts.
Using the reference code provided in , a test vector can be decoded with opus_demo -d <rate> <channels> testvectorX.bit testX.out where <rate> is the sampling rate and can be 8000, 12000, 16000, 24000, or 48000, and <channels> is 1 for mono or 2 for stereo. If the range decoder state is incorrect for one of the frames, the decoder will exit with "Error: Range coder state mismatch between encoder and decoder". If the decoder succeeds, then the output can be compared with the "reference" output with opus_compare -s -r <rate> testvectorX.dec testX.out for stereo or opus_compare -r <rate> testvectorX.dec testX.out for mono. In addition to indicating whether the test vector comparison passes, the opus_compare tool outputs an "Opus quality metric" that indicates how well the tested decoder matches the reference implementation. A quality of 0 corresponds to the passing threshold, while a quality of 100 is the highest possible value and means that the output of the tested decoder is identical to the reference implementation. The passing threshold (quality 0) was calibrated in such a way that it corresponds to additive white noise with a 48 dB SNR (similar to what can be obtained on a cassette deck). It is still possible for an implementation to sound very good with such a low quality measure (e.g. if the deviation is due to inaudible phase distortion), but unless this is verified by listening tests, it is RECOMMENDED that implementations achieve a quality above 90 for 48 kHz decoding. For other sampling rates, it is normal for the quality metric to be lower (typically as low as 50 even for a good implementation) because of harmless mismatch with the delay and phase of the internal sampling rate conversion. On POSIX environments, the run_vectors.sh script can be used to verify all test vectors. This can be done with run_vectors.sh <exec path> <vector path> <rate> where <exec path> is the directory where the opus_demo and opus_compare executables are built and <vector path> is the directory containing the test vectors.
Opus Custom is an OPTIONAL part of the specification that is defined to handle special sample rates and frame rates that are not supported by the main Opus specification. Use of Opus Custom is discouraged for all but very special applications for which a frame size different from 2.5, 5, 10, or 20 ms is needed (for either complexity or latency reasons). Because Opus Custom is optional, streams encoded using Opus Custom cannot be expected to be decodable by all Opus implementations. Also, because no in-band mechanism exists for specifying the sampling rate and frame size of Opus Custom streams, out-of-band signaling is required. In Opus Custom operation, only the CELT layer is available, using the opus_custom_* function calls in opus_custom.h.
Implementations of the Opus codec need to take appropriate security considerations into account, as outlined in . It is extremely important for the decoder to be robust against malicious payloads. Malicious payloads must not cause the decoder to overrun its allocated memory or to take an excessive amount of resources to decode. Although problems in encoders are typically rarer, the same applies to the encoder. Malicious audio streams must not cause the encoder to misbehave because this would allow an attacker to attack transcoding gateways. The reference implementation contains no known buffer overflow or cases where a specially crafted packet or audio segment could cause a significant increase in CPU load. However, on certain CPU architectures where denormalized floating-point operations are much slower than normal floating-point operations, it is possible for some audio content (e.g., silence or near-silence) to cause an increase in CPU load. Denormals can be introduced by reordering operations in the compiler and depend on the target architecture, so it is difficult to guarantee that an implementation avoids them. For architectures on which denormals are problematic, adding very small floating-point offsets to the affected signals to prevent significant numbers of denormalized operations is RECOMMENDED. Alternatively, it is often possible to configure the hardware to treat denormals as zero (DAZ). No such issue exists for the fixed-point reference implementation. The reference implementation was validated in the following conditions: Sending the decoder valid packets generated by the reference encoder and verifying that the decoder's final range coder state matches that of the encoder. Sending the decoder packets generated by the reference encoder and then subjected to random corruption. Sending the decoder random packets. Sending the decoder packets generated by a version of the reference encoder modified to make random coding decisions (internal fuzzing), including mode switching, and verifying that the range coder final states match. In all of the conditions above, both the encoder and the decoder were run inside the Valgrind memory debugger, which tracks reads and writes to invalid memory regions as well as the use of uninitialized memory. There were no errors reported on any of the tested conditions.
This document has no actions for IANA.
Thanks to all other developers, including Raymond Chen, Soeren Skak Jensen, Gregory Maxwell, Christopher Montgomery, and Karsten Vandborg Soerensen. We would also like to thank Igor Dyakonov, Jan Skoglund, and Christian Hoene for their help with subjective testing of the Opus codec. Thanks to Ralph Giles, John Ridges, Ben Schwartz, Keith Yan, Christian Hoene, Kat Walsh, and many others on the Opus and CELT mailing lists for their bug reports and feedback.
The authors agree to grant third parties the irrevocable right to copy, use and distribute the work (excluding Code Components available under the simplified BSD license), with or without modification, in any medium, without royalty, provided that, unless separate permission is granted, redistributed modified works do not contain misleading author, version, name of work, or endorsement information.
Key words for use in RFCs to Indicate Requirement Levels Requirements for an Internet Audio Codec IETF This document provides specific requirements for an Internet audio codec. These requirements address quality, sample rate, bitrate, and packet-loss robustness, as well as other desirable properties. SILK Speech Codec Robust and Efficient Quantization of Speech LSP Parameters Using Structured Vector Quantization Constrained-Energy Lapped Transform (CELT) Codec Guidelines for the use of Variable Bit Rate Audio with Secure RTP Internet Denial-of-Service Considerations IAB This document provides an overview of possible avenues for denial-of-service (DoS) attack on Internet systems. The aim is to encourage protocol designers and network engineers towards designs that are more robust. We discuss partial solutions that reduce the effectiveness of attacks, and how some solutions might inadvertently open up alternative vulnerabilities. This memo provides information for the Internet community. Range encoding: An algorithm for removing redundancy from a digitised message Source coding algorithms for fast data compression A Pyramid Vector Quantizer The Computation of Line Spectral Frequencies Using Chebyshev Polynomials Valgrind website Google NetEQ code Google WebRTC code Opus Git Repository Opus website Vorbis website Matroska website Opus Testvectors (webside) Opus Testvectors (proceedings) Line Spectral Pairs Wikipedia Range Coding Wikipedia Hadamard Transform Wikipedia Viterbi Algorithm Wikipedia White Noise Wikipedia Linear Prediction Wikipedia Modified Discrete Cosine Transform Wikipedia Fast Fourier Transform Wikipedia Z-transform Wikipedia Maximum Entropy Spectral Analysis A fixed point computation of partial correlation coefficients Analysis/synthesis filter bank design based on time domain aliasing cancellation A High-Quality Speech and Audio Codec With Less Than 10 ms delay Subdivision of the audible frequency range into critical bands
This appendix contains the complete source code for the reference implementation of the Opus codec written in C. By default, this implementation relies on floating-point arithmetic, but it can be compiled to use only fixed-point arithmetic by defining the FIXED_POINT macro. Information on building and using the reference implementation is available in the README file. The implementation can be compiled with either a C89 or a C99 compiler. It is reasonably optimized for most platforms such that only architecture-specific optimizations are likely to be useful. The FFT used is a slightly modified version of the KISS-FFT library, but it is easy to substitute any other FFT library. While the reference implementation does not rely on any undefined behavior as defined by C89 or C99, it relies on common implementation-defined behavior for two's complement architectures: Right shifts of negative values are consistent with two's complement arithmetic, so that a>>b is equivalent to floor(a/(2**b)), For conversion to a signed integer of N bits, the value is reduced modulo 2**N to be within range of the type, The result of integer division of a negative value is truncated towards zero, and The compiler provides a 64-bit integer type (a C99 requirement which is supported by most C89 compilers). In its current form, the reference implementation also requires the following architectural characteristics to obtain acceptable performance: Two's complement arithmetic, At least a 16 bit by 16 bit integer multiplier (32-bit result), and At least a 32-bit adder/accumulator.
The complete source code can be extracted from this draft, by running the following command line: opus_source.tar.gz ]]> tar xzvf opus_source.tar.gz cd opus_source make On systems where the provided Makefile does not work, the following command line may be used to compile the source code: On systems where the base64 utility is not present, the following commands can be used instead: opus.b64 ]]> openssl base64 -d -in opus.b64 > opus_source.tar.gz
As of the time of publication of this memo, an up-to-date implementation conforming to this standard is available in a Git repository. Releases and other resources are available at . However, although that implementation is expected to remain conformant with the standard, it is the code in this document that shall remain normative.
Because of size constraints, the Opus test vectors are not distributed in this draft. They are available in the proceedings of the 83th IETF meeting (Paris) and from the Opus codec website at . These test vectors were created specifically to exercise all aspects of the decoder and therefore the audio quality of the decoded output is significantly lower than what Opus can achieve in normal operation. The SHA1 hash of the files in the test vector package are
To use the internal framing described in , the decoder must know the total length of the Opus packet, in bytes. This section describes a simple variation of that framing which can be used when the total length of the packet is not known. Nothing in the encoding of the packet itself allows a decoder to distinguish between the regular, undelimited framing and the self-delimiting framing described in this appendix. Which one is used and where must be established by context at the transport layer. It is RECOMMENDED that a transport layer choose exactly one framing scheme, rather than allowing an encoder to signal which one it wants to use. For example, although a regular Opus stream does not support more than two channels, a multi-channel Opus stream may be formed from several one- and two-channel streams. To pack an Opus packet from each of these streams together in a single packet at the transport layer, one could use the self-delimiting framing for all but the last stream, and then the regular, undelimited framing for the last one. Reverting to the undelimited framing for the last stream saves overhead (because the total size of the transport-layer packet will still be known), and ensures that a "multi-channel" stream which only has a single Opus stream uses the same framing as a regular Opus stream does. This avoids the need for signaling to distinguish these two cases. The self-delimiting framing is identical to the regular, undelimited framing from , except that each Opus packet contains one extra length field, encoded using the same one- or two-byte scheme from . This extra length immediately precedes the compressed data of the first Opus frame in the packet, and is interpreted in the various modes as follows: Code 0 packets: It is the length of the single Opus frame (see ). Code 1 packets: It is the length used for both of the Opus frames (see ). Code 2 packets: It is the length of the second Opus frame (see ). CBR Code 3 packets: It is the length used for all of the Opus frames (see ). VBR Code 3 packets: It is the length of the last Opus frame (see ).
opus-1.1.2/doc/draft-ietf-payload-rtp-opus.xml000066400000000000000000001240421264527674100212540ustar00rootroot00000000000000 ]> RTP Payload Format for the Opus Speech and Audio Codec
jspittka@gmail.com
vocTone
koenvos74@gmail.com
Mozilla
331 E. Evelyn Avenue Mountain View CA 94041 USA jmvalin@jmvalin.ca
This document defines the Real-time Transport Protocol (RTP) payload format for packetization of Opus encoded speech and audio data necessary to integrate the codec in the most compatible way. It also provides an applicability statement for the use of Opus over RTP. Further, it describes media type registrations for the RTP payload format.
Opus is a speech and audio codec developed within the IETF Internet Wideband Audio Codec working group. The codec has a very low algorithmic delay and it is highly scalable in terms of audio bandwidth, bitrate, and complexity. Further, it provides different modes to efficiently encode speech signals as well as music signals, thus making it the codec of choice for various applications using the Internet or similar networks. This document defines the Real-time Transport Protocol (RTP) payload format for packetization of Opus encoded speech and audio data necessary to integrate Opus in the most compatible way. It also provides an applicability statement for the use of Opus over RTP. Further, it describes media type registrations for the RTP payload format.
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in . The range of audio frequecies being coded Constant bitrate Central Processing Unit Discontinuous transmission Forward error correction Internet Protocol Speech or audio samples (per channel) Session Description Protocol Variable bitrate Throughout this document, we refer to the following definitions: Abbreviation Name Audio Bandwidth (Hz) Sampling Rate (Hz) NB Narrowband 0 - 4000 8000 MB Mediumband 0 - 6000 12000 WB Wideband 0 - 8000 16000 SWB Super-wideband 0 - 12000 24000 FB Fullband 0 - 20000 48000 Audio bandwidth naming
Opus encodes speech signals as well as general audio signals. Two different modes can be chosen, a voice mode or an audio mode, to allow the most efficient coding depending on the type of the input signal, the sampling frequency of the input signal, and the intended application. The voice mode allows efficient encoding of voice signals at lower bit rates while the audio mode is optimized for general audio signals at medium and higher bitrates. Opus is highly scalable in terms of audio bandwidth, bitrate, and complexity. Further, Opus allows transmitting stereo signals with in-band signaling in the bit-stream.
Opus supports bitrates from 6 kb/s to 510 kb/s. The bitrate can be changed dynamically within that range. All other parameters being equal, higher bitrates result in higher audio quality.
For a frame size of 20 ms, these are the bitrate "sweet spots" for Opus in various configurations: 8-12 kb/s for NB speech, 16-20 kb/s for WB speech, 28-40 kb/s for FB speech, 48-64 kb/s for FB mono music, and 64-128 kb/s for FB stereo music.
For the same average bitrate, variable bitrate (VBR) can achieve higher audio quality than constant bitrate (CBR). For the majority of voice transmission applications, VBR is the best choice. One reason for choosing CBR is the potential information leak that might occur when encrypting the compressed stream. See for guidelines on when VBR is appropriate for encrypted audio communications. In the case where an existing VBR stream needs to be converted to CBR for security reasons, then the Opus padding mechanism described in is the RECOMMENDED way to achieve padding because the RTP padding bit is unencrypted. The bitrate can be adjusted at any point in time. To avoid congestion, the average bitrate SHOULD NOT exceed the available network bandwidth. If no target bitrate is specified, the bitrates specified in are RECOMMENDED.
Opus can, as described in , be operated with a variable bitrate. In that case, the encoder will automatically reduce the bitrate for certain input signals, like periods of silence. When using continuous transmission, it will reduce the bitrate when the characteristics of the input signal permit, but will never interrupt the transmission to the receiver. Therefore, the received signal will maintain the same high level of audio quality over the full duration of a transmission while minimizing the average bit rate over time. In cases where the bitrate of Opus needs to be reduced even further or in cases where only constant bitrate is available, the Opus encoder can use discontinuous transmission (DTX), where parts of the encoded signal that correspond to periods of silence in the input speech or audio signal are not transmitted to the receiver. A receiver can distinguish between DTX and packet loss by looking for gaps in the sequence number, as described by Section 4.1 of . On the receiving side, the non-transmitted parts will be handled by a frame loss concealment unit in the Opus decoder which generates a comfort noise signal to replace the non transmitted parts of the speech or audio signal. Use of Comfort Noise (CN) with Opus is discouraged. The transmitter MUST drop whole frames only, based on the size of the last transmitted frame, to ensure successive RTP timestamps differ by a multiple of 120 and to allow the receiver to use whole frames for concealment. DTX can be used with both variable and constant bitrate. It will have a slightly lower speech or audio quality than continuous transmission. Therefore, using continuous transmission is RECOMMENDED unless constraints on available network bandwidth are severe.
Complexity of the encoder can be scaled to optimize for CPU resources in real-time, mostly as a trade-off between audio quality and bitrate. Also, different modes of Opus have different complexity.
The voice mode of Opus allows for embedding "in-band" forward error correction (FEC) data into the Opus bit stream. This FEC scheme adds redundant information about the previous packet (N-1) to the current output packet N. For each frame, the encoder decides whether to use FEC based on (1) an externally-provided estimate of the channel's packet loss rate; (2) an externally-provided estimate of the channel's capacity; (3) the sensitivity of the audio or speech signal to packet loss; (4) whether the receiving decoder has indicated it can take advantage of "in-band" FEC information. The decision to send "in-band" FEC information is entirely controlled by the encoder and therefore no special precautions for the payload have to be taken. On the receiving side, the decoder can take advantage of this additional information when it loses a packet and the next packet is available. In order to use the FEC data, the jitter buffer needs to provide access to payloads with the FEC data. Instead of performing loss concealment for a missing packet, the receiver can then configure its decoder to decode the FEC data from the next packet. Any compliant Opus decoder is capable of ignoring FEC information when it is not needed, so encoding with FEC cannot cause interoperability problems. However, if FEC cannot be used on the receiving side, then FEC SHOULD NOT be used, as it leads to an inefficient usage of network resources. Decoder support for FEC SHOULD be indicated at the time a session is set up.
Opus allows for transmission of stereo audio signals. This operation is signaled in-band in the Opus bit-stream and no special arrangement is needed in the payload format. An Opus decoder is capable of handling a stereo encoding, but an application might only be capable of consuming a single audio channel. If a decoder cannot take advantage of the benefits of a stereo signal this SHOULD be indicated at the time a session is set up. In that case the sending side SHOULD NOT send stereo signals as it leads to an inefficient usage of network resources.
The payload format for Opus consists of the RTP header and Opus payload data.
The format of the RTP header is specified in . The use of the fields of the RTP header by the Opus payload format is consistent with that specification. The payload length of Opus is an integer number of octets and therefore no padding is necessary. The payload MAY be padded by an integer number of octets according to , although the Opus internal padding is preferred. The timestamp, sequence number, and marker bit (M) of the RTP header are used in accordance with Section 4.1 of . The RTP payload type for Opus is to be assigned dynamically. The receiving side MUST be prepared to receive duplicate RTP packets. The receiver MUST provide at most one of those payloads to the Opus decoder for decoding, and MUST discard the others. Opus supports 5 different audio bandwidths, which can be adjusted during a stream. The RTP timestamp is incremented with a 48000 Hz clock rate for all modes of Opus and all sampling rates. The unit for the timestamp is samples per single (mono) channel. The RTP timestamp corresponds to the sample time of the first encoded sample in the encoded frame. For data encoded with sampling rates other than 48000 Hz, the sampling rate has to be adjusted to 48000 Hz.
The Opus encoder can output encoded frames representing 2.5, 5, 10, 20, 40, or 60 ms of speech or audio data. Further, an arbitrary number of frames can be combined into a packet, up to a maximum packet duration representing 120 ms of speech or audio data. The grouping of one or more Opus frames into a single Opus packet is defined in Section 3 of . An RTP payload MUST contain exactly one Opus packet as defined by that document. shows the structure combined with the RTP header.
shows supported frame sizes in milliseconds of encoded speech or audio data for the speech and audio modes (Mode) and sampling rates (fs) of Opus and shows how the timestamp is incremented for packetization (ts incr). If the Opus encoder outputs multiple encoded frames into a single packet, the timestamp increment is the sum of the increments for the individual frames. Mode fs 2.5 5 10 20 40 60 ts incr all 120 240 480 960 1920 2880 voice NB/MB/WB/SWB/FB x x o o o o audio NB/WB/SWB/FB o o o o x x
The target bitrate of Opus can be adjusted at any point in time, thus allowing efficient congestion control. Furthermore, the amount of encoded speech or audio data encoded in a single packet can be used for congestion control, since the transmission rate is inversely proportional to the packet duration. A lower packet transmission rate reduces the amount of header overhead, but at the same time increases latency and loss sensitivity, so it ought to be used with care. Since UDP does not provide congestion control, applications that use RTP over UDP SHOULD implement their own congestion control above the UDP layer . Work in the rmcat working group describes the interactions and conceptual interfaces necessary between the application components that relate to congestion control, including the RTP layer, the higher-level media codec control layer, and the lower-level transport interface, as well as components dedicated to congestion control functions.
One media subtype (audio/opus) has been defined and registered as described in the following section.
Media type registration is done according to and . Type name: audio Subtype name: opus Required parameters: the RTP timestamp is incremented with a 48000 Hz clock rate for all modes of Opus and all sampling rates. For data encoded with sampling rates other than 48000 Hz, the sampling rate has to be adjusted to 48000 Hz. Optional parameters: a hint about the maximum output sampling rate that the receiver is capable of rendering in Hz. The decoder MUST be capable of decoding any audio bandwidth but due to hardware limitations only signals up to the specified sampling rate can be played back. Sending signals with higher audio bandwidth results in higher than necessary network usage and encoding complexity, so an encoder SHOULD NOT encode frequencies above the audio bandwidth specified by maxplaybackrate. This parameter can take any value between 8000 and 48000, although commonly the value will match one of the Opus bandwidths (). By default, the receiver is assumed to have no limitations, i.e. 48000. a hint about the maximum input sampling rate that the sender is likely to produce. This is not a guarantee that the sender will never send any higher bandwidth (e.g. it could send a pre-recorded prompt that uses a higher bandwidth), but it indicates to the receiver that frequencies above this maximum can safely be discarded. This parameter is useful to avoid wasting receiver resources by operating the audio processing pipeline (e.g. echo cancellation) at a higher rate than necessary. This parameter can take any value between 8000 and 48000, although commonly the value will match one of the Opus bandwidths (). By default, the sender is assumed to have no limitations, i.e. 48000. the maximum duration of media represented by a packet (according to Section 6 of ) that a decoder wants to receive, in milliseconds rounded up to the next full integer value. Possible values are 3, 5, 10, 20, 40, 60, or an arbitrary multiple of an Opus frame size rounded up to the next full integer value, up to a maximum value of 120, as defined in . If no value is specified, the default is 120. the preferred duration of media represented by a packet (according to Section 6 of ) that a decoder wants to receive, in milliseconds rounded up to the next full integer value. Possible values are 3, 5, 10, 20, 40, 60, or an arbitrary multiple of an Opus frame size rounded up to the next full integer value, up to a maximum value of 120, as defined in . If no value is specified, the default is 20. specifies the maximum average receive bitrate of a session in bits per second (b/s). The actual value of the bitrate can vary, as it is dependent on the characteristics of the media in a packet. Note that the maximum average bitrate MAY be modified dynamically during a session. Any positive integer is allowed, but values outside the range 6000 to 510000 SHOULD be ignored. If no value is specified, the maximum value specified in for the corresponding mode of Opus and corresponding maxplaybackrate is the default. specifies whether the decoder prefers receiving stereo or mono signals. Possible values are 1 and 0 where 1 specifies that stereo signals are preferred, and 0 specifies that only mono signals are preferred. Independent of the stereo parameter every receiver MUST be able to receive and decode stereo signals but sending stereo signals to a receiver that signaled a preference for mono signals may result in higher than necessary network utilization and encoding complexity. If no value is specified, the default is 0 (mono). specifies whether the sender is likely to produce stereo audio. Possible values are 1 and 0, where 1 specifies that stereo signals are likely to be sent, and 0 specifies that the sender will likely only send mono. This is not a guarantee that the sender will never send stereo audio (e.g. it could send a pre-recorded prompt that uses stereo), but it indicates to the receiver that the received signal can be safely downmixed to mono. This parameter is useful to avoid wasting receiver resources by operating the audio processing pipeline (e.g. echo cancellation) in stereo when not necessary. If no value is specified, the default is 0 (mono). specifies if the decoder prefers the use of a constant bitrate versus variable bitrate. Possible values are 1 and 0, where 1 specifies constant bitrate and 0 specifies variable bitrate. If no value is specified, the default is 0 (vbr). When cbr is 1, the maximum average bitrate can still change, e.g. to adapt to changing network conditions. specifies that the decoder has the capability to take advantage of the Opus in-band FEC. Possible values are 1 and 0. Providing 0 when FEC cannot be used on the receiving side is RECOMMENDED. If no value is specified, useinbandfec is assumed to be 0. This parameter is only a preference and the receiver MUST be able to process packets that include FEC information, even if it means the FEC part is discarded. specifies if the decoder prefers the use of DTX. Possible values are 1 and 0. If no value is specified, the default is 0. Encoding considerations: The Opus media type is framed and consists of binary data according to Section 4.8 in . Security considerations: See of this document. Interoperability considerations: none Published specification: RFC [XXXX] Note to the RFC Editor: Replace [XXXX] with the number of the published RFC. Applications that use this media type: Any application that requires the transport of speech or audio data can use this media type. Some examples are, but not limited to, audio and video conferencing, Voice over IP, media streaming. Fragment identifier considerations: N/A Person & email address to contact for further information: SILK Support silksupport@skype.net Jean-Marc Valin jmvalin@jmvalin.ca Intended usage: COMMON Restrictions on usage: For transfer over RTP, the RTP payload format ( of this document) SHALL be used. Author: Julian Spittka jspittka@gmail.com Koen Vos koenvos74@gmail.com Jean-Marc Valin jmvalin@jmvalin.ca Change controller: IETF Payload Working Group delegated from the IESG
The information described in the media type specification has a specific mapping to fields in the Session Description Protocol (SDP) , which is commonly used to describe RTP sessions. When SDP is used to specify sessions employing Opus, the mapping is as follows: The media type ("audio") goes in SDP "m=" as the media name. The media subtype ("opus") goes in SDP "a=rtpmap" as the encoding name. The RTP clock rate in "a=rtpmap" MUST be 48000 and the number of channels MUST be 2. The OPTIONAL media type parameters "ptime" and "maxptime" are mapped to "a=ptime" and "a=maxptime" attributes, respectively, in the SDP. The OPTIONAL media type parameters "maxaveragebitrate", "maxplaybackrate", "stereo", "cbr", "useinbandfec", and "usedtx", when present, MUST be included in the "a=fmtp" attribute in the SDP, expressed as a media type string in the form of a semicolon-separated list of parameter=value pairs (e.g., maxplaybackrate=48000). They MUST NOT be specified in an SSRC-specific "fmtp" source-level attribute (as defined in Section 6.3 of ). The OPTIONAL media type parameters "sprop-maxcapturerate", and "sprop-stereo" MAY be mapped to the "a=fmtp" SDP attribute by copying them directly from the media type parameter string as part of the semicolon-separated list of parameter=value pairs (e.g., sprop-stereo=1). These same OPTIONAL media type parameters MAY also be specified using an SSRC-specific "fmtp" source-level attribute as described in Section 6.3 of . They MAY be specified in both places, in which case the parameter in the source-level attribute overrides the one found on the "a=fmtp" line. The value of any parameter which is not specified in a source-level source attribute MUST be taken from the "a=fmtp" line, if it is present there. Below are some examples of SDP session descriptions for Opus: Example 1: Standard mono session with 48000 Hz clock rate
Example 2: 16000 Hz clock rate, maximum packet size of 40 ms, recommended packet size of 40 ms, maximum average bitrate of 20000 bps, prefers to receive stereo but only plans to send mono, FEC is desired, DTX is not desired
Example 3: Two-way full-band stereo preferred
When using the offer-answer procedure described in to negotiate the use of Opus, the following considerations apply: Opus supports several clock rates. For signaling purposes only the highest, i.e. 48000, is used. The actual clock rate of the corresponding media is signaled inside the payload and is not restricted by this payload format description. The decoder MUST be capable of decoding every received clock rate. An example is shown below:
The "ptime" and "maxptime" parameters are unidirectional receive-only parameters and typically will not compromise interoperability; however, some values might cause application performance to suffer. defines the SDP offer-answer handling of the "ptime" parameter. The "maxptime" parameter MUST be handled in the same way. The "maxplaybackrate" parameter is a unidirectional receive-only parameter that reflects limitations of the local receiver. When sending to a single destination, a sender MUST NOT use an audio bandwidth higher than necessary to make full use of audio sampled at a sampling rate of "maxplaybackrate". Gateways or senders that are sending the same encoded audio to multiple destinations SHOULD NOT use an audio bandwidth higher than necessary to represent audio sampled at "maxplaybackrate", as this would lead to inefficient use of network resources. The "maxplaybackrate" parameter does not affect interoperability. Also, this parameter SHOULD NOT be used to adjust the audio bandwidth as a function of the bitrate, as this is the responsibility of the Opus encoder implementation. The "maxaveragebitrate" parameter is a unidirectional receive-only parameter that reflects limitations of the local receiver. The sender of the other side MUST NOT send with an average bitrate higher than "maxaveragebitrate" as it might overload the network and/or receiver. The "maxaveragebitrate" parameter typically will not compromise interoperability; however, some values might cause application performance to suffer, and ought to be set with care. The "sprop-maxcapturerate" and "sprop-stereo" parameters are unidirectional sender-only parameters that reflect limitations of the sender side. They allow the receiver to set up a reduced-complexity audio processing pipeline if the sender is not planning to use the full range of Opus's capabilities. Neither "sprop-maxcapturerate" nor "sprop-stereo" affect interoperability and the receiver MUST be capable of receiving any signal. The "stereo" parameter is a unidirectional receive-only parameter. When sending to a single destination, a sender MUST NOT use stereo when "stereo" is 0. Gateways or senders that are sending the same encoded audio to multiple destinations SHOULD NOT use stereo when "stereo" is 0, as this would lead to inefficient use of network resources. The "stereo" parameter does not affect interoperability. The "cbr" parameter is a unidirectional receive-only parameter. The "useinbandfec" parameter is a unidirectional receive-only parameter. The "usedtx" parameter is a unidirectional receive-only parameter. Any unknown parameter in an offer MUST be ignored by the receiver and MUST be removed from the answer.
The Opus parameters in an SDP Offer/Answer exchange are completely orthogonal, and there is no relationship between the SDP Offer and the Answer.
For declarative use of SDP such as in Session Announcement Protocol (SAP), , and RTSP, , for Opus, the following needs to be considered: The values for "maxptime", "ptime", "maxplaybackrate", and "maxaveragebitrate" ought to be selected carefully to ensure that a reasonable performance can be achieved for the participants of a session. The values for "maxptime", "ptime", and of the payload format configuration are recommendations by the decoding side to ensure the best performance for the decoder. All other parameters of the payload format configuration are declarative and a participant MUST use the configurations that are provided for the session. More than one configuration can be provided if necessary by declaring multiple RTP payload types; however, the number of types ought to be kept small.
Use of variable bitrate (VBR) is subject to the security considerations in . RTP packets using the payload format defined in this specification are subject to the security considerations discussed in the RTP specification , and in any applicable RTP profile such as RTP/AVP , RTP/AVPF , RTP/SAVP or RTP/SAVPF . However, as "Securing the RTP Protocol Framework: Why RTP Does Not Mandate a Single Media Security Solution" discusses, it is not an RTP payload format's responsibility to discuss or mandate what solutions are used to meet the basic security goals like confidentiality, integrity and source authenticity for RTP in general. This responsibility lays on anyone using RTP in an application. They can find guidance on available security mechanisms and important considerations in Options for Securing RTP Sessions [I-D.ietf-avtcore-rtp-security-options]. Applications SHOULD use one or more appropriate strong security mechanisms. This payload format and the Opus encoding do not exhibit any significant non-uniformity in the receiver-end computational load and thus are unlikely to pose a denial-of-service threat due to the receipt of pathological datagrams.
Many people have made useful comments and suggestions contributing to this document. In particular, we would like to thank Tina le Grand, Cullen Jennings, Jonathan Lennox, Gregory Maxwell, Colin Perkins, Jan Skoglund, Timothy B. Terriberry, Martin Thompson, Justin Uberti, Magnus Westerlund, and Mo Zanaty.
&rfc2119; &rfc3389; &rfc3550; &rfc3711; &rfc3551; &rfc6838; &rfc4855; &rfc4566; &rfc3264; &rfc2326; &rfc5576; &rfc6562; &rfc6716; &rfc2974; &rfc4585; &rfc5124; &rfc5405; &rfc7202; rmcat documents
opus-1.1.2/doc/footer.html000066400000000000000000000013141264527674100154470ustar00rootroot00000000000000
For more information visit the Opus Website.
opus-1.1.2/doc/footer.html.patch000066400000000000000000000015231264527674100165470ustar00rootroot00000000000000--- footer.orig.html 2012-06-11 00:32:00.237427961 -0400 +++ footer.html 2012-06-11 00:45:51.518437796 -0400 @@ -6,11 +6,15 @@ -