Fixes: 1674/clusterfuzz-testcase-minimized-6092531563495424 Fixes: 1686/clusterfuzz-testcase-minimized-6282691643179008
Unified · Split
| @@ -2800,9 +2800,9 @@ static void spectral_to_sample(AACContext *ac, int samples) · 2799 unmodified lines | ||
| 2800 | 2800 | int j; |
| 2801 | 2801 | /* preparation for resampler */ |
| 2802 | 2802 | for(j = 0; j<samples; j++){ |
| 2803 | − che->ch[0].ret[j] = (int32_t)av_clip64((int64_t)che->ch[0].ret[j]<<7, INT32_MIN, INT32_MAX-0x8000)+0x8000; | |
| 2803 | + che->ch[0].ret[j] = (int32_t)av_clip64((int64_t)che->ch[0].ret[j]*128, INT32_MIN, INT32_MAX-0x8000)+0x8000; | |
| 2804 | 2804 | if(type == TYPE_CPE) |
| 2805 | − che->ch[1].ret[j] = (int32_t)av_clip64((int64_t)che->ch[1].ret[j]<<7, INT32_MIN, INT32_MAX-0x8000)+0x8000; | |
| 2805 | + che->ch[1].ret[j] = (int32_t)av_clip64((int64_t)che->ch[1].ret[j]*128, INT32_MIN, INT32_MAX-0x8000)+0x8000; | |
| 2806 | 2806 | } |
| 2807 | 2807 | } |
| 2808 | 2808 | #endif /* USE_FIXED */ |
| @@ -289,7 +289,7 @@ static void sbr_hf_inverse_filter(SBRDSPContext *dsp, · 288 unmodified lines | ||
| 289 | 289 | if (shift >= 3) |
| 290 | 290 | alpha0[k][0] = 0x7fffffff; |
| 291 | 291 | else { |
| 292 | − a00.mant <<= 1; | |
| 292 | + a00.mant *= 2; | |
| 293 | 293 | shift = 2-shift; |
| 294 | 294 | if (shift == 0) |
| 295 | 295 | alpha0[k][0] = a00.mant; |
| @@ -303,7 +303,7 @@ static void sbr_hf_inverse_filter(SBRDSPContext *dsp, · 7 unmodified lines | ||
| 303 | 303 | if (shift >= 3) |
| 304 | 304 | alpha0[k][1] = 0x7fffffff; |
| 305 | 305 | else { |
| 306 | − a01.mant <<= 1; | |
| 306 | + a01.mant *= 2; | |
| 307 | 307 | shift = 2-shift; |
| 308 | 308 | if (shift == 0) |
| 309 | 309 | alpha0[k][1] = a01.mant; |
| @@ -316,7 +316,7 @@ static void sbr_hf_inverse_filter(SBRDSPContext *dsp, · 6 unmodified lines | ||
| 316 | 316 | if (shift >= 3) |
| 317 | 317 | alpha1[k][0] = 0x7fffffff; |
| 318 | 318 | else { |
| 319 | − a10.mant <<= 1; | |
| 319 | + a10.mant *= 2; | |
| 320 | 320 | shift = 2-shift; |
| 321 | 321 | if (shift == 0) |
| 322 | 322 | alpha1[k][0] = a10.mant; |
| @@ -330,7 +330,7 @@ static void sbr_hf_inverse_filter(SBRDSPContext *dsp, · 7 unmodified lines | ||
| 330 | 330 | if (shift >= 3) |
| 331 | 331 | alpha1[k][1] = 0x7fffffff; |
| 332 | 332 | else { |
| 333 | − a11.mant <<= 1; | |
| 333 | + a11.mant *= 2; | |
| 334 | 334 | shift = 2-shift; |
| 335 | 335 | if (shift == 0) |
| 336 | 336 | alpha1[k][1] = a11.mant; |
| @@ -116,7 +116,7 @@ static av_always_inline SoftFloat autocorr_calc(int64_t accu) · 115 unmodified lines | ||
| 116 | 116 | } else { |
| 117 | 117 | nz = 0; |
| 118 | 118 | while (FFABS(i) < 0x40000000) { |
| 119 | − i <<= 1; | |
| 119 | + i *= 2; | |
| 120 | 120 | nz++; |
| 121 | 121 | } |
| 122 | 122 | nz = 32-nz; |
| @@ -125,7 +125,7 @@ static av_always_inline SoftFloat autocorr_calc(int64_t accu) · 2 unmodified lines | ||
| 125 | 125 | round = 1U << (nz-1); |
| 126 | 126 | mant = (int)((accu + round) >> nz); |
| 127 | 127 | mant = (mant + 0x40)>>7; |
| 128 | − mant <<= 6; | |
| 128 | + mant *= 64; | |
| 129 | 129 | expo = nz + 15; |
| 130 | 130 | return av_int2sf(mant, 30 - expo); |
| 131 | 131 | } |