libavcodec/wmavoice.c:1569: error: Integer Overflow L2
  ([1, +oo] - [1, 5]):unsigned32 by call to `synth_block`.

libavcodec/wmavoice.c:1483:18: Unknown value from: abs
1481.         cur_pitch_val    = FFMIN(cur_pitch_val, s->max_pitch_val - 1);
1482.         if (s->last_acb_type == ACB_TYPE_NONE ||
1483.             20 * abs(cur_pitch_val - s->last_pitch_val) >
                       ^
1484.                 (cur_pitch_val + s->last_pitch_val))
1485.             s->last_pitch_val = cur_pitch_val;

libavcodec/wmavoice.c:1569:9: Call
1567.         }
1568. 
1569.         synth_block(s, bc, n, block_nsamples, bl_pitch_sh2,
              ^
1570.                     lsps, prev_lsps, &frame_descs[bd_idx],
1571.                     &excitation[n * block_nsamples],

libavcodec/wmavoice.c:1409:1: Parameter `frame_desc->log_n_blocks`
  1407.  * @return 0 on success, <0 on error.
  1408.  */
  1409. static void synth_block(WMAVoiceContext *s, BitstreamContext *bc,
        ^
  1410.                         int block_idx, int size,
  1411.                         int block_pitch_sh2,

libavcodec/wmavoice.c:1424:9: Call
  1422.         synth_block_hardcoded(s, bc, block_idx, size, frame_desc, excitation);
  1423.     else
  1424.         synth_block_fcb_acb(s, bc, block_idx, size, block_pitch_sh2,
                ^
  1425.                             frame_desc, excitation);
  1426. 

libavcodec/wmavoice.c:1274:1: Parameter `frame_desc->log_n_blocks`
    1272.  * @note see #synth_block().
    1273.  */
    1274. static void synth_block_fcb_acb(WMAVoiceContext *s, BitstreamContext *bc,
          ^
    1275.                                 int block_idx, int size,
    1276.                                 int block_pitch_sh2,

libavcodec/wmavoice.c:1312:9: Assignment
    1310.         }
    1311.     } else /* FCB_TYPE_EXC_PULSES */ {
    1312.         int offset_nbits = 5 - frame_desc->log_n_blocks;
                  ^
    1313. 
    1314.         fcb.no_repeat_mask = -1;

libavcodec/wmavoice.c:1322:30: Call
    1320. 
    1321.             sign           = bitstream_read_bit(bc) ? 1.0 : -1.0;
    1322.             pos1           = bitstream_read(bc, offset_nbits);
                                       ^
    1323.             fcb.x[fcb.n]   = n + 5 * pos1;
    1324.             fcb.y[fcb.n++] = sign;

libavcodec/bitstream.h:183:1: Parameter `n`
      181. 
      182. /* Return n bits from the buffer. n has to be in the 0-32 range. */
      183. static inline uint32_t bitstream_read(BitstreamContext *bc, unsigned n)
           ^
      184. {
      185.     if (!n)

libavcodec/bitstream.h:194:12: Call
      192.     }
      193. 
      194.     return get_val(bc, n);
                      ^
      195. }
      196. 

libavcodec/bitstream.h:130:1: <LHS trace>
128. }
129. 
130. static inline uint64_t get_val(BitstreamContext *bc, unsigned n)
     ^
131. {
132. #ifdef BITSTREAM_READER_LE

libavcodec/bitstream.h:130:1: Parameter `bc->bits_left`
        128. }
        129. 
        130. static inline uint64_t get_val(BitstreamContext *bc, unsigned n)
             ^
        131. {
        132. #ifdef BITSTREAM_READER_LE

libavcodec/bitstream.h:130:1: <RHS trace>
128. }
129. 
130. static inline uint64_t get_val(BitstreamContext *bc, unsigned n)
     ^
131. {
132. #ifdef BITSTREAM_READER_LE

libavcodec/bitstream.h:130:1: Parameter `n`
        128. }
        129. 
        130. static inline uint64_t get_val(BitstreamContext *bc, unsigned n)
             ^
        131. {
        132. #ifdef BITSTREAM_READER_LE

libavcodec/bitstream.h:139:5: Binary operation: ([1, +oo] - [1, 5]):unsigned32 by call to `synth_block` 
        137.     bc->bits <<= n;
        138. #endif
        139.     bc->bits_left -= n;
                 ^
        140. 
        141.     return ret;

static inline uint64_t get_val(BitstreamContext *bc, unsigned n)
{
#ifdef BITSTREAM_READER_LE
    uint64_t ret = bc->bits & ((UINT64_C(1) << n) - 1);
    bc->bits >>= n;
#else
    uint64_t ret = bc->bits >> (64 - n);
    bc->bits <<= n;
#endif
    bc->bits_left -= n;
    return ret;
}
['static int synth_frame(AVCodecContext *ctx, BitstreamContext *bc,\n                       int frame_idx, float *samples,\n                       const double *lsps, const double *prev_lsps,\n                       float *excitation, float *synth)\n{\n    WMAVoiceContext *s = ctx->priv_data;\n    int n, n_blocks_x2, log_n_blocks_x2, cur_pitch_val;\n    int pitch[MAX_BLOCKS], last_block_pitch;\n    int bd_idx = s->vbm_tree[bitstream_read_vlc(bc, frame_type_vlc.table, 6, 3)], block_nsamples;\n    if (bd_idx < 0) {\n        av_log(ctx, AV_LOG_ERROR,\n               "Invalid frame type VLC code, skipping\\n");\n        return AVERROR_INVALIDDATA;\n    }\n    block_nsamples = MAX_FRAMESIZE / frame_descs[bd_idx].n_blocks;\n    if (frame_descs[bd_idx].acb_type == ACB_TYPE_ASYMMETRIC) {\n        n_blocks_x2      = frame_descs[bd_idx].n_blocks << 1;\n        log_n_blocks_x2  = frame_descs[bd_idx].log_n_blocks + 1;\n        cur_pitch_val    = s->min_pitch_val + bitstream_read(bc, s->pitch_nbits);\n        cur_pitch_val    = FFMIN(cur_pitch_val, s->max_pitch_val - 1);\n        if (s->last_acb_type == ACB_TYPE_NONE ||\n            20 * abs(cur_pitch_val - s->last_pitch_val) >\n                (cur_pitch_val + s->last_pitch_val))\n            s->last_pitch_val = cur_pitch_val;\n        for (n = 0; n < frame_descs[bd_idx].n_blocks; n++) {\n            int fac = n * 2 + 1;\n            pitch[n] = (MUL16(fac,                 cur_pitch_val) +\n                        MUL16((n_blocks_x2 - fac), s->last_pitch_val) +\n                        frame_descs[bd_idx].n_blocks) >> log_n_blocks_x2;\n        }\n        s->pitch_diff_sh16 =\n            ((cur_pitch_val - s->last_pitch_val) << 16) / MAX_FRAMESIZE;\n    }\n    switch (frame_descs[bd_idx].fcb_type) {\n    case FCB_TYPE_SILENCE:\n        s->silence_gain = wmavoice_gain_silence[bitstream_read(bc, 8)];\n        break;\n    case FCB_TYPE_AW_PULSES:\n        aw_parse_coords(s, bc, pitch);\n        break;\n    }\n    for (n = 0; n < frame_descs[bd_idx].n_blocks; n++) {\n        int bl_pitch_sh2;\n        switch (frame_descs[bd_idx].acb_type) {\n        case ACB_TYPE_HAMMING: {\n            int block_pitch,\n                t1 = (s->block_conv_table[1] - s->block_conv_table[0]) << 2,\n                t2 = (s->block_conv_table[2] - s->block_conv_table[1]) << 1,\n                t3 =  s->block_conv_table[3] - s->block_conv_table[2] + 1;\n            if (n == 0) {\n                block_pitch = bitstream_read(bc, s->block_pitch_nbits);\n            } else\n                block_pitch = last_block_pitch - s->block_delta_pitch_hrange +\n                              bitstream_read(bc, s->block_delta_pitch_nbits);\n            last_block_pitch = av_clip(block_pitch,\n                                       s->block_delta_pitch_hrange,\n                                       s->block_pitch_range -\n                                           s->block_delta_pitch_hrange);\n            if (block_pitch < t1) {\n                bl_pitch_sh2 = (s->block_conv_table[0] << 2) + block_pitch;\n            } else {\n                block_pitch -= t1;\n                if (block_pitch < t2) {\n                    bl_pitch_sh2 =\n                        (s->block_conv_table[1] << 2) + (block_pitch << 1);\n                } else {\n                    block_pitch -= t2;\n                    if (block_pitch < t3) {\n                        bl_pitch_sh2 =\n                            (s->block_conv_table[2] + block_pitch) << 2;\n                    } else\n                        bl_pitch_sh2 = s->block_conv_table[3] << 2;\n                }\n            }\n            pitch[n] = bl_pitch_sh2 >> 2;\n            break;\n        }\n        case ACB_TYPE_ASYMMETRIC: {\n            bl_pitch_sh2 = pitch[n] << 2;\n            break;\n        }\n        default:\n            bl_pitch_sh2 = 0;\n            break;\n        }\n        synth_block(s, bc, n, block_nsamples, bl_pitch_sh2,\n                    lsps, prev_lsps, &frame_descs[bd_idx],\n                    &excitation[n * block_nsamples],\n                    &synth[n * block_nsamples]);\n    }\n    if (s->do_apf) {\n        double i_lsps[MAX_LSPS];\n        float lpcs[MAX_LSPS];\n        for (n = 0; n < s->lsps; n++)\n            i_lsps[n] = cos(0.5 * (prev_lsps[n] + lsps[n]));\n        ff_acelp_lspd2lpc(i_lsps, lpcs, s->lsps >> 1);\n        postfilter(s, synth, samples, 80, lpcs,\n                   &s->zero_exc_pf[s->history_nsamples + MAX_FRAMESIZE * frame_idx],\n                   frame_descs[bd_idx].fcb_type, pitch[0]);\n        for (n = 0; n < s->lsps; n++)\n            i_lsps[n] = cos(lsps[n]);\n        ff_acelp_lspd2lpc(i_lsps, lpcs, s->lsps >> 1);\n        postfilter(s, &synth[80], &samples[80], 80, lpcs,\n                   &s->zero_exc_pf[s->history_nsamples + MAX_FRAMESIZE * frame_idx + 80],\n                   frame_descs[bd_idx].fcb_type, pitch[0]);\n    } else\n        memcpy(samples, synth, 160 * sizeof(synth[0]));\n    s->frame_cntr++;\n    if (s->frame_cntr >= 0xFFFF) s->frame_cntr -= 0xFFFF;\n    s->last_acb_type = frame_descs[bd_idx].acb_type;\n    switch (frame_descs[bd_idx].acb_type) {\n    case ACB_TYPE_NONE:\n        s->last_pitch_val = 0;\n        break;\n    case ACB_TYPE_ASYMMETRIC:\n        s->last_pitch_val = cur_pitch_val;\n        break;\n    case ACB_TYPE_HAMMING:\n        s->last_pitch_val = pitch[frame_descs[bd_idx].n_blocks - 1];\n        break;\n    }\n    return 0;\n}', 'static void synth_block(WMAVoiceContext *s, BitstreamContext *bc,\n                        int block_idx, int size,\n                        int block_pitch_sh2,\n                        const double *lsps, const double *prev_lsps,\n                        const struct frame_type_desc *frame_desc,\n                        float *excitation, float *synth)\n{\n    double i_lsps[MAX_LSPS];\n    float lpcs[MAX_LSPS];\n    float fac;\n    int n;\n    if (frame_desc->acb_type == ACB_TYPE_NONE)\n        synth_block_hardcoded(s, bc, block_idx, size, frame_desc, excitation);\n    else\n        synth_block_fcb_acb(s, bc, block_idx, size, block_pitch_sh2,\n                            frame_desc, excitation);\n    fac = (block_idx + 0.5) / frame_desc->n_blocks;\n    for (n = 0; n < s->lsps; n++)\n        i_lsps[n] = cos(prev_lsps[n] + fac * (lsps[n] - prev_lsps[n]));\n    ff_acelp_lspd2lpc(i_lsps, lpcs, s->lsps >> 1);\n    ff_celp_lp_synthesis_filterf(synth, lpcs, excitation, size, s->lsps);\n}', 'static void synth_block_fcb_acb(WMAVoiceContext *s, BitstreamContext *bc,\n                                int block_idx, int size,\n                                int block_pitch_sh2,\n                                const struct frame_type_desc *frame_desc,\n                                float *excitation)\n{\n    static const float gain_coeff[6] = {\n        0.8169, -0.06545, 0.1726, 0.0185, -0.0359, 0.0458\n    };\n    float pulses[MAX_FRAMESIZE / 2], pred_err, acb_gain, fcb_gain;\n    int n, idx, gain_weight;\n    AMRFixed fcb;\n    assert(size <= MAX_FRAMESIZE / 2);\n    memset(pulses, 0, sizeof(*pulses) * size);\n    fcb.pitch_lag      = block_pitch_sh2 >> 2;\n    fcb.pitch_fac      = 1.0;\n    fcb.no_repeat_mask = 0;\n    fcb.n              = 0;\n    if (frame_desc->fcb_type == FCB_TYPE_AW_PULSES) {\n        aw_pulse_set1(s, bc, block_idx, &fcb);\n        if (aw_pulse_set2(s, bc, block_idx, &fcb)) {\n            int r_idx = pRNG(s->frame_cntr, block_idx, size);\n            for (n = 0; n < size; n++)\n                excitation[n] =\n                    wmavoice_std_codebook[r_idx + n] * s->silence_gain;\n            bitstream_skip(bc, 7 + 1);\n            return;\n        }\n    } else   {\n        int offset_nbits = 5 - frame_desc->log_n_blocks;\n        fcb.no_repeat_mask = -1;\n        for (n = 0; n < 5; n++) {\n            float sign;\n            int pos1, pos2;\n            sign           = bitstream_read_bit(bc) ? 1.0 : -1.0;\n            pos1           = bitstream_read(bc, offset_nbits);\n            fcb.x[fcb.n]   = n + 5 * pos1;\n            fcb.y[fcb.n++] = sign;\n            if (n < frame_desc->dbl_pulses) {\n                pos2           = bitstream_read(bc, offset_nbits);\n                fcb.x[fcb.n]   = n + 5 * pos2;\n                fcb.y[fcb.n++] = (pos1 < pos2) ? -sign : sign;\n            }\n        }\n    }\n    ff_set_fixed_vector(pulses, &fcb, 1.0, size);\n    idx = bitstream_read(bc, 7);\n    fcb_gain = expf(avpriv_scalarproduct_float_c(s->gain_pred_err,\n                                                 gain_coeff, 6) -\n                    5.2409161640 + wmavoice_gain_codebook_fcb[idx]);\n    acb_gain = wmavoice_gain_codebook_acb[idx];\n    pred_err = av_clipf(wmavoice_gain_codebook_fcb[idx],\n                        -2.9957322736  ,\n                         1.6094379124  );\n    gain_weight = 8 >> frame_desc->log_n_blocks;\n    memmove(&s->gain_pred_err[gain_weight], s->gain_pred_err,\n            sizeof(*s->gain_pred_err) * (6 - gain_weight));\n    for (n = 0; n < gain_weight; n++)\n        s->gain_pred_err[n] = pred_err;\n    if (frame_desc->acb_type == ACB_TYPE_ASYMMETRIC) {\n        int len;\n        for (n = 0; n < size; n += len) {\n            int next_idx_sh16;\n            int abs_idx    = block_idx * size + n;\n            int pitch_sh16 = (s->last_pitch_val << 16) +\n                             s->pitch_diff_sh16 * abs_idx;\n            int pitch      = (pitch_sh16 + 0x6FFF) >> 16;\n            int idx_sh16   = ((pitch << 16) - pitch_sh16) * 8 + 0x58000;\n            idx            = idx_sh16 >> 16;\n            if (s->pitch_diff_sh16) {\n                if (s->pitch_diff_sh16 > 0) {\n                    next_idx_sh16 = (idx_sh16) &~ 0xFFFF;\n                } else\n                    next_idx_sh16 = (idx_sh16 + 0x10000) &~ 0xFFFF;\n                len = av_clip((idx_sh16 - next_idx_sh16) / s->pitch_diff_sh16 / 8,\n                              1, size - n);\n            } else\n                len = size;\n            ff_acelp_interpolatef(&excitation[n], &excitation[n - pitch],\n                                  wmavoice_ipol1_coeffs, 17,\n                                  idx, 9, len);\n        }\n    } else   {\n        int block_pitch = block_pitch_sh2 >> 2;\n        idx             = block_pitch_sh2 & 3;\n        if (idx) {\n            ff_acelp_interpolatef(excitation, &excitation[-block_pitch],\n                                  wmavoice_ipol2_coeffs, 4,\n                                  idx, 8, size);\n        } else\n            av_memcpy_backptr((uint8_t *) excitation, sizeof(float) * block_pitch,\n                              sizeof(float) * size);\n    }\n    ff_weighted_vector_sumf(excitation, excitation, pulses,\n                            acb_gain, fcb_gain, size);\n}', 'static inline uint32_t bitstream_read(BitstreamContext *bc, unsigned n)\n{\n    if (!n)\n        return 0;\n    if (n > bc->bits_left) {\n        refill_32(bc);\n        if (bc->bits_left < 32)\n            bc->bits_left = n;\n    }\n    return get_val(bc, n);\n}', 'static inline uint64_t get_val(BitstreamContext *bc, unsigned n)\n{\n#ifdef BITSTREAM_READER_LE\n    uint64_t ret = bc->bits & ((UINT64_C(1) << n) - 1);\n    bc->bits >>= n;\n#else\n    uint64_t ret = bc->bits >> (64 - n);\n    bc->bits <<= n;\n#endif\n    bc->bits_left -= n;\n    return ret;\n}']