Commit graph

2979 commits

Author SHA1 Message Date
Ralph Giles
6bdbd26ce1 Move the vorbis channel mapping to informative references.
The normative reference is now the channel configurations
give directly in the draft.
2013-05-25 01:18:25 +08:00
Ralph Giles
7918ac13a8 Fix Ogg draft formatting.
Previous markup was invalid.
2013-05-25 01:17:11 +08:00
Ralph Giles
5b6fe64692 Remove an unnecessary comma. 2013-05-25 00:29:16 +08:00
Ralph Giles
2ad6eafcda Merge JM's encoder suggestions.
I've done some editing for clarity, but more needs to be done.
The language needs clean-up, we should forward-reference the LPC
Extrapolation section, and we need a reference for actually
computing linear prediction coefficients.
2013-05-24 18:28:58 +08:00
Ralph Giles
25ffd5cd91 Bump Ogg draft version and date. 2013-05-24 18:03:00 +08:00
Ralph Giles
dfda81eb6e Move implementation status details to wiki.xiph.org.
More recent versions of draft-sheffer-running-code suggest referring
to a wiki. We'd like to try maintaining the implementation status
separately.
2013-05-24 17:44:43 +08:00
Jean-Marc Valin
85a6618af8 Make pitch_xcorr() work when len and max_pitch aren't multiples of 4. 2013-05-24 03:41:04 -04:00
Jean-Marc Valin
088929d1f1 oops, removed a minus sign that should never have appeared 2013-05-24 01:38:06 -04:00
Jean-Marc Valin
559fbe8b16 Unrolled version of the pitch correlation
About 30% faster on x86.
2013-05-24 01:09:31 -04:00
Timothy B. Terriberry
e3ad4ea1cd Move misplaced RESTORE_STACK.
Introduced in c152d602.

Thanks to Pedro Becerra for the report.
2013-05-23 19:33:34 -07:00
Timothy B. Terriberry
d19fb79b8d Make dump_modes compile again. 2013-05-23 15:55:43 -07:00
Timothy B. Terriberry
7e783b141b Move misplaced RESTORE_STACK.
Introduced in c152d602.

Thanks to Pedro Becerra for the report.
2013-05-23 15:54:55 -07:00
Timothy B. Terriberry
7c74bc3930 Remove an unused variable added in 85ede2c6.
Thanks to John Ridges for the report.
2013-05-23 13:00:28 -07:00
Timothy B. Terriberry
33511f74bf Minor configure adjustment.
Define ARMv4_ASM to 1 like the other ARM defines.
2013-05-22 16:15:30 -07:00
Timothy B. Terriberry
cc6e26a25f Minor FFT cleanups.
Remove a redundant include and some dead stores.

Patch by Aurélien Zanelli <aurelien.zanelli@parrot.com>.
2013-05-22 15:46:00 -07:00
Timothy B. Terriberry
cd3850c1d9 Port 1ed17cc2 to C_MUL and C_MUL4.
Measures a 0.1% speedup on 96 kbps stereo encode+decode on a
 Cortex A8.
2013-05-22 15:33:23 -07:00
Nils Wallménius
7cb545370b Slightly faster C_MULC for ARMv4.
Reorder register usage to take advantage of early termination on
 multiplications and reorder a load instruction to hide its
 latency on ARM9.
Speeds up decoding of a 64 kbps test file by 0.1MHz on an ARM7TDMI
 and 0.2MHz on an ARM9TDMI.

Signed-off-by: Timothy B. Terriberry <tterribe@xiph.org>
2013-05-22 15:33:22 -07:00
Nils Wallménius
70485d8954 Faster MULT32_32_Q31 for ARM.
Uses a C implementation with a 32*32 => 64 multiplication, which
 ARM has.
Speeds up decoding of a 64 kbps test file by 0.5MHz on an ARM7TDMI
 and 1.0MHz on an ARM9TDMI.
0.2% speedup on a 96 kbps enc+dec test on a Cortex A8.

Signed-off-by: Timothy B. Terriberry <tterribe@xiph.org>
2013-05-22 15:33:22 -07:00
Timothy B. Terriberry
85ede2c6aa Use more MAC16_16's and unroll a loop.
This splits out the non-arch-specific portions of a patch written
 by Aurélien Zanelli <aurelien.zanelli@parrot.com
 http://lists.xiph.org/pipermail/opus/2013-May/002088.html

I also added support for odd n, for custom modes.

0.25% speedup on 96 kbps stereo encode+decode on a Cortex A8.
2013-05-22 15:32:50 -07:00
Timothy B. Terriberry
2040606f4a Minor ARMv5E cleanups.
Missed the armv5e extension on a couple of functions.
2013-05-22 08:52:00 -07:00
Timothy B. Terriberry
006273c59f Use a table for PVQ encoding/decoding.
58.4% speedup (2.4x faster) on test_unit_cwrs32 (no custom modes).
Gives a 3.2% speedup on
 ./opus_demo restricted-lowdelay 48000 2 96000 comp48-stereo.sw /dev/null
 on a 600 MHz Cortex A8.
2013-05-21 18:16:13 -07:00
Timothy B. Terriberry
9d05628407 Add new ARM headers to top-level file lists.
Otherwise make dist does not include these files in the source
 tarball.
2013-05-21 13:42:14 -07:00
Timothy B. Terriberry
e095c3eb7f Move ARM asm into its own directories. 2013-05-21 12:53:33 -07:00
Timothy B. Terriberry
b518b56fe1 Clean up register constraints.
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0068b/CIHBJEHG.html
 says that "Rd cannot be the same as Rm."
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0068b/CIHBJEHG.html
 says that "RdLo, RdHi, and Rm must all be different registers."
This means that some of the early clobbers I removed really should
 have been there (to prevent aliasing Rd, RdLo, or RdHi with Rm).
It also means that we should reverse some of the operands in the
 FFT's complex multiplies.
This should only affect the ARMv4 optimizations.

Thanks to Nils Wallménius for the report.

While we're here, audit the commutative pair flags again, since I
 screwed up at least one of them, and eliminate some dead code.
2013-05-20 23:15:15 -07:00
Timothy B. Terriberry
9880c4cdeb Fix bustage in a16cef62. 2013-05-19 20:52:55 -07:00
Ron
41ce6e353d Make autogen.sh cut and paste proof 2013-05-20 12:40:42 +09:30
Ron
50b395bff6 Add support for autoconf macros in m4/
Needed by commit 972a34ec2c.

Use autoreconf in autogen.sh instead of the handwritten version,
it's simpler, and also updates things that we weren't handling.

Drop the hand-written INSTALL file.  Its information content was
~zero, and autotools wants to overwrite it with its own version,
so don't fight that, just .gitignore it.
2013-05-20 12:31:48 +09:30
Timothy B. Terriberry
a16cef6225 Replace silk_CLZ functions with EC_ILOG().
In most cases these will use __builtin_clz().
In a follow-up, we should audit usage of silk_CLZ32() and convert
 the places where its argument must be non-zero to use EC_ILOG()
 directly to avoid the test for zero (which is necessary on x86).
2013-05-19 19:16:15 -07:00
Timothy B. Terriberry
80ad38370c Convert quotes in license headers to ASCII.
Since the last patch originally had them mangled (presumably by
 mailer, http server, or something else), let's just get rid of
 them.
2013-05-19 19:16:11 -07:00
Timothy B. Terriberry
972a34ec2c Add ARMv4/ARMv5E macros.
Original patch by Aurélien Zanelli <aurelien.zanelli@parrot.com>:
 http://lists.xiph.org/pipermail/opus/2013-May/002078.html

Revised version:
- Add autconf detection (ported from libtheora).
- Rename ARM5E to ARMv5E (an ARM5 is not the same thing as ARMv5!).
- Use actual macros so they can still be selectively overridden.
- Split out ARMv4 parts and add a few more ARMv4 macros.
- Label blocks to make them easy to find in generated assembly.
- Fix MULT16_32_Q15() so we can pass make check.
  The MDCT test passes in values larger than 2**30 for b.
  The new version should be just as fast (or faster, since it's
   easier to merge the shift with following instructions), and
   there's no appreciable impact on accuracy (FFT/MDCT SNR actually
   goes up in most cases).
- Fix register constraints.
  We were using early-clobber flags in a bunch of places that
   didn't need them, and commutative-pair flags in a bunch of
   places that weren't actually commutative.
  This was Jean-Marc's fault (the original code came from Speex).
- Simplify silk_CLZ16().
- Port over iFFT C_MULC asm by Andree Buschmann
   <AndreeBuschmann@t-online.de> from Rockbox.
- Speed up the C_MULC asm by using LDRD, allowing more flexible
   addressing, re-ordering instructions to avoid some stalls,
   allowing more flexible register allocation, and getting things
   out of the inline asm block so the compiler can schedule them
   better.
- Add C_MUL and C_MUL4 asm for the FFT to the encoder based, on the
   new C_MULC.

In total, this patch gives a 22.3% speed-up on test_opus_encoder on
 a 600 MHz Cortex A8 using gcc 4.2.1,
When restricted to ARMv4 optimizations, it gives a 9.6% speed-up
 on the same processor/compiler.
On the conformance test vectors:
 Average mono quality is 97.0583 %
 Average stereo quality is 97.775 %
2013-05-19 19:12:51 -07:00
Jean-Marc Valin
b7bd4c20ac celt_maxabs16() now returns an opus_val32 to avoid problems with -32768 2013-05-18 23:52:18 -04:00
Jean-Marc Valin
359306985b Change few remaining instances of short to opus_int16 2013-05-18 02:50:40 -04:00
Ron
918acd1564 Use m4_esyscmd instead of m4_esyscmd_s
We shouldn't ever have any trailing newlines that need trimming here,
and the _s version wasn't added to m4sugar.m4 until autoconf 2.63b,
so this will let it work with 2.13 again.
2013-05-18 16:11:18 +09:30
Jean-Marc Valin
efdd314305 Fixes fixed-point PLC issue reported in trac ticket #1954
A fixed shift factor was insufficient to properly estimate the decay
factor, resulting in extreme attenuation of the PLC excitation.
2013-05-18 02:18:42 -04:00
Jean-Marc Valin
f8eb44e83a Making sure redundant frames never use outdated analysis info 2013-05-17 23:22:09 -04:00
Jean-Marc Valin
bd477ce2bc Merge branch 'surround' 2013-05-17 14:31:36 -04:00
Jean-Marc Valin
6e277c6291 Conservative use of bandwidth detection in CELT
Takes into account the bitrate.
2013-05-17 14:15:31 -04:00
Jean-Marc Valin
278389defe Automatic bandwidth decisions get more conservative as rate increases.
This should prevent errors in the bandwidth detection from affecting quality
when we have enough bits to be close to transparent.
2013-05-17 02:03:33 -04:00
Jean-Marc Valin
74de3a580c Saturates the last RC to 0.99 when Schur blows up
This is a follow-up on ac76b15. When Schur blows up, we set the last RC to
+/- 0.99 instead of eliminating it.
2013-05-16 23:14:46 -04:00
Jean-Marc Valin
6862b44e7d Slight simplification of the bandwidth detection code
New code is especially easier to justify
2013-05-13 22:35:09 -04:00
Ron
3e6691a703 Don't repeatedly install the doc dir for every file 2013-05-12 14:32:52 +09:30
Ron
8f486e730c Remove opus_compare.o in Makefile.unix clean too
It breaks the autoconf builds amusingly when that is left behind.
2013-05-12 14:09:28 +09:30
Ron
113242cafe More gitignorance 2013-05-11 09:23:16 +09:30
Ron
8d925ec254 Don't fail hard if package_version does not exist
There's currently at least one way that people can legitimately get a
tarball that doesn't include it, via the gitweb snapshots, so create
it rather than considering that an error to be manually fixed.
2013-05-11 07:33:03 +09:30
Ralph Giles
b7d5531ffe Change Visual Studio files to use PACKAGE_VERSION.
This replaces the OPUS_VERSION removed by ron's auto-updater.
2013-05-10 11:27:13 -07:00
Ron
8ee899b62a More Makefile.unix tweaks
Drop some unneeded CINCLUDES.
Drop the VPATH stuff altogether.  It's entirely unused here, and some of
the paths in it don't even exist and apparently never have in this tree.
Drop the 'default' rule, without it there, 'all' already is the default.
Drop $(TARGET) from all, it already includes 'lib' which is $(TARGET).
Declare phony targets PHONY.
2013-05-11 02:13:47 +09:30
Ron
2f2f9d63b8 Fully automate version updating
This one meets or exceeds the following requirements:

 - Version is checked/updated for every build action when in the git repo.
   Does not require the user to re- ./configure to get the correct version.

 - Version is not updated automatically when using exported tarball source.
   Avoids accidentally getting a wrong version from some other git repo in
   a parent directory of the source, and allows setting the correct version
   for distro package exports.

 - Automatic updating can be manually suppressed.
   For developers doing lots of change/rebuild cycles they don't plan to
   release, when they don't want a full rebuild triggered for every commit,
   and again for every change made immediately after a commit.
   The version will still always be updated if they do a `make dist`.

 - Does not require any manual updating of versions in the mainline git
   repo for each release aside from normal tagging.  The version is
   recorded in one file only, that is automatically generated and will
   never need to be committed.

 - Does not require gnu-make features for the autoconf builds.

It does not currently:

 - Keep a checksum of every source file in tarball releases to mangle the
   version if people modify the tarball source.  Responsible people can
   manually update the version easily though in such cases.

The version.mk file is now only used by the VC project files.  Once they
are updated to use the package_version file too, then it can be deleted
from the repository.
2013-05-11 02:05:24 +09:30
Jean-Marc Valin
80c4834c48 Bump version to match 1.0.x branch 2013-05-09 16:52:26 -04:00
Jean-Marc Valin
ac76b1503f Fixes an assertion failure in SILK
We stop the schur recursion before any reflection coefficient
goes outside of ]-1,1[ and we force reporting a residual energy
of at least 1.
Assertion was:
Fatal (internal) error in ../silk/fixed/noise_shape_analysis_FIX.c, line 290: assertion failed: nrg >= 0
triggered by:
opus_demo voip 16000 1 12500 -bandwidth WB -complexity 10 pl04f087.stp-crash out.pcm
2013-05-09 16:17:13 -04:00
Timothy B. Terriberry
c9f857ef60 Fix bustage from c152d602.
silk_setup_resamples() was using x_bufFIX for two purposes, and I
 only allocated enough space for one of them.
This patch also switches to slightly more descriptive variable
 names than nSamples_temp and computes the resampler input/ouput
 sizes in a way that a little more obviously doesn't have issues
 with fractional samples (and replaces a divide with a variable
 divisor by one with a constant divisor).
2013-05-08 14:08:42 -07:00