[libav-devel] [PATCH 4/4] vc1dec.c: Cosmetics

Mashiat Sarker Shakkhar shahriman_ams at yahoo.com
Tue Nov 8 10:47:33 CET 2011


There are no reason for "if (c_valid) { ... }" to appear before
"if (b_valid) { ... }".
---
 libavcodec/vc1dec.c |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c
index a7ea3ab..7a65f31 100644
--- a/libavcodec/vc1dec.c
+++ b/libavcodec/vc1dec.c
@@ -1561,16 +1561,6 @@ static inline void vc1_pred_mv(VC1Context *v, int n, int dmv_x, int dmv_y,
         field_predA[0] = field_predA[1] = 0;
         a_f = 0;
     }
-    if (c_valid) {
-        c_f = v->mv_f[dir][xy - 1 + v->blocks_off];
-        num_oppfield  += c_f;
-        num_samefield += 1 - c_f;
-        field_predC[0] = C[0];
-        field_predC[1] = C[1];
-    } else {
-        field_predC[0] = field_predC[1] = 0;
-        c_f = 0;
-    }
     if (b_valid) {
         b_f = v->mv_f[dir][xy - wrap + off + v->blocks_off];
         num_oppfield  += b_f;
@@ -1581,6 +1571,16 @@ static inline void vc1_pred_mv(VC1Context *v, int n, int dmv_x, int dmv_y,
         field_predB[0] = field_predB[1] = 0;
         b_f = 0;
     }
+    if (c_valid) {
+        c_f = v->mv_f[dir][xy - 1 + v->blocks_off];
+        num_oppfield  += c_f;
+        num_samefield += 1 - c_f;
+        field_predC[0] = C[0];
+        field_predC[1] = C[1];
+    } else {
+        field_predC[0] = field_predC[1] = 0;
+        c_f = 0;
+    }
 
     if (v->field_mode) {
         if (num_samefield <= num_oppfield)
-- 
1.7.4.1



More information about the libav-devel mailing list