Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
aom-rav1e
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Xiph.Org
aom-rav1e
Commits
1a5e6ffb
Commit
1a5e6ffb
authored
11 years ago
by
Dmitry Kovalev
Browse files
Options
Downloads
Patches
Plain Diff
Simplifying vp9_mvref_common.c.
Change-Id: I272df2e33fa05310466acf06c179728514dd7494
parent
c66320b3
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
vp9/common/vp9_mvref_common.c
+12
-18
12 additions, 18 deletions
vp9/common/vp9_mvref_common.c
with
12 additions
and
18 deletions
vp9/common/vp9_mvref_common.c
+
12
−
18
View file @
1a5e6ffb
...
...
@@ -129,18 +129,15 @@ static INLINE int_mv get_sub_block_mv(const MODE_INFO *candidate,
// Performs mv sign inversion if indicated by the reference frame combination.
static
INLINE
int_mv
scale_mv
(
const
MODE_INFO
*
candidate
,
const
int
which_mv
,
static
INLINE
int_mv
scale_mv
(
const
MB_
MODE_INFO
*
mbmi
,
int
ref
,
const
MV_REFERENCE_FRAME
this_ref_frame
,
const
int
*
ref_sign_bias
)
{
int_mv
return_mv
=
candidate
->
mbmi
.
mv
[
which_mv
];
// Sign inversion where appropriate.
if
(
ref_sign_bias
[
candidate
->
mbmi
.
ref_frame
[
which_mv
]]
!=
ref_sign_bias
[
this_ref_frame
])
{
return_mv
.
as_mv
.
row
*=
-
1
;
return_mv
.
as_mv
.
col
*=
-
1
;
int_mv
mv
=
mbmi
->
mv
[
ref
];
if
(
ref_sign_bias
[
mbmi
->
ref_frame
[
ref
]]
!=
ref_sign_bias
[
this_ref_frame
])
{
mv
.
as_mv
.
row
*=
-
1
;
mv
.
as_mv
.
col
*=
-
1
;
}
return
return_
mv
;
return
mv
;
}
// This macro is used to add a motion vector mv_ref list if it isn't
...
...
@@ -159,12 +156,12 @@ static INLINE int_mv scale_mv(const MODE_INFO *candidate, const int which_mv,
// 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) \
if ((CANDIDATE)->
mbmi.
ref_frame[0] != ref_frame) { \
if ((CANDIDATE)->ref_frame[0] != ref_frame) { \
ADD_MV_REF_LIST(scale_mv((CANDIDATE), 0, ref_frame, ref_sign_bias)); \
} \
if ((CANDIDATE)->
mbmi.
ref_frame[1] != ref_frame && \
(CANDIDATE)->
mbmi.
ref_frame[1] > INTRA_FRAME && \
(CANDIDATE)->
mbmi.
mv[1].as_int != (CANDIDATE)->
mbmi.
mv[0].as_int) { \
if ((CANDIDATE)->ref_frame[1] != ref_frame && \
(CANDIDATE)->ref_frame[1] > INTRA_FRAME && \
(CANDIDATE)->mv[1].as_int != (CANDIDATE)->mv[0].as_int) { \
ADD_MV_REF_LIST(scale_mv((CANDIDATE), 1, ref_frame, ref_sign_bias)); \
}
...
...
@@ -273,13 +270,13 @@ void vp9_find_mv_refs_idx(VP9_COMMON *cm, MACROBLOCKD *xd, MODE_INFO *here,
if
(
!
is_inter_block
(
&
candidate
->
mbmi
))
continue
;
IF_DIFF_REF_FRAME_ADD_MV
(
candidate
);
IF_DIFF_REF_FRAME_ADD_MV
(
&
candidate
->
mbmi
);
}
}
// Since we still don't have a candidate we'll try the last frame.
if
(
lf_here
!=
NULL
&&
is_inter_block
(
&
lf_here
->
mbmi
))
{
IF_DIFF_REF_FRAME_ADD_MV
(
lf_here
);
IF_DIFF_REF_FRAME_ADD_MV
(
&
lf_here
->
mbmi
);
}
Done:
...
...
@@ -290,6 +287,3 @@ void vp9_find_mv_refs_idx(VP9_COMMON *cm, MACROBLOCKD *xd, MODE_INFO *here,
for
(
idx
=
0
;
idx
<
MAX_MV_REF_CANDIDATES
;
++
idx
)
clamp_mv_ref
(
&
mv_ref_list
[
idx
].
as_mv
,
xd
);
}
#undef ADD_MV_REF_LIST
#undef IF_DIFF_REF_FRAME_ADD_MV
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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