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
Toggle navigation
Open sidebar
BC
public
external
libvpx
Commits
143be253
Commit
143be253
authored
Aug 27, 2014
by
Jingning Han
Committed by
Gerrit Code Review
Aug 27, 2014
Browse files
Options
Browse Files
Download
Plain Diff
Merge "Re-work RD modeling based on inter frame prediction residual"
parents
34675e66
993ef8bd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
+9
-6
vp9/encoder/vp9_rdopt.c
vp9/encoder/vp9_rdopt.c
+9
-6
No files found.
vp9/encoder/vp9_rdopt.c
View file @
143be253
...
@@ -2148,7 +2148,7 @@ static int64_t handle_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
...
@@ -2148,7 +2148,7 @@ static int64_t handle_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
DECLARE_ALIGNED_ARRAY
(
16
,
uint8_t
,
tmp_buf
,
MAX_MB_PLANE
*
64
*
64
);
DECLARE_ALIGNED_ARRAY
(
16
,
uint8_t
,
tmp_buf
,
MAX_MB_PLANE
*
64
*
64
);
int
pred_exists
=
0
;
int
pred_exists
=
0
;
int
intpel_mv
;
int
intpel_mv
;
int64_t
rd
,
best_rd
=
INT64_MAX
;
int64_t
rd
,
tmp_rd
,
best_rd
=
INT64_MAX
;
int
best_needs_copy
=
0
;
int
best_needs_copy
=
0
;
uint8_t
*
orig_dst
[
MAX_MB_PLANE
];
uint8_t
*
orig_dst
[
MAX_MB_PLANE
];
int
orig_dst_stride
[
MAX_MB_PLANE
];
int
orig_dst_stride
[
MAX_MB_PLANE
];
...
@@ -2337,6 +2337,7 @@ static int64_t handle_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
...
@@ -2337,6 +2337,7 @@ static int64_t handle_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
(
cm
->
interp_filter
!=
SWITCHABLE
&&
(
cm
->
interp_filter
!=
SWITCHABLE
&&
cm
->
interp_filter
==
mbmi
->
interp_filter
))
{
cm
->
interp_filter
==
mbmi
->
interp_filter
))
{
pred_exists
=
1
;
pred_exists
=
1
;
tmp_rd
=
best_rd
;
}
}
}
}
restore_dst_buf
(
xd
,
orig_dst
,
orig_dst_stride
);
restore_dst_buf
(
xd
,
orig_dst
,
orig_dst_stride
);
...
@@ -2355,17 +2356,19 @@ static int64_t handle_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
...
@@ -2355,17 +2356,19 @@ static int64_t handle_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
xd
->
plane
[
i
].
dst
.
stride
=
64
;
xd
->
plane
[
i
].
dst
.
stride
=
64
;
}
}
}
}
rd
=
tmp_rd
+
RDCOST
(
x
->
rdmult
,
x
->
rddiv
,
rs
,
0
);
}
else
{
}
else
{
int
tmp_rate
;
int64_t
tmp_dist
;
// Handles the special case when a filter that is not in the
// Handles the special case when a filter that is not in the
// switchable list (ex. bilinear, 6-tap) is indicated at the frame level
// switchable list (ex. bilinear) is indicated at the frame level, or
// skip condition holds.
vp9_build_inter_predictors_sb
(
xd
,
mi_row
,
mi_col
,
bsize
);
vp9_build_inter_predictors_sb
(
xd
,
mi_row
,
mi_col
,
bsize
);
model_rd_for_sb
(
cpi
,
bsize
,
x
,
xd
,
&
tmp_rate
,
&
tmp_dist
);
rd
=
RDCOST
(
x
->
rdmult
,
x
->
rddiv
,
rs
+
tmp_rate
,
tmp_dist
);
}
}
if
(
cpi
->
sf
.
use_rd_breakout
&&
ref_best_rd
<
INT64_MAX
)
{
if
(
cpi
->
sf
.
use_rd_breakout
&&
ref_best_rd
<
INT64_MAX
)
{
int
tmp_rate
;
int64_t
tmp_dist
;
model_rd_for_sb
(
cpi
,
bsize
,
x
,
xd
,
&
tmp_rate
,
&
tmp_dist
);
rd
=
RDCOST
(
x
->
rdmult
,
x
->
rddiv
,
rs
+
tmp_rate
,
tmp_dist
);
// if current pred_error modeled rd is substantially more than the best
// if current pred_error modeled rd is substantially more than the best
// so far, do not bother doing full rd
// so far, do not bother doing full rd
if
(
rd
/
2
>
ref_best_rd
)
{
if
(
rd
/
2
>
ref_best_rd
)
{
...
...
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