libavcodec/svq1dec.c:175: error: Integer Overflow L2
  ([0, +oo] - 1):unsigned32 by call to `bitstream_read_bit`.

libavcodec/svq1dec.c:157:1: Parameter `bc->bits_left`
155.     n4    = mean + (mean >> 31) << 16 | (mean & 0xFFFF);
156. 
157. static int svq1_decode_block_intra(BitstreamContext *bc, uint8_t *pixels,
     ^
158.                                    ptrdiff_t pitch)
159. {

libavcodec/svq1dec.c:175:9: Call
173.     /* recursively process vector */
174.     for (i = 0, m = 1, n = 1, level = 5; i < n; i++) {
175.         SVQ1_PROCESS_VECTOR();
             ^
176. 
177.         /* destination address and vector size */

libavcodec/bitstream.h:145:1: Parameter `bc->bits_left`
  143. 
  144. /* Return one bit from the buffer. */
  145. static inline unsigned bitstream_read_bit(BitstreamContext *bc)
       ^
  146. {
  147.     if (!bc->bits_left)

libavcodec/bitstream.h:150:12: Call
  148.         refill_64(bc);
  149. 
  150.     return get_val(bc, 1);
                  ^
  151. }
  152. 

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: ([0, +oo] - 1):unsigned32 by call to `bitstream_read_bit` 
    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 svq1_decode_block_intra(BitstreamContext *bc, uint8_t *pixels,\n                                   ptrdiff_t pitch)\n{\n    uint32_t bit_cache;\n    uint8_t *list[63];\n    uint32_t *dst;\n    const uint32_t *codebook;\n    int entries[6];\n    int i, j, m, n;\n    int mean, stages;\n    unsigned x, y, width, height, level;\n    uint32_t n1, n2, n3, n4;\n    list[0] = pixels;\n    for (i = 0, m = 1, n = 1, level = 5; i < n; i++) {\n        SVQ1_PROCESS_VECTOR();\n        dst    = (uint32_t *)list[i];\n        width  = 1 << ((4 + level) / 2);\n        height = 1 << ((3 + level) / 2);\n        stages = bitstream_read_vlc(bc, svq1_intra_multistage[level].table, 3, 3) - 1;\n        if (stages == -1) {\n            for (y = 0; y < height; y++)\n                memset(&dst[y * (pitch / 4)], 0, width);\n            continue;\n        }\n        if ((stages > 0 && level >= 4) || stages < 0) {\n            ff_dlog(NULL,\n                    "Error (svq1_decode_block_intra): invalid vector: stages=%i level=%i\\n",\n                    stages, level);\n            return AVERROR_INVALIDDATA;\n        }\n        mean = bitstream_read_vlc(bc, svq1_intra_mean.table, 8, 3);\n        if (stages == 0) {\n            for (y = 0; y < height; y++)\n                memset(&dst[y * (pitch / 4)], mean, width);\n        } else {\n            SVQ1_CALC_CODEBOOK_ENTRIES(ff_svq1_intra_codebooks);\n            for (y = 0; y < height; y++) {\n                for (x = 0; x < width / 4; x++, codebook++) {\n                    n1 = n4;\n                    n2 = n4;\n                    SVQ1_ADD_CODEBOOK()\n                    dst[x] = n1 << 8 | n2;\n                }\n                dst += pitch / 4;\n            }\n        }\n    }\n    return 0;\n}', 'static inline unsigned bitstream_read_bit(BitstreamContext *bc)\n{\n    if (!bc->bits_left)\n        refill_64(bc);\n    return get_val(bc, 1);\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}']