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
4aa12b6c
Commit
4aa12b6c
authored
Feb 03, 2011
by
Scott LaVarnway
Committed by
Code Review
Feb 03, 2011
Browse files
Options
Browse Files
Download
Plain Diff
Merge "Zero out block mv when an intra mode is selected"
parents
a8703156
07a7c08a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
20 deletions
+17
-20
vp8/encoder/rdopt.c
vp8/encoder/rdopt.c
+17
-20
No files found.
vp8/encoder/rdopt.c
View file @
4aa12b6c
...
...
@@ -1953,15 +1953,9 @@ int vp8_rd_pick_inter_mode(VP8_COMP *cpi, MACROBLOCK *x, int recon_yoffset, int
switch
(
this_mode
)
{
case
B_PRED
:
for
(
i
=
0
;
i
<
16
;
i
++
)
{
vpx_memset
(
&
x
->
e_mbd
.
block
[
i
].
bmi
,
0
,
sizeof
(
B_MODE_INFO
));
}
// Note the rate value returned here includes the cost of coding the BPRED mode : x->mbmode_cost[x->e_mbd.frame_type][BPRED];
vp8_rd_pick_intra4x4mby_modes
(
cpi
,
x
,
&
rate
,
&
rate_y
,
&
distortion
);
rate2
+=
rate
;
distortion2
+=
distortion
;
rate2
+=
uv_intra_rate
;
rate_uv
=
uv_intra_rate_tokenonly
;
...
...
@@ -2003,22 +1997,16 @@ int vp8_rd_pick_inter_mode(VP8_COMP *cpi, MACROBLOCK *x, int recon_yoffset, int
case
V_PRED
:
case
H_PRED
:
case
TM_PRED
:
for
(
i
=
0
;
i
<
16
;
i
++
)
{
vpx_memset
(
&
x
->
e_mbd
.
block
[
i
].
bmi
,
0
,
sizeof
(
B_MODE_INFO
));
}
x
->
e_mbd
.
mode_info_context
->
mbmi
.
ref_frame
=
INTRA_FRAME
;
vp8_build_intra_predictors_mby_ptr
(
&
x
->
e_mbd
);
{
macro_block_yrd
(
x
,
&
rate_y
,
&
distortion
,
IF_RTCD
(
&
cpi
->
rtcd
.
encodemb
))
;
rate2
+=
rate_y
;
distortion2
+=
distortion
;
rate2
+=
x
->
mbmode_cost
[
x
->
e_mbd
.
frame_type
][
x
->
e_mbd
.
mode_info_context
->
mbmi
.
mode
];
rate2
+=
uv_intra_rate
;
rate_uv
=
uv_intra_rate_tokenonly
;
distortion2
+=
uv_intra_distortion
;
distortion_uv
=
uv_intra_distortion
;
}
macro_block_yrd
(
x
,
&
rate_y
,
&
distortion
,
IF_RTCD
(
&
cpi
->
rtcd
.
encodemb
))
;
rate2
+=
rate_y
;
distortion2
+=
distortion
;
rate2
+=
x
->
mbmode_cost
[
x
->
e_mbd
.
frame_type
][
x
->
e_mbd
.
mode_info_context
->
mbmi
.
mode
];
rate2
+=
uv_intra_rate
;
rate_uv
=
uv_intra_rate_tokenonly
;
distortion2
+=
uv_intra_distortion
;
distortion_uv
=
uv_intra_distortion
;
break
;
case
NEWMV
:
...
...
@@ -2461,6 +2449,15 @@ int vp8_rd_pick_inter_mode(VP8_COMP *cpi, MACROBLOCK *x, int recon_yoffset, int
}
if
(
best_mbmode
.
mode
<=
B_PRED
)
{
int
i
;
for
(
i
=
0
;
i
<
16
;
i
++
)
{
best_bmodes
[
i
].
mv
.
as_int
=
0
;
}
}
// macroblock modes
vpx_memcpy
(
&
x
->
e_mbd
.
mode_info_context
->
mbmi
,
&
best_mbmode
,
sizeof
(
MB_MODE_INFO
));
vpx_memcpy
(
x
->
partition_info
,
&
best_partition
,
sizeof
(
PARTITION_INFO
));
...
...
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