diff options
| author | Ralph Giles <giles@thaumas.net> | 2020-06-13 13:56:47 -0700 |
|---|---|---|
| committer | Ralph Giles <giles@thaumas.net> | 2020-06-13 13:56:47 -0700 |
| commit | 44e185265023385573edbb5f4198c352a43339ac (patch) | |
| tree | 4316c08d8c5a3be07007967c80efb2c69d2da712 /celt | |
| parent | d99495f41dfb8e48b68d3026344ca41bbada69a4 (diff) | |
| parent | 3cb71dbefd5a0a2ec4d692c6dd71c9ed6d207ffb (diff) | |
| download | opus-draft.tar.gz | |
Merge branch 'draft-willson' into draftdraft
Diffstat (limited to 'celt')
| -rw-r--r-- | celt/arch.h | 3 | ||||
| -rw-r--r-- | celt/celt_encoder.c | 2 | ||||
| -rw-r--r-- | celt/ecintrin.h | 4 | ||||
| -rw-r--r-- | celt/os_support.h | 1 |
4 files changed, 8 insertions, 2 deletions
diff --git a/celt/arch.h b/celt/arch.h index 08b07db5..3845c3a0 100644 --- a/celt/arch.h +++ b/celt/arch.h @@ -73,6 +73,9 @@ __attribute__((noreturn)) void celt_fatal(const char *str, const char *file, int line) { fprintf (stderr, "Fatal (internal) error in %s, line %d: %s\n", file, line, str); +#if defined(_MSC_VER) + _set_abort_behavior( 0, _WRITE_ABORT_MSG); +#endif abort(); } #endif diff --git a/celt/celt_encoder.c b/celt/celt_encoder.c index 44cb0850..d6f8afc2 100644 --- a/celt/celt_encoder.c +++ b/celt/celt_encoder.c @@ -1571,7 +1571,7 @@ int celt_encode_with_ec(CELTEncoder * OPUS_RESTRICT st, const opus_val16 * pcm, (tmp+4*mode->Fs)/(8*mode->Fs)-!!st->signalling)); effectiveBytes = nbCompressedBytes - nbFilledBytes; } - equiv_rate = ((opus_int32)nbCompressedBytes*8*50 >> (3-LM)) - (40*C+20)*((400>>LM) - 50); + equiv_rate = ((opus_int32)nbCompressedBytes*8*50 << (3-LM)) - (40*C+20)*((400>>LM) - 50); if (st->bitrate != OPUS_BITRATE_MAX) equiv_rate = IMIN(equiv_rate, st->bitrate - (40*C+20)*((400>>LM) - 50)); diff --git a/celt/ecintrin.h b/celt/ecintrin.h index 2263cff6..66a4c36e 100644 --- a/celt/ecintrin.h +++ b/celt/ecintrin.h @@ -49,7 +49,11 @@ This macro should only be used for implementing ec_ilog(), if it is defined. All other code should use EC_ILOG() instead.*/ #if defined(_MSC_VER) && (_MSC_VER >= 1400) +#if defined(_MSC_VER) && (_MSC_VER >= 1910) +# include <intrin0.h> /* Improve compiler throughput. */ +#else # include <intrin.h> +#endif /*In _DEBUG mode this is not an intrinsic by default.*/ # pragma intrinsic(_BitScanReverse) diff --git a/celt/os_support.h b/celt/os_support.h index a2171971..009bf861 100644 --- a/celt/os_support.h +++ b/celt/os_support.h @@ -39,7 +39,6 @@ #include "opus_defines.h" #include <string.h> -#include <stdio.h> #include <stdlib.h> /** Opus wrapper for malloc(). To do your own dynamic allocation, all you need to do is replace this function and opus_free */ |
