libavcodec/hqx.c:340: error: Buffer Overrun L1
  Offset: [67, 74] (⇐ [11, 18] + 56) Size: 16 by call to `put_blocks`.

libavcodec/hqx.c:296:1: Parameter `ctx->block[*]`
294. }
295. 
296. static int hqx_decode_422a(HQXContext *ctx, AVFrame *pic,
     ^
297.                            GetBitContext *gb, int x, int y)
298. {

libavcodec/hqx.c:340:5: Call
338.     put_blocks(pic, 0, x + 8,  y, flag, ctx->block[ 5], ctx->block[ 7], hqx_quant_luma);
339.     put_blocks(pic, 2, x >> 1, y, flag, ctx->block[ 8], ctx->block[ 9], hqx_quant_chroma);
340.     put_blocks(pic, 1, x >> 1, y, flag, ctx->block[10], ctx->block[11], hqx_quant_chroma);
         ^
341. 
342.     return 0;

libavcodec/hqx.c:192:1: Parameter `*block1`
  190. }
  191. 
  192. static inline void put_blocks(AVFrame *pic, int plane,
       ^
  193.                               int x, int y, int ilace,
  194.                               int16_t *block0, int16_t *block1,

libavcodec/hqx.c:202:5: Call
  200. 
  201.     hqx_idct_put((uint16_t *)(p + y * lsize), lsize * fields, block0, quant);
  202.     hqx_idct_put((uint16_t *)(p + (y + (ilace ? 1 : 8)) * lsize),
           ^
  203.                  lsize * fields, block1, quant);
  204. }

libavcodec/hqx.c:176:1: Parameter `*block`
    174. }
    175. 
    176. static void hqx_idct_put(uint16_t *dst, ptrdiff_t stride,
         ^
    177.                          int16_t *block, const uint8_t *quant)
    178. {

libavcodec/hqx.c:181:5: Call
    179.     int i, j;
    180. 
    181.     hqx_idct(block, quant);
             ^
    182. 
    183.     for (i = 0; i < 8; i++) {

libavcodec/hqx.c:166:1: Parameter `*block`
      164. }
      165. 
      166. static void hqx_idct(int16_t *block, const uint8_t *quant)
           ^
      167. {
      168.     int i;

libavcodec/hqx.c:171:9: Call
      169. 
      170.     for (i = 0; i < 8; i++)
      171.         idct_col(block + i, quant + i);
                   ^
      172.     for (i = 0; i < 8; i++)
      173.         idct_row(block + i * 8);

libavcodec/hqx.c:84:1: <Length trace>
82. };
83. 
84. static inline void idct_col(int16_t *blk, const uint8_t *quant)
    ^
85. {
86.     int t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, tA, tB, tC, tD, tE, tF;

libavcodec/hqx.c:84:1: Parameter `*blk`
        82. };
        83. 
        84. static inline void idct_col(int16_t *blk, const uint8_t *quant)
            ^
        85. {
        86.     int t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, tA, tB, tC, tD, tE, tF;

libavcodec/hqx.c:97:16: Array access: Offset: [67, 74] (⇐ [11, 18] + 56) Size: 16 by call to `put_blocks` 
        95.     s5 = (int) blk[5 * 8] * quant[5 * 8];
        96.     s6 = (int) blk[6 * 8] * quant[6 * 8];
        97.     s7 = (int) blk[7 * 8] * quant[7 * 8];
                           ^
        98. 
        99.     t0  =  (s3 * 19266 + s5 * 12873) >> 15;

static inline void idct_col(int16_t *blk, const uint8_t *quant)
{
    int t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, tA, tB, tC, tD, tE, tF;
    int t10, t11, t12, t13;
    int s0, s1, s2, s3, s4, s5, s6, s7;
    s0 = (int) blk[0 * 8] * quant[0 * 8];
    s1 = (int) blk[1 * 8] * quant[1 * 8];
    s2 = (int) blk[2 * 8] * quant[2 * 8];
    s3 = (int) blk[3 * 8] * quant[3 * 8];
    s4 = (int) blk[4 * 8] * quant[4 * 8];
    s5 = (int) blk[5 * 8] * quant[5 * 8];
    s6 = (int) blk[6 * 8] * quant[6 * 8];
    s7 = (int) blk[7 * 8] * quant[7 * 8];
    t0  =  (s3 * 19266 + s5 * 12873) >> 15;
    t1  =  (s5 * 19266 - s3 * 12873) >> 15;
    t2  = ((s7 * 4520  + s1 * 22725) >> 15) - t0;
    t3  = ((s1 * 4520  - s7 * 22725) >> 15) - t1;
    t4  = t0 * 2 + t2;
    t5  = t1 * 2 + t3;
    t6  = t2 - t3;
    t7  = t3 * 2 + t6;
    t8  = (t6 * 11585) >> 14;
    t9  = (t7 * 11585) >> 14;
    tA  = (s2 * 8867 - s6 * 21407) >> 14;
    tB  = (s6 * 8867 + s2 * 21407) >> 14;
    tC  = (s0 >> 1) - (s4 >> 1);
    tD  = (s4 >> 1) * 2 + tC;
    tE  = tC - (tA >> 1);
    tF  = tD - (tB >> 1);
    t10 = tF - t5;
    t11 = tE - t8;
    t12 = tE + (tA >> 1) * 2 - t9;
    t13 = tF + (tB >> 1) * 2 - t4;
    blk[0 * 8] = t13 + t4 * 2;
    blk[1 * 8] = t12 + t9 * 2;
    blk[2 * 8] = t11 + t8 * 2;
    blk[3 * 8] = t10 + t5 * 2;
    blk[4 * 8] = t10;
    blk[5 * 8] = t11;
    blk[6 * 8] = t12;
    blk[7 * 8] = t13;
}
['static int hqx_decode_422a(HQXContext *ctx, AVFrame *pic,\n                           GetBitContext *gb, int x, int y)\n{\n    const int *quants;\n    int flag = 0;\n    int last_dc;\n    int i, ret;\n    int cbp;\n    cbp = get_vlc2(gb, ctx->cbp_vlc.table, ctx->cbp_vlc.bits, 1);\n    for (i = 0; i < 12; i++)\n        memset(ctx->block[i], 0, sizeof(**ctx->block) * 64);\n    for (i = 0; i < 12; i++)\n        ctx->block[i][0] = -0x800;\n    if (cbp) {\n        if (ctx->interlaced)\n            flag = get_bits1(gb);\n        quants = hqx_quants[get_bits(gb, 4)];\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 (i == 0 || i == 4 || i == 8 || i == 10)\n                last_dc = 0;\n            if (cbp & (1 << i)) {\n                int vlc_index = ctx->dcb - 9;\n                ret = decode_block(gb, &ctx->dc_vlc[vlc_index], quants,\n                                   ctx->dcb, ctx->block[i], &last_dc);\n                if (ret < 0)\n                    return ret;\n            }\n        }\n    }\n    put_blocks(pic, 3, x,      y, flag, ctx->block[ 0], ctx->block[ 2], hqx_quant_luma);\n    put_blocks(pic, 3, x + 8,  y, flag, ctx->block[ 1], ctx->block[ 3], hqx_quant_luma);\n    put_blocks(pic, 0, x,      y, flag, ctx->block[ 4], ctx->block[ 6], hqx_quant_luma);\n    put_blocks(pic, 0, x + 8,  y, flag, ctx->block[ 5], ctx->block[ 7], hqx_quant_luma);\n    put_blocks(pic, 2, x >> 1, y, flag, ctx->block[ 8], ctx->block[ 9], hqx_quant_chroma);\n    put_blocks(pic, 1, x >> 1, y, flag, ctx->block[10], ctx->block[11], hqx_quant_chroma);\n    return 0;\n}', 'static inline void put_blocks(AVFrame *pic, int plane,\n                              int x, int y, int ilace,\n                              int16_t *block0, int16_t *block1,\n                              const uint8_t *quant)\n{\n    int fields = ilace ? 2 : 1;\n    int lsize = pic->linesize[plane];\n    uint8_t *p = pic->data[plane] + x * 2;\n    hqx_idct_put((uint16_t *)(p + y * lsize), lsize * fields, block0, quant);\n    hqx_idct_put((uint16_t *)(p + (y + (ilace ? 1 : 8)) * lsize),\n                 lsize * fields, block1, quant);\n}', 'static void hqx_idct_put(uint16_t *dst, ptrdiff_t stride,\n                         int16_t *block, const uint8_t *quant)\n{\n    int i, j;\n    hqx_idct(block, quant);\n    for (i = 0; i < 8; i++) {\n        for (j = 0; j < 8; j++) {\n            int v = av_clip(block[j + i * 8] + 0x800, 0, 0x1000);\n            dst[j] = (v << 4) | (v >> 8);\n        }\n        dst += stride >> 1;\n    }\n}', 'static void hqx_idct(int16_t *block, const uint8_t *quant)\n{\n    int i;\n    for (i = 0; i < 8; i++)\n        idct_col(block + i, quant + i);\n    for (i = 0; i < 8; i++)\n        idct_row(block + i * 8);\n}', 'static inline void idct_col(int16_t *blk, const uint8_t *quant)\n{\n    int t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, tA, tB, tC, tD, tE, tF;\n    int t10, t11, t12, t13;\n    int s0, s1, s2, s3, s4, s5, s6, s7;\n    s0 = (int) blk[0 * 8] * quant[0 * 8];\n    s1 = (int) blk[1 * 8] * quant[1 * 8];\n    s2 = (int) blk[2 * 8] * quant[2 * 8];\n    s3 = (int) blk[3 * 8] * quant[3 * 8];\n    s4 = (int) blk[4 * 8] * quant[4 * 8];\n    s5 = (int) blk[5 * 8] * quant[5 * 8];\n    s6 = (int) blk[6 * 8] * quant[6 * 8];\n    s7 = (int) blk[7 * 8] * quant[7 * 8];\n    t0  =  (s3 * 19266 + s5 * 12873) >> 15;\n    t1  =  (s5 * 19266 - s3 * 12873) >> 15;\n    t2  = ((s7 * 4520  + s1 * 22725) >> 15) - t0;\n    t3  = ((s1 * 4520  - s7 * 22725) >> 15) - t1;\n    t4  = t0 * 2 + t2;\n    t5  = t1 * 2 + t3;\n    t6  = t2 - t3;\n    t7  = t3 * 2 + t6;\n    t8  = (t6 * 11585) >> 14;\n    t9  = (t7 * 11585) >> 14;\n    tA  = (s2 * 8867 - s6 * 21407) >> 14;\n    tB  = (s6 * 8867 + s2 * 21407) >> 14;\n    tC  = (s0 >> 1) - (s4 >> 1);\n    tD  = (s4 >> 1) * 2 + tC;\n    tE  = tC - (tA >> 1);\n    tF  = tD - (tB >> 1);\n    t10 = tF - t5;\n    t11 = tE - t8;\n    t12 = tE + (tA >> 1) * 2 - t9;\n    t13 = tF + (tB >> 1) * 2 - t4;\n    blk[0 * 8] = t13 + t4 * 2;\n    blk[1 * 8] = t12 + t9 * 2;\n    blk[2 * 8] = t11 + t8 * 2;\n    blk[3 * 8] = t10 + t5 * 2;\n    blk[4 * 8] = t10;\n    blk[5 * 8] = t11;\n    blk[6 * 8] = t12;\n    blk[7 * 8] = t13;\n}']