[FFmpeg-cvslog] vc1dec: move an if() block.

shahriman AMS git at videolan.org
Thu Nov 10 03:58:59 CET 2011


ffmpeg | branch: master | shahriman AMS <shahriman_ams at yahoo.com> | Tue Nov  8 08:47:33 2011 +0000| [62622d04eb515c792e871e1cc9f5de66531b775c] | committer: Anton Khirnov

vc1dec: move an if() block.

There are no reason for "if (c_valid) { ... }" to appear before
"if (b_valid) { ... }".

Signed-off-by: Anton Khirnov <anton at khirnov.net>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=62622d04eb515c792e871e1cc9f5de66531b775c
---

 libavcodec/vc1dec.c |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c
index 8cd6980..4f366b8 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)



More information about the ffmpeg-cvslog mailing list