Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Xiph.Org
aom-rav1e
Commits
e211244b
Commit
e211244b
authored
Feb 26, 2014
by
Jingning Han
Committed by
Gerrit Code Review
Feb 26, 2014
Browse files
Options
Browse Files
Download
Plain Diff
Merge "Use dedicated variables to store the best mode"
parents
55a1269b
fd49e967
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
7 deletions
+11
-7
vp9/encoder/vp9_pickmode.c
vp9/encoder/vp9_pickmode.c
+11
-7
No files found.
vp9/encoder/vp9_pickmode.c
View file @
e211244b
...
...
@@ -184,8 +184,8 @@ int64_t vp9_pick_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
MACROBLOCKD
*
xd
=
&
x
->
e_mbd
;
MB_MODE_INFO
*
mbmi
=
&
xd
->
mi_8x8
[
0
]
->
mbmi
;
const
BLOCK_SIZE
block_size
=
get_plane_block_size
(
bsize
,
&
xd
->
plane
[
0
]);
MB_PREDICTION_MODE
this_mode
;
MV_REFERENCE_FRAME
ref_frame
;
MB_PREDICTION_MODE
this_mode
,
best_mode
=
ZEROMV
;
MV_REFERENCE_FRAME
ref_frame
,
best_ref_frame
=
LAST_FRAME
;
int_mv
frame_mv
[
MB_MODE_COUNT
][
MAX_REF_FRAMES
];
struct
buf_2d
yv12_mb
[
4
][
MAX_MB_PLANE
];
static
const
int
flag_list
[
4
]
=
{
0
,
VP9_LAST_FLAG
,
VP9_GOLD_FLAG
,
...
...
@@ -240,6 +240,8 @@ int64_t vp9_pick_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
clamp_mv2
(
&
frame_mv
[
NEARESTMV
][
ref_frame
].
as_mv
,
xd
);
clamp_mv2
(
&
frame_mv
[
NEARMV
][
ref_frame
].
as_mv
,
xd
);
mbmi
->
ref_frame
[
0
]
=
ref_frame
;
for
(
this_mode
=
NEARESTMV
;
this_mode
<=
NEWMV
;
++
this_mode
)
{
int
rate
=
cost
[
INTER_OFFSET
(
this_mode
)];
int64_t
dist
;
...
...
@@ -258,15 +260,17 @@ int64_t vp9_pick_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
if
(
this_rd
<
best_rd
)
{
best_rd
=
this_rd
;
mbmi
->
mode
=
this_mode
;
mbmi
->
ref_frame
[
0
]
=
ref_frame
;
mbmi
->
mv
[
0
].
as_int
=
frame_mv
[
this_mode
][
ref_frame
].
as_int
;
xd
->
mi_8x8
[
0
]
->
bmi
[
0
].
as_mv
[
0
].
as_int
=
mbmi
->
mv
[
0
].
as_int
;
mbmi
->
uv_mode
=
this_mode
;
best_mode
=
this_mode
;
best_ref_frame
=
ref_frame
;
}
}
}
mbmi
->
mode
=
best_mode
;
mbmi
->
ref_frame
[
0
]
=
best_ref_frame
;
mbmi
->
mv
[
0
].
as_int
=
frame_mv
[
best_mode
][
best_ref_frame
].
as_int
;
xd
->
mi_8x8
[
0
]
->
bmi
[
0
].
as_mv
[
0
].
as_int
=
mbmi
->
mv
[
0
].
as_int
;
// Perform intra prediction search, if the best SAD is above a certain
// threshold.
if
(
best_rd
>
inter_mode_thresh
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment