no mixing of code and declarations
authorMåns Rullgård <mans@mansr.com>
Fri, 28 Oct 2005 18:18:04 +0000 (18:18 +0000)
committerMåns Rullgård <mans@mansr.com>
Fri, 28 Oct 2005 18:18:04 +0000 (18:18 +0000)
Originally committed as revision 4670 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavcodec/h264.c

index 1695ccf8491e05f78530ee285e0e49d9e98c8a33..c0129e2904e029ecffb047e41cd1d76e1115935d 100644 (file)
@@ -6582,14 +6582,6 @@ static void filter_mb( H264Context *h, int mb_x, int mb_y, uint8_t *img_y, uint8
         const int mbm_type = s->current_picture.mb_type[mbm_xy];
         int start = h->slice_table[mbm_xy] == 255 ? 1 : 0;
 
-        if (first_vertical_edge_done) {
-            start = 1;
-            first_vertical_edge_done = 0;
-        }
-
-        if (h->deblocking_filter==2 && h->slice_table[mbm_xy] != h->slice_table[mb_xy])
-            start = 1;
-
         const int edges = ((mb_type & mbm_type) & (MB_TYPE_16x16|MB_TYPE_SKIP))
                                                == (MB_TYPE_16x16|MB_TYPE_SKIP) ? 1 : 4;
         // how often to recheck mv-based bS when iterating between edges
@@ -6598,6 +6590,14 @@ static void filter_mb( H264Context *h, int mb_x, int mb_y, uint8_t *img_y, uint8
         // how often to recheck mv-based bS when iterating along each edge
         const int mask_par0 = mb_type & (MB_TYPE_16x16 | (MB_TYPE_8x16 >> dir));
 
+        if (first_vertical_edge_done) {
+            start = 1;
+            first_vertical_edge_done = 0;
+        }
+
+        if (h->deblocking_filter==2 && h->slice_table[mbm_xy] != h->slice_table[mb_xy])
+            start = 1;
+
         /* Calculate bS */
         for( edge = start; edge < edges; edge++ ) {
             /* mbn_xy: neighbor macroblock */