Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Xiph.Org
aom-rav1e
Commits
ac6d40ec
Commit
ac6d40ec
authored
Feb 08, 2016
by
Jingning Han
Browse files
Clean up in vp9_rd_pick_inter_mode_sb
Use local variable. Change-Id: I0d3df36cf4536958a0cda422f6c30da50f0e0bbf
parent
ae98a61e
Changes
1
Hide whitespace changes
Inline
Side-by-side
vp9/encoder/vp9_rdopt.c
View file @
ac6d40ec
...
...
@@ -3355,24 +3355,25 @@ void vp9_rd_pick_inter_mode_sb(VP9_COMP *cpi,
}
if
(
!
disable_skip
)
{
vpx_prob
skip_prob
=
vp9_get_skip_prob
(
cm
,
xd
);
const
vpx_prob
skip_prob
=
vp9_get_skip_prob
(
cm
,
xd
);
const
int
skip_cost0
=
vp9_cost_bit
(
skip_prob
,
0
);
const
int
skip_cost1
=
vp9_cost_bit
(
skip_prob
,
1
);
if
(
skippable
)
{
// Back out the coefficient coding costs
rate2
-=
(
rate_y
+
rate_uv
);
// Cost the skip mb case
rate2
+=
vp9_cost_bit
(
skip_prob
,
1
)
;
rate2
+=
skip_cost1
;
}
else
if
(
ref_frame
!=
INTRA_FRAME
&&
!
xd
->
lossless
)
{
if
(
RDCOST
(
x
->
rdmult
,
x
->
rddiv
,
rate_y
+
rate_uv
+
vp9_cost_bit
(
skip_prob
,
0
),
distortion2
)
<
RDCOST
(
x
->
rdmult
,
x
->
rddiv
,
vp9_cost_bit
(
skip_prob
,
1
),
total_sse
))
{
rate_y
+
rate_uv
+
skip_cost0
,
distortion2
)
<
RDCOST
(
x
->
rdmult
,
x
->
rddiv
,
skip_cost1
,
total_sse
))
{
// Add in the cost of the no skip flag.
rate2
+=
vp9_cost_bit
(
vp9_get_skip_prob
(
cm
,
xd
),
0
)
;
rate2
+=
skip_cost0
;
}
else
{
// FIXME(rbultje) make this work for splitmv also
rate2
+=
vp9_cost_bit
(
vp9_get_skip_prob
(
cm
,
xd
),
1
)
;
rate2
+=
skip_cost1
;
distortion2
=
total_sse
;
assert
(
total_sse
>=
0
);
rate2
-=
(
rate_y
+
rate_uv
);
...
...
@@ -3380,7 +3381,7 @@ void vp9_rd_pick_inter_mode_sb(VP9_COMP *cpi,
}
}
else
{
// Add in the cost of the no skip flag.
rate2
+=
vp9_cost_bit
(
vp9_get_skip_prob
(
cm
,
xd
),
0
)
;
rate2
+=
skip_cost0
;
}
// Calculate the final RD estimate for this mode.
...
...
Write
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!
Cancel
Please
register
or
sign in
to comment