]> granicus.if.org Git - libvpx/commitdiff
Minor cleanup of inter mode search.
authorGeza Lore <gezalore@gmail.com>
Fri, 1 Jul 2016 08:00:05 +0000 (09:00 +0100)
committerGeza Lore <gezalore@gmail.com>
Fri, 1 Jul 2016 08:00:05 +0000 (09:00 +0100)
Change-Id: I523a3b30eb80fc6c6ed83638fdb82cf65c22b2e5

vp10/encoder/rdopt.c

index e96b2218900c20613e81503a714bd6d9569828c1..25f67abd6c270d00a269ed86a91e65df5be68fc1 100644 (file)
@@ -8779,51 +8779,11 @@ void vp10_rd_pick_inter_mode_sb(VP10_COMP *cpi,
         continue;
     }
 
-    if (this_mode == NEAREST_NEARESTMV) {
-      frame_mv[NEAREST_NEARESTMV][ref_frame].as_int =
-          frame_mv[NEARESTMV][ref_frame].as_int;
-      frame_mv[NEAREST_NEARESTMV][second_ref_frame].as_int =
-          frame_mv[NEARESTMV][second_ref_frame].as_int;
-    } else if (this_mode == NEAREST_NEARMV) {
-      frame_mv[NEAREST_NEARMV][ref_frame].as_int =
-          frame_mv[NEARESTMV][ref_frame].as_int;
-      frame_mv[NEAREST_NEARMV][second_ref_frame].as_int =
-          frame_mv[NEARMV][second_ref_frame].as_int;
-    } else if (this_mode == NEAR_NEARMV) {
-      frame_mv[NEAR_NEARMV][ref_frame].as_int =
-          frame_mv[NEARMV][ref_frame].as_int;
-      frame_mv[NEAR_NEARMV][second_ref_frame].as_int =
-          frame_mv[NEARMV][second_ref_frame].as_int;
-    } else if (this_mode == NEAR_NEARESTMV) {
-      frame_mv[NEAR_NEARESTMV][ref_frame].as_int =
-          frame_mv[NEARMV][ref_frame].as_int;
-      frame_mv[NEAR_NEARESTMV][second_ref_frame].as_int =
-          frame_mv[NEARESTMV][second_ref_frame].as_int;
-    } else if (this_mode == NEAREST_NEWMV) {
-      frame_mv[NEAREST_NEWMV][ref_frame].as_int =
-          frame_mv[NEARESTMV][ref_frame].as_int;
-      frame_mv[NEAREST_NEWMV][second_ref_frame].as_int =
-          frame_mv[NEWMV][second_ref_frame].as_int;
-    } else if (this_mode == NEW_NEARESTMV) {
-      frame_mv[NEW_NEARESTMV][ref_frame].as_int =
-          frame_mv[NEWMV][ref_frame].as_int;
-      frame_mv[NEW_NEARESTMV][second_ref_frame].as_int =
-          frame_mv[NEARESTMV][second_ref_frame].as_int;
-    } else if (this_mode == NEAR_NEWMV) {
-      frame_mv[NEAR_NEWMV][ref_frame].as_int =
-        frame_mv[NEARMV][ref_frame].as_int;
-      frame_mv[NEAR_NEWMV][second_ref_frame].as_int =
-          frame_mv[NEWMV][second_ref_frame].as_int;
-    } else if (this_mode == NEW_NEARMV) {
-      frame_mv[NEW_NEARMV][ref_frame].as_int =
-          frame_mv[NEWMV][ref_frame].as_int;
-      frame_mv[NEW_NEARMV][second_ref_frame].as_int =
-        frame_mv[NEARMV][second_ref_frame].as_int;
-    } else if (this_mode == NEW_NEWMV) {
-      frame_mv[NEW_NEWMV][ref_frame].as_int =
-          frame_mv[NEWMV][ref_frame].as_int;
-      frame_mv[NEW_NEWMV][second_ref_frame].as_int =
-          frame_mv[NEWMV][second_ref_frame].as_int;
+    if (is_inter_compound_mode(this_mode)) {
+      frame_mv[this_mode][ref_frame].as_int =
+          frame_mv[compound_ref0_mode(this_mode)][ref_frame].as_int;
+      frame_mv[this_mode][second_ref_frame].as_int =
+          frame_mv[compound_ref1_mode(this_mode)][second_ref_frame].as_int;
     }
 #endif  // CONFIG_EXT_INTER