libavcodec/hevcpred_template.c:342: error: Buffer Overrun L1
  Offset: -1 Size: 3 by call to `intra_pred_9`.

libavcodec/hevcpred_template.c:342:1: Call
340. }
341. 
342. INTRA_PRED(2)
     ^
343. INTRA_PRED(3)
344. INTRA_PRED(4)

libavcodec/hevcpred_template.c:31:1: <Offset trace>
29. #define POS(x, y) src[(x) + stride * (y)]
30. 
31. static av_always_inline void FUNC(intra_pred)(HEVCContext *s, int x0, int y0,
    ^
32.                                               int log2_size, int c_idx)
33. {

libavcodec/hevcpred_template.c:31:1: Parameter `log2_size`
  29. #define POS(x, y) src[(x) + stride * (y)]
  30. 
  31. static av_always_inline void FUNC(intra_pred)(HEVCContext *s, int x0, int y0,
      ^
  32.                                               int log2_size, int c_idx)
  33. {

libavcodec/hevcpred_template.c:31:1: <Length trace>
29. #define POS(x, y) src[(x) + stride * (y)]
30. 
31. static av_always_inline void FUNC(intra_pred)(HEVCContext *s, int x0, int y0,
    ^
32.                                               int log2_size, int c_idx)
33. {

libavcodec/hevcpred_template.c:31:1: Array declaration
  29. #define POS(x, y) src[(x) + stride * (y)]
  30. 
  31. static av_always_inline void FUNC(intra_pred)(HEVCContext *s, int x0, int y0,
      ^
  32.                                               int log2_size, int c_idx)
  33. {

libavcodec/hevcpred_template.c:285:33: Array access: Offset: -1 Size: 3 by call to `intra_pred_9` 
  283.         int min_dist_vert_hor = FFMIN(FFABS((int)mode - 26),
  284.                                       FFABS((int)mode - 10));
  285.         if (min_dist_vert_hor > intra_hor_ver_dist_thresh[log2_size - 3]) {
                                       ^
  286.             int threshold = 1 << (BIT_DEPTH - 5);
  287.             if (s->sps->sps_strong_intra_smoothing_enable_flag &&
