libavcodec/mpegvideo_enc.c:1691: error: Buffer Overrun L2
  Offset: [min(1, `s->qscale`), max(31, `s->qscale`)] Size: 13 by call to `mpeg1_encode_mb`.

libavcodec/mpegvideo_enc.c:1435:1: Parameter `s->qscale`
1433. }
1434. 
1435. static av_always_inline void encode_mb_internal(MpegEncContext *s, int motion_x, int motion_y, int mb_block_height, int mb_block_count)
      ^
1436. {
1437.     int16_t weight[8][64];

libavcodec/mpegvideo_enc.c:1691:13: Call
1689.     case CODEC_ID_MPEG2VIDEO:
1690.         if (ENABLE_MPEG1VIDEO_ENCODER || ENABLE_MPEG2VIDEO_ENCODER)
1691.             mpeg1_encode_mb(s, s->block, motion_x, motion_y);
                  ^
1692.         break;
1693.     case CODEC_ID_MPEG4:

libavcodec/mpeg12enc.c:660:1: Parameter `s->qscale`
  658. }
  659. 
  660. void mpeg1_encode_mb(MpegEncContext *s, DCTELEM block[6][64], int motion_x, int motion_y)
       ^
  661. {
  662.     if (s->chroma_format == CHROMA_420) mpeg1_encode_mb_internal(s, block, motion_x, motion_y, 6);

libavcodec/mpeg12enc.c:662:41: Call
  660. void mpeg1_encode_mb(MpegEncContext *s, DCTELEM block[6][64], int motion_x, int motion_y)
  661. {
  662.     if (s->chroma_format == CHROMA_420) mpeg1_encode_mb_internal(s, block, motion_x, motion_y, 6);
                                               ^
  663.     else                                mpeg1_encode_mb_internal(s, block, motion_x, motion_y, 8);
  664. }

libavcodec/mpeg12enc.c:435:1: Parameter `s->qscale`
    433. }
    434. 
    435. static av_always_inline void mpeg1_encode_mb_internal(MpegEncContext *s,
         ^
    436.                                                    DCTELEM block[6][64],
    437.                                                    int motion_x, int motion_y,

libavcodec/mpeg12enc.c:477:17: Call
    475.             if(s->dquant && cbp){
    476.                 put_mb_modes(s, 2, 1, 0, 0); /* macroblock_type : macroblock_quant = 1 */
    477.                 put_qscale(s);
                         ^
    478.             }else{
    479.                 put_mb_modes(s, 1, 1, 0, 0); /* macroblock_type : macroblock_quant = 0 */

libavcodec/mpeg12enc.c:319:1: <Offset trace>
317. }
318. 
319. static av_always_inline void put_qscale(MpegEncContext *s)
     ^
320. {
321.     if(s->q_scale_type){

libavcodec/mpeg12enc.c:319:1: Parameter `s->qscale`
      317. }
      318. 
      319. static av_always_inline void put_qscale(MpegEncContext *s)
           ^
      320. {
      321.     if(s->q_scale_type){

libavcodec/mpeg12enc.c:37:1: <Length trace>
35. 
36. 
37. static const uint8_t inv_non_linear_qscale[13] = {
    ^
38.     0, 2, 4, 6, 8,
39.     9,10,11,12,13,14,15,16,

libavcodec/mpeg12enc.c:37:1: Array declaration
      35. 
      36. 
      37. static const uint8_t inv_non_linear_qscale[13] = {
          ^
      38.     0, 2, 4, 6, 8,
      39.     9,10,11,12,13,14,15,16,

libavcodec/mpeg12enc.c:323:29: Array access: Offset: [min(1, s->qscale), max(31, s->qscale)] Size: 13 by call to `mpeg1_encode_mb` 
      321.     if(s->q_scale_type){
      322.         assert(s->qscale>=1 && s->qscale <=12);
      323.         put_bits(&s->pb, 5, inv_non_linear_qscale[s->qscale]);
                                       ^
      324.     }else{
      325.         put_bits(&s->pb, 5, s->qscale);
