diff options
author | Hui Su <huisu@google.com> | 2014-10-30 11:05:04 -0700 |
---|---|---|
committer | Gerrit Code Review <gerrit@gerrit.golo.chromium.org> | 2014-10-30 11:05:04 -0700 |
commit | d478d2df3728da02bd7424184a7c1eb05ee23f5c (patch) | |
tree | bccd583f48850d531fb14fa1e114a7888e7408d1 /vp9/common/vp9_mvref_common.h | |
parent | 66906da06698ffc4d12115d8b6a4be74097a2c5f (diff) | |
parent | 8947b18fa35d45ab29c97a86da5149baecb62fde (diff) | |
download | libvpx-d478d2df3728da02bd7424184a7c1eb05ee23f5c.tar libvpx-d478d2df3728da02bd7424184a7c1eb05ee23f5c.tar.gz libvpx-d478d2df3728da02bd7424184a7c1eb05ee23f5c.tar.bz2 libvpx-d478d2df3728da02bd7424184a7c1eb05ee23f5c.zip |
Merge "Move the definition of switchable filter numbers into enum INTERP_FILTER; Modify the macro ADD_MV_REF_LIST and IF_DIFF_REF_FRAME_ADD_MV."
Diffstat (limited to 'vp9/common/vp9_mvref_common.h')
-rw-r--r-- | vp9/common/vp9_mvref_common.h | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/vp9/common/vp9_mvref_common.h b/vp9/common/vp9_mvref_common.h index a937b7823..0e27e9d77 100644 --- a/vp9/common/vp9_mvref_common.h +++ b/vp9/common/vp9_mvref_common.h @@ -158,29 +158,32 @@ static INLINE int_mv scale_mv(const MB_MODE_INFO *mbmi, int ref, // This macro is used to add a motion vector mv_ref list if it isn't // already in the list. If it's the second motion vector it will also // skip all additional processing and jump to done! -#define ADD_MV_REF_LIST(mv) \ +#define ADD_MV_REF_LIST(mv, refmv_count, mv_ref_list, Done) \ do { \ if (refmv_count) { \ - if ((mv).as_int != mv_ref_list[0].as_int) { \ - mv_ref_list[refmv_count] = (mv); \ + if ((mv).as_int != (mv_ref_list)[0].as_int) { \ + (mv_ref_list)[(refmv_count)] = (mv); \ goto Done; \ } \ } else { \ - mv_ref_list[refmv_count++] = (mv); \ + (mv_ref_list)[(refmv_count)++] = (mv); \ } \ } while (0) // If either reference frame is different, not INTRA, and they // are different from each other scale and add the mv to our list. -#define IF_DIFF_REF_FRAME_ADD_MV(mbmi) \ +#define IF_DIFF_REF_FRAME_ADD_MV(mbmi, ref_frame, ref_sign_bias, refmv_count, \ + mv_ref_list, Done) \ do { \ if (is_inter_block(mbmi)) { \ if ((mbmi)->ref_frame[0] != ref_frame) \ - ADD_MV_REF_LIST(scale_mv((mbmi), 0, ref_frame, ref_sign_bias)); \ + ADD_MV_REF_LIST(scale_mv((mbmi), 0, ref_frame, ref_sign_bias), \ + refmv_count, mv_ref_list, Done); \ if (has_second_ref(mbmi) && \ (mbmi)->ref_frame[1] != ref_frame && \ (mbmi)->mv[1].as_int != (mbmi)->mv[0].as_int) \ - ADD_MV_REF_LIST(scale_mv((mbmi), 1, ref_frame, ref_sign_bias)); \ + ADD_MV_REF_LIST(scale_mv((mbmi), 1, ref_frame, ref_sign_bias), \ + refmv_count, mv_ref_list, Done); \ } \ } while (0) |