libavcodec/proresdec.c:428: error: Integer Overflow L2
  ([2, 62] - [1, 4]):unsigned32 by call to `decode_ac_coeffs`.

libavcodec/proresdec.c:428:5: Call
426.     decode_dc_coeffs(&gb, td->blocks, blocks_per_slice);
427. 
428.     decode_ac_coeffs(&gb, td->blocks, blocks_per_slice,
         ^
429.                      plane_size_factor, ctx->scantable.permutated);
430. 

libavcodec/proresdec.c:364:1: Global `ff_prores_ac_codebook`
  362.  * Decode AC coefficients for all blocks in a slice.
  363.  */
  364. static inline void decode_ac_coeffs(GetBitContext *gb, DCTELEM *out,
       ^
  365.                                     int blocks_per_slice,
  366.                                     int plane_size_factor,

libavcodec/proresdec.c:387:15: Call
  385.             return;
  386. 
  387.         run = decode_vlc_codeword(gb, ff_prores_ac_codebook[run_cb_index]);
                     ^
  388. 
  389.         bits_left = get_bits_left(gb);

libavcodec/proresdec.c:292:1: <LHS trace>
290.  * Read an unsigned rice/exp golomb codeword.
291.  */
292. static inline int decode_vlc_codeword(GetBitContext *gb, uint8_t codebook)
     ^
293. {
294.     unsigned int rice_order, exp_order, switch_bits;

libavcodec/proresdec.c:292:1: Parameter `codebook`
    290.  * Read an unsigned rice/exp golomb codeword.
    291.  */
    292. static inline int decode_vlc_codeword(GetBitContext *gb, uint8_t codebook)
         ^
    293. {
    294.     unsigned int rice_order, exp_order, switch_bits;

libavcodec/proresdec.c:303:5: Assignment
    301. 
    302.     /* number of prefix bits to switch between Rice and expGolomb */
    303.     switch_bits = (codebook & 3) + 1;
             ^
    304.     rice_order  = codebook >> 5;        /* rice code order */
    305.     exp_order   = (codebook >> 2) & 7;  /* exp golomb code order */

libavcodec/proresdec.c:292:1: <RHS trace>
290.  * Read an unsigned rice/exp golomb codeword.
291.  */
292. static inline int decode_vlc_codeword(GetBitContext *gb, uint8_t codebook)
     ^
293. {
294.     unsigned int rice_order, exp_order, switch_bits;

libavcodec/proresdec.c:292:1: Parameter `codebook`
    290.  * Read an unsigned rice/exp golomb codeword.
    291.  */
    292. static inline int decode_vlc_codeword(GetBitContext *gb, uint8_t codebook)
         ^
    293. {
    294.     unsigned int rice_order, exp_order, switch_bits;

libavcodec/proresdec.c:303:5: Assignment
    301. 
    302.     /* number of prefix bits to switch between Rice and expGolomb */
    303.     switch_bits = (codebook & 3) + 1;
             ^
    304.     rice_order  = codebook >> 5;        /* rice code order */
    305.     exp_order   = (codebook >> 2) & 7;  /* exp golomb code order */

libavcodec/proresdec.c:320:9: Binary operation: ([2, 62] - [1, 4]):unsigned32 by call to `decode_ac_coeffs` 
    318.         }
    319.     } else { /* otherwise we got a exp golomb code */
    320.         len  = (log << 1) - switch_bits + exp_order + 1;
                 ^
    321.         code = NEG_USR32(buf, len) - (1 << exp_order) + (switch_bits << rice_order);
    322.         LAST_SKIP_BITS(re, gb, len);

static inline int decode_vlc_codeword(GetBitContext *gb, uint8_t codebook)
{
    unsigned int rice_order, exp_order, switch_bits;
    unsigned int buf, code;
    int log, prefix_len, len;
    OPEN_READER(re, gb);
    UPDATE_CACHE(re, gb);
    buf = GET_CACHE(re, gb);
    switch_bits = (codebook & 3) + 1;
    rice_order  = codebook >> 5;
    exp_order   = (codebook >> 2) & 7;
    log = 31 - av_log2(buf);
    if (log < switch_bits) {
        if (!rice_order) {
            code = log;
            LAST_SKIP_BITS(re, gb, log + 1);
        } else {
            prefix_len = log + 1;
            code = (log << rice_order) + NEG_USR32(buf << prefix_len, rice_order);
            LAST_SKIP_BITS(re, gb, prefix_len + rice_order);
        }
    } else {
        len  = (log << 1) - switch_bits + exp_order + 1;
        code = NEG_USR32(buf, len) - (1 << exp_order) + (switch_bits << rice_order);
        LAST_SKIP_BITS(re, gb, len);
    }
    CLOSE_READER(re, gb);
    return code;
}
['static void decode_slice_plane(ProresContext *ctx, ProresThreadData *td,\n                               const uint8_t *buf,\n                               int data_size, uint16_t *out_ptr,\n                               int linesize, int mbs_per_slice,\n                               int blocks_per_mb, int plane_size_factor,\n                               const int16_t *qmat)\n{\n    GetBitContext gb;\n    DCTELEM *block_ptr;\n    int mb_num, blocks_per_slice;\n    blocks_per_slice = mbs_per_slice * blocks_per_mb;\n    memset(td->blocks, 0, 8 * 4 * 64 * sizeof(*td->blocks));\n    init_get_bits(&gb, buf, data_size << 3);\n    decode_dc_coeffs(&gb, td->blocks, blocks_per_slice);\n    decode_ac_coeffs(&gb, td->blocks, blocks_per_slice,\n                     plane_size_factor, ctx->scantable.permutated);\n    block_ptr = td->blocks;\n    for (mb_num = 0; mb_num < mbs_per_slice; mb_num++, out_ptr += blocks_per_mb * 4) {\n        ctx->dsp.idct_put(out_ptr,                    linesize, block_ptr, qmat);\n        block_ptr += 64;\n        if (blocks_per_mb > 2) {\n            ctx->dsp.idct_put(out_ptr + 8,            linesize, block_ptr, qmat);\n            block_ptr += 64;\n        }\n        ctx->dsp.idct_put(out_ptr + linesize * 4,     linesize, block_ptr, qmat);\n        block_ptr += 64;\n        if (blocks_per_mb > 2) {\n            ctx->dsp.idct_put(out_ptr + linesize * 4 + 8, linesize, block_ptr, qmat);\n            block_ptr += 64;\n        }\n    }\n}', 'static inline void decode_ac_coeffs(GetBitContext *gb, DCTELEM *out,\n                                    int blocks_per_slice,\n                                    int plane_size_factor,\n                                    const uint8_t *scan)\n{\n    int pos, block_mask, run, level, sign, run_cb_index, lev_cb_index;\n    int max_coeffs, bits_left;\n    run   = 4;\n    level = 2;\n    max_coeffs = blocks_per_slice << 6;\n    block_mask = blocks_per_slice - 1;\n    for (pos = blocks_per_slice - 1; pos < max_coeffs;) {\n        run_cb_index = ff_prores_run_to_cb_index[FFMIN(run, 15)];\n        lev_cb_index = ff_prores_lev_to_cb_index[FFMIN(level, 9)];\n        bits_left = get_bits_left(gb);\n        if (bits_left <= 0 || (bits_left <= 8 && !show_bits(gb, bits_left)))\n            return;\n        run = decode_vlc_codeword(gb, ff_prores_ac_codebook[run_cb_index]);\n        bits_left = get_bits_left(gb);\n        if (bits_left <= 0 || (bits_left <= 8 && !show_bits(gb, bits_left)))\n            return;\n        level = decode_vlc_codeword(gb, ff_prores_ac_codebook[lev_cb_index]) + 1;\n        pos += run + 1;\n        if (pos >= max_coeffs)\n            break;\n        sign = get_sbits(gb, 1);\n        out[((pos & block_mask) << 6) + scan[pos >> plane_size_factor]] =\n            (level ^ sign) - sign;\n    }\n}', 'static inline int decode_vlc_codeword(GetBitContext *gb, uint8_t codebook)\n{\n    unsigned int rice_order, exp_order, switch_bits;\n    unsigned int buf, code;\n    int log, prefix_len, len;\n    OPEN_READER(re, gb);\n    UPDATE_CACHE(re, gb);\n    buf = GET_CACHE(re, gb);\n    switch_bits = (codebook & 3) + 1;\n    rice_order  = codebook >> 5;\n    exp_order   = (codebook >> 2) & 7;\n    log = 31 - av_log2(buf);\n    if (log < switch_bits) {\n        if (!rice_order) {\n            code = log;\n            LAST_SKIP_BITS(re, gb, log + 1);\n        } else {\n            prefix_len = log + 1;\n            code = (log << rice_order) + NEG_USR32(buf << prefix_len, rice_order);\n            LAST_SKIP_BITS(re, gb, prefix_len + rice_order);\n        }\n    } else {\n        len  = (log << 1) - switch_bits + exp_order + 1;\n        code = NEG_USR32(buf, len) - (1 << exp_order) + (switch_bits << rice_order);\n        LAST_SKIP_BITS(re, gb, len);\n    }\n    CLOSE_READER(re, gb);\n    return code;\n}']