libavcodec/hq_hqa.c:194: error: Integer Overflow L2
  ([0, `bc->bits_left` + 95] - 1):unsigned32 by call to `bitstream_read_bit`.

libavcodec/hq_hqa.c:180:1: Parameter `(*c->hqa_cbp_vlc.table)[*]`
178. }
179. 
180. static int hqa_decode_mb(HQContext *c, AVFrame *pic, int qgroup,
     ^
181.                          BitstreamContext *bc, int x, int y)
182. {

libavcodec/hq_hqa.c:186:11: Call
184.     int i, ret, cbp;
185. 
186.     cbp = bitstream_read_vlc(bc, c->hqa_cbp_vlc.table, 5, 1);
               ^
187. 
188.     for (i = 0; i < 12; i++)

libavcodec/bitstream.h:313:1: Parameter `(*table)[*]`
  311.  * If the VLC code is invalid and max_depth > 1, then the number of bits removed
  312.  * is undefined. */
  313. static inline int bitstream_read_vlc(BitstreamContext *bc, VLC_TYPE (*table)[2],
       ^
  314.                                      int bits, int max_depth)
  315. {

libavcodec/bitstream.h:319:5: Assignment
  317.     unsigned idx = bitstream_peek(bc, bits);
  318.     int code = table[idx][0];
  319.     int n    = table[idx][1];
           ^
  320. 
  321.     if (max_depth > 1 && n < 0) {

libavcodec/bitstream.h:329:5: Call
  327.         }
  328.     }
  329.     skip_remaining(bc, n);
           ^
  330. 
  331.     return code;

libavcodec/bitstream.h:230:1: Parameter `n`
    228. }
    229. 
    230. static inline void skip_remaining(BitstreamContext *bc, unsigned n)
         ^
    231. {
    232. #ifdef BITSTREAM_READER_LE

libavcodec/bitstream.h:237:5: Assignment
    235.     bc->bits <<= n;
    236. #endif
    237.     bc->bits_left -= n;
             ^
    238. }
    239. 

libavcodec/hq_hqa.c:194:16: Call
192. 
193.     if (cbp) {
194.         flag = bitstream_read_bit(bc);
                    ^
195. 
196.         cbp |= cbp << 4;

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, bc->bits_left + 95] - 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 hqa_decode_mb(HQContext *c, AVFrame *pic, int qgroup,\n                         BitstreamContext *bc, int x, int y)\n{\n    int flag = 0;\n    int i, ret, cbp;\n    cbp = bitstream_read_vlc(bc, c->hqa_cbp_vlc.table, 5, 1);\n    for (i = 0; i < 12; i++)\n        memset(c->block[i], 0, sizeof(*c->block));\n    for (i = 0; i < 12; i++)\n        c->block[i][0] = -128 * (1 << 6);\n    if (cbp) {\n        flag = bitstream_read_bit(bc);\n        cbp |= cbp << 4;\n        if (cbp & 0x3)\n            cbp |= 0x500;\n        if (cbp & 0xC)\n            cbp |= 0xA00;\n        for (i = 0; i < 12; i++) {\n            if (!(cbp & (1 << i)))\n                continue;\n            ret = hq_decode_block(c, bc, c->block[i], qgroup, i >= 8, 1);\n            if (ret < 0)\n                return ret;\n        }\n    }\n    put_blocks(c, pic, 3, x,      y, flag, c->block[ 0], c->block[ 2]);\n    put_blocks(c, pic, 3, x + 8,  y, flag, c->block[ 1], c->block[ 3]);\n    put_blocks(c, pic, 0, x,      y, flag, c->block[ 4], c->block[ 6]);\n    put_blocks(c, pic, 0, x + 8,  y, flag, c->block[ 5], c->block[ 7]);\n    put_blocks(c, pic, 2, x >> 1, y, flag, c->block[ 8], c->block[ 9]);\n    put_blocks(c, pic, 1, x >> 1, y, flag, c->block[10], c->block[11]);\n    return 0;\n}', 'static inline int bitstream_read_vlc(BitstreamContext *bc, VLC_TYPE (*table)[2],\n                                     int bits, int max_depth)\n{\n    int nb_bits;\n    unsigned idx = bitstream_peek(bc, bits);\n    int code = table[idx][0];\n    int n    = table[idx][1];\n    if (max_depth > 1 && n < 0) {\n        skip_remaining(bc, bits);\n        code = set_idx(bc, code, &n, &nb_bits, table);\n        if (max_depth > 2 && n < 0) {\n            skip_remaining(bc, nb_bits);\n            code = set_idx(bc, code, &n, &nb_bits, table);\n        }\n    }\n    skip_remaining(bc, n);\n    return code;\n}', 'static inline void skip_remaining(BitstreamContext *bc, unsigned n)\n{\n#ifdef BITSTREAM_READER_LE\n    bc->bits >>= n;\n#else\n    bc->bits <<= n;\n#endif\n    bc->bits_left -= n;\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}']