aboutsummaryrefslogtreecommitdiff
path: root/decoder/ixheaacd_pns_js_thumb.c
diff options
context:
space:
mode:
Diffstat (limited to 'decoder/ixheaacd_pns_js_thumb.c')
-rw-r--r--decoder/ixheaacd_pns_js_thumb.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/decoder/ixheaacd_pns_js_thumb.c b/decoder/ixheaacd_pns_js_thumb.c
index e6ba987..c39b3f2 100644
--- a/decoder/ixheaacd_pns_js_thumb.c
+++ b/decoder/ixheaacd_pns_js_thumb.c
@@ -101,6 +101,9 @@ VOID ixheaacd_gen_rand_vec(WORD32 scale, WORD shift, WORD32 *ptr_spec_coef,
spec = ptr_spec_coef;
+ if (shift < -31) {
+ shift = -31;
+ }
for (sfb = 0; sfb <= sfb_width; sfb++) {
*spec = ixheaac_shr32_dir_sat_limit(ixheaac_mult32_shl_sat(*spec, scale),
shift);