Browse code

cosmetics: Remove some unnecessary block braces.

Diego Biurrun authored on 2012/01/19 02:47:59
Showing 3 changed files
... ...
@@ -1290,28 +1290,26 @@ static int ff_estimate_motion_b(MpegEncContext * s,
1290 1290
         break;
1291 1291
     case ME_X1:
1292 1292
     case ME_EPZS:
1293
-       {
1294
-            P_LEFT[0]        = mv_table[mot_xy - 1][0];
1295
-            P_LEFT[1]        = mv_table[mot_xy - 1][1];
1296
-
1297
-            if(P_LEFT[0]       > (c->xmax<<shift)) P_LEFT[0]       = (c->xmax<<shift);
1293
+        P_LEFT[0] = mv_table[mot_xy - 1][0];
1294
+        P_LEFT[1] = mv_table[mot_xy - 1][1];
1298 1295
 
1299
-            /* special case for first line */
1300
-            if (!s->first_slice_line) {
1301
-                P_TOP[0] = mv_table[mot_xy - mot_stride             ][0];
1302
-                P_TOP[1] = mv_table[mot_xy - mot_stride             ][1];
1303
-                P_TOPRIGHT[0] = mv_table[mot_xy - mot_stride + 1         ][0];
1304
-                P_TOPRIGHT[1] = mv_table[mot_xy - mot_stride + 1         ][1];
1305
-                if(P_TOP[1] > (c->ymax<<shift)) P_TOP[1]= (c->ymax<<shift);
1306
-                if(P_TOPRIGHT[0] < (c->xmin<<shift)) P_TOPRIGHT[0]= (c->xmin<<shift);
1307
-                if(P_TOPRIGHT[1] > (c->ymax<<shift)) P_TOPRIGHT[1]= (c->ymax<<shift);
1296
+        if (P_LEFT[0] > (c->xmax << shift)) P_LEFT[0] = (c->xmax << shift);
1308 1297
 
1309
-                P_MEDIAN[0]= mid_pred(P_LEFT[0], P_TOP[0], P_TOPRIGHT[0]);
1310
-                P_MEDIAN[1]= mid_pred(P_LEFT[1], P_TOP[1], P_TOPRIGHT[1]);
1311
-            }
1312
-            c->pred_x= P_LEFT[0];
1313
-            c->pred_y= P_LEFT[1];
1298
+        /* special case for first line */
1299
+        if (!s->first_slice_line) {
1300
+            P_TOP[0]      = mv_table[mot_xy - mot_stride    ][0];
1301
+            P_TOP[1]      = mv_table[mot_xy - mot_stride    ][1];
1302
+            P_TOPRIGHT[0] = mv_table[mot_xy - mot_stride + 1][0];
1303
+            P_TOPRIGHT[1] = mv_table[mot_xy - mot_stride + 1][1];
1304
+            if (P_TOP[1] > (c->ymax << shift)) P_TOP[1] = (c->ymax << shift);
1305
+            if (P_TOPRIGHT[0] < (c->xmin << shift)) P_TOPRIGHT[0] = (c->xmin << shift);
1306
+            if (P_TOPRIGHT[1] > (c->ymax << shift)) P_TOPRIGHT[1] = (c->ymax << shift);
1307
+
1308
+            P_MEDIAN[0] = mid_pred(P_LEFT[0], P_TOP[0], P_TOPRIGHT[0]);
1309
+            P_MEDIAN[1] = mid_pred(P_LEFT[1], P_TOP[1], P_TOPRIGHT[1]);
1314 1310
         }
1311
+        c->pred_x = P_LEFT[0];
1312
+        c->pred_y = P_LEFT[1];
1315 1313
 
1316 1314
         if(mv_table == s->b_forw_mv_table){
1317 1315
             mv_scale= (s->pb_time<<16) / (s->pp_time<<shift);
... ...
@@ -96,10 +96,8 @@ static void draw_slice(AVFilterLink *inlink, int y, int h, int slice_dir)
96 96
         for (i = 0; i < h>>vsub; i++) {
97 97
             switch (step) {
98 98
             case 1:
99
-            {
100 99
                 for (j = 0; j < (inlink->w >> hsub); j++)
101 100
                     outrow[j] = inrow[-j];
102
-            }
103 101
             break;
104 102
 
105 103
             case 2:
... ...
@@ -99,7 +99,6 @@ yuv2planeX_altivec(const int16_t *filter, int filterSize,
99 99
                    const uint8_t *dither, int offset)
100 100
 {
101 101
     register int i, j;
102
-    {
103 102
         DECLARE_ALIGNED(16, int, val)[dstW];
104 103
 
105 104
         for (i=0; i<dstW; i++)
... ...
@@ -142,7 +141,6 @@ yuv2planeX_altivec(const int16_t *filter, int filterSize,
142 142
             }
143 143
         }
144 144
         altivec_packIntArrayToCharArray(val, dest, dstW);
145
-    }
146 145
 }
147 146
 
148 147
 static void hScale_altivec_real(SwsContext *c, int16_t *dst, int dstW,
... ...
@@ -166,7 +164,6 @@ static void hScale_altivec_real(SwsContext *c, int16_t *dst, int dstW,
166 166
     else
167 167
     switch (filterSize) {
168 168
     case 4:
169
-    {
170 169
     for (i=0; i<dstW; i++) {
171 170
         register int srcPos = filterPos[i];
172 171
 
... ...
@@ -201,11 +198,9 @@ static void hScale_altivec_real(SwsContext *c, int16_t *dst, int dstW,
201 201
         vec_st(val_s, 0, tempo);
202 202
         dst[i] = FFMIN(tempo[3]>>7, (1<<15)-1);
203 203
     }
204
-    }
205 204
     break;
206 205
 
207 206
     case 8:
208
-    {
209 207
     for (i=0; i<dstW; i++) {
210 208
         register int srcPos = filterPos[i];
211 209
 
... ...
@@ -228,11 +223,9 @@ static void hScale_altivec_real(SwsContext *c, int16_t *dst, int dstW,
228 228
         vec_st(val_s, 0, tempo);
229 229
         dst[i] = FFMIN(tempo[3]>>7, (1<<15)-1);
230 230
     }
231
-    }
232 231
     break;
233 232
 
234 233
     case 16:
235
-    {
236 234
         for (i=0; i<dstW; i++) {
237 235
             register int srcPos = filterPos[i];
238 236
 
... ...
@@ -257,11 +250,9 @@ static void hScale_altivec_real(SwsContext *c, int16_t *dst, int dstW,
257 257
             vec_st(val_s, 0, tempo);
258 258
             dst[i] = FFMIN(tempo[3]>>7, (1<<15)-1);
259 259
         }
260
-    }
261 260
     break;
262 261
 
263 262
     default:
264
-    {
265 263
     for (i=0; i<dstW; i++) {
266 264
         register int j;
267 265
         register int srcPos = filterPos[i];
... ...
@@ -321,7 +312,6 @@ static void hScale_altivec_real(SwsContext *c, int16_t *dst, int dstW,
321 321
     }
322 322
 
323 323
     }
324
-    }
325 324
 }
326 325
 
327 326
 void ff_sws_init_swScale_altivec(SwsContext *c)