- initial import
This commit is contained in:
1
src/libs/opencore-amr/AUTHORS
Normal file
1
src/libs/opencore-amr/AUTHORS
Normal file
@@ -0,0 +1 @@
|
||||
See README.
|
||||
191
src/libs/opencore-amr/COPYING
Normal file
191
src/libs/opencore-amr/COPYING
Normal file
@@ -0,0 +1,191 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction, and
|
||||
distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by the
|
||||
copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all other
|
||||
entities that control, are controlled by, or are under common control with
|
||||
that entity. For the purposes of this definition, "control" means (i) the
|
||||
power, direct or indirect, to cause the direction or management of such
|
||||
entity, whether by contract or otherwise, or (ii) ownership of fifty
|
||||
percent (50%) or more of the outstanding shares, or (iii) beneficial
|
||||
ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity exercising
|
||||
permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation source,
|
||||
and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical transformation
|
||||
or translation of a Source form, including but not limited to compiled
|
||||
object code, generated documentation, and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or Object form,
|
||||
made available under the License, as indicated by a copyright notice that
|
||||
is included in or attached to the work (an example is provided in the
|
||||
Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object form,
|
||||
that is based on (or derived from) the Work and for which the editorial
|
||||
revisions, annotations, elaborations, or other modifications represent, as
|
||||
a whole, an original work of authorship. For the purposes of this License,
|
||||
Derivative Works shall not include works that remain separable from, or
|
||||
merely link (or bind by name) to the interfaces of, the Work and Derivative
|
||||
Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including the original
|
||||
version of the Work and any modifications or additions to that Work or
|
||||
Derivative Works thereof, that is intentionally submitted to Licensor for
|
||||
inclusion in the Work by the copyright owner or by an individual or Legal
|
||||
Entity authorized to submit on behalf of the copyright owner. For the
|
||||
purposes of this definition, "submitted" means any form of electronic,
|
||||
verbal, or written communication sent to the Licensor or its
|
||||
representatives, including but not limited to communication on electronic
|
||||
mailing lists, source code control systems, and issue tracking systems that
|
||||
are managed by, or on behalf of, the Licensor for the purpose of discussing
|
||||
and improving the Work, but excluding communication that is conspicuously
|
||||
marked or otherwise designated in writing by the copyright owner as "Not a
|
||||
Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity on
|
||||
behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of this
|
||||
License, each Contributor hereby grants to You a perpetual, worldwide,
|
||||
non-exclusive, no-charge, royalty-free, irrevocable copyright license to
|
||||
reproduce, prepare Derivative Works of, publicly display, publicly perform,
|
||||
sublicense, and distribute the Work and such Derivative Works in Source or
|
||||
Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of this
|
||||
License, each Contributor hereby grants to You a perpetual, worldwide,
|
||||
non-exclusive, no-charge, royalty-free, irrevocable (except as stated in
|
||||
this section) patent license to make, have made, use, offer to sell, sell,
|
||||
import, and otherwise transfer the Work, where such license applies only to
|
||||
those patent claims licensable by such Contributor that are necessarily
|
||||
infringed by their Contribution(s) alone or by combination of their
|
||||
Contribution(s) with the Work to which such Contribution(s) was submitted.
|
||||
If You institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work or a
|
||||
Contribution incorporated within the Work constitutes direct or
|
||||
contributory patent infringement, then any patent licenses granted to You
|
||||
under this License for that Work shall terminate as of the date such
|
||||
litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the Work or
|
||||
Derivative Works thereof in any medium, with or without modifications, and
|
||||
in Source or Object form, provided that You meet the following conditions:
|
||||
|
||||
1. You must give any other recipients of the Work or Derivative Works a
|
||||
copy of this License; and
|
||||
|
||||
2. You must cause any modified files to carry prominent notices stating
|
||||
that You changed the files; and
|
||||
|
||||
3. You must retain, in the Source form of any Derivative Works that You
|
||||
distribute, all copyright, patent, trademark, and attribution notices from
|
||||
the Source form of the Work, excluding those notices that do not pertain to
|
||||
any part of the Derivative Works; and
|
||||
|
||||
4. If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must include a
|
||||
readable copy of the attribution notices contained within such NOTICE file,
|
||||
excluding those notices that do not pertain to any part of the Derivative
|
||||
Works, in at least one of the following places: within a NOTICE text file
|
||||
distributed as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or, within a
|
||||
display generated by the Derivative Works, if and wherever such third-party
|
||||
notices normally appear. The contents of the NOTICE file are for
|
||||
informational purposes only and do not modify the License. You may add Your
|
||||
own attribution notices within Derivative Works that You distribute,
|
||||
alongside or as an addendum to the NOTICE text from the Work, provided that
|
||||
such additional attribution notices cannot be construed as modifying the
|
||||
License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and may
|
||||
provide additional or different license terms and conditions for use,
|
||||
reproduction, or distribution of Your modifications, or for any such
|
||||
Derivative Works as a whole, provided Your use, reproduction, and
|
||||
distribution of the Work otherwise complies with the conditions stated in
|
||||
this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise, any
|
||||
Contribution intentionally submitted for inclusion in the Work by You to
|
||||
the Licensor shall be under the terms and conditions of this License,
|
||||
without any additional terms or conditions. Notwithstanding the above,
|
||||
nothing herein shall supersede or modify the terms of any separate license
|
||||
agreement you may have executed with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor, except
|
||||
as required for reasonable and customary use in describing the origin of
|
||||
the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or agreed to
|
||||
in writing, Licensor provides the Work (and each Contributor provides its
|
||||
Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied, including, without limitation, any
|
||||
warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for
|
||||
determining the appropriateness of using or redistributing the Work and
|
||||
assume any risks associated with Your exercise of permissions under this
|
||||
License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory, whether
|
||||
in tort (including negligence), contract, or otherwise, unless required by
|
||||
applicable law (such as deliberate and grossly negligent acts) or agreed to
|
||||
in writing, shall any Contributor be liable to You for damages, including
|
||||
any direct, indirect, special, incidental, or consequential damages of any
|
||||
character arising as a result of this License or out of the use or
|
||||
inability to use the Work (including but not limited to damages for loss of
|
||||
goodwill, work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor has been
|
||||
advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing the
|
||||
Work or Derivative Works thereof, You may choose to offer, and charge a fee
|
||||
for, acceptance of support, warranty, indemnity, or other liability
|
||||
obligations and/or rights consistent with this License. However, in
|
||||
accepting such obligations, You may act only on Your own behalf and on Your
|
||||
sole responsibility, not on behalf of any other Contributor, and only if
|
||||
You agree to indemnify, defend, and hold each Contributor harmless for any
|
||||
liability incurred by, or claims asserted against, such Contributor by
|
||||
reason of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work
|
||||
|
||||
To apply the Apache License to your work, attach the following boilerplate
|
||||
notice, with the fields enclosed by brackets "[]" replaced with your own
|
||||
identifying information. (Don't include the brackets!) The text should be
|
||||
enclosed in the appropriate comment syntax for the file format. We also
|
||||
recommend that a file or class name and description of purpose be included
|
||||
on the same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
not use this file except in compliance with the License. You may obtain a
|
||||
copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable
|
||||
law or agreed to in writing, software distributed under the License is
|
||||
distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the specific language
|
||||
governing permissions and limitations under the License.
|
||||
22
src/libs/opencore-amr/ChangeLog
Normal file
22
src/libs/opencore-amr/ChangeLog
Normal file
@@ -0,0 +1,22 @@
|
||||
0.1.3
|
||||
- Adjusted libtool flags for building DLLs for windows
|
||||
- Update to the latest upstream opencore source
|
||||
- Updated and improved example applications
|
||||
- Add options for enabling the arm inline assembly
|
||||
- Add options for disabling the encoder or decoder in the amrnb library
|
||||
- Avoid dependencies on libstdc++ if building the source as C
|
||||
- Hide internal symbols in shared libraries
|
||||
- Minor tweaks
|
||||
- Remove old static makefiles and corresponding build scripts
|
||||
|
||||
0.1.2
|
||||
- Fixed AMR-NB encoding on 64-bit architectures
|
||||
- Switch to using automake/autoconf/libtool
|
||||
- Update to the latest upstream opencore source as of September 1, 2009
|
||||
|
||||
0.1.1
|
||||
- Rename the libraries from libamr* to libopencore-amr*
|
||||
- Fix a bunch of compiler warnings
|
||||
|
||||
0.1.0
|
||||
- Start of opencore-amr project.
|
||||
BIN
src/libs/opencore-amr/Debug/libopencore-amr-nb.lib
Normal file
BIN
src/libs/opencore-amr/Debug/libopencore-amr-nb.lib
Normal file
Binary file not shown.
370
src/libs/opencore-amr/INSTALL
Normal file
370
src/libs/opencore-amr/INSTALL
Normal file
@@ -0,0 +1,370 @@
|
||||
Installation Instructions
|
||||
*************************
|
||||
|
||||
Copyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation,
|
||||
Inc.
|
||||
|
||||
Copying and distribution of this file, with or without modification,
|
||||
are permitted in any medium without royalty provided the copyright
|
||||
notice and this notice are preserved. This file is offered as-is,
|
||||
without warranty of any kind.
|
||||
|
||||
Basic Installation
|
||||
==================
|
||||
|
||||
Briefly, the shell commands `./configure; make; make install' should
|
||||
configure, build, and install this package. The following
|
||||
more-detailed instructions are generic; see the `README' file for
|
||||
instructions specific to this package. Some packages provide this
|
||||
`INSTALL' file but do not implement all of the features documented
|
||||
below. The lack of an optional feature in a given package is not
|
||||
necessarily a bug. More recommendations for GNU packages can be found
|
||||
in *note Makefile Conventions: (standards)Makefile Conventions.
|
||||
|
||||
The `configure' shell script attempts to guess correct values for
|
||||
various system-dependent variables used during compilation. It uses
|
||||
those values to create a `Makefile' in each directory of the package.
|
||||
It may also create one or more `.h' files containing system-dependent
|
||||
definitions. Finally, it creates a shell script `config.status' that
|
||||
you can run in the future to recreate the current configuration, and a
|
||||
file `config.log' containing compiler output (useful mainly for
|
||||
debugging `configure').
|
||||
|
||||
It can also use an optional file (typically called `config.cache'
|
||||
and enabled with `--cache-file=config.cache' or simply `-C') that saves
|
||||
the results of its tests to speed up reconfiguring. Caching is
|
||||
disabled by default to prevent problems with accidental use of stale
|
||||
cache files.
|
||||
|
||||
If you need to do unusual things to compile the package, please try
|
||||
to figure out how `configure' could check whether to do them, and mail
|
||||
diffs or instructions to the address given in the `README' so they can
|
||||
be considered for the next release. If you are using the cache, and at
|
||||
some point `config.cache' contains results you don't want to keep, you
|
||||
may remove or edit it.
|
||||
|
||||
The file `configure.ac' (or `configure.in') is used to create
|
||||
`configure' by a program called `autoconf'. You need `configure.ac' if
|
||||
you want to change it or regenerate `configure' using a newer version
|
||||
of `autoconf'.
|
||||
|
||||
The simplest way to compile this package is:
|
||||
|
||||
1. `cd' to the directory containing the package's source code and type
|
||||
`./configure' to configure the package for your system.
|
||||
|
||||
Running `configure' might take a while. While running, it prints
|
||||
some messages telling which features it is checking for.
|
||||
|
||||
2. Type `make' to compile the package.
|
||||
|
||||
3. Optionally, type `make check' to run any self-tests that come with
|
||||
the package, generally using the just-built uninstalled binaries.
|
||||
|
||||
4. Type `make install' to install the programs and any data files and
|
||||
documentation. When installing into a prefix owned by root, it is
|
||||
recommended that the package be configured and built as a regular
|
||||
user, and only the `make install' phase executed with root
|
||||
privileges.
|
||||
|
||||
5. Optionally, type `make installcheck' to repeat any self-tests, but
|
||||
this time using the binaries in their final installed location.
|
||||
This target does not install anything. Running this target as a
|
||||
regular user, particularly if the prior `make install' required
|
||||
root privileges, verifies that the installation completed
|
||||
correctly.
|
||||
|
||||
6. You can remove the program binaries and object files from the
|
||||
source code directory by typing `make clean'. To also remove the
|
||||
files that `configure' created (so you can compile the package for
|
||||
a different kind of computer), type `make distclean'. There is
|
||||
also a `make maintainer-clean' target, but that is intended mainly
|
||||
for the package's developers. If you use it, you may have to get
|
||||
all sorts of other programs in order to regenerate files that came
|
||||
with the distribution.
|
||||
|
||||
7. Often, you can also type `make uninstall' to remove the installed
|
||||
files again. In practice, not all packages have tested that
|
||||
uninstallation works correctly, even though it is required by the
|
||||
GNU Coding Standards.
|
||||
|
||||
8. Some packages, particularly those that use Automake, provide `make
|
||||
distcheck', which can by used by developers to test that all other
|
||||
targets like `make install' and `make uninstall' work correctly.
|
||||
This target is generally not run by end users.
|
||||
|
||||
Compilers and Options
|
||||
=====================
|
||||
|
||||
Some systems require unusual options for compilation or linking that
|
||||
the `configure' script does not know about. Run `./configure --help'
|
||||
for details on some of the pertinent environment variables.
|
||||
|
||||
You can give `configure' initial values for configuration parameters
|
||||
by setting variables in the command line or in the environment. Here
|
||||
is an example:
|
||||
|
||||
./configure CC=c99 CFLAGS=-g LIBS=-lposix
|
||||
|
||||
*Note Defining Variables::, for more details.
|
||||
|
||||
Compiling For Multiple Architectures
|
||||
====================================
|
||||
|
||||
You can compile the package for more than one kind of computer at the
|
||||
same time, by placing the object files for each architecture in their
|
||||
own directory. To do this, you can use GNU `make'. `cd' to the
|
||||
directory where you want the object files and executables to go and run
|
||||
the `configure' script. `configure' automatically checks for the
|
||||
source code in the directory that `configure' is in and in `..'. This
|
||||
is known as a "VPATH" build.
|
||||
|
||||
With a non-GNU `make', it is safer to compile the package for one
|
||||
architecture at a time in the source code directory. After you have
|
||||
installed the package for one architecture, use `make distclean' before
|
||||
reconfiguring for another architecture.
|
||||
|
||||
On MacOS X 10.5 and later systems, you can create libraries and
|
||||
executables that work on multiple system types--known as "fat" or
|
||||
"universal" binaries--by specifying multiple `-arch' options to the
|
||||
compiler but only a single `-arch' option to the preprocessor. Like
|
||||
this:
|
||||
|
||||
./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
|
||||
CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
|
||||
CPP="gcc -E" CXXCPP="g++ -E"
|
||||
|
||||
This is not guaranteed to produce working output in all cases, you
|
||||
may have to build one architecture at a time and combine the results
|
||||
using the `lipo' tool if you have problems.
|
||||
|
||||
Installation Names
|
||||
==================
|
||||
|
||||
By default, `make install' installs the package's commands under
|
||||
`/usr/local/bin', include files under `/usr/local/include', etc. You
|
||||
can specify an installation prefix other than `/usr/local' by giving
|
||||
`configure' the option `--prefix=PREFIX', where PREFIX must be an
|
||||
absolute file name.
|
||||
|
||||
You can specify separate installation prefixes for
|
||||
architecture-specific files and architecture-independent files. If you
|
||||
pass the option `--exec-prefix=PREFIX' to `configure', the package uses
|
||||
PREFIX as the prefix for installing programs and libraries.
|
||||
Documentation and other data files still use the regular prefix.
|
||||
|
||||
In addition, if you use an unusual directory layout you can give
|
||||
options like `--bindir=DIR' to specify different values for particular
|
||||
kinds of files. Run `configure --help' for a list of the directories
|
||||
you can set and what kinds of files go in them. In general, the
|
||||
default for these options is expressed in terms of `${prefix}', so that
|
||||
specifying just `--prefix' will affect all of the other directory
|
||||
specifications that were not explicitly provided.
|
||||
|
||||
The most portable way to affect installation locations is to pass the
|
||||
correct locations to `configure'; however, many packages provide one or
|
||||
both of the following shortcuts of passing variable assignments to the
|
||||
`make install' command line to change installation locations without
|
||||
having to reconfigure or recompile.
|
||||
|
||||
The first method involves providing an override variable for each
|
||||
affected directory. For example, `make install
|
||||
prefix=/alternate/directory' will choose an alternate location for all
|
||||
directory configuration variables that were expressed in terms of
|
||||
`${prefix}'. Any directories that were specified during `configure',
|
||||
but not in terms of `${prefix}', must each be overridden at install
|
||||
time for the entire installation to be relocated. The approach of
|
||||
makefile variable overrides for each directory variable is required by
|
||||
the GNU Coding Standards, and ideally causes no recompilation.
|
||||
However, some platforms have known limitations with the semantics of
|
||||
shared libraries that end up requiring recompilation when using this
|
||||
method, particularly noticeable in packages that use GNU Libtool.
|
||||
|
||||
The second method involves providing the `DESTDIR' variable. For
|
||||
example, `make install DESTDIR=/alternate/directory' will prepend
|
||||
`/alternate/directory' before all installation names. The approach of
|
||||
`DESTDIR' overrides is not required by the GNU Coding Standards, and
|
||||
does not work on platforms that have drive letters. On the other hand,
|
||||
it does better at avoiding recompilation issues, and works well even
|
||||
when some directory options were not specified in terms of `${prefix}'
|
||||
at `configure' time.
|
||||
|
||||
Optional Features
|
||||
=================
|
||||
|
||||
If the package supports it, you can cause programs to be installed
|
||||
with an extra prefix or suffix on their names by giving `configure' the
|
||||
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
|
||||
|
||||
Some packages pay attention to `--enable-FEATURE' options to
|
||||
`configure', where FEATURE indicates an optional part of the package.
|
||||
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
|
||||
is something like `gnu-as' or `x' (for the X Window System). The
|
||||
`README' should mention any `--enable-' and `--with-' options that the
|
||||
package recognizes.
|
||||
|
||||
For packages that use the X Window System, `configure' can usually
|
||||
find the X include and library files automatically, but if it doesn't,
|
||||
you can use the `configure' options `--x-includes=DIR' and
|
||||
`--x-libraries=DIR' to specify their locations.
|
||||
|
||||
Some packages offer the ability to configure how verbose the
|
||||
execution of `make' will be. For these packages, running `./configure
|
||||
--enable-silent-rules' sets the default to minimal output, which can be
|
||||
overridden with `make V=1'; while running `./configure
|
||||
--disable-silent-rules' sets the default to verbose, which can be
|
||||
overridden with `make V=0'.
|
||||
|
||||
Particular systems
|
||||
==================
|
||||
|
||||
On HP-UX, the default C compiler is not ANSI C compatible. If GNU
|
||||
CC is not installed, it is recommended to use the following options in
|
||||
order to use an ANSI C compiler:
|
||||
|
||||
./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
|
||||
|
||||
and if that doesn't work, install pre-built binaries of GCC for HP-UX.
|
||||
|
||||
HP-UX `make' updates targets which have the same time stamps as
|
||||
their prerequisites, which makes it generally unusable when shipped
|
||||
generated files such as `configure' are involved. Use GNU `make'
|
||||
instead.
|
||||
|
||||
On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
|
||||
parse its `<wchar.h>' header file. The option `-nodtk' can be used as
|
||||
a workaround. If GNU CC is not installed, it is therefore recommended
|
||||
to try
|
||||
|
||||
./configure CC="cc"
|
||||
|
||||
and if that doesn't work, try
|
||||
|
||||
./configure CC="cc -nodtk"
|
||||
|
||||
On Solaris, don't put `/usr/ucb' early in your `PATH'. This
|
||||
directory contains several dysfunctional programs; working variants of
|
||||
these programs are available in `/usr/bin'. So, if you need `/usr/ucb'
|
||||
in your `PATH', put it _after_ `/usr/bin'.
|
||||
|
||||
On Haiku, software installed for all users goes in `/boot/common',
|
||||
not `/usr/local'. It is recommended to use the following options:
|
||||
|
||||
./configure --prefix=/boot/common
|
||||
|
||||
Specifying the System Type
|
||||
==========================
|
||||
|
||||
There may be some features `configure' cannot figure out
|
||||
automatically, but needs to determine by the type of machine the package
|
||||
will run on. Usually, assuming the package is built to be run on the
|
||||
_same_ architectures, `configure' can figure that out, but if it prints
|
||||
a message saying it cannot guess the machine type, give it the
|
||||
`--build=TYPE' option. TYPE can either be a short name for the system
|
||||
type, such as `sun4', or a canonical name which has the form:
|
||||
|
||||
CPU-COMPANY-SYSTEM
|
||||
|
||||
where SYSTEM can have one of these forms:
|
||||
|
||||
OS
|
||||
KERNEL-OS
|
||||
|
||||
See the file `config.sub' for the possible values of each field. If
|
||||
`config.sub' isn't included in this package, then this package doesn't
|
||||
need to know the machine type.
|
||||
|
||||
If you are _building_ compiler tools for cross-compiling, you should
|
||||
use the option `--target=TYPE' to select the type of system they will
|
||||
produce code for.
|
||||
|
||||
If you want to _use_ a cross compiler, that generates code for a
|
||||
platform different from the build platform, you should specify the
|
||||
"host" platform (i.e., that on which the generated programs will
|
||||
eventually be run) with `--host=TYPE'.
|
||||
|
||||
Sharing Defaults
|
||||
================
|
||||
|
||||
If you want to set default values for `configure' scripts to share,
|
||||
you can create a site shell script called `config.site' that gives
|
||||
default values for variables like `CC', `cache_file', and `prefix'.
|
||||
`configure' looks for `PREFIX/share/config.site' if it exists, then
|
||||
`PREFIX/etc/config.site' if it exists. Or, you can set the
|
||||
`CONFIG_SITE' environment variable to the location of the site script.
|
||||
A warning: not all `configure' scripts look for a site script.
|
||||
|
||||
Defining Variables
|
||||
==================
|
||||
|
||||
Variables not defined in a site shell script can be set in the
|
||||
environment passed to `configure'. However, some packages may run
|
||||
configure again during the build, and the customized values of these
|
||||
variables may be lost. In order to avoid this problem, you should set
|
||||
them in the `configure' command line, using `VAR=value'. For example:
|
||||
|
||||
./configure CC=/usr/local2/bin/gcc
|
||||
|
||||
causes the specified `gcc' to be used as the C compiler (unless it is
|
||||
overridden in the site shell script).
|
||||
|
||||
Unfortunately, this technique does not work for `CONFIG_SHELL' due to
|
||||
an Autoconf bug. Until the bug is fixed you can use this workaround:
|
||||
|
||||
CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
|
||||
|
||||
`configure' Invocation
|
||||
======================
|
||||
|
||||
`configure' recognizes the following options to control how it
|
||||
operates.
|
||||
|
||||
`--help'
|
||||
`-h'
|
||||
Print a summary of all of the options to `configure', and exit.
|
||||
|
||||
`--help=short'
|
||||
`--help=recursive'
|
||||
Print a summary of the options unique to this package's
|
||||
`configure', and exit. The `short' variant lists options used
|
||||
only in the top level, while the `recursive' variant lists options
|
||||
also present in any nested packages.
|
||||
|
||||
`--version'
|
||||
`-V'
|
||||
Print the version of Autoconf used to generate the `configure'
|
||||
script, and exit.
|
||||
|
||||
`--cache-file=FILE'
|
||||
Enable the cache: use and save the results of the tests in FILE,
|
||||
traditionally `config.cache'. FILE defaults to `/dev/null' to
|
||||
disable caching.
|
||||
|
||||
`--config-cache'
|
||||
`-C'
|
||||
Alias for `--cache-file=config.cache'.
|
||||
|
||||
`--quiet'
|
||||
`--silent'
|
||||
`-q'
|
||||
Do not print messages saying which checks are being made. To
|
||||
suppress all normal output, redirect it to `/dev/null' (any error
|
||||
messages will still be shown).
|
||||
|
||||
`--srcdir=DIR'
|
||||
Look for the package's source code in directory DIR. Usually
|
||||
`configure' can determine that directory automatically.
|
||||
|
||||
`--prefix=DIR'
|
||||
Use DIR as the installation prefix. *note Installation Names::
|
||||
for more details, including other options available for fine-tuning
|
||||
the installation locations.
|
||||
|
||||
`--no-create'
|
||||
`-n'
|
||||
Run the configure checks, but stop before creating any output
|
||||
files.
|
||||
|
||||
`configure' also accepts some other, not widely useful, options. Run
|
||||
`configure --help' for more details.
|
||||
|
||||
191
src/libs/opencore-amr/LICENSE
Normal file
191
src/libs/opencore-amr/LICENSE
Normal file
@@ -0,0 +1,191 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction, and
|
||||
distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by the
|
||||
copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all other
|
||||
entities that control, are controlled by, or are under common control with
|
||||
that entity. For the purposes of this definition, "control" means (i) the
|
||||
power, direct or indirect, to cause the direction or management of such
|
||||
entity, whether by contract or otherwise, or (ii) ownership of fifty
|
||||
percent (50%) or more of the outstanding shares, or (iii) beneficial
|
||||
ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity exercising
|
||||
permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation source,
|
||||
and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical transformation
|
||||
or translation of a Source form, including but not limited to compiled
|
||||
object code, generated documentation, and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or Object form,
|
||||
made available under the License, as indicated by a copyright notice that
|
||||
is included in or attached to the work (an example is provided in the
|
||||
Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object form,
|
||||
that is based on (or derived from) the Work and for which the editorial
|
||||
revisions, annotations, elaborations, or other modifications represent, as
|
||||
a whole, an original work of authorship. For the purposes of this License,
|
||||
Derivative Works shall not include works that remain separable from, or
|
||||
merely link (or bind by name) to the interfaces of, the Work and Derivative
|
||||
Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including the original
|
||||
version of the Work and any modifications or additions to that Work or
|
||||
Derivative Works thereof, that is intentionally submitted to Licensor for
|
||||
inclusion in the Work by the copyright owner or by an individual or Legal
|
||||
Entity authorized to submit on behalf of the copyright owner. For the
|
||||
purposes of this definition, "submitted" means any form of electronic,
|
||||
verbal, or written communication sent to the Licensor or its
|
||||
representatives, including but not limited to communication on electronic
|
||||
mailing lists, source code control systems, and issue tracking systems that
|
||||
are managed by, or on behalf of, the Licensor for the purpose of discussing
|
||||
and improving the Work, but excluding communication that is conspicuously
|
||||
marked or otherwise designated in writing by the copyright owner as "Not a
|
||||
Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity on
|
||||
behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of this
|
||||
License, each Contributor hereby grants to You a perpetual, worldwide,
|
||||
non-exclusive, no-charge, royalty-free, irrevocable copyright license to
|
||||
reproduce, prepare Derivative Works of, publicly display, publicly perform,
|
||||
sublicense, and distribute the Work and such Derivative Works in Source or
|
||||
Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of this
|
||||
License, each Contributor hereby grants to You a perpetual, worldwide,
|
||||
non-exclusive, no-charge, royalty-free, irrevocable (except as stated in
|
||||
this section) patent license to make, have made, use, offer to sell, sell,
|
||||
import, and otherwise transfer the Work, where such license applies only to
|
||||
those patent claims licensable by such Contributor that are necessarily
|
||||
infringed by their Contribution(s) alone or by combination of their
|
||||
Contribution(s) with the Work to which such Contribution(s) was submitted.
|
||||
If You institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work or a
|
||||
Contribution incorporated within the Work constitutes direct or
|
||||
contributory patent infringement, then any patent licenses granted to You
|
||||
under this License for that Work shall terminate as of the date such
|
||||
litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the Work or
|
||||
Derivative Works thereof in any medium, with or without modifications, and
|
||||
in Source or Object form, provided that You meet the following conditions:
|
||||
|
||||
1. You must give any other recipients of the Work or Derivative Works a
|
||||
copy of this License; and
|
||||
|
||||
2. You must cause any modified files to carry prominent notices stating
|
||||
that You changed the files; and
|
||||
|
||||
3. You must retain, in the Source form of any Derivative Works that You
|
||||
distribute, all copyright, patent, trademark, and attribution notices from
|
||||
the Source form of the Work, excluding those notices that do not pertain to
|
||||
any part of the Derivative Works; and
|
||||
|
||||
4. If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must include a
|
||||
readable copy of the attribution notices contained within such NOTICE file,
|
||||
excluding those notices that do not pertain to any part of the Derivative
|
||||
Works, in at least one of the following places: within a NOTICE text file
|
||||
distributed as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or, within a
|
||||
display generated by the Derivative Works, if and wherever such third-party
|
||||
notices normally appear. The contents of the NOTICE file are for
|
||||
informational purposes only and do not modify the License. You may add Your
|
||||
own attribution notices within Derivative Works that You distribute,
|
||||
alongside or as an addendum to the NOTICE text from the Work, provided that
|
||||
such additional attribution notices cannot be construed as modifying the
|
||||
License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and may
|
||||
provide additional or different license terms and conditions for use,
|
||||
reproduction, or distribution of Your modifications, or for any such
|
||||
Derivative Works as a whole, provided Your use, reproduction, and
|
||||
distribution of the Work otherwise complies with the conditions stated in
|
||||
this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise, any
|
||||
Contribution intentionally submitted for inclusion in the Work by You to
|
||||
the Licensor shall be under the terms and conditions of this License,
|
||||
without any additional terms or conditions. Notwithstanding the above,
|
||||
nothing herein shall supersede or modify the terms of any separate license
|
||||
agreement you may have executed with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor, except
|
||||
as required for reasonable and customary use in describing the origin of
|
||||
the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or agreed to
|
||||
in writing, Licensor provides the Work (and each Contributor provides its
|
||||
Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied, including, without limitation, any
|
||||
warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for
|
||||
determining the appropriateness of using or redistributing the Work and
|
||||
assume any risks associated with Your exercise of permissions under this
|
||||
License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory, whether
|
||||
in tort (including negligence), contract, or otherwise, unless required by
|
||||
applicable law (such as deliberate and grossly negligent acts) or agreed to
|
||||
in writing, shall any Contributor be liable to You for damages, including
|
||||
any direct, indirect, special, incidental, or consequential damages of any
|
||||
character arising as a result of this License or out of the use or
|
||||
inability to use the Work (including but not limited to damages for loss of
|
||||
goodwill, work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor has been
|
||||
advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing the
|
||||
Work or Derivative Works thereof, You may choose to offer, and charge a fee
|
||||
for, acceptance of support, warranty, indemnity, or other liability
|
||||
obligations and/or rights consistent with this License. However, in
|
||||
accepting such obligations, You may act only on Your own behalf and on Your
|
||||
sole responsibility, not on behalf of any other Contributor, and only if
|
||||
You agree to indemnify, defend, and hold each Contributor harmless for any
|
||||
liability incurred by, or claims asserted against, such Contributor by
|
||||
reason of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work
|
||||
|
||||
To apply the Apache License to your work, attach the following boilerplate
|
||||
notice, with the fields enclosed by brackets "[]" replaced with your own
|
||||
identifying information. (Don't include the brackets!) The text should be
|
||||
enclosed in the appropriate comment syntax for the file format. We also
|
||||
recommend that a file or class name and description of purpose be included
|
||||
on the same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
not use this file except in compliance with the License. You may obtain a
|
||||
copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable
|
||||
law or agreed to in writing, software distributed under the License is
|
||||
distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the specific language
|
||||
governing permissions and limitations under the License.
|
||||
36
src/libs/opencore-amr/Makefile.am
Normal file
36
src/libs/opencore-amr/Makefile.am
Normal file
@@ -0,0 +1,36 @@
|
||||
SUBDIRS = amrnb amrwb
|
||||
if EXAMPLES
|
||||
SUBDIRS += test
|
||||
endif
|
||||
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
|
||||
noinst_HEADERS = oscl/oscl_base.h oscl/oscl_mem.h oscl/oscl_base_macros.h
|
||||
|
||||
EXTRA_DIST = $(top_srcdir)/LICENSE \
|
||||
$(top_srcdir)/opencore/README \
|
||||
$(top_srcdir)/opencore/NOTICE opencore/ChangeLog \
|
||||
$(top_srcdir)/opencore/codecs_v2/audio/gsm_amr/patent_disclaimer.txt \
|
||||
$(top_srcdir)/opencore/codecs_v2/audio/gsm_amr/common/dec/include \
|
||||
$(top_srcdir)/opencore/codecs_v2/audio/gsm_amr/common/dec/build \
|
||||
$(top_srcdir)/opencore/codecs_v2/audio/gsm_amr/common/dec/Android.mk \
|
||||
$(top_srcdir)/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/Android.mk \
|
||||
$(top_srcdir)/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/build \
|
||||
$(top_srcdir)/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/include \
|
||||
$(top_srcdir)/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/src/*.cpp \
|
||||
$(top_srcdir)/opencore/codecs_v2/audio/gsm_amr/amr_nb/dec/Android.mk \
|
||||
$(top_srcdir)/opencore/codecs_v2/audio/gsm_amr/amr_nb/dec/build \
|
||||
$(top_srcdir)/opencore/codecs_v2/audio/gsm_amr/amr_nb/dec/include \
|
||||
$(top_srcdir)/opencore/codecs_v2/audio/gsm_amr/amr_nb/dec/src/*.cpp \
|
||||
$(top_srcdir)/opencore/codecs_v2/audio/gsm_amr/amr_nb/dec/src/*.h \
|
||||
$(top_srcdir)/opencore/codecs_v2/audio/gsm_amr/amr_nb/enc/Android.mk \
|
||||
$(top_srcdir)/opencore/codecs_v2/audio/gsm_amr/amr_nb/enc/build \
|
||||
$(top_srcdir)/opencore/codecs_v2/audio/gsm_amr/amr_nb/enc/include \
|
||||
$(top_srcdir)/opencore/codecs_v2/audio/gsm_amr/amr_nb/enc/src/*.cpp \
|
||||
$(top_srcdir)/opencore/codecs_v2/audio/gsm_amr/amr_nb/enc/src/*.h \
|
||||
$(top_srcdir)/opencore/codecs_v2/audio/gsm_amr/amr_wb/dec/Android.mk \
|
||||
$(top_srcdir)/opencore/codecs_v2/audio/gsm_amr/amr_wb/dec/build \
|
||||
$(top_srcdir)/opencore/codecs_v2/audio/gsm_amr/amr_wb/dec/include \
|
||||
$(top_srcdir)/opencore/codecs_v2/audio/gsm_amr/amr_wb/dec/src/*.cpp \
|
||||
$(top_srcdir)/opencore/codecs_v2/audio/gsm_amr/amr_wb/dec/src/*.h
|
||||
|
||||
789
src/libs/opencore-amr/Makefile.in
Normal file
789
src/libs/opencore-amr/Makefile.in
Normal file
@@ -0,0 +1,789 @@
|
||||
# Makefile.in generated by automake 1.11.3 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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@
|
||||
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@
|
||||
@EXAMPLES_TRUE@am__append_1 = test
|
||||
subdir = .
|
||||
DIST_COMMON = README $(am__configure_deps) $(noinst_HEADERS) \
|
||||
$(srcdir)/Makefile.am $(srcdir)/Makefile.in \
|
||||
$(srcdir)/config.h.in $(top_srcdir)/configure AUTHORS COPYING \
|
||||
ChangeLog INSTALL NEWS config.guess config.sub depcomp \
|
||||
install-sh ltmain.sh missing
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(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)/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 =
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
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_at = $(am__v_at_@AM_V@)
|
||||
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
|
||||
am__v_at_0 = @
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
RECURSIVE_TARGETS = all-recursive check-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 uninstall-recursive
|
||||
HEADERS = $(noinst_HEADERS)
|
||||
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
|
||||
distclean-recursive maintainer-clean-recursive
|
||||
AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
|
||||
$(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
|
||||
distdir dist dist-all distcheck
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DIST_SUBDIRS = amrnb amrwb test
|
||||
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__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
|
||||
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@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
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@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LD = @LD@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LIBTOOL_DEPS = @LIBTOOL_DEPS@
|
||||
LIPO = @LIPO@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAINT = @MAINT@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MANIFEST_TOOL = @MANIFEST_TOOL@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
NM = @NM@
|
||||
NMEDIT = @NMEDIT@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
OBJEXT = @OBJEXT@
|
||||
OPENCORE_AMRNB_VERSION = @OPENCORE_AMRNB_VERSION@
|
||||
OPENCORE_AMRWB_VERSION = @OPENCORE_AMRWB_VERSION@
|
||||
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@
|
||||
RANLIB = @RANLIB@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
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_CXX = @ac_ct_CXX@
|
||||
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@
|
||||
SUBDIRS = amrnb amrwb $(am__append_1)
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
noinst_HEADERS = oscl/oscl_base.h oscl/oscl_mem.h oscl/oscl_base_macros.h
|
||||
EXTRA_DIST = $(top_srcdir)/LICENSE \
|
||||
$(top_srcdir)/opencore/README \
|
||||
$(top_srcdir)/opencore/NOTICE opencore/ChangeLog \
|
||||
$(top_srcdir)/opencore/codecs_v2/audio/gsm_amr/patent_disclaimer.txt \
|
||||
$(top_srcdir)/opencore/codecs_v2/audio/gsm_amr/common/dec/include \
|
||||
$(top_srcdir)/opencore/codecs_v2/audio/gsm_amr/common/dec/build \
|
||||
$(top_srcdir)/opencore/codecs_v2/audio/gsm_amr/common/dec/Android.mk \
|
||||
$(top_srcdir)/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/Android.mk \
|
||||
$(top_srcdir)/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/build \
|
||||
$(top_srcdir)/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/include \
|
||||
$(top_srcdir)/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/src/*.cpp \
|
||||
$(top_srcdir)/opencore/codecs_v2/audio/gsm_amr/amr_nb/dec/Android.mk \
|
||||
$(top_srcdir)/opencore/codecs_v2/audio/gsm_amr/amr_nb/dec/build \
|
||||
$(top_srcdir)/opencore/codecs_v2/audio/gsm_amr/amr_nb/dec/include \
|
||||
$(top_srcdir)/opencore/codecs_v2/audio/gsm_amr/amr_nb/dec/src/*.cpp \
|
||||
$(top_srcdir)/opencore/codecs_v2/audio/gsm_amr/amr_nb/dec/src/*.h \
|
||||
$(top_srcdir)/opencore/codecs_v2/audio/gsm_amr/amr_nb/enc/Android.mk \
|
||||
$(top_srcdir)/opencore/codecs_v2/audio/gsm_amr/amr_nb/enc/build \
|
||||
$(top_srcdir)/opencore/codecs_v2/audio/gsm_amr/amr_nb/enc/include \
|
||||
$(top_srcdir)/opencore/codecs_v2/audio/gsm_amr/amr_nb/enc/src/*.cpp \
|
||||
$(top_srcdir)/opencore/codecs_v2/audio/gsm_amr/amr_nb/enc/src/*.h \
|
||||
$(top_srcdir)/opencore/codecs_v2/audio/gsm_amr/amr_wb/dec/Android.mk \
|
||||
$(top_srcdir)/opencore/codecs_v2/audio/gsm_amr/amr_wb/dec/build \
|
||||
$(top_srcdir)/opencore/codecs_v2/audio/gsm_amr/amr_wb/dec/include \
|
||||
$(top_srcdir)/opencore/codecs_v2/audio/gsm_amr/amr_wb/dec/src/*.cpp \
|
||||
$(top_srcdir)/opencore/codecs_v2/audio/gsm_amr/amr_wb/dec/src/*.h
|
||||
|
||||
all: config.h
|
||||
$(MAKE) $(AM_MAKEFLAGS) all-recursive
|
||||
|
||||
.SUFFIXES:
|
||||
am--refresh: Makefile
|
||||
@:
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(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;
|
||||
|
||||
$(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
|
||||
@if test ! -f $@; then rm -f stamp-h1; else :; fi
|
||||
@if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi
|
||||
|
||||
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
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
distclean-libtool:
|
||||
-rm -f libtool config.lt
|
||||
|
||||
# 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.
|
||||
$(RECURSIVE_TARGETS):
|
||||
@fail= failcom='exit 1'; \
|
||||
for f in x $$MAKEFLAGS; do \
|
||||
case $$f in \
|
||||
*=* | --[!k]*);; \
|
||||
*k*) failcom='fail=yes';; \
|
||||
esac; \
|
||||
done; \
|
||||
dot_seen=no; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
list='$(SUBDIRS)'; 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"
|
||||
|
||||
$(RECURSIVE_CLEAN_TARGETS):
|
||||
@fail= failcom='exit 1'; \
|
||||
for f in x $$MAKEFLAGS; do \
|
||||
case $$f in \
|
||||
*=* | --[!k]*);; \
|
||||
*k*) failcom='fail=yes';; \
|
||||
esac; \
|
||||
done; \
|
||||
dot_seen=no; \
|
||||
case "$@" in \
|
||||
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
|
||||
*) list='$(SUBDIRS)' ;; \
|
||||
esac; \
|
||||
rev=''; for subdir in $$list; do \
|
||||
if test "$$subdir" = "."; then :; else \
|
||||
rev="$$subdir $$rev"; \
|
||||
fi; \
|
||||
done; \
|
||||
rev="$$rev ."; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
for subdir in $$rev; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| eval $$failcom; \
|
||||
done && test -z "$$fail"
|
||||
tags-recursive:
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
|
||||
done
|
||||
ctags-recursive:
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
|
||||
done
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
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; \
|
||||
list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
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
|
||||
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
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"
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
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 \
|
||||
test -d "$(distdir)/$$subdir" \
|
||||
|| $(MKDIR_P) "$(distdir)/$$subdir" \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
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
|
||||
-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__remove_distdir)
|
||||
|
||||
dist-bzip2: distdir
|
||||
tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-lzip: distdir
|
||||
tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-lzma: distdir
|
||||
tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-xz: distdir
|
||||
tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-tarZ: distdir
|
||||
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-shar: distdir
|
||||
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-zip: distdir
|
||||
-rm -f $(distdir).zip
|
||||
zip -rq $(distdir).zip $(distdir)
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist dist-all: distdir
|
||||
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
|
||||
$(am__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.lzma*) \
|
||||
lzma -dc $(distdir).tar.lzma | $(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 a+w $(distdir)
|
||||
mkdir $(distdir)/_build
|
||||
mkdir $(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 --srcdir=.. --prefix="$$dc_install_base" \
|
||||
$(AM_DISTCHECK_CONFIGURE_FLAGS) \
|
||||
$(DISTCHECK_CONFIGURE_FLAGS) \
|
||||
&& $(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__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
|
||||
check: check-recursive
|
||||
all-am: Makefile $(HEADERS) config.h
|
||||
installdirs: installdirs-recursive
|
||||
installdirs-am:
|
||||
install: 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:
|
||||
|
||||
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."
|
||||
clean: clean-recursive
|
||||
|
||||
clean-am: clean-generic clean-libtool mostlyclean-am
|
||||
|
||||
distclean: distclean-recursive
|
||||
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am 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-dvi: install-dvi-recursive
|
||||
|
||||
install-dvi-am:
|
||||
|
||||
install-exec-am:
|
||||
|
||||
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 -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-recursive
|
||||
|
||||
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
|
||||
|
||||
pdf: pdf-recursive
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-recursive
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am:
|
||||
|
||||
.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \
|
||||
ctags-recursive install-am install-strip tags-recursive
|
||||
|
||||
.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
|
||||
all all-am am--refresh check check-am clean clean-generic \
|
||||
clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \
|
||||
dist-gzip dist-lzip dist-lzma dist-shar dist-tarZ dist-xz \
|
||||
dist-zip distcheck distclean 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-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 \
|
||||
installdirs-am maintainer-clean maintainer-clean-generic \
|
||||
mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
|
||||
ps ps-am tags tags-recursive uninstall uninstall-am
|
||||
|
||||
|
||||
# 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:
|
||||
0
src/libs/opencore-amr/NEWS
Normal file
0
src/libs/opencore-amr/NEWS
Normal file
11
src/libs/opencore-amr/README
Normal file
11
src/libs/opencore-amr/README
Normal file
@@ -0,0 +1,11 @@
|
||||
OpenCORE Adaptive Multi Rate (AMR) speech codec library implementation.
|
||||
|
||||
This library contains an implementation of the 3GPP TS 26.073 specification for
|
||||
the Adaptive Multi Rate (AMR) speech codec and an implementation for the
|
||||
3GPP TS 26.173 specification for the Adaptive Multi-Rate - Wideband (AMR-WB)
|
||||
speech decoder. The implementation is derived from the OpenCORE framework, part
|
||||
of the Google Android project.
|
||||
|
||||
This library is Licensed under the Apache License, Version 2.0. A copy me be
|
||||
found in the file 'LICENSE' and at
|
||||
http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
1092
src/libs/opencore-amr/aclocal.m4
vendored
Normal file
1092
src/libs/opencore-amr/aclocal.m4
vendored
Normal file
File diff suppressed because it is too large
Load Diff
224
src/libs/opencore-amr/amrnb/Makefile.am
Normal file
224
src/libs/opencore-amr/amrnb/Makefile.am
Normal file
@@ -0,0 +1,224 @@
|
||||
# Just set OC_BASE to the opencore root, or set AMR_BASE directly to
|
||||
# a detached gsm_amr directory
|
||||
OC_BASE = $(top_srcdir)/opencore
|
||||
AMR_BASE = $(OC_BASE)/codecs_v2/audio/gsm_amr
|
||||
|
||||
DEC_DIR = $(AMR_BASE)/amr_nb/dec
|
||||
ENC_DIR = $(AMR_BASE)/amr_nb/enc
|
||||
COMMON_DIR = $(AMR_BASE)/amr_nb/common
|
||||
DEC_SRC_DIR = $(DEC_DIR)/src
|
||||
ENC_SRC_DIR = $(ENC_DIR)/src
|
||||
COMMON_SRC_DIR = $(COMMON_DIR)/src
|
||||
OSCL = $(top_srcdir)/oscl
|
||||
|
||||
AM_CFLAGS = -I$(OSCL) -I$(DEC_SRC_DIR) -I$(COMMON_DIR)/include \
|
||||
-I$(DEC_DIR)/include -I$(AMR_BASE)/common/dec/include -I$(ENC_SRC_DIR)
|
||||
|
||||
if GCC_ARMV5
|
||||
AM_CFLAGS += -DPV_CPU_ARCH_VERSION=5 -DPV_COMPILER=1
|
||||
endif
|
||||
|
||||
if COMPILE_AS_C
|
||||
AM_CFLAGS += -x c -std=c99
|
||||
libopencore_amrnb_la_LINK = $(LINK) $(libopencore_amrnb_la_LDFLAGS)
|
||||
# Mention a dummy pure C file to trigger generation of the $(LINK) variable
|
||||
nodist_EXTRA_libopencore_amrnb_la_SOURCES = dummy.c
|
||||
else
|
||||
libopencore_amrnb_la_LINK = $(CXXLINK) $(libopencore_amrnb_la_LDFLAGS)
|
||||
endif
|
||||
|
||||
AM_CXXFLAGS = $(AM_CFLAGS)
|
||||
|
||||
amrnbincludedir = $(includedir)/opencore-amrnb
|
||||
amrnbinclude_HEADERS =
|
||||
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
pkgconfig_DATA = opencore-amrnb.pc
|
||||
|
||||
lib_LTLIBRARIES = libopencore-amrnb.la
|
||||
|
||||
libopencore_amrnb_la_LDFLAGS = -version-info @OPENCORE_AMRNB_VERSION@ -no-undefined -export-symbols $(top_srcdir)/amrnb/opencore-amrnb.sym
|
||||
EXTRA_DIST = $(top_srcdir)/amrnb/opencore-amrnb.sym
|
||||
|
||||
# Our sources to include. There are certain sources we exclude and they are
|
||||
# $(DEC_SRC_DIR)/decoder_gsm_amr.cpp
|
||||
# $(DEC_SRC_DIR)/pvgsmamrdecoder.cpp
|
||||
# $(ENC_SRC_DIR)/gsmamr_encoder_wrapper.cpp
|
||||
# $(COMMON_SRC_DIR)/bits2prm.cpp
|
||||
# $(COMMON_SRC_DIR)/copy.cpp
|
||||
# $(COMMON_SRC_DIR)/div_32.cpp
|
||||
# $(COMMON_SRC_DIR)/l_abs.cpp
|
||||
# $(COMMON_SRC_DIR)/r_fft.cpp
|
||||
# $(COMMON_SRC_DIR)/vad1.cpp
|
||||
# $(COMMON_SRC_DIR)/vad2.cpp
|
||||
libopencore_amrnb_la_SOURCES = \
|
||||
wrapper.cpp
|
||||
|
||||
if AMRNB_DECODER
|
||||
libopencore_amrnb_la_SOURCES += \
|
||||
$(DEC_SRC_DIR)/agc.cpp \
|
||||
$(DEC_SRC_DIR)/amrdecode.cpp \
|
||||
$(DEC_SRC_DIR)/a_refl.cpp \
|
||||
$(DEC_SRC_DIR)/b_cn_cod.cpp \
|
||||
$(DEC_SRC_DIR)/bgnscd.cpp \
|
||||
$(DEC_SRC_DIR)/c_g_aver.cpp \
|
||||
$(DEC_SRC_DIR)/d1035pf.cpp \
|
||||
$(DEC_SRC_DIR)/d2_11pf.cpp \
|
||||
$(DEC_SRC_DIR)/d2_9pf.cpp \
|
||||
$(DEC_SRC_DIR)/d3_14pf.cpp \
|
||||
$(DEC_SRC_DIR)/d4_17pf.cpp \
|
||||
$(DEC_SRC_DIR)/d8_31pf.cpp \
|
||||
$(DEC_SRC_DIR)/dec_amr.cpp \
|
||||
$(DEC_SRC_DIR)/dec_gain.cpp \
|
||||
$(DEC_SRC_DIR)/dec_input_format_tab.cpp \
|
||||
$(DEC_SRC_DIR)/dec_lag3.cpp \
|
||||
$(DEC_SRC_DIR)/dec_lag6.cpp \
|
||||
$(DEC_SRC_DIR)/d_gain_c.cpp \
|
||||
$(DEC_SRC_DIR)/d_gain_p.cpp \
|
||||
$(DEC_SRC_DIR)/d_plsf_3.cpp \
|
||||
$(DEC_SRC_DIR)/d_plsf_5.cpp \
|
||||
$(DEC_SRC_DIR)/d_plsf.cpp \
|
||||
$(DEC_SRC_DIR)/dtx_dec.cpp \
|
||||
$(DEC_SRC_DIR)/ec_gains.cpp \
|
||||
$(DEC_SRC_DIR)/ex_ctrl.cpp \
|
||||
$(DEC_SRC_DIR)/if2_to_ets.cpp \
|
||||
$(DEC_SRC_DIR)/int_lsf.cpp \
|
||||
$(DEC_SRC_DIR)/lsp_avg.cpp \
|
||||
$(DEC_SRC_DIR)/ph_disp.cpp \
|
||||
$(DEC_SRC_DIR)/post_pro.cpp \
|
||||
$(DEC_SRC_DIR)/preemph.cpp \
|
||||
$(DEC_SRC_DIR)/pstfilt.cpp \
|
||||
$(DEC_SRC_DIR)/qgain475_tab.cpp \
|
||||
$(DEC_SRC_DIR)/sp_dec.cpp \
|
||||
$(DEC_SRC_DIR)/wmf_to_ets.cpp
|
||||
amrnbinclude_HEADERS += interf_dec.h
|
||||
else
|
||||
AM_CFLAGS += -DDISABLE_AMRNB_DECODER
|
||||
endif
|
||||
|
||||
if AMRNB_ENCODER
|
||||
libopencore_amrnb_la_SOURCES += \
|
||||
$(ENC_SRC_DIR)/amrencode.cpp \
|
||||
$(ENC_SRC_DIR)/autocorr.cpp \
|
||||
$(ENC_SRC_DIR)/c1035pf.cpp \
|
||||
$(ENC_SRC_DIR)/c2_11pf.cpp \
|
||||
$(ENC_SRC_DIR)/c2_9pf.cpp \
|
||||
$(ENC_SRC_DIR)/c3_14pf.cpp \
|
||||
$(ENC_SRC_DIR)/c4_17pf.cpp \
|
||||
$(ENC_SRC_DIR)/c8_31pf.cpp \
|
||||
$(ENC_SRC_DIR)/calc_cor.cpp \
|
||||
$(ENC_SRC_DIR)/calc_en.cpp \
|
||||
$(ENC_SRC_DIR)/cbsearch.cpp \
|
||||
$(ENC_SRC_DIR)/cl_ltp.cpp \
|
||||
$(ENC_SRC_DIR)/cod_amr.cpp \
|
||||
$(ENC_SRC_DIR)/convolve.cpp \
|
||||
$(ENC_SRC_DIR)/cor_h.cpp \
|
||||
$(ENC_SRC_DIR)/cor_h_x2.cpp \
|
||||
$(ENC_SRC_DIR)/cor_h_x.cpp \
|
||||
$(ENC_SRC_DIR)/corrwght_tab.cpp \
|
||||
$(ENC_SRC_DIR)/div_32.cpp \
|
||||
$(ENC_SRC_DIR)/dtx_enc.cpp \
|
||||
$(ENC_SRC_DIR)/enc_lag3.cpp \
|
||||
$(ENC_SRC_DIR)/enc_lag6.cpp \
|
||||
$(ENC_SRC_DIR)/enc_output_format_tab.cpp \
|
||||
$(ENC_SRC_DIR)/ets_to_if2.cpp \
|
||||
$(ENC_SRC_DIR)/ets_to_wmf.cpp \
|
||||
$(ENC_SRC_DIR)/g_adapt.cpp \
|
||||
$(ENC_SRC_DIR)/gain_q.cpp \
|
||||
$(ENC_SRC_DIR)/g_code.cpp \
|
||||
$(ENC_SRC_DIR)/g_pitch.cpp \
|
||||
$(ENC_SRC_DIR)/hp_max.cpp \
|
||||
$(ENC_SRC_DIR)/inter_36.cpp \
|
||||
$(ENC_SRC_DIR)/inter_36_tab.cpp \
|
||||
$(ENC_SRC_DIR)/l_abs.cpp \
|
||||
$(ENC_SRC_DIR)/lag_wind.cpp \
|
||||
$(ENC_SRC_DIR)/lag_wind_tab.cpp \
|
||||
$(ENC_SRC_DIR)/l_comp.cpp \
|
||||
$(ENC_SRC_DIR)/levinson.cpp \
|
||||
$(ENC_SRC_DIR)/l_extract.cpp \
|
||||
$(ENC_SRC_DIR)/lflg_upd.cpp \
|
||||
$(ENC_SRC_DIR)/l_negate.cpp \
|
||||
$(ENC_SRC_DIR)/lpc.cpp \
|
||||
$(ENC_SRC_DIR)/ol_ltp.cpp \
|
||||
$(ENC_SRC_DIR)/pitch_fr.cpp \
|
||||
$(ENC_SRC_DIR)/pitch_ol.cpp \
|
||||
$(ENC_SRC_DIR)/p_ol_wgh.cpp \
|
||||
$(ENC_SRC_DIR)/pre_big.cpp \
|
||||
$(ENC_SRC_DIR)/pre_proc.cpp \
|
||||
$(ENC_SRC_DIR)/prm2bits.cpp \
|
||||
$(ENC_SRC_DIR)/qgain475.cpp \
|
||||
$(ENC_SRC_DIR)/qgain795.cpp \
|
||||
$(ENC_SRC_DIR)/q_gain_c.cpp \
|
||||
$(ENC_SRC_DIR)/q_gain_p.cpp \
|
||||
$(ENC_SRC_DIR)/qua_gain.cpp \
|
||||
$(ENC_SRC_DIR)/s10_8pf.cpp \
|
||||
$(ENC_SRC_DIR)/set_sign.cpp \
|
||||
$(ENC_SRC_DIR)/sid_sync.cpp \
|
||||
$(ENC_SRC_DIR)/sp_enc.cpp \
|
||||
$(ENC_SRC_DIR)/spreproc.cpp \
|
||||
$(ENC_SRC_DIR)/spstproc.cpp \
|
||||
$(ENC_SRC_DIR)/ton_stab.cpp \
|
||||
$(ENC_SRC_DIR)/vad1.cpp
|
||||
amrnbinclude_HEADERS += interf_enc.h
|
||||
else
|
||||
AM_CFLAGS += -DDISABLE_AMRNB_ENCODER
|
||||
endif
|
||||
|
||||
libopencore_amrnb_la_SOURCES += \
|
||||
$(COMMON_SRC_DIR)/add.cpp \
|
||||
$(COMMON_SRC_DIR)/az_lsp.cpp \
|
||||
$(COMMON_SRC_DIR)/bitno_tab.cpp \
|
||||
$(COMMON_SRC_DIR)/bitreorder_tab.cpp \
|
||||
$(COMMON_SRC_DIR)/c2_9pf_tab.cpp \
|
||||
$(COMMON_SRC_DIR)/div_s.cpp \
|
||||
$(COMMON_SRC_DIR)/extract_h.cpp \
|
||||
$(COMMON_SRC_DIR)/extract_l.cpp \
|
||||
$(COMMON_SRC_DIR)/gains_tbl.cpp \
|
||||
$(COMMON_SRC_DIR)/gc_pred.cpp \
|
||||
$(COMMON_SRC_DIR)/get_const_tbls.cpp \
|
||||
$(COMMON_SRC_DIR)/gmed_n.cpp \
|
||||
$(COMMON_SRC_DIR)/gray_tbl.cpp \
|
||||
$(COMMON_SRC_DIR)/grid_tbl.cpp \
|
||||
$(COMMON_SRC_DIR)/int_lpc.cpp \
|
||||
$(COMMON_SRC_DIR)/inv_sqrt.cpp \
|
||||
$(COMMON_SRC_DIR)/inv_sqrt_tbl.cpp \
|
||||
$(COMMON_SRC_DIR)/l_deposit_h.cpp \
|
||||
$(COMMON_SRC_DIR)/l_deposit_l.cpp \
|
||||
$(COMMON_SRC_DIR)/log2.cpp \
|
||||
$(COMMON_SRC_DIR)/log2_norm.cpp \
|
||||
$(COMMON_SRC_DIR)/log2_tbl.cpp \
|
||||
$(COMMON_SRC_DIR)/lsfwt.cpp \
|
||||
$(COMMON_SRC_DIR)/l_shr_r.cpp \
|
||||
$(COMMON_SRC_DIR)/lsp_az.cpp \
|
||||
$(COMMON_SRC_DIR)/lsp.cpp \
|
||||
$(COMMON_SRC_DIR)/lsp_lsf.cpp \
|
||||
$(COMMON_SRC_DIR)/lsp_lsf_tbl.cpp \
|
||||
$(COMMON_SRC_DIR)/lsp_tab.cpp \
|
||||
$(COMMON_SRC_DIR)/mult_r.cpp \
|
||||
$(COMMON_SRC_DIR)/negate.cpp \
|
||||
$(COMMON_SRC_DIR)/norm_l.cpp \
|
||||
$(COMMON_SRC_DIR)/norm_s.cpp \
|
||||
$(COMMON_SRC_DIR)/overflow_tbl.cpp \
|
||||
$(COMMON_SRC_DIR)/ph_disp_tab.cpp \
|
||||
$(COMMON_SRC_DIR)/pow2.cpp \
|
||||
$(COMMON_SRC_DIR)/pow2_tbl.cpp \
|
||||
$(COMMON_SRC_DIR)/pred_lt.cpp \
|
||||
$(COMMON_SRC_DIR)/q_plsf_3.cpp \
|
||||
$(COMMON_SRC_DIR)/q_plsf_3_tbl.cpp \
|
||||
$(COMMON_SRC_DIR)/q_plsf_5.cpp \
|
||||
$(COMMON_SRC_DIR)/q_plsf_5_tbl.cpp \
|
||||
$(COMMON_SRC_DIR)/q_plsf.cpp \
|
||||
$(COMMON_SRC_DIR)/qua_gain_tbl.cpp \
|
||||
$(COMMON_SRC_DIR)/reorder.cpp \
|
||||
$(COMMON_SRC_DIR)/residu.cpp \
|
||||
$(COMMON_SRC_DIR)/round.cpp \
|
||||
$(COMMON_SRC_DIR)/set_zero.cpp \
|
||||
$(COMMON_SRC_DIR)/shr.cpp \
|
||||
$(COMMON_SRC_DIR)/shr_r.cpp \
|
||||
$(COMMON_SRC_DIR)/sqrt_l.cpp \
|
||||
$(COMMON_SRC_DIR)/sqrt_l_tbl.cpp \
|
||||
$(COMMON_SRC_DIR)/sub.cpp \
|
||||
$(COMMON_SRC_DIR)/syn_filt.cpp \
|
||||
$(COMMON_SRC_DIR)/weight_a.cpp \
|
||||
$(COMMON_SRC_DIR)/window_tab.cpp
|
||||
|
||||
2171
src/libs/opencore-amr/amrnb/Makefile.in
Normal file
2171
src/libs/opencore-amr/amrnb/Makefile.in
Normal file
File diff suppressed because it is too large
Load Diff
38
src/libs/opencore-amr/amrnb/interf_dec.h
Normal file
38
src/libs/opencore-amr/amrnb/interf_dec.h
Normal file
@@ -0,0 +1,38 @@
|
||||
/* ------------------------------------------------------------------
|
||||
* Copyright (C) 2009 Martin Storsjo
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
||||
* express or implied.
|
||||
* See the License for the specific language governing permissions
|
||||
* and limitations under the License.
|
||||
* -------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#ifndef OPENCORE_AMRNB_INTERF_DEC_H
|
||||
#define OPENCORE_AMRNB_INTERF_DEC_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
void* Decoder_Interface_init(void);
|
||||
//void Decoder_Interface_init(void* state);
|
||||
|
||||
void Decoder_Interface_exit(void* state);
|
||||
void Decoder_Interface_Decode(void* state,
|
||||
const unsigned char* in,
|
||||
short* out, int bfi);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
61
src/libs/opencore-amr/amrnb/interf_enc.h
Normal file
61
src/libs/opencore-amr/amrnb/interf_enc.h
Normal file
@@ -0,0 +1,61 @@
|
||||
/* ------------------------------------------------------------------
|
||||
* Copyright (C) 2009 Martin Storsjo
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
||||
* express or implied.
|
||||
* See the License for the specific language governing permissions
|
||||
* and limitations under the License.
|
||||
* -------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#ifndef OPENCORE_AMRNB_INTERF_ENC_H
|
||||
#define OPENCORE_AMRNB_INTERF_ENC_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef AMRNB_WRAPPER_INTERNAL
|
||||
/* Copied from enc/src/gsmamr_enc.h */
|
||||
enum Mode {
|
||||
MR475 = 0,/* 4.75 kbps */
|
||||
MR515, /* 5.15 kbps */
|
||||
MR59, /* 5.90 kbps */
|
||||
MR67, /* 6.70 kbps */
|
||||
MR74, /* 7.40 kbps */
|
||||
MR795, /* 7.95 kbps */
|
||||
MR102, /* 10.2 kbps */
|
||||
MR122, /* 12.2 kbps */
|
||||
MRDTX, /* DTX */
|
||||
N_MODES /* Not Used */
|
||||
};
|
||||
#endif
|
||||
|
||||
struct encoder_state {
|
||||
void* encCtx;
|
||||
void* pidSyncCtx;
|
||||
};
|
||||
|
||||
void* Encoder_Interface_init(int dtx);
|
||||
|
||||
//WORK
|
||||
//void Encoder_Interface_init(void* state,int dtx);
|
||||
|
||||
void Encoder_Interface_exit(void* state);
|
||||
int Encoder_Interface_Encode(void* state, enum Mode mode,
|
||||
const short* speech,
|
||||
unsigned char* out, int forceSpeech);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
10
src/libs/opencore-amr/amrnb/opencore-amrnb.pc.in
Normal file
10
src/libs/opencore-amr/amrnb/opencore-amrnb.pc.in
Normal file
@@ -0,0 +1,10 @@
|
||||
prefix=@prefix@
|
||||
exec_prefix=@exec_prefix@
|
||||
libdir=@libdir@
|
||||
includedir=@includedir@
|
||||
|
||||
Name: OpenCORE AMR-NB
|
||||
Description: Adaptive Multi-Rate speech codec library
|
||||
Version: @PACKAGE_VERSION@
|
||||
Libs: -L${libdir} -lopencore-amrnb
|
||||
Cflags: -I${includedir}
|
||||
6
src/libs/opencore-amr/amrnb/opencore-amrnb.sym
Normal file
6
src/libs/opencore-amr/amrnb/opencore-amrnb.sym
Normal file
@@ -0,0 +1,6 @@
|
||||
Decoder_Interface_init
|
||||
Decoder_Interface_exit
|
||||
Decoder_Interface_Decode
|
||||
Encoder_Interface_init
|
||||
Encoder_Interface_exit
|
||||
Encoder_Interface_Encode
|
||||
105
src/libs/opencore-amr/amrnb/wrapper.cpp
Normal file
105
src/libs/opencore-amr/amrnb/wrapper.cpp
Normal file
@@ -0,0 +1,105 @@
|
||||
/* ------------------------------------------------------------------
|
||||
* Copyright (C) 2009 Martin Storsjo
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
||||
* express or implied.
|
||||
* See the License for the specific language governing permissions
|
||||
* and limitations under the License.
|
||||
* -------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#define AMRNB_WRAPPER_INTERNAL
|
||||
#include <sp_dec.h>
|
||||
#include <amrdecode.h>
|
||||
#include <amrencode.h>
|
||||
#include "interf_dec.h"
|
||||
#include "interf_enc.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifndef DISABLE_AMRNB_DECODER
|
||||
|
||||
|
||||
//default
|
||||
void* Decoder_Interface_init(void) {
|
||||
void* ptr = NULL;
|
||||
GSMInitDecode(&ptr, (int8*)"Decoder");
|
||||
return ptr;
|
||||
}
|
||||
/*
|
||||
//fixed error
|
||||
void Decoder_Interface_init(void* state) {
|
||||
void* ptr = NULL;
|
||||
GSMInitDecode(state, (int8*)"Decoder");
|
||||
return ptr;
|
||||
}
|
||||
*/
|
||||
void Decoder_Interface_exit(void* state) {
|
||||
GSMDecodeFrameExit(&state);
|
||||
}
|
||||
|
||||
void Decoder_Interface_Decode(void* state, const unsigned char* in, short* out, int bfi) {
|
||||
unsigned char type = (in[0] >> 3) & 0x0f;
|
||||
in++;
|
||||
AMRDecode(state, (enum Frame_Type_3GPP) type, (UWord8*) in, out, MIME_IETF);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef DISABLE_AMRNB_ENCODER
|
||||
|
||||
|
||||
void* Encoder_Interface_init(int dtx) {
|
||||
struct encoder_state* state = (struct encoder_state*) malloc(sizeof(struct encoder_state));
|
||||
AMREncodeInit(&state->encCtx, &state->pidSyncCtx, dtx);
|
||||
return state;
|
||||
}
|
||||
|
||||
/*
|
||||
void Encoder_Interface_init(void * encInst,int dtx) {
|
||||
//int dtx=1;
|
||||
struct encoder_state* state = (struct encoder_state*)encInst;// malloc(sizeof(struct encoder_state));
|
||||
AMREncodeInit(&state->encCtx, &state->pidSyncCtx, dtx);
|
||||
//return state;
|
||||
}
|
||||
*/
|
||||
void Encoder_Interface_exit(void* s) {
|
||||
struct encoder_state* state = (struct encoder_state*) s;
|
||||
AMREncodeExit(&state->encCtx, &state->pidSyncCtx);
|
||||
free(state);
|
||||
}
|
||||
|
||||
int Encoder_Interface_Encode(void* s, enum Mode mode,
|
||||
const short* speech, unsigned char* out,
|
||||
int forceSpeech) {
|
||||
struct encoder_state* state = (struct encoder_state*) s;
|
||||
enum Frame_Type_3GPP frame_type = (enum Frame_Type_3GPP) mode;
|
||||
|
||||
/**
|
||||
Word16 AMREncode(
|
||||
void *pEncState, void *pSidSyncState,
|
||||
enum Mode 3gp_frame_type,
|
||||
Word16 *pEncInput,
|
||||
UWord8 *pEncOutput,
|
||||
|
||||
enum Frame_Type_3GPP *p3gpp_frame_type,
|
||||
Word16 output_format
|
||||
)
|
||||
*/
|
||||
int ret = AMREncode(state->encCtx, state->pidSyncCtx,
|
||||
mode,
|
||||
(Word16*) speech,
|
||||
out,
|
||||
&frame_type,
|
||||
AMR_TX_IETF);
|
||||
out[0] |= 0x04;
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
82
src/libs/opencore-amr/amrwb/Makefile.am
Normal file
82
src/libs/opencore-amr/amrwb/Makefile.am
Normal file
@@ -0,0 +1,82 @@
|
||||
# Just set OC_BASE to the opencore root, or set AMR_BASE directly to
|
||||
# a detached gsm_amr directory
|
||||
OC_BASE = $(top_srcdir)/opencore
|
||||
AMR_BASE = $(OC_BASE)/codecs_v2/audio/gsm_amr
|
||||
|
||||
DEC_DIR = $(AMR_BASE)/amr_wb/dec
|
||||
DEC_SRC_DIR = $(DEC_DIR)/src
|
||||
OSCL = $(top_srcdir)/oscl
|
||||
|
||||
AM_CFLAGS = -I$(OSCL) -I$(DEC_SRC_DIR) -I$(DEC_DIR)/include \
|
||||
-I$(AMR_BASE)/common/dec/include
|
||||
|
||||
if GCC_ARMV5
|
||||
AM_CFLAGS += -DPV_CPU_ARCH_VERSION=5 -DPV_COMPILER=1
|
||||
endif
|
||||
|
||||
if COMPILE_AS_C
|
||||
AM_CFLAGS += -x c -std=c99
|
||||
libopencore_amrwb_la_LINK = $(LINK) $(libopencore_amrwb_la_LDFLAGS)
|
||||
# Mention a dummy pure C file to trigger generation of the $(LINK) variable
|
||||
nodist_EXTRA_libopencore_amrwb_la_SOURCES = dummy.c
|
||||
else
|
||||
libopencore_amrwb_la_LINK = $(CXXLINK) $(libopencore_amrwb_la_LDFLAGS)
|
||||
endif
|
||||
|
||||
AM_CXXFLAGS = $(AM_CFLAGS)
|
||||
|
||||
amrwbincludedir = $(includedir)/opencore-amrwb
|
||||
amrwbinclude_HEADERS = dec_if.h if_rom.h
|
||||
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
pkgconfig_DATA = opencore-amrwb.pc
|
||||
|
||||
lib_LTLIBRARIES = libopencore-amrwb.la
|
||||
|
||||
libopencore_amrwb_la_LDFLAGS = -version-info @OPENCORE_AMRWB_VERSION@ -no-undefined -export-symbols $(top_srcdir)/amrwb/opencore-amrwb.sym
|
||||
EXTRA_DIST = $(top_srcdir)/amrwb/opencore-amrwb.sym
|
||||
|
||||
# Our sources to include. There are certain sources we exclude and they are
|
||||
# $(DEC_SRC_DIR)/decoder_amr_wb.cpp
|
||||
libopencore_amrwb_la_SOURCES = \
|
||||
wrapper.cpp \
|
||||
$(DEC_SRC_DIR)/agc2_amr_wb.cpp \
|
||||
$(DEC_SRC_DIR)/band_pass_6k_7k.cpp \
|
||||
$(DEC_SRC_DIR)/dec_acelp_2p_in_64.cpp \
|
||||
$(DEC_SRC_DIR)/dec_acelp_4p_in_64.cpp \
|
||||
$(DEC_SRC_DIR)/dec_alg_codebook.cpp \
|
||||
$(DEC_SRC_DIR)/dec_gain2_amr_wb.cpp \
|
||||
$(DEC_SRC_DIR)/deemphasis_32.cpp \
|
||||
$(DEC_SRC_DIR)/dtx_decoder_amr_wb.cpp \
|
||||
$(DEC_SRC_DIR)/get_amr_wb_bits.cpp \
|
||||
$(DEC_SRC_DIR)/highpass_400hz_at_12k8.cpp \
|
||||
$(DEC_SRC_DIR)/highpass_50hz_at_12k8.cpp \
|
||||
$(DEC_SRC_DIR)/homing_amr_wb_dec.cpp \
|
||||
$(DEC_SRC_DIR)/interpolate_isp.cpp \
|
||||
$(DEC_SRC_DIR)/isf_extrapolation.cpp \
|
||||
$(DEC_SRC_DIR)/isp_az.cpp \
|
||||
$(DEC_SRC_DIR)/isp_isf.cpp \
|
||||
$(DEC_SRC_DIR)/lagconceal.cpp \
|
||||
$(DEC_SRC_DIR)/low_pass_filt_7k.cpp \
|
||||
$(DEC_SRC_DIR)/median5.cpp \
|
||||
$(DEC_SRC_DIR)/mime_io.cpp \
|
||||
$(DEC_SRC_DIR)/noise_gen_amrwb.cpp \
|
||||
$(DEC_SRC_DIR)/normalize_amr_wb.cpp \
|
||||
$(DEC_SRC_DIR)/oversamp_12k8_to_16k.cpp \
|
||||
$(DEC_SRC_DIR)/phase_dispersion.cpp \
|
||||
$(DEC_SRC_DIR)/pit_shrp.cpp \
|
||||
$(DEC_SRC_DIR)/pred_lt4.cpp \
|
||||
$(DEC_SRC_DIR)/preemph_amrwb_dec.cpp \
|
||||
$(DEC_SRC_DIR)/pvamrwbdecoder.cpp \
|
||||
$(DEC_SRC_DIR)/pvamrwb_math_op.cpp \
|
||||
$(DEC_SRC_DIR)/q_gain2_tab.cpp \
|
||||
$(DEC_SRC_DIR)/qisf_ns.cpp \
|
||||
$(DEC_SRC_DIR)/qisf_ns_tab.cpp \
|
||||
$(DEC_SRC_DIR)/qpisf_2s.cpp \
|
||||
$(DEC_SRC_DIR)/qpisf_2s_tab.cpp \
|
||||
$(DEC_SRC_DIR)/scale_signal.cpp \
|
||||
$(DEC_SRC_DIR)/synthesis_amr_wb.cpp \
|
||||
$(DEC_SRC_DIR)/voice_factor.cpp \
|
||||
$(DEC_SRC_DIR)/wb_syn_filt.cpp \
|
||||
$(DEC_SRC_DIR)/weight_amrwb_lpc.cpp
|
||||
|
||||
1032
src/libs/opencore-amr/amrwb/Makefile.in
Normal file
1032
src/libs/opencore-amr/amrwb/Makefile.in
Normal file
File diff suppressed because it is too large
Load Diff
36
src/libs/opencore-amr/amrwb/dec_if.h
Normal file
36
src/libs/opencore-amr/amrwb/dec_if.h
Normal file
@@ -0,0 +1,36 @@
|
||||
/* ------------------------------------------------------------------
|
||||
* Copyright (C) 2009 Martin Storsjo
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
||||
* express or implied.
|
||||
* See the License for the specific language governing permissions
|
||||
* and limitations under the License.
|
||||
* -------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#ifndef OPENCORE_AMRWB_DEC_IF_H
|
||||
#define OPENCORE_AMRWB_DEC_IF_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define _good_frame 0
|
||||
|
||||
void* D_IF_init(void);
|
||||
void D_IF_decode(void* state, const unsigned char* bits, short* synth, int bfi);
|
||||
void D_IF_exit(void* state);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
33
src/libs/opencore-amr/amrwb/if_rom.h
Normal file
33
src/libs/opencore-amr/amrwb/if_rom.h
Normal file
@@ -0,0 +1,33 @@
|
||||
/* ------------------------------------------------------------------
|
||||
* Copyright (C) 2009 Martin Storsjo
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
||||
* express or implied.
|
||||
* See the License for the specific language governing permissions
|
||||
* and limitations under the License.
|
||||
* -------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#ifndef OPENCORE_AMRWB_IF_ROM_H
|
||||
#define OPENCORE_AMRWB_IF_ROM_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
typedef int16_t Word16;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
10
src/libs/opencore-amr/amrwb/opencore-amrwb.pc.in
Normal file
10
src/libs/opencore-amr/amrwb/opencore-amrwb.pc.in
Normal file
@@ -0,0 +1,10 @@
|
||||
prefix=@prefix@
|
||||
exec_prefix=@exec_prefix@
|
||||
libdir=@libdir@
|
||||
includedir=@includedir@
|
||||
|
||||
Name: OpenCORE AMR-WB
|
||||
Description: Adaptive Multi-Rate Wideband speech codec library
|
||||
Version: @PACKAGE_VERSION@
|
||||
Libs: -L${libdir} -lopencore-amrwb
|
||||
Cflags: -I${includedir}
|
||||
3
src/libs/opencore-amr/amrwb/opencore-amrwb.sym
Normal file
3
src/libs/opencore-amr/amrwb/opencore-amrwb.sym
Normal file
@@ -0,0 +1,3 @@
|
||||
D_IF_init
|
||||
D_IF_decode
|
||||
D_IF_exit
|
||||
128
src/libs/opencore-amr/amrwb/wrapper.cpp
Normal file
128
src/libs/opencore-amr/amrwb/wrapper.cpp
Normal file
@@ -0,0 +1,128 @@
|
||||
/* ------------------------------------------------------------------
|
||||
* Copyright (C) 1998-2009 PacketVideo
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
||||
* express or implied.
|
||||
* See the License for the specific language governing permissions
|
||||
* and limitations under the License.
|
||||
* -------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#include "dec_if.h"
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <pvamrwbdecoder_api.h>
|
||||
#include <pvamrwbdecoder.h>
|
||||
#include <pvamrwbdecoder_cnst.h>
|
||||
#include <dtx.h>
|
||||
|
||||
/* This is basically a C rewrite of decode_amr_wb.cpp */
|
||||
|
||||
struct state {
|
||||
void *st; /* State structure */
|
||||
unsigned char *pt_st;
|
||||
int16 *ScratchMem;
|
||||
|
||||
uint8* iInputBuf;
|
||||
int16* iInputSampleBuf;
|
||||
int16* iOutputBuf;
|
||||
|
||||
uint8 quality;
|
||||
int16 mode;
|
||||
int16 mode_old;
|
||||
int16 frame_type;
|
||||
|
||||
int16 reset_flag;
|
||||
int16 reset_flag_old;
|
||||
int16 status;
|
||||
RX_State rx_state;
|
||||
};
|
||||
|
||||
void* D_IF_init(void) {
|
||||
struct state* state = (struct state*) malloc(sizeof(struct state));
|
||||
memset(state, 0, sizeof(*state));
|
||||
|
||||
state->iInputSampleBuf = (int16*) malloc(sizeof(int16)*KAMRWB_NB_BITS_MAX);
|
||||
state->reset_flag = 0;
|
||||
state->reset_flag_old = 1;
|
||||
state->mode_old = 0;
|
||||
state->rx_state.prev_ft = RX_SPEECH_GOOD;
|
||||
state->rx_state.prev_mode = 0;
|
||||
state->pt_st = (unsigned char*) malloc(pvDecoder_AmrWbMemRequirements());
|
||||
|
||||
pvDecoder_AmrWb_Init(&state->st, state->pt_st, &state->ScratchMem);
|
||||
return state;
|
||||
}
|
||||
|
||||
void D_IF_exit(void* s) {
|
||||
struct state* state = (struct state*) s;
|
||||
free(state->pt_st);
|
||||
free(state->iInputSampleBuf);
|
||||
free(state);
|
||||
}
|
||||
|
||||
void D_IF_decode(void* s, const unsigned char* in, short* out, int bfi) {
|
||||
struct state* state = (struct state*) s;
|
||||
|
||||
state->mode = (in[0] >> 3) & 0x0f;
|
||||
in++;
|
||||
|
||||
state->quality = 1; /* ? */
|
||||
mime_unsorting((uint8*) in, state->iInputSampleBuf, &state->frame_type, &state->mode, state->quality, &state->rx_state);
|
||||
|
||||
if ((state->frame_type == RX_NO_DATA) | (state->frame_type == RX_SPEECH_LOST)) {
|
||||
state->mode = state->mode_old;
|
||||
state->reset_flag = 0;
|
||||
} else {
|
||||
state->mode_old = state->mode;
|
||||
|
||||
/* if homed: check if this frame is another homing frame */
|
||||
if (state->reset_flag_old == 1) {
|
||||
/* only check until end of first subframe */
|
||||
state->reset_flag = pvDecoder_AmrWb_homing_frame_test_first(state->iInputSampleBuf, state->mode);
|
||||
}
|
||||
}
|
||||
|
||||
/* produce encoder homing frame if homed & input=decoder homing frame */
|
||||
if ((state->reset_flag != 0) && (state->reset_flag_old != 0)) {
|
||||
/* set homing sequence ( no need to decode anything */
|
||||
|
||||
for (int16 i = 0; i < AMR_WB_PCM_FRAME; i++) {
|
||||
out[i] = EHF_MASK;
|
||||
}
|
||||
} else {
|
||||
int16 frameLength;
|
||||
state->status = pvDecoder_AmrWb(state->mode,
|
||||
state->iInputSampleBuf,
|
||||
out,
|
||||
&frameLength,
|
||||
state->st,
|
||||
state->frame_type,
|
||||
state->ScratchMem);
|
||||
}
|
||||
|
||||
for (int16 i = 0; i < AMR_WB_PCM_FRAME; i++) { /* Delete the 2 LSBs (14-bit output) */
|
||||
out[i] &= 0xfffC;
|
||||
}
|
||||
|
||||
/* if not homed: check whether current frame is a homing frame */
|
||||
if (state->reset_flag_old == 0) {
|
||||
/* check whole frame */
|
||||
state->reset_flag = pvDecoder_AmrWb_homing_frame_test(state->iInputSampleBuf, state->mode);
|
||||
}
|
||||
/* reset decoder if current frame is a homing frame */
|
||||
if (state->reset_flag != 0) {
|
||||
pvDecoder_AmrWb_Reset(state->st, 1);
|
||||
}
|
||||
state->reset_flag_old = state->reset_flag;
|
||||
|
||||
}
|
||||
|
||||
1530
src/libs/opencore-amr/config.guess
vendored
Normal file
1530
src/libs/opencore-amr/config.guess
vendored
Normal file
File diff suppressed because it is too large
Load Diff
134
src/libs/opencore-amr/config.h.in
Normal file
134
src/libs/opencore-amr/config.h.in
Normal file
@@ -0,0 +1,134 @@
|
||||
/* config.h.in. Generated from configure.ac by autoheader. */
|
||||
|
||||
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||
#undef HAVE_DLFCN_H
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#undef HAVE_INTTYPES_H
|
||||
|
||||
/* Define to 1 if you have the `m' library (-lm). */
|
||||
#undef HAVE_LIBM
|
||||
|
||||
/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
|
||||
to 0 otherwise. */
|
||||
#undef HAVE_MALLOC
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#undef HAVE_MEMORY_H
|
||||
|
||||
/* Define to 1 if you have the `memset' function. */
|
||||
#undef HAVE_MEMSET
|
||||
|
||||
/* Define to 1 if stdbool.h conforms to C99. */
|
||||
#undef HAVE_STDBOOL_H
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#undef HAVE_STDINT_H
|
||||
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#undef HAVE_STDLIB_H
|
||||
|
||||
/* Define to 1 if you have the <strings.h> header file. */
|
||||
#undef HAVE_STRINGS_H
|
||||
|
||||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#undef HAVE_STRING_H
|
||||
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#undef HAVE_SYS_STAT_H
|
||||
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#undef HAVE_SYS_TYPES_H
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#undef HAVE_UNISTD_H
|
||||
|
||||
/* Define to 1 if the system has the type `_Bool'. */
|
||||
#undef HAVE__BOOL
|
||||
|
||||
/* Define to the sub-directory in which libtool stores uninstalled libraries.
|
||||
*/
|
||||
#undef LT_OBJDIR
|
||||
|
||||
/* Name of package */
|
||||
#undef PACKAGE
|
||||
|
||||
/* 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
|
||||
|
||||
/* Version number of package */
|
||||
#undef VERSION
|
||||
|
||||
/* Define for Solaris 2.5.1 so the uint32_t typedef from <sys/synch.h>,
|
||||
<pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
|
||||
#define below would cause a syntax error. */
|
||||
#undef _UINT32_T
|
||||
|
||||
/* Define for Solaris 2.5.1 so the uint64_t typedef from <sys/synch.h>,
|
||||
<pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
|
||||
#define below would cause a syntax error. */
|
||||
#undef _UINT64_T
|
||||
|
||||
/* Define for Solaris 2.5.1 so the uint8_t typedef from <sys/synch.h>,
|
||||
<pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
|
||||
#define below would cause a syntax error. */
|
||||
#undef _UINT8_T
|
||||
|
||||
/* 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 type of a signed integer type of width exactly 16 bits if
|
||||
such a type exists and the standard includes do not define it. */
|
||||
#undef int16_t
|
||||
|
||||
/* Define to the type of a signed integer type of width exactly 32 bits if
|
||||
such a type exists and the standard includes do not define it. */
|
||||
#undef int32_t
|
||||
|
||||
/* Define to the type of a signed integer type of width exactly 64 bits if
|
||||
such a type exists and the standard includes do not define it. */
|
||||
#undef int64_t
|
||||
|
||||
/* Define to the type of a signed integer type of width exactly 8 bits if such
|
||||
a type exists and the standard includes do not define it. */
|
||||
#undef int8_t
|
||||
|
||||
/* Define to rpl_malloc if the replacement function should be used. */
|
||||
#undef malloc
|
||||
|
||||
/* Define to the type of an unsigned integer type of width exactly 16 bits if
|
||||
such a type exists and the standard includes do not define it. */
|
||||
#undef uint16_t
|
||||
|
||||
/* Define to the type of an unsigned integer type of width exactly 32 bits if
|
||||
such a type exists and the standard includes do not define it. */
|
||||
#undef uint32_t
|
||||
|
||||
/* Define to the type of an unsigned integer type of width exactly 64 bits if
|
||||
such a type exists and the standard includes do not define it. */
|
||||
#undef uint64_t
|
||||
|
||||
/* Define to the type of an unsigned integer type of width exactly 8 bits if
|
||||
such a type exists and the standard includes do not define it. */
|
||||
#undef uint8_t
|
||||
1773
src/libs/opencore-amr/config.sub
vendored
Normal file
1773
src/libs/opencore-amr/config.sub
vendored
Normal file
File diff suppressed because it is too large
Load Diff
18525
src/libs/opencore-amr/configure
vendored
Executable file
18525
src/libs/opencore-amr/configure
vendored
Executable file
File diff suppressed because it is too large
Load Diff
93
src/libs/opencore-amr/configure.ac
Normal file
93
src/libs/opencore-amr/configure.ac
Normal file
@@ -0,0 +1,93 @@
|
||||
# -*- Autoconf -*-
|
||||
# Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_INIT([opencore-amr], [0.1.3], [http://sourceforge.net/projects/opencore-amr/])
|
||||
AC_CONFIG_AUX_DIR(.)
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
AM_INIT_AUTOMAKE([tar-ustar])
|
||||
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
|
||||
AC_CONFIG_HEADERS([config.h])
|
||||
AM_MAINTAINER_MODE
|
||||
|
||||
# Cross compiling support
|
||||
AC_CANONICAL_BUILD
|
||||
AC_CANONICAL_HOST
|
||||
|
||||
# Various options for configure
|
||||
AC_ARG_ENABLE([compile-c],
|
||||
[AS_HELP_STRING([--enable-compile-c],
|
||||
[enable compiling as C program (default is yes)])],
|
||||
[compile_as_c=$enableval],
|
||||
[compile_as_c=yes])
|
||||
AC_ARG_ENABLE([gcc-armv5],
|
||||
[AS_HELP_STRING([--enable-gcc-armv5],
|
||||
[enable GCC specific ARMv5 assembler (default is no)])],
|
||||
[gcc_armv5=$enableval], [gcc_armv5=no])
|
||||
AC_ARG_ENABLE([amrnb-encoder],
|
||||
[AS_HELP_STRING([--enable-amrnb-encoder],
|
||||
[enable AMR-NB encoder (default is yes)])],
|
||||
[amrnb_encoder=$enableval], [amrnb_encoder=yes])
|
||||
AC_ARG_ENABLE([amrnb-decoder],
|
||||
[AS_HELP_STRING([--enable-amrnb-decoder],
|
||||
[enable AMR-NB decoder (default is yes)])],
|
||||
[amrnb_decoder=$enableval], [amrnb_decoder=yes])
|
||||
AC_ARG_ENABLE([examples],
|
||||
[AS_HELP_STRING([--enable-examples],
|
||||
[enable example encoding/decoding programs (default is no)])],
|
||||
[examples=$enableval], [examples=no])
|
||||
|
||||
# Automake conditionals to set
|
||||
AM_CONDITIONAL(COMPILE_AS_C, test x$compile_as_c = xyes)
|
||||
AM_CONDITIONAL(GCC_ARMV5, test x$gcc_armv5 = xyes)
|
||||
AM_CONDITIONAL(AMRNB_ENCODER, test x$amrnb_encoder = xyes)
|
||||
AM_CONDITIONAL(AMRNB_DECODER, test x$amrnb_decoder = xyes)
|
||||
AM_CONDITIONAL(EXAMPLES, test x$examples = xyes)
|
||||
|
||||
# Checks for programs.
|
||||
AC_PROG_CXX
|
||||
AC_PROG_CC
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_LN_S
|
||||
AC_PROG_MAKE_SET
|
||||
|
||||
# Setup for libtool
|
||||
AC_PROG_LIBTOOL
|
||||
AC_SUBST(LIBTOOL_DEPS)
|
||||
|
||||
# Checks for libraries.
|
||||
AC_CHECK_LIB([m], [main])
|
||||
|
||||
# Checks for header files.
|
||||
AC_CHECK_HEADERS([stdint.h stdlib.h string.h])
|
||||
|
||||
# Checks for typedefs, structures, and compiler characteristics.
|
||||
AC_HEADER_STDBOOL
|
||||
AC_C_INLINE
|
||||
AC_TYPE_INT16_T
|
||||
AC_TYPE_INT32_T
|
||||
AC_TYPE_INT64_T
|
||||
AC_TYPE_INT8_T
|
||||
AC_TYPE_UINT16_T
|
||||
AC_TYPE_UINT32_T
|
||||
AC_TYPE_UINT64_T
|
||||
AC_TYPE_UINT8_T
|
||||
|
||||
# Checks for library functions.
|
||||
AC_FUNC_MALLOC
|
||||
AC_CHECK_FUNCS([memset])
|
||||
|
||||
# OpenCORE AMR soname version to use
|
||||
# goes by ‘current[:revision[:age]]’ with the soname ending up as
|
||||
# current.age.revision.
|
||||
OPENCORE_AMRNB_VERSION=0:3:0
|
||||
OPENCORE_AMRWB_VERSION=0:3:0
|
||||
AC_SUBST(OPENCORE_AMRNB_VERSION)
|
||||
AC_SUBST(OPENCORE_AMRWB_VERSION)
|
||||
|
||||
AC_CONFIG_FILES([Makefile
|
||||
amrnb/Makefile
|
||||
amrwb/Makefile
|
||||
test/Makefile
|
||||
amrnb/opencore-amrnb.pc
|
||||
amrwb/opencore-amrwb.pc])
|
||||
AC_OUTPUT
|
||||
688
src/libs/opencore-amr/depcomp
Normal file
688
src/libs/opencore-amr/depcomp
Normal file
@@ -0,0 +1,688 @@
|
||||
#! /bin/sh
|
||||
# depcomp - compile a program generating dependencies as side-effects
|
||||
|
||||
scriptversion=2011-12-04.11; # UTC
|
||||
|
||||
# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009, 2010,
|
||||
# 2011 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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
# 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 <oliva@dcc.unicamp.br>.
|
||||
|
||||
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 <bug-automake@gnu.org>.
|
||||
EOF
|
||||
exit $?
|
||||
;;
|
||||
-v | --v*)
|
||||
echo "depcomp $scriptversion"
|
||||
exit $?
|
||||
;;
|
||||
esac
|
||||
|
||||
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"
|
||||
|
||||
# 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
|
||||
|
||||
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 -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
mv "$tmpdepfile" "$depfile"
|
||||
;;
|
||||
|
||||
gcc)
|
||||
## 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).
|
||||
## - 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 -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
|
||||
## 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.
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" |
|
||||
## 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.
|
||||
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 -eq 0; then :
|
||||
else
|
||||
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 ' ' '
|
||||
' < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
|
||||
tr '
|
||||
' ' ' >> "$depfile"
|
||||
echo >> "$depfile"
|
||||
|
||||
# The second pass generates a dummy entry for each header file.
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
|
||||
>> "$depfile"
|
||||
else
|
||||
# The sourcefile does not contain any dependencies, so just
|
||||
# store a dummy comment line, to avoid errors with the Makefile
|
||||
# "include basename.Plo" scheme.
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
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.
|
||||
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
|
||||
test "x$dir" = "x$object" && dir=
|
||||
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
|
||||
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 -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
do
|
||||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
if test -f "$tmpdepfile"; then
|
||||
# Each line is of the form `foo.o: dependent.h'.
|
||||
# Do two passes, one to just change these to
|
||||
# `$object: dependent.h' and one to simply `dependent.h:'.
|
||||
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
|
||||
# That's a tab and a space in the [].
|
||||
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
# The sourcefile does not contain any dependencies, so just
|
||||
# store a dummy comment line, to avoid errors with the Makefile
|
||||
# "include basename.Plo" scheme.
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
icc)
|
||||
# Intel's C compiler understands `-MD -MF file'. However on
|
||||
# icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
|
||||
# ICC 7.0 will fill foo.d with something like
|
||||
# foo.o: sub/foo.c
|
||||
# foo.o: sub/foo.h
|
||||
# which is wrong. We want:
|
||||
# sub/foo.o: sub/foo.c
|
||||
# sub/foo.o: sub/foo.h
|
||||
# sub/foo.c:
|
||||
# sub/foo.h:
|
||||
# ICC 7.1 will output
|
||||
# foo.o: sub/foo.c sub/foo.h
|
||||
# and will wrap long lines using \ :
|
||||
# foo.o: sub/foo.c ... \
|
||||
# sub/foo.h ... \
|
||||
# ...
|
||||
|
||||
"$@" -MD -MF "$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
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.
|
||||
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
|
||||
test "x$dir" = "x$object" && dir=
|
||||
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
|
||||
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 -eq 0; then :
|
||||
else
|
||||
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,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
|
||||
# Add `dependent.h:' lines.
|
||||
sed -ne '2,${
|
||||
s/^ *//
|
||||
s/ \\*$//
|
||||
s/$/:/
|
||||
p
|
||||
}' "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
echo "#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.
|
||||
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
|
||||
test "x$dir" = "x$object" && dir=
|
||||
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
|
||||
|
||||
if test "$libtool" = yes; then
|
||||
# With Tru64 cc, shared objects can also be used to make a
|
||||
# static library. This mechanism is used in libtool 1.4 series to
|
||||
# handle both shared and static libraries in a single compilation.
|
||||
# With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
|
||||
#
|
||||
# With libtool 1.5 this exception was removed, and libtool now
|
||||
# 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.libs/$base.lo.d # libtool 1.4
|
||||
tmpdepfile2=$dir$base.o.d # libtool 1.5
|
||||
tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5
|
||||
tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504
|
||||
"$@" -Wc,-MD
|
||||
else
|
||||
tmpdepfile1=$dir$base.o.d
|
||||
tmpdepfile2=$dir$base.d
|
||||
tmpdepfile3=$dir$base.d
|
||||
tmpdepfile4=$dir$base.d
|
||||
"$@" -MD
|
||||
fi
|
||||
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
|
||||
do
|
||||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
if test -f "$tmpdepfile"; then
|
||||
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
|
||||
# That's a tab and a space in the [].
|
||||
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
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" = 0; then :
|
||||
else
|
||||
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/\(.*\)/ \1 \\/p
|
||||
s/.\(.*\) \\/\1:/
|
||||
H
|
||||
$ {
|
||||
s/.*/ /
|
||||
G
|
||||
p
|
||||
}' >> "$depfile"
|
||||
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:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
cat < "$tmpdepfile" > "$depfile"
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" | \
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
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"
|
||||
sed '1,2d' "$tmpdepfile" | tr ' ' '
|
||||
' | \
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
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:: \1 \\:p' >> "$depfile"
|
||||
echo " " >> "$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:
|
||||
527
src/libs/opencore-amr/install-sh
Normal file
527
src/libs/opencore-amr/install-sh
Normal file
@@ -0,0 +1,527 @@
|
||||
#!/bin/sh
|
||||
# install - install a program, script, or datafile
|
||||
|
||||
scriptversion=2011-01-19.21; # UTC
|
||||
|
||||
# This originates from X11R5 (mit/util/scripts/install.sh), which was
|
||||
# later released in X11R6 (xc/config/util/install.sh) with the
|
||||
# following copyright and license.
|
||||
#
|
||||
# Copyright (C) 1994 X Consortium
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to
|
||||
# deal in the Software without restriction, including without limitation the
|
||||
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
# sell copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
||||
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
|
||||
# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
#
|
||||
# Except as contained in this notice, the name of the X Consortium shall not
|
||||
# be used in advertising or otherwise to promote the sale, use or other deal-
|
||||
# ings in this Software without prior written authorization from the X Consor-
|
||||
# tium.
|
||||
#
|
||||
#
|
||||
# FSF changes to this file are in the public domain.
|
||||
#
|
||||
# Calling this script install-sh is preferred over install.sh, to prevent
|
||||
# `make' implicit rules from creating a file called install from it
|
||||
# when there is no Makefile.
|
||||
#
|
||||
# This script is compatible with the BSD install script, but was written
|
||||
# from scratch.
|
||||
|
||||
nl='
|
||||
'
|
||||
IFS=" "" $nl"
|
||||
|
||||
# set DOITPROG to echo to test this script
|
||||
|
||||
# Don't use :- since 4.3BSD and earlier shells don't like it.
|
||||
doit=${DOITPROG-}
|
||||
if test -z "$doit"; then
|
||||
doit_exec=exec
|
||||
else
|
||||
doit_exec=$doit
|
||||
fi
|
||||
|
||||
# Put in absolute file names if you don't have them in your path;
|
||||
# or use environment vars.
|
||||
|
||||
chgrpprog=${CHGRPPROG-chgrp}
|
||||
chmodprog=${CHMODPROG-chmod}
|
||||
chownprog=${CHOWNPROG-chown}
|
||||
cmpprog=${CMPPROG-cmp}
|
||||
cpprog=${CPPROG-cp}
|
||||
mkdirprog=${MKDIRPROG-mkdir}
|
||||
mvprog=${MVPROG-mv}
|
||||
rmprog=${RMPROG-rm}
|
||||
stripprog=${STRIPPROG-strip}
|
||||
|
||||
posix_glob='?'
|
||||
initialize_posix_glob='
|
||||
test "$posix_glob" != "?" || {
|
||||
if (set -f) 2>/dev/null; then
|
||||
posix_glob=
|
||||
else
|
||||
posix_glob=:
|
||||
fi
|
||||
}
|
||||
'
|
||||
|
||||
posix_mkdir=
|
||||
|
||||
# Desired mode of installed file.
|
||||
mode=0755
|
||||
|
||||
chgrpcmd=
|
||||
chmodcmd=$chmodprog
|
||||
chowncmd=
|
||||
mvcmd=$mvprog
|
||||
rmcmd="$rmprog -f"
|
||||
stripcmd=
|
||||
|
||||
src=
|
||||
dst=
|
||||
dir_arg=
|
||||
dst_arg=
|
||||
|
||||
copy_on_change=false
|
||||
no_target_directory=
|
||||
|
||||
usage="\
|
||||
Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
|
||||
or: $0 [OPTION]... SRCFILES... DIRECTORY
|
||||
or: $0 [OPTION]... -t DIRECTORY SRCFILES...
|
||||
or: $0 [OPTION]... -d DIRECTORIES...
|
||||
|
||||
In the 1st form, copy SRCFILE to DSTFILE.
|
||||
In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
|
||||
In the 4th, create DIRECTORIES.
|
||||
|
||||
Options:
|
||||
--help display this help and exit.
|
||||
--version display version info and exit.
|
||||
|
||||
-c (ignored)
|
||||
-C install only if different (preserve the last data modification time)
|
||||
-d create directories instead of installing files.
|
||||
-g GROUP $chgrpprog installed files to GROUP.
|
||||
-m MODE $chmodprog installed files to MODE.
|
||||
-o USER $chownprog installed files to USER.
|
||||
-s $stripprog installed files.
|
||||
-t DIRECTORY install into DIRECTORY.
|
||||
-T report an error if DSTFILE is a directory.
|
||||
|
||||
Environment variables override the default commands:
|
||||
CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
|
||||
RMPROG STRIPPROG
|
||||
"
|
||||
|
||||
while test $# -ne 0; do
|
||||
case $1 in
|
||||
-c) ;;
|
||||
|
||||
-C) copy_on_change=true;;
|
||||
|
||||
-d) dir_arg=true;;
|
||||
|
||||
-g) chgrpcmd="$chgrpprog $2"
|
||||
shift;;
|
||||
|
||||
--help) echo "$usage"; exit $?;;
|
||||
|
||||
-m) mode=$2
|
||||
case $mode in
|
||||
*' '* | *' '* | *'
|
||||
'* | *'*'* | *'?'* | *'['*)
|
||||
echo "$0: invalid mode: $mode" >&2
|
||||
exit 1;;
|
||||
esac
|
||||
shift;;
|
||||
|
||||
-o) chowncmd="$chownprog $2"
|
||||
shift;;
|
||||
|
||||
-s) stripcmd=$stripprog;;
|
||||
|
||||
-t) dst_arg=$2
|
||||
# Protect names problematic for `test' and other utilities.
|
||||
case $dst_arg in
|
||||
-* | [=\(\)!]) dst_arg=./$dst_arg;;
|
||||
esac
|
||||
shift;;
|
||||
|
||||
-T) no_target_directory=true;;
|
||||
|
||||
--version) echo "$0 $scriptversion"; exit $?;;
|
||||
|
||||
--) shift
|
||||
break;;
|
||||
|
||||
-*) echo "$0: invalid option: $1" >&2
|
||||
exit 1;;
|
||||
|
||||
*) break;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
|
||||
# When -d is used, all remaining arguments are directories to create.
|
||||
# When -t is used, the destination is already specified.
|
||||
# Otherwise, the last argument is the destination. Remove it from $@.
|
||||
for arg
|
||||
do
|
||||
if test -n "$dst_arg"; then
|
||||
# $@ is not empty: it contains at least $arg.
|
||||
set fnord "$@" "$dst_arg"
|
||||
shift # fnord
|
||||
fi
|
||||
shift # arg
|
||||
dst_arg=$arg
|
||||
# Protect names problematic for `test' and other utilities.
|
||||
case $dst_arg in
|
||||
-* | [=\(\)!]) dst_arg=./$dst_arg;;
|
||||
esac
|
||||
done
|
||||
fi
|
||||
|
||||
if test $# -eq 0; then
|
||||
if test -z "$dir_arg"; then
|
||||
echo "$0: no input file specified." >&2
|
||||
exit 1
|
||||
fi
|
||||
# It's OK to call `install-sh -d' without argument.
|
||||
# This can happen when creating conditional directories.
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if test -z "$dir_arg"; then
|
||||
do_exit='(exit $ret); exit $ret'
|
||||
trap "ret=129; $do_exit" 1
|
||||
trap "ret=130; $do_exit" 2
|
||||
trap "ret=141; $do_exit" 13
|
||||
trap "ret=143; $do_exit" 15
|
||||
|
||||
# Set umask so as not to create temps with too-generous modes.
|
||||
# However, 'strip' requires both read and write access to temps.
|
||||
case $mode in
|
||||
# Optimize common cases.
|
||||
*644) cp_umask=133;;
|
||||
*755) cp_umask=22;;
|
||||
|
||||
*[0-7])
|
||||
if test -z "$stripcmd"; then
|
||||
u_plus_rw=
|
||||
else
|
||||
u_plus_rw='% 200'
|
||||
fi
|
||||
cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
|
||||
*)
|
||||
if test -z "$stripcmd"; then
|
||||
u_plus_rw=
|
||||
else
|
||||
u_plus_rw=,u+rw
|
||||
fi
|
||||
cp_umask=$mode$u_plus_rw;;
|
||||
esac
|
||||
fi
|
||||
|
||||
for src
|
||||
do
|
||||
# Protect names problematic for `test' and other utilities.
|
||||
case $src in
|
||||
-* | [=\(\)!]) src=./$src;;
|
||||
esac
|
||||
|
||||
if test -n "$dir_arg"; then
|
||||
dst=$src
|
||||
dstdir=$dst
|
||||
test -d "$dstdir"
|
||||
dstdir_status=$?
|
||||
else
|
||||
|
||||
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
|
||||
# might cause directories to be created, which would be especially bad
|
||||
# if $src (and thus $dsttmp) contains '*'.
|
||||
if test ! -f "$src" && test ! -d "$src"; then
|
||||
echo "$0: $src does not exist." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if test -z "$dst_arg"; then
|
||||
echo "$0: no destination specified." >&2
|
||||
exit 1
|
||||
fi
|
||||
dst=$dst_arg
|
||||
|
||||
# If destination is a directory, append the input filename; won't work
|
||||
# if double slashes aren't ignored.
|
||||
if test -d "$dst"; then
|
||||
if test -n "$no_target_directory"; then
|
||||
echo "$0: $dst_arg: Is a directory" >&2
|
||||
exit 1
|
||||
fi
|
||||
dstdir=$dst
|
||||
dst=$dstdir/`basename "$src"`
|
||||
dstdir_status=0
|
||||
else
|
||||
# Prefer dirname, but fall back on a substitute if dirname fails.
|
||||
dstdir=`
|
||||
(dirname "$dst") 2>/dev/null ||
|
||||
expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
|
||||
X"$dst" : 'X\(//\)[^/]' \| \
|
||||
X"$dst" : 'X\(//\)$' \| \
|
||||
X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
|
||||
echo X"$dst" |
|
||||
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\(\/\/\)[^/].*/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\(\/\/\)$/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\(\/\).*/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
s/.*/./; q'
|
||||
`
|
||||
|
||||
test -d "$dstdir"
|
||||
dstdir_status=$?
|
||||
fi
|
||||
fi
|
||||
|
||||
obsolete_mkdir_used=false
|
||||
|
||||
if test $dstdir_status != 0; then
|
||||
case $posix_mkdir in
|
||||
'')
|
||||
# Create intermediate dirs using mode 755 as modified by the umask.
|
||||
# This is like FreeBSD 'install' as of 1997-10-28.
|
||||
umask=`umask`
|
||||
case $stripcmd.$umask in
|
||||
# Optimize common cases.
|
||||
*[2367][2367]) mkdir_umask=$umask;;
|
||||
.*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
|
||||
|
||||
*[0-7])
|
||||
mkdir_umask=`expr $umask + 22 \
|
||||
- $umask % 100 % 40 + $umask % 20 \
|
||||
- $umask % 10 % 4 + $umask % 2
|
||||
`;;
|
||||
*) mkdir_umask=$umask,go-w;;
|
||||
esac
|
||||
|
||||
# With -d, create the new directory with the user-specified mode.
|
||||
# Otherwise, rely on $mkdir_umask.
|
||||
if test -n "$dir_arg"; then
|
||||
mkdir_mode=-m$mode
|
||||
else
|
||||
mkdir_mode=
|
||||
fi
|
||||
|
||||
posix_mkdir=false
|
||||
case $umask in
|
||||
*[123567][0-7][0-7])
|
||||
# POSIX mkdir -p sets u+wx bits regardless of umask, which
|
||||
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
|
||||
;;
|
||||
*)
|
||||
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
|
||||
trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
|
||||
|
||||
if (umask $mkdir_umask &&
|
||||
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
|
||||
then
|
||||
if test -z "$dir_arg" || {
|
||||
# Check for POSIX incompatibilities with -m.
|
||||
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
|
||||
# other-writeable bit of parent directory when it shouldn't.
|
||||
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
|
||||
ls_ld_tmpdir=`ls -ld "$tmpdir"`
|
||||
case $ls_ld_tmpdir in
|
||||
d????-?r-*) different_mode=700;;
|
||||
d????-?--*) different_mode=755;;
|
||||
*) false;;
|
||||
esac &&
|
||||
$mkdirprog -m$different_mode -p -- "$tmpdir" && {
|
||||
ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
|
||||
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
|
||||
}
|
||||
}
|
||||
then posix_mkdir=:
|
||||
fi
|
||||
rmdir "$tmpdir/d" "$tmpdir"
|
||||
else
|
||||
# Remove any dirs left behind by ancient mkdir implementations.
|
||||
rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
|
||||
fi
|
||||
trap '' 0;;
|
||||
esac;;
|
||||
esac
|
||||
|
||||
if
|
||||
$posix_mkdir && (
|
||||
umask $mkdir_umask &&
|
||||
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
|
||||
)
|
||||
then :
|
||||
else
|
||||
|
||||
# The umask is ridiculous, or mkdir does not conform to POSIX,
|
||||
# or it failed possibly due to a race condition. Create the
|
||||
# directory the slow way, step by step, checking for races as we go.
|
||||
|
||||
case $dstdir in
|
||||
/*) prefix='/';;
|
||||
[-=\(\)!]*) prefix='./';;
|
||||
*) prefix='';;
|
||||
esac
|
||||
|
||||
eval "$initialize_posix_glob"
|
||||
|
||||
oIFS=$IFS
|
||||
IFS=/
|
||||
$posix_glob set -f
|
||||
set fnord $dstdir
|
||||
shift
|
||||
$posix_glob set +f
|
||||
IFS=$oIFS
|
||||
|
||||
prefixes=
|
||||
|
||||
for d
|
||||
do
|
||||
test X"$d" = X && continue
|
||||
|
||||
prefix=$prefix$d
|
||||
if test -d "$prefix"; then
|
||||
prefixes=
|
||||
else
|
||||
if $posix_mkdir; then
|
||||
(umask=$mkdir_umask &&
|
||||
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
|
||||
# Don't fail if two instances are running concurrently.
|
||||
test -d "$prefix" || exit 1
|
||||
else
|
||||
case $prefix in
|
||||
*\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
|
||||
*) qprefix=$prefix;;
|
||||
esac
|
||||
prefixes="$prefixes '$qprefix'"
|
||||
fi
|
||||
fi
|
||||
prefix=$prefix/
|
||||
done
|
||||
|
||||
if test -n "$prefixes"; then
|
||||
# Don't fail if two instances are running concurrently.
|
||||
(umask $mkdir_umask &&
|
||||
eval "\$doit_exec \$mkdirprog $prefixes") ||
|
||||
test -d "$dstdir" || exit 1
|
||||
obsolete_mkdir_used=true
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test -n "$dir_arg"; then
|
||||
{ test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
|
||||
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
|
||||
{ test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
|
||||
test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
|
||||
else
|
||||
|
||||
# Make a couple of temp file names in the proper directory.
|
||||
dsttmp=$dstdir/_inst.$$_
|
||||
rmtmp=$dstdir/_rm.$$_
|
||||
|
||||
# Trap to clean up those temp files at exit.
|
||||
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
|
||||
|
||||
# Copy the file name to the temp name.
|
||||
(umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
|
||||
|
||||
# and set any options; do chmod last to preserve setuid bits.
|
||||
#
|
||||
# If any of these fail, we abort the whole thing. If we want to
|
||||
# ignore errors from any of these, just make sure not to ignore
|
||||
# errors from the above "$doit $cpprog $src $dsttmp" command.
|
||||
#
|
||||
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
|
||||
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
|
||||
{ test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
|
||||
{ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
|
||||
|
||||
# If -C, don't bother to copy if it wouldn't change the file.
|
||||
if $copy_on_change &&
|
||||
old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
|
||||
new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
|
||||
|
||||
eval "$initialize_posix_glob" &&
|
||||
$posix_glob set -f &&
|
||||
set X $old && old=:$2:$4:$5:$6 &&
|
||||
set X $new && new=:$2:$4:$5:$6 &&
|
||||
$posix_glob set +f &&
|
||||
|
||||
test "$old" = "$new" &&
|
||||
$cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
|
||||
then
|
||||
rm -f "$dsttmp"
|
||||
else
|
||||
# Rename the file to the real destination.
|
||||
$doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
|
||||
|
||||
# The rename failed, perhaps because mv can't rename something else
|
||||
# to itself, or perhaps because mv is so ancient that it does not
|
||||
# support -f.
|
||||
{
|
||||
# Now remove or move aside any old file at destination location.
|
||||
# We try this two ways since rm can't unlink itself on some
|
||||
# systems and the destination file might be busy for other
|
||||
# reasons. In this case, the final cleanup might fail but the new
|
||||
# file should still install successfully.
|
||||
{
|
||||
test ! -f "$dst" ||
|
||||
$doit $rmcmd -f "$dst" 2>/dev/null ||
|
||||
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
|
||||
{ $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
|
||||
} ||
|
||||
{ echo "$0: cannot unlink or rename $dst" >&2
|
||||
(exit 1); exit 1
|
||||
}
|
||||
} &&
|
||||
|
||||
# Now rename the file to the real destination.
|
||||
$doit $mvcmd "$dsttmp" "$dst"
|
||||
}
|
||||
fi || exit 1
|
||||
|
||||
trap '' 0
|
||||
fi
|
||||
done
|
||||
|
||||
# Local variables:
|
||||
# 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:
|
||||
9661
src/libs/opencore-amr/ltmain.sh
Normal file
9661
src/libs/opencore-amr/ltmain.sh
Normal file
File diff suppressed because it is too large
Load Diff
8001
src/libs/opencore-amr/m4/libtool.m4
vendored
Normal file
8001
src/libs/opencore-amr/m4/libtool.m4
vendored
Normal file
File diff suppressed because it is too large
Load Diff
384
src/libs/opencore-amr/m4/ltoptions.m4
vendored
Normal file
384
src/libs/opencore-amr/m4/ltoptions.m4
vendored
Normal file
@@ -0,0 +1,384 @@
|
||||
# Helper functions for option handling. -*- Autoconf -*-
|
||||
#
|
||||
# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,
|
||||
# Inc.
|
||||
# Written by Gary V. Vaughan, 2004
|
||||
#
|
||||
# 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.
|
||||
|
||||
# serial 7 ltoptions.m4
|
||||
|
||||
# This is to help aclocal find these macros, as it can't see m4_define.
|
||||
AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
|
||||
|
||||
|
||||
# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
|
||||
# ------------------------------------------
|
||||
m4_define([_LT_MANGLE_OPTION],
|
||||
[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
|
||||
|
||||
|
||||
# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
|
||||
# ---------------------------------------
|
||||
# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
|
||||
# matching handler defined, dispatch to it. Other OPTION-NAMEs are
|
||||
# saved as a flag.
|
||||
m4_define([_LT_SET_OPTION],
|
||||
[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
|
||||
m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
|
||||
_LT_MANGLE_DEFUN([$1], [$2]),
|
||||
[m4_warning([Unknown $1 option `$2'])])[]dnl
|
||||
])
|
||||
|
||||
|
||||
# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
|
||||
# ------------------------------------------------------------
|
||||
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
|
||||
m4_define([_LT_IF_OPTION],
|
||||
[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
|
||||
|
||||
|
||||
# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
|
||||
# -------------------------------------------------------
|
||||
# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
|
||||
# are set.
|
||||
m4_define([_LT_UNLESS_OPTIONS],
|
||||
[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
|
||||
[m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
|
||||
[m4_define([$0_found])])])[]dnl
|
||||
m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
|
||||
])[]dnl
|
||||
])
|
||||
|
||||
|
||||
# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
|
||||
# ----------------------------------------
|
||||
# OPTION-LIST is a space-separated list of Libtool options associated
|
||||
# with MACRO-NAME. If any OPTION has a matching handler declared with
|
||||
# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
|
||||
# the unknown option and exit.
|
||||
m4_defun([_LT_SET_OPTIONS],
|
||||
[# Set options
|
||||
m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
|
||||
[_LT_SET_OPTION([$1], _LT_Option)])
|
||||
|
||||
m4_if([$1],[LT_INIT],[
|
||||
dnl
|
||||
dnl Simply set some default values (i.e off) if boolean options were not
|
||||
dnl specified:
|
||||
_LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
|
||||
])
|
||||
_LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
|
||||
])
|
||||
dnl
|
||||
dnl If no reference was made to various pairs of opposing options, then
|
||||
dnl we run the default mode handler for the pair. For example, if neither
|
||||
dnl `shared' nor `disable-shared' was passed, we enable building of shared
|
||||
dnl archives by default:
|
||||
_LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
|
||||
_LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
|
||||
_LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
|
||||
_LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
|
||||
[_LT_ENABLE_FAST_INSTALL])
|
||||
])
|
||||
])# _LT_SET_OPTIONS
|
||||
|
||||
|
||||
## --------------------------------- ##
|
||||
## Macros to handle LT_INIT options. ##
|
||||
## --------------------------------- ##
|
||||
|
||||
# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
|
||||
# -----------------------------------------
|
||||
m4_define([_LT_MANGLE_DEFUN],
|
||||
[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
|
||||
|
||||
|
||||
# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
|
||||
# -----------------------------------------------
|
||||
m4_define([LT_OPTION_DEFINE],
|
||||
[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
|
||||
])# LT_OPTION_DEFINE
|
||||
|
||||
|
||||
# dlopen
|
||||
# ------
|
||||
LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
|
||||
])
|
||||
|
||||
AU_DEFUN([AC_LIBTOOL_DLOPEN],
|
||||
[_LT_SET_OPTION([LT_INIT], [dlopen])
|
||||
AC_DIAGNOSE([obsolete],
|
||||
[$0: Remove this warning and the call to _LT_SET_OPTION when you
|
||||
put the `dlopen' option into LT_INIT's first parameter.])
|
||||
])
|
||||
|
||||
dnl aclocal-1.4 backwards compatibility:
|
||||
dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
|
||||
|
||||
|
||||
# win32-dll
|
||||
# ---------
|
||||
# Declare package support for building win32 dll's.
|
||||
LT_OPTION_DEFINE([LT_INIT], [win32-dll],
|
||||
[enable_win32_dll=yes
|
||||
|
||||
case $host in
|
||||
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
|
||||
AC_CHECK_TOOL(AS, as, false)
|
||||
AC_CHECK_TOOL(DLLTOOL, dlltool, false)
|
||||
AC_CHECK_TOOL(OBJDUMP, objdump, false)
|
||||
;;
|
||||
esac
|
||||
|
||||
test -z "$AS" && AS=as
|
||||
_LT_DECL([], [AS], [1], [Assembler program])dnl
|
||||
|
||||
test -z "$DLLTOOL" && DLLTOOL=dlltool
|
||||
_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
|
||||
|
||||
test -z "$OBJDUMP" && OBJDUMP=objdump
|
||||
_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
|
||||
])# win32-dll
|
||||
|
||||
AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
|
||||
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
||||
_LT_SET_OPTION([LT_INIT], [win32-dll])
|
||||
AC_DIAGNOSE([obsolete],
|
||||
[$0: Remove this warning and the call to _LT_SET_OPTION when you
|
||||
put the `win32-dll' option into LT_INIT's first parameter.])
|
||||
])
|
||||
|
||||
dnl aclocal-1.4 backwards compatibility:
|
||||
dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
|
||||
|
||||
|
||||
# _LT_ENABLE_SHARED([DEFAULT])
|
||||
# ----------------------------
|
||||
# implement the --enable-shared flag, and supports the `shared' and
|
||||
# `disable-shared' LT_INIT options.
|
||||
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
|
||||
m4_define([_LT_ENABLE_SHARED],
|
||||
[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
|
||||
AC_ARG_ENABLE([shared],
|
||||
[AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
|
||||
[build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
|
||||
[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],
|
||||
[enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
|
||||
|
||||
_LT_DECL([build_libtool_libs], [enable_shared], [0],
|
||||
[Whether or not to build shared libraries])
|
||||
])# _LT_ENABLE_SHARED
|
||||
|
||||
LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
|
||||
LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
|
||||
|
||||
# Old names:
|
||||
AC_DEFUN([AC_ENABLE_SHARED],
|
||||
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
|
||||
])
|
||||
|
||||
AC_DEFUN([AC_DISABLE_SHARED],
|
||||
[_LT_SET_OPTION([LT_INIT], [disable-shared])
|
||||
])
|
||||
|
||||
AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
|
||||
AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
|
||||
|
||||
dnl aclocal-1.4 backwards compatibility:
|
||||
dnl AC_DEFUN([AM_ENABLE_SHARED], [])
|
||||
dnl AC_DEFUN([AM_DISABLE_SHARED], [])
|
||||
|
||||
|
||||
|
||||
# _LT_ENABLE_STATIC([DEFAULT])
|
||||
# ----------------------------
|
||||
# implement the --enable-static flag, and support the `static' and
|
||||
# `disable-static' LT_INIT options.
|
||||
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
|
||||
m4_define([_LT_ENABLE_STATIC],
|
||||
[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
|
||||
AC_ARG_ENABLE([static],
|
||||
[AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
|
||||
[build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
|
||||
[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],
|
||||
[enable_static=]_LT_ENABLE_STATIC_DEFAULT)
|
||||
|
||||
_LT_DECL([build_old_libs], [enable_static], [0],
|
||||
[Whether or not to build static libraries])
|
||||
])# _LT_ENABLE_STATIC
|
||||
|
||||
LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
|
||||
LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
|
||||
|
||||
# Old names:
|
||||
AC_DEFUN([AC_ENABLE_STATIC],
|
||||
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
|
||||
])
|
||||
|
||||
AC_DEFUN([AC_DISABLE_STATIC],
|
||||
[_LT_SET_OPTION([LT_INIT], [disable-static])
|
||||
])
|
||||
|
||||
AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
|
||||
AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
|
||||
|
||||
dnl aclocal-1.4 backwards compatibility:
|
||||
dnl AC_DEFUN([AM_ENABLE_STATIC], [])
|
||||
dnl AC_DEFUN([AM_DISABLE_STATIC], [])
|
||||
|
||||
|
||||
|
||||
# _LT_ENABLE_FAST_INSTALL([DEFAULT])
|
||||
# ----------------------------------
|
||||
# implement the --enable-fast-install flag, and support the `fast-install'
|
||||
# and `disable-fast-install' LT_INIT options.
|
||||
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
|
||||
m4_define([_LT_ENABLE_FAST_INSTALL],
|
||||
[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
|
||||
AC_ARG_ENABLE([fast-install],
|
||||
[AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
|
||||
[optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
|
||||
[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],
|
||||
[enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
|
||||
|
||||
_LT_DECL([fast_install], [enable_fast_install], [0],
|
||||
[Whether or not to optimize for fast installation])dnl
|
||||
])# _LT_ENABLE_FAST_INSTALL
|
||||
|
||||
LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
|
||||
LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
|
||||
|
||||
# Old names:
|
||||
AU_DEFUN([AC_ENABLE_FAST_INSTALL],
|
||||
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
|
||||
AC_DIAGNOSE([obsolete],
|
||||
[$0: Remove this warning and the call to _LT_SET_OPTION when you put
|
||||
the `fast-install' option into LT_INIT's first parameter.])
|
||||
])
|
||||
|
||||
AU_DEFUN([AC_DISABLE_FAST_INSTALL],
|
||||
[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
|
||||
AC_DIAGNOSE([obsolete],
|
||||
[$0: Remove this warning and the call to _LT_SET_OPTION when you put
|
||||
the `disable-fast-install' option into LT_INIT's first parameter.])
|
||||
])
|
||||
|
||||
dnl aclocal-1.4 backwards compatibility:
|
||||
dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
|
||||
dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
|
||||
|
||||
|
||||
# _LT_WITH_PIC([MODE])
|
||||
# --------------------
|
||||
# implement the --with-pic flag, and support the `pic-only' and `no-pic'
|
||||
# LT_INIT options.
|
||||
# MODE is either `yes' or `no'. If omitted, it defaults to `both'.
|
||||
m4_define([_LT_WITH_PIC],
|
||||
[AC_ARG_WITH([pic],
|
||||
[AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
|
||||
[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
|
||||
[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],
|
||||
[pic_mode=default])
|
||||
|
||||
test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
|
||||
|
||||
_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
|
||||
])# _LT_WITH_PIC
|
||||
|
||||
LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
|
||||
LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
|
||||
|
||||
# Old name:
|
||||
AU_DEFUN([AC_LIBTOOL_PICMODE],
|
||||
[_LT_SET_OPTION([LT_INIT], [pic-only])
|
||||
AC_DIAGNOSE([obsolete],
|
||||
[$0: Remove this warning and the call to _LT_SET_OPTION when you
|
||||
put the `pic-only' option into LT_INIT's first parameter.])
|
||||
])
|
||||
|
||||
dnl aclocal-1.4 backwards compatibility:
|
||||
dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
|
||||
|
||||
## ----------------- ##
|
||||
## LTDL_INIT Options ##
|
||||
## ----------------- ##
|
||||
|
||||
m4_define([_LTDL_MODE], [])
|
||||
LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
|
||||
[m4_define([_LTDL_MODE], [nonrecursive])])
|
||||
LT_OPTION_DEFINE([LTDL_INIT], [recursive],
|
||||
[m4_define([_LTDL_MODE], [recursive])])
|
||||
LT_OPTION_DEFINE([LTDL_INIT], [subproject],
|
||||
[m4_define([_LTDL_MODE], [subproject])])
|
||||
|
||||
m4_define([_LTDL_TYPE], [])
|
||||
LT_OPTION_DEFINE([LTDL_INIT], [installable],
|
||||
[m4_define([_LTDL_TYPE], [installable])])
|
||||
LT_OPTION_DEFINE([LTDL_INIT], [convenience],
|
||||
[m4_define([_LTDL_TYPE], [convenience])])
|
||||
123
src/libs/opencore-amr/m4/ltsugar.m4
vendored
Normal file
123
src/libs/opencore-amr/m4/ltsugar.m4
vendored
Normal file
@@ -0,0 +1,123 @@
|
||||
# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
|
||||
#
|
||||
# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
|
||||
# Written by Gary V. Vaughan, 2004
|
||||
#
|
||||
# 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.
|
||||
|
||||
# serial 6 ltsugar.m4
|
||||
|
||||
# This is to help aclocal find these macros, as it can't see m4_define.
|
||||
AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
|
||||
|
||||
|
||||
# lt_join(SEP, ARG1, [ARG2...])
|
||||
# -----------------------------
|
||||
# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
|
||||
# associated separator.
|
||||
# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
|
||||
# versions in m4sugar had bugs.
|
||||
m4_define([lt_join],
|
||||
[m4_if([$#], [1], [],
|
||||
[$#], [2], [[$2]],
|
||||
[m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
|
||||
m4_define([_lt_join],
|
||||
[m4_if([$#$2], [2], [],
|
||||
[m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
|
||||
|
||||
|
||||
# lt_car(LIST)
|
||||
# lt_cdr(LIST)
|
||||
# ------------
|
||||
# Manipulate m4 lists.
|
||||
# These macros are necessary as long as will still need to support
|
||||
# Autoconf-2.59 which quotes differently.
|
||||
m4_define([lt_car], [[$1]])
|
||||
m4_define([lt_cdr],
|
||||
[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
|
||||
[$#], 1, [],
|
||||
[m4_dquote(m4_shift($@))])])
|
||||
m4_define([lt_unquote], $1)
|
||||
|
||||
|
||||
# lt_append(MACRO-NAME, STRING, [SEPARATOR])
|
||||
# ------------------------------------------
|
||||
# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
|
||||
# Note that neither SEPARATOR nor STRING are expanded; they are appended
|
||||
# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
|
||||
# No SEPARATOR is output if MACRO-NAME was previously undefined (different
|
||||
# than defined and empty).
|
||||
#
|
||||
# This macro is needed until we can rely on Autoconf 2.62, since earlier
|
||||
# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
|
||||
m4_define([lt_append],
|
||||
[m4_define([$1],
|
||||
m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
|
||||
|
||||
|
||||
|
||||
# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
|
||||
# ----------------------------------------------------------
|
||||
# Produce a SEP delimited list of all paired combinations of elements of
|
||||
# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
|
||||
# has the form PREFIXmINFIXSUFFIXn.
|
||||
# Needed until we can rely on m4_combine added in Autoconf 2.62.
|
||||
m4_define([lt_combine],
|
||||
[m4_if(m4_eval([$# > 3]), [1],
|
||||
[m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
|
||||
[[m4_foreach([_Lt_prefix], [$2],
|
||||
[m4_foreach([_Lt_suffix],
|
||||
]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
|
||||
[_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
|
||||
|
||||
|
||||
# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
|
||||
# -----------------------------------------------------------------------
|
||||
# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
|
||||
# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
|
||||
m4_define([lt_if_append_uniq],
|
||||
[m4_ifdef([$1],
|
||||
[m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
|
||||
[lt_append([$1], [$2], [$3])$4],
|
||||
[$5])],
|
||||
[lt_append([$1], [$2], [$3])$4])])
|
||||
|
||||
|
||||
# lt_dict_add(DICT, KEY, VALUE)
|
||||
# -----------------------------
|
||||
m4_define([lt_dict_add],
|
||||
[m4_define([$1($2)], [$3])])
|
||||
|
||||
|
||||
# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
|
||||
# --------------------------------------------
|
||||
m4_define([lt_dict_add_subkey],
|
||||
[m4_define([$1($2:$3)], [$4])])
|
||||
|
||||
|
||||
# lt_dict_fetch(DICT, KEY, [SUBKEY])
|
||||
# ----------------------------------
|
||||
m4_define([lt_dict_fetch],
|
||||
[m4_ifval([$3],
|
||||
m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
|
||||
m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
|
||||
|
||||
|
||||
# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
|
||||
# -----------------------------------------------------------------
|
||||
m4_define([lt_if_dict_fetch],
|
||||
[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
|
||||
[$5],
|
||||
[$6])])
|
||||
|
||||
|
||||
# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
|
||||
# --------------------------------------------------------------
|
||||
m4_define([lt_dict_filter],
|
||||
[m4_if([$5], [], [],
|
||||
[lt_join(m4_quote(m4_default([$4], [[, ]])),
|
||||
lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
|
||||
[lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
|
||||
])
|
||||
23
src/libs/opencore-amr/m4/ltversion.m4
vendored
Normal file
23
src/libs/opencore-amr/m4/ltversion.m4
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
# ltversion.m4 -- version numbers -*- Autoconf -*-
|
||||
#
|
||||
# Copyright (C) 2004 Free Software Foundation, Inc.
|
||||
# Written by Scott James Remnant, 2004
|
||||
#
|
||||
# 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.
|
||||
|
||||
# @configure_input@
|
||||
|
||||
# serial 3337 ltversion.m4
|
||||
# This file is part of GNU Libtool
|
||||
|
||||
m4_define([LT_PACKAGE_VERSION], [2.4.2])
|
||||
m4_define([LT_PACKAGE_REVISION], [1.3337])
|
||||
|
||||
AC_DEFUN([LTVERSION_VERSION],
|
||||
[macro_version='2.4.2'
|
||||
macro_revision='1.3337'
|
||||
_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
|
||||
_LT_DECL(, macro_revision, 0)
|
||||
])
|
||||
98
src/libs/opencore-amr/m4/lt~obsolete.m4
vendored
Normal file
98
src/libs/opencore-amr/m4/lt~obsolete.m4
vendored
Normal file
@@ -0,0 +1,98 @@
|
||||
# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
|
||||
#
|
||||
# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
|
||||
# Written by Scott James Remnant, 2004.
|
||||
#
|
||||
# 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.
|
||||
|
||||
# serial 5 lt~obsolete.m4
|
||||
|
||||
# These exist entirely to fool aclocal when bootstrapping libtool.
|
||||
#
|
||||
# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
|
||||
# which have later been changed to m4_define as they aren't part of the
|
||||
# exported API, or moved to Autoconf or Automake where they belong.
|
||||
#
|
||||
# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
|
||||
# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
|
||||
# using a macro with the same name in our local m4/libtool.m4 it'll
|
||||
# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
|
||||
# and doesn't know about Autoconf macros at all.)
|
||||
#
|
||||
# So we provide this file, which has a silly filename so it's always
|
||||
# included after everything else. This provides aclocal with the
|
||||
# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
|
||||
# because those macros already exist, or will be overwritten later.
|
||||
# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
|
||||
#
|
||||
# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
|
||||
# Yes, that means every name once taken will need to remain here until
|
||||
# we give up compatibility with versions before 1.7, at which point
|
||||
# we need to keep only those names which we still refer to.
|
||||
|
||||
# This is to help aclocal find these macros, as it can't see m4_define.
|
||||
AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
|
||||
|
||||
m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
|
||||
m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
|
||||
m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
|
||||
m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
|
||||
m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
|
||||
m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
|
||||
m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
|
||||
m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
|
||||
m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
|
||||
m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
|
||||
m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
|
||||
m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
|
||||
m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
|
||||
m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
|
||||
m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
|
||||
m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
|
||||
m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
|
||||
m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
|
||||
m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
|
||||
m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
|
||||
m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
|
||||
m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
|
||||
m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
|
||||
m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
|
||||
m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
|
||||
m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
|
||||
m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
|
||||
m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
|
||||
m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
|
||||
m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
|
||||
m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
|
||||
m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
|
||||
m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
|
||||
m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
|
||||
m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
|
||||
m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
|
||||
m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
|
||||
m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
|
||||
m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
|
||||
m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
|
||||
m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
|
||||
m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
|
||||
m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
|
||||
m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
|
||||
m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
|
||||
m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
|
||||
m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
|
||||
m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
|
||||
m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
|
||||
m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
|
||||
m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
|
||||
m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
|
||||
m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
|
||||
m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
|
||||
m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
|
||||
m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])])
|
||||
m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
|
||||
m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
|
||||
m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])])
|
||||
m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])])
|
||||
m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])])
|
||||
331
src/libs/opencore-amr/missing
Normal file
331
src/libs/opencore-amr/missing
Normal file
@@ -0,0 +1,331 @@
|
||||
#! /bin/sh
|
||||
# Common stub for a few missing GNU programs while installing.
|
||||
|
||||
scriptversion=2012-01-06.13; # UTC
|
||||
|
||||
# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006,
|
||||
# 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
|
||||
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
|
||||
|
||||
# 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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
# 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.
|
||||
|
||||
if test $# -eq 0; then
|
||||
echo 1>&2 "Try \`$0 --help' for more information"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
run=:
|
||||
sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
|
||||
sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
|
||||
|
||||
# In the cases where this matters, `missing' is being run in the
|
||||
# srcdir already.
|
||||
if test -f configure.ac; then
|
||||
configure_ac=configure.ac
|
||||
else
|
||||
configure_ac=configure.in
|
||||
fi
|
||||
|
||||
msg="missing on your system"
|
||||
|
||||
case $1 in
|
||||
--run)
|
||||
# Try to run requested program, and just exit if it succeeds.
|
||||
run=
|
||||
shift
|
||||
"$@" && exit 0
|
||||
# Exit code 63 means version mismatch. This often happens
|
||||
# when the user try to use an ancient version of a tool on
|
||||
# a file that requires a minimum version. In this case we
|
||||
# we should proceed has if the program had been absent, or
|
||||
# if --run hadn't been passed.
|
||||
if test $? = 63; then
|
||||
run=:
|
||||
msg="probably too old"
|
||||
fi
|
||||
;;
|
||||
|
||||
-h|--h|--he|--hel|--help)
|
||||
echo "\
|
||||
$0 [OPTION]... PROGRAM [ARGUMENT]...
|
||||
|
||||
Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
|
||||
error status if there is no known handling for PROGRAM.
|
||||
|
||||
Options:
|
||||
-h, --help display this help and exit
|
||||
-v, --version output version information and exit
|
||||
--run try to run the given command, and emulate it if it fails
|
||||
|
||||
Supported PROGRAM values:
|
||||
aclocal touch file \`aclocal.m4'
|
||||
autoconf touch file \`configure'
|
||||
autoheader touch file \`config.h.in'
|
||||
autom4te touch the output file, or create a stub one
|
||||
automake touch all \`Makefile.in' files
|
||||
bison create \`y.tab.[ch]', if possible, from existing .[ch]
|
||||
flex create \`lex.yy.c', if possible, from existing .c
|
||||
help2man touch the output file
|
||||
lex create \`lex.yy.c', if possible, from existing .c
|
||||
makeinfo touch the output file
|
||||
yacc create \`y.tab.[ch]', if possible, from existing .[ch]
|
||||
|
||||
Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and
|
||||
\`g' are ignored when checking the name.
|
||||
|
||||
Send bug reports to <bug-automake@gnu.org>."
|
||||
exit $?
|
||||
;;
|
||||
|
||||
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
|
||||
echo "missing $scriptversion (GNU Automake)"
|
||||
exit $?
|
||||
;;
|
||||
|
||||
-*)
|
||||
echo 1>&2 "$0: Unknown \`$1' option"
|
||||
echo 1>&2 "Try \`$0 --help' for more information"
|
||||
exit 1
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
# normalize program name to check for.
|
||||
program=`echo "$1" | sed '
|
||||
s/^gnu-//; t
|
||||
s/^gnu//; t
|
||||
s/^g//; t'`
|
||||
|
||||
# Now exit if we have it, but it failed. Also exit now if we
|
||||
# don't have it and --version was passed (most likely to detect
|
||||
# the program). This is about non-GNU programs, so use $1 not
|
||||
# $program.
|
||||
case $1 in
|
||||
lex*|yacc*)
|
||||
# Not GNU programs, they don't have --version.
|
||||
;;
|
||||
|
||||
*)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
|
||||
# Could not run --version or --help. This is probably someone
|
||||
# running `$TOOL --version' or `$TOOL --help' to check whether
|
||||
# $TOOL exists and not knowing $TOOL uses missing.
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
# If it does not exist, or fails to run (possibly an outdated version),
|
||||
# try to emulate it.
|
||||
case $program in
|
||||
aclocal*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified \`acinclude.m4' or \`${configure_ac}'. You might want
|
||||
to install the \`Automake' and \`Perl' packages. Grab them from
|
||||
any GNU archive site."
|
||||
touch aclocal.m4
|
||||
;;
|
||||
|
||||
autoconf*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified \`${configure_ac}'. You might want to install the
|
||||
\`Autoconf' and \`GNU m4' packages. Grab them from any GNU
|
||||
archive site."
|
||||
touch configure
|
||||
;;
|
||||
|
||||
autoheader*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified \`acconfig.h' or \`${configure_ac}'. You might want
|
||||
to install the \`Autoconf' and \`GNU m4' packages. Grab them
|
||||
from any GNU archive site."
|
||||
files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
|
||||
test -z "$files" && files="config.h"
|
||||
touch_files=
|
||||
for f in $files; do
|
||||
case $f in
|
||||
*:*) touch_files="$touch_files "`echo "$f" |
|
||||
sed -e 's/^[^:]*://' -e 's/:.*//'`;;
|
||||
*) touch_files="$touch_files $f.in";;
|
||||
esac
|
||||
done
|
||||
touch $touch_files
|
||||
;;
|
||||
|
||||
automake*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
|
||||
You might want to install the \`Automake' and \`Perl' packages.
|
||||
Grab them from any GNU archive site."
|
||||
find . -type f -name Makefile.am -print |
|
||||
sed 's/\.am$/.in/' |
|
||||
while read f; do touch "$f"; done
|
||||
;;
|
||||
|
||||
autom4te*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is needed, but is $msg.
|
||||
You might have modified some files without having the
|
||||
proper tools for further handling them.
|
||||
You can get \`$1' as part of \`Autoconf' from any GNU
|
||||
archive site."
|
||||
|
||||
file=`echo "$*" | sed -n "$sed_output"`
|
||||
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
|
||||
if test -f "$file"; then
|
||||
touch $file
|
||||
else
|
||||
test -z "$file" || exec >$file
|
||||
echo "#! /bin/sh"
|
||||
echo "# Created by GNU Automake missing as a replacement of"
|
||||
echo "# $ $@"
|
||||
echo "exit 0"
|
||||
chmod +x $file
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
|
||||
bison*|yacc*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' $msg. You should only need it if
|
||||
you modified a \`.y' file. You may need the \`Bison' package
|
||||
in order for those modifications to take effect. You can get
|
||||
\`Bison' from any GNU archive site."
|
||||
rm -f y.tab.c y.tab.h
|
||||
if test $# -ne 1; then
|
||||
eval LASTARG=\${$#}
|
||||
case $LASTARG in
|
||||
*.y)
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
|
||||
if test -f "$SRCFILE"; then
|
||||
cp "$SRCFILE" y.tab.c
|
||||
fi
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
|
||||
if test -f "$SRCFILE"; then
|
||||
cp "$SRCFILE" y.tab.h
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if test ! -f y.tab.h; then
|
||||
echo >y.tab.h
|
||||
fi
|
||||
if test ! -f y.tab.c; then
|
||||
echo 'main() { return 0; }' >y.tab.c
|
||||
fi
|
||||
;;
|
||||
|
||||
lex*|flex*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified a \`.l' file. You may need the \`Flex' package
|
||||
in order for those modifications to take effect. You can get
|
||||
\`Flex' from any GNU archive site."
|
||||
rm -f lex.yy.c
|
||||
if test $# -ne 1; then
|
||||
eval LASTARG=\${$#}
|
||||
case $LASTARG in
|
||||
*.l)
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
|
||||
if test -f "$SRCFILE"; then
|
||||
cp "$SRCFILE" lex.yy.c
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if test ! -f lex.yy.c; then
|
||||
echo 'main() { return 0; }' >lex.yy.c
|
||||
fi
|
||||
;;
|
||||
|
||||
help2man*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified a dependency of a manual page. You may need the
|
||||
\`Help2man' package in order for those modifications to take
|
||||
effect. You can get \`Help2man' from any GNU archive site."
|
||||
|
||||
file=`echo "$*" | sed -n "$sed_output"`
|
||||
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
|
||||
if test -f "$file"; then
|
||||
touch $file
|
||||
else
|
||||
test -z "$file" || exec >$file
|
||||
echo ".ab help2man is required to generate this page"
|
||||
exit $?
|
||||
fi
|
||||
;;
|
||||
|
||||
makeinfo*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified a \`.texi' or \`.texinfo' file, or any other file
|
||||
indirectly affecting the aspect of the manual. The spurious
|
||||
call might also be the consequence of using a buggy \`make' (AIX,
|
||||
DU, IRIX). You might want to install the \`Texinfo' package or
|
||||
the \`GNU make' package. Grab either from any GNU archive site."
|
||||
# The file to touch is that specified with -o ...
|
||||
file=`echo "$*" | sed -n "$sed_output"`
|
||||
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
|
||||
if test -z "$file"; then
|
||||
# ... or it is the one specified with @setfilename ...
|
||||
infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
|
||||
file=`sed -n '
|
||||
/^@setfilename/{
|
||||
s/.* \([^ ]*\) *$/\1/
|
||||
p
|
||||
q
|
||||
}' $infile`
|
||||
# ... or it is derived from the source name (dir/f.texi becomes f.info)
|
||||
test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
|
||||
fi
|
||||
# If the file does not exist, the user really needs makeinfo;
|
||||
# let's fail without touching anything.
|
||||
test -f $file || exit 1
|
||||
touch $file
|
||||
;;
|
||||
|
||||
*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is needed, and is $msg.
|
||||
You might have modified some files without having the
|
||||
proper tools for further handling them. Check the \`README' file,
|
||||
it often tells you about the needed prerequisites for installing
|
||||
this package. You may also peek at any GNU archive site, in case
|
||||
some other package would contain this missing \`$1' program."
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
|
||||
# Local variables:
|
||||
# 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:
|
||||
22
src/libs/opencore-amr/opencore-amr-nb.sln
Normal file
22
src/libs/opencore-amr/opencore-amr-nb.sln
Normal file
@@ -0,0 +1,22 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 14
|
||||
VisualStudioVersion = 14.0.23107.0
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libopencore-amr-nb", "opencore-amr-nb.vcxproj", "{3480045B-45D9-48B5-BEFA-1B7A75652606}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|x86 = Debug|x86
|
||||
Release|x86 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{3480045B-45D9-48B5-BEFA-1B7A75652606}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{3480045B-45D9-48B5-BEFA-1B7A75652606}.Debug|x86.Build.0 = Debug|Win32
|
||||
{3480045B-45D9-48B5-BEFA-1B7A75652606}.Release|x86.ActiveCfg = Release|Win32
|
||||
{3480045B-45D9-48B5-BEFA-1B7A75652606}.Release|x86.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
1492
src/libs/opencore-amr/opencore-amr-nb.vcproj
Normal file
1492
src/libs/opencore-amr/opencore-amr-nb.vcproj
Normal file
File diff suppressed because it is too large
Load Diff
413
src/libs/opencore-amr/opencore-amr-nb.vcxproj
Normal file
413
src/libs/opencore-amr/opencore-amr-nb.vcxproj
Normal file
@@ -0,0 +1,413 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectName>libopencore-amr-nb</ProjectName>
|
||||
<ProjectGuid>{3480045B-45D9-48B5-BEFA-1B7A75652606}</ProjectGuid>
|
||||
<RootNamespace>opencoreamrnb</RootNamespace>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>14.0.23107.0</_ProjectFileVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<OutDir>$(SolutionDir)$(Configuration)\</OutDir>
|
||||
<IntDir>$(Configuration)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<OutDir>$(SolutionDir)$(Configuration)\</OutDir>
|
||||
<IntDir>$(Configuration)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Full</Optimization>
|
||||
<AdditionalIncludeDirectories>opencore\codecs_v2\audio\gsm_amr\common\dec\include;opencore\codecs_v2\audio\gsm_amr\amr_nb\common\include;opencore\codecs_v2\audio\gsm_amr\amr_nb\dec\src;opencore\codecs_v2\audio\gsm_amr\amr_nb\dec\include;opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src;opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\include;oscl;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<PrecompiledHeader />
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat />
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
|
||||
<AdditionalIncludeDirectories>opencore\codecs_v2\audio\gsm_amr\common\dec\include;opencore\codecs_v2\audio\gsm_amr\amr_nb\common\include;opencore\codecs_v2\audio\gsm_amr\amr_nb\dec\src;opencore\codecs_v2\audio\gsm_amr\amr_nb\dec\include;opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src;opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\include;oscl;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<PrecompiledHeader />
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat />
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="amrnb\amrnb_wrapper.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\src\add.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\src\az_lsp.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\src\bitno_tab.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\src\bitreorder_tab.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\src\bits2prm.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\src\c2_9pf_tab.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\src\copy.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\src\div_s.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\src\extract_h.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\src\extract_l.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\src\gains_tbl.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\src\gc_pred.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\src\get_const_tbls.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\src\gmed_n.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\src\gray_tbl.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\src\grid_tbl.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\src\int_lpc.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\src\inv_sqrt.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\src\inv_sqrt_tbl.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\src\log2.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\src\log2_norm.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\src\log2_tbl.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\src\lsfwt.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\src\lsp.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\src\lsp_az.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\src\lsp_lsf.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\src\lsp_lsf_tbl.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\src\lsp_tab.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\src\l_deposit_h.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\src\l_deposit_l.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\src\l_shr_r.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\src\mult_r.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\src\negate.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\src\norm_l.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\src\norm_s.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\src\overflow_tbl.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\src\ph_disp_tab.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\src\pow2.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\src\pow2_tbl.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\src\pred_lt.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\src\qua_gain_tbl.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\src\q_plsf.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\src\q_plsf_3.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\src\q_plsf_3_tbl.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\src\q_plsf_5.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\src\q_plsf_5_tbl.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\src\reorder.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\src\residu.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\src\round.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\src\r_fft.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\src\set_zero.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\src\shr.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\src\shr_r.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\src\sqrt_l.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\src\sqrt_l_tbl.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\src\sub.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\src\syn_filt.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\src\vad1.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\src\vad2.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\src\weight_a.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\src\window_tab.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\dec\src\agc.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\dec\src\amrdecode.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\dec\src\a_refl.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\dec\src\bgnscd.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\dec\src\b_cn_cod.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\dec\src\c_g_aver.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\dec\src\d1035pf.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\dec\src\d2_11pf.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\dec\src\d2_9pf.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\dec\src\d3_14pf.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\dec\src\d4_17pf.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\dec\src\d8_31pf.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\dec\src\dec_amr.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\dec\src\dec_gain.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\dec\src\dec_input_format_tab.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\dec\src\dec_lag3.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\dec\src\dec_lag6.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\dec\src\dtx_dec.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\dec\src\d_gain_c.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\dec\src\d_gain_p.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\dec\src\d_plsf.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\dec\src\d_plsf_3.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\dec\src\d_plsf_5.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\dec\src\ec_gains.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\dec\src\ex_ctrl.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\dec\src\if2_to_ets.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\dec\src\int_lsf.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\dec\src\lsp_avg.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\dec\src\ph_disp.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\dec\src\post_pro.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\dec\src\preemph.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\dec\src\pstfilt.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\dec\src\qgain475_tab.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\dec\src\sp_dec.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\dec\src\wmf_to_ets.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\amrencode.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\autocorr.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\c1035pf.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\c2_11pf.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\c2_9pf.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\c3_14pf.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\c4_17pf.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\c8_31pf.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\calc_cor.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\calc_en.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\cbsearch.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\cl_ltp.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\cod_amr.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\convolve.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\corrwght_tab.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\cor_h.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\cor_h_x.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\cor_h_x2.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\div_32.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\dtx_enc.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\enc_lag3.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\enc_lag6.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\enc_output_format_tab.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\ets_to_if2.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\ets_to_wmf.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\gain_q.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\gsmamr_encoder_wrapper.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\g_adapt.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\g_code.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\g_pitch.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\hp_max.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\inter_36.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\inter_36_tab.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\lag_wind.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\lag_wind_tab.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\levinson.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\lflg_upd.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\lpc.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\l_abs.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\l_comp.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\l_extract.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\l_negate.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\ol_ltp.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\pitch_fr.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\pitch_ol.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\pre_big.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\pre_proc.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\prm2bits.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\p_ol_wgh.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\qgain475.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\qgain795.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\qua_gain.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\q_gain_c.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\q_gain_p.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\s10_8pf.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\set_sign.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\sid_sync.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\spreproc.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\spstproc.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\sp_enc.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\ton_stab.cpp" />
|
||||
<ClCompile Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\vad1.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="amrnb\interf_dec.h" />
|
||||
<ClInclude Include="amrnb\interf_enc.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\include\add.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\include\az_lsp.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\include\bitno_tab.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\include\bitreorder_tab.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\include\cnst.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\include\div_s.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\include\dtx_common_def.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\include\d_gain_p.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\include\d_plsf.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\include\frame.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\include\frame_type_3gpp.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\include\gc_pred.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\include\get_const_tbls.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\include\gmed_n.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\include\gsm_amr_typedefs.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\include\int_lpc.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\include\int_lsf.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\include\inv_sqrt.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\include\log2.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\include\log2_norm.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\include\lsfwt.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\include\lsp.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\include\lsp_az.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\include\lsp_lsf.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\include\lsp_tab.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\include\l_add.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\include\l_add_c.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\include\l_comp.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\include\l_extract.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\include\l_negate.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\include\l_shl.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\include\l_shr.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\include\l_shr_r.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\include\mode.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\include\mpy_32.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\include\mult.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\include\mult_r.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\include\negate.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\include\norm_l.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\include\norm_s.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\include\n_proc.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\include\oper_32b.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\include\pow2.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\include\pred_lt.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\include\pvgsmamr.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\include\p_ol_wgh.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\include\qgain475_tab.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\include\qua_gain.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\include\qua_gain_tbl.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\include\q_plsf.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\include\q_plsf_3_tbl.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\include\q_plsf_5_tbl.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\include\reorder.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\include\residu.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\include\reverse_bits.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\include\round.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\include\set_zero.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\include\shl.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\include\shr.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\include\shr_r.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\include\sqrt_l.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\include\sub.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\include\syn_filt.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\include\typedef.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\include\vad.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\include\weight_a.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\include\window_tab.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\common\include\wmf_to_ets.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\dec\include\decoder_gsm_amr.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\dec\include\pvamrnbdecoder_api.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\dec\src\agc.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\dec\src\amrdecode.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\dec\src\a_refl.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\dec\src\bgnscd.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\dec\src\b_cn_cod.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\dec\src\c_g_aver.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\dec\src\d1035pf.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\dec\src\d2_11pf.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\dec\src\d2_9pf.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\dec\src\d3_14pf.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\dec\src\d4_17pf.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\dec\src\d8_31pf.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\dec\src\dec_amr.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\dec\src\dec_gain.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\dec\src\dec_lag3.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\dec\src\dec_lag6.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\dec\src\dtx_dec.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\dec\src\ec_gains.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\dec\src\ex_ctrl.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\dec\src\gsmamr_dec.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\dec\src\if2_to_ets.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\dec\src\lsp_avg.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\dec\src\ph_disp.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\dec\src\post_pro.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\dec\src\preemph.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\dec\src\pstfilt.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\dec\src\sp_dec.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\include\gsmamr_encoder_wrapper.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\amrencode.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\autocorr.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\c1035pf.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\c2_11pf.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\c2_9pf.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\c3_14pf.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\c4_17pf.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\c8_31pf.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\calc_cor.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\calc_en.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\cbsearch.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\cl_ltp.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\cod_amr.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\convolve.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\cor_h.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\cor_h_x.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\cor_h_x2.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\div_32.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\dtx_enc.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\enc_lag3.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\enc_lag6.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\ets_to_if2.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\ets_to_wmf.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\gain_q.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\gsmamr_enc.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\g_adapt.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\g_code.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\g_pitch.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\hp_max.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\inter_36.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\inter_36_tab.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\lag_wind.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\lag_wind_tab.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\levinson.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\lpc.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\l_abs.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\ol_ltp.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\pitch_fr.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\pitch_ol.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\pre_big.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\pre_proc.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\prm2bits.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\qgain475.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\qgain795.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\q_gain_c.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\q_gain_p.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\s10_8pf.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\set_sign.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\sid_sync.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\spreproc.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\spstproc.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\sp_enc.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\ton_stab.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\vad1.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\amr_nb\enc\src\vad2.h" />
|
||||
<ClInclude Include="opencore\codecs_v2\audio\gsm_amr\common\dec\include\pvgsmamrdecoderinterface.h" />
|
||||
<ClInclude Include="oscl\oscl_base.h" />
|
||||
<ClInclude Include="oscl\oscl_base_macros.h" />
|
||||
<ClInclude Include="oscl\oscl_dll.h" />
|
||||
<ClInclude Include="oscl\oscl_error.h" />
|
||||
<ClInclude Include="oscl\oscl_exception.h" />
|
||||
<ClInclude Include="oscl\oscl_mem.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Text Include="ReadMe.txt" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
1011
src/libs/opencore-amr/opencore-amr-nb.vcxproj.filters
Normal file
1011
src/libs/opencore-amr/opencore-amr-nb.vcxproj.filters
Normal file
File diff suppressed because it is too large
Load Diff
1328
src/libs/opencore-amr/opencore/ChangeLog
Normal file
1328
src/libs/opencore-amr/opencore/ChangeLog
Normal file
File diff suppressed because it is too large
Load Diff
269
src/libs/opencore-amr/opencore/NOTICE
Normal file
269
src/libs/opencore-amr/opencore/NOTICE
Normal file
@@ -0,0 +1,269 @@
|
||||
/* ------------------------------------------------------------------
|
||||
* Copyright (C) 2009 PacketVideo
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
||||
* express or implied.
|
||||
* See the License for the specific language governing permissions
|
||||
* and limitations under the License.
|
||||
* -------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
Portions of the PacketVideo supplied code contain contributions which may be
|
||||
covered by the following copyright statements:
|
||||
|
||||
|
||||
/* ------------------------------------------------------------------- *
|
||||
* MPEG-4 Simple Profile Video Decoder
|
||||
* ------------------------------------------------------------------- *
|
||||
*
|
||||
* This software module was originally developed and/or edited by
|
||||
*
|
||||
* Paulo Nunes (IST / ACTS-MoMuSyS)
|
||||
* Robert Danielsen (Telenor / ACTS-MoMuSyS)
|
||||
* Luis Ducla-Soares (IST / ACTS-MoMuSys).
|
||||
* Cor Quist (KPN / ACTS-MoMuSys).
|
||||
* Minhua Zhou (HHI / ACTS-MoMuSys).
|
||||
*
|
||||
* in the course of development of the MPEG-4 Video (ISO/IEC 14496-2) standard.
|
||||
* This software module is an implementation of a part of one or more MPEG-4
|
||||
* Video (ISO/IEC 14496-2) tools as specified by the MPEG-4 Video (ISO/IEC
|
||||
* 14496-2) standard.
|
||||
*
|
||||
* ISO/IEC gives users of the MPEG-4 Video (ISO/IEC 14496-2) standard free
|
||||
* license to this software module or modifications thereof for use in hardware
|
||||
* or software products claiming conformance to the MPEG-4 Video (ISO/IEC
|
||||
* 14496-2) standard.
|
||||
*
|
||||
* Those intending to use this software module in hardware or software products
|
||||
* are advised that its use may infringe existing patents. The original
|
||||
* developer of this software module and his/her company, the subsequent
|
||||
* editors and their companies, and ISO/IEC have no liability for use of this
|
||||
* software module or modifications thereof in an implementation. Copyright is
|
||||
* not released for non MPEG-4 Video (ISO/IEC 14496-2) Standard conforming
|
||||
* products.
|
||||
*
|
||||
* ACTS-MoMuSys partners retain full right to use the code for his/her own
|
||||
* purpose, assign or donate the code to a third party and to inhibit third
|
||||
* parties from using the code for non MPEG-4 Video (ISO/IEC 14496-2) Standard
|
||||
* conforming products. This copyright notice must be included in all copies or
|
||||
* derivative works.
|
||||
*
|
||||
* Copyright (c) 1996, 1997
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
|
||||
SC 29 Software Copyright Licencing Disclaimer:
|
||||
|
||||
This software module was originally developed by
|
||||
Coding Technologies
|
||||
|
||||
and edited by
|
||||
-
|
||||
|
||||
in the course of development of the ISO/IEC 13818-7 and ISO/IEC 14496-3
|
||||
standards for reference purposes and its performance may not have been
|
||||
optimized. This software module is an implementation of one or more tools as
|
||||
specified by the ISO/IEC 13818-7 and ISO/IEC 14496-3 standards.
|
||||
ISO/IEC gives users free license to this software module or modifications
|
||||
thereof for use in products claiming conformance to audiovisual and
|
||||
image-coding related ITU Recommendations and/or ISO/IEC International
|
||||
Standards. ISO/IEC gives users the same free license to this software module or
|
||||
modifications thereof for research purposes and further ISO/IEC standardisation.
|
||||
Those intending to use this software module in products are advised that its
|
||||
use may infringe existing patents. ISO/IEC have no liability for use of this
|
||||
software module or modifications thereof. Copyright is not released for
|
||||
products that do not conform to audiovisual and image-coding related ITU
|
||||
Recommendations and/or ISO/IEC International Standards.
|
||||
The original developer retains full right to modify and use the code for its
|
||||
own purpose, assign or donate the code to a third party and to inhibit third
|
||||
parties from using the code for products that do not conform to audiovisual and
|
||||
image-coding related ITU Recommendations and/or ISO/IEC International Standards.
|
||||
This copyright notice must be included in all copies or derivative works.
|
||||
Copyright (c) ISO/IEC 2003.
|
||||
|
||||
*******************************************************************************/
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
|
||||
This software module was originally developed by
|
||||
|
||||
Mikko Suonio (Nokia)
|
||||
|
||||
in the course of development of the MPEG-2 NBC/MPEG-4 Audio standard
|
||||
ISO/IEC 13818-7, 14496-1,2 and 3. This software module is an
|
||||
implementation of a part of one or more MPEG-2 NBC/MPEG-4 Audio tools
|
||||
as specified by the MPEG-2 NBC/MPEG-4 Audio standard. ISO/IEC gives
|
||||
users of the MPEG-2 NBC/MPEG-4 Audio standards free license to this
|
||||
software module or modifications thereof for use in hardware or
|
||||
software products claiming conformance to the MPEG-2 NBC/ MPEG-4 Audio
|
||||
standards. Those intending to use this software module in hardware or
|
||||
software products are advised that this use may infringe existing
|
||||
patents. The original developer of this software module and his/her
|
||||
company, the subsequent editors and their companies, and ISO/IEC have
|
||||
no liability for use of this software module or modifications thereof
|
||||
in an implementation. Copyright is not released for non MPEG-2
|
||||
NBC/MPEG-4 Audio conforming products. The original developer retains
|
||||
full right to use the code for his/her own purpose, assign or donate
|
||||
the code to a third party and to inhibit third party from using the
|
||||
code for non MPEG-2 NBC/MPEG-4 Audio conforming products. This
|
||||
copyright notice must be included in all copies or derivative works.
|
||||
|
||||
Copyright (c) 1997.
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
|
||||
This software module was originally developed by
|
||||
Nokia in the course of development of the MPEG-2 AAC/MPEG-4
|
||||
Audio standard ISO/IEC13818-7, 14496-1, 2 and 3.
|
||||
This software module is an implementation of a part
|
||||
of one or more MPEG-2 AAC/MPEG-4 Audio tools as specified by the
|
||||
MPEG-2 aac/MPEG-4 Audio standard. ISO/IEC gives users of the
|
||||
MPEG-2aac/MPEG-4 Audio standards free license to this software module
|
||||
or modifications thereof for use in hardware or software products
|
||||
claiming conformance to the MPEG-2 aac/MPEG-4 Audio standards. Those
|
||||
intending to use this software module in hardware or software products
|
||||
are advised that this use may infringe existing patents. The original
|
||||
developer of this software module, the subsequent
|
||||
editors and their companies, and ISO/IEC have no liability for use of
|
||||
this software module or modifications thereof in an
|
||||
implementation. Copyright is not released for non MPEG-2 aac/MPEG-4
|
||||
Audio conforming products. The original developer retains full right to
|
||||
use the code for the developer's own purpose, assign or donate the code to a
|
||||
third party and to inhibit third party from using the code for non
|
||||
MPEG-2 aac/MPEG-4 Audio conforming products. This copyright notice
|
||||
must be included in all copies or derivative works.
|
||||
Copyright (c)1997.
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
MPEG-2 NBC Audio Decoder
|
||||
"This software module was originally developed by AT&T, Dolby
|
||||
Laboratories, Fraunhofer Gesellschaft IIS in the course of development
|
||||
of the MPEG-2 NBC/MPEG-4 Audio standard ISO/IEC 13818-7, 14496-1,2 and
|
||||
3. This software module is an implementation of a part of one or more
|
||||
MPEG-2 NBC/MPEG-4 Audio tools as specified by the MPEG-2 NBC/MPEG-4
|
||||
Audio standard. ISO/IEC gives users of the MPEG-2 NBC/MPEG-4 Audio
|
||||
standards free license to this software module or modifications thereof
|
||||
for use in hardware or software products claiming conformance to the
|
||||
MPEG-2 NBC/MPEG-4 Audio standards. Those intending to use this software
|
||||
module in hardware or software products are advised that this use may
|
||||
infringe existing patents. The original developer of this software
|
||||
module and his/her company, the subsequent editors and their companies,
|
||||
and ISO/IEC have no liability for use of this software module or
|
||||
modifications thereof in an implementation. Copyright is not released
|
||||
for non MPEG-2 NBC/MPEG-4 Audio conforming products.The original
|
||||
developer retains full right to use the code for his/her own purpose,
|
||||
assign or donate the code to a third party and to inhibit third party
|
||||
from using the code for non MPEG-2 NBC/MPEG-4 Audio conforming products.
|
||||
This copyright notice must be included in all copies or derivative
|
||||
works."
|
||||
Copyright(c)1996.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
|
||||
/*
|
||||
* snprintf.c - a portable implementation of snprintf
|
||||
*
|
||||
* AUTHOR
|
||||
* Mark Martinec <mark.martinec@ijs.si>, April 1999.
|
||||
*
|
||||
* Copyright 1999, Mark Martinec. All rights reserved.
|
||||
*
|
||||
* TERMS AND CONDITIONS
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the "Frontier Artistic License" which comes
|
||||
* with this Kit.
|
||||
*
|
||||
* 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 Frontier Artistic License for more details.
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
The "Frontier Artistic License" may be found at
|
||||
http://www.spinwardstars.com/frontier/fal.html
|
||||
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
/*
|
||||
* Copyright (c) 2005 The Khronos Group Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Software, and to
|
||||
* permit persons to whom the Software is furnished to do so, subject
|
||||
* to the following conditions:
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
*/
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
/**@@@+++@@@@******************************************************************
|
||||
**
|
||||
** Microsoft Windows Media
|
||||
** Copyright (C) Microsoft Corporation. All rights reserved.
|
||||
**
|
||||
***@@@---@@@@******************************************************************
|
||||
*/
|
||||
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Portions of this file are derived from the following 3GPP standard:
|
||||
|
||||
3GPP TS 26.073
|
||||
ANSI-C code for the Adaptive Multi-Rate (AMR) speech codec
|
||||
Available from http://www.3gpp.org
|
||||
|
||||
(C) 2004, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TTA, TTC)
|
||||
Permission to distribute, modify and use this file under the standard license
|
||||
terms listed above has been obtained from the copyright holder.
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Portions of this file are derived from the following 3GPP standard:
|
||||
|
||||
3GPP TS 26.173
|
||||
ANSI-C code for the Adaptive Multi-Rate - Wideband (AMR-WB) speech codec
|
||||
Available from http://www.3gpp.org
|
||||
|
||||
(C) 2007, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TTA, TTC)
|
||||
Permission to distribute, modify and use this file under the standard license
|
||||
terms listed above has been obtained from the copyright holder.
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
60
src/libs/opencore-amr/opencore/README
Normal file
60
src/libs/opencore-amr/opencore/README
Normal file
@@ -0,0 +1,60 @@
|
||||
Welcome to OpenCORE
|
||||
|
||||
http://www.opencore.net/
|
||||
|
||||
OpenCORE is the multimedia framework of Android originally contributed by
|
||||
PacketVideo. It provides an extensible framework for multimedia rendering and
|
||||
authoring and video telephony (3G-324M).
|
||||
|
||||
The following an overview of the directory structure which includes a list of
|
||||
the top-level directories along with a brief note describing the contents.
|
||||
|
||||
__
|
||||
|-- android [Contains the components the interface OpenCORE with
|
||||
| other parts of Android]
|
||||
|-- baselibs [Contains basic libraries for data containers, MIME string
|
||||
| handling, messaging across thread boundaries, etc]
|
||||
|-- build_config [Contains top-level build files used to build the libraries
|
||||
| outside of Android]
|
||||
|-- codecs_v2 [Contains the implementations of PV's audio and video
|
||||
| codecs as well as the OpenMax IL interface layer]
|
||||
|-- doc [Contains the documentation required to interface with
|
||||
| OpenCORE]
|
||||
|-- engines [Contains the implementation of the player and author
|
||||
| engines as well as a utility for metadata]
|
||||
|-- extern_libs_v2 [Contains 3rd-party libraries used by OpenCORE.
|
||||
| Currently this directory contains header files
|
||||
| defining the Khronos OpenMax IL interface]
|
||||
|-- extern_tools_v2 [Contains 3rd-party tools used to build OpenCORE
|
||||
| indpendently of the Android build system]
|
||||
|-- fileformats [Contains the libraries for parsing a variety of
|
||||
| fileformats including mp4/3gp,mp3,wav,aac]
|
||||
|-- modules [Contains build files for aggregating low-level libraries]
|
||||
|-- nodes [Contains the OpenCORE framework "nodes", which is
|
||||
| the abstraction used to implement independent multimedia
|
||||
| processing units that can be connected in a flow graph]
|
||||
|-- oscl [This is the Operating System Compatibility Layer which
|
||||
| provides the mapping OS APIs as well as some basic
|
||||
| data structures and utilities]
|
||||
|-- protocols [Contains parsers and composers for a variety of network
|
||||
| protocols such as HTTP, RTP/RTCP, RTSP, and SDP]
|
||||
|-- pvmi [Contains fundamental definitions that make up OpenCORE.
|
||||
| The directory name is an abbreviation of PacketVideo
|
||||
| Multimedia Infrastructure]
|
||||
|-- tools_v2 [Contains tools used to build the libraries outside of Android]
|
||||
|
||||
Within each library, the following directory structure, with a few exceptions,
|
||||
is implemented to organize the files:
|
||||
|
||||
__
|
||||
|-- build
|
||||
|-- make <- makefile to build outside of Android is here
|
||||
|-- doc <- directory for any documentation specific to this lib
|
||||
|-- include <- header files that are part of the external interface go here
|
||||
|-- src <- source and internal header files of the library
|
||||
|-- test <- test code (follows a similar structure)
|
||||
|-- build
|
||||
|-- make
|
||||
|-- include
|
||||
|-- src
|
||||
|
||||
@@ -0,0 +1,76 @@
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_SRC_FILES := \
|
||||
src/add.cpp \
|
||||
src/az_lsp.cpp \
|
||||
src/bitno_tab.cpp \
|
||||
src/bitreorder_tab.cpp \
|
||||
src/c2_9pf_tab.cpp \
|
||||
src/div_s.cpp \
|
||||
src/gains_tbl.cpp \
|
||||
src/gc_pred.cpp \
|
||||
src/get_const_tbls.cpp \
|
||||
src/gmed_n.cpp \
|
||||
src/grid_tbl.cpp \
|
||||
src/gray_tbl.cpp \
|
||||
src/int_lpc.cpp \
|
||||
src/inv_sqrt.cpp \
|
||||
src/inv_sqrt_tbl.cpp \
|
||||
src/l_shr_r.cpp \
|
||||
src/log2.cpp \
|
||||
src/log2_norm.cpp \
|
||||
src/log2_tbl.cpp \
|
||||
src/lsfwt.cpp \
|
||||
src/lsp.cpp \
|
||||
src/lsp_az.cpp \
|
||||
src/lsp_lsf.cpp \
|
||||
src/lsp_lsf_tbl.cpp \
|
||||
src/lsp_tab.cpp \
|
||||
src/mult_r.cpp \
|
||||
src/norm_l.cpp \
|
||||
src/norm_s.cpp \
|
||||
src/overflow_tbl.cpp \
|
||||
src/ph_disp_tab.cpp \
|
||||
src/pow2.cpp \
|
||||
src/pow2_tbl.cpp \
|
||||
src/pred_lt.cpp \
|
||||
src/q_plsf.cpp \
|
||||
src/q_plsf_3.cpp \
|
||||
src/q_plsf_3_tbl.cpp \
|
||||
src/q_plsf_5.cpp \
|
||||
src/q_plsf_5_tbl.cpp \
|
||||
src/qua_gain_tbl.cpp \
|
||||
src/reorder.cpp \
|
||||
src/residu.cpp \
|
||||
src/round.cpp \
|
||||
src/shr.cpp \
|
||||
src/shr_r.cpp \
|
||||
src/sqrt_l.cpp \
|
||||
src/sqrt_l_tbl.cpp \
|
||||
src/sub.cpp \
|
||||
src/syn_filt.cpp \
|
||||
src/weight_a.cpp \
|
||||
src/window_tab.cpp
|
||||
|
||||
|
||||
LOCAL_MODULE := libpv_amr_nb_common_lib
|
||||
|
||||
LOCAL_CFLAGS := $(PV_CFLAGS)
|
||||
LOCAL_ARM_MODE := arm
|
||||
|
||||
LOCAL_STATIC_LIBRARIES :=
|
||||
|
||||
LOCAL_SHARED_LIBRARIES :=
|
||||
|
||||
LOCAL_C_INCLUDES := \
|
||||
$(PV_TOP)/codecs_v2/audio/gsm_amr/amr_nb/common/src \
|
||||
$(PV_TOP)/codecs_v2/audio/gsm_amr/amr_nb/common/include \
|
||||
$(PV_INCLUDES)
|
||||
|
||||
LOCAL_COPY_HEADERS_TO := $(PV_COPY_HEADERS_TO)
|
||||
|
||||
LOCAL_COPY_HEADERS := \
|
||||
|
||||
|
||||
include $(BUILD_STATIC_LIBRARY)
|
||||
@@ -0,0 +1,68 @@
|
||||
# Get the current local path as the first operation
|
||||
LOCAL_PATH := $(call get_makefile_dir)
|
||||
|
||||
# Clear out the variables used in the local makefiles
|
||||
include $(MK)/clear.mk
|
||||
|
||||
TARGET := pv_amr_nb_common_lib
|
||||
|
||||
|
||||
OPTIMIZE_FOR_PERFORMANCE_OVER_SIZE := true
|
||||
|
||||
SRCDIR := ../../src
|
||||
INCSRCDIR := ../../include
|
||||
|
||||
SRCS := add.cpp \
|
||||
az_lsp.cpp \
|
||||
bitno_tab.cpp \
|
||||
bitreorder_tab.cpp \
|
||||
c2_9pf_tab.cpp \
|
||||
div_s.cpp \
|
||||
gains_tbl.cpp \
|
||||
gc_pred.cpp \
|
||||
get_const_tbls.cpp \
|
||||
gmed_n.cpp \
|
||||
grid_tbl.cpp \
|
||||
gray_tbl.cpp \
|
||||
int_lpc.cpp \
|
||||
inv_sqrt.cpp \
|
||||
inv_sqrt_tbl.cpp \
|
||||
l_shr_r.cpp \
|
||||
log2.cpp \
|
||||
log2_norm.cpp \
|
||||
log2_tbl.cpp \
|
||||
lsfwt.cpp \
|
||||
lsp.cpp \
|
||||
lsp_az.cpp \
|
||||
lsp_lsf.cpp \
|
||||
lsp_lsf_tbl.cpp \
|
||||
lsp_tab.cpp \
|
||||
mult_r.cpp \
|
||||
norm_l.cpp \
|
||||
norm_s.cpp \
|
||||
overflow_tbl.cpp \
|
||||
ph_disp_tab.cpp \
|
||||
pow2.cpp \
|
||||
pow2_tbl.cpp \
|
||||
pred_lt.cpp \
|
||||
q_plsf.cpp \
|
||||
q_plsf_3.cpp \
|
||||
q_plsf_3_tbl.cpp \
|
||||
q_plsf_5.cpp \
|
||||
q_plsf_5_tbl.cpp \
|
||||
qua_gain_tbl.cpp \
|
||||
reorder.cpp \
|
||||
residu.cpp \
|
||||
round.cpp \
|
||||
shr.cpp \
|
||||
shr_r.cpp \
|
||||
sqrt_l.cpp \
|
||||
sqrt_l_tbl.cpp \
|
||||
sub.cpp \
|
||||
syn_filt.cpp \
|
||||
weight_a.cpp \
|
||||
window_tab.cpp
|
||||
|
||||
include $(MK)/library.mk
|
||||
|
||||
|
||||
@@ -0,0 +1,101 @@
|
||||
/* ------------------------------------------------------------------
|
||||
* Copyright (C) 1998-2009 PacketVideo
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
||||
* express or implied.
|
||||
* See the License for the specific language governing permissions
|
||||
* and limitations under the License.
|
||||
* -------------------------------------------------------------------
|
||||
*/
|
||||
/****************************************************************************************
|
||||
Portions of this file are derived from the following 3GPP standard:
|
||||
|
||||
3GPP TS 26.073
|
||||
ANSI-C code for the Adaptive Multi-Rate (AMR) speech codec
|
||||
Available from http://www.3gpp.org
|
||||
|
||||
(C) 2004, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TTA, TTC)
|
||||
Permission to distribute, modify and use this file under the standard license
|
||||
terms listed above has been obtained from the copyright holder.
|
||||
****************************************************************************************/
|
||||
/*
|
||||
|
||||
Filename: abs_s.h
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
INCLUDE DESCRIPTION
|
||||
|
||||
This file contains all the constant definitions and prototype definitions
|
||||
needed by the abs_s function.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; CONTINUE ONLY IF NOT ALREADY DEFINED
|
||||
----------------------------------------------------------------------------*/
|
||||
#ifndef ABS_S_H
|
||||
#define ABS_S_H
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; INCLUDES
|
||||
----------------------------------------------------------------------------*/
|
||||
#include "basicop_malloc.h"
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; MACROS
|
||||
; Define module specific macros here
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; DEFINES
|
||||
; Include all pre-processor statements here.
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; EXTERNAL VARIABLES REFERENCES
|
||||
; Declare variables used in this module but defined elsewhere
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; SIMPLE TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; ENUMERATED TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; STRUCTURES TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; GLOBAL FUNCTION DEFINITIONS
|
||||
; Function Prototype declaration
|
||||
----------------------------------------------------------------------------*/
|
||||
Word16 abs_s(Word16 var1);
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; END
|
||||
----------------------------------------------------------------------------*/
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* ABS_S_H */
|
||||
|
||||
|
||||
@@ -0,0 +1,98 @@
|
||||
/* ------------------------------------------------------------------
|
||||
* Copyright (C) 1998-2009 PacketVideo
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
||||
* express or implied.
|
||||
* See the License for the specific language governing permissions
|
||||
* and limitations under the License.
|
||||
* -------------------------------------------------------------------
|
||||
*/
|
||||
/****************************************************************************************
|
||||
Portions of this file are derived from the following 3GPP standard:
|
||||
|
||||
3GPP TS 26.073
|
||||
ANSI-C code for the Adaptive Multi-Rate (AMR) speech codec
|
||||
Available from http://www.3gpp.org
|
||||
|
||||
(C) 2004, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TTA, TTC)
|
||||
Permission to distribute, modify and use this file under the standard license
|
||||
terms listed above has been obtained from the copyright holder.
|
||||
****************************************************************************************/
|
||||
/*
|
||||
|
||||
Filename: add.h
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
INCLUDE DESCRIPTION
|
||||
|
||||
This file contains all the constant definitions and prototype definitions
|
||||
needed by the add function.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#ifndef ADD_H
|
||||
#define ADD_H
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; INCLUDES
|
||||
----------------------------------------------------------------------------*/
|
||||
#include "basicop_malloc.h"
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; MACROS
|
||||
; Define module specific macros here
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; DEFINES
|
||||
; Include all pre-processor statements here.
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; EXTERNAL VARIABLES REFERENCES
|
||||
; Declare variables used in this module but defined elsewhere
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; SIMPLE TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; ENUMERATED TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; STRUCTURES TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; GLOBAL FUNCTION DEFINITIONS
|
||||
; Function Prototype declaration
|
||||
----------------------------------------------------------------------------*/
|
||||
OSCL_IMPORT_REF Word16 add_16(Word16 var1, Word16 var2, Flag *pOverflow);
|
||||
OSCL_IMPORT_REF Word16 add(Word16 var1, Word16 var2, Flag *pOverflow);
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; END
|
||||
----------------------------------------------------------------------------*/
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _ADD_H_ */
|
||||
|
||||
@@ -0,0 +1,105 @@
|
||||
/* ------------------------------------------------------------------
|
||||
* Copyright (C) 1998-2009 PacketVideo
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
||||
* express or implied.
|
||||
* See the License for the specific language governing permissions
|
||||
* and limitations under the License.
|
||||
* -------------------------------------------------------------------
|
||||
*/
|
||||
/****************************************************************************************
|
||||
Portions of this file are derived from the following 3GPP standard:
|
||||
|
||||
3GPP TS 26.073
|
||||
ANSI-C code for the Adaptive Multi-Rate (AMR) speech codec
|
||||
Available from http://www.3gpp.org
|
||||
|
||||
(C) 2004, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TTA, TTC)
|
||||
Permission to distribute, modify and use this file under the standard license
|
||||
terms listed above has been obtained from the copyright holder.
|
||||
****************************************************************************************/
|
||||
/*
|
||||
|
||||
Filename: az_lsp.h
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
INCLUDE DESCRIPTION
|
||||
|
||||
This file contains all the constant definitions and prototype definitions
|
||||
needed by the function Az_lsp()
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#ifndef AZ_LSP_H
|
||||
#define AZ_LSP_H
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; INCLUDES
|
||||
----------------------------------------------------------------------------*/
|
||||
#include "typedef.h"
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; MACROS
|
||||
; Define module specific macros here
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; DEFINES
|
||||
; Include all pre-processor statements here.
|
||||
----------------------------------------------------------------------------*/
|
||||
#define grid_points 60
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; EXTERNAL VARIABLES REFERENCES
|
||||
; Declare variables used in this module but defined elsewhere
|
||||
----------------------------------------------------------------------------*/
|
||||
extern const Word16 grid[];
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; SIMPLE TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; ENUMERATED TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; STRUCTURES TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; GLOBAL FUNCTION DEFINITIONS
|
||||
; Function Prototype declaration
|
||||
----------------------------------------------------------------------------*/
|
||||
void Az_lsp(
|
||||
Word16 a[], /* (i) : predictor coefficients (MP1) */
|
||||
Word16 lsp[], /* (o) : line spectral pairs (M) */
|
||||
Word16 old_lsp[], /* (i) : old lsp[] (in case not found 10 roots) (M) */
|
||||
Flag *pOverflow /* (i/o): overflow flag */
|
||||
);
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; END
|
||||
----------------------------------------------------------------------------*/
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _AZ_LSP_H */
|
||||
|
||||
@@ -0,0 +1,426 @@
|
||||
/* ------------------------------------------------------------------
|
||||
* Copyright (C) 1998-2010 PacketVideo
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
||||
* express or implied.
|
||||
* See the License for the specific language governing permissions
|
||||
* and limitations under the License.
|
||||
* -------------------------------------------------------------------
|
||||
*/
|
||||
/****************************************************************************************
|
||||
Portions of this file are derived from the following 3GPP standard:
|
||||
|
||||
3GPP TS 26.073
|
||||
ANSI-C code for the Adaptive Multi-Rate (AMR) speech codec
|
||||
Available from http://www.3gpp.org
|
||||
|
||||
(C) 2004, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TTA, TTC)
|
||||
Permission to distribute, modify and use this file under the standard license
|
||||
terms listed above has been obtained from the copyright holder.
|
||||
****************************************************************************************/
|
||||
/*
|
||||
|
||||
Filename: basic_op.h
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
INCLUDE DESCRIPTION
|
||||
|
||||
This file includes all the basicop2.c functions' header files.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; CONTINUE ONLY IF NOT ALREADY DEFINED
|
||||
----------------------------------------------------------------------------*/
|
||||
#ifndef BASIC_OP_H
|
||||
#define BASIC_OP_H
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; INCLUDES
|
||||
----------------------------------------------------------------------------*/
|
||||
#include "basicop_malloc.h"
|
||||
|
||||
#if ((PV_CPU_ARCH_VERSION >=5) && (PV_COMPILER == EPV_ARM_GNUC))
|
||||
#include "basic_op_arm_gcc_v5.h"
|
||||
|
||||
#else
|
||||
#include "basic_op_c_equivalent.h"
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#include "add.h"
|
||||
#include "div_s.h"
|
||||
#include "l_shr_r.h"
|
||||
#include "mult_r.h"
|
||||
#include "norm_l.h"
|
||||
#include "norm_s.h"
|
||||
#include "round.h"
|
||||
#include "shr_r.h"
|
||||
#include "sub.h"
|
||||
#include "shr.h"
|
||||
#include "l_negate.h"
|
||||
#include "l_extract.h"
|
||||
#include "extract_l.h"
|
||||
#include "extract_h.h"
|
||||
#include "l_deposit_h.h"
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; MACROS
|
||||
; Define module specific macros here
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; DEFINES
|
||||
; Include all pre-processor statements here.
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; EXTERNAL VARIABLES REFERENCES
|
||||
; Declare variables used in this module but defined elsewhere
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; SIMPLE TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; ENUMERATED TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; STRUCTURES TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; GLOBAL FUNCTION DEFINITIONS
|
||||
; Function Prototype declaration
|
||||
----------------------------------------------------------------------------*/
|
||||
/*
|
||||
------------------------------------------------------------------------------
|
||||
FUNCTION NAME: mac_32
|
||||
------------------------------------------------------------------------------
|
||||
INPUT AND OUTPUT DEFINITIONS
|
||||
|
||||
Inputs:
|
||||
L_var3 = 32 bit long signed integer (Word32) whose value falls
|
||||
in the range : 0x8000 0000 <= L_var3 <= 0x7fff ffff.
|
||||
L_var1_hi = 16 bit short signed integer (Word16) whose value falls in
|
||||
the range : 0xffff 8000 <= var1 <= 0x0000 7fff.
|
||||
L_var1_lo = 16 bit short signed integer (Word16) whose value falls in
|
||||
the range : 0xffff 8000 <= var2 <= 0x0000 7fff.
|
||||
L_var2_hi = 16 bit short signed integer (Word16) whose value falls in
|
||||
the range : 0xffff 8000 <= var1 <= 0x0000 7fff.
|
||||
L_var2_lo = 16 bit short signed integer (Word16) whose value falls in
|
||||
the range : 0xffff 8000 <= var2 <= 0x0000 7fff.
|
||||
|
||||
pOverflow = pointer to overflow (Flag)
|
||||
|
||||
Outputs:
|
||||
pOverflow -> 1 if the 32 bit mac operation resulted in overflow
|
||||
|
||||
Returns:
|
||||
L_var3 = 32-bit result of L_var3 + (L_var1 * L_var2)(Word32)
|
||||
|
||||
*/
|
||||
static inline Word32 Mac_32(Word32 L_var3,
|
||||
Word16 L_var1_hi,
|
||||
Word16 L_var1_lo,
|
||||
Word16 L_var2_hi,
|
||||
Word16 L_var2_lo,
|
||||
Flag *pOverflow)
|
||||
{
|
||||
Word16 product;
|
||||
|
||||
L_var3 = L_mac(L_var3, L_var1_hi, L_var2_hi, pOverflow);
|
||||
|
||||
product = mult(L_var1_hi, L_var2_lo, pOverflow);
|
||||
L_var3 = L_mac(L_var3, product, 1, pOverflow);
|
||||
|
||||
product = mult(L_var1_lo, L_var2_hi, pOverflow);
|
||||
L_var3 = L_mac(L_var3, product, 1, pOverflow);
|
||||
|
||||
return (L_var3);
|
||||
}
|
||||
|
||||
/*
|
||||
------------------------------------------------------------------------------
|
||||
FUNCTION NAME: mac_32_16
|
||||
------------------------------------------------------------------------------
|
||||
INPUT AND OUTPUT DEFINITIONS
|
||||
|
||||
Inputs:
|
||||
L_var3 = 32 bit long signed integer (Word32) whose value falls
|
||||
in the range : 0x8000 0000 <= L_var3 <= 0x7fff ffff.
|
||||
L_var1_hi = 16 bit short signed integer (Word16) whose value falls in
|
||||
the range : 0xffff 8000 <= var1 <= 0x0000 7fff.
|
||||
L_var1_lo = 16 bit short signed integer (Word16) whose value falls in
|
||||
the range : 0xffff 8000 <= var2 <= 0x0000 7fff.
|
||||
var2= 16 bit short signed integer (Word16) whose value falls in
|
||||
the range : 0xffff 8000 <= var1 <= 0x0000 7fff.
|
||||
pOverflow = pointer to overflow (Flag)
|
||||
|
||||
Outputs:
|
||||
pOverflow -> 1 if the 32 bit mac operation resulted in overflow
|
||||
|
||||
Returns:
|
||||
L_var3 = 32-bit result of L_var3 + (L_var1 * var2)(Word32)
|
||||
*/
|
||||
|
||||
static inline Word32 Mac_32_16(Word32 L_var3,
|
||||
Word16 L_var1_hi,
|
||||
Word16 L_var1_lo,
|
||||
Word16 var2,
|
||||
Flag *pOverflow)
|
||||
{
|
||||
Word16 product;
|
||||
|
||||
L_var3 = L_mac(L_var3, L_var1_hi, var2, pOverflow);
|
||||
|
||||
product = mult(L_var1_lo, var2, pOverflow);
|
||||
L_var3 = L_mac(L_var3, product, 1, pOverflow);
|
||||
|
||||
return (L_var3);
|
||||
}
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
Function Name : negate
|
||||
|
||||
Negate var1 with saturation, saturate in the case where input is -32768:
|
||||
negate(var1) = sub(0,var1).
|
||||
|
||||
Inputs :
|
||||
var1
|
||||
16 bit short signed integer (Word16) whose value falls in the
|
||||
range : 0x8000 <= var1 <= 0x7fff.
|
||||
|
||||
Outputs :
|
||||
none
|
||||
|
||||
Return Value :
|
||||
16 bit short signed integer (Word16) whose value falls in the
|
||||
range : 0x8000 <= var_out <= 0x7fff.
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
static inline Word16 negate(Word16 var1)
|
||||
{
|
||||
return (((var1 == MIN_16) ? MAX_16 : -var1));
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
|
||||
Function Name : shl
|
||||
|
||||
Arithmetically shift the 16 bit input var1 left var2 positions.Zero fill
|
||||
the var2 LSB of the result. If var2 is negative, arithmetically shift
|
||||
var1 right by -var2 with sign extension. Saturate the result in case of
|
||||
underflows or overflows.
|
||||
|
||||
Inputs :
|
||||
var1
|
||||
16 bit short signed integer (Word16) whose value falls in the
|
||||
range : 0x8000 <= var1 <= 0x7fff.
|
||||
|
||||
var2
|
||||
16 bit short signed integer (Word16) whose value falls in the
|
||||
range : 0x8000 <= var1 <= 0x7fff.
|
||||
|
||||
pOverflow : pointer to overflow (Flag)
|
||||
|
||||
Return Value :
|
||||
var_out
|
||||
16 bit short signed integer (Word16) whose value falls in the
|
||||
range : 0x8000 <= var_out <= 0x7fff.
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
static inline Word16 shl(Word16 var1, Word16 var2, Flag *pOverflow)
|
||||
{
|
||||
Word16 var_out = 0;
|
||||
|
||||
OSCL_UNUSED_ARG(pOverflow);
|
||||
|
||||
if (var2 < 0)
|
||||
{
|
||||
var2 = -var2;
|
||||
if (var2 < 15)
|
||||
{
|
||||
var_out = var1 >> var2;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
var_out = var1 << var2;
|
||||
if (var_out >> var2 != var1)
|
||||
{
|
||||
var_out = (var1 >> 15) ^ MAX_16;
|
||||
}
|
||||
}
|
||||
return (var_out);
|
||||
}
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
|
||||
Function Name : L_shl
|
||||
|
||||
Arithmetically shift the 32 bit input L_var1 left var2 positions. Zero
|
||||
fill the var2 LSB of the result. If var2 is negative, arithmetically
|
||||
shift L_var1 right by -var2 with sign extension. Saturate the result in
|
||||
case of underflows or overflows.
|
||||
|
||||
Inputs :
|
||||
L_var1 32 bit long signed integer (Word32) whose value falls in the
|
||||
range : 0x8000 0000 <= L_var1 <= 0x7fff ffff.
|
||||
|
||||
var2
|
||||
16 bit short signed integer (Word16) whose value falls in the
|
||||
range : 8000 <= var2 <= 7fff.
|
||||
|
||||
pOverflow : pointer to overflow (Flag)
|
||||
|
||||
Return Value :
|
||||
32 bit long signed integer (Word32) whose value falls in the
|
||||
range : 0x8000 0000 <= L_var_out <= 0x7fff ffff.
|
||||
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
static inline Word32 L_shl(Word32 L_var1, Word16 var2, Flag *pOverflow)
|
||||
{
|
||||
Word32 L_var_out = 0;
|
||||
|
||||
OSCL_UNUSED_ARG(pOverflow);
|
||||
|
||||
if (var2 > 0)
|
||||
{
|
||||
L_var_out = L_var1 << var2;
|
||||
if (L_var_out >> var2 != L_var1)
|
||||
{
|
||||
L_var_out = (L_var1 >> 31) ^ MAX_32;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
var2 = -var2;
|
||||
if (var2 < 31)
|
||||
{
|
||||
L_var_out = L_var1 >> var2;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return (L_var_out);
|
||||
}
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
|
||||
Function Name : L_shr
|
||||
|
||||
Arithmetically shift the 32 bit input L_var1 right var2 positions with
|
||||
sign extension. If var2 is negative, arithmetically shift L_var1 left
|
||||
by -var2 and zero fill the -var2 LSB of the result. Saturate the result
|
||||
in case of underflows or overflows.
|
||||
|
||||
Inputs :
|
||||
L_var1 32 bit long signed integer (Word32) whose value falls in the
|
||||
range : 0x8000 0000 <= L_var1 <= 0x7fff ffff.
|
||||
|
||||
var2
|
||||
16 bit short signed integer (Word16) whose value falls in the
|
||||
range : 8000 <= var2 <= 7fff.
|
||||
|
||||
pOverflow : pointer to overflow (Flag)
|
||||
|
||||
Return Value :
|
||||
32 bit long signed integer (Word32) whose value falls in the
|
||||
range : 0x8000 0000 <= L_var_out <= 0x7fff ffff.
|
||||
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
static inline Word32 L_shr(Word32 L_var1, Word16 var2, Flag *pOverflow)
|
||||
{
|
||||
Word32 L_var_out = 0;
|
||||
|
||||
OSCL_UNUSED_ARG(pOverflow);
|
||||
|
||||
if (var2 > 0)
|
||||
{
|
||||
if (var2 < 31)
|
||||
{
|
||||
L_var_out = L_var1 >> var2;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
var2 = -var2;
|
||||
|
||||
L_var_out = L_var1 << (var2) ;
|
||||
if ((L_var_out >> (var2)) != L_var1)
|
||||
{
|
||||
L_var_out = (L_var1 >> 31) ^ MAX_32;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return (L_var_out);
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
|
||||
Function Name : abs_s
|
||||
|
||||
Absolute value of var1; abs_s(-32768) = 32767.
|
||||
|
||||
Inputs :
|
||||
var1
|
||||
16 bit short signed integer (Word16) whose value falls in the
|
||||
range : 0x8000 <= var1 <= 0x7fff.
|
||||
|
||||
pOverflow : pointer to overflow (Flag)
|
||||
|
||||
Outputs :
|
||||
none
|
||||
|
||||
Return Value :
|
||||
16 bit short signed integer (Word16) whose value falls in the
|
||||
range : 0x0000 <= var_out <= 0x7fff.
|
||||
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
static inline Word16 abs_s(Word16 var1)
|
||||
{
|
||||
|
||||
Word16 y = var1 - (var1 < 0);
|
||||
y = y ^(y >> 15);
|
||||
return (y);
|
||||
|
||||
}
|
||||
/*----------------------------------------------------------------------------
|
||||
; END
|
||||
----------------------------------------------------------------------------*/
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* BASIC_OP_H */
|
||||
|
||||
|
||||
@@ -0,0 +1,537 @@
|
||||
/* ------------------------------------------------------------------
|
||||
* Copyright (C) 1998-2009 PacketVideo
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
||||
* express or implied.
|
||||
* See the License for the specific language governing permissions
|
||||
* and limitations under the License.
|
||||
* -------------------------------------------------------------------
|
||||
*/
|
||||
/****************************************************************************************
|
||||
Portions of this file are derived from the following 3GPP standard:
|
||||
|
||||
3GPP TS 26.073
|
||||
ANSI-C code for the Adaptive Multi-Rate (AMR) speech codec
|
||||
Available from http://www.3gpp.org
|
||||
|
||||
(C) 2004, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TTA, TTC)
|
||||
Permission to distribute, modify and use this file under the standard license
|
||||
terms listed above has been obtained from the copyright holder.
|
||||
****************************************************************************************/
|
||||
/*
|
||||
|
||||
Filename: basic_op_arm_gcc_v5.h
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
INCLUDE DESCRIPTION
|
||||
|
||||
This file includes all the GCC-ARM V5 basicop.c functions.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; CONTINUE ONLY IF NOT ALREADY DEFINED
|
||||
----------------------------------------------------------------------------*/
|
||||
#ifndef BASIC_OP_ARM_GCC_V5_H
|
||||
#define BASIC_OP_ARM_GCC_V5_H
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; INCLUDES
|
||||
----------------------------------------------------------------------------*/
|
||||
#include "basicop_malloc.h"
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; MACROS
|
||||
; Define module specific macros here
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; DEFINES
|
||||
; Include all pre-processor statements here.
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; EXTERNAL VARIABLES REFERENCES
|
||||
; Declare variables used in this module but defined elsewhere
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; SIMPLE TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; ENUMERATED TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; STRUCTURES TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; GLOBAL FUNCTION DEFINITIONS
|
||||
; Function Prototype declaration
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
|
||||
/*
|
||||
------------------------------------------------------------------------------
|
||||
FUNCTION NAME: L_add
|
||||
------------------------------------------------------------------------------
|
||||
INPUT AND OUTPUT DEFINITIONS
|
||||
|
||||
Inputs:
|
||||
L_var1 = 32 bit long signed integer (Word32) whose value falls
|
||||
in the range : 0x8000 0000 <= L_var1 <= 0x7fff ffff.
|
||||
|
||||
L_var2 = 32 bit long signed integer (Word32) whose value falls
|
||||
in the range : 0x8000 0000 <= L_var1 <= 0x7fff ffff.
|
||||
|
||||
pOverflow = pointer to overflow (Flag)
|
||||
|
||||
Outputs:
|
||||
pOverflow -> 1 if the 32 bit add operation resulted in overflow
|
||||
|
||||
Returns:
|
||||
L_sum = 32-bit sum of L_var1 and L_var2 (Word32)
|
||||
*/
|
||||
|
||||
static inline Word32 L_add(register Word32 L_var1, register Word32 L_var2, Flag *pOverflow)
|
||||
{
|
||||
register Word32 ra = L_var1;
|
||||
register Word32 rb = L_var2;
|
||||
Word32 result;
|
||||
|
||||
OSCL_UNUSED_ARG(pOverflow);
|
||||
|
||||
__asm__ volatile("qadd %0, %1, %2"
|
||||
: "=r"(result)
|
||||
: "r"(ra), "r"(rb)
|
||||
);
|
||||
return (result);
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
------------------------------------------------------------------------------
|
||||
FUNCTION NAME: L_sub
|
||||
------------------------------------------------------------------------------
|
||||
INPUT AND OUTPUT DEFINITIONS
|
||||
|
||||
Inputs:
|
||||
L_var1 = 32 bit long signed integer (Word32) whose value falls
|
||||
in the range : 0x8000 0000 <= L_var1 <= 0x7fff ffff.
|
||||
|
||||
L_var2 = 32 bit long signed integer (Word32) whose value falls
|
||||
in the range : 0x8000 0000 <= L_var1 <= 0x7fff ffff.
|
||||
|
||||
pOverflow = pointer to overflow (Flag)
|
||||
|
||||
Outputs:
|
||||
pOverflow -> 1 if the 32 bit add operation resulted in overflow
|
||||
|
||||
Returns:
|
||||
L_diff = 32-bit difference of L_var1 and L_var2 (Word32)
|
||||
*/
|
||||
static inline Word32 L_sub(Word32 L_var1, Word32 L_var2, Flag *pOverflow)
|
||||
{
|
||||
register Word32 ra = L_var1;
|
||||
register Word32 rb = L_var2;
|
||||
Word32 result;
|
||||
|
||||
OSCL_UNUSED_ARG(pOverflow);
|
||||
|
||||
__asm__ volatile("qsub %0, %1, %2"
|
||||
: "=r"(result)
|
||||
: "r"(ra), "r"(rb)
|
||||
);
|
||||
|
||||
return (result);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
------------------------------------------------------------------------------
|
||||
FUNCTION NAME: L_mac
|
||||
------------------------------------------------------------------------------
|
||||
INPUT AND OUTPUT DEFINITIONS
|
||||
|
||||
Inputs:
|
||||
L_var3 = 32 bit long signed integer (Word32) whose value falls
|
||||
in the range : 0x8000 0000 <= L_var3 <= 0x7fff ffff.
|
||||
var1 = 16 bit short signed integer (Word16) whose value falls in
|
||||
the range : 0xffff 8000 <= var1 <= 0x0000 7fff.
|
||||
var2 = 16 bit short signed integer (Word16) whose value falls in
|
||||
the range : 0xffff 8000 <= var2 <= 0x0000 7fff.
|
||||
|
||||
pOverflow = pointer to overflow (Flag)
|
||||
|
||||
Outputs:
|
||||
pOverflow -> 1 if the 32 bit add operation resulted in overflow
|
||||
|
||||
Returns:
|
||||
result = 32-bit result of L_var3 + (var1 * var2)(Word32)
|
||||
*/
|
||||
static inline Word32 L_mac(Word32 L_var3, Word16 var1, Word16 var2, Flag *pOverflow)
|
||||
{
|
||||
register Word32 ra = L_var3;
|
||||
register Word32 rb = var1;
|
||||
register Word32 rc = var2;
|
||||
Word32 result;
|
||||
|
||||
OSCL_UNUSED_ARG(pOverflow);
|
||||
|
||||
__asm__ volatile("smulbb %0, %1, %2"
|
||||
: "=r"(result)
|
||||
: "r"(rb), "r"(rc)
|
||||
);
|
||||
|
||||
__asm__ volatile("qdadd %0, %1, %2"
|
||||
: "=r"(rc)
|
||||
: "r"(ra), "r"(result)
|
||||
);
|
||||
|
||||
return (rc);
|
||||
}
|
||||
|
||||
/*
|
||||
------------------------------------------------------------------------------
|
||||
FUNCTION NAME: L_mult
|
||||
------------------------------------------------------------------------------
|
||||
INPUT AND OUTPUT DEFINITIONS
|
||||
|
||||
Inputs:
|
||||
L_var1 = 16 bit short signed integer (Word16) whose value falls in
|
||||
the range : 0xffff 8000 <= var1 <= 0x0000 7fff.
|
||||
|
||||
L_var2 = 16 bit short signed integer (Word16) whose value falls in
|
||||
the range : 0xffff 8000 <= var1 <= 0x0000 7fff.
|
||||
|
||||
pOverflow = pointer to overflow (Flag)
|
||||
|
||||
Outputs:
|
||||
pOverflow -> 1 if the 32 bit add operation resulted in overflow
|
||||
|
||||
Returns:
|
||||
L_product = 32-bit product of L_var1 and L_var2 (Word32)
|
||||
*/
|
||||
|
||||
static inline Word32 L_mult(Word16 var1, Word16 var2, Flag *pOverflow)
|
||||
{
|
||||
register Word32 ra = var1;
|
||||
register Word32 rb = var2;
|
||||
Word32 result;
|
||||
Word32 product;
|
||||
|
||||
OSCL_UNUSED_ARG(pOverflow);
|
||||
|
||||
__asm__ volatile("smulbb %0, %1, %2"
|
||||
: "=r"(product)
|
||||
: "r"(ra), "r"(rb)
|
||||
);
|
||||
|
||||
__asm__ volatile("qadd %0, %1, %2"
|
||||
: "=r"(result)
|
||||
: "r"(product), "r"(product)
|
||||
);
|
||||
|
||||
return(result);
|
||||
}
|
||||
|
||||
/*
|
||||
------------------------------------------------------------------------------
|
||||
FUNCTION NAME: L_msu
|
||||
------------------------------------------------------------------------------
|
||||
INPUT AND OUTPUT DEFINITIONS
|
||||
|
||||
Inputs:
|
||||
L_var3 = 32 bit long signed integer (Word32) whose value falls
|
||||
in the range : 0x8000 0000 <= L_var3 <= 0x7fff ffff.
|
||||
|
||||
var1 = 16 bit short signed integer (Word16) whose value falls in
|
||||
the range : 0xffff 8000 <= var1 <= 0x0000 7fff.
|
||||
var2 = 16 bit short signed integer (Word16) whose value falls in
|
||||
the range : 0xffff 8000 <= var2 <= 0x0000 7fff.
|
||||
|
||||
pOverflow = pointer to overflow (Flag)
|
||||
|
||||
Outputs:
|
||||
pOverflow -> 1 if the 32 bit operation resulted in overflow
|
||||
|
||||
Returns:
|
||||
result = 32-bit result of L_var3 - (var1 * var2)
|
||||
*/
|
||||
static inline Word32 L_msu(Word32 L_var3, Word16 var1, Word16 var2, Flag *pOverflow)
|
||||
{
|
||||
register Word32 ra = L_var3;
|
||||
register Word32 rb = var1;
|
||||
register Word32 rc = var2;
|
||||
Word32 product;
|
||||
Word32 result;
|
||||
|
||||
OSCL_UNUSED_ARG(pOverflow);
|
||||
|
||||
__asm__ volatile("smulbb %0, %1, %2"
|
||||
: "=r"(product)
|
||||
: "r"(rb), "r"(rc)
|
||||
);
|
||||
|
||||
__asm__ volatile("qdsub %0, %1, %2"
|
||||
: "=r"(result)
|
||||
: "r"(ra), "r"(product)
|
||||
);
|
||||
|
||||
return (result);
|
||||
}
|
||||
|
||||
/*
|
||||
------------------------------------------------------------------------------
|
||||
FUNCTION NAME: Mpy_32
|
||||
------------------------------------------------------------------------------
|
||||
INPUT AND OUTPUT DEFINITIONS
|
||||
|
||||
Inputs:
|
||||
L_var1_hi = most significant word of first input (Word16).
|
||||
L_var1_lo = least significant word of first input (Word16).
|
||||
L_var2_hi = most significant word of second input (Word16).
|
||||
L_var2_lo = least significant word of second input (Word16).
|
||||
|
||||
pOverflow = pointer to overflow (Flag)
|
||||
|
||||
Outputs:
|
||||
pOverflow -> 1 if the 32 bit multiply operation resulted in overflow
|
||||
|
||||
Returns:
|
||||
L_product = 32-bit product of L_var1 and L_var2 (Word32)
|
||||
*/
|
||||
static inline Word32 Mpy_32(Word16 L_var1_hi,
|
||||
Word16 L_var1_lo,
|
||||
Word16 L_var2_hi,
|
||||
Word16 L_var2_lo,
|
||||
Flag *pOverflow)
|
||||
{
|
||||
register Word32 product32;
|
||||
register Word32 L_sum;
|
||||
register Word32 L_product, result;
|
||||
register Word32 ra = L_var1_hi;
|
||||
register Word32 rb = L_var1_lo;
|
||||
register Word32 rc = L_var2_hi;
|
||||
register Word32 rd = L_var2_lo;
|
||||
|
||||
|
||||
|
||||
OSCL_UNUSED_ARG(pOverflow);
|
||||
|
||||
__asm__ volatile("smulbb %0, %1, %2"
|
||||
: "=r"(L_product)
|
||||
: "r"(ra), "r"(rc)
|
||||
);
|
||||
__asm__ volatile("mov %0, #0"
|
||||
: "=r"(result)
|
||||
);
|
||||
|
||||
__asm__ volatile("qdadd %0, %1, %2"
|
||||
: "=r"(L_sum)
|
||||
: "r"(result), "r"(L_product)
|
||||
);
|
||||
|
||||
__asm__ volatile("smulbb %0, %1, %2"
|
||||
: "=r"(product32)
|
||||
: "r"(ra), "r"(rd)
|
||||
);
|
||||
|
||||
__asm__ volatile("mov %0, %1, ASR #15"
|
||||
: "=r"(ra)
|
||||
: "r"(product32)
|
||||
);
|
||||
__asm__ volatile("qdadd %0, %1, %2"
|
||||
: "=r"(L_product)
|
||||
: "r"(L_sum), "r"(ra)
|
||||
);
|
||||
|
||||
__asm__ volatile("smulbb %0, %1, %2"
|
||||
: "=r"(product32)
|
||||
: "r"(rb), "r"(rc)
|
||||
);
|
||||
|
||||
__asm__ volatile("mov %0, %1, ASR #15"
|
||||
: "=r"(rb)
|
||||
: "r"(product32)
|
||||
);
|
||||
|
||||
__asm__ volatile("qdadd %0, %1, %2"
|
||||
: "=r"(L_sum)
|
||||
: "r"(L_product), "r"(rb)
|
||||
);
|
||||
|
||||
return (L_sum);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
------------------------------------------------------------------------------
|
||||
FUNCTION NAME: Mpy_32_16
|
||||
------------------------------------------------------------------------------
|
||||
INPUT AND OUTPUT DEFINITIONS
|
||||
|
||||
Inputs:
|
||||
L_var1_hi = most significant 16 bits of 32-bit input (Word16).
|
||||
L_var1_lo = least significant 16 bits of 32-bit input (Word16).
|
||||
var2 = 16-bit signed integer (Word16).
|
||||
|
||||
pOverflow = pointer to overflow (Flag)
|
||||
|
||||
Outputs:
|
||||
pOverflow -> 1 if the 32 bit product operation resulted in overflow
|
||||
|
||||
Returns:
|
||||
product = 32-bit product of the 32-bit L_var1 and 16-bit var1 (Word32)
|
||||
*/
|
||||
static inline Word32 Mpy_32_16(Word16 L_var1_hi,
|
||||
Word16 L_var1_lo,
|
||||
Word16 var2,
|
||||
Flag *pOverflow)
|
||||
{
|
||||
|
||||
register Word32 ra = L_var1_hi;
|
||||
register Word32 rb = L_var1_lo;
|
||||
register Word32 rc = var2;
|
||||
Word32 result, L_product;
|
||||
|
||||
OSCL_UNUSED_ARG(pOverflow);
|
||||
|
||||
__asm__ volatile("smulbb %0, %1, %2"
|
||||
: "=r"(L_product)
|
||||
: "r"(ra), "r"(rc)
|
||||
);
|
||||
__asm__ volatile("mov %0, #0"
|
||||
: "=r"(result)
|
||||
);
|
||||
|
||||
__asm__ volatile("qdadd %0, %1, %2"
|
||||
: "=r"(L_product)
|
||||
: "r"(result), "r"(L_product)
|
||||
);
|
||||
|
||||
__asm__ volatile("smulbb %0, %1, %2"
|
||||
: "=r"(result)
|
||||
: "r"(rb), "r"(rc)
|
||||
);
|
||||
|
||||
__asm__ volatile("mov %0, %1, ASR #15"
|
||||
: "=r"(ra)
|
||||
: "r"(result)
|
||||
);
|
||||
__asm__ volatile("qdadd %0, %1, %2"
|
||||
: "=r"(result)
|
||||
: "r"(L_product), "r"(ra)
|
||||
);
|
||||
|
||||
return (result);
|
||||
}
|
||||
|
||||
/*
|
||||
------------------------------------------------------------------------------
|
||||
FUNCTION NAME: mult
|
||||
------------------------------------------------------------------------------
|
||||
INPUT AND OUTPUT DEFINITIONS
|
||||
|
||||
Inputs:
|
||||
var1 = 16 bit short signed integer (Word16) whose value falls in
|
||||
the range : 0xffff 8000 <= var1 <= 0x0000 7fff.
|
||||
|
||||
var2 = 16 bit short signed integer (Word16) whose value falls in
|
||||
the range : 0xffff 8000 <= var2 <= 0x0000 7fff.
|
||||
|
||||
pOverflow = pointer to overflow (Flag)
|
||||
|
||||
Outputs:
|
||||
pOverflow -> 1 if the add operation resulted in overflow
|
||||
|
||||
Returns:
|
||||
product = 16-bit limited product of var1 and var2 (Word16)
|
||||
*/
|
||||
static inline Word16 mult(Word16 var1, Word16 var2, Flag *pOverflow)
|
||||
{
|
||||
register Word32 ra = var1;
|
||||
register Word32 rb = var2;
|
||||
Word32 product;
|
||||
Word32 temp;
|
||||
|
||||
OSCL_UNUSED_ARG(pOverflow);
|
||||
|
||||
__asm__ volatile(
|
||||
"smulbb %0, %1, %2"
|
||||
: "=r"(temp)
|
||||
: "r"(ra), "r"(rb)
|
||||
);
|
||||
__asm__ volatile(
|
||||
"qadd %0, %1, %2\n\t"
|
||||
"mov %0, %0, asr #16"
|
||||
: "=&r*i"(product)
|
||||
: "r"(temp), "r"(temp)
|
||||
);
|
||||
|
||||
return ((Word16) product);
|
||||
}
|
||||
|
||||
static inline Word32 amrnb_fxp_mac_16_by_16bb(Word32 L_var1, Word32 L_var2, Word32 L_var3)
|
||||
{
|
||||
register Word32 ra = L_var1;
|
||||
register Word32 rb = L_var2;
|
||||
register Word32 rc = L_var3;
|
||||
Word32 result;
|
||||
|
||||
__asm__ volatile("smlabb %0, %1, %2, %3"
|
||||
: "=r"(result)
|
||||
: "r"(ra), "r"(rb), "r"(rc)
|
||||
);
|
||||
return (result);
|
||||
}
|
||||
|
||||
static inline Word32 amrnb_fxp_msu_16_by_16bb(Word32 L_var1, Word32 L_var2, Word32 L_var3)
|
||||
{
|
||||
register Word32 ra = L_var1;
|
||||
register Word32 rb = L_var2;
|
||||
register Word32 rc = L_var3;
|
||||
Word32 result;
|
||||
|
||||
__asm__ volatile("rsb %0, %1, #0"
|
||||
: "=r"(ra)
|
||||
: "r"(ra)
|
||||
);
|
||||
|
||||
__asm__ volatile("smlabb %0, %1, %2, %3"
|
||||
: "=r"(result)
|
||||
: "r"(ra), "r"(rb), "r"(rc)
|
||||
);
|
||||
return (result);
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; END
|
||||
----------------------------------------------------------------------------*/
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* BASIC_OP_ARM_GCC_V5_H */
|
||||
|
||||
|
||||
@@ -0,0 +1,499 @@
|
||||
/* ------------------------------------------------------------------
|
||||
* Copyright (C) 1998-2009 PacketVideo
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
||||
* express or implied.
|
||||
* See the License for the specific language governing permissions
|
||||
* and limitations under the License.
|
||||
* -------------------------------------------------------------------
|
||||
*/
|
||||
/****************************************************************************************
|
||||
Portions of this file are derived from the following 3GPP standard:
|
||||
|
||||
3GPP TS 26.073
|
||||
ANSI-C code for the Adaptive Multi-Rate (AMR) speech codec
|
||||
Available from http://www.3gpp.org
|
||||
|
||||
(C) 2004, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TTA, TTC)
|
||||
Permission to distribute, modify and use this file under the standard license
|
||||
terms listed above has been obtained from the copyright holder.
|
||||
****************************************************************************************/
|
||||
/*
|
||||
|
||||
Filename: basic_op_c_equivalent.h
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
INCLUDE DESCRIPTION
|
||||
|
||||
This file includes all the C-Equivalent basicop.c functions.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; CONTINUE ONLY IF NOT ALREADY DEFINED
|
||||
----------------------------------------------------------------------------*/
|
||||
#ifndef BASIC_OP_C_EQUIVALENT_H
|
||||
#define BASIC_OP_C_EQUIVALENT_H
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; INCLUDES
|
||||
----------------------------------------------------------------------------*/
|
||||
#include "basicop_malloc.h"
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; MACROS
|
||||
; Define module specific macros here
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; DEFINES
|
||||
; Include all pre-processor statements here.
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; EXTERNAL VARIABLES REFERENCES
|
||||
; Declare variables used in this module but defined elsewhere
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; SIMPLE TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; ENUMERATED TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; STRUCTURES TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; GLOBAL FUNCTION DEFINITIONS
|
||||
; Function Prototype declaration
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
/*
|
||||
------------------------------------------------------------------------------
|
||||
FUNCTION NAME: L_add
|
||||
------------------------------------------------------------------------------
|
||||
INPUT AND OUTPUT DEFINITIONS
|
||||
|
||||
Inputs:
|
||||
L_var1 = 32 bit long signed integer (Word32) whose value falls
|
||||
in the range : 0x8000 0000 <= L_var1 <= 0x7fff ffff.
|
||||
|
||||
L_var2 = 32 bit long signed integer (Word32) whose value falls
|
||||
in the range : 0x8000 0000 <= L_var1 <= 0x7fff ffff.
|
||||
|
||||
pOverflow = pointer to overflow (Flag)
|
||||
|
||||
Outputs:
|
||||
pOverflow -> 1 if the 32 bit add operation resulted in overflow
|
||||
|
||||
Returns:
|
||||
L_sum = 32-bit sum of L_var1 and L_var2 (Word32)
|
||||
*/
|
||||
static inline Word32 L_add(register Word32 L_var1, register Word32 L_var2, Flag *pOverflow)
|
||||
{
|
||||
Word32 L_sum;
|
||||
|
||||
L_sum = L_var1 + L_var2;
|
||||
|
||||
if ((L_var1 ^ L_var2) >= 0)
|
||||
{
|
||||
if ((L_sum ^ L_var1) >> 31)
|
||||
{
|
||||
L_sum = (L_var1 >> 31) ? MIN_32 : MAX_32;
|
||||
*pOverflow = 1;
|
||||
}
|
||||
}
|
||||
|
||||
return (L_sum);
|
||||
}
|
||||
|
||||
/*
|
||||
------------------------------------------------------------------------------
|
||||
FUNCTION NAME: L_sub
|
||||
------------------------------------------------------------------------------
|
||||
INPUT AND OUTPUT DEFINITIONS
|
||||
|
||||
Inputs:
|
||||
L_var1 = 32 bit long signed integer (Word32) whose value falls
|
||||
in the range : 0x8000 0000 <= L_var1 <= 0x7fff ffff.
|
||||
|
||||
L_var2 = 32 bit long signed integer (Word32) whose value falls
|
||||
in the range : 0x8000 0000 <= L_var1 <= 0x7fff ffff.
|
||||
|
||||
pOverflow = pointer to overflow (Flag)
|
||||
|
||||
Outputs:
|
||||
pOverflow -> 1 if the 32 bit add operation resulted in overflow
|
||||
|
||||
Returns:
|
||||
L_diff = 32-bit difference of L_var1 and L_var2 (Word32)
|
||||
*/
|
||||
static inline Word32 L_sub(register Word32 L_var1, register Word32 L_var2,
|
||||
register Flag *pOverflow)
|
||||
{
|
||||
Word32 L_diff;
|
||||
|
||||
L_diff = L_var1 - L_var2;
|
||||
|
||||
if ((L_var1 ^ L_var2) >> 31)
|
||||
{
|
||||
if ((L_diff ^ L_var1) & MIN_32)
|
||||
{
|
||||
L_diff = (L_var1 >> 31) ? MIN_32 : MAX_32;
|
||||
*pOverflow = 1;
|
||||
}
|
||||
}
|
||||
|
||||
return (L_diff);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
------------------------------------------------------------------------------
|
||||
FUNCTION NAME: L_mac
|
||||
------------------------------------------------------------------------------
|
||||
INPUT AND OUTPUT DEFINITIONS
|
||||
|
||||
Inputs:
|
||||
L_var3 = 32 bit long signed integer (Word32) whose value falls
|
||||
in the range : 0x8000 0000 <= L_var3 <= 0x7fff ffff.
|
||||
var1 = 16 bit short signed integer (Word16) whose value falls in
|
||||
the range : 0xffff 8000 <= var1 <= 0x0000 7fff.
|
||||
var2 = 16 bit short signed integer (Word16) whose value falls in
|
||||
the range : 0xffff 8000 <= var2 <= 0x0000 7fff.
|
||||
|
||||
pOverflow = pointer to overflow (Flag)
|
||||
|
||||
Outputs:
|
||||
pOverflow -> 1 if the 32 bit add operation resulted in overflow
|
||||
|
||||
Returns:
|
||||
result = 32-bit result of L_var3 + (var1 * var2)(Word32)
|
||||
*/
|
||||
static inline Word32 L_mac(Word32 L_var3, Word16 var1, Word16 var2, Flag *pOverflow)
|
||||
{
|
||||
Word32 result;
|
||||
Word32 L_sum;
|
||||
result = (Word32) var1 * var2;
|
||||
if (result != (Word32) 0x40000000L)
|
||||
{
|
||||
L_sum = (result << 1) + L_var3;
|
||||
|
||||
/* Check if L_sum and L_var_3 share the same sign */
|
||||
if ((L_var3 ^ result) > 0)
|
||||
{
|
||||
if ((L_sum ^ L_var3) >> 31)
|
||||
{
|
||||
L_sum = (L_var3 >> 31) ? MIN_32 : MAX_32;
|
||||
*pOverflow = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
*pOverflow = 1;
|
||||
L_sum = MAX_32;
|
||||
}
|
||||
return (L_sum);
|
||||
}
|
||||
|
||||
/*
|
||||
------------------------------------------------------------------------------
|
||||
FUNCTION NAME: L_mult
|
||||
------------------------------------------------------------------------------
|
||||
INPUT AND OUTPUT DEFINITIONS
|
||||
|
||||
Inputs:
|
||||
L_var1 = 16 bit short signed integer (Word16) whose value falls in
|
||||
the range : 0xffff 8000 <= var1 <= 0x0000 7fff.
|
||||
|
||||
L_var2 = 16 bit short signed integer (Word16) whose value falls in
|
||||
the range : 0xffff 8000 <= var1 <= 0x0000 7fff.
|
||||
|
||||
pOverflow = pointer to overflow (Flag)
|
||||
|
||||
Outputs:
|
||||
pOverflow -> 1 if the 32 bit add operation resulted in overflow
|
||||
|
||||
Returns:
|
||||
L_product = 32-bit product of L_var1 and L_var2 (Word32)
|
||||
*/
|
||||
static inline Word32 L_mult(Word16 var1, Word16 var2, Flag *pOverflow)
|
||||
{
|
||||
register Word32 L_product;
|
||||
|
||||
L_product = (Word32) var1 * var2;
|
||||
|
||||
if (L_product != (Word32) 0x40000000L)
|
||||
{
|
||||
L_product <<= 1; /* Multiply by 2 */
|
||||
}
|
||||
else
|
||||
{
|
||||
*pOverflow = 1;
|
||||
L_product = MAX_32;
|
||||
}
|
||||
|
||||
return (L_product);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
------------------------------------------------------------------------------
|
||||
FUNCTION NAME: L_msu
|
||||
------------------------------------------------------------------------------
|
||||
INPUT AND OUTPUT DEFINITIONS
|
||||
|
||||
Inputs:
|
||||
L_var3 = 32 bit long signed integer (Word32) whose value falls
|
||||
in the range : 0x8000 0000 <= L_var3 <= 0x7fff ffff.
|
||||
|
||||
var1 = 16 bit short signed integer (Word16) whose value falls in
|
||||
the range : 0xffff 8000 <= var1 <= 0x0000 7fff.
|
||||
var2 = 16 bit short signed integer (Word16) whose value falls in
|
||||
the range : 0xffff 8000 <= var2 <= 0x0000 7fff.
|
||||
|
||||
pOverflow = pointer to overflow (Flag)
|
||||
|
||||
Outputs:
|
||||
pOverflow -> 1 if the 32 bit operation resulted in overflow
|
||||
|
||||
Returns:
|
||||
result = 32-bit result of L_var3 - (var1 * var2)
|
||||
*/
|
||||
|
||||
static inline Word32 L_msu(Word32 L_var3, Word16 var1, Word16 var2, Flag *pOverflow)
|
||||
{
|
||||
Word32 result;
|
||||
|
||||
result = L_mult(var1, var2, pOverflow);
|
||||
result = L_sub(L_var3, result, pOverflow);
|
||||
|
||||
return (result);
|
||||
}
|
||||
|
||||
/*
|
||||
------------------------------------------------------------------------------
|
||||
FUNCTION NAME: Mpy_32
|
||||
------------------------------------------------------------------------------
|
||||
INPUT AND OUTPUT DEFINITIONS
|
||||
|
||||
Inputs:
|
||||
L_var1_hi = most significant word of first input (Word16).
|
||||
L_var1_lo = least significant word of first input (Word16).
|
||||
L_var2_hi = most significant word of second input (Word16).
|
||||
L_var2_lo = least significant word of second input (Word16).
|
||||
|
||||
pOverflow = pointer to overflow (Flag)
|
||||
|
||||
Outputs:
|
||||
pOverflow -> 1 if the 32 bit multiply operation resulted in overflow
|
||||
|
||||
Returns:
|
||||
L_product = 32-bit product of L_var1 and L_var2 (Word32)
|
||||
*/
|
||||
static inline Word32 Mpy_32(Word16 L_var1_hi,
|
||||
Word16 L_var1_lo,
|
||||
Word16 L_var2_hi,
|
||||
Word16 L_var2_lo,
|
||||
Flag *pOverflow)
|
||||
{
|
||||
Word32 L_product;
|
||||
Word32 L_sum;
|
||||
Word32 product32;
|
||||
|
||||
OSCL_UNUSED_ARG(pOverflow);
|
||||
L_product = (Word32) L_var1_hi * L_var2_hi;
|
||||
|
||||
if (L_product != (Word32) 0x40000000L)
|
||||
{
|
||||
L_product <<= 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
L_product = MAX_32;
|
||||
}
|
||||
|
||||
/* result = mult (L_var1_hi, L_var2_lo, pOverflow); */
|
||||
product32 = ((Word32) L_var1_hi * L_var2_lo) >> 15;
|
||||
|
||||
/* L_product = L_mac (L_product, result, 1, pOverflow); */
|
||||
L_sum = L_product + (product32 << 1);
|
||||
|
||||
if ((L_product ^ product32) > 0)
|
||||
{
|
||||
if ((L_sum ^ L_product) >> 31)
|
||||
{
|
||||
L_sum = (L_product >> 31) ? MIN_32 : MAX_32;
|
||||
}
|
||||
}
|
||||
|
||||
L_product = L_sum;
|
||||
|
||||
/* result = mult (L_var1_lo, L_var2_hi, pOverflow); */
|
||||
product32 = ((Word32) L_var1_lo * L_var2_hi) >> 15;
|
||||
|
||||
/* L_product = L_mac (L_product, result, 1, pOverflow); */
|
||||
L_sum = L_product + (product32 << 1);
|
||||
|
||||
if ((L_product ^ product32) > 0)
|
||||
{
|
||||
if ((L_sum ^ L_product) >> 31)
|
||||
{
|
||||
L_sum = (L_product >> 31) ? MIN_32 : MAX_32;
|
||||
}
|
||||
}
|
||||
return (L_sum);
|
||||
}
|
||||
|
||||
/*
|
||||
------------------------------------------------------------------------------
|
||||
FUNCTION NAME: Mpy_32_16
|
||||
------------------------------------------------------------------------------
|
||||
INPUT AND OUTPUT DEFINITIONS
|
||||
|
||||
Inputs:
|
||||
L_var1_hi = most significant 16 bits of 32-bit input (Word16).
|
||||
L_var1_lo = least significant 16 bits of 32-bit input (Word16).
|
||||
var2 = 16-bit signed integer (Word16).
|
||||
|
||||
pOverflow = pointer to overflow (Flag)
|
||||
|
||||
Outputs:
|
||||
pOverflow -> 1 if the 32 bit product operation resulted in overflow
|
||||
|
||||
Returns:
|
||||
product = 32-bit product of the 32-bit L_var1 and 16-bit var1 (Word32)
|
||||
*/
|
||||
|
||||
static inline Word32 Mpy_32_16(Word16 L_var1_hi,
|
||||
Word16 L_var1_lo,
|
||||
Word16 var2,
|
||||
Flag *pOverflow)
|
||||
{
|
||||
|
||||
Word32 L_product;
|
||||
Word32 L_sum;
|
||||
Word32 result;
|
||||
L_product = (Word32) L_var1_hi * var2;
|
||||
|
||||
if (L_product != (Word32) 0x40000000L)
|
||||
{
|
||||
L_product <<= 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
*pOverflow = 1;
|
||||
L_product = MAX_32;
|
||||
}
|
||||
|
||||
result = ((Word32)L_var1_lo * var2) >> 15;
|
||||
|
||||
L_sum = L_product + (result << 1);
|
||||
|
||||
if ((L_product ^ result) > 0)
|
||||
{
|
||||
if ((L_sum ^ L_product) >> 31)
|
||||
{
|
||||
L_sum = (L_product >> 31) ? MIN_32 : MAX_32;
|
||||
*pOverflow = 1;
|
||||
}
|
||||
}
|
||||
return (L_sum);
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
------------------------------------------------------------------------------
|
||||
FUNCTION NAME: mult
|
||||
------------------------------------------------------------------------------
|
||||
INPUT AND OUTPUT DEFINITIONS
|
||||
|
||||
Inputs:
|
||||
var1 = 16 bit short signed integer (Word16) whose value falls in
|
||||
the range : 0xffff 8000 <= var1 <= 0x0000 7fff.
|
||||
|
||||
var2 = 16 bit short signed integer (Word16) whose value falls in
|
||||
the range : 0xffff 8000 <= var2 <= 0x0000 7fff.
|
||||
|
||||
pOverflow = pointer to overflow (Flag)
|
||||
|
||||
Outputs:
|
||||
pOverflow -> 1 if the add operation resulted in overflow
|
||||
|
||||
Returns:
|
||||
product = 16-bit limited product of var1 and var2 (Word16)
|
||||
*/
|
||||
static inline Word16 mult(Word16 var1, Word16 var2, Flag *pOverflow)
|
||||
{
|
||||
register Word32 product;
|
||||
|
||||
product = ((Word32) var1 * var2) >> 15;
|
||||
|
||||
/* Saturate result (if necessary). */
|
||||
/* var1 * var2 >0x00007fff is the only case */
|
||||
/* that saturation occurs. */
|
||||
|
||||
if (product > 0x00007fffL)
|
||||
{
|
||||
*pOverflow = 1;
|
||||
product = (Word32) MAX_16;
|
||||
}
|
||||
|
||||
|
||||
/* Return the product as a 16 bit value by type casting Word32 to Word16 */
|
||||
|
||||
return ((Word16) product);
|
||||
}
|
||||
|
||||
|
||||
static inline Word32 amrnb_fxp_mac_16_by_16bb(Word32 L_var1, Word32 L_var2, Word32 L_var3)
|
||||
{
|
||||
Word32 result;
|
||||
|
||||
result = L_var3 + L_var1 * L_var2;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
static inline Word32 amrnb_fxp_msu_16_by_16bb(Word32 L_var1, Word32 L_var2, Word32 L_var3)
|
||||
{
|
||||
Word32 result;
|
||||
|
||||
result = L_var3 - L_var1 * L_var2;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; END
|
||||
----------------------------------------------------------------------------*/
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* BASIC_OP_C_EQUIVALENT_H */
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,107 @@
|
||||
/* ------------------------------------------------------------------
|
||||
* Copyright (C) 1998-2009 PacketVideo
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
||||
* express or implied.
|
||||
* See the License for the specific language governing permissions
|
||||
* and limitations under the License.
|
||||
* -------------------------------------------------------------------
|
||||
*/
|
||||
/****************************************************************************************
|
||||
Portions of this file are derived from the following 3GPP standard:
|
||||
|
||||
3GPP TS 26.073
|
||||
ANSI-C code for the Adaptive Multi-Rate (AMR) speech codec
|
||||
Available from http://www.3gpp.org
|
||||
|
||||
(C) 2004, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TTA, TTC)
|
||||
Permission to distribute, modify and use this file under the standard license
|
||||
terms listed above has been obtained from the copyright holder.
|
||||
****************************************************************************************/
|
||||
/*
|
||||
|
||||
Filename: basicop_malloc.h
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
INCLUDE DESCRIPTION
|
||||
|
||||
This file contains constant definitions and external references to the stores
|
||||
used by any arithmetic function.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; CONTINUE ONLY IF NOT ALREADY DEFINED
|
||||
----------------------------------------------------------------------------*/
|
||||
#ifndef BASICOP_MALLOC_H
|
||||
#define BASICOP_MALLOC_H
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; INCLUDES
|
||||
----------------------------------------------------------------------------*/
|
||||
#include "typedef.h"
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; MACROS
|
||||
; Define module specific macros here
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; DEFINES
|
||||
; Include all pre-processor statements here.
|
||||
----------------------------------------------------------------------------*/
|
||||
#define MAX_32 (Word32)0x7fffffffL
|
||||
#define MIN_32 (Word32)0x80000000L
|
||||
|
||||
#define MAX_16 (Word16)0x7fff
|
||||
#define MIN_16 (Word16)0x8000
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; EXTERNAL VARIABLES REFERENCES
|
||||
; Declare variables used in this module but defined elsewhere
|
||||
----------------------------------------------------------------------------*/
|
||||
extern Flag Overflow;
|
||||
extern Flag Carry;
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; SIMPLE TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; ENUMERATED TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; STRUCTURES TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; GLOBAL FUNCTION DEFINITIONS
|
||||
; Function Prototype declaration
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; END
|
||||
----------------------------------------------------------------------------*/
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -0,0 +1,134 @@
|
||||
/* ------------------------------------------------------------------
|
||||
* Copyright (C) 1998-2009 PacketVideo
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
||||
* express or implied.
|
||||
* See the License for the specific language governing permissions
|
||||
* and limitations under the License.
|
||||
* -------------------------------------------------------------------
|
||||
*/
|
||||
/****************************************************************************************
|
||||
Portions of this file are derived from the following 3GPP standard:
|
||||
|
||||
3GPP TS 26.073
|
||||
ANSI-C code for the Adaptive Multi-Rate (AMR) speech codec
|
||||
Available from http://www.3gpp.org
|
||||
|
||||
(C) 2004, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TTA, TTC)
|
||||
Permission to distribute, modify and use this file under the standard license
|
||||
terms listed above has been obtained from the copyright holder.
|
||||
****************************************************************************************/
|
||||
/*
|
||||
|
||||
Filename: bitno_tab.h
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
INCLUDE DESCRIPTION
|
||||
|
||||
This file declares a tables in bitno_tab.c.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; CONTINUE ONLY IF NOT ALREADY DEFINED
|
||||
----------------------------------------------------------------------------*/
|
||||
#ifndef BITNO_TAB_H
|
||||
#define BITNO_TAB_H
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; INCLUDES
|
||||
----------------------------------------------------------------------------*/
|
||||
#include "typedef.h"
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; MACROS
|
||||
; Define module specific macros here
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; DEFINES
|
||||
; Include all pre-processor statements here.
|
||||
----------------------------------------------------------------------------*/
|
||||
#define BIT_0 0
|
||||
#define BIT_1 1
|
||||
|
||||
#define PRMNO_MR475 17
|
||||
#define PRMNO_MR515 19
|
||||
#define PRMNO_MR59 19
|
||||
#define PRMNO_MR67 19
|
||||
#define PRMNO_MR74 19
|
||||
#define PRMNO_MR795 23
|
||||
#define PRMNO_MR102 39
|
||||
#define PRMNO_MR122 57
|
||||
#define PRMNO_MRDTX 5
|
||||
|
||||
/* number of parameters to first subframe */
|
||||
#define PRMNOFSF_MR475 7
|
||||
#define PRMNOFSF_MR515 7
|
||||
#define PRMNOFSF_MR59 7
|
||||
#define PRMNOFSF_MR67 7
|
||||
#define PRMNOFSF_MR74 7
|
||||
#define PRMNOFSF_MR795 8
|
||||
#define PRMNOFSF_MR102 12
|
||||
#define PRMNOFSF_MR122 18
|
||||
/*----------------------------------------------------------------------------
|
||||
; EXTERNAL VARIABLES REFERENCES
|
||||
; Declare variables used in this module but defined elsewhere
|
||||
----------------------------------------------------------------------------*/
|
||||
extern const Word16 prmno[];
|
||||
extern const Word16 prmnofsf[];
|
||||
extern const Word16 bitno_MR475[];
|
||||
extern const Word16 bitno_MR515[];
|
||||
extern const Word16 bitno_MR59[];
|
||||
extern const Word16 bitno_MR67[];
|
||||
extern const Word16 bitno_MR74[];
|
||||
extern const Word16 bitno_MR95[];
|
||||
extern const Word16 bitno_MR102[];
|
||||
extern const Word16 bitno_MR122[];
|
||||
extern const Word16 bitno_MRDTX[];
|
||||
extern const Word16 *const bitno[];
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; SIMPLE TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; ENUMERATED TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; STRUCTURES TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; GLOBAL FUNCTION DEFINITIONS
|
||||
; Function Prototype declaration
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; END
|
||||
----------------------------------------------------------------------------*/
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -0,0 +1,112 @@
|
||||
/* ------------------------------------------------------------------
|
||||
* Copyright (C) 1998-2009 PacketVideo
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
||||
* express or implied.
|
||||
* See the License for the specific language governing permissions
|
||||
* and limitations under the License.
|
||||
* -------------------------------------------------------------------
|
||||
*/
|
||||
/****************************************************************************************
|
||||
Portions of this file are derived from the following 3GPP standard:
|
||||
|
||||
3GPP TS 26.073
|
||||
ANSI-C code for the Adaptive Multi-Rate (AMR) speech codec
|
||||
Available from http://www.3gpp.org
|
||||
|
||||
(C) 2004, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TTA, TTC)
|
||||
Permission to distribute, modify and use this file under the standard license
|
||||
terms listed above has been obtained from the copyright holder.
|
||||
****************************************************************************************/
|
||||
/*
|
||||
|
||||
Filename: bitreorder_tab.h
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
INCLUDE DESCRIPTION
|
||||
|
||||
This file declares a tables in bitreorder.c.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; CONTINUE ONLY IF NOT ALREADY DEFINED
|
||||
----------------------------------------------------------------------------*/
|
||||
#ifndef BITREORDER_H
|
||||
#define BITREORDER_H
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; INCLUDES
|
||||
----------------------------------------------------------------------------*/
|
||||
#include "typedef.h"
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; MACROS
|
||||
; Define module specific macros here
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; DEFINES
|
||||
; Include all pre-processor statements here.
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; EXTERNAL VARIABLES REFERENCES
|
||||
; Declare variables used in this module but defined elsewhere
|
||||
----------------------------------------------------------------------------*/
|
||||
extern const Word16 numOfBits[];
|
||||
extern const Word16 reorderBits_MR475[];
|
||||
extern const Word16 reorderBits_MR515[];
|
||||
extern const Word16 reorderBits_MR59[];
|
||||
extern const Word16 reorderBits_MR67[];
|
||||
extern const Word16 reorderBits_MR74[];
|
||||
extern const Word16 reorderBits_MR795[];
|
||||
extern const Word16 reorderBits_MR102[];
|
||||
extern const Word16 reorderBits_MR122[];
|
||||
|
||||
extern const Word16 *const reorderBits[];
|
||||
extern const Word16 numCompressedBytes[];
|
||||
/*----------------------------------------------------------------------------
|
||||
; SIMPLE TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; ENUMERATED TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; STRUCTURES TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; GLOBAL FUNCTION DEFINITIONS
|
||||
; Function Prototype declaration
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; END
|
||||
----------------------------------------------------------------------------*/
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -0,0 +1,101 @@
|
||||
/* ------------------------------------------------------------------
|
||||
* Copyright (C) 1998-2009 PacketVideo
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
||||
* express or implied.
|
||||
* See the License for the specific language governing permissions
|
||||
* and limitations under the License.
|
||||
* -------------------------------------------------------------------
|
||||
*/
|
||||
/****************************************************************************************
|
||||
Portions of this file are derived from the following 3GPP standard:
|
||||
|
||||
3GPP TS 26.073
|
||||
ANSI-C code for the Adaptive Multi-Rate (AMR) speech codec
|
||||
Available from http://www.3gpp.org
|
||||
|
||||
(C) 2004, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TTA, TTC)
|
||||
Permission to distribute, modify and use this file under the standard license
|
||||
terms listed above has been obtained from the copyright holder.
|
||||
****************************************************************************************/
|
||||
/*
|
||||
|
||||
Filename: bytesused.h
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
INCLUDE DESCRIPTION
|
||||
|
||||
This file declares a table BytesUsed.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; CONTINUE ONLY IF NOT ALREADY DEFINED
|
||||
----------------------------------------------------------------------------*/
|
||||
#ifndef BYTESUSED_H
|
||||
#define BYTESUSED_H
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; INCLUDES
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; MACROS
|
||||
; Define module specific macros here
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; DEFINES
|
||||
; Include all pre-processor statements here.
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; EXTERNAL VARIABLES REFERENCES
|
||||
; Declare variables used in this module but defined elsewhere
|
||||
----------------------------------------------------------------------------*/
|
||||
extern const short BytesUsed[];
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; SIMPLE TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; ENUMERATED TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; STRUCTURES TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; GLOBAL FUNCTION DEFINITIONS
|
||||
; Function Prototype declaration
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; END
|
||||
----------------------------------------------------------------------------*/
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -0,0 +1,129 @@
|
||||
/* ------------------------------------------------------------------
|
||||
* Copyright (C) 1998-2009 PacketVideo
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
||||
* express or implied.
|
||||
* See the License for the specific language governing permissions
|
||||
* and limitations under the License.
|
||||
* -------------------------------------------------------------------
|
||||
*/
|
||||
/****************************************************************************************
|
||||
Portions of this file are derived from the following 3GPP standard:
|
||||
|
||||
3GPP TS 26.073
|
||||
ANSI-C code for the Adaptive Multi-Rate (AMR) speech codec
|
||||
Available from http://www.3gpp.org
|
||||
|
||||
(C) 2004, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TTA, TTC)
|
||||
Permission to distribute, modify and use this file under the standard license
|
||||
terms listed above has been obtained from the copyright holder.
|
||||
****************************************************************************************/
|
||||
/*
|
||||
INCLUDE DESCRIPTION
|
||||
|
||||
This file contains the Speech code (encoder, decoder, and postfilter)
|
||||
constant parameters.
|
||||
|
||||
NOTE: This file must be synchronized with /gsm-amr/asm/include/cnst.inc file.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; CONTINUE ONLY IF NOT ALREADY DEFINED
|
||||
----------------------------------------------------------------------------*/
|
||||
#ifndef _CNST_H_
|
||||
#define _CNST_H_
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; INCLUDES
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; MACROS
|
||||
; Define module specific macros here
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; DEFINES
|
||||
; Include all pre-processor statements here.
|
||||
----------------------------------------------------------------------------*/
|
||||
#define L_TOTAL 320 /* Total size of speech buffer. */
|
||||
#define L_WINDOW 240 /* Window size in LP analysis */
|
||||
#define L_FRAME 160 /* Frame size */
|
||||
#define L_FRAME_BY2 80 /* Frame size divided by 2 */
|
||||
#define L_SUBFR 40 /* Subframe size */
|
||||
#define L_CODE 40 /* codevector length */
|
||||
#define NB_TRACK 5 /* number of tracks */
|
||||
#define STEP 5 /* codebook step size */
|
||||
#define NB_TRACK_MR102 4 /* number of tracks mode mr102 */
|
||||
#define STEP_MR102 4 /* codebook step size mode mr102 */
|
||||
#define M 10 /* Order of LP filter */
|
||||
#define MP1 (M+1) /* Order of LP filter + 1 */
|
||||
#define LSF_GAP 205 /* Minimum distance between LSF after quan- */
|
||||
/* tization; 50 Hz = 205 */
|
||||
#define LSP_PRED_FAC_MR122 21299 /* MR122 LSP prediction factor (0.65 Q15) */
|
||||
#define AZ_SIZE (4*M+4) /* Size of array of LP filters in 4 subfr.s */
|
||||
#define PIT_MIN_MR122 18 /* Minimum pitch lag (MR122 mode) */
|
||||
#define PIT_MIN 20 /* Minimum pitch lag (all other modes) */
|
||||
#define PIT_MAX 143 /* Maximum pitch lag */
|
||||
#define L_INTERPOL (10+1) /* Length of filter for interpolation */
|
||||
#define L_INTER_SRCH 4 /* Length of filter for CL LTP search */
|
||||
/* interpolation */
|
||||
|
||||
#define MU 26214 /* Factor for tilt compensation filter 0.8 */
|
||||
#define AGC_FAC 29491 /* Factor for automatic gain control 0.9 */
|
||||
|
||||
#define L_NEXT 40 /* Overhead in LP analysis */
|
||||
#define SHARPMAX 13017 /* Maximum value of pitch sharpening */
|
||||
#define SHARPMIN 0 /* Minimum value of pitch sharpening */
|
||||
|
||||
|
||||
#define MAX_PRM_SIZE 57 /* max. num. of params */
|
||||
#define MAX_SERIAL_SIZE 244 /* max. num. of serial bits */
|
||||
|
||||
#define GP_CLIP 15565 /* Pitch gain clipping = 0.95 */
|
||||
#define N_FRAME 7 /* old pitch gains in average calculation */
|
||||
|
||||
#define EHF_MASK 0x0008 /* encoder homing frame pattern */
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; EXTERNAL VARIABLES REFERENCES
|
||||
; Declare variables used in this module but defined elsewhere
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; SIMPLE TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; ENUMERATED TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; STRUCTURES TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; GLOBAL FUNCTION DEFINITIONS
|
||||
; Function Prototype declaration
|
||||
----------------------------------------------------------------------------*/
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _CNST_H_ */
|
||||
@@ -0,0 +1,133 @@
|
||||
/* ------------------------------------------------------------------
|
||||
* Copyright (C) 1998-2009 PacketVideo
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
||||
* express or implied.
|
||||
* See the License for the specific language governing permissions
|
||||
* and limitations under the License.
|
||||
* -------------------------------------------------------------------
|
||||
*/
|
||||
/****************************************************************************************
|
||||
Portions of this file are derived from the following 3GPP standard:
|
||||
|
||||
3GPP TS 26.073
|
||||
ANSI-C code for the Adaptive Multi-Rate (AMR) speech codec
|
||||
Available from http://www.3gpp.org
|
||||
|
||||
(C) 2004, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TTA, TTC)
|
||||
Permission to distribute, modify and use this file under the standard license
|
||||
terms listed above has been obtained from the copyright holder.
|
||||
****************************************************************************************/
|
||||
/*
|
||||
********************************************************************************
|
||||
**-------------------------------------------------------------------------**
|
||||
** **
|
||||
** GSM AMR-NB speech codec R98 Version 7.5.0 March 2, 2001 **
|
||||
** R99 Version 3.2.0 **
|
||||
** REL-4 Version 4.0.0 **
|
||||
** **
|
||||
**-------------------------------------------------------------------------**
|
||||
********************************************************************************
|
||||
*
|
||||
* File : cnst_vad.h
|
||||
* Purpose : Constants and definitions for VAD
|
||||
*
|
||||
********************************************************************************
|
||||
*/
|
||||
#ifndef cnst_vad_h
|
||||
#define cnst_vad_h "$Id $"
|
||||
|
||||
#define FRAME_LEN 160 /* Length (samples) of the input frame */
|
||||
#define COMPLEN 9 /* Number of sub-bands used by VAD */
|
||||
#define INV_COMPLEN 3641 /* 1.0/COMPLEN*2^15 */
|
||||
#define LOOKAHEAD 40 /* length of the lookahead used by speech coder */
|
||||
|
||||
#define UNITY 512 /* Scaling used with SNR calculation */
|
||||
#define UNIRSHFT 6 /* = log2(MAX_16/UNITY) */
|
||||
|
||||
#define TONE_THR (Word16)(0.65*MAX_16) /* Threshold for tone detection */
|
||||
|
||||
/* Constants for background spectrum update */
|
||||
#define ALPHA_UP1 (Word16)((1.0 - 0.95)*MAX_16) /* Normal update, upwards: */
|
||||
#define ALPHA_DOWN1 (Word16)((1.0 - 0.936)*MAX_16) /* Normal update, downwards */
|
||||
#define ALPHA_UP2 (Word16)((1.0 - 0.985)*MAX_16) /* Forced update, upwards */
|
||||
#define ALPHA_DOWN2 (Word16)((1.0 - 0.943)*MAX_16) /* Forced update, downwards */
|
||||
#define ALPHA3 (Word16)((1.0 - 0.95)*MAX_16) /* Update downwards */
|
||||
#define ALPHA4 (Word16)((1.0 - 0.9)*MAX_16) /* For stationary estimation */
|
||||
#define ALPHA5 (Word16)((1.0 - 0.5)*MAX_16) /* For stationary estimation */
|
||||
|
||||
/* Constants for VAD threshold */
|
||||
#define VAD_THR_HIGH 1260 /* Highest threshold */
|
||||
#define VAD_THR_LOW 720 /* Lowest threshold */
|
||||
#define VAD_P1 0 /* Noise level for highest threshold */
|
||||
#define VAD_P2 6300 /* Noise level for lowest threshold */
|
||||
#define VAD_SLOPE (Word16)(MAX_16*(float)(VAD_THR_LOW-VAD_THR_HIGH)/(float)(VAD_P2-VAD_P1))
|
||||
|
||||
/* Parameters for background spectrum recovery function */
|
||||
#define STAT_COUNT 20 /* threshold of stationary detection counter */
|
||||
#define STAT_COUNT_BY_2 10 /* threshold of stationary detection counter */
|
||||
#define CAD_MIN_STAT_COUNT 5 /* threshold of stationary detection counter */
|
||||
|
||||
#define STAT_THR_LEVEL 184 /* Threshold level for stationarity detection */
|
||||
#define STAT_THR 1000 /* Threshold for stationarity detection */
|
||||
|
||||
/* Limits for background noise estimate */
|
||||
#define NOISE_MIN 40 /* minimum */
|
||||
#define NOISE_MAX 16000 /* maximum */
|
||||
#define NOISE_INIT 150 /* initial */
|
||||
|
||||
/* Constants for VAD hangover addition */
|
||||
#define HANG_NOISE_THR 100
|
||||
#define BURST_LEN_HIGH_NOISE 4
|
||||
#define HANG_LEN_HIGH_NOISE 7
|
||||
#define BURST_LEN_LOW_NOISE 5
|
||||
#define HANG_LEN_LOW_NOISE 4
|
||||
|
||||
/* Thresholds for signal power */
|
||||
#define VAD_POW_LOW (Word32)15000 /* If input power is lower, */
|
||||
/* VAD is set to 0 */
|
||||
#define POW_PITCH_THR (Word32)343040 /* If input power is lower, pitch */
|
||||
/* detection is ignored */
|
||||
|
||||
#define POW_COMPLEX_THR (Word32)15000 /* If input power is lower, complex */
|
||||
/* flags value for previous frame is un-set */
|
||||
|
||||
|
||||
/* Constants for the filter bank */
|
||||
#define LEVEL_SHIFT 0 /* scaling */
|
||||
#define COEFF3 13363 /* coefficient for the 3rd order filter */
|
||||
#define COEFF5_1 21955 /* 1st coefficient the for 5th order filter */
|
||||
#define COEFF5_2 6390 /* 2nd coefficient the for 5th order filter */
|
||||
|
||||
/* Constants for pitch detection */
|
||||
#define LTHRESH 4
|
||||
#define NTHRESH 4
|
||||
|
||||
/* Constants for complex signal VAD */
|
||||
#define CVAD_THRESH_ADAPT_HIGH (Word16)(0.6 * MAX_16) /* threshold for adapt stopping high */
|
||||
#define CVAD_THRESH_ADAPT_LOW (Word16)(0.5 * MAX_16) /* threshold for adapt stopping low */
|
||||
#define CVAD_THRESH_IN_NOISE (Word16)(0.65 * MAX_16) /* threshold going into speech on */
|
||||
/* a short term basis */
|
||||
|
||||
#define CVAD_THRESH_HANG (Word16)(0.70 * MAX_16) /* threshold */
|
||||
#define CVAD_HANG_LIMIT (Word16)(100) /* 2 second estimation time */
|
||||
#define CVAD_HANG_LENGTH (Word16)(250) /* 5 second hangover */
|
||||
|
||||
#define CVAD_LOWPOW_RESET (Word16) (0.40 * MAX_16) /* init in low power segment */
|
||||
#define CVAD_MIN_CORR (Word16) (0.40 * MAX_16) /* lowest adaptation value */
|
||||
|
||||
#define CVAD_BURST 20 /* speech burst length for speech reset */
|
||||
#define CVAD_ADAPT_SLOW (Word16)(( 1.0 - 0.98) * MAX_16) /* threshold for slow adaption */
|
||||
#define CVAD_ADAPT_FAST (Word16)((1.0 - 0.92) * MAX_16) /* threshold for fast adaption */
|
||||
#define CVAD_ADAPT_REALLY_FAST (Word16)((1.0 - 0.80) * MAX_16) /* threshold for really fast */
|
||||
/* adaption */
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,118 @@
|
||||
/* ------------------------------------------------------------------
|
||||
* Copyright (C) 1998-2009 PacketVideo
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
||||
* express or implied.
|
||||
* See the License for the specific language governing permissions
|
||||
* and limitations under the License.
|
||||
* -------------------------------------------------------------------
|
||||
*/
|
||||
/****************************************************************************************
|
||||
Portions of this file are derived from the following 3GPP standard:
|
||||
|
||||
3GPP TS 26.073
|
||||
ANSI-C code for the Adaptive Multi-Rate (AMR) speech codec
|
||||
Available from http://www.3gpp.org
|
||||
|
||||
(C) 2004, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TTA, TTC)
|
||||
Permission to distribute, modify and use this file under the standard license
|
||||
terms listed above has been obtained from the copyright holder.
|
||||
****************************************************************************************/
|
||||
/*
|
||||
|
||||
Filename: d_gain_c.h
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
INCLUDE DESCRIPTION
|
||||
|
||||
File : d_gain_c.h
|
||||
Purpose : Decode the fixed codebook gain using the received index.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#ifndef _D_GAIN_C_H_
|
||||
#define _D_GAIN_C_H_
|
||||
#define d_gain_c_h "$Id $"
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; INCLUDES
|
||||
----------------------------------------------------------------------------*/
|
||||
#include "typedef.h"
|
||||
#include "mode.h"
|
||||
#include "gc_pred.h"
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; MACROS
|
||||
; [Define module specific macros here]
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; DEFINES
|
||||
; [Include all pre-processor statements here.]
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; EXTERNAL VARIABLES REFERENCES
|
||||
; [Declare variables used in this module but defined elsewhere]
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; SIMPLE TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; ENUMERATED TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; STRUCTURES TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; GLOBAL FUNCTION DEFINITIONS
|
||||
; [List function prototypes here]
|
||||
----------------------------------------------------------------------------*/
|
||||
/*
|
||||
* Function : d_gain_code
|
||||
* Purpose : Decode the fixed codebook gain using the received index.
|
||||
* Description : The received index gives the gain correction factor
|
||||
* gamma. The quantized gain is given by g_q = g0 * gamma
|
||||
* where g0 is the predicted gain. To find g0, 4th order
|
||||
* MA prediction is applied to the mean-removed innovation
|
||||
* energy in dB.
|
||||
* Returns : void
|
||||
*/
|
||||
void d_gain_code(
|
||||
gc_predState *pred_state, /* i/o : MA predictor state */
|
||||
enum Mode mode, /* i : AMR mode */
|
||||
Word16 index, /* i : received quantization index */
|
||||
Word16 code[], /* i : innovation codevector */
|
||||
const Word16* qua_gain_code_ptr, /* i : Pointer to read-only table */
|
||||
Word16 *gain_code, /* o : decoded innovation gain */
|
||||
Flag *pOverflow
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _D_GAIN_C_H_ */
|
||||
|
||||
|
||||
@@ -0,0 +1,81 @@
|
||||
/* ------------------------------------------------------------------
|
||||
* Copyright (C) 1998-2009 PacketVideo
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
||||
* express or implied.
|
||||
* See the License for the specific language governing permissions
|
||||
* and limitations under the License.
|
||||
* -------------------------------------------------------------------
|
||||
*/
|
||||
/****************************************************************************************
|
||||
Portions of this file are derived from the following 3GPP standard:
|
||||
|
||||
3GPP TS 26.073
|
||||
ANSI-C code for the Adaptive Multi-Rate (AMR) speech codec
|
||||
Available from http://www.3gpp.org
|
||||
|
||||
(C) 2004, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TTA, TTC)
|
||||
Permission to distribute, modify and use this file under the standard license
|
||||
terms listed above has been obtained from the copyright holder.
|
||||
****************************************************************************************/
|
||||
/*
|
||||
********************************************************************************
|
||||
*
|
||||
* GSM AMR-NB speech codec R98 Version 7.5.0 March 2, 2001
|
||||
* R99 Version 3.2.0
|
||||
* REL-4 Version 4.0.0
|
||||
*
|
||||
********************************************************************************
|
||||
*
|
||||
* File : d_gain_p.h
|
||||
* Purpose : Decodes the pitch gain using the received index.
|
||||
*
|
||||
********************************************************************************
|
||||
*/
|
||||
#ifndef d_gain_p_h
|
||||
#define d_gain_p_h "$Id $"
|
||||
|
||||
/*
|
||||
********************************************************************************
|
||||
* INCLUDE FILES
|
||||
********************************************************************************
|
||||
*/
|
||||
#include "typedef.h"
|
||||
#include "mode.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
/*
|
||||
**************************************************************************
|
||||
*
|
||||
* Function : d_gain_pitch
|
||||
* Purpose : Decodes the pitch gain using the received index.
|
||||
* Description : In case of no frame erasure, the gain is obtained
|
||||
* from the quantization table at the given index;
|
||||
* otherwise, a downscaled past gain is used.
|
||||
* Returns : Quantized pitch gain
|
||||
*
|
||||
**************************************************************************
|
||||
*/
|
||||
Word16 d_gain_pitch( /* return value: gain (Q14) */
|
||||
enum Mode mode, /* i : AMR mode */
|
||||
Word16 index, /* i : index of quantization */
|
||||
const Word16* qua_gain_pitch_ptr /* i : pointer to read-only tables */
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,190 @@
|
||||
/* ------------------------------------------------------------------
|
||||
* Copyright (C) 1998-2009 PacketVideo
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
||||
* express or implied.
|
||||
* See the License for the specific language governing permissions
|
||||
* and limitations under the License.
|
||||
* -------------------------------------------------------------------
|
||||
*/
|
||||
/****************************************************************************************
|
||||
Portions of this file are derived from the following 3GPP standard:
|
||||
|
||||
3GPP TS 26.073
|
||||
ANSI-C code for the Adaptive Multi-Rate (AMR) speech codec
|
||||
Available from http://www.3gpp.org
|
||||
|
||||
(C) 2004, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TTA, TTC)
|
||||
Permission to distribute, modify and use this file under the standard license
|
||||
terms listed above has been obtained from the copyright holder.
|
||||
****************************************************************************************/
|
||||
/*
|
||||
|
||||
Filename: d_plsf.h
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
INCLUDE DESCRIPTION
|
||||
|
||||
This file contains all the constant definitions and prototype definitions
|
||||
needed by the d_plsf_3.c and d_plsf_5.c
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; CONTINUE ONLY IF NOT ALREADY DEFINED
|
||||
----------------------------------------------------------------------------*/
|
||||
#ifndef d_plsf_h
|
||||
#define d_plsf_h "$Id $"
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; INCLUDES
|
||||
----------------------------------------------------------------------------*/
|
||||
#include "typedef.h"
|
||||
#include "cnst.h"
|
||||
#include "mode.h"
|
||||
#include "get_const_tbls.h"
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; MACROS
|
||||
; Define module specific macros here
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; DEFINES
|
||||
; Include all pre-processor statements here.
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; EXTERNAL VARIABLES REFERENCES
|
||||
; Declare variables used in this module but defined elsewhere
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; SIMPLE TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; ENUMERATED TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; STRUCTURES TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
typedef struct
|
||||
{
|
||||
Word16 past_r_q[M]; /* Past quantized prediction error, Q15 */
|
||||
Word16 past_lsf_q[M]; /* Past dequantized lsfs, Q15 */
|
||||
} D_plsfState;
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; GLOBAL FUNCTION DEFINITIONS
|
||||
; Function Prototype declaration
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*
|
||||
**************************************************************************
|
||||
*
|
||||
* Function : D_plsf_reset
|
||||
* Purpose : Resets state memory
|
||||
* Returns : 0 on success
|
||||
*
|
||||
**************************************************************************
|
||||
*/
|
||||
Word16 D_plsf_reset(D_plsfState *st, const Word16* mean_lsf_5_ptr);
|
||||
|
||||
/*
|
||||
**************************************************************************
|
||||
*
|
||||
* Function : D_plsf_exit
|
||||
* Purpose : The memory used for state memory is freed
|
||||
* Description : Stores NULL in *st
|
||||
* Returns : void
|
||||
*
|
||||
**************************************************************************
|
||||
*/
|
||||
void D_plsf_exit(D_plsfState **st);
|
||||
|
||||
/*
|
||||
**************************************************************************
|
||||
*
|
||||
* Function : D_plsf_5
|
||||
* Purpose : Decodes the 2 sets of LSP parameters in a frame
|
||||
* using the received quantization indices.
|
||||
* Description : The two sets of LSFs are quantized using split by
|
||||
* 5 matrix quantization (split-MQ) with 1st order MA
|
||||
* prediction.
|
||||
* See "q_plsf_5.c" for more details about the
|
||||
* quantization procedure
|
||||
* Returns : 0
|
||||
*
|
||||
**************************************************************************
|
||||
*/
|
||||
void D_plsf_5(
|
||||
D_plsfState *st, /* i/o: State variables */
|
||||
Word16 bfi, /* i : bad frame indicator (set to 1 if a bad
|
||||
frame is received) */
|
||||
Word16 *indice, /* i : quantization indices of 5 submatrices, Q0 */
|
||||
CommonAmrTbls* common_amr_tbls, /* i : structure containing ptrs to read-only tables */
|
||||
Word16 *lsp1_q, /* o : quantized 1st LSP vector (M) Q15 */
|
||||
Word16 *lsp2_q, /* o : quantized 2nd LSP vector (M) Q15 */
|
||||
Flag *pOverflow /* o : Flag set when overflow occurs */
|
||||
);
|
||||
|
||||
/*************************************************************************
|
||||
*
|
||||
* FUNCTION: D_plsf_3()
|
||||
*
|
||||
* PURPOSE: Decodes the LSP parameters using the received quantization
|
||||
* indices.1st order MA prediction and split by 3 matrix
|
||||
* quantization (split-MQ)
|
||||
*
|
||||
*************************************************************************/
|
||||
|
||||
void D_plsf_3(
|
||||
D_plsfState *st, /* i/o: State struct */
|
||||
enum Mode mode, /* i : coder mode */
|
||||
Word16 bfi, /* i : bad frame indicator (set to 1 if a */
|
||||
/* bad frame is received) */
|
||||
Word16 * indice, /* i : quantization indices of 3 submatrices, Q0 */
|
||||
CommonAmrTbls* common_amr_tbls, /* i : structure containing ptrs to read-only tables */
|
||||
Word16 * lsp1_q, /* o : quantized 1st LSP vector, Q15 */
|
||||
Flag *pOverflow /* o : Flag set when overflow occurs */
|
||||
);
|
||||
|
||||
/*************************************************************************
|
||||
*
|
||||
* FUNCTION: Init_D_plsf_3()
|
||||
*
|
||||
* PURPOSE: Set the past_r_q[M] vector to one of the eight
|
||||
* past_rq_init vectors.
|
||||
*
|
||||
*************************************************************************/
|
||||
void Init_D_plsf_3(D_plsfState *st, /* i/o: State struct */
|
||||
Word16 index, /* i : past_rq_init[] index [0, 7] */
|
||||
const Word16* past_rq_init_ptr /* ptr to read-only table */
|
||||
);
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; END
|
||||
----------------------------------------------------------------------------*/
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _Q_PLSF_H_ */
|
||||
|
||||
@@ -0,0 +1,101 @@
|
||||
/* ------------------------------------------------------------------
|
||||
* Copyright (C) 1998-2009 PacketVideo
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
||||
* express or implied.
|
||||
* See the License for the specific language governing permissions
|
||||
* and limitations under the License.
|
||||
* -------------------------------------------------------------------
|
||||
*/
|
||||
/****************************************************************************************
|
||||
Portions of this file are derived from the following 3GPP standard:
|
||||
|
||||
3GPP TS 26.073
|
||||
ANSI-C code for the Adaptive Multi-Rate (AMR) speech codec
|
||||
Available from http://www.3gpp.org
|
||||
|
||||
(C) 2004, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TTA, TTC)
|
||||
Permission to distribute, modify and use this file under the standard license
|
||||
terms listed above has been obtained from the copyright holder.
|
||||
****************************************************************************************/
|
||||
/*
|
||||
|
||||
Filename: div_s.h
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
INCLUDE DESCRIPTION
|
||||
|
||||
This file contains all the constant definitions and prototype definitions
|
||||
needed by the div_s function.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; CONTINUE ONLY IF NOT ALREADY DEFINED
|
||||
----------------------------------------------------------------------------*/
|
||||
#ifndef DIV_S_H
|
||||
#define DIV_S_H
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; INCLUDES
|
||||
----------------------------------------------------------------------------*/
|
||||
#include "basicop_malloc.h"
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; MACROS
|
||||
; Define module specific macros here
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; DEFINES
|
||||
; Include all pre-processor statements here.
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; EXTERNAL VARIABLES REFERENCES
|
||||
; Declare variables used in this module but defined elsewhere
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; SIMPLE TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; ENUMERATED TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; STRUCTURES TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; GLOBAL FUNCTION DEFINITIONS
|
||||
; Function Prototype declaration
|
||||
----------------------------------------------------------------------------*/
|
||||
OSCL_IMPORT_REF Word16 div_s(Word16 var1, Word16 var2);
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; END
|
||||
----------------------------------------------------------------------------*/
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -0,0 +1,96 @@
|
||||
/* ------------------------------------------------------------------
|
||||
* Copyright (C) 1998-2009 PacketVideo
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
||||
* express or implied.
|
||||
* See the License for the specific language governing permissions
|
||||
* and limitations under the License.
|
||||
* -------------------------------------------------------------------
|
||||
*/
|
||||
/****************************************************************************************
|
||||
Portions of this file are derived from the following 3GPP standard:
|
||||
|
||||
3GPP TS 26.073
|
||||
ANSI-C code for the Adaptive Multi-Rate (AMR) speech codec
|
||||
Available from http://www.3gpp.org
|
||||
|
||||
(C) 2004, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TTA, TTC)
|
||||
Permission to distribute, modify and use this file under the standard license
|
||||
terms listed above has been obtained from the copyright holder.
|
||||
****************************************************************************************/
|
||||
/*
|
||||
Filename: dtx_common_def.h
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
INCLUDE DESCRIPTION
|
||||
|
||||
File : dtx_common_def.h
|
||||
Purpose : DTX definitions common to encoder and decoder
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; CONTINUE ONLY IF NOT ALREADY DEFINED
|
||||
----------------------------------------------------------------------------*/
|
||||
#ifndef DTX_COMMON_DEF_H
|
||||
#define DTX_COMMON_DEF_H
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; INCLUDES
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; MACROS
|
||||
; Define module specific macros here
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; DEFINES
|
||||
; Include all pre-processor statements here.
|
||||
----------------------------------------------------------------------------*/
|
||||
#define DTX_MAX_EMPTY_THRESH 50
|
||||
#define DTX_HIST_SIZE 8
|
||||
#define DTX_ELAPSED_FRAMES_THRESH (24 + 7 -1)
|
||||
#define DTX_HANG_CONST 7 /* yields eight frames of SP HANGOVER */
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; EXTERNAL VARIABLES REFERENCES
|
||||
; Declare variables used in this module but defined elsewhere
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; SIMPLE TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; ENUMERATED TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; STRUCTURES TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
/*----------------------------------------------------------------------------
|
||||
; END
|
||||
----------------------------------------------------------------------------*/
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* DTX_COMMON_DEF_H */
|
||||
|
||||
@@ -0,0 +1,130 @@
|
||||
/* ------------------------------------------------------------------
|
||||
* Copyright (C) 1998-2009 PacketVideo
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
||||
* express or implied.
|
||||
* See the License for the specific language governing permissions
|
||||
* and limitations under the License.
|
||||
* -------------------------------------------------------------------
|
||||
*/
|
||||
/****************************************************************************************
|
||||
Portions of this file are derived from the following 3GPP standard:
|
||||
|
||||
3GPP TS 26.073
|
||||
ANSI-C code for the Adaptive Multi-Rate (AMR) speech codec
|
||||
Available from http://www.3gpp.org
|
||||
|
||||
(C) 2004, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TTA, TTC)
|
||||
Permission to distribute, modify and use this file under the standard license
|
||||
terms listed above has been obtained from the copyright holder.
|
||||
****************************************************************************************/
|
||||
/*
|
||||
|
||||
Filename: extract_h.cpp
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
INPUT AND OUTPUT DEFINITIONS
|
||||
|
||||
Inputs:
|
||||
L_var1 = 32 bit long signed integer (Word32 ) whose value falls
|
||||
in the range : 0x8000 0000 <= L_var1 <= 0x7fff ffff.
|
||||
|
||||
Local Stores/Buffers/Pointers Needed:
|
||||
None
|
||||
|
||||
Global Stores/Buffers/Pointers Needed:
|
||||
None
|
||||
|
||||
Outputs:
|
||||
L_var1 = Most significant word of input (Word16)
|
||||
|
||||
Pointers and Buffers Modified:
|
||||
None
|
||||
|
||||
Local Stores Modified:
|
||||
None
|
||||
|
||||
Global Stores Modified:
|
||||
None
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
FUNCTION DESCRIPTION
|
||||
|
||||
This function returns the 16 MSB of the input, L_var1.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
REQUIREMENTS
|
||||
|
||||
None
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
REFERENCES
|
||||
|
||||
[1] basicop2.c, ETS Version 2.0.0, February 8, 1999
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
PSEUDO-CODE
|
||||
|
||||
Word16 extract_h (Word32 L_var1)
|
||||
{
|
||||
Word16 var_out;
|
||||
|
||||
var_out = (Word16) (L_var1 >> 16);
|
||||
#if (WMOPS)
|
||||
multiCounter[currCounter].extract_h++;
|
||||
#endif
|
||||
return (var_out);
|
||||
}
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; INCLUDES
|
||||
----------------------------------------------------------------------------*/
|
||||
#include "basic_op.h"
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; MACROS
|
||||
; Define module specific macros here
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; DEFINES
|
||||
; Include all pre-processor statements here. Include conditional
|
||||
; compile variables also.
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; LOCAL FUNCTION DEFINITIONS
|
||||
; Function Prototype declaration
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; LOCAL STORE/BUFFER/POINTER DEFINITIONS
|
||||
; Variable declaration - defined here and used outside this module
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; EXTERNAL FUNCTION REFERENCES
|
||||
; Declare functions defined elsewhere and referenced in this module
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; EXTERNAL GLOBAL STORE/BUFFER/POINTER REFERENCES
|
||||
; Declare variables used in this module but defined elsewhere
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; FUNCTION CODE
|
||||
----------------------------------------------------------------------------*/
|
||||
Word16 extract_h(Word32 L_var1);
|
||||
@@ -0,0 +1,129 @@
|
||||
/* ------------------------------------------------------------------
|
||||
* Copyright (C) 1998-2009 PacketVideo
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
||||
* express or implied.
|
||||
* See the License for the specific language governing permissions
|
||||
* and limitations under the License.
|
||||
* -------------------------------------------------------------------
|
||||
*/
|
||||
/****************************************************************************************
|
||||
Portions of this file are derived from the following 3GPP standard:
|
||||
|
||||
3GPP TS 26.073
|
||||
ANSI-C code for the Adaptive Multi-Rate (AMR) speech codec
|
||||
Available from http://www.3gpp.org
|
||||
|
||||
(C) 2004, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TTA, TTC)
|
||||
Permission to distribute, modify and use this file under the standard license
|
||||
terms listed above has been obtained from the copyright holder.
|
||||
****************************************************************************************/
|
||||
/*
|
||||
Filename: extract_l.cpp
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
INPUT AND OUTPUT DEFINITIONS
|
||||
|
||||
Inputs:
|
||||
L_var1 = 32 bit long signed integer (Word32 ) whose value falls
|
||||
in the range : 0x8000 0000 <= L_var1 <= 0x7fff ffff.
|
||||
|
||||
Local Stores/Buffers/Pointers Needed:
|
||||
None
|
||||
|
||||
Global Stores/Buffers/Pointers Needed:
|
||||
None
|
||||
|
||||
Outputs:
|
||||
L_var1 = Most significant word of input (Word16)
|
||||
|
||||
Pointers and Buffers Modified:
|
||||
None
|
||||
|
||||
Local Stores Modified:
|
||||
None
|
||||
|
||||
Global Stores Modified:
|
||||
None
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
FUNCTION DESCRIPTION
|
||||
|
||||
This function returns the 16 LSB of the input, L_var1.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
REQUIREMENTS
|
||||
|
||||
None
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
REFERENCES
|
||||
|
||||
[1] basicop2.c, ETS Version 2.0.0, February 8, 1999
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
PSEUDO-CODE
|
||||
|
||||
Word16 extract_l (Word32 L_var1)
|
||||
{
|
||||
Word16 var_out;
|
||||
|
||||
var_out = (Word16) L_var1;
|
||||
#if (WMOPS)
|
||||
multiCounter[currCounter].extract_l++;
|
||||
#endif
|
||||
return (var_out);
|
||||
}
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; INCLUDES
|
||||
----------------------------------------------------------------------------*/
|
||||
#include "basic_op.h"
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; MACROS
|
||||
; Define module specific macros here
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; DEFINES
|
||||
; Include all pre-processor statements here. Include conditional
|
||||
; compile variables also.
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; LOCAL FUNCTION DEFINITIONS
|
||||
; Function Prototype declaration
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; LOCAL STORE/BUFFER/POINTER DEFINITIONS
|
||||
; Variable declaration - defined here and used outside this module
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; EXTERNAL FUNCTION REFERENCES
|
||||
; Declare functions defined elsewhere and referenced in this module
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; EXTERNAL GLOBAL STORE/BUFFER/POINTER REFERENCES
|
||||
; Declare variables used in this module but defined elsewhere
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; FUNCTION CODE
|
||||
----------------------------------------------------------------------------*/
|
||||
Word16 extract_l(Word32 L_var1);
|
||||
@@ -0,0 +1,114 @@
|
||||
/* ------------------------------------------------------------------
|
||||
* Copyright (C) 1998-2009 PacketVideo
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
||||
* express or implied.
|
||||
* See the License for the specific language governing permissions
|
||||
* and limitations under the License.
|
||||
* -------------------------------------------------------------------
|
||||
*/
|
||||
/****************************************************************************************
|
||||
Portions of this file are derived from the following 3GPP standard:
|
||||
|
||||
3GPP TS 26.073
|
||||
ANSI-C code for the Adaptive Multi-Rate (AMR) speech codec
|
||||
Available from http://www.3gpp.org
|
||||
|
||||
(C) 2004, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TTA, TTC)
|
||||
Permission to distribute, modify and use this file under the standard license
|
||||
terms listed above has been obtained from the copyright holder.
|
||||
****************************************************************************************/
|
||||
/*
|
||||
*****************************************************************************
|
||||
*
|
||||
* GSM AMR-NB speech codec R98 Version 7.5.0 March 2, 2001
|
||||
* R99 Version 3.2.0
|
||||
* REL-4 Version 4.0.0
|
||||
*
|
||||
*****************************************************************************
|
||||
*
|
||||
* File : frame.h
|
||||
* Purpose : Declaration of received and transmitted frame types
|
||||
*
|
||||
*****************************************************************************
|
||||
*/
|
||||
#ifndef frame_h
|
||||
#define frame_h "$Id $"
|
||||
|
||||
/*
|
||||
*****************************************************************************
|
||||
* INCLUDE FILES
|
||||
*****************************************************************************
|
||||
*/
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
/*
|
||||
*****************************************************************************
|
||||
* DEFINITION OF DATA TYPES
|
||||
*****************************************************************************
|
||||
* Note: The order of the TX and RX_Type identifiers has been chosen in
|
||||
* the way below to be compatible to an earlier version of the
|
||||
* AMR-NB C reference program.
|
||||
*****************************************************************************
|
||||
*/
|
||||
|
||||
enum RXFrameType { RX_SPEECH_GOOD = 0,
|
||||
RX_SPEECH_DEGRADED,
|
||||
RX_ONSET,
|
||||
RX_SPEECH_BAD,
|
||||
RX_SID_FIRST,
|
||||
RX_SID_UPDATE,
|
||||
RX_SID_BAD,
|
||||
RX_NO_DATA,
|
||||
RX_N_FRAMETYPES /* number of frame types */
|
||||
};
|
||||
|
||||
enum TXFrameType { TX_SPEECH_GOOD = 0,
|
||||
TX_SID_FIRST,
|
||||
TX_SID_UPDATE,
|
||||
TX_NO_DATA,
|
||||
TX_SPEECH_DEGRADED,
|
||||
TX_SPEECH_BAD,
|
||||
TX_SID_BAD,
|
||||
TX_ONSET,
|
||||
TX_N_FRAMETYPES /* number of frame types */
|
||||
};
|
||||
|
||||
|
||||
/* Channel decoded frame type */
|
||||
enum CHDECFrameType { CHDEC_SID_FIRST = 0,
|
||||
CHDEC_SID_FIRST_INCOMPLETE,
|
||||
CHDEC_SID_UPDATE_INCOMPLETE,
|
||||
CHDEC_SID_UPDATE,
|
||||
CHDEC_SPEECH,
|
||||
CHDEC_SPEECH_ONSET,
|
||||
CHDEC_ESCAPE_MARKER,
|
||||
CHDEC_ESCAPE_DATA,
|
||||
CHDEC_NO_DATA
|
||||
};
|
||||
|
||||
/* Channel decoded frame quality */
|
||||
enum CHDECFrameQuality { CHDEC_GOOD = 0,
|
||||
CHDEC_PROBABLY_DEGRADED,
|
||||
CHDEC_PROBABLY_BAD,
|
||||
CHDEC_BAD
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,113 @@
|
||||
/* ------------------------------------------------------------------
|
||||
* Copyright (C) 1998-2009 PacketVideo
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
||||
* express or implied.
|
||||
* See the License for the specific language governing permissions
|
||||
* and limitations under the License.
|
||||
* -------------------------------------------------------------------
|
||||
*/
|
||||
/****************************************************************************************
|
||||
Portions of this file are derived from the following 3GPP standard:
|
||||
|
||||
3GPP TS 26.073
|
||||
ANSI-C code for the Adaptive Multi-Rate (AMR) speech codec
|
||||
Available from http://www.3gpp.org
|
||||
|
||||
(C) 2004, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TTA, TTC)
|
||||
Permission to distribute, modify and use this file under the standard license
|
||||
terms listed above has been obtained from the copyright holder.
|
||||
****************************************************************************************/
|
||||
/*
|
||||
|
||||
Filename: frame_type_3gpp.h
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
INCLUDE DESCRIPTION
|
||||
|
||||
This file contains the definition of the 3GPP frame types.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#ifndef FRAME_TYPE_3GPP_H
|
||||
#define FRAME_TYPE_3GPP_H
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; INCLUDES
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; MACROS
|
||||
; Define module specific macros here
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; DEFINES
|
||||
; Include all pre-processor statements here.
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; EXTERNAL VARIABLES REFERENCES
|
||||
; Declare variables used in this module but defined elsewhere
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; SIMPLE TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; ENUMERATED TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
enum Frame_Type_3GPP
|
||||
{
|
||||
AMR_475 = 0,
|
||||
AMR_515,
|
||||
AMR_59,
|
||||
AMR_67,
|
||||
AMR_74,
|
||||
AMR_795,
|
||||
AMR_102,
|
||||
AMR_122,
|
||||
AMR_SID,
|
||||
GSM_EFR_SID,
|
||||
TDMA_EFR_SID,
|
||||
PDC_EFR_SID,
|
||||
FOR_FUTURE_USE1,
|
||||
FOR_FUTURE_USE2,
|
||||
FOR_FUTURE_USE3,
|
||||
AMR_NO_DATA
|
||||
};
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; STRUCTURES TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; GLOBAL FUNCTION DEFINITIONS
|
||||
; Function Prototype declaration
|
||||
----------------------------------------------------------------------------*/
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* _FRAME_TYPE_3GPP_H_ */
|
||||
|
||||
|
||||
@@ -0,0 +1,166 @@
|
||||
/* ------------------------------------------------------------------
|
||||
* Copyright (C) 1998-2009 PacketVideo
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
||||
* express or implied.
|
||||
* See the License for the specific language governing permissions
|
||||
* and limitations under the License.
|
||||
* -------------------------------------------------------------------
|
||||
*/
|
||||
/****************************************************************************************
|
||||
Portions of this file are derived from the following 3GPP standard:
|
||||
|
||||
3GPP TS 26.073
|
||||
ANSI-C code for the Adaptive Multi-Rate (AMR) speech codec
|
||||
Available from http://www.3gpp.org
|
||||
|
||||
(C) 2004, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TTA, TTC)
|
||||
Permission to distribute, modify and use this file under the standard license
|
||||
terms listed above has been obtained from the copyright holder.
|
||||
****************************************************************************************/
|
||||
/*
|
||||
|
||||
Filename: gc_pred.h
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
INCLUDE DESCRIPTION
|
||||
|
||||
File : gc_pred.h
|
||||
Purpose : codebook gain MA prediction
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#ifndef _GC_PRED_H_
|
||||
#define _GC_PRED_H_
|
||||
#define gc_pred_h "$Id $"
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; INCLUDES
|
||||
----------------------------------------------------------------------------*/
|
||||
#include "typedef.h"
|
||||
#include "mode.h"
|
||||
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; MACROS
|
||||
; [Define module specific macros here]
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; DEFINES
|
||||
; [Include all pre-processor statements here.]
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; EXTERNAL VARIABLES REFERENCES
|
||||
; [Declare variables used in this module but defined elsewhere]
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; SIMPLE TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; ENUMERATED TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; STRUCTURES TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
typedef struct
|
||||
{
|
||||
Word16 past_qua_en[4]; /* normal MA predictor memory, Q10 */
|
||||
/* (contains 20*log10(qua_err)) */
|
||||
Word16 past_qua_en_MR122[4]; /* MA predictor memory for MR122 mode, Q10 */
|
||||
/* (contains log2(qua_err)) */
|
||||
} gc_predState;
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; GLOBAL FUNCTION DEFINITIONS
|
||||
; [List function prototypes here]
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
OSCL_IMPORT_REF Word16 gc_pred_reset(gc_predState *st);
|
||||
/* reset of codebook gain MA predictor state (i.e. set state memory to zero)
|
||||
returns 0 on success
|
||||
*/
|
||||
void gc_pred_exit(gc_predState **st);
|
||||
/* de-initialize codebook gain MA predictor state (i.e. free state struct)
|
||||
stores NULL in *st
|
||||
*/
|
||||
|
||||
void
|
||||
gc_pred_copy(
|
||||
gc_predState *st_src, /* i : State struct */
|
||||
gc_predState *st_dest /* o : State struct */
|
||||
);
|
||||
|
||||
/*
|
||||
* FUNCTION: gc_pred()
|
||||
* PURPOSE: MA prediction of the innovation energy
|
||||
* (in dB/(20*log10(2))) with mean removed).
|
||||
*/
|
||||
OSCL_IMPORT_REF void gc_pred(
|
||||
gc_predState *st, /* i/o: State struct */
|
||||
enum Mode mode, /* i : AMR mode */
|
||||
Word16 *code, /* i : innovative codebook vector (L_SUBFR) */
|
||||
/* MR122: Q12, other modes: Q13 */
|
||||
Word16 *exp_gcode0, /* o : exponent of predicted gain factor, Q0 */
|
||||
Word16 *frac_gcode0,/* o : fraction of predicted gain factor Q15 */
|
||||
Word16 *exp_en, /* o : exponent of innovation energy, Q0 */
|
||||
/* (only calculated for MR795) */
|
||||
Word16 *frac_en, /* o : fraction of innovation energy, Q15 */
|
||||
/* (only calculated for MR795) */
|
||||
Flag *pOverflow
|
||||
);
|
||||
|
||||
/*
|
||||
* FUNCTION: gc_pred_update()
|
||||
* PURPOSE: update MA predictor with last quantized energy
|
||||
*/
|
||||
OSCL_IMPORT_REF void gc_pred_update(
|
||||
gc_predState *st, /* i/o: State struct */
|
||||
Word16 qua_ener_MR122, /* i : quantized energy for update, Q10 */
|
||||
/* (log2(qua_err)) */
|
||||
Word16 qua_ener /* i : quantized energy for update, Q10 */
|
||||
/* (20*log10(qua_err)) */
|
||||
);
|
||||
|
||||
/*
|
||||
* FUNCTION: gc_pred_average_limited()
|
||||
* PURPOSE: get average of MA predictor state values (with a lower limit)
|
||||
* [used in error concealment]
|
||||
*/
|
||||
OSCL_IMPORT_REF void gc_pred_average_limited(
|
||||
gc_predState *st, /* i: State struct */
|
||||
Word16 *ener_avg_MR122, /* o: averaged quantized energy, Q10 */
|
||||
/* (log2(qua_err)) */
|
||||
Word16 *ener_avg, /* o: averaged quantized energy, Q10 */
|
||||
/* (20*log10(qua_err)) */
|
||||
Flag *pOverflow
|
||||
);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _GC_PRED_H_ */
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
/* ------------------------------------------------------------------
|
||||
* Copyright (C) 1998-2009 PacketVideo
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
||||
* express or implied.
|
||||
* See the License for the specific language governing permissions
|
||||
* and limitations under the License.
|
||||
* -------------------------------------------------------------------
|
||||
*/
|
||||
#ifndef GET_CONST_TBLS_H
|
||||
#define GET_CONST_TBLS_H
|
||||
|
||||
#include "typedef.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
typedef struct
|
||||
{
|
||||
const Word16* dgray_ptr;
|
||||
const Word16* dico1_lsf_3_ptr;
|
||||
const Word16* dico1_lsf_5_ptr;
|
||||
const Word16* dico2_lsf_3_ptr;
|
||||
const Word16* dico2_lsf_5_ptr;
|
||||
const Word16* dico3_lsf_3_ptr;
|
||||
const Word16* dico3_lsf_5_ptr;
|
||||
const Word16* dico4_lsf_5_ptr;
|
||||
const Word16* dico5_lsf_5_ptr;
|
||||
const Word16* gray_ptr;
|
||||
const Word16* lsp_init_data_ptr;
|
||||
const Word16* mean_lsf_3_ptr;
|
||||
const Word16* mean_lsf_5_ptr;
|
||||
const Word16* mr515_3_lsf_ptr;
|
||||
const Word16* mr795_1_lsf_ptr;
|
||||
const Word16* past_rq_init_ptr;
|
||||
const Word16* pred_fac_3_ptr;
|
||||
const Word16* qua_gain_code_ptr;
|
||||
const Word16* qua_gain_pitch_ptr;
|
||||
const Word16* startPos_ptr;
|
||||
const Word16* table_gain_lowrates_ptr;
|
||||
const Word16* table_gain_highrates_ptr;
|
||||
const Word16* prmno_ptr;
|
||||
const Word16* const* bitno_ptr;
|
||||
const Word16* numOfBits_ptr;
|
||||
const Word16* const* reorderBits_ptr;
|
||||
const Word16* numCompressedBytes_ptr;
|
||||
const Word16* window_200_40_ptr;
|
||||
const Word16* window_160_80_ptr;
|
||||
const Word16* window_232_8_ptr;
|
||||
const Word16* ph_imp_low_MR795_ptr;
|
||||
const Word16* ph_imp_mid_MR795_ptr;
|
||||
const Word16* ph_imp_low_ptr;
|
||||
const Word16* ph_imp_mid_ptr;
|
||||
} CommonAmrTbls;
|
||||
|
||||
OSCL_IMPORT_REF void get_const_tbls(CommonAmrTbls* tbl_struct_ptr);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,80 @@
|
||||
/* ------------------------------------------------------------------
|
||||
* Copyright (C) 1998-2009 PacketVideo
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
||||
* express or implied.
|
||||
* See the License for the specific language governing permissions
|
||||
* and limitations under the License.
|
||||
* -------------------------------------------------------------------
|
||||
*/
|
||||
/****************************************************************************************
|
||||
Portions of this file are derived from the following 3GPP standard:
|
||||
|
||||
3GPP TS 26.073
|
||||
ANSI-C code for the Adaptive Multi-Rate (AMR) speech codec
|
||||
Available from http://www.3gpp.org
|
||||
|
||||
(C) 2004, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TTA, TTC)
|
||||
Permission to distribute, modify and use this file under the standard license
|
||||
terms listed above has been obtained from the copyright holder.
|
||||
****************************************************************************************/
|
||||
/*
|
||||
********************************************************************************
|
||||
*
|
||||
* GSM AMR-NB speech codec R98 Version 7.5.0 March 2, 2001
|
||||
* R99 Version 3.2.0
|
||||
* REL-4 Version 4.0.0
|
||||
*
|
||||
********************************************************************************
|
||||
*
|
||||
* File : gmed_n.h
|
||||
* Purpose : calculates N-point median.
|
||||
*
|
||||
********************************************************************************
|
||||
*/
|
||||
#ifndef gmed_n_h
|
||||
#define gmed_n_h "$Id $"
|
||||
|
||||
/*
|
||||
********************************************************************************
|
||||
* INCLUDE FILES
|
||||
********************************************************************************
|
||||
*/
|
||||
#include "typedef.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
/*
|
||||
********************************************************************************
|
||||
* DEFINITION OF DATA TYPES
|
||||
********************************************************************************
|
||||
*/
|
||||
|
||||
/*
|
||||
********************************************************************************
|
||||
* DECLARATION OF PROTOTYPES
|
||||
********************************************************************************
|
||||
*/
|
||||
OSCL_IMPORT_REF Word16 gmed_n( /* o : index of the median value (0...N-1) */
|
||||
Word16 ind[], /* i : Past gain values */
|
||||
Word16 n /* i : The number of gains; this routine */
|
||||
/* is only valid for a odd number of gains */
|
||||
);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,147 @@
|
||||
/* ------------------------------------------------------------------
|
||||
* Copyright (C) 1998-2009 PacketVideo
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
||||
* express or implied.
|
||||
* See the License for the specific language governing permissions
|
||||
* and limitations under the License.
|
||||
* -------------------------------------------------------------------
|
||||
*/
|
||||
/****************************************************************************************
|
||||
Portions of this file are derived from the following 3GPP standard:
|
||||
|
||||
3GPP TS 26.073
|
||||
ANSI-C code for the Adaptive Multi-Rate (AMR) speech codec
|
||||
Available from http://www.3gpp.org
|
||||
|
||||
(C) 2004, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TTA, TTC)
|
||||
Permission to distribute, modify and use this file under the standard license
|
||||
terms listed above has been obtained from the copyright holder.
|
||||
****************************************************************************************/
|
||||
/*
|
||||
|
||||
Filename: gsm_amr_typedefs.h
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
INCLUDE DESCRIPTION
|
||||
|
||||
This file contains the definition of the amr codec types.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
*/
|
||||
#ifndef GSM_AMR_TYPEDEFS_H
|
||||
#define GSM_AMR_TYPEDEFS_H
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; INCLUDES
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
#include "oscl_base.h"
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; MACROS
|
||||
; Define module specific macros here
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; DEFINES
|
||||
; Include all pre-processor statements here.
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; EXTERNAL VARIABLES REFERENCES
|
||||
; Declare variables used in this module but defined elsewhere
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; SIMPLE TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef Word8
|
||||
typedef int8 Word8;
|
||||
#endif
|
||||
|
||||
#ifndef UWord8
|
||||
typedef uint8 UWord8;
|
||||
#endif
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; Define 16 bit signed and unsigned words
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef Word16
|
||||
typedef int16 Word16;
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef UWord16
|
||||
typedef uint16 UWord16;
|
||||
|
||||
#endif
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; Define 32 bit signed and unsigned words
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef Word32
|
||||
typedef int32 Word32;
|
||||
#endif
|
||||
|
||||
#ifndef UWord32
|
||||
typedef uint32 UWord32;
|
||||
#endif
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; Define boolean type
|
||||
----------------------------------------------------------------------------*/
|
||||
#ifndef Bool
|
||||
typedef int Bool;
|
||||
#endif
|
||||
|
||||
#ifndef FALSE
|
||||
#define FALSE 0
|
||||
#endif
|
||||
|
||||
#ifndef TRUE
|
||||
#define TRUE 1
|
||||
#endif
|
||||
|
||||
#ifndef OFF
|
||||
#define OFF 0
|
||||
#endif
|
||||
|
||||
#ifndef ON
|
||||
#define ON 1
|
||||
#endif
|
||||
|
||||
#ifndef NO
|
||||
#define NO 0
|
||||
#endif
|
||||
|
||||
#ifndef YES
|
||||
#define YES 1
|
||||
#endif
|
||||
|
||||
#ifndef SUCCESS
|
||||
#define SUCCESS 0
|
||||
#endif
|
||||
|
||||
#ifndef NULL
|
||||
#define NULL 0
|
||||
#endif
|
||||
|
||||
#ifndef Flag
|
||||
typedef int32 Flag;
|
||||
#endif
|
||||
|
||||
#endif /* GSM_AMR_TYPEDEFS_H */
|
||||
@@ -0,0 +1,201 @@
|
||||
/* ------------------------------------------------------------------
|
||||
* Copyright (C) 1998-2009 PacketVideo
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
||||
* express or implied.
|
||||
* See the License for the specific language governing permissions
|
||||
* and limitations under the License.
|
||||
* -------------------------------------------------------------------
|
||||
*/
|
||||
/****************************************************************************************
|
||||
Portions of this file are derived from the following 3GPP standard:
|
||||
|
||||
3GPP TS 26.073
|
||||
ANSI-C code for the Adaptive Multi-Rate (AMR) speech codec
|
||||
Available from http://www.3gpp.org
|
||||
|
||||
(C) 2004, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TTA, TTC)
|
||||
Permission to distribute, modify and use this file under the standard license
|
||||
terms listed above has been obtained from the copyright holder.
|
||||
****************************************************************************************/
|
||||
/*
|
||||
|
||||
Filename: int_lpc.h
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
INCLUDE DESCRIPTION
|
||||
|
||||
This file contains all the constant definitions and prototype definitions
|
||||
needed by the lsp_avg.c
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; CONTINUE ONLY IF NOT ALREADY DEFINED
|
||||
----------------------------------------------------------------------------*/
|
||||
#ifndef int_lpc_h
|
||||
#define int_lpc_h "$Id $"
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; INCLUDES
|
||||
----------------------------------------------------------------------------*/
|
||||
#include "typedef.h"
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; MACROS
|
||||
; Define module specific macros here
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; DEFINES
|
||||
; Include all pre-processor statements here.
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; EXTERNAL VARIABLES REFERENCES
|
||||
; Declare variables used in this module but defined elsewhere
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; SIMPLE TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; ENUMERATED TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; STRUCTURES TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; GLOBAL FUNCTION DEFINITIONS
|
||||
; Function Prototype declaration
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*
|
||||
**************************************************************************
|
||||
*
|
||||
* Function : Int_lpc_1and3
|
||||
* Purpose : Interpolates the LSPs and converts to LPC parameters
|
||||
* to get a different LP filter in each subframe.
|
||||
* Description : The 20 ms speech frame is divided into 4 subframes.
|
||||
* The LSPs are quantized and transmitted at the 2nd and
|
||||
* 4th subframes (twice per frame) and interpolated at the
|
||||
* 1st and 3rd subframe.
|
||||
*
|
||||
* |------|------|------|------|
|
||||
* sf1 sf2 sf3 sf4
|
||||
* F0 Fm F1
|
||||
*
|
||||
* sf1: 1/2 Fm + 1/2 F0 sf3: 1/2 F1 + 1/2 Fm
|
||||
* sf2: Fm sf4: F1
|
||||
* Returns : void
|
||||
*
|
||||
**************************************************************************
|
||||
*/
|
||||
OSCL_IMPORT_REF void Int_lpc_1and3(
|
||||
Word16 lsp_old[], /* i : LSP vector at the 4th subfr. of past frame (M) */
|
||||
Word16 lsp_mid[], /* i : LSP vector at the 2nd subfr. of
|
||||
present frame (M) */
|
||||
Word16 lsp_new[], /* i : LSP vector at the 4th subfr. of
|
||||
present frame (M) */
|
||||
Word16 Az[], /* o : interpolated LP parameters in all subfr.
|
||||
(AZ_SIZE) */
|
||||
Flag *pOverflow
|
||||
);
|
||||
|
||||
/*
|
||||
**************************************************************************
|
||||
*
|
||||
* Function : Int_lpc_1and3_2
|
||||
* Purpose : Interpolation of the LPC parameters. Same as the Int_lpc
|
||||
* function but we do not recompute Az() for subframe 2 and
|
||||
* 4 because it is already available.
|
||||
* Returns : void
|
||||
*
|
||||
**************************************************************************
|
||||
*/
|
||||
void Int_lpc_1and3_2(
|
||||
Word16 lsp_old[], /* i : LSP vector at the 4th subfr. of past frame (M) */
|
||||
Word16 lsp_mid[], /* i : LSP vector at the 2nd subframe of
|
||||
present frame (M) */
|
||||
Word16 lsp_new[], /* i : LSP vector at the 4th subframe of
|
||||
present frame (M) */
|
||||
Word16 Az[], /* o :interpolated LP parameters
|
||||
in subframes 1 and 3 (AZ_SIZE) */
|
||||
Flag *pOverflow
|
||||
);
|
||||
|
||||
/*
|
||||
**************************************************************************
|
||||
*
|
||||
* Function : Int_lpc_1to3
|
||||
* Purpose : Interpolates the LSPs and converts to LPC parameters
|
||||
* to get a different LP filter in each subframe.
|
||||
* Description : The 20 ms speech frame is divided into 4 subframes.
|
||||
* The LSPs are quantized and transmitted at the 4th
|
||||
* subframes (once per frame) and interpolated at the
|
||||
* 1st, 2nd and 3rd subframe.
|
||||
*
|
||||
* |------|------|------|------|
|
||||
* sf1 sf2 sf3 sf4
|
||||
* F0 F1
|
||||
*
|
||||
* sf1: 3/4 F0 + 1/4 F1 sf3: 1/4 F0 + 3/4 F1
|
||||
* sf2: 1/2 F0 + 1/2 F1 sf4: F1
|
||||
* Returns : void
|
||||
*
|
||||
**************************************************************************
|
||||
*/
|
||||
OSCL_IMPORT_REF void Int_lpc_1to3(
|
||||
Word16 lsp_old[], /* i : LSP vector at the 4th SF of past frame (M) */
|
||||
Word16 lsp_new[], /* i : LSP vector at the 4th SF of present frame (M) */
|
||||
Word16 Az[], /* o : interpolated LP parameters in all SFs (AZ_SIZE) */
|
||||
Flag *pOverflow
|
||||
);
|
||||
|
||||
/*
|
||||
**************************************************************************
|
||||
*
|
||||
* Function : Int_lpc_1to3_2
|
||||
* Purpose : Interpolation of the LPC parameters. Same as the Int_lpc
|
||||
* function but we do not recompute Az() for subframe 4
|
||||
* because it is already available.
|
||||
* Returns : void
|
||||
*
|
||||
**************************************************************************
|
||||
*/
|
||||
void Int_lpc_1to3_2(
|
||||
Word16 lsp_old[], /* i : LSP vector at the 4th SF of past frame (M) */
|
||||
Word16 lsp_new[], /* i : LSP vector at the 4th SF present frame (M) */
|
||||
Word16 Az[], /* o :interpolated LP parameters in SFs 1, 2, 3
|
||||
(AZ_SIZE) */
|
||||
Flag *pOverflow
|
||||
);
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; END
|
||||
----------------------------------------------------------------------------*/
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _INT_LPC_H_ */
|
||||
|
||||
|
||||
@@ -0,0 +1,105 @@
|
||||
/* ------------------------------------------------------------------
|
||||
* Copyright (C) 1998-2009 PacketVideo
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
||||
* express or implied.
|
||||
* See the License for the specific language governing permissions
|
||||
* and limitations under the License.
|
||||
* -------------------------------------------------------------------
|
||||
*/
|
||||
/****************************************************************************************
|
||||
Portions of this file are derived from the following 3GPP standard:
|
||||
|
||||
3GPP TS 26.073
|
||||
ANSI-C code for the Adaptive Multi-Rate (AMR) speech codec
|
||||
Available from http://www.3gpp.org
|
||||
|
||||
(C) 2004, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TTA, TTC)
|
||||
Permission to distribute, modify and use this file under the standard license
|
||||
terms listed above has been obtained from the copyright holder.
|
||||
****************************************************************************************/
|
||||
/*
|
||||
|
||||
Filename: int_lsf.h
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
INCLUDE DESCRIPTION
|
||||
|
||||
This file contains all the constant definitions and prototype definitions
|
||||
needed by the int_lsf function.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; CONTINUE ONLY IF NOT ALREADY DEFINED
|
||||
----------------------------------------------------------------------------*/
|
||||
#ifndef int_lsf_h
|
||||
#define int_lsf_h "$Id $"
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; INCLUDES
|
||||
----------------------------------------------------------------------------*/
|
||||
#include "typedef.h"
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; MACROS
|
||||
; Define module specific macros here
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; DEFINES
|
||||
; Include all pre-processor statements here.
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; EXTERNAL VARIABLES REFERENCES
|
||||
; Declare variables used in this module but defined elsewhere
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; SIMPLE TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; ENUMERATED TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; STRUCTURES TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; GLOBAL FUNCTION DEFINITIONS
|
||||
; Function Prototype declaration
|
||||
----------------------------------------------------------------------------*/
|
||||
void Int_lsf(
|
||||
Word16 lsf_old[], /* i : LSF vector at the 4th SF of past frame */
|
||||
Word16 lsf_new[], /* i : LSF vector at the 4th SF of present frame */
|
||||
Word16 i_subfr, /* i : Current sf (equal to 0,40,80 or 120) */
|
||||
Word16 lsf_out[], /* o : interpolated LSF parameters for current sf */
|
||||
Flag *pOverflow /* o : flag set if overflow occurs */
|
||||
);
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; END
|
||||
----------------------------------------------------------------------------*/
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _INT_LSF_H_ */
|
||||
@@ -0,0 +1,100 @@
|
||||
/* ------------------------------------------------------------------
|
||||
* Copyright (C) 1998-2009 PacketVideo
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
||||
* express or implied.
|
||||
* See the License for the specific language governing permissions
|
||||
* and limitations under the License.
|
||||
* -------------------------------------------------------------------
|
||||
*/
|
||||
/****************************************************************************************
|
||||
Portions of this file are derived from the following 3GPP standard:
|
||||
|
||||
3GPP TS 26.073
|
||||
ANSI-C code for the Adaptive Multi-Rate (AMR) speech codec
|
||||
Available from http://www.3gpp.org
|
||||
|
||||
(C) 2004, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TTA, TTC)
|
||||
Permission to distribute, modify and use this file under the standard license
|
||||
terms listed above has been obtained from the copyright holder.
|
||||
****************************************************************************************/
|
||||
/*
|
||||
|
||||
Filename: inv_sqrt.h
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
INCLUDE DESCRIPTION
|
||||
|
||||
This file contains all the constant definitions and prototype definitions
|
||||
needed by the inv_sqrt() function.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#ifndef INV_SQRT_H
|
||||
#define INV_SQRT_H
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; INCLUDES
|
||||
----------------------------------------------------------------------------*/
|
||||
#include "basicop_malloc.h"
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; MACROS
|
||||
; Define module specific macros here
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; DEFINES
|
||||
; Include all pre-processor statements here.
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; EXTERNAL VARIABLES REFERENCES
|
||||
; Declare variables used in this module but defined elsewhere
|
||||
----------------------------------------------------------------------------*/
|
||||
extern const Word16 inv_sqrt_tbl[];
|
||||
/*----------------------------------------------------------------------------
|
||||
; SIMPLE TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; ENUMERATED TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; STRUCTURES TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; GLOBAL FUNCTION DEFINITIONS
|
||||
; Function Prototype declaration
|
||||
----------------------------------------------------------------------------*/
|
||||
OSCL_IMPORT_REF Word32 Inv_sqrt( /* (o) : output value */
|
||||
Word32 L_x, /* (i) : input value */
|
||||
Flag *pOverflow /* (i) : pointer to overflow flag */
|
||||
);
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; END
|
||||
----------------------------------------------------------------------------*/
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _INV_SQRT_H_ */
|
||||
|
||||
@@ -0,0 +1,137 @@
|
||||
/* ------------------------------------------------------------------
|
||||
* Copyright (C) 1998-2010 PacketVideo
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
||||
* express or implied.
|
||||
* See the License for the specific language governing permissions
|
||||
* and limitations under the License.
|
||||
* -------------------------------------------------------------------
|
||||
*/
|
||||
/****************************************************************************************
|
||||
Portions of this file are derived from the following 3GPP standard:
|
||||
|
||||
3GPP TS 26.073
|
||||
ANSI-C code for the Adaptive Multi-Rate (AMR) speech codec
|
||||
Available from http://www.3gpp.org
|
||||
|
||||
(C) 2004, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TTA, TTC)
|
||||
Permission to distribute, modify and use this file under the standard license
|
||||
terms listed above has been obtained from the copyright holder.
|
||||
****************************************************************************************/
|
||||
/*
|
||||
|
||||
Filename: l_add.h
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
INCLUDE DESCRIPTION
|
||||
|
||||
This file contains all the constant definitions and prototype definitions
|
||||
needed by the L_add function.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; CONTINUE ONLY IF NOT ALREADY DEFINED
|
||||
----------------------------------------------------------------------------*/
|
||||
#ifndef L_ADD_H
|
||||
#define L_ADD_H
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; INCLUDES
|
||||
----------------------------------------------------------------------------*/
|
||||
#include "basicop_malloc.h"
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; MACROS
|
||||
; Define module specific macros here
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; DEFINES
|
||||
; Include all pre-processor statements here.
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; EXTERNAL VARIABLES REFERENCES
|
||||
; Declare variables used in this module but defined elsewhere
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; SIMPLE TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; ENUMERATED TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; STRUCTURES TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; GLOBAL FUNCTION DEFINITIONS
|
||||
; Function Prototype declaration
|
||||
----------------------------------------------------------------------------*/
|
||||
#if ((PV_CPU_ARCH_VERSION >=5) && (PV_COMPILER == EPV_ARM_GNUC))/* Instructions for ARM-linux cross-compiler*/
|
||||
__inline Word32 L_add(register Word32 L_var1, register Word32 L_var2, Flag *pOverflow)
|
||||
{
|
||||
register Word32 ra = L_var1;
|
||||
register Word32 rb = L_var2;
|
||||
Word32 result;
|
||||
|
||||
OSCL_UNUSED_ARG(pOverflow);
|
||||
|
||||
asm volatile("qadd %0, %1, %2"
|
||||
: "=r"(result)
|
||||
: "r"(ra), "r"(rb)
|
||||
);
|
||||
return (result);
|
||||
|
||||
}
|
||||
|
||||
#else /* C EQUIVALENT */
|
||||
|
||||
|
||||
static inline Word32 L_add(register Word32 L_var1, register Word32 L_var2, Flag *pOverflow)
|
||||
{
|
||||
Word32 L_sum;
|
||||
|
||||
L_sum = L_var1 + L_var2;
|
||||
|
||||
if ((L_var1 ^ L_var2) >= 0)
|
||||
{
|
||||
if ((L_sum ^ L_var1) < 0)
|
||||
{
|
||||
L_sum = (L_var1 < 0) ? MIN_32 : MAX_32;
|
||||
*pOverflow = 1;
|
||||
}
|
||||
}
|
||||
|
||||
return (L_sum);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; END
|
||||
----------------------------------------------------------------------------*/
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _L_ADD_H_ */
|
||||
@@ -0,0 +1,101 @@
|
||||
/* ------------------------------------------------------------------
|
||||
* Copyright (C) 1998-2009 PacketVideo
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
||||
* express or implied.
|
||||
* See the License for the specific language governing permissions
|
||||
* and limitations under the License.
|
||||
* -------------------------------------------------------------------
|
||||
*/
|
||||
/****************************************************************************************
|
||||
Portions of this file are derived from the following 3GPP standard:
|
||||
|
||||
3GPP TS 26.073
|
||||
ANSI-C code for the Adaptive Multi-Rate (AMR) speech codec
|
||||
Available from http://www.3gpp.org
|
||||
|
||||
(C) 2004, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TTA, TTC)
|
||||
Permission to distribute, modify and use this file under the standard license
|
||||
terms listed above has been obtained from the copyright holder.
|
||||
****************************************************************************************/
|
||||
/*
|
||||
|
||||
Filename: l_add_c.h
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
INCLUDE DESCRIPTION
|
||||
|
||||
This file contains all the constant definitions and prototype definitions
|
||||
needed by the L_add_c function.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; CONTINUE ONLY IF NOT ALREADY DEFINED
|
||||
----------------------------------------------------------------------------*/
|
||||
#ifndef L_ADD_C_H
|
||||
#define L_ADD_C_H
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; INCLUDES
|
||||
----------------------------------------------------------------------------*/
|
||||
#include "basicop_malloc.h"
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; MACROS
|
||||
; Define module specific macros here
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; DEFINES
|
||||
; Include all pre-processor statements here.
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; EXTERNAL VARIABLES REFERENCES
|
||||
; Declare variables used in this module but defined elsewhere
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; SIMPLE TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; ENUMERATED TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; STRUCTURES TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; GLOBAL FUNCTION DEFINITIONS
|
||||
; Function Prototype declaration
|
||||
----------------------------------------------------------------------------*/
|
||||
Word32 L_add_c(Word32 L_var1, Word32 L_var2, Flag *pOverflow, Flag *pCarry);
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; END
|
||||
----------------------------------------------------------------------------*/
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _L_ADD_C_H_ */
|
||||
|
||||
|
||||
@@ -0,0 +1,101 @@
|
||||
/* ------------------------------------------------------------------
|
||||
* Copyright (C) 1998-2009 PacketVideo
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
||||
* express or implied.
|
||||
* See the License for the specific language governing permissions
|
||||
* and limitations under the License.
|
||||
* -------------------------------------------------------------------
|
||||
*/
|
||||
/****************************************************************************************
|
||||
Portions of this file are derived from the following 3GPP standard:
|
||||
|
||||
3GPP TS 26.073
|
||||
ANSI-C code for the Adaptive Multi-Rate (AMR) speech codec
|
||||
Available from http://www.3gpp.org
|
||||
|
||||
(C) 2004, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TTA, TTC)
|
||||
Permission to distribute, modify and use this file under the standard license
|
||||
terms listed above has been obtained from the copyright holder.
|
||||
****************************************************************************************/
|
||||
/*
|
||||
|
||||
Filename: l_comp.h
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
INCLUDE DESCRIPTION
|
||||
|
||||
This file contains all the constant definitions and prototype definitions
|
||||
needed by the L_comp function.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; CONTINUE ONLY IF NOT ALREADY DEFINED
|
||||
----------------------------------------------------------------------------*/
|
||||
#ifndef L_COMP_H
|
||||
#define L_COMP_H
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; INCLUDES
|
||||
----------------------------------------------------------------------------*/
|
||||
#include "typedef.h"
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; MACROS
|
||||
; Define module specific macros here
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; DEFINES
|
||||
; Include all pre-processor statements here.
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; EXTERNAL VARIABLES REFERENCES
|
||||
; Declare variables used in this module but defined elsewhere
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; SIMPLE TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; ENUMERATED TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; STRUCTURES TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; GLOBAL FUNCTION DEFINITIONS
|
||||
; Function Prototype declaration
|
||||
----------------------------------------------------------------------------*/
|
||||
Word32 L_Comp(Word16 hi, Word16 lo, Flag *pOverflow);
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; END
|
||||
----------------------------------------------------------------------------*/
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,130 @@
|
||||
/* ------------------------------------------------------------------
|
||||
* Copyright (C) 1998-2009 PacketVideo
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
||||
* express or implied.
|
||||
* See the License for the specific language governing permissions
|
||||
* and limitations under the License.
|
||||
* -------------------------------------------------------------------
|
||||
*/
|
||||
/****************************************************************************************
|
||||
Portions of this file are derived from the following 3GPP standard:
|
||||
|
||||
3GPP TS 26.073
|
||||
ANSI-C code for the Adaptive Multi-Rate (AMR) speech codec
|
||||
Available from http://www.3gpp.org
|
||||
|
||||
(C) 2004, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TTA, TTC)
|
||||
Permission to distribute, modify and use this file under the standard license
|
||||
terms listed above has been obtained from the copyright holder.
|
||||
****************************************************************************************/
|
||||
/*
|
||||
Filename: l_deposit_h.cpp
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
INPUT AND OUTPUT DEFINITIONS
|
||||
|
||||
Inputs:
|
||||
var1 = 16 bit short signed integer (Word16) whose value falls in
|
||||
the range : 0xffff 8000 <= var1 <= 0x0000 7fff.
|
||||
|
||||
Local Stores/Buffers/Pointers Needed:
|
||||
None
|
||||
|
||||
Global Stores/Buffers/Pointers Needed:
|
||||
None
|
||||
|
||||
Outputs:
|
||||
var1 = deposit of var1 into MSWord of 32 bit value (Word32)
|
||||
|
||||
Pointers and Buffers Modified:
|
||||
None
|
||||
|
||||
Local Stores Modified:
|
||||
None
|
||||
|
||||
Global Stores Modified:
|
||||
None
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
FUNCTION DESCRIPTION
|
||||
|
||||
This function deposits the 16 bit var1 into the 16 MS bits of the 32 bit
|
||||
output. The 16 LS bits of the output are zeroed.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
REQUIREMENTS
|
||||
|
||||
None
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
REFERENCES
|
||||
|
||||
[1] basicop2.c, ETS Version 2.0.0, February 8, 1999
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
PSEUDO-CODE
|
||||
|
||||
Word32 L_deposit_h (Word16 var1)
|
||||
{
|
||||
Word32 L_var_out;
|
||||
|
||||
L_var_out = (Word32) var1 << 16;
|
||||
#if (WMOPS)
|
||||
multiCounter[currCounter].L_deposit_h++;
|
||||
#endif
|
||||
return (L_var_out);
|
||||
}
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; INCLUDES
|
||||
----------------------------------------------------------------------------*/
|
||||
#include "basic_op.h"
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; MACROS
|
||||
; Define module specific macros here
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; DEFINES
|
||||
; Include all pre-processor statements here. Include conditional
|
||||
; compile variables also.
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; LOCAL FUNCTION DEFINITIONS
|
||||
; Function Prototype declaration
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; LOCAL STORE/BUFFER/POINTER DEFINITIONS
|
||||
; Variable declaration - defined here and used outside this module
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; EXTERNAL FUNCTION REFERENCES
|
||||
; Declare functions defined elsewhere and referenced in this module
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; EXTERNAL GLOBAL STORE/BUFFER/POINTER REFERENCES
|
||||
; Declare variables used in this module but defined elsewhere
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; FUNCTION CODE
|
||||
----------------------------------------------------------------------------*/
|
||||
Word32 L_deposit_h(Word16 var1);
|
||||
@@ -0,0 +1,130 @@
|
||||
/* ------------------------------------------------------------------
|
||||
* Copyright (C) 1998-2009 PacketVideo
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
||||
* express or implied.
|
||||
* See the License for the specific language governing permissions
|
||||
* and limitations under the License.
|
||||
* -------------------------------------------------------------------
|
||||
*/
|
||||
/****************************************************************************************
|
||||
Portions of this file are derived from the following 3GPP standard:
|
||||
|
||||
3GPP TS 26.073
|
||||
ANSI-C code for the Adaptive Multi-Rate (AMR) speech codec
|
||||
Available from http://www.3gpp.org
|
||||
|
||||
(C) 2004, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TTA, TTC)
|
||||
Permission to distribute, modify and use this file under the standard license
|
||||
terms listed above has been obtained from the copyright holder.
|
||||
****************************************************************************************/
|
||||
/*
|
||||
Filename: l_deposit_l.cpp
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
INPUT AND OUTPUT DEFINITIONS
|
||||
|
||||
Inputs:
|
||||
var1 = 16 bit short signed integer (Word16) whose value falls in
|
||||
the range : 0xffff 8000 <= var1 <= 0x0000 7fff.
|
||||
|
||||
Local Stores/Buffers/Pointers Needed:
|
||||
None
|
||||
|
||||
Global Stores/Buffers/Pointers Needed:
|
||||
None
|
||||
|
||||
Outputs:
|
||||
var1 = deposit of var1 into LSWord of 32 bit value (Word32)
|
||||
|
||||
Pointers and Buffers Modified:
|
||||
None
|
||||
|
||||
Local Stores Modified:
|
||||
None
|
||||
|
||||
Global Stores Modified:
|
||||
None
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
FUNCTION DESCRIPTION
|
||||
|
||||
This function deposits the 16 bit var1 into the 16 LS bits of the 32 bit
|
||||
output. The 16 MS bits of the output are sign extended.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
REQUIREMENTS
|
||||
|
||||
None
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
REFERENCES
|
||||
|
||||
[1] basicop2.c, ETS Version 2.0.0, February 8, 1999
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
PSEUDO-CODE
|
||||
|
||||
Word32 L_deposit_l (Word16 var1)
|
||||
{
|
||||
Word32 L_var_out;
|
||||
|
||||
L_var_out = (Word32) var1;
|
||||
#if (WMOPS)
|
||||
multiCounter[currCounter].L_deposit_l++;
|
||||
#endif
|
||||
return (L_var_out);
|
||||
}
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; INCLUDES
|
||||
----------------------------------------------------------------------------*/
|
||||
#include "basic_op.h"
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; MACROS
|
||||
; Define module specific macros here
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; DEFINES
|
||||
; Include all pre-processor statements here. Include conditional
|
||||
; compile variables also.
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; LOCAL FUNCTION DEFINITIONS
|
||||
; Function Prototype declaration
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; LOCAL STORE/BUFFER/POINTER DEFINITIONS
|
||||
; Variable declaration - defined here and used outside this module
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; EXTERNAL FUNCTION REFERENCES
|
||||
; Declare functions defined elsewhere and referenced in this module
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; EXTERNAL GLOBAL STORE/BUFFER/POINTER REFERENCES
|
||||
; Declare variables used in this module but defined elsewhere
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; FUNCTION CODE
|
||||
----------------------------------------------------------------------------*/
|
||||
Word32 L_deposit_l(Word16 var1);
|
||||
@@ -0,0 +1,103 @@
|
||||
/* ------------------------------------------------------------------
|
||||
* Copyright (C) 1998-2009 PacketVideo
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
||||
* express or implied.
|
||||
* See the License for the specific language governing permissions
|
||||
* and limitations under the License.
|
||||
* -------------------------------------------------------------------
|
||||
*/
|
||||
/****************************************************************************************
|
||||
Portions of this file are derived from the following 3GPP standard:
|
||||
|
||||
3GPP TS 26.073
|
||||
ANSI-C code for the Adaptive Multi-Rate (AMR) speech codec
|
||||
Available from http://www.3gpp.org
|
||||
|
||||
(C) 2004, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TTA, TTC)
|
||||
Permission to distribute, modify and use this file under the standard license
|
||||
terms listed above has been obtained from the copyright holder.
|
||||
****************************************************************************************/
|
||||
/*
|
||||
|
||||
Filename: l_extract.h
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
INCLUDE DESCRIPTION
|
||||
|
||||
This file contains all the constant definitions and prototype definitions
|
||||
needed by the L_extract function.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; CONTINUE ONLY IF NOT ALREADY DEFINED
|
||||
----------------------------------------------------------------------------*/
|
||||
#ifndef L_EXTRACT_H
|
||||
#define L_EXTRACT_H
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; INCLUDES
|
||||
----------------------------------------------------------------------------*/
|
||||
#include "typedef.h"
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; MACROS
|
||||
; Define module specific macros here
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; DEFINES
|
||||
; Include all pre-processor statements here.
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; EXTERNAL VARIABLES REFERENCES
|
||||
; Declare variables used in this module but defined elsewhere
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; SIMPLE TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; ENUMERATED TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; STRUCTURES TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; GLOBAL FUNCTION DEFINITIONS
|
||||
; Function Prototype declaration
|
||||
----------------------------------------------------------------------------*/
|
||||
void L_Extract(Word32 L_var,
|
||||
Word16 *pL_var_hi,
|
||||
Word16 *pL_var_lo,
|
||||
Flag *pOverflow);
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; END
|
||||
----------------------------------------------------------------------------*/
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _L_EXTRACT_H_ */
|
||||
@@ -0,0 +1,152 @@
|
||||
/* ------------------------------------------------------------------
|
||||
* Copyright (C) 1998-2010 PacketVideo
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
||||
* express or implied.
|
||||
* See the License for the specific language governing permissions
|
||||
* and limitations under the License.
|
||||
* -------------------------------------------------------------------
|
||||
*/
|
||||
/****************************************************************************************
|
||||
Portions of this file are derived from the following 3GPP standard:
|
||||
|
||||
3GPP TS 26.073
|
||||
ANSI-C code for the Adaptive Multi-Rate (AMR) speech codec
|
||||
Available from http://www.3gpp.org
|
||||
|
||||
(C) 2004, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TTA, TTC)
|
||||
Permission to distribute, modify and use this file under the standard license
|
||||
terms listed above has been obtained from the copyright holder.
|
||||
****************************************************************************************/
|
||||
/*
|
||||
Filename: l_mac.h
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
INCLUDE DESCRIPTION
|
||||
|
||||
This file contains all the constant definitions and prototype definitions
|
||||
needed by the L_mac function.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; CONTINUE ONLY IF NOT ALREADY DEFINED
|
||||
----------------------------------------------------------------------------*/
|
||||
#ifndef L_MAC_H
|
||||
#define L_MAC_H
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; INCLUDES
|
||||
----------------------------------------------------------------------------*/
|
||||
#include "basicop_malloc.h"
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; MACROS
|
||||
; Define module specific macros here
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; DEFINES
|
||||
; Include all pre-processor statements here.
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; EXTERNAL VARIABLES REFERENCES
|
||||
; Declare variables used in this module but defined elsewhere
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; SIMPLE TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; ENUMERATED TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; STRUCTURES TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; GLOBAL FUNCTION DEFINITIONS
|
||||
; Function Prototype declaration
|
||||
----------------------------------------------------------------------------*/
|
||||
#if ((PV_CPU_ARCH_VERSION >=5) && (PV_COMPILER == EPV_ARM_GNUC))/* Instructions for ARM-linux cross-compiler*/
|
||||
|
||||
static inline Word32 L_mac(Word32 L_var3, Word16 var1, Word16 var2, Flag *pOverflow)
|
||||
{
|
||||
register Word32 ra = L_var3;
|
||||
register Word32 rb = var1;
|
||||
register Word32 rc = var2;
|
||||
Word32 result;
|
||||
|
||||
OSCL_UNUSED_ARG(pOverflow);
|
||||
|
||||
asm volatile("smulbb %0, %1, %2"
|
||||
: "=r"(result)
|
||||
: "r"(rb), "r"(rc)
|
||||
);
|
||||
|
||||
asm volatile("qdadd %0, %1, %2"
|
||||
: "=r"(rc)
|
||||
: "r"(ra), "r"(result)
|
||||
);
|
||||
|
||||
return (rc);
|
||||
}
|
||||
|
||||
#else /* C_EQUIVALENT */
|
||||
|
||||
__inline Word32 L_mac(Word32 L_var3, Word16 var1, Word16 var2, Flag *pOverflow)
|
||||
{
|
||||
Word32 result;
|
||||
Word32 L_sum;
|
||||
result = (Word32) var1 * var2;
|
||||
if (result != (Word32) 0x40000000L)
|
||||
{
|
||||
L_sum = (result << 1) + L_var3;
|
||||
|
||||
/* Check if L_sum and L_var_3 share the same sign */
|
||||
if ((L_var3 ^ result) > 0)
|
||||
{
|
||||
if ((L_sum ^ L_var3) < 0)
|
||||
{
|
||||
L_sum = (L_var3 < 0) ? MIN_32 : MAX_32;
|
||||
*pOverflow = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
*pOverflow = 1;
|
||||
L_sum = MAX_32;
|
||||
}
|
||||
return (L_sum);
|
||||
}
|
||||
|
||||
#endif
|
||||
/*----------------------------------------------------------------------------
|
||||
; END
|
||||
----------------------------------------------------------------------------*/
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _L_MAC_H_ */
|
||||
|
||||
|
||||
@@ -0,0 +1,137 @@
|
||||
/* ------------------------------------------------------------------
|
||||
* Copyright (C) 1998-2010 PacketVideo
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
||||
* express or implied.
|
||||
* See the License for the specific language governing permissions
|
||||
* and limitations under the License.
|
||||
* -------------------------------------------------------------------
|
||||
*/
|
||||
/****************************************************************************************
|
||||
Portions of this file are derived from the following 3GPP standard:
|
||||
|
||||
3GPP TS 26.073
|
||||
ANSI-C code for the Adaptive Multi-Rate (AMR) speech codec
|
||||
Available from http://www.3gpp.org
|
||||
|
||||
(C) 2004, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TTA, TTC)
|
||||
Permission to distribute, modify and use this file under the standard license
|
||||
terms listed above has been obtained from the copyright holder.
|
||||
****************************************************************************************/
|
||||
/*
|
||||
Filename: l_msu.h
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
INCLUDE DESCRIPTION
|
||||
|
||||
This file contains all the constant definitions and prototype definitions
|
||||
needed by the L_msu function.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; CONTINUE ONLY IF NOT ALREADY DEFINED
|
||||
----------------------------------------------------------------------------*/
|
||||
#ifndef L_MSU_H
|
||||
#define L_MSU_H
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; INCLUDES
|
||||
----------------------------------------------------------------------------*/
|
||||
#include "basicop_malloc.h"
|
||||
#include "l_mult.h"
|
||||
#include "l_sub.h"
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; MACROS
|
||||
; Define module specific macros here
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; DEFINES
|
||||
; Include all pre-processor statements here.
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; EXTERNAL VARIABLES REFERENCES
|
||||
; Declare variables used in this module but defined elsewhere
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; SIMPLE TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; ENUMERATED TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; STRUCTURES TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; GLOBAL FUNCTION DEFINITIONS
|
||||
; Function Prototype declaration
|
||||
----------------------------------------------------------------------------*/
|
||||
#if ((PV_CPU_ARCH_VERSION >=5) && (PV_COMPILER == EPV_ARM_GNUC))/* Instructions for ARM-linux cross-compiler*/
|
||||
|
||||
__inline Word32 L_msu(Word32 L_var3, Word16 var1, Word16 var2, Flag *pOverflow)
|
||||
{
|
||||
register Word32 ra = L_var3;
|
||||
register Word32 rb = var1;
|
||||
register Word32 rc = var2;
|
||||
Word32 product;
|
||||
Word32 result;
|
||||
|
||||
OSCL_UNUSED_ARG(pOverflow);
|
||||
|
||||
asm volatile("smulbb %0, %1, %2"
|
||||
: "=r"(product)
|
||||
: "r"(rb), "r"(rc)
|
||||
);
|
||||
|
||||
asm volatile("qdsub %0, %1, %2"
|
||||
: "=r"(result)
|
||||
: "r"(ra), "r"(product)
|
||||
);
|
||||
|
||||
return (result);
|
||||
}
|
||||
|
||||
#else /* C EQUIVALENT */
|
||||
|
||||
static inline Word32 L_msu(Word32 L_var3, Word16 var1, Word16 var2, Flag *pOverflow)
|
||||
{
|
||||
Word32 result;
|
||||
|
||||
result = L_mult(var1, var2, pOverflow);
|
||||
result = L_sub(L_var3, result, pOverflow);
|
||||
|
||||
return (result);
|
||||
}
|
||||
|
||||
#endif
|
||||
/*----------------------------------------------------------------------------
|
||||
; END
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _L_MSU_H_ */
|
||||
@@ -0,0 +1,143 @@
|
||||
/* ------------------------------------------------------------------
|
||||
* Copyright (C) 1998-2010 PacketVideo
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
||||
* express or implied.
|
||||
* See the License for the specific language governing permissions
|
||||
* and limitations under the License.
|
||||
* -------------------------------------------------------------------
|
||||
*/
|
||||
/****************************************************************************************
|
||||
Portions of this file are derived from the following 3GPP standard:
|
||||
|
||||
3GPP TS 26.073
|
||||
ANSI-C code for the Adaptive Multi-Rate (AMR) speech codec
|
||||
Available from http://www.3gpp.org
|
||||
|
||||
(C) 2004, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TTA, TTC)
|
||||
Permission to distribute, modify and use this file under the standard license
|
||||
terms listed above has been obtained from the copyright holder.
|
||||
****************************************************************************************/
|
||||
/*
|
||||
|
||||
Filename: l_mult.h
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
INCLUDE DESCRIPTION
|
||||
|
||||
This file contains all the constant definitions and prototype definitions
|
||||
needed by the L_mult function.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; CONTINUE ONLY IF NOT ALREADY DEFINED
|
||||
----------------------------------------------------------------------------*/
|
||||
#ifndef L_MULT_H
|
||||
#define L_MULT_H
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; INCLUDES
|
||||
----------------------------------------------------------------------------*/
|
||||
#include "basicop_malloc.h"
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; MACROS
|
||||
; Define module specific macros here
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; DEFINES
|
||||
; Include all pre-processor statements here.
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; EXTERNAL VARIABLES REFERENCES
|
||||
; Declare variables used in this module but defined elsewhere
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; SIMPLE TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; ENUMERATED TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; STRUCTURES TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; GLOBAL FUNCTION DEFINITIONS
|
||||
; Function Prototype declaration
|
||||
----------------------------------------------------------------------------*/
|
||||
#if ((PV_CPU_ARCH_VERSION >=5) && (PV_COMPILER == EPV_ARM_GNUC))/* Instructions for ARM-linux cross-compiler*/
|
||||
|
||||
__inline Word32 L_mult(Word16 var1, Word16 var2, Flag *pOverflow)
|
||||
{
|
||||
register Word32 ra = var1;
|
||||
register Word32 rb = var2;
|
||||
Word32 result;
|
||||
Word32 product;
|
||||
|
||||
OSCL_UNUSED_ARG(pOverflow);
|
||||
|
||||
asm volatile("smulbb %0, %1, %2"
|
||||
: "=r"(product)
|
||||
: "r"(ra), "r"(rb)
|
||||
);
|
||||
|
||||
asm volatile("qadd %0, %1, %2"
|
||||
: "=r"(result)
|
||||
: "r"(product), "r"(product)
|
||||
);
|
||||
|
||||
return(result);
|
||||
}
|
||||
|
||||
#else /* C EQUIVALENT */
|
||||
|
||||
static inline Word32 L_mult(Word16 var1, Word16 var2, Flag *pOverflow)
|
||||
{
|
||||
register Word32 L_product;
|
||||
|
||||
L_product = (Word32) var1 * var2;
|
||||
|
||||
if (L_product != (Word32) 0x40000000L)
|
||||
{
|
||||
L_product <<= 1; /* Multiply by 2 */
|
||||
}
|
||||
else
|
||||
{
|
||||
*pOverflow = 1;
|
||||
L_product = MAX_32;
|
||||
}
|
||||
|
||||
return (L_product);
|
||||
}
|
||||
#endif
|
||||
/*----------------------------------------------------------------------------
|
||||
; END
|
||||
----------------------------------------------------------------------------*/
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _L_MULT_H */
|
||||
|
||||
@@ -0,0 +1,101 @@
|
||||
/* ------------------------------------------------------------------
|
||||
* Copyright (C) 1998-2009 PacketVideo
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
||||
* express or implied.
|
||||
* See the License for the specific language governing permissions
|
||||
* and limitations under the License.
|
||||
* -------------------------------------------------------------------
|
||||
*/
|
||||
/****************************************************************************************
|
||||
Portions of this file are derived from the following 3GPP standard:
|
||||
|
||||
3GPP TS 26.073
|
||||
ANSI-C code for the Adaptive Multi-Rate (AMR) speech codec
|
||||
Available from http://www.3gpp.org
|
||||
|
||||
(C) 2004, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TTA, TTC)
|
||||
Permission to distribute, modify and use this file under the standard license
|
||||
terms listed above has been obtained from the copyright holder.
|
||||
****************************************************************************************/
|
||||
/*
|
||||
|
||||
Filename: l_negate.h
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
INCLUDE DESCRIPTION
|
||||
|
||||
This file contains all the constant definitions and prototype definitions
|
||||
needed by the L_negate function.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; CONTINUE ONLY IF NOT ALREADY DEFINED
|
||||
----------------------------------------------------------------------------*/
|
||||
#ifndef L_NEGATE_H
|
||||
#define L_NEGATE_H
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; INCLUDES
|
||||
----------------------------------------------------------------------------*/
|
||||
#include "basicop_malloc.h"
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; MACROS
|
||||
; Define module specific macros here
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; DEFINES
|
||||
; Include all pre-processor statements here.
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; EXTERNAL VARIABLES REFERENCES
|
||||
; Declare variables used in this module but defined elsewhere
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; SIMPLE TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; ENUMERATED TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; STRUCTURES TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; GLOBAL FUNCTION DEFINITIONS
|
||||
; Function Prototype declaration
|
||||
----------------------------------------------------------------------------*/
|
||||
Word32 L_negate(Word32 L_var1);
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; END
|
||||
----------------------------------------------------------------------------*/
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -0,0 +1,102 @@
|
||||
/* ------------------------------------------------------------------
|
||||
* Copyright (C) 1998-2009 PacketVideo
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
||||
* express or implied.
|
||||
* See the License for the specific language governing permissions
|
||||
* and limitations under the License.
|
||||
* -------------------------------------------------------------------
|
||||
*/
|
||||
/****************************************************************************************
|
||||
Portions of this file are derived from the following 3GPP standard:
|
||||
|
||||
3GPP TS 26.073
|
||||
ANSI-C code for the Adaptive Multi-Rate (AMR) speech codec
|
||||
Available from http://www.3gpp.org
|
||||
|
||||
(C) 2004, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TTA, TTC)
|
||||
Permission to distribute, modify and use this file under the standard license
|
||||
terms listed above has been obtained from the copyright holder.
|
||||
****************************************************************************************/
|
||||
/*
|
||||
|
||||
Filename: l_shl.h
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
INCLUDE DESCRIPTION
|
||||
|
||||
This file contains all the constant definitions and prototype definitions
|
||||
needed by the L_shl function.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; CONTINUE ONLY IF NOT ALREADY DEFINED
|
||||
----------------------------------------------------------------------------*/
|
||||
#ifndef L_SHL_H
|
||||
#define L_SHL_H
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; INCLUDES
|
||||
----------------------------------------------------------------------------*/
|
||||
#include "basicop_malloc.h"
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; MACROS
|
||||
; Define module specific macros here
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; DEFINES
|
||||
; Include all pre-processor statements here.
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; EXTERNAL VARIABLES REFERENCES
|
||||
; Declare variables used in this module but defined elsewhere
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; SIMPLE TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; ENUMERATED TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; STRUCTURES TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; GLOBAL FUNCTION DEFINITIONS
|
||||
; Function Prototype declaration
|
||||
----------------------------------------------------------------------------*/
|
||||
Word32 L_shl(Word32 L_var1, Word16 var2, Flag *pOverflow);
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; END
|
||||
----------------------------------------------------------------------------*/
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _L_SHL_H_ */
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,101 @@
|
||||
/* ------------------------------------------------------------------
|
||||
* Copyright (C) 1998-2009 PacketVideo
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
||||
* express or implied.
|
||||
* See the License for the specific language governing permissions
|
||||
* and limitations under the License.
|
||||
* -------------------------------------------------------------------
|
||||
*/
|
||||
/****************************************************************************************
|
||||
Portions of this file are derived from the following 3GPP standard:
|
||||
|
||||
3GPP TS 26.073
|
||||
ANSI-C code for the Adaptive Multi-Rate (AMR) speech codec
|
||||
Available from http://www.3gpp.org
|
||||
|
||||
(C) 2004, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TTA, TTC)
|
||||
Permission to distribute, modify and use this file under the standard license
|
||||
terms listed above has been obtained from the copyright holder.
|
||||
****************************************************************************************/
|
||||
/*
|
||||
Filename: l_shr.h
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
INCLUDE DESCRIPTION
|
||||
|
||||
This file contains all the constant definitions and prototype definitions
|
||||
needed by the L_shr function.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; CONTINUE ONLY IF NOT ALREADY DEFINED
|
||||
----------------------------------------------------------------------------*/
|
||||
#ifndef L_SHR_H
|
||||
#define L_SHR_H
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; INCLUDES
|
||||
----------------------------------------------------------------------------*/
|
||||
#include "basicop_malloc.h"
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; MACROS
|
||||
; Define module specific macros here
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; DEFINES
|
||||
; Include all pre-processor statements here.
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; EXTERNAL VARIABLES REFERENCES
|
||||
; Declare variables used in this module but defined elsewhere
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; SIMPLE TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; ENUMERATED TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; STRUCTURES TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; GLOBAL FUNCTION DEFINITIONS
|
||||
; Function Prototype declaration
|
||||
----------------------------------------------------------------------------*/
|
||||
Word32 L_shr(Word32 L_var1, Word16 var2, Flag *pOverflow);
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; END
|
||||
----------------------------------------------------------------------------*/
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _L_SHR_H_ */
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,100 @@
|
||||
/* ------------------------------------------------------------------
|
||||
* Copyright (C) 1998-2009 PacketVideo
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
||||
* express or implied.
|
||||
* See the License for the specific language governing permissions
|
||||
* and limitations under the License.
|
||||
* -------------------------------------------------------------------
|
||||
*/
|
||||
/****************************************************************************************
|
||||
Portions of this file are derived from the following 3GPP standard:
|
||||
|
||||
3GPP TS 26.073
|
||||
ANSI-C code for the Adaptive Multi-Rate (AMR) speech codec
|
||||
Available from http://www.3gpp.org
|
||||
|
||||
(C) 2004, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TTA, TTC)
|
||||
Permission to distribute, modify and use this file under the standard license
|
||||
terms listed above has been obtained from the copyright holder.
|
||||
****************************************************************************************/
|
||||
/*
|
||||
|
||||
Filename: l_shr_r.h
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
INCLUDE DESCRIPTION
|
||||
|
||||
This file contains all the constant definitions and prototype definitions
|
||||
needed by the L_shr_r function.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; CONTINUE ONLY IF NOT ALREADY DEFINED
|
||||
----------------------------------------------------------------------------*/
|
||||
#ifndef L_SHR_R_H
|
||||
#define L_SHR_R_H
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; INCLUDES
|
||||
----------------------------------------------------------------------------*/
|
||||
#include "basicop_malloc.h"
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; MACROS
|
||||
; Define module specific macros here
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; DEFINES
|
||||
; Include all pre-processor statements here.
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; EXTERNAL VARIABLES REFERENCES
|
||||
; Declare variables used in this module but defined elsewhere
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; SIMPLE TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; ENUMERATED TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; STRUCTURES TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; GLOBAL FUNCTION DEFINITIONS
|
||||
; Function Prototype declaration
|
||||
----------------------------------------------------------------------------*/
|
||||
OSCL_IMPORT_REF Word32 L_shr_r(Word32 L_var1, Word16 var2, Flag *pOverflow);
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; END
|
||||
----------------------------------------------------------------------------*/
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _L_SHR_R_H_ */
|
||||
|
||||
@@ -0,0 +1,141 @@
|
||||
/* ------------------------------------------------------------------
|
||||
* Copyright (C) 1998-2010 PacketVideo
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
||||
* express or implied.
|
||||
* See the License for the specific language governing permissions
|
||||
* and limitations under the License.
|
||||
* -------------------------------------------------------------------
|
||||
*/
|
||||
/****************************************************************************************
|
||||
Portions of this file are derived from the following 3GPP standard:
|
||||
|
||||
3GPP TS 26.073
|
||||
ANSI-C code for the Adaptive Multi-Rate (AMR) speech codec
|
||||
Available from http://www.3gpp.org
|
||||
|
||||
(C) 2004, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TTA, TTC)
|
||||
Permission to distribute, modify and use this file under the standard license
|
||||
terms listed above has been obtained from the copyright holder.
|
||||
****************************************************************************************/
|
||||
/*
|
||||
|
||||
Filename: l_sub.h
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
INCLUDE DESCRIPTION
|
||||
|
||||
This file contains all the constant definitions and prototype definitions
|
||||
needed by the L_sub function.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; CONTINUE ONLY IF NOT ALREADY DEFINED
|
||||
----------------------------------------------------------------------------*/
|
||||
#ifndef L_SUB_H
|
||||
#define L_SUB_H
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; INCLUDES
|
||||
----------------------------------------------------------------------------*/
|
||||
#include "basicop_malloc.h"
|
||||
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; MACROS
|
||||
; Define module specific macros here
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; DEFINES
|
||||
; Include all pre-processor statements here.
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; EXTERNAL VARIABLES REFERENCES
|
||||
; Declare variables used in this module but defined elsewhere
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; SIMPLE TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; ENUMERATED TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; STRUCTURES TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; GLOBAL FUNCTION DEFINITIONS
|
||||
; Function Prototype declaration
|
||||
----------------------------------------------------------------------------*/
|
||||
#if ((PV_CPU_ARCH_VERSION >=5) && (PV_COMPILER == EPV_ARM_GNUC)) /* Instructions for ARM-linux cross-compiler*/
|
||||
|
||||
__inline Word32 L_sub(Word32 L_var1, Word32 L_var2, Flag *pOverflow)
|
||||
{
|
||||
register Word32 ra = L_var1;
|
||||
register Word32 rb = L_var2;
|
||||
Word32 result;
|
||||
|
||||
OSCL_UNUSED_ARG(pOverflow);
|
||||
|
||||
asm volatile("qsub %0, %1, %2"
|
||||
: "=r"(result)
|
||||
: "r"(ra), "r"(rb)
|
||||
);
|
||||
|
||||
return (result);
|
||||
}
|
||||
|
||||
#else /* C EQUIVALENT */
|
||||
|
||||
static inline Word32 L_sub(register Word32 L_var1, register Word32 L_var2,
|
||||
register Flag *pOverflow)
|
||||
{
|
||||
Word32 L_diff;
|
||||
|
||||
L_diff = L_var1 - L_var2;
|
||||
|
||||
if ((L_var1 ^ L_var2) < 0)
|
||||
{
|
||||
if ((L_diff ^ L_var1) & MIN_32)
|
||||
{
|
||||
L_diff = (L_var1 < 0L) ? MIN_32 : MAX_32;
|
||||
*pOverflow = 1;
|
||||
}
|
||||
}
|
||||
|
||||
return (L_diff);
|
||||
}
|
||||
|
||||
#endif
|
||||
/*----------------------------------------------------------------------------
|
||||
; END
|
||||
----------------------------------------------------------------------------*/
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _L_SUB_H_ */
|
||||
|
||||
|
||||
@@ -0,0 +1,104 @@
|
||||
/* ------------------------------------------------------------------
|
||||
* Copyright (C) 1998-2009 PacketVideo
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
||||
* express or implied.
|
||||
* See the License for the specific language governing permissions
|
||||
* and limitations under the License.
|
||||
* -------------------------------------------------------------------
|
||||
*/
|
||||
/****************************************************************************************
|
||||
Portions of this file are derived from the following 3GPP standard:
|
||||
|
||||
3GPP TS 26.073
|
||||
ANSI-C code for the Adaptive Multi-Rate (AMR) speech codec
|
||||
Available from http://www.3gpp.org
|
||||
|
||||
(C) 2004, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TTA, TTC)
|
||||
Permission to distribute, modify and use this file under the standard license
|
||||
terms listed above has been obtained from the copyright holder.
|
||||
****************************************************************************************/
|
||||
/*
|
||||
|
||||
Filename: log2.h
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
INCLUDE DESCRIPTION
|
||||
|
||||
This file contains the function prototype definition for Log2 function.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
*/
|
||||
/*----------------------------------------------------------------------------
|
||||
; CONTINUE ONLY IF NOT ALREADY DEFINED
|
||||
----------------------------------------------------------------------------*/
|
||||
#ifndef LOG2_H
|
||||
#define LOG2_H
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; INCLUDES
|
||||
----------------------------------------------------------------------------*/
|
||||
#include "typedef.h"
|
||||
|
||||
#include "log2_norm.h" /* Used by legacy files */
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; MACROS
|
||||
; Define module specific macros here
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; DEFINES
|
||||
; Include all pre-processor statements here.
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; EXTERNAL VARIABLES REFERENCES
|
||||
; Declare variables used in this module but defined elsewhere
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; SIMPLE TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; ENUMERATED TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; STRUCTURES TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; GLOBAL FUNCTION DEFINITIONS
|
||||
; Function Prototype declaration
|
||||
----------------------------------------------------------------------------*/
|
||||
OSCL_IMPORT_REF void Log2(
|
||||
Word32 L_x, /* (i) : input value */
|
||||
Word16 *pExponent, /* (o) : Integer part of Log2. (range: 0<=val<=30)*/
|
||||
Word16 *pFraction, /* (o) : Fractional part of Log2. (range: 0<=val<1) */
|
||||
Flag *pOverflow /* (i/o) : overflow flag */
|
||||
);
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; END
|
||||
----------------------------------------------------------------------------*/
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _LOG2_H_ */
|
||||
@@ -0,0 +1,103 @@
|
||||
/* ------------------------------------------------------------------
|
||||
* Copyright (C) 1998-2009 PacketVideo
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
||||
* express or implied.
|
||||
* See the License for the specific language governing permissions
|
||||
* and limitations under the License.
|
||||
* -------------------------------------------------------------------
|
||||
*/
|
||||
/****************************************************************************************
|
||||
Portions of this file are derived from the following 3GPP standard:
|
||||
|
||||
3GPP TS 26.073
|
||||
ANSI-C code for the Adaptive Multi-Rate (AMR) speech codec
|
||||
Available from http://www.3gpp.org
|
||||
|
||||
(C) 2004, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TTA, TTC)
|
||||
Permission to distribute, modify and use this file under the standard license
|
||||
terms listed above has been obtained from the copyright holder.
|
||||
****************************************************************************************/
|
||||
/*
|
||||
|
||||
Filename: log2_norm.h
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
INCLUDE DESCRIPTION
|
||||
|
||||
This file contains the prototype declaration for Log2_norm function.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; CONTINUE ONLY IF NOT ALREADY DEFINED
|
||||
----------------------------------------------------------------------------*/
|
||||
#ifndef LOG2_NORM_H
|
||||
#define LOG2_NORM_H
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; INCLUDES
|
||||
----------------------------------------------------------------------------*/
|
||||
#include "typedef.h"
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; MACROS
|
||||
; Define module specific macros here
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; DEFINES
|
||||
; Include all pre-processor statements here.
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; EXTERNAL VARIABLES REFERENCES
|
||||
; Declare variables used in this module but defined elsewhere
|
||||
----------------------------------------------------------------------------*/
|
||||
extern const Word16 log2_tbl[];
|
||||
/*----------------------------------------------------------------------------
|
||||
; SIMPLE TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; ENUMERATED TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; STRUCTURES TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; GLOBAL FUNCTION DEFINITIONS
|
||||
; Function Prototype declaration
|
||||
----------------------------------------------------------------------------*/
|
||||
void Log2_norm(
|
||||
Word32 L_x, /* (i) : input value (normalized) */
|
||||
Word16 exp, /* (i) : norm_l (L_x) */
|
||||
Word16 *exponent, /* (o) : Integer part of Log2. (range: 0<=val<=30) */
|
||||
Word16 *fraction /* (o) : Fractional part of Log2. (range: 0<=val<1) */
|
||||
);
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; END
|
||||
----------------------------------------------------------------------------*/
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _LOG2_NORM_H_ */
|
||||
@@ -0,0 +1,104 @@
|
||||
/* ------------------------------------------------------------------
|
||||
* Copyright (C) 1998-2009 PacketVideo
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
||||
* express or implied.
|
||||
* See the License for the specific language governing permissions
|
||||
* and limitations under the License.
|
||||
* -------------------------------------------------------------------
|
||||
*/
|
||||
/****************************************************************************************
|
||||
Portions of this file are derived from the following 3GPP standard:
|
||||
|
||||
3GPP TS 26.073
|
||||
ANSI-C code for the Adaptive Multi-Rate (AMR) speech codec
|
||||
Available from http://www.3gpp.org
|
||||
|
||||
(C) 2004, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TTA, TTC)
|
||||
Permission to distribute, modify and use this file under the standard license
|
||||
terms listed above has been obtained from the copyright holder.
|
||||
****************************************************************************************/
|
||||
/*
|
||||
|
||||
Filename: lsfwt.h
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
INCLUDE DESCRIPTION
|
||||
|
||||
This file contains all the constant definitions and prototype definitions
|
||||
needed by the lsfwt.c
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; CONTINUE ONLY IF NOT ALREADY DEFINED
|
||||
----------------------------------------------------------------------------*/
|
||||
#ifndef lsfwt_h
|
||||
#define lsfwt_h "$Id $"
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; INCLUDES
|
||||
----------------------------------------------------------------------------*/
|
||||
#include "typedef.h"
|
||||
#include "cnst.h"
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; MACROS
|
||||
; Define module specific macros here
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; DEFINES
|
||||
; Include all pre-processor statements here.
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; EXTERNAL VARIABLES REFERENCES
|
||||
; Declare variables used in this module but defined elsewhere
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; SIMPLE TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; ENUMERATED TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; STRUCTURES TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; GLOBAL FUNCTION DEFINITIONS
|
||||
; Function Prototype declaration
|
||||
----------------------------------------------------------------------------*/
|
||||
void Lsf_wt(
|
||||
Word16 *lsf, /* input : LSF vector */
|
||||
Word16 *wf, /* output: square of weighting factors */
|
||||
Flag * pOverflow); /* o : Flag set when overflow occurs */
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; END
|
||||
----------------------------------------------------------------------------*/
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _LSF_WT_H_ */
|
||||
|
||||
@@ -0,0 +1,173 @@
|
||||
/* ------------------------------------------------------------------
|
||||
* Copyright (C) 1998-2009 PacketVideo
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
||||
* express or implied.
|
||||
* See the License for the specific language governing permissions
|
||||
* and limitations under the License.
|
||||
* -------------------------------------------------------------------
|
||||
*/
|
||||
/****************************************************************************************
|
||||
Portions of this file are derived from the following 3GPP standard:
|
||||
|
||||
3GPP TS 26.073
|
||||
ANSI-C code for the Adaptive Multi-Rate (AMR) speech codec
|
||||
Available from http://www.3gpp.org
|
||||
|
||||
(C) 2004, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TTA, TTC)
|
||||
Permission to distribute, modify and use this file under the standard license
|
||||
terms listed above has been obtained from the copyright holder.
|
||||
****************************************************************************************/
|
||||
/*
|
||||
|
||||
Filename: lsp.h
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
INCLUDE DESCRIPTION
|
||||
|
||||
This file contains all the constant definitions and prototype definitions
|
||||
needed by the lsp.c
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; CONTINUE ONLY IF NOT ALREADY DEFINED
|
||||
----------------------------------------------------------------------------*/
|
||||
#ifndef lsp_h
|
||||
#define lsp_h "$Id $"
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; INCLUDES
|
||||
----------------------------------------------------------------------------*/
|
||||
#include "typedef.h"
|
||||
#include "q_plsf.h"
|
||||
#include "mode.h"
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; MACROS
|
||||
; Define module specific macros here
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; DEFINES
|
||||
; Include all pre-processor statements here.
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; EXTERNAL VARIABLES REFERENCES
|
||||
; Declare variables used in this module but defined elsewhere
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; SIMPLE TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; ENUMERATED TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; STRUCTURES TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
typedef struct
|
||||
{
|
||||
|
||||
/* Past LSPs */
|
||||
Word16 lsp_old[M];
|
||||
Word16 lsp_old_q[M];
|
||||
|
||||
/* Quantization state */
|
||||
Q_plsfState *qSt;
|
||||
|
||||
} lspState;
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; GLOBAL FUNCTION DEFINITIONS
|
||||
; Function Prototype declaration
|
||||
----------------------------------------------------------------------------*/
|
||||
/*
|
||||
**************************************************************************
|
||||
*
|
||||
* Function : lsp_init
|
||||
* Purpose : Allocates memory and initializes state variables
|
||||
* Description : Stores pointer to filter status struct in *st. This
|
||||
* pointer has to be passed to lsp in each call.
|
||||
* Returns : 0 on success
|
||||
*
|
||||
**************************************************************************
|
||||
*/
|
||||
OSCL_IMPORT_REF Word16 lsp_init(lspState **st);
|
||||
|
||||
/*
|
||||
**************************************************************************
|
||||
*
|
||||
* Function : lsp_reset
|
||||
* Purpose : Resets state memory
|
||||
* Returns : 0 on success
|
||||
*
|
||||
**************************************************************************
|
||||
*/
|
||||
OSCL_IMPORT_REF Word16 lsp_reset(lspState *st);
|
||||
|
||||
/*
|
||||
**************************************************************************
|
||||
*
|
||||
* Function : lsp_exit
|
||||
* Purpose : The memory used for state memory is freed
|
||||
* Description : Stores NULL in *st
|
||||
*
|
||||
**************************************************************************
|
||||
*/
|
||||
OSCL_IMPORT_REF void lsp_exit(lspState **st);
|
||||
|
||||
/*
|
||||
**************************************************************************
|
||||
*
|
||||
* Function : lsp
|
||||
* Purpose : Conversion from LP coefficients to LSPs.
|
||||
* Quantization of LSPs.
|
||||
* Description : Generates 2 sets of LSPs from 2 sets of
|
||||
* LP coefficients for mode 12.2. For the other
|
||||
* modes 1 set of LSPs is generated from 1 set of
|
||||
* LP coefficients. These LSPs are quantized with
|
||||
* Matrix/Vector quantization (depending on the mode)
|
||||
* and interpolated for the subframes not yet having
|
||||
* their own LSPs.
|
||||
*
|
||||
**************************************************************************
|
||||
*/
|
||||
OSCL_IMPORT_REF void lsp(lspState *st, /* i/o : State struct */
|
||||
enum Mode req_mode, /* i : requested coder mode */
|
||||
enum Mode used_mode,/* i : used coder mode */
|
||||
Word16 az[], /* i/o : interpolated LP parameters Q12 */
|
||||
Word16 azQ[], /* o : quantization interpol. LP parameters Q12*/
|
||||
Word16 lsp_new[], /* o : new lsp vector */
|
||||
Word16 **anap, /* o : analysis parameters */
|
||||
Flag *pOverflow /* o : Flag set when overflow occurs */
|
||||
);
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; END
|
||||
----------------------------------------------------------------------------*/
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _LSP_H_ */
|
||||
|
||||
|
||||
@@ -0,0 +1,103 @@
|
||||
/* ------------------------------------------------------------------
|
||||
* Copyright (C) 1998-2009 PacketVideo
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
||||
* express or implied.
|
||||
* See the License for the specific language governing permissions
|
||||
* and limitations under the License.
|
||||
* -------------------------------------------------------------------
|
||||
*/
|
||||
/****************************************************************************************
|
||||
Portions of this file are derived from the following 3GPP standard:
|
||||
|
||||
3GPP TS 26.073
|
||||
ANSI-C code for the Adaptive Multi-Rate (AMR) speech codec
|
||||
Available from http://www.3gpp.org
|
||||
|
||||
(C) 2004, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TTA, TTC)
|
||||
Permission to distribute, modify and use this file under the standard license
|
||||
terms listed above has been obtained from the copyright holder.
|
||||
****************************************************************************************/
|
||||
/*
|
||||
|
||||
Filename: lsp_az.h
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
INCLUDE DESCRIPTION
|
||||
|
||||
This file contains all the constant definitions and prototype definitions
|
||||
needed by the lsp_az function.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; CONTINUE ONLY IF NOT ALREADY DEFINED
|
||||
----------------------------------------------------------------------------*/
|
||||
#ifndef LSP_AZ_H
|
||||
#define LSP_AZ_H
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; INCLUDES
|
||||
----------------------------------------------------------------------------*/
|
||||
#include "typedef.h"
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; MACROS
|
||||
; Define module specific macros here
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; DEFINES
|
||||
; Include all pre-processor statements here.
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; EXTERNAL VARIABLES REFERENCES
|
||||
; Declare variables used in this module but defined elsewhere
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; SIMPLE TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; ENUMERATED TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; STRUCTURES TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; GLOBAL FUNCTION DEFINITIONS
|
||||
; Function Prototype declaration
|
||||
----------------------------------------------------------------------------*/
|
||||
OSCL_IMPORT_REF void Lsp_Az(
|
||||
Word16 lsp[], /* (i) : line spectral frequencies */
|
||||
Word16 a[], /* (o) : predictor coefficients (order = 10) */
|
||||
Flag *pOverflow /* (o) : overflow flag */
|
||||
);
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; END
|
||||
----------------------------------------------------------------------------*/
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _LSP_AZ_H_ */
|
||||
@@ -0,0 +1,111 @@
|
||||
/* ------------------------------------------------------------------
|
||||
* Copyright (C) 1998-2009 PacketVideo
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
||||
* express or implied.
|
||||
* See the License for the specific language governing permissions
|
||||
* and limitations under the License.
|
||||
* -------------------------------------------------------------------
|
||||
*/
|
||||
/****************************************************************************************
|
||||
Portions of this file are derived from the following 3GPP standard:
|
||||
|
||||
3GPP TS 26.073
|
||||
ANSI-C code for the Adaptive Multi-Rate (AMR) speech codec
|
||||
Available from http://www.3gpp.org
|
||||
|
||||
(C) 2004, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TTA, TTC)
|
||||
Permission to distribute, modify and use this file under the standard license
|
||||
terms listed above has been obtained from the copyright holder.
|
||||
****************************************************************************************/
|
||||
/*
|
||||
Filename: lsp_lsf.h
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
INCLUDE DESCRIPTION
|
||||
|
||||
This file contains all the constant definitions and prototype definitions
|
||||
needed by the lsp_lsf.c
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; CONTINUE ONLY IF NOT ALREADY DEFINED
|
||||
----------------------------------------------------------------------------*/
|
||||
#ifndef lsp_lsf_h
|
||||
#define lsp_lsf_h
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; INCLUDES
|
||||
----------------------------------------------------------------------------*/
|
||||
#include "typedef.h"
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; MACROS
|
||||
; Define module specific macros here
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; DEFINES
|
||||
; Include all pre-processor statements here.
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; EXTERNAL VARIABLES REFERENCES
|
||||
; Declare variables used in this module but defined elsewhere
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; SIMPLE TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; ENUMERATED TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; STRUCTURES TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; GLOBAL FUNCTION DEFINITIONS
|
||||
; Function Prototype declaration
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
OSCL_IMPORT_REF void Lsf_lsp(
|
||||
Word16 lsf[], /* (i) : lsf[m] normalized (range: 0.0<=val<=0.5) */
|
||||
Word16 lsp[], /* (o) : lsp[m] (range: -1<=val<1) */
|
||||
Word16 m, /* (i) : LPC order */
|
||||
Flag *pOverflow /* (o) : Flag set when overflow occurs */
|
||||
);
|
||||
OSCL_IMPORT_REF void Lsp_lsf(
|
||||
Word16 lsp[], /* (i) : lsp[m] (range: -1<=val<1) */
|
||||
Word16 lsf[], /* (o) : lsf[m] normalized (range: 0.0<=val<=0.5) */
|
||||
Word16 m, /* (i) : LPC order */
|
||||
Flag *pOverflow /* (o) : Flag set when overflow occurs */
|
||||
);
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; END
|
||||
----------------------------------------------------------------------------*/
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _LSP_LSF_H_ */
|
||||
|
||||
@@ -0,0 +1,103 @@
|
||||
/* ------------------------------------------------------------------
|
||||
* Copyright (C) 1998-2009 PacketVideo
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
||||
* express or implied.
|
||||
* See the License for the specific language governing permissions
|
||||
* and limitations under the License.
|
||||
* -------------------------------------------------------------------
|
||||
*/
|
||||
/****************************************************************************************
|
||||
Portions of this file are derived from the following 3GPP standard:
|
||||
|
||||
3GPP TS 26.073
|
||||
ANSI-C code for the Adaptive Multi-Rate (AMR) speech codec
|
||||
Available from http://www.3gpp.org
|
||||
|
||||
(C) 2004, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TTA, TTC)
|
||||
Permission to distribute, modify and use this file under the standard license
|
||||
terms listed above has been obtained from the copyright holder.
|
||||
****************************************************************************************/
|
||||
/*
|
||||
|
||||
Filename: lsp_tab.h
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
INCLUDE DESCRIPTION
|
||||
|
||||
This file declares a table lsp_init_data.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; CONTINUE ONLY IF NOT ALREADY DEFINED
|
||||
----------------------------------------------------------------------------*/
|
||||
#ifndef LSP_TAB_H
|
||||
#define LSP_TAB_H
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; INCLUDES
|
||||
----------------------------------------------------------------------------*/
|
||||
#include "typedef.h"
|
||||
#include "cnst.h"
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; MACROS
|
||||
; Define module specific macros here
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; DEFINES
|
||||
; Include all pre-processor statements here.
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; EXTERNAL VARIABLES REFERENCES
|
||||
; Declare variables used in this module but defined elsewhere
|
||||
----------------------------------------------------------------------------*/
|
||||
extern const Word16 lsp_init_data[];
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; SIMPLE TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; ENUMERATED TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; STRUCTURES TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; GLOBAL FUNCTION DEFINITIONS
|
||||
; Function Prototype declaration
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; END
|
||||
----------------------------------------------------------------------------*/
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -0,0 +1,136 @@
|
||||
/* ------------------------------------------------------------------
|
||||
* Copyright (C) 1998-2009 PacketVideo
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
||||
* express or implied.
|
||||
* See the License for the specific language governing permissions
|
||||
* and limitations under the License.
|
||||
* -------------------------------------------------------------------
|
||||
*/
|
||||
/****************************************************************************************
|
||||
Portions of this file are derived from the following 3GPP standard:
|
||||
|
||||
3GPP TS 26.073
|
||||
ANSI-C code for the Adaptive Multi-Rate (AMR) speech codec
|
||||
Available from http://www.3gpp.org
|
||||
|
||||
(C) 2004, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TTA, TTC)
|
||||
Permission to distribute, modify and use this file under the standard license
|
||||
terms listed above has been obtained from the copyright holder.
|
||||
****************************************************************************************/
|
||||
/*
|
||||
|
||||
Filename: mac_32.h
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
INCLUDE DESCRIPTION
|
||||
|
||||
This file contains all the constant definitions and prototype definitions
|
||||
needed by the Mac_32 and Mac_32_16 functions
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; CONTINUE ONLY IF NOT ALREADY DEFINED
|
||||
----------------------------------------------------------------------------*/
|
||||
#ifndef MAC_32_H
|
||||
#define MAC_32_H
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; INCLUDES
|
||||
----------------------------------------------------------------------------*/
|
||||
#include "basicop_malloc.h"
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; MACROS
|
||||
; Define module specific macros here
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; DEFINES
|
||||
; Include all pre-processor statements here.
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; EXTERNAL VARIABLES REFERENCES
|
||||
; Declare variables used in this module but defined elsewhere
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; SIMPLE TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; ENUMERATED TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; STRUCTURES TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; GLOBAL FUNCTION DEFINITIONS
|
||||
; Function Prototype declaration
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
static inline Word32 Mac_32(Word32 L_var3,
|
||||
Word16 L_var1_hi,
|
||||
Word16 L_var1_lo,
|
||||
Word16 L_var2_hi,
|
||||
Word16 L_var2_lo,
|
||||
Flag *pOverflow)
|
||||
{
|
||||
Word16 product;
|
||||
|
||||
L_var3 = L_mac(L_var3, L_var1_hi, L_var2_hi, pOverflow);
|
||||
|
||||
product = mult(L_var1_hi, L_var2_lo, pOverflow);
|
||||
L_var3 = L_mac(L_var3, product, 1, pOverflow);
|
||||
|
||||
product = mult(L_var1_lo, L_var2_hi, pOverflow);
|
||||
L_var3 = L_mac(L_var3, product, 1, pOverflow);
|
||||
|
||||
return (L_var3);
|
||||
}
|
||||
|
||||
static inline Word32 Mac_32_16(Word32 L_var3,
|
||||
Word16 L_var1_hi,
|
||||
Word16 L_var1_lo,
|
||||
Word16 var2,
|
||||
Flag *pOverflow)
|
||||
{
|
||||
Word16 product;
|
||||
|
||||
L_var3 = L_mac(L_var3, L_var1_hi, var2, pOverflow);
|
||||
|
||||
product = mult(L_var1_lo, var2, pOverflow);
|
||||
L_var3 = L_mac(L_var3, product, 1, pOverflow);
|
||||
|
||||
return (L_var3);
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; END
|
||||
----------------------------------------------------------------------------*/
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _MAC_32_H_ */
|
||||
|
||||
|
||||
@@ -0,0 +1,82 @@
|
||||
/* ------------------------------------------------------------------
|
||||
* Copyright (C) 1998-2009 PacketVideo
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
||||
* express or implied.
|
||||
* See the License for the specific language governing permissions
|
||||
* and limitations under the License.
|
||||
* -------------------------------------------------------------------
|
||||
*/
|
||||
/****************************************************************************************
|
||||
Portions of this file are derived from the following 3GPP standard:
|
||||
|
||||
3GPP TS 26.073
|
||||
ANSI-C code for the Adaptive Multi-Rate (AMR) speech codec
|
||||
Available from http://www.3gpp.org
|
||||
|
||||
(C) 2004, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TTA, TTC)
|
||||
Permission to distribute, modify and use this file under the standard license
|
||||
terms listed above has been obtained from the copyright holder.
|
||||
****************************************************************************************/
|
||||
/*
|
||||
********************************************************************************
|
||||
*
|
||||
* GSM AMR-NB speech codec R98 Version 7.5.0 March 2, 2001
|
||||
* R99 Version 3.2.0
|
||||
* REL-4 Version 4.0.0
|
||||
*
|
||||
********************************************************************************
|
||||
*
|
||||
* File : mode.h
|
||||
* Purpose : Declaration of mode type
|
||||
*
|
||||
********************************************************************************
|
||||
*/
|
||||
#ifndef mode_h
|
||||
#define mode_h "$Id $"
|
||||
|
||||
/*
|
||||
********************************************************************************
|
||||
* INCLUDE FILES
|
||||
********************************************************************************
|
||||
*/
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
/*
|
||||
********************************************************************************
|
||||
* DEFINITION OF DATA TYPES
|
||||
********************************************************************************
|
||||
*/
|
||||
enum Mode { MR475 = 0,
|
||||
MR515,
|
||||
MR59,
|
||||
MR67,
|
||||
MR74,
|
||||
MR795,
|
||||
MR102,
|
||||
MR122,
|
||||
|
||||
MRDTX,
|
||||
|
||||
N_MODES /* number of (SPC) modes */
|
||||
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,224 @@
|
||||
/* ------------------------------------------------------------------
|
||||
* Copyright (C) 1998-2010 PacketVideo
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
||||
* express or implied.
|
||||
* See the License for the specific language governing permissions
|
||||
* and limitations under the License.
|
||||
* -------------------------------------------------------------------
|
||||
*/
|
||||
/****************************************************************************************
|
||||
Portions of this file are derived from the following 3GPP standard:
|
||||
|
||||
3GPP TS 26.073
|
||||
ANSI-C code for the Adaptive Multi-Rate (AMR) speech codec
|
||||
Available from http://www.3gpp.org
|
||||
|
||||
(C) 2004, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TTA, TTC)
|
||||
Permission to distribute, modify and use this file under the standard license
|
||||
terms listed above has been obtained from the copyright holder.
|
||||
****************************************************************************************/
|
||||
/*
|
||||
|
||||
Filename: mpy_32.h
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
INCLUDE DESCRIPTION
|
||||
|
||||
This file contains all the constant definitions and prototype definitions
|
||||
needed by the Mpy_32 function.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; CONTINUE ONLY IF NOT ALREADY DEFINED
|
||||
----------------------------------------------------------------------------*/
|
||||
#ifndef MPY_32_H
|
||||
#define MPY_32_H
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; INCLUDES
|
||||
----------------------------------------------------------------------------*/
|
||||
#include "basicop_malloc.h"
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; MACROS
|
||||
; Define module specific macros here
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; DEFINES
|
||||
; Include all pre-processor statements here.
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; EXTERNAL VARIABLES REFERENCES
|
||||
; Declare variables used in this module but defined elsewhere
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; SIMPLE TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; ENUMERATED TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; STRUCTURES TYPEDEF'S
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; GLOBAL FUNCTION DEFINITIONS
|
||||
; Function Prototype declaration
|
||||
----------------------------------------------------------------------------*/
|
||||
#if ((PV_CPU_ARCH_VERSION >=5) && (PV_COMPILER == EPV_ARM_GNUC))/* Instructions for ARM-linux cross-compiler*/
|
||||
|
||||
static inline Word32 Mpy_32(Word16 L_var1_hi,
|
||||
Word16 L_var1_lo,
|
||||
Word16 L_var2_hi,
|
||||
Word16 L_var2_lo,
|
||||
Flag *pOverflow)
|
||||
{
|
||||
register Word32 product32;
|
||||
register Word32 L_sum;
|
||||
register Word32 L_product, result;
|
||||
register Word32 ra = L_var1_hi;
|
||||
register Word32 rb = L_var1_lo;
|
||||
register Word32 rc = L_var2_hi;
|
||||
register Word32 rd = L_var2_lo;
|
||||
|
||||
|
||||
|
||||
OSCL_UNUSED_ARG(pOverflow);
|
||||
|
||||
asm volatile("smulbb %0, %1, %2"
|
||||
: "=r"(L_product)
|
||||
: "r"(ra), "r"(rc)
|
||||
);
|
||||
asm volatile("mov %0, #0"
|
||||
: "=r"(result)
|
||||
);
|
||||
|
||||
asm volatile("qdadd %0, %1, %2"
|
||||
: "=r"(L_sum)
|
||||
: "r"(result), "r"(L_product)
|
||||
);
|
||||
|
||||
asm volatile("smulbb %0, %1, %2"
|
||||
: "=r"(product32)
|
||||
: "r"(ra), "r"(rd)
|
||||
);
|
||||
|
||||
asm volatile("mov %0, %1, ASR #15"
|
||||
: "=r"(ra)
|
||||
: "r"(product32)
|
||||
);
|
||||
asm volatile("qdadd %0, %1, %2"
|
||||
: "=r"(L_product)
|
||||
: "r"(L_sum), "r"(ra)
|
||||
);
|
||||
|
||||
asm volatile("smulbb %0, %1, %2"
|
||||
: "=r"(product32)
|
||||
: "r"(rb), "r"(rc)
|
||||
);
|
||||
|
||||
asm volatile("mov %0, %1, ASR #15"
|
||||
: "=r"(rb)
|
||||
: "r"(product32)
|
||||
);
|
||||
|
||||
asm volatile("qdadd %0, %1, %2"
|
||||
: "=r"(L_sum)
|
||||
: "r"(L_product), "r"(rb)
|
||||
);
|
||||
|
||||
return (L_sum);
|
||||
}
|
||||
|
||||
#else /* C_EQUIVALENT */
|
||||
|
||||
__inline Word32 Mpy_32(Word16 L_var1_hi,
|
||||
Word16 L_var1_lo,
|
||||
Word16 L_var2_hi,
|
||||
Word16 L_var2_lo,
|
||||
Flag *pOverflow)
|
||||
{
|
||||
Word32 L_product;
|
||||
Word32 L_sum;
|
||||
Word32 product32;
|
||||
|
||||
OSCL_UNUSED_ARG(pOverflow);
|
||||
L_product = (Word32) L_var1_hi * L_var2_hi;
|
||||
|
||||
if (L_product != (Word32) 0x40000000L)
|
||||
{
|
||||
L_product <<= 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
L_product = MAX_32;
|
||||
}
|
||||
|
||||
/* result = mult (L_var1_hi, L_var2_lo, pOverflow); */
|
||||
product32 = ((Word32) L_var1_hi * L_var2_lo) >> 15;
|
||||
|
||||
/* L_product = L_mac (L_product, result, 1, pOverflow); */
|
||||
L_sum = L_product + (product32 << 1);
|
||||
|
||||
if ((L_product ^ product32) > 0)
|
||||
{
|
||||
if ((L_sum ^ L_product) < 0)
|
||||
{
|
||||
L_sum = (L_product < 0) ? MIN_32 : MAX_32;
|
||||
}
|
||||
}
|
||||
|
||||
L_product = L_sum;
|
||||
|
||||
/* result = mult (L_var1_lo, L_var2_hi, pOverflow); */
|
||||
product32 = ((Word32) L_var1_lo * L_var2_hi) >> 15;
|
||||
|
||||
/* L_product = L_mac (L_product, result, 1, pOverflow); */
|
||||
L_sum = L_product + (product32 << 1);
|
||||
|
||||
if ((L_product ^ product32) > 0)
|
||||
{
|
||||
if ((L_sum ^ L_product) < 0)
|
||||
{
|
||||
L_sum = (L_product < 0) ? MIN_32 : MAX_32;
|
||||
}
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
; Return nothing or data or data pointer
|
||||
----------------------------------------------------------------------------*/
|
||||
return (L_sum);
|
||||
}
|
||||
|
||||
#endif
|
||||
/*----------------------------------------------------------------------------
|
||||
; END
|
||||
----------------------------------------------------------------------------*/
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _MPY_32_H_ */
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user