Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
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
200ec69a
Commit
200ec69a
authored
Sep 15, 2014
by
Yunqing Wang
Browse files
Simplify the skip flag cost code
Code refactoring. Change-Id: Idad53cb80497d13551a142a642f7529fc305b0bc
parent
46aed7b8
Changes
1
Show whitespace changes
Inline
Side-by-side
vp9/encoder/vp9_rdopt.c
View file @
200ec69a
...
@@ -2913,18 +2913,11 @@ int64_t vp9_rd_pick_inter_mode_sb(VP9_COMP *cpi, MACROBLOCK *x,
...
@@ -2913,18 +2913,11 @@ int64_t vp9_rd_pick_inter_mode_sb(VP9_COMP *cpi, MACROBLOCK *x,
if
(
!
disable_skip
)
{
if
(
!
disable_skip
)
{
if
(
skippable
)
{
if
(
skippable
)
{
vp9_prob
skip_prob
=
vp9_get_skip_prob
(
cm
,
xd
);
// Back out the coefficient coding costs
// Back out the coefficient coding costs
rate2
-=
(
rate_y
+
rate_uv
);
rate2
-=
(
rate_y
+
rate_uv
);
// for best yrd calculation
rate_uv
=
0
;
// Cost the skip mb case
// Cost the skip mb case
if
(
skip_prob
)
{
rate2
+=
vp9_cost_bit
(
vp9_get_skip_prob
(
cm
,
xd
),
1
);
int
prob_skip_cost
=
vp9_cost_bit
(
skip_prob
,
1
);
rate2
+=
prob_skip_cost
;
}
}
else
if
(
ref_frame
!=
INTRA_FRAME
&&
!
xd
->
lossless
)
{
}
else
if
(
ref_frame
!=
INTRA_FRAME
&&
!
xd
->
lossless
)
{
if
(
RDCOST
(
x
->
rdmult
,
x
->
rddiv
,
rate_y
+
rate_uv
,
distortion2
)
<
if
(
RDCOST
(
x
->
rdmult
,
x
->
rddiv
,
rate_y
+
rate_uv
,
distortion2
)
<
RDCOST
(
x
->
rdmult
,
x
->
rddiv
,
0
,
total_sse
))
{
RDCOST
(
x
->
rdmult
,
x
->
rddiv
,
0
,
total_sse
))
{
...
@@ -2936,8 +2929,6 @@ int64_t vp9_rd_pick_inter_mode_sb(VP9_COMP *cpi, MACROBLOCK *x,
...
@@ -2936,8 +2929,6 @@ int64_t vp9_rd_pick_inter_mode_sb(VP9_COMP *cpi, MACROBLOCK *x,
distortion2
=
total_sse
;
distortion2
=
total_sse
;
assert
(
total_sse
>=
0
);
assert
(
total_sse
>=
0
);
rate2
-=
(
rate_y
+
rate_uv
);
rate2
-=
(
rate_y
+
rate_uv
);
rate_y
=
0
;
rate_uv
=
0
;
this_skip2
=
1
;
this_skip2
=
1
;
}
}
}
else
{
}
else
{
...
...
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