Jean-Marc Valin
530198f955
Adds SATURATE16() to the fixed-point debug build too
2013-11-17 22:44:53 -05:00
Jean-Marc Valin
6bc3e3cff7
Fixes SILK surround calibration while fixing other MSVC warnings
2013-11-17 22:35:15 -05:00
Gregory Maxwell
2632ef0396
Add some basic testing for OPUS_{GET|SET}_PREDICTION_DISABLED.
2013-11-17 08:52:00 -08:00
Jean-Marc Valin
0c7c425431
oops, fix previous commit
2013-11-16 13:33:38 -05:00
Jean-Marc Valin
2c37846249
Make CELT_PVQ_U_ROW static
2013-11-16 03:54:58 -05:00
Jean-Marc Valin
cbe93e23be
Adds OPUS_SET_PREDICTION_DISABLED() ctl to force "independent" frames
...
Works by turning off pitch and energy prediction in CELT, while
setting first_frame_after_reset in SILK to disable pitch and LSF interpolation
and reduce LPC gain.
2013-11-15 13:50:38 -05:00
Jean-Marc Valin
aad4117d78
Adds a simple padding test to opus_demo (disabled by default)
2013-11-15 13:35:04 -05:00
Jean-Marc Valin
1b28e0cae5
Oops, missing semicolon on RESTORE_STACK in previous commit
2013-11-15 01:57:25 -05:00
Jean-Marc Valin
e83d2aa3f7
Adds missing RESTORE_STACKs in celt_encode_with_ec()
2013-11-15 01:52:28 -05:00
Jean-Marc Valin
d7aadd808f
Fixes a bug where the encoder was trying to use redundancy in CELT mode
...
The problem was that forcing CELT-mode for low bitrate CBR was done too late,
after the encoder had decided to use SILK. This was causing redundancy
to be allocated because the encoder didn't realize it was going to keep
using CELT.
2013-11-15 01:41:12 -05:00
Jean-Marc Valin
c5635d284b
Adds packet padding that works for all codes and fixes 40/60 ms CBR.
...
Padding is now handled by the repacketizer.
2013-11-13 23:22:37 -05:00
Jean-Marc Valin
8bbdf5fa0a
Fixes max_redundancy so that hybrid CBR can fill all bytes
2013-11-13 23:18:42 -05:00
Mark Harris
3a4659a622
opus_multistream_packet_validate() now called with the total number of streams
...
Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
2013-11-13 23:18:34 -05:00
Jean-Marc Valin
2dc27dfa13
Rename preemphasis() to celt_preemphasis() to avoid amrnb symbol clash
...
http://lists.xiph.org/pipermail/opus/2013-November/002372.html
2013-11-13 23:18:26 -05:00
Jean-Marc Valin
ab86a9cca7
Fixes more warnings
2013-11-13 23:06:25 -05:00
Jean-Marc Valin
87ca6c08ea
Increase surround allocation offset for smaller frame sizes
2013-11-13 22:58:10 -05:00
Jean-Marc Valin
0d584b905a
Prevents LFE from busting at really low bitrate
2013-11-13 22:42:04 -05:00
Jean-Marc Valin
a71c9adf52
Fixes MSVC conversion warnings
2013-11-13 12:07:01 -05:00
Jean-Marc Valin
8848171b2f
Variable frame size fixes (still not exposed in the API)
...
This fixes an actual error in the downmix (using the float version even
for the int API), as well as a bunch of conversion warnings.
2013-11-13 11:57:31 -05:00
Jean-Marc Valin
8ea01eed10
Making the CELT fixed-point decoder a bit more robust to extreme signals
...
denormalise_bands() can now produce signals close to the max MDCT amplitude.
2013-11-13 09:40:00 -05:00
Jean-Marc Valin
db5b19455f
Fixes an initialization issue in SILK prefill found by Coverity
2013-11-12 14:20:00 -05:00
Jean-Marc Valin
1d72d383ac
oops, don't need RESTORE_STACK when there's no stack
2013-11-11 18:24:56 -05:00
Jean-Marc Valin
77a5963658
gcc -pedantic had "comparison of unsigned expression < 0 is always false"
2013-11-11 17:39:02 -05:00
Jean-Marc Valin
f6066df2b9
More size-zero VLA fixes and making opus_decode* return BAD_ARG on framesize<0
2013-11-11 13:06:54 -05:00
Jean-Marc Valin
ca6fac041b
Fixes some minor issues found by scan build
2013-11-09 18:28:40 -05:00
Jean-Marc Valin
a599ccd217
stupid uninitialized variable in the mlp training caught by cppcheck
2013-11-08 21:47:44 -05:00
Jean-Marc Valin
5174817d36
Hides OPUS_FRAMESIZE_VARIABLE from the API until it actually works
2013-11-08 19:54:03 -05:00
Jean-Marc Valin
420231ab19
Makes surround bandwidth decision based on the number of channels (duh!)
2013-11-08 19:53:27 -05:00
Jean-Marc Valin
c1959e7dc3
Taking into account the frame size in more encoder decisions
...
Stereo mode, stereo width, min bandwidth, VBR damping
2013-11-08 19:24:10 -05:00
Jean-Marc Valin
9ffce06c77
This should be less confusing for static analyzers
...
Code behaviour is unchanged
2013-11-04 21:16:00 -05:00
Jean-Marc Valin
d814c5d283
Exposes --disable-float-api in autoconf
2013-11-04 12:26:50 -05:00
Jean-Marc Valin
8f466274d3
Removes a float var that shouldn't have been there
...
Defining FIXED_POINT and DISABLE_FLOAT_API now leaves no float instruction
2013-10-28 21:50:10 -04:00
Jean-Marc Valin
c2b3441211
Fixes DISABLE_FLOAT_API build
2013-10-28 21:48:50 -04:00
Jean-Marc Valin
0fb0fd715c
Moves opus_packet_parse_impl() from opus_decoder.c to opus.c
...
Because it's indirectly used in the encoder (through the repackerizer).
2013-10-28 16:41:26 -04:00
Jean-Marc Valin
811db62ead
Implements OPUS_RESET_STATE for multi-stream encoder
2013-10-28 16:12:24 -04:00
Gregory Maxwell
60429d366f
Avoid a bogus uninitialized warning and simplify some code.
2013-10-28 12:55:41 -07:00
Gregory Maxwell
1750f568d8
Remove now-unused check_decoder_option.
2013-10-28 11:40:00 -07:00
Jean-Marc Valin
9c23f5cdca
Makes stereo savings still less aggressive
...
Caps the savings at 1 bit per (coded) sample. This doesn't really increase
the bitrate and fixes some issues, e.g. with IgorC's "twilight" sample.
2013-10-28 14:15:18 -04:00
Gregory Maxwell
5484a28063
Add a little missive when compiling without optimization.
...
The library really depends on all the little fixed point math functions
being inlined in order to get acceptable performance. It turns out that
it's very easy for someone to compile with optimization disable when
twiddling cflags or cooking up their own build system.
2013-10-28 11:08:04 -07:00
Gregory Maxwell
7830cf1bd2
Replace "inline" with OPUS_INLINE.
...
Newer versions of MSVC are unhappy with the strategy of the build
environment redefining "inline" (even though they don't support the
actual keyword). Instead we define OPUS_INLINE to the right thing
in opus_defines.h.
This is the same approach we use for restrict.
2013-10-28 10:18:54 -07:00
Stefan Beller
2891d852a3
Remove dead code
...
The compiler warned:
silk/float/pitch_analysis_core_FLP.c: In function 'silk_P_Ana_calc_corr_st3':
silk/float/pitch_analysis_core_FLP.c:499:36: warning: variable 'basis_ptr' set but not used [-Wunused-but-set-variable]
const silk_float *target_ptr, *basis_ptr;
This means we can safely remove it.
Signed-off-by: Stefan Beller <stefanbeller@googlemail.com>
Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
2013-10-23 16:18:32 -04:00
Jean-Marc Valin
d6b56793d8
Fixes a potential crash when encoding NaNs
...
This fixes tansig_approx() to avoid crashing when the input is NaN.
The problem could only be triggered when calling the float API with
a float build at a complexity of 7 or more (i.e. analysis called).
Since the crash was due to an out-of-bound read (typically the index
is INT_MIN), it's unlikely to be exploitable in any other way than
causing a crash.
2013-10-21 17:58:03 -04:00
Ralph Giles
e8f18c403c
Remove restrict definition from the unix Makefile.
...
This define was replaces by OPUS_RESTRICT in opus_defines.h
in de0b5324b6
and subsequent commits. It is no longer necessary
to include it.
2013-10-17 14:52:56 -07:00
Jean-Marc Valin
2e653a7b47
Fixes multistream CBR encoding and multistream surround for >20 ms
2013-10-14 17:47:18 -04:00
Jean-Marc Valin
c6d0c43df7
Fixes weird LFE bug
...
The LFE encoder would first decide to switch to SILK, and allocated
redundancy bytes. Then, it would force CELT because of LFE, but keep
the redundancy allocation, and end up with too few bytes, that would
end up being padded to the desired size for CBR.
2013-10-14 17:33:53 -04:00
Jean-Marc Valin
eab134c813
Surround encoder can now produce hard CBR streams again.
...
Even when using SILK/hybrid.
2013-10-14 15:01:36 -04:00
Jean-Marc Valin
dabdb32ce6
Oops, thanks to Mark Harris for spotting this!
2013-10-14 13:58:51 -04:00
Jean-Marc Valin
58042adc19
opus_packet_parse_impl() now computes the packet size with padding
...
This should fix decoding of padded multistream packets and (hopefully)
multistream fec.
2013-10-14 13:45:58 -04:00
Mark Harris
2a82908062
Rejects bad multistream frame length
...
Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
2013-10-13 01:25:32 -04:00
Mark Harris
101c8c874e
Fixes PLC for sizes that don't match basic Opus frame sizes.
...
Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
2013-10-13 01:16:00 -04:00