Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
BC
public
external
libvpx
Commits
8b8606a7
Commit
8b8606a7
authored
11 years ago
by
Dmitry Kovalev
Committed by
Gerrit Code Review
11 years ago
Browse files
Options
Download
Plain Diff
Merge "Cleaning up vp9_mvref_common.c."
parents
1942f9e1
38053687
v1.14.0-linphone
1.4.X
feature/update_to_v1.9.0-linphone
feature/uwp_nuget
frame_parallel
highbitdepth
indianrunnerduck
javanwhistlingduck
khakicampbell
linphone
linphone-android
linphone-old
longtailedduck
m49-2623
m52-2743
m54-2840
m56-2924
m66-3359
m68-3440
mandarinduck
nextgen
nextgenv2
playground
sandbox/Jingning/experimental
sandbox/Jingning/transcode
sandbox/Jingning/vpx
sandbox/aconverse@google.com/ansbench
sandbox/hkuang/frame_parallel
sandbox/hkuang@google.com/decode
sandbox/jimbankoski@google.com/proposed-aom
sandbox/jingning@google.com/decoder_test_suite
sandbox/jingning@google.com/experimental
sandbox/jzern@google.com/test
sandbox/wangch@google.com/vp9
sandbox/yaowu@google.com/mergeaom
v1.12.0-linphone
v1.6.1_linphone
v1.7.0-linphone
v1.9.0-linphone
v1.9.0
v1.9.0-rc1
v1.8.2
v1.8.1
v1.8.0
v1.7.0
v1.6.1
v1.6.0
v1.5.0
v1.4.0
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
vp9/common/vp9_mvref_common.c
+15
-14
vp9/common/vp9_mvref_common.c
with
15 additions
and
14 deletions
vp9/common/vp9_mvref_common.c
+
15
−
14
View file @
8b8606a7
...
...
@@ -148,28 +148,30 @@ 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
) \
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(
CANDIDATE
) \
#define IF_DIFF_REF_FRAME_ADD_MV(
mbmi
) \
do { \
if ((CANDIDATE)->ref_frame[0] != ref_frame) \
ADD_MV_REF_LIST(scale_mv((CANDIDATE), 0, ref_frame, ref_sign_bias)); \
if ((CANDIDATE)->ref_frame[1] != ref_frame && \
has_second_ref(CANDIDATE) && \
(CANDIDATE)->mv[1].as_int != (CANDIDATE)->mv[0].as_int) \
ADD_MV_REF_LIST(scale_mv((CANDIDATE), 1, ref_frame, ref_sign_bias)); \
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)); \
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)); \
} \
} while (0)
...
...
@@ -263,14 +265,13 @@ static void find_mv_refs_idx(const VP9_COMMON *cm, const MACROBLOCKD *xd,
*
xd
->
mi_stride
]
->
mbmi
;
// If the candidate is INTRA we don't want to consider its mv.
if
(
is_inter_block
(
candidate
))
IF_DIFF_REF_FRAME_ADD_MV
(
candidate
);
IF_DIFF_REF_FRAME_ADD_MV
(
candidate
);
}
}
}
// Since we still don't have a candidate we'll try the last frame.
if
(
prev_mbmi
&&
is_inter_block
(
prev_mbmi
)
)
if
(
prev_mbmi
)
IF_DIFF_REF_FRAME_ADD_MV
(
prev_mbmi
);
Done:
...
...
This diff is collapsed.
Click to expand it.
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets