libavcodec/ffv1.c:878: error: Buffer Overrun L1
  Offset: [4, `w` + 4] (⇐ [3, `w` + 3] + 1) Size: 2 by call to `decode_line`.

libavcodec/ffv1.c:856:1: Parameter `w`
854. }
855. 
856. static void decode_plane(FFV1Context *s, uint8_t *src, int w, int h, int stride, int plane_index){
     ^
857.     int x, y;
858.     int_fast16_t sample_buffer[2][w+6];

libavcodec/ffv1.c:878:13: Call
876. //{START_TIMER
877.         if(s->avctx->bits_per_raw_sample <= 8){
878.             decode_line(s, w, sample, plane_index, 8);
                 ^
879.             for(x=0; x<w; x++){
880.                 src[x + stride*y]= sample[1][x];

libavcodec/ffv1.c:799:1: Parameter `w`
  797. }
  798. 
  799. static av_always_inline void decode_line(FFV1Context *s, int w, int_fast16_t *sample[2], int plane_index, int bits){
       ^
  800.     PlaneContext * const p= &s->plane[plane_index];
  801.     RangeCoder * const c= &s->c;

libavcodec/ffv1.c:810:18: Call
  808.         int diff, context, sign;
  809. 
  810.         context= get_context(s, sample[1] + x, sample[0] + x, sample[1] + x);
                        ^
  811.         if(context < 0){
  812.             context= -context;

libavcodec/ffv1.c:244:1: <Length trace>
242. }
243. 
244. static inline int get_context(FFV1Context *f, int_fast16_t *src, int_fast16_t *last, int_fast16_t *last2){
     ^
245.     const int LT= last[-1];
246.     const int  T= last[ 0];

libavcodec/ffv1.c:244:1: Parameter `*last`
    242. }
    243. 
    244. static inline int get_context(FFV1Context *f, int_fast16_t *src, int_fast16_t *last, int_fast16_t *last2){
         ^
    245.     const int LT= last[-1];
    246.     const int  T= last[ 0];

libavcodec/ffv1.c:247:19: Array access: Offset: [4, w + 4] (⇐ [3, w + 3] + 1) Size: 2 by call to `decode_line` 
    245.     const int LT= last[-1];
    246.     const int  T= last[ 0];
    247.     const int RT= last[ 1];
                           ^
    248.     const int L =  src[-1];
    249. 

static inline int get_context(FFV1Context *f, int_fast16_t *src, int_fast16_t *last, int_fast16_t *last2){
    const int LT= last[-1];
    const int  T= last[ 0];
    const int RT= last[ 1];
    const int L =  src[-1];
    if(f->quant_table[3][127]){
        const int TT= last2[0];
        const int LL=  src[-2];
        return f->quant_table[0][(L-LT) & 0xFF] + f->quant_table[1][(LT-T) & 0xFF] + f->quant_table[2][(T-RT) & 0xFF]
              +f->quant_table[3][(LL-L) & 0xFF] + f->quant_table[4][(TT-T) & 0xFF];
    }else
        return f->quant_table[0][(L-LT) & 0xFF] + f->quant_table[1][(LT-T) & 0xFF] + f->quant_table[2][(T-RT) & 0xFF];
}
['static void decode_plane(FFV1Context *s, uint8_t *src, int w, int h, int stride, int plane_index){\n    int x, y;\n    int_fast16_t sample_buffer[2][w+6];\n    int_fast16_t *sample[2];\n    sample[0]=sample_buffer[0]+3;\n    sample[1]=sample_buffer[1]+3;\n    s->run_index=0;\n    memset(sample_buffer, 0, sizeof(sample_buffer));\n    for(y=0; y<h; y++){\n        int_fast16_t *temp= sample[0];\n        sample[0]= sample[1];\n        sample[1]= temp;\n        sample[1][-1]= sample[0][0  ];\n        sample[0][ w]= sample[0][w-1];\n        if(s->avctx->bits_per_raw_sample <= 8){\n            decode_line(s, w, sample, plane_index, 8);\n            for(x=0; x<w; x++){\n                src[x + stride*y]= sample[1][x];\n            }\n        }else{\n            decode_line(s, w, sample, plane_index, s->avctx->bits_per_raw_sample);\n            for(x=0; x<w; x++){\n                ((uint16_t*)(src + stride*y))[x]= sample[1][x] << (16 - s->avctx->bits_per_raw_sample);\n            }\n        }\n    }\n}', 'static av_always_inline void decode_line(FFV1Context *s, int w, int_fast16_t *sample[2], int plane_index, int bits){\n    PlaneContext * const p= &s->plane[plane_index];\n    RangeCoder * const c= &s->c;\n    int x;\n    int run_count=0;\n    int run_mode=0;\n    int run_index= s->run_index;\n    for(x=0; x<w; x++){\n        int diff, context, sign;\n        context= get_context(s, sample[1] + x, sample[0] + x, sample[1] + x);\n        if(context < 0){\n            context= -context;\n            sign=1;\n        }else\n            sign=0;\n        if(s->ac){\n            diff= get_symbol_inline(c, p->state[context], 1);\n        }else{\n            if(context == 0 && run_mode==0) run_mode=1;\n            if(run_mode){\n                if(run_count==0 && run_mode==1){\n                    if(get_bits1(&s->gb)){\n                        run_count = 1<<ff_log2_run[run_index];\n                        if(x + run_count <= w) run_index++;\n                    }else{\n                        if(ff_log2_run[run_index]) run_count = get_bits(&s->gb, ff_log2_run[run_index]);\n                        else run_count=0;\n                        if(run_index) run_index--;\n                        run_mode=2;\n                    }\n                }\n                run_count--;\n                if(run_count < 0){\n                    run_mode=0;\n                    run_count=0;\n                    diff= get_vlc_symbol(&s->gb, &p->vlc_state[context], bits);\n                    if(diff>=0) diff++;\n                }else\n                    diff=0;\n            }else\n                diff= get_vlc_symbol(&s->gb, &p->vlc_state[context], bits);\n        }\n        if(sign) diff= -diff;\n        sample[1][x]= (predict(sample[1] + x, sample[0] + x) + diff) & ((1<<bits)-1);\n    }\n    s->run_index= run_index;\n}', 'static inline int get_context(FFV1Context *f, int_fast16_t *src, int_fast16_t *last, int_fast16_t *last2){\n    const int LT= last[-1];\n    const int  T= last[ 0];\n    const int RT= last[ 1];\n    const int L =  src[-1];\n    if(f->quant_table[3][127]){\n        const int TT= last2[0];\n        const int LL=  src[-2];\n        return f->quant_table[0][(L-LT) & 0xFF] + f->quant_table[1][(LT-T) & 0xFF] + f->quant_table[2][(T-RT) & 0xFF]\n              +f->quant_table[3][(LL-L) & 0xFF] + f->quant_table[4][(TT-T) & 0xFF];\n    }else\n        return f->quant_table[0][(L-LT) & 0xFF] + f->quant_table[1][(LT-T) & 0xFF] + f->quant_table[2][(T-RT) & 0xFF];\n}']