Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
external
libvpx
Commits
3c872b6c
Commit
3c872b6c
authored
Feb 22, 2012
by
Yaowu Xu
Committed by
On2 (Google) Code Review
Feb 22, 2012
Browse files
Merge "Fixed skippable evaluation in mode decision" into experimental
parents
0f430084
2b4cd4cc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
45 additions
and
3 deletions
+45
-3
vp8/encoder/rdopt.c
vp8/encoder/rdopt.c
+45
-3
No files found.
vp8/encoder/rdopt.c
View file @
3c872b6c
...
@@ -2270,6 +2270,11 @@ void vp8_rd_pick_inter_mode(VP8_COMP *cpi, MACROBLOCK *x, int recon_yoffset, int
...
@@ -2270,6 +2270,11 @@ void vp8_rd_pick_inter_mode(VP8_COMP *cpi, MACROBLOCK *x, int recon_yoffset, int
int
best_hybrid_rd
=
INT_MAX
;
int
best_hybrid_rd
=
INT_MAX
;
int
rate2
,
distortion2
;
int
rate2
,
distortion2
;
int
uv_intra_rate
,
uv_intra_distortion
,
uv_intra_rate_tokenonly
;
int
uv_intra_rate
,
uv_intra_distortion
,
uv_intra_rate_tokenonly
;
int
uv_intra_tteob
=
0
;
#if CONFIG_T8X8
int
uv_intra_rate_8x8
,
uv_intra_distortion_8x8
,
uv_intra_rate_tokenonly_8x8
;
int
uv_intra_tteob_8x8
=
0
;
#endif
int
rate_y
,
UNINITIALIZED_IS_SAFE
(
rate_uv
);
int
rate_y
,
UNINITIALIZED_IS_SAFE
(
rate_uv
);
int
distortion_uv
;
int
distortion_uv
;
int
best_yrd
=
INT_MAX
;
int
best_yrd
=
INT_MAX
;
...
@@ -2357,6 +2362,12 @@ void vp8_rd_pick_inter_mode(VP8_COMP *cpi, MACROBLOCK *x, int recon_yoffset, int
...
@@ -2357,6 +2362,12 @@ void vp8_rd_pick_inter_mode(VP8_COMP *cpi, MACROBLOCK *x, int recon_yoffset, int
x
->
e_mbd
.
mode_info_context
->
mbmi
.
ref_frame
=
INTRA_FRAME
;
x
->
e_mbd
.
mode_info_context
->
mbmi
.
ref_frame
=
INTRA_FRAME
;
rd_pick_intra_mbuv_mode
(
cpi
,
x
,
&
uv_intra_rate
,
&
uv_intra_rate_tokenonly
,
&
uv_intra_distortion
);
rd_pick_intra_mbuv_mode
(
cpi
,
x
,
&
uv_intra_rate
,
&
uv_intra_rate_tokenonly
,
&
uv_intra_distortion
);
uv_intra_mode
=
x
->
e_mbd
.
mode_info_context
->
mbmi
.
uv_mode
;
uv_intra_mode
=
x
->
e_mbd
.
mode_info_context
->
mbmi
.
uv_mode
;
for
(
i
=
16
;
i
<
24
;
i
++
)
uv_intra_tteob
+=
x
->
e_mbd
.
block
[
i
].
eob
;
#if CONFIG_T8X8
uv_intra_tteob_8x8
=
uv_intra_tteob
;
#endif
// Get estimates of reference frame costs for each reference frame
// Get estimates of reference frame costs for each reference frame
// that depend on the current prediction etc.
// that depend on the current prediction etc.
...
@@ -2953,12 +2964,43 @@ void vp8_rd_pick_inter_mode(VP8_COMP *cpi, MACROBLOCK *x, int recon_yoffset, int
...
@@ -2953,12 +2964,43 @@ void vp8_rd_pick_inter_mode(VP8_COMP *cpi, MACROBLOCK *x, int recon_yoffset, int
if
(
cpi
->
common
.
mb_no_coeff_skip
)
if
(
cpi
->
common
.
mb_no_coeff_skip
)
{
{
int
tteob
;
int
tteob
;
int
has_y2_block
=
(
this_mode
!=
SPLITMV
&&
this_mode
!=
B_PRED
&&
this_mode
!=
I8X8_PRED
);
tteob
=
0
;
tteob
=
0
;
if
(
has_y2_block
)
tteob
+=
x
->
e_mbd
.
block
[
24
].
eob
;
for
(
i
=
0
;
i
<=
24
;
i
++
)
#if CONFIG_T8X8
if
(
cpi
->
common
.
txfm_mode
==
ALLOW_8X8
&&
has_y2_block
)
{
{
tteob
+=
x
->
e_mbd
.
block
[
i
].
eob
;
for
(
i
=
0
;
i
<
16
;
i
+=
4
)
tteob
+=
(
x
->
e_mbd
.
block
[
i
].
eob
>
1
);
if
(
x
->
e_mbd
.
mode_info_context
->
mbmi
.
ref_frame
!=
INTRA_FRAME
)
{
tteob
+=
x
->
e_mbd
.
block
[
16
].
eob
;
tteob
+=
x
->
e_mbd
.
block
[
20
].
eob
;
}
else
{
tteob
+=
uv_intra_tteob_8x8
;
}
}
else
#endif
{
for
(
i
=
0
;
i
<
16
;
i
++
)
tteob
+=
(
x
->
e_mbd
.
block
[
i
].
eob
>
has_y2_block
);
if
(
x
->
e_mbd
.
mode_info_context
->
mbmi
.
ref_frame
!=
INTRA_FRAME
)
{
for
(
i
=
16
;
i
<
24
;
i
++
)
tteob
+=
x
->
e_mbd
.
block
[
i
].
eob
;
}
else
{
tteob
+=
uv_intra_tteob
;
}
}
}
if
(
tteob
==
0
)
if
(
tteob
==
0
)
...
...
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