]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/hevcpred_template.c
avcodec/vp9: make last_invisible local.
[ffmpeg] / libavcodec / hevcpred_template.c
index 86097234f3be6b05a0149dc0ffee666355fa9c27..5ba95919b1d8246a63b184739837c0eb94dde9ef 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * HEVC video Decoder
+ * HEVC video decoder
  *
  * Copyright (C) 2012 - 2013 Guillaume Martres
  *
@@ -21,6 +21,7 @@
  */
 
 #include "libavutil/pixdesc.h"
+
 #include "bit_depth_template.c"
 #include "hevcpred.h"
 
@@ -291,25 +292,11 @@ static void FUNC(intra_pred)(HEVCContext *s, int x0, int y0, int log2_size, int
 
     top[-1] = left[-1];
 
-#undef EXTEND_LEFT_CIP
-#undef EXTEND_RIGHT_CIP
-#undef EXTEND_UP_CIP
-#undef EXTEND_DOWN_CIP
-#undef IS_INTRA
-#undef MVF_PU
-#undef MVF
-#undef PU
-#undef EXTEND_LEFT
-#undef EXTEND_RIGHT
-#undef EXTEND_UP
-#undef EXTEND_DOWN
-#undef MIN_TB_ADDR_ZS
-
     // Filtering process
     if (c_idx == 0 && mode != INTRA_DC && size != 4) {
         int intra_hor_ver_dist_thresh[] = { 7, 1, 0 };
         int min_dist_vert_hor = FFMIN(FFABS((int)(mode - 26U)),
-                                                FFABS((int)(mode - 10U)));
+                                      FFABS((int)(mode - 10U)));
         if (min_dist_vert_hor > intra_hor_ver_dist_thresh[log2_size - 3]) {
             int threshold = 1 << (BIT_DEPTH - 5);
             if (s->sps->sps_strong_intra_smoothing_enable_flag &&
@@ -490,9 +477,8 @@ static av_always_inline void FUNC(pred_angular)(uint8_t *_src,
                                        fact  * ref[x + idx + 2] + 16) >> 5;
                 }
             } else {
-                for (x = 0; x < size; x++) {
+                for (x = 0; x < size; x++)
                     POS(x, y) = ref[x + idx + 1];
-                }
             }
         }
         if (mode == 26 && c_idx == 0 && size < 32) {
@@ -518,9 +504,8 @@ static av_always_inline void FUNC(pred_angular)(uint8_t *_src,
                                        fact  * ref[y + idx + 2] + 16) >> 5;
                 }
             } else {
-                for (y = 0; y < size; y++) {
+                for (y = 0; y < size; y++)
                     POS(x, y) = ref[y + idx + 1];
-                }
             }
         }
         if (mode == 10 && c_idx == 0 && size < 32) {
@@ -557,4 +542,18 @@ static void FUNC(pred_angular_3)(uint8_t *src, const uint8_t *top,
 {
     FUNC(pred_angular)(src, top, left, stride, c_idx, mode, 1 << 5);
 }
+
+#undef EXTEND_LEFT_CIP
+#undef EXTEND_RIGHT_CIP
+#undef EXTEND_UP_CIP
+#undef EXTEND_DOWN_CIP
+#undef IS_INTRA
+#undef MVF_PU
+#undef MVF
+#undef PU
+#undef EXTEND_LEFT
+#undef EXTEND_RIGHT
+#undef EXTEND_UP
+#undef EXTEND_DOWN
+#undef MIN_TB_ADDR_ZS
 #undef POS