Commit graph

3269 commits

Author SHA1 Message Date
Jean-Marc Valin
1ecb7eaeaf Fixes issues with multiple files defining CELT_C 2012-11-08 11:25:20 -05:00
Jean-Marc Valin
6906210cb0 Splits out the CELT encoder and decoder 2012-11-08 09:42:27 -05:00
Jean-Marc Valin
ae0e2ca89f Splits out the Opus multi-stream encoder and decoder 2012-11-07 20:00:22 -05:00
Jean-Marc Valin
8b906c102b Changed denormalize_bands() to only work between "start" and "end" 2012-11-07 14:15:08 -05:00
Jean-Marc Valin
7aa593a556 Reduces stack in quant_all_bands() for hybrid mode
No need to allocate for the low-band
2012-11-07 10:19:46 -05:00
Jean-Marc Valin
fd314f4b7a More stack usage reduction in quant_all_bands()
Reduce size of "norm" because we never need it for the last band
2012-11-07 09:05:45 -05:00
Jean-Marc Valin
5055cf8c13 Removes the need for lowband_scratch in quant_all_bands() 2012-11-07 09:03:43 -05:00
Jean-Marc Valin
06bab45fb4 Moved up the second encoder mdct to reduce stack usage 2012-11-06 16:29:11 -05:00
Jean-Marc Valin
cc83f6b875 Reduces decoder stack usage
Delays stack allocations as much as possible, and makes some of these
allocations conditional.
2012-11-05 10:25:20 -05:00
Jean-Marc Valin
4ea3ae9af7 Further cleanup of the MDCT code, fixes PLC bug
Doing the overlap coying in the same OPUS_MOVE() as the rest of the synthesis
memory. Also, there was a missing OPUS_MOVE() in the PLC for the hybrid/CNG
case.
2012-11-05 09:04:06 -05:00
Nils Wallménius
21b7164893 Avoid copying imdct output
Use the output buffer directly for imdct output, avoiding use of an
intermediary buffer and copying from it. This works because the output
buffer is offset to always be continous with the overlap buffer in the
decoder. Adjust encoder resynth code to have the same buffer layout.

Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
2012-11-05 09:04:05 -05:00
Timothy B. Terriberry
50f214c293 Various fixes to draft-terriberry-oggopus.xml
It should now validate with the Python version of the xml2rfc tool.
2012-11-03 13:01:25 -07:00
Jean-Marc Valin
5ab07e6b9a comb_filter() bypass for the case where the gain is zero. 2012-11-03 11:36:39 -04:00
Jean-Marc Valin
fedfe91d37 Oops, put back the "static" for transient_analysis() 2012-11-03 10:43:06 -04:00
Jean-Marc Valin
36890bc852 Fixes a fixed-point overflow in the new transient detector 2012-11-03 00:13:06 -04:00
Jean-Marc Valin
f2729ded66 Fixes a fixed-point divide-by-zero issue 2012-11-02 18:47:47 -04:00
Jean-Marc Valin
fac68ce189 New transient detection algorithm
This one is explicitly based on a simple temporal masking model
2012-11-02 17:32:23 -04:00
Gregory Maxwell
06d443266d Move LSB CTLs to the encoder specific section, thanks to Ilari on IRC for noticing. 2012-10-31 18:42:27 -04:00
Jean-Marc Valin
00898f2091 Adds missing license headers on some scripts and test files 2012-10-30 01:26:36 -04:00
Jean-Marc Valin
c8ce2ef391 Keeping the deemphasis coefficients in local variable to avoid aliasing issues 2012-10-29 15:01:32 -04:00
Jean-Marc Valin
aaf40ef259 Moves the pitch prefiltering code to a separate function 2012-10-29 15:01:32 -04:00
Gregory Maxwell
de95da9bf1 Fix several issues with multistream argument validation.
As reported by Mark Warner opus_multistream_*_create were depending on
 the behavior of malloc(0) in order to correctly report some kinds of
 argument errors. Bad arguments could be incorrectly reported as
 allocation failures. This changes multistream to explicitly check the
 arguments like the single stream _create functions. The unit tests were
 enough to catch this on systems where malloc(0) returns NULL but didn't
 catch it on other systems because the later _init call would catch the
 bad arguments and trigger the correct error if and only if the malloc
 didn't return a null pointer.

In multistream_encoder_init failures of the internal non-multistream
 init calls were not being caught and propagated. Decode didn't have
 this problem. This propagates the errors and adds additional tests
 (the multistream encoder api is sill under tested) that would have
 detected this error.

Plus add some stronger tests for things like error==NULL for the _create
 functions that take a pointer for error output.
2012-10-27 13:42:48 -04:00
Jean-Marc Valin
6930d90c34 oops... fixes a C89 issue 2012-10-24 14:20:43 -04:00
Jean-Marc Valin
1cdfd1b12b Moved pre-emphasis to a separate function and cleaned it up
Removed a bunch of if()s from the loops and made the compiler life's
easier by moving some pointer accesses outside the loops.
2012-10-24 14:07:46 -04:00
Jean-Marc Valin
cc9f28c2ef Optimizations to comb_filter() 2012-10-24 01:49:50 -04:00
Jean-Marc Valin
d3fad97e3f Removes more indirections in celt.c
mode->eBands[]
2012-10-23 20:25:06 -04:00
Jean-Marc Valin
297195b57a Removes a bunch of indirections from the CELT encoder and decoder
st->mode->overlap
st->mode->nbEBands
st->overlap
st->mode
2012-10-23 18:30:02 -04:00
Jean-Marc Valin
4be7fe795e This should speed up deemphasis() quite a bit.
Removes the resampling branches from the main loop and no longer computes
the multiplications for coefs equal to one or zero.
2012-10-23 16:51:37 -04:00
Jean-Marc Valin
8ccaefd39b Take the PLC out of the stack size critical path 2012-10-23 16:15:23 -04:00
Joshua Bowman
f77e86a235 Fix MSVC linker warnings
Specify the correct debug runtime libraries for the test
and demo executables to prevent mismatch warnings with
the default runtime.

Signed-off-by: Ralph Giles <giles@mozilla.com>
2012-10-23 13:12:25 -07:00
Ralph Giles
662ae9bb18 Include process.h for _getpid on windows.
Previously the test programmes happened to link because _getpid
returns an int, which is the default prototype. Instead, include
the appropriate header to supply a real declaration, fixing the
associated warning.

I moved the getpid->_getpid define to the site of the header
inclusion to make clear what's going on, rather than have it
floating in win32/config.h.
2012-10-23 13:04:36 -07:00
Joshua Bowman
3b60e81d79 Fix the MSVC build.
Updates the project files to include the new encoder source files.
Use OPUS_RESTRICT and include config.h to set the proper defines
for build under MSVC.
2012-10-23 12:20:32 -07:00
Ralph Giles
027ec51bfe Fix MSVC format conversion warnings.
The Microsoft compiler warns about precision reduction from
default double literals to the floats we generally use outside
the fixed-point build. Avoid these by qualifying the literals
as floats.

Thanks to derf for review.
2012-10-23 10:49:18 -07:00
Nils Wallménius
2572c1e788 Merge inverse mdct post-rotate and de-shuffle loops
Saves some memory access and gives a tiny speedup

Signed-off-by: Timothy B. Terriberry <tterribe@xiph.org>
2012-10-21 05:42:56 -07:00
Jean-Marc Valin
ed627f040d Attempt to have at least two bands that are coded
This fixes a SWB hybrid issue where band 18 isn't folded and cannot even
be folded because it's wider than band 17. This was causing noise to
be injected instead.
2012-10-19 19:57:19 -04:00
Ron
b371cf8438 cd doc && make is not the same as make -C doc
Fixes a regression in the recursive builds introduced in 5467ce7b3f
that causes `make check-opus` to fail horribly.

Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
2012-10-19 17:46:03 -04:00
Ralph Giles
3aa264732c Fix an indentation issue. 2012-10-17 11:12:55 -07:00
Jean-Marc Valin
ca24259c59 Fixes two bugs in the high-band attenuation code (gain_fade()) 2012-10-16 00:26:32 -04:00
Philip Jägenstedt
b7b5872c9d Fix minor issues reported by scan-build 2012-10-11 09:21:44 -04:00
Philip Jägenstedt
96480adaff Ignore files created by configure && make 2012-10-11 09:20:24 -04:00
Jean-Marc Valin
ea7c9869cd Adds OPUS_{G,S}ET_FORCE_CHANNELS requests to multistream API 2012-10-10 16:03:36 -04:00
Jean-Marc Valin
e9b36c1e38 Fixes comment-in-comment warning 2012-10-10 13:53:59 -04:00
Jean-Marc Valin
f68799b208 Fixes the high-band hybrid gain from the previous commit
Adds a gain cross-fade to avoid discontinuities and moves it
to a place where it won't affect SILK

Conflicts:

	src/opus_encoder.c
2012-10-10 13:44:26 -04:00
Koen Vos
0b00b31967 Attenuates the HF in hybrid mode to match what SILK does below the cutoff
Conflicts:

	src/opus_multistream.c
	src/opus_private.h
2012-10-10 13:41:07 -04:00
Jean-Marc Valin
b56c278b0e Fixes a fixed-point overflow in the new pitch code 2012-10-10 13:32:16 -04:00
Koen Vos
9cbbcb53ae Improvements to the pitch search
Normalizes the cost function by (x+y) instead of sqrt(x*y)
2012-10-10 09:37:10 -04:00
Jean-Marc Valin
1bcf028af8 Using floor(.5+x) instead of lrint(x) for C90 compilers 2012-10-10 08:58:15 -04:00
Jean-Marc Valin
1b61303fc7 Fixes a bug in the LSB_DEPTH code introduced in cf1053dc 2012-10-09 20:24:49 -04:00
Jean-Marc Valin
b2e19ecd0c copysignf() was C99-only 2012-10-09 19:13:04 -04:00
Jean-Marc Valin
02dcf6aad8 Fixes a fixed-point stereo savings issue causing a celt_ilog2(0) 2012-10-09 15:07:53 -04:00