summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Harris <mark.hsj@gmail.com>2018-07-28 13:07:15 -0700
committerMark Harris <mark.hsj@gmail.com>2018-07-28 13:07:15 -0700
commit38fca4a203a6759f2c90b86c84c4db087982ca81 (patch)
tree3426d211a93e0d242360be0e551a46277c4f6e76
parentdd6d6d523b4e7e51f2cfee725caf41cedeba1af2 (diff)
downloadopus-staging.tar.gz
Work around VS2015 internal compiler errorstaging
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.
-rw-r--r--celt/celt_encoder.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/celt/celt_encoder.c b/celt/celt_encoder.c
index fb582c47..e6a47df6 100644
--- a/celt/celt_encoder.c
+++ b/celt/celt_encoder.c
@@ -1021,13 +1021,13 @@ static opus_val16 dynalloc_analysis(const opus_val16 *bandLogE, const opus_val16
/* Compute SMR: Mask is never more than 72 dB below the peak and never below the noise floor.*/
opus_val16 smr = sig[i]-MAX16(MAX16(0, maxDepth-QCONST16(12.f, DB_SHIFT)), mask[i]);
/* Clamp SMR to make sure we're not shifting by something negative or too large. */
- smr = MAX16(-QCONST16(5.f, DB_SHIFT), MIN16(0, smr));
#ifdef FIXED_POINT
/* FIXME: Use PSHR16() instead */
- spread_weight[i] = IMAX(1, 32 >> -PSHR32(smr, DB_SHIFT));
+ int shift = -PSHR32(MAX16(-QCONST16(5.f, DB_SHIFT), MIN16(0, smr)), DB_SHIFT);
#else
- spread_weight[i] = IMAX(1, 32 >> -(int)floor(.5f + smr));
+ int shift = IMIN(5, IMAX(0, -(int)floor(.5f + smr)));
#endif
+ spread_weight[i] = 32 >> shift;
}
/*for (i=0;i<end;i++)
printf("%d ", spread_weight[i]);