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
52549b4e
Commit
52549b4e
authored
Apr 17, 2014
by
Dmitry Kovalev
Browse files
Adding is_best_mode() function.
Change-Id: Idca7c1cd8a12df465c58b6ba064a99404b3b4bce
parent
69009e73
Changes
3
Hide whitespace changes
Inline
Side-by-side
vp9/encoder/vp9_onyx_if.c
View file @
52549b4e
...
...
@@ -372,9 +372,6 @@ static void update_reference_segmentation_map(VP9_COMP *cpi) {
cache_ptr
+=
cm
->
mi_cols
;
}
}
static
int
is_slowest_mode
(
int
mode
)
{
return
(
mode
==
TWO_PASS_SECOND_BEST
||
mode
==
ONE_PASS_BEST
);
}
static
void
set_rd_speed_thresholds
(
VP9_COMP
*
cpi
)
{
int
i
;
...
...
@@ -382,7 +379,7 @@ static void set_rd_speed_thresholds(VP9_COMP *cpi) {
// Set baseline threshold values
for
(
i
=
0
;
i
<
MAX_MODES
;
++
i
)
rd
->
thresh_mult
[
i
]
=
is_
slow
est_mode
(
cpi
->
oxcf
.
mode
)
?
-
500
:
0
;
rd
->
thresh_mult
[
i
]
=
is_
b
est_mode
(
cpi
->
oxcf
.
mode
)
?
-
500
:
0
;
rd
->
thresh_mult
[
THR_NEARESTMV
]
=
0
;
rd
->
thresh_mult
[
THR_NEARESTG
]
=
0
;
...
...
@@ -464,7 +461,7 @@ static void set_rd_speed_thresholds_sub8x8(VP9_COMP *cpi) {
int
i
;
for
(
i
=
0
;
i
<
MAX_REFS
;
++
i
)
rd
->
thresh_mult_sub8x8
[
i
]
=
is_
slow
est_mode
(
cpi
->
oxcf
.
mode
)
?
-
500
:
0
;
rd
->
thresh_mult_sub8x8
[
i
]
=
is_
b
est_mode
(
cpi
->
oxcf
.
mode
)
?
-
500
:
0
;
rd
->
thresh_mult_sub8x8
[
THR_LAST
]
+=
2500
;
rd
->
thresh_mult_sub8x8
[
THR_GOLD
]
+=
2500
;
...
...
vp9/encoder/vp9_onyx_int.h
View file @
52549b4e
...
...
@@ -287,6 +287,9 @@ typedef struct VP9_CONFIG {
vp8e_tuning
tuning
;
}
VP9_CONFIG
;
static
INLINE
int
is_best_mode
(
MODE
mode
)
{
return
mode
==
ONE_PASS_BEST
||
mode
==
TWO_PASS_SECOND_BEST
;
}
typedef
struct
RD_OPT
{
// Thresh_mult is used to set a threshold for the rd score. A higher value
...
...
vp9/encoder/vp9_rdopt.c
View file @
52549b4e
...
...
@@ -1808,8 +1808,7 @@ static void rd_check_segment_txsize(VP9_COMP *cpi, MACROBLOCK *x,
if
(
best_rd
<
label_mv_thresh
)
break
;
if
(
cpi
->
oxcf
.
mode
!=
TWO_PASS_SECOND_BEST
&&
cpi
->
oxcf
.
mode
!=
ONE_PASS_BEST
)
{
if
(
!
is_best_mode
(
cpi
->
oxcf
.
mode
))
{
// use previous block's result as next block's MV predictor.
if
(
i
>
0
)
{
bsi
->
mvp
.
as_int
=
mi
->
bmi
[
i
-
1
].
as_mv
[
0
].
as_int
;
...
...
@@ -1885,8 +1884,7 @@ static void rd_check_segment_txsize(VP9_COMP *cpi, MACROBLOCK *x,
}
// Should we do a full search (best quality only)
if
(
cpi
->
oxcf
.
mode
==
ONE_PASS_BEST
||
cpi
->
oxcf
.
mode
==
TWO_PASS_SECOND_BEST
)
{
if
(
is_best_mode
(
cpi
->
oxcf
.
mode
))
{
int_mv
*
const
best_mv
=
&
mi
->
bmi
[
i
].
as_mv
[
0
];
/* Check if mvp_full is within the range. */
clamp_mv
(
&
mvp_full
,
x
->
mv_col_min
,
x
->
mv_col_max
,
...
...
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