7 years agoFixes two SILK PLC issues
Koen Vos [Sat, 29 Oct 2011 01:05:22 +0000 (21:05 -0400)]
Fixes two SILK PLC issues

- Calling the decoder for FEC when there's no LBRR should no longer crash
- There should no longer be an issue with the PLC on frame size switching

7 years agoReformatting changes with an update to the MSVC project files
Koen Vos [Fri, 28 Oct 2011 23:44:26 +0000 (19:44 -0400)]
Reformatting changes with an update to the MSVC project files

7 years agotest vector wip, nothing to see here
Jean-Marc Valin [Fri, 28 Oct 2011 20:16:35 +0000 (16:16 -0400)]
test vector wip, nothing to see here

7 years agoUse the fallback __GNUC_PREREQ from arch.h in ecintrin.h.
Ralph Giles [Fri, 28 Oct 2011 18:32:44 +0000 (11:32 -0700)]
Use the fallback __GNUC_PREREQ from arch.h in ecintrin.h.

__GNUC_PREREQ is generally defined by glibc; ecintrin.h
was checking to see if it was defined before use for
portability to non-glibc systems. However, we now have
a fallback definition in arch.h.

7 years agoRemove relative paths to opus.h.
Ralph Giles [Fri, 28 Oct 2011 18:29:41 +0000 (11:29 -0700)]
Remove relative paths to opus.h.

Files are already compiled with -I./include, the relative
path in the #include line isn't necessary.

7 years agoRemove the define check for __GNUC_PREREQ.
Ralph Giles [Fri, 28 Oct 2011 18:03:29 +0000 (11:03 -0700)]
Remove the define check for __GNUC_PREREQ.

Our arch.h makes sure it's always defined. Thanks to derf
for the suggestion.

7 years agoFix the test for gcc version >= 4.6 to work for gcc 5 and up.
Ralph Giles [Fri, 28 Oct 2011 17:51:17 +0000 (10:51 -0700)]
Fix the test for gcc version >= 4.6 to work for gcc 5 and up.

We use the __GNUC_PREREQ macro from celt/arch.h to check
the required minimum gcc version. The previous check would
have failed for gcc 5.n with n from 0 to 5.

Thanks to pcgod for pointing out the problem and derf for
pointing out we had a macro for this.

7 years agoMove opus_apps inside the MALLOC_FAIL block.
Ralph Giles [Fri, 28 Oct 2011 16:27:25 +0000 (09:27 -0700)]
Move opus_apps inside the MALLOC_FAIL block.

This array is only used by the malloc failure test, and
defining it unconditionally creates an unused variable
warning on platforms where MALLOC_FAIL isn't set.

7 years agoMake the MALLOC_FAIL test solely dependent on HAVE___MALLOC_HOOK.
Ralph Giles [Fri, 28 Oct 2011 16:23:20 +0000 (09:23 -0700)]
Make the MALLOC_FAIL test solely dependent on HAVE___MALLOC_HOOK.

This test only works on glibc, but the important thing is support
for the __malloc_hook api, so that's what we should depend on,
especially since not all glibc versions have it.

7 years agoUse #pragma GCC diagnostic push/pop only on gcc 4.6 and later.
Ralph Giles [Fri, 28 Oct 2011 16:21:08 +0000 (09:21 -0700)]
Use #pragma GCC diagnostic push/pop only on gcc 4.6 and later.

These pragmas were adding in 4.6, and earlier versions warn
about them being undefined.

7 years agoCheck for __malloc_hook and define MALLOC_FAIL appropriately.
Ralph Giles [Fri, 28 Oct 2011 14:14:58 +0000 (07:14 -0700)]
Check for __malloc_hook and define MALLOC_FAIL appropriately.

The glibc 2.14 NEWS file says __malloc_hook will be removed
in the next release, so future-proof our use by checking
for this symbol at configure time and only compiling the
malloc failure tests if it is present.

7 years agoDisable the deprecated function warning on __malloc_hook.
Ralph Giles [Fri, 28 Oct 2011 13:55:30 +0000 (06:55 -0700)]
Disable the deprecated function warning on __malloc_hook.

This just works around the deprecation in glibc 2.14. I
do worry what will happen if they follow through and
remove it in 2.15.

7 years agoMoving the dash header inline to appease the apple gcc.
Gregory Maxwell [Fri, 28 Oct 2011 16:10:14 +0000 (12:10 -0400)]
Moving the dash header inline to appease the apple gcc.

7 years agoPreparing for test vectors
Jean-Marc Valin [Fri, 28 Oct 2011 16:09:00 +0000 (12:09 -0400)]
Preparing for test vectors

7 years agoFixes a bug in ec_enc_done when no range coded data was coded and adds test cases...
Gregory Maxwell [Fri, 28 Oct 2011 15:06:37 +0000 (11:06 -0400)]
Fixes a bug in ec_enc_done when no range coded data was coded and adds test cases to test_unit_entropy.

7 years agoopus_demo now returns 1 on mismatch
Jean-Marc Valin [Fri, 28 Oct 2011 15:02:40 +0000 (11:02 -0400)]
opus_demo now returns 1 on mismatch

7 years agoExtend test_unit_entropy to test some patch_initial_bits corner cases.
Gregory Maxwell [Fri, 28 Oct 2011 13:59:43 +0000 (09:59 -0400)]
Extend test_unit_entropy to test some patch_initial_bits corner cases.

7 years agoFix for ec_enc_patch_initial_bits().
Timothy B. Terriberry [Fri, 28 Oct 2011 13:25:38 +0000 (06:25 -0700)]
Fix for ec_enc_patch_initial_bits().

The test to make sure that _nbits had been encoded was checking for
 8-_nbits instead of _nbits.
This only affected cases when less than 8 bits had ever been
 encoded by the time the initial bits were patched.

7 years agoGives the Opus code direct access to (non-opaque) OpusRepacketizer
Jean-Marc Valin [Fri, 28 Oct 2011 02:25:33 +0000 (22:25 -0400)]
Gives the Opus code direct access to (non-opaque) OpusRepacketizer

This avoids potential alignment issues with allocating a char
array on the stack.

7 years agoChecking error codes internally and return OPUS_INTERNAL_ERROR on failure
Jean-Marc Valin [Fri, 28 Oct 2011 00:33:48 +0000 (20:33 -0400)]
Checking error codes internally and return OPUS_INTERNAL_ERROR on failure

7 years agoImprove test_opus_encode's coverage of some high rate cases.
Gregory Maxwell [Thu, 27 Oct 2011 22:07:40 +0000 (18:07 -0400)]
Improve test_opus_encode's coverage of some high rate cases.

7 years agoMake CBR code a bit less aggressive about low rate
Jean-Marc Valin [Thu, 27 Oct 2011 20:46:34 +0000 (16:46 -0400)]
Make CBR code a bit less aggressive about low rate

7 years agoFixes a hybrid bug when operating with a max bit-rate
Jean-Marc Valin [Thu, 27 Oct 2011 20:45:45 +0000 (16:45 -0400)]
Fixes a hybrid bug when operating with a max bit-rate

7 years agodraft: CELT encoder description for tf_analysis() and spreading_decision()
Jean-Marc Valin [Thu, 27 Oct 2011 19:34:21 +0000 (15:34 -0400)]
draft: CELT encoder description for tf_analysis() and spreading_decision()

7 years agoAllow wrap-around in silk_LPC_analysis_filter()
Jean-Marc Valin [Thu, 27 Oct 2011 17:51:21 +0000 (13:51 -0400)]
Allow wrap-around in silk_LPC_analysis_filter()

7 years agoMakes OPUS_SET_VOICE_RATIO private
Jean-Marc Valin [Thu, 27 Oct 2011 17:43:43 +0000 (13:43 -0400)]

Let's put it back in if/when we have a clearer view of voice/music detection

7 years agoMaking sure DTX for voice still works at high bit-rate
Jean-Marc Valin [Thu, 27 Oct 2011 17:39:12 +0000 (13:39 -0400)]
Making sure DTX for voice still works at high bit-rate

7 years agoAdd a test for MAX_BANDWIDTH to test_opus_api.
Gregory Maxwell [Thu, 27 Oct 2011 12:24:52 +0000 (08:24 -0400)]
Add a test for MAX_BANDWIDTH to test_opus_api.

7 years agoTest cleanups and renaming.
Gregory Maxwell [Thu, 27 Oct 2011 03:55:33 +0000 (23:55 -0400)]
Test cleanups and renaming.

Build tests in the tests/ directory instead of top, cleanup, rename,
and eliminate recursive make for the celt/ unit tests.

7 years agoConvert tabs to spaces in the opus and celt code.
Ralph Giles [Thu, 27 Oct 2011 03:24:49 +0000 (20:24 -0700)]
Convert tabs to spaces in the opus and celt code.

Also reformat some, but by no means all, of the opus
code for line length and three-character indents.

7 years agoMoves the main headers from src/ to include/
Jean-Marc Valin [Thu, 27 Oct 2011 01:36:57 +0000 (21:36 -0400)]
Moves the main headers from src/ to include/

7 years agoRemoves tests/.dirstamp
Jean-Marc Valin [Thu, 27 Oct 2011 01:01:54 +0000 (21:01 -0400)]
Removes tests/.dirstamp

7 years agoRename test_repacketizer to repacketizer_demo.
Gregory Maxwell [Thu, 27 Oct 2011 00:05:56 +0000 (20:05 -0400)]
Rename test_repacketizer to repacketizer_demo.

7 years agoRenames test_opus to opus_demo and adds the test_opus_api, test_opus_encode, test_opu...
Gregory Maxwell [Wed, 26 Oct 2011 23:56:00 +0000 (19:56 -0400)]
Renames test_opus to opus_demo and adds the test_opus_api, test_opus_encode, test_opus_decode test programs.

7 years agodraft: Update to normative/non-normative switching
Jean-Marc Valin [Wed, 26 Oct 2011 19:47:53 +0000 (15:47 -0400)]
draft: Update to normative/non-normative switching

Making SILK bandwidth changes non-normative when there's no redundancy

7 years agodraft: Moves the high-pass to the Opus encoder to reflect the source code
Jean-Marc Valin [Wed, 26 Oct 2011 15:55:07 +0000 (11:55 -0400)]
draft: Moves the high-pass to the Opus encoder to reflect the source code

7 years agoFixes another minor bug introduced in 43a0de4af15
Koen Vos [Wed, 26 Oct 2011 12:03:31 +0000 (08:03 -0400)]
Fixes another minor bug introduced in 43a0de4af15

7 years agoAdds draft section on "Control Parameters"
Jean-Marc Valin [Wed, 26 Oct 2011 05:23:36 +0000 (01:23 -0400)]
Adds draft section on "Control Parameters"

7 years agoAdjusts the bandwidth thresholds depending on complexity and CBR
Jean-Marc Valin [Tue, 25 Oct 2011 17:46:35 +0000 (13:46 -0400)]
Adjusts the bandwidth thresholds depending on complexity and CBR

7 years agoOops, forgot the #defines for OPUS_{SET|GET}_MAX_BANDWIDTH()
Jean-Marc Valin [Tue, 25 Oct 2011 16:10:45 +0000 (12:10 -0400)]
Oops, forgot the #defines for OPUS_{SET|GET}_MAX_BANDWIDTH()

7 years agoFixes a minor bug introduced in 43a0de4af15
Koen Vos [Tue, 25 Oct 2011 05:19:29 +0000 (01:19 -0400)]
Fixes a minor bug introduced in 43a0de4af15

7 years agoImplements OPUS_SET_MAX_BANDWIDTH()
Jean-Marc Valin [Tue, 25 Oct 2011 02:41:18 +0000 (22:41 -0400)]

7 years agoDisable CELT when FEC is on and we're losing too many packets
Jean-Marc Valin [Tue, 25 Oct 2011 00:26:29 +0000 (20:26 -0400)]
Disable CELT when FEC is on and we're losing too many packets

7 years agoFixes a bug on FEC+stereo
Jean-Marc Valin [Tue, 25 Oct 2011 00:07:00 +0000 (20:07 -0400)]
Fixes a bug on FEC+stereo

When FEC is enabled in the decoder but not included in the bit-stream
we could end up applying the PLC on a non-existant side.

7 years agoMore draft edits and additions.
Timothy B. Terriberry [Mon, 24 Oct 2011 19:24:30 +0000 (12:24 -0700)]
More draft edits and additions.

Some clean-up from JM's prior edits, as well as
* Additional clarificatino of TOC sequence restrictions (e.g., if
   you need to decode a length, there must be enough bytes in the
   packet for it, etc.).
* Added a summary of TOC sequence restrictions.
* Added a stereo unmixing section.
* Reworked Delay Compensation section into a general Resampling
* Further cleanups of switching/transitions, including new diagrams
   for all of the normative and recommended non-normative

7 years agoSome SILK CBR tuning
Jean-Marc Valin [Mon, 24 Oct 2011 15:53:01 +0000 (11:53 -0400)]
Some SILK CBR tuning

7 years agoOptimization of the CBR loop
Koen Vos [Mon, 24 Oct 2011 13:10:58 +0000 (09:10 -0400)]
Optimization of the CBR loop

Also some comment/warning fixes

8 years agoImplements glitchless switching between SILK bandwidths
Jean-Marc Valin [Sat, 22 Oct 2011 03:21:34 +0000 (23:21 -0400)]
Implements glitchless switching between SILK bandwidths

Only encoder changes were necessary because this uses the same
"redundant frames" mechanism as SILK<->CELT switching.
This also fixes a regression introduced in 78291b27 that was
causing the encoder to go back and forth between bandwidths when
SILK wasn't ready to change.

8 years agoDon't use -fstack-protector-all when its not supported, add an autoconf test.
Gregory Maxwell [Fri, 21 Oct 2011 18:21:53 +0000 (14:21 -0400)]
Don't use -fstack-protector-all when its not supported, add an autoconf test.

8 years agoFix stack corruption with high rate SILK encoding added by the recent CBR changes...
Gregory Maxwell [Fri, 21 Oct 2011 17:00:21 +0000 (13:00 -0400)]
Fix stack corruption with high rate SILK encoding added by the recent CBR changes and enable -fstack-protector-all on gcc autotools builds.

8 years agoSilences some warnings in fixed-point
Jean-Marc Valin [Fri, 21 Oct 2011 15:17:18 +0000 (11:17 -0400)]
Silences some warnings in fixed-point

8 years agoSame as 44a030deedf11 but for fixed-point
Jean-Marc Valin [Fri, 21 Oct 2011 15:10:43 +0000 (11:10 -0400)]
Same as 44a030deedf11 but for fixed-point

8 years agoLimits how fast the CBR gain multiplier can increase
Jean-Marc Valin [Fri, 21 Oct 2011 15:05:50 +0000 (11:05 -0400)]
Limits how fast the CBR gain multiplier can increase

This fixes an overflow that was caused by having a huge gain

8 years agoMake the encoder output a "PLC packet" when SILK can't reach the target
Jean-Marc Valin [Fri, 21 Oct 2011 01:10:25 +0000 (21:10 -0400)]
Make the encoder output a "PLC packet" when SILK can't reach the target

8 years agoOverrides the SILK delayed bandwidth changes when CBR might bust
Jean-Marc Valin [Thu, 20 Oct 2011 18:30:30 +0000 (14:30 -0400)]
Overrides the SILK delayed bandwidth changes when CBR might bust

8 years agoImplements hard CBR for SILK
Jean-Marc Valin [Thu, 20 Oct 2011 04:39:41 +0000 (00:39 -0400)]
Implements hard CBR for SILK

This is achieved by running the encoding process in a loop and
padding when we don't reach the exact rate. It also implements
VBR-with-cap, which means we no longer need to artificially decrease
the SILK bandwidth when it's close to the cap.

8 years agodraft: Describing SILK delay compensation
Jean-Marc Valin [Wed, 19 Oct 2011 17:56:34 +0000 (13:56 -0400)]
draft: Describing SILK delay compensation

8 years agodraft: mode switching details (reset and redundancy cross-fade)
Jean-Marc Valin [Wed, 19 Oct 2011 16:38:53 +0000 (12:38 -0400)]
draft: mode switching details (reset and redundancy cross-fade)

8 years agoOnly free state once in kiss-fft failed init path
Jean-Marc Valin [Wed, 19 Oct 2011 11:41:27 +0000 (07:41 -0400)]
Only free state once in kiss-fft failed init path

8 years agoSimplfies the condition for resetting the CELT state
Jean-Marc Valin [Wed, 19 Oct 2011 05:56:38 +0000 (01:56 -0400)]
Simplfies the condition for resetting the CELT state

8 years agoCorrect encoder/decoder state mismatch and spurious state resetting in the encoder...
Gregory Maxwell [Wed, 19 Oct 2011 04:20:46 +0000 (00:20 -0400)]
Correct encoder/decoder state mismatch and spurious state resetting in the encoder when side is reset.

Patch from Tim which corrects a glitch during mode switching tests.

8 years agoMisc corrections to the draft
Jean-Marc Valin [Tue, 18 Oct 2011 18:42:24 +0000 (14:42 -0400)]
Misc corrections to the draft

8 years agoRemove redundant mid-only flag when side VAD flag is set.
Timothy B. Terriberry [Mon, 17 Oct 2011 21:20:55 +0000 (14:20 -0700)]
Remove redundant mid-only flag when side VAD flag is set.

If there is activity in a regular, side SILK frame, then it must
 be coded, so we don't need to send a mid-only flag.

8 years agoDraft text for encoder mode selection
Jean-Marc Valin [Mon, 17 Oct 2011 21:55:59 +0000 (17:55 -0400)]
Draft text for encoder mode selection

8 years agoFix fixed-point build bustage from 53cc1a03.
Timothy B. Terriberry [Mon, 17 Oct 2011 20:16:23 +0000 (13:16 -0700)]
Fix fixed-point build bustage from 53cc1a03.

8 years agoFix side-channel index for VAD/LBRR flags.
Timothy B. Terriberry [Fri, 14 Oct 2011 23:14:36 +0000 (16:14 -0700)]
Fix side-channel index for VAD/LBRR flags.

Neither the encoder nor decoder were incrementing the side-channel
 index for a mid-only frame.
Unfortunately, they used that index to index the VAD flags and LBRR
This made the VAD flags for the side channel particularly useless,
 as you couldn't tell which frame a flag belonged to without
 decoding most of the packet.
It also desynched the LBRR information, as look at the wrong LBRR
 flags to decide when it had to code a mid-only flag.
If some frames were skipped in the side channel, then the last few
 VAD flags and LBRR flags would be garbage, but still get encoded.

This patch fixes this by continuing to increment nFramesDecoded or
 nFramesEncoded, even when skipping a frame in the side channel.
This makes the side-channel VAD and LBRR flags correspond to the
 correct time periods for frames greater than 20 ms.
It also fixes a bug where if DTX was not used on the packet where
 the side channel got turned off, it would never get used again
 until the encoder attempted to encode something in the side
 channel again.

8 years agoFix the side frame conditional coding rules.
Timothy B. Terriberry [Fri, 14 Oct 2011 20:38:24 +0000 (13:38 -0700)]
Fix the side frame conditional coding rules.

b24e5746 introduced changes to LastGainIndex which broke
 conditional coding for side frames after a mid-only frame (i.e.,
 in a 60 ms frame where the side is coded, not coded, then coded
These rules were a mess in general, however, because the side
 channel state kept a different nFramesDecoded count from the mid
 channel state, and had no way to tell if the prior side frame was

This patch attempts to rationalize them by moving the conditional
 coding decision up to the top level, where all this information is
The first coded side frame after an uncoded side frame now always
 uses independent coding.
If such a frame is also not the first side frame in an Opus frame,
 then it doesn't include an LTP scaling parameter (because the LTP
 state is well-defined).

8 years agoThis should fix switching from SILK/hybrid to 60ms CELT
Jean-Marc Valin [Mon, 17 Oct 2011 18:20:43 +0000 (14:20 -0400)]
This should fix switching from SILK/hybrid to 60ms CELT

8 years agoCorrect rare mismatch between the encoder and decoder introduced by e9b53212.
Gregory Maxwell [Sun, 16 Oct 2011 08:02:02 +0000 (04:02 -0400)]
Correct rare mismatch between the encoder and decoder introduced by e9b53212.

Only one of the two required checks in the encoder were updated. Thanks to
Tim for tracking down the actual cause of the mismatch.

8 years agoAddressing some comments about the draft and cleaning up COPYING
Jean-Marc Valin [Fri, 14 Oct 2011 20:11:09 +0000 (16:11 -0400)]
Addressing some comments about the draft and cleaning up COPYING

8 years agoFixes CELT->Hybrid glitches
Jean-Marc Valin [Fri, 14 Oct 2011 17:48:17 +0000 (13:48 -0400)]
Fixes CELT->Hybrid glitches

These were caused by not prefilling the hybrid CELT state

8 years agoMore draft updates.
Timothy B. Terriberry [Fri, 14 Oct 2011 00:06:53 +0000 (17:06 -0700)]
More draft updates.

A number of fixes and additions, including
* Ensure all usage of the word "mode" refer only to the choice of
   SILK/hybrid/CELT, not audio bandwidth, frame size, channel count,
   or anything else.
  There's still a bunch of usage of "mode" in CELT to refer to
   things in the CELTMode struct (e.g., band layout, etc.).
* Document the LSF reordering for silk_NLSF2A_find_poly().
* Document the DC response check during LSF stabilization.
* Fix the excitation scaling to give decoded SILK output in the
   range -1.0...1.0.
* Rewrite the mode-switching section.
  Ironically the title of the section still implies "mode" means
   than just SILK/hybrid/CELT, but I couldn't come up with a
   better one.
* Minor clean-ups to the acknowledgements.

8 years agoImproved test for fishy redundancy length
Jean-Marc Valin [Fri, 14 Oct 2011 00:12:05 +0000 (20:12 -0400)]
Improved test for fishy redundancy length

8 years agoTim says it's safe
Jean-Marc Valin [Thu, 13 Oct 2011 20:24:11 +0000 (16:24 -0400)]
Tim says it's safe

8 years agoJM puts on a brown paper bag
Jean-Marc Valin [Thu, 13 Oct 2011 20:18:24 +0000 (16:18 -0400)]
JM puts on a brown paper bag

8 years agoDoing a best for "unprotected" switches to 2.5 ms frames
Jean-Marc Valin [Thu, 13 Oct 2011 16:39:15 +0000 (12:39 -0400)]
Doing a best for "unprotected" switches to 2.5 ms frames

8 years agoFixes a corner case that was causing silk_A2NLSF() to fail
Koen Vos [Thu, 13 Oct 2011 01:30:58 +0000 (21:30 -0400)]
Fixes a corner case that was causing silk_A2NLSF() to fail

Input that caused the problem was:
a_Q16[] = [129763 -49346 -42032 5488 28014 -1549 -2384 -8568
3154 -5104 -1605 6291 11861 -1843 -17715 7361]

8 years agoFixes a case where PLC was called on the side when no side was ever coded
Jean-Marc Valin [Wed, 12 Oct 2011 19:09:13 +0000 (15:09 -0400)]
Fixes a case where PLC was called on the side when no side was ever coded

8 years agoImproves accuracy of NLSF2A by reordering the polynomial roots
Timothy B. Terriberry [Wed, 12 Oct 2011 18:24:19 +0000 (14:24 -0400)]
Improves accuracy of NLSF2A by reordering the polynomial roots

8 years agoFixes a numerical accuracy issue in the pitch search
Jean-Marc Valin [Wed, 12 Oct 2011 16:58:52 +0000 (12:58 -0400)]
Fixes a numerical accuracy issue in the pitch search

The energy "sliding window" was using double accumulation with
float multiplications. This forces the multiplications to be
double as well.

8 years agoFixes a panned stereo regression
Jean-Marc Valin [Wed, 12 Oct 2011 01:46:55 +0000 (21:46 -0400)]
Fixes a panned stereo regression

The previous commit introduced some cross-talk for the case of SILK
with one channel muted.

8 years agoMisc bug fixes
Jean-Marc Valin [Wed, 12 Oct 2011 01:09:14 +0000 (21:09 -0400)]
Misc bug fixes

- There was a bug where the decoder resampler was not properly initialized
when fs_kHz == API_fs_kHz. In that case the resampler would continue to
upsample, and the output was corrupt.

- The delay value in the decoder was taken from the state before it was
potentially updated. This caused the decoder to apply the new dalay value one
frame late

- The encoder and decoder states are now updated more consistently, when
the sampling rate changes (pesq liked these changes)

- Properly resetting the side channel encoder and decoder for the first
frame with side coding active again

- Faster updating the "ratio" value in the LR_to_MS() code for large
prediction values means that for certain extreme/artificial input
signals the output looks better

8 years agoGets rid of a "safe" signed overflow in silk_noise_shape_quantizer_del_dec()
Jean-Marc Valin [Tue, 11 Oct 2011 22:00:23 +0000 (18:00 -0400)]
Gets rid of a "safe" signed overflow in silk_noise_shape_quantizer_del_dec()

8 years agoGets rid of a "safe" signed overflow in silk_DIV32_varQ()
Jean-Marc Valin [Tue, 11 Oct 2011 20:47:00 +0000 (16:47 -0400)]
Gets rid of a "safe" signed overflow in silk_DIV32_varQ()

8 years agoUsing a noise-based PLC for the CELT layer in hybrid mode
Jean-Marc Valin [Tue, 11 Oct 2011 19:03:38 +0000 (15:03 -0400)]
Using a noise-based PLC for the CELT layer in hybrid mode

8 years agoFixes a corruption when decoding FEC frames
Jean-Marc Valin [Tue, 11 Oct 2011 01:29:20 +0000 (21:29 -0400)]
Fixes a corruption when decoding FEC frames

8 years agoMove a number of files and functions which are only used by fixed point builds from...
Gregory Maxwell [Mon, 10 Oct 2011 17:59:30 +0000 (13:59 -0400)]
Move a number of files and functions which are only used by fixed point builds from silk/ to silk/fixed/.

I attempted to not break the msvc projects, but I can't test them.

8 years agoMisc SILK fixes:
Koen Vos [Tue, 11 Oct 2011 00:46:32 +0000 (20:46 -0400)]
Misc SILK fixes:

- compile warning in opus_decoder.c
- decoder state reduced by ~3 kB (by merging buffers, as Tim suggested)
- some minor decoder optimizations (only the PLC is non-bit exact, so should be ok)

8 years agoCheap early detection of unstable filters
Jean-Marc Valin [Mon, 10 Oct 2011 05:57:22 +0000 (01:57 -0400)]
Cheap early detection of unstable filters

We check the DC gain before doing the full RC calculations

8 years agoMake repacketizer API use opus_int32 for lengths and add some additional error handling.
Gregory Maxwell [Mon, 10 Oct 2011 05:02:14 +0000 (01:02 -0400)]
Make repacketizer API use opus_int32 for lengths and add some additional error handling.

8 years agoMinor fixes
Koen Vos [Mon, 10 Oct 2011 00:34:41 +0000 (20:34 -0400)]
Minor fixes

- fixes the test_opus "skip" for stereo
- fixes 6 visual studio compile warnings
- adds several header files to visual studio's include folder

8 years agoMake opus_repacketizer_create handle malloc failure gracefully.
Gregory Maxwell [Sun, 9 Oct 2011 22:08:06 +0000 (18:08 -0400)]
Make opus_repacketizer_create handle malloc failure gracefully.

8 years agoCleaner way to take into account the prediction for stereo width
Koen Vos [Mon, 10 Oct 2011 00:27:13 +0000 (20:27 -0400)]
Cleaner way to take into account the prediction for stereo width

8 years agoTwo minor SILK fixes
Koen Vos [Sun, 9 Oct 2011 16:53:59 +0000 (12:53 -0400)]
Two minor SILK fixes

- increases the max pitch lag by 1 (the thing Tim pointed out).  this brings the decoder in sync with the old one
- avoids that the first stereo frame is collapsed to mono

8 years agoAvoids unnecessary collapse of the HF stereo image in hybrid mode.
Jean-Marc Valin [Sun, 9 Oct 2011 05:05:25 +0000 (01:05 -0400)]
Avoids unnecessary collapse of the HF stereo image in hybrid mode.

SILK now reports an "effective width" that takes into account side prediction.

8 years agoFixes a stereo SILK->CELT switching bug
Jean-Marc Valin [Sun, 9 Oct 2011 04:29:26 +0000 (00:29 -0400)]
Fixes a stereo SILK->CELT switching bug

Making sure not to abruptly "de-collapse" the stereo for such transitions

8 years agoIncrease the floor on nb_compr_bytes when we enable redundancy.
Jean-Marc Valin [Sun, 9 Oct 2011 02:45:19 +0000 (22:45 -0400)]
Increase the floor on nb_compr_bytes when we enable redundancy.

8 years agoFixes a redundancy mismatch bug
Jean-Marc Valin [Sun, 9 Oct 2011 02:12:31 +0000 (22:12 -0400)]
Fixes a redundancy mismatch bug

When SILK decided not to use the desired bandwidth, the redundancy
could be encoded at the desired bandwidth rather than at the actual
bandwidth used.

8 years agoFixes a rare integer overflow in the SILK "50% of max rate" rule
Jean-Marc Valin [Sat, 8 Oct 2011 19:08:38 +0000 (15:08 -0400)]
Fixes a rare integer overflow in the SILK "50% of max rate" rule

8 years agoRedundancy fixes
Jean-Marc Valin [Sat, 8 Oct 2011 14:22:10 +0000 (10:22 -0400)]
Redundancy fixes

No longer encoding the redundancy flag for SILK since we can infer
redundancy from the length of the frame. Also, we skip encoding the
flag for hybrid mode when we know the decoder will not read it.