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
dc8a2c07
Commit
dc8a2c07
authored
Feb 28, 2014
by
Deb Mukherjee
Committed by
Gerrit Code Review
Feb 28, 2014
Browse files
Merge "Adds speed 8 to vp9 as reference"
parents
dac630bb
f872a98b
Changes
5
Hide whitespace changes
Inline
Side-by-side
vp9/encoder/vp9_encodeframe.c
View file @
dc8a2c07
...
...
@@ -2356,7 +2356,8 @@ static void nonrd_use_partition(VP9_COMP *cpi, const TileInfo *const tile,
set_offsets
(
cpi
,
tile
,
row
,
col
,
bs
);
if
(
cm
->
frame_type
!=
KEY_FRAME
)
vp9_pick_inter_mode
(
cpi
,
x
,
tile
,
row
,
col
,
&
brate
,
&
bdist
,
bs
);
vp9_pick_inter_mode
(
cpi
,
x
,
tile
,
row
,
col
,
&
brate
,
&
bdist
,
bs
);
else
set_mode_info
(
&
xd
->
mi_8x8
[
0
]
->
mbmi
,
bs
,
mode
,
row
,
col
);
...
...
vp9/encoder/vp9_onyx_if.c
View file @
dc8a2c07
...
...
@@ -734,6 +734,7 @@ static void set_good_speed_feature(VP9_COMMON *cm,
sf
->
mode_skip_start
=
6
;
}
}
static
void
set_rt_speed_feature
(
VP9_COMMON
*
cm
,
SPEED_FEATURES
*
sf
,
int
speed
)
{
...
...
@@ -853,10 +854,17 @@ static void set_rt_speed_feature(VP9_COMMON *cm,
}
if
(
speed
>=
6
)
{
sf
->
partition_search_type
=
VAR_BASED_FIXED_PARTITION
;
sf
->
search_method
=
HEX
;
}
if
(
speed
>=
7
)
{
sf
->
partition_search_type
=
VAR_BASED_FIXED_PARTITION
;
sf
->
use_nonrd_pick_mode
=
1
;
sf
->
search_method
=
NSTEP
;
}
if
(
speed
>=
8
)
{
int
i
;
for
(
i
=
0
;
i
<
BLOCK_SIZES
;
++
i
)
sf
->
disable_inter_mode_mask
[
i
]
=
14
;
// only search NEARESTMV (0)
}
}
...
...
@@ -918,6 +926,8 @@ void vp9_set_speed_features(VP9_COMP *cpi) {
sf
->
mode_skip_start
=
MAX_MODES
;
// Mode index at which mode skip mask set
sf
->
use_nonrd_pick_mode
=
0
;
sf
->
encode_breakout_thresh
=
0
;
for
(
i
=
0
;
i
<
BLOCK_SIZES
;
++
i
)
sf
->
disable_inter_mode_mask
[
i
]
=
0
;
switch
(
cpi
->
oxcf
.
mode
)
{
case
MODE_BESTQUALITY
:
...
...
vp9/encoder/vp9_onyx_int.h
View file @
dc8a2c07
...
...
@@ -416,6 +416,10 @@ typedef struct {
// This variable sets the encode_breakout threshold. Currently, it is only
// enabled in real time mode.
int
encode_breakout_thresh
;
// A binary mask indicating if NEARESTMV, NEARMV, ZEROMV, NEWMV
// modes are disabled in order from LSB to MSB for each BLOCK_SIZE.
int
disable_inter_mode_mask
[
BLOCK_SIZES
];
}
SPEED_FEATURES
;
typedef
struct
{
...
...
vp9/encoder/vp9_pickmode.c
View file @
dc8a2c07
...
...
@@ -88,14 +88,27 @@ static int full_pixel_motion_search(VP9_COMP *cpi, MACROBLOCK *x,
mvp_full
.
row
>>=
3
;
if
(
cpi
->
sf
.
search_method
==
FAST_HEX
)
{
vp9_fast_hex_search
(
x
,
&
mvp_full
,
step_param
,
sadpb
,
&
cpi
->
fn_ptr
[
bsize
],
1
,
&
ref_mv
.
as_mv
,
&
tmp_mv
->
as_mv
);
bestsme
=
vp9_fast_hex_search
(
x
,
&
mvp_full
,
step_param
,
sadpb
,
&
cpi
->
fn_ptr
[
bsize
],
1
,
&
ref_mv
.
as_mv
,
&
tmp_mv
->
as_mv
);
}
else
if
(
cpi
->
sf
.
search_method
==
HEX
)
{
bestsme
=
vp9_hex_search
(
x
,
&
mvp_full
,
step_param
,
sadpb
,
1
,
&
cpi
->
fn_ptr
[
bsize
],
1
,
&
ref_mv
.
as_mv
,
&
tmp_mv
->
as_mv
);
}
else
if
(
cpi
->
sf
.
search_method
==
SQUARE
)
{
bestsme
=
vp9_square_search
(
x
,
&
mvp_full
,
step_param
,
sadpb
,
1
,
&
cpi
->
fn_ptr
[
bsize
],
1
,
&
ref_mv
.
as_mv
,
&
tmp_mv
->
as_mv
);
}
else
if
(
cpi
->
sf
.
search_method
==
BIGDIA
)
{
bestsme
=
vp9_bigdia_search
(
x
,
&
mvp_full
,
step_param
,
sadpb
,
1
,
&
cpi
->
fn_ptr
[
bsize
],
1
,
&
ref_mv
.
as_mv
,
&
tmp_mv
->
as_mv
);
}
else
{
vp9_full_pixel_diamond
(
cpi
,
x
,
&
mvp_full
,
step_param
,
sadpb
,
further_steps
,
1
,
&
cpi
->
fn_ptr
[
bsize
],
&
ref_mv
.
as_mv
,
&
tmp_mv
->
as_mv
);
bestsme
=
vp9_full_pixel_diamond
(
cpi
,
x
,
&
mvp_full
,
step_param
,
sadpb
,
further_steps
,
1
,
&
cpi
->
fn_ptr
[
bsize
],
&
ref_mv
.
as_mv
,
&
tmp_mv
->
as_mv
);
}
x
->
mv_col_min
=
tmp_col_min
;
x
->
mv_col_max
=
tmp_col_max
;
x
->
mv_row_min
=
tmp_row_min
;
...
...
@@ -189,8 +202,8 @@ int64_t vp9_pick_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
static
const
int
flag_list
[
4
]
=
{
0
,
VP9_LAST_FLAG
,
VP9_GOLD_FLAG
,
VP9_ALT_FLAG
};
int64_t
best_rd
=
INT64_MAX
;
int64_t
this_rd
;
static
const
int
cost
[
4
]
=
{
0
,
50
,
75
,
100
};
int64_t
this_rd
=
INT64_MAX
;
static
const
int
cost
[
4
]
=
{
0
,
2
,
4
,
6
};
const
int64_t
inter_mode_thresh
=
300
;
const
int64_t
intra_mode_cost
=
50
;
...
...
@@ -228,7 +241,6 @@ int64_t vp9_pick_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
for
(
ref_frame
=
LAST_FRAME
;
ref_frame
<=
LAST_FRAME
;
++
ref_frame
)
{
int
rate_mv
=
0
;
if
(
!
(
cpi
->
ref_frame_flags
&
flag_list
[
ref_frame
]))
continue
;
...
...
@@ -241,11 +253,15 @@ int64_t vp9_pick_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
mbmi
->
ref_frame
[
0
]
=
ref_frame
;
for
(
this_mode
=
NEARESTMV
;
this_mode
<=
NEWMV
;
++
this_mode
)
{
int
rate
=
cost
[
INTER_OFFSET
(
this_mode
)];
int
rate
=
cost
[
INTER_OFFSET
(
this_mode
)]
<<
(
num_pels_log2_lookup
[
bsize
]
-
4
);
int64_t
dist
;
if
(
cpi
->
sf
.
disable_inter_mode_mask
[
bsize
]
&
(
1
<<
INTER_OFFSET
(
this_mode
)))
continue
;
if
(
this_mode
==
NEWMV
)
{
if
(
this_rd
<
500
)
if
(
this_rd
<
(
1
<<
num_pels_log2_lookup
[
bsize
])
)
continue
;
x
->
mode_sad
[
ref_frame
][
INTER_OFFSET
(
NEWMV
)]
=
...
...
@@ -312,6 +328,5 @@ int64_t vp9_pick_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
}
}
}
return
INT64_MAX
;
}
vp9/encoder/vp9_rdopt.c
View file @
dc8a2c07
...
...
@@ -1725,6 +1725,8 @@ static void rd_check_segment_txsize(VP9_COMP *cpi, MACROBLOCK *x,
mode_idx
=
INTER_OFFSET
(
this_mode
);
bsi
->
rdstat
[
i
][
mode_idx
].
brdcost
=
INT64_MAX
;
if
(
cpi
->
sf
.
disable_inter_mode_mask
[
bsize
]
&
(
1
<<
mode_idx
))
continue
;
// if we're near/nearest and mv == 0,0, compare to zeromv
if
((
this_mode
==
NEARMV
||
this_mode
==
NEARESTMV
||
...
...
@@ -3316,6 +3318,9 @@ int64_t vp9_rd_pick_inter_mode_sb(VP9_COMP *cpi, MACROBLOCK *x,
this_mode
=
vp9_mode_order
[
mode_index
].
mode
;
ref_frame
=
vp9_mode_order
[
mode_index
].
ref_frame
[
0
];
if
(
ref_frame
!=
INTRA_FRAME
&&
cpi
->
sf
.
disable_inter_mode_mask
[
bsize
]
&
(
1
<<
INTER_OFFSET
(
this_mode
)))
continue
;
second_ref_frame
=
vp9_mode_order
[
mode_index
].
ref_frame
[
1
];
comp_pred
=
second_ref_frame
>
INTRA_FRAME
;
...
...
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