libavcodec/rv40.c:553: error: Buffer Overrun L2
  Offset: [0, 21] Size: 16 by call to `rv40_h_loop_filter`.

libavcodec/rv40.c:545:17: Assignment
543.         for(j = 0; j < 16; j += 4){
544.             Y = s->current_picture_ptr->data[0] + mb_x*16 + (row*16 + j) * s->linesize;
545.             for(i = 0; i < 4; i++, Y += 4){
                     ^
546.                 int ij = i + j;
547.                 int clip_cur = y_to_deblock & (MASK_CUR << ij) ? clip[POS_CUR] : 0;

libavcodec/rv40.c:548:30: Assignment
546.                 int ij = i + j;
547.                 int clip_cur = y_to_deblock & (MASK_CUR << ij) ? clip[POS_CUR] : 0;
548.                 int dither = j ? ij : i*4;
                                  ^
549. 
550.                 // if bottom block is coded then we can filter its top edge

libavcodec/rv40.c:548:17: Assignment
546.                 int ij = i + j;
547.                 int clip_cur = y_to_deblock & (MASK_CUR << ij) ? clip[POS_CUR] : 0;
548.                 int dither = j ? ij : i*4;
                     ^
549. 
550.                 // if bottom block is coded then we can filter its top edge

libavcodec/rv40.c:553:21: Call
551.                 // (or bottom edge of this block, which is the same)
552.                 if(y_h_deblock & (MASK_BOTTOM << ij)){
553.                     rv40_h_loop_filter(Y+4*s->linesize, s->linesize, dither,
                         ^
554.                                        y_to_deblock & (MASK_BOTTOM << ij) ? clip[POS_CUR] : 0,
555.                                        clip_cur,

libavcodec/rv40.c:385:1: Parameter `dmode`
  383.                               alpha, beta, beta2, chroma, edge);
  384. }
  385. static void rv40_h_loop_filter(uint8_t *src, int stride, int dmode,
       ^
  386.                                int lim_q1, int lim_p1,
  387.                                int alpha, int beta, int beta2, int chroma, int edge){

libavcodec/rv40.c:388:5: Call
  386.                                int lim_q1, int lim_p1,
  387.                                int alpha, int beta, int beta2, int chroma, int edge){
  388.     rv40_adaptive_loop_filter(src, stride, 1, dmode, lim_q1, lim_p1,
           ^
  389.                               alpha, beta, beta2, chroma, edge);
  390. }

libavcodec/rv40.c:288:1: <Offset trace>
286. }
287. 
288. static inline void rv40_adaptive_loop_filter(uint8_t *src, const int step,
     ^
289.                                              const int stride, const int dmode,
290.                                              const int lim_q1, const int lim_p1,

libavcodec/rv40.c:288:1: Parameter `dmode`
    286. }
    287. 
    288. static inline void rv40_adaptive_loop_filter(uint8_t *src, const int step,
         ^
    289.                                              const int stride, const int dmode,
    290.                                              const int lim_q1, const int lim_p1,

libavcodec/rv40data.h:74:1: <Length trace>
72.  * dither values for deblocking filter - left/top values
73.  */
74. static const uint8_t rv40_dither_l[16] = {
    ^
75.     0x40, 0x50, 0x20, 0x60, 0x30, 0x50, 0x40, 0x30,
76.     0x50, 0x40, 0x50, 0x30, 0x60, 0x20, 0x50, 0x40

libavcodec/rv40data.h:74:1: Array declaration
    72.  * dither values for deblocking filter - left/top values
    73.  */
    74. static const uint8_t rv40_dither_l[16] = {
        ^
    75.     0x40, 0x50, 0x20, 0x60, 0x30, 0x50, 0x40, 0x30,
    76.     0x50, 0x40, 0x50, 0x30, 0x60, 0x20, 0x50, 0x40

libavcodec/rv40.c:340:55: Array access: Offset: [0, 21] Size: 16 by call to `rv40_h_loop_filter` 
    338.             p0 = (25*src[-3*step] + 26*src[-2*step]
    339.                 + 26*src[-1*step]
    340.                 + 26*src[ 0*step] + 25*src[ 1*step] + rv40_dither_l[dmode + i]) >> 7;
                                                               ^
    341.             q0 = (25*src[-2*step] + 26*src[-1*step]
    342.                 + 26*src[ 0*step]
