summaryrefslogtreecommitdiff
path: root/celt/celt_encoder.c
Commit message (Collapse)AuthorAgeFilesLines
* Avoids incrementing uninitialized valuesJean-Marc Valin2022-07-051-4/+10
| | | | | | The values were never used, but ubsan + valgrind would complain. Reviewed by Mark Harris
* fix equivalent bitrate calculation for <20ms frame sizesHector Martin2020-05-251-1/+1
| | | | | Signed-off-by: Hector Martin <marcan@marcan.st> Signed-off-by: Mark Harris <mark.hsj@gmail.com>
* Renaming compute_allocation to clt_compute_allocation() to avoid symbol clashesJean-Marc Valin2018-10-161-1/+1
| | | | As suggested in https://github.com/xiph/opus/pull/83
* Work around VS2015 internal compiler errorstagingMark Harris2018-07-281-3/+3
| | | | | | | | | | | The error was: c:\projects\opus\celt\celt_encoder.c(1019): fatal error C1001: An internal error has occurred in the compiler. [C:\projects\opus\win32\VS2015\opus.vcxproj] (compiler file 'f:\dd\vctools\compiler\utc\src\p2\main.c', line 255) To work around this problem, try simplifying or changing the program near the locations listed above. Please choose the Technical Support command on the Visual C++ Help menu, or open the Technical Support help file for more information Internal Compiler Error in C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\x86_amd64\CL.exe. You will be prompted to send an error report to Microsoft later.
* Silence compiler warningsMark Harris2018-07-211-1/+1
| | | | | | | clang -Wcast-align warnings with ambisonics enabled clang -Wnull-pointer-arithmetic warnings in test_opus_api.c gcc -Wimplicit-fallthrough warnings on arm msvc warning C4244 in celt_encoder.c with fixed point
* Fix DISABLE_FLOAT_API unused parameter warningMark Harris2018-05-281-0/+2
|
* Oops, fix NaN testJean-Marc Valin2018-05-171-1/+1
|
* Aborting on NaN in CELTJean-Marc Valin2018-05-151-0/+9
| | | | | | NaNs should be filtered at the Opus layer, so if there are any in the CELT encoder, then it's likely something went horribly wrong (e.g. corrupted state). In that case, better abort than have something bad happen.
* Disabling weak transients and 5ms resolution on voiced framesJean-Marc Valin2018-02-151-2/+2
|
* Add a simple masking model to the spreading decisionJean-Marc Valin2018-02-131-3/+41
| | | | This improves cases where a whole region is dominated by a handful of tones
* Making sure importance[] is initialized even when we don't use dynallocJean-Marc Valin2018-02-131-0/+3
|
* oopsJean-Marc Valin2018-02-131-1/+1
|
* Improve TF analysis RDO to take into account how important each band isJean-Marc Valin2018-02-131-19/+34
| | | | Also adds the error terms for band 0 that were previously omitted
* Scaling back the pitch filter when most of the energy is above 3.2 kHzJean-Marc Valin2018-01-261-3/+6
| | | | That corresponds to the fundamental for the shortest pitch period allowed
* Fix unnecessary assignment.Roman Kalashnikov2017-10-301-1/+1
| | | | | | | Fixes a warning from PVS-Studio. This was a cut-and-paste error from the stanza above and had no effect. Signed-off-by: Ralph Giles <giles@thaumas.net>
* Replace call of celt_inner_prod_c() (step 1)Linfeng Zhang2017-06-061-3/+3
| | | | | | | | | | | | Should call celt_inner_prod(). This change is bit exact as original, except for x86 floating-point. In x86 floating-point, it calls celt_inner_prod_sse() which may have different output with the change of floating-point operations' orders. Change-Id: Ia2381e2e198a84296ac28305183f15be842b3454 Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
* Recalibrate VBR to hit target bitrate on averageJean-Marc Valin2017-06-021-2/+2
|
* Update dynalloc VBR calibrationJean-Marc Valin2017-06-021-1/+1
|
* Adding leakage modelling to boost bandsexp_leakage7Jean-Marc Valin2017-06-011-6/+18
| | | | We boost bands that either cause leakage or are filled with leakage
* Let CBR use more bits for dynallocJean-Marc Valin2017-06-011-3/+3
| | | | It seems like letting CBR use up to 2/3 of the bit is still a win
* Fixes a double->float conversion warningJean-Marc Valin2017-05-241-1/+1
|
* Fixes some fixed-point 16-bit int overflowsv1.2-betaJean-Marc Valin2017-05-241-1/+1
| | | | | The code would have run fine on 32-bit archs, but would have overflowed on a 16-bit arch
* Reducing trim at low bitrateJean-Marc Valin2017-05-241-2/+10
| | | | | | | | | | | | Some informal tests seem to confirm that reducing the trim at 32-64 kbps improves quality (better HF). It's not clear whether it's also the case at 96 kb/s and above, so we're leaving it as is for those rates. This corresponds to buildC in this thread: https://hydrogenaud.io/index.php/topic,113985.0.html Also see: https://hydrogenaud.io/index.php/topic,111798.0.html
* Fix compiler warningsMark Harris2017-02-261-1/+1
| | | | | | | | | | | | | | | | | | | - celt/modes.c:430:14: warning: cast from 'const unsigned char *' to 'opus_int16 *' increases required alignment from 1 to 2 [-Wcast-align] - 'C[0][1]' may be used uninitialized [-Wmaybe-uninitialized] - Unused variable/parameter - Value stored is never read - MSVC warnings about "possible loss of data" due to type conversions - MSVC warning C4146: unary minus operator applied to unsigned type - silk/NLSF_del_dec_quant.c:137:20: warning: array subscript is above array bounds [-Warray-bounds] (gcc -O3 false positive) - src/mlp_train.h:39:20: warning: function declaration isn't a prototype [-Wstrict-prototypes] - Remove SMALL_FOOTPRINT code from SSE 4.1 FIR implementation, matching the C implementation. The clang -Wcast-align warnings with SSE intrinsics are a known clang issue: https://llvm.org/bugs/show_bug.cgi?id=20670
* Removes OPUS_FRAMESIZE_VARIABLEJean-Marc Valin2016-11-041-12/+4
| | | | That experiment never actually worked
* Don't use hybrid "weak transients" on vowelsJean-Marc Valin2016-10-291-4/+8
|
* Define "weak transients" for low bitrate hybridJean-Marc Valin2016-10-281-3/+19
| | | | These rely on TF rather than short windows to avoid partial collapse.
* Fixes an unstable energy issue for low-bitrate hybridJean-Marc Valin2016-10-271-4/+23
| | | | | | The transient detector would trigger on low-pitch vowels, but we didn't have enough bits to properly code the high bands as a transient, resulting in partial collapse and unstable energy.
* Make it possible to ignore inverted phase stereo for downmix purposesexp_bitstream7Jean-Marc Valin2016-09-011-2/+22
|
* Making stereo theta decision based on minimizing distortionJean-Marc Valin2016-07-281-1/+1
| | | | No point in minimizing the rate too since it's almost constant.
* Fixes a shift<0 issue in transient_analysis()Jean-Marc Valin2016-07-241-2/+2
| | | | | Fixes a potential overflow in high-passed signal for transient detection and ensures that the shift can never go negative
* Adds some smoothing to the energy quantizationexp_lbr_tuneJean-Marc Valin2016-07-191-2/+26
| | | | | | | | When the energy is stable, we slightly bias energy quantization towards the previous error to make the gain more stable (a constant offset is better than fluctuations). We reduce the bitrate by about 0.2% to 1% at low bitrate for the same quality.
* Retuning the tf_analysis() lambdaJean-Marc Valin2016-07-191-9/+1
| | | | Increasing the value at low rate seems to help a bit.
* Fixes equiv_rate for CBRJean-Marc Valin2016-07-191-2/+3
|
* Minor TF cleanup (tf_sum was useless), plus commentsJean-Marc Valin2016-07-191-7/+2
|
* Use SPREAD_AGGRESSIVE on non-transient hybrid framesJean-Marc Valin2016-07-191-1/+9
|
* Don't use too much temporal resolution on hybrid frames at low rateJean-Marc Valin2016-07-191-0/+7
| | | | | Otherwise, we risk having "temporal holes" in the HF that anti-collapse can't always fill in.
* Disable patch_transient_decision() on hybrid since it's causing artifactsJean-Marc Valin2016-07-191-1/+1
| | | | It would trigger on the second frame of "S"s, causing holes in the spectrum
* Boosting the high-band bitrate on transients for hybrid modeJean-Marc Valin2016-07-171-1/+4
|
* Quality: Increase CELT rate for voiced frames in hybrid modeJean-Marc Valin2016-07-171-0/+11
|
* Using "hybrid" flag instead of "start!=0"Jean-Marc Valin2016-07-151-5/+5
|
* Quality: Makes real CELT VBR work for hybrid tooJean-Marc Valin2016-07-151-8/+30
|
* Quality: Forces trim to 5 on hybrid modeJean-Marc Valin2016-07-151-2/+5
| | | | | This saves bits and makes more sense since alloc_trim_analysis() mostly looks at the lower bands that are coded with SILK
* Quality: removes VBR attenuation at low bitrateJean-Marc Valin2016-07-151-14/+4
| | | | Turns out that even low bitrates benefit from VBR
* Fixes minor code quality issues in CELTJean-Marc Valin2016-06-201-2/+2
| | | | Reported by Durandal.
* Fixes an overflow in the constrained VBR code for bitrate>64000Jean-Marc Valin2016-06-171-3/+6
|
* Fixes patch_transient_decision() for hybrid modeJean-Marc Valin2015-12-231-11/+11
| | | | ...and also make it not ignore the right channel
* Fixes the transient detector on silenceJean-Marc Valin2015-12-041-2/+2
| | | | | Previously silence would cause the divide approximation on 0/0 to return a very large value, which would be interpreted as a transient
* armv7(float): Optimize decode usecase using NE10 libraryViswanath Puttagunta2015-10-071-1/+2
| | | | | | | | | | | | Optimize opus decode (float only) use case using ARM NE10. Mainly effects opus_ifft and ctl_mdct_backward and related functions. Work based on previous Encode optimization using ARM NE10 library. See previous commit for details on how to enable this. Signed-off-by: Timothy B. Terriberry <tterribe@xiph.org>
* armv7(float): Optimize encode usecase using NE10 libraryViswanath Puttagunta2015-10-071-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | Optimize opus encode (float only) usecase using ARM NE10 library. Mainly effects opus_fft and ctl_mdct_forward and related functions. This optimization can be used for ARM CPUs that have NEON VFP unit. This patch only enables optimizations for ARMv7. Official ARM NE10 library page available at http://projectne10.github.io/Ne10/ To enable this optimization, use --enable-intrinsics --with-NE10=<install_prefix> or --enable-intrinsics --with-NE10-libraries=<NE10_lib_dir> --with-NE10-includes=<NE10_includes_dir> Compile time checks made during configure process to make sure optimization option available only when compiler supports NEON instrinsics. Runtime checks made to make sure optimized functions only called on appropriate hardware. Signed-off-by: Timothy B. Terriberry <tterribe@xiph.org>