Skip to content
Snippets Groups Projects
Unverified Commit a6d29ed5 authored by Jean-Marc Valin's avatar Jean-Marc Valin
Browse files

Fix undefined left shift of negative value

parent 140e0982
No related branches found
No related tags found
1 merge request!126Misc fixes, mostly CELT-related
......@@ -189,7 +189,7 @@ void compute_pulse_cache(CELTMode *m, int LM)
/* Offset the number of qtheta bits by log2(N)/2
+ QTHETA_OFFSET compared to their "fair share" of
total/N */
offset = ((m->logN[j]+((LM0+k)<<BITRES))>>1)-QTHETA_OFFSET;
offset = ((m->logN[j]+(opus_int32)((opus_uint32)(LM0+k)<<BITRES))>>1)-QTHETA_OFFSET;
/* The number of qtheta bits we'll allocate if the remainder
is to be max_bits.
The average measured cost for theta is 0.89701 times qb,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment