Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
BC
public
external
libvpx
Commits
a2c01ed5
Commit
a2c01ed5
authored
11 years ago
by
Yaowu Xu
Browse files
Options
Download
Patches
Plain Diff
Added placeholder for real time mode
Change-Id: I203d10f76c7ca78d875eaae15557cd765c6240d1
parent
a9deec43
v1.14.0-linphone
1.4.X
feature/update_to_v1.9.0-linphone
feature/uwp_nuget
frame_parallel
highbitdepth
indianrunnerduck
javanwhistlingduck
khakicampbell
linphone
linphone-android
linphone-old
longtailedduck
m49-2623
m52-2743
m54-2840
m56-2924
m66-3359
m68-3440
mandarinduck
mcw
mcw2
nextgen
nextgenv2
playground
sandbox/Jingning/experimental
sandbox/Jingning/transcode
sandbox/Jingning/vpx
sandbox/aconverse@google.com/ansbench
sandbox/hkuang/frame_parallel
sandbox/hkuang@google.com/decode
sandbox/jimbankoski@google.com/proposed-aom
sandbox/jingning@google.com/decoder_test_suite
sandbox/jingning@google.com/experimental
sandbox/jzern@google.com/test
sandbox/wangch@google.com/vp9
sandbox/yaowu@google.com/mergeaom
v1.12.0-linphone
v1.6.1_linphone
v1.7.0-linphone
v1.9.0-linphone
v1.9.0
v1.9.0-rc1
v1.8.2
v1.8.1
v1.8.0
v1.7.0
v1.6.1
v1.6.0
v1.5.0
v1.4.0
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
vp9/encoder/vp9_onyx_if.c
+182
-3
vp9/encoder/vp9_onyx_if.c
warnings.c
+4
-12
warnings.c
warnings.h
+1
-1
warnings.h
with
187 additions
and
16 deletions
vp9/encoder/vp9_onyx_if.c
+
182
−
3
View file @
a2c01ed5
...
...
@@ -592,6 +592,181 @@ static void set_rd_speed_thresholds_sub8x8(VP9_COMP *cpi, int mode) {
sf
->
thresh_mult_sub8x8
[
THR_COMP_GA
]
=
INT_MAX
;
}
static
void
set_rt_speed_feature
(
VP9_COMMON
*
cm
,
SPEED_FEATURES
*
sf
,
int
speed
)
{
sf
->
static_segmentation
=
0
;
sf
->
use_avoid_tested_higherror
=
1
;
sf
->
adaptive_rd_thresh
=
1
;
sf
->
recode_loop
=
(
speed
<
1
);
if
(
speed
>=
1
)
{
sf
->
use_square_partition_only
=
!
frame_is_intra_only
(
cm
);
sf
->
less_rectangular_check
=
1
;
sf
->
tx_size_search_method
=
frame_is_intra_only
(
cm
)
?
USE_FULL_RD
:
USE_LARGESTALL
;
if
(
MIN
(
cm
->
width
,
cm
->
height
)
>=
720
)
sf
->
disable_split_mask
=
cm
->
show_frame
?
DISABLE_ALL_SPLIT
:
DISABLE_ALL_INTER_SPLIT
;
else
sf
->
disable_split_mask
=
DISABLE_COMPOUND_SPLIT
;
sf
->
use_rd_breakout
=
1
;
sf
->
adaptive_motion_search
=
1
;
sf
->
adaptive_pred_filter_type
=
1
;
sf
->
auto_mv_step_size
=
1
;
sf
->
adaptive_rd_thresh
=
2
;
sf
->
recode_loop
=
2
;
sf
->
intra_y_mode_mask
[
TX_32X32
]
=
INTRA_DC_H_V
;
sf
->
intra_uv_mode_mask
[
TX_32X32
]
=
INTRA_DC_H_V
;
sf
->
intra_uv_mode_mask
[
TX_16X16
]
=
INTRA_DC_H_V
;
}
if
(
speed
>=
2
)
{
sf
->
use_square_partition_only
=
!
frame_is_intra_only
(
cm
);
sf
->
less_rectangular_check
=
1
;
sf
->
tx_size_search_method
=
frame_is_intra_only
(
cm
)
?
USE_FULL_RD
:
USE_LARGESTALL
;
if
(
MIN
(
cm
->
width
,
cm
->
height
)
>=
720
)
sf
->
disable_split_mask
=
cm
->
show_frame
?
DISABLE_ALL_SPLIT
:
DISABLE_ALL_INTER_SPLIT
;
else
sf
->
disable_split_mask
=
LAST_AND_INTRA_SPLIT_ONLY
;
sf
->
mode_search_skip_flags
=
FLAG_SKIP_INTRA_DIRMISMATCH
|
FLAG_SKIP_INTRA_BESTINTER
|
FLAG_SKIP_COMP_BESTINTRA
|
FLAG_SKIP_INTRA_LOWVAR
;
sf
->
use_rd_breakout
=
1
;
sf
->
adaptive_motion_search
=
1
;
sf
->
adaptive_pred_filter_type
=
2
;
sf
->
auto_mv_step_size
=
1
;
sf
->
disable_filter_search_var_thresh
=
50
;
sf
->
comp_inter_joint_search_thresh
=
BLOCK_SIZES
;
sf
->
auto_min_max_partition_size
=
1
;
sf
->
use_lastframe_partitioning
=
LAST_FRAME_PARTITION_LOW_MOTION
;
sf
->
adjust_partitioning_from_last_frame
=
1
;
sf
->
last_partitioning_redo_frequency
=
3
;
sf
->
adaptive_rd_thresh
=
2
;
sf
->
recode_loop
=
2
;
sf
->
use_lp32x32fdct
=
1
;
sf
->
mode_skip_start
=
11
;
sf
->
intra_y_mode_mask
[
TX_32X32
]
=
INTRA_DC_H_V
;
sf
->
intra_y_mode_mask
[
TX_16X16
]
=
INTRA_DC_H_V
;
sf
->
intra_uv_mode_mask
[
TX_32X32
]
=
INTRA_DC_H_V
;
sf
->
intra_uv_mode_mask
[
TX_16X16
]
=
INTRA_DC_H_V
;
}
if
(
speed
>=
3
)
{
sf
->
use_square_partition_only
=
1
;
sf
->
tx_size_search_method
=
USE_LARGESTALL
;
if
(
MIN
(
cm
->
width
,
cm
->
height
)
>=
720
)
sf
->
disable_split_mask
=
DISABLE_ALL_SPLIT
;
else
sf
->
disable_split_mask
=
DISABLE_ALL_INTER_SPLIT
;
sf
->
mode_search_skip_flags
=
FLAG_SKIP_INTRA_DIRMISMATCH
|
FLAG_SKIP_INTRA_BESTINTER
|
FLAG_SKIP_COMP_BESTINTRA
|
FLAG_SKIP_INTRA_LOWVAR
;
sf
->
use_rd_breakout
=
1
;
sf
->
adaptive_motion_search
=
1
;
sf
->
adaptive_pred_filter_type
=
2
;
sf
->
auto_mv_step_size
=
1
;
sf
->
disable_filter_search_var_thresh
=
100
;
sf
->
comp_inter_joint_search_thresh
=
BLOCK_SIZES
;
sf
->
auto_min_max_partition_size
=
1
;
sf
->
use_lastframe_partitioning
=
LAST_FRAME_PARTITION_ALL
;
sf
->
adjust_partitioning_from_last_frame
=
1
;
sf
->
last_partitioning_redo_frequency
=
3
;
sf
->
use_uv_intra_rd_estimate
=
1
;
sf
->
skip_encode_sb
=
1
;
sf
->
use_lp32x32fdct
=
1
;
sf
->
subpel_iters_per_step
=
1
;
sf
->
use_fast_coef_updates
=
2
;
sf
->
adaptive_rd_thresh
=
4
;
sf
->
mode_skip_start
=
6
;
}
if
(
speed
>=
4
)
{
sf
->
use_square_partition_only
=
1
;
sf
->
tx_size_search_method
=
USE_LARGESTALL
;
sf
->
disable_split_mask
=
DISABLE_ALL_SPLIT
;
sf
->
mode_search_skip_flags
=
FLAG_SKIP_INTRA_DIRMISMATCH
|
FLAG_SKIP_INTRA_BESTINTER
|
FLAG_SKIP_COMP_BESTINTRA
|
FLAG_SKIP_COMP_REFMISMATCH
|
FLAG_SKIP_INTRA_LOWVAR
|
FLAG_EARLY_TERMINATE
;
sf
->
use_rd_breakout
=
1
;
sf
->
adaptive_motion_search
=
1
;
sf
->
adaptive_pred_filter_type
=
2
;
sf
->
auto_mv_step_size
=
1
;
sf
->
disable_filter_search_var_thresh
=
200
;
sf
->
comp_inter_joint_search_thresh
=
BLOCK_SIZES
;
sf
->
auto_min_max_partition_size
=
1
;
sf
->
use_lastframe_partitioning
=
LAST_FRAME_PARTITION_ALL
;
sf
->
adjust_partitioning_from_last_frame
=
1
;
sf
->
last_partitioning_redo_frequency
=
3
;
sf
->
use_uv_intra_rd_estimate
=
1
;
sf
->
skip_encode_sb
=
1
;
sf
->
use_lp32x32fdct
=
1
;
sf
->
subpel_iters_per_step
=
1
;
sf
->
use_fast_coef_updates
=
2
;
sf
->
adaptive_rd_thresh
=
4
;
sf
->
mode_skip_start
=
6
;
/* sf->intra_y_mode_mask = INTRA_DC_ONLY;
sf->intra_uv_mode_mask = INTRA_DC_ONLY;
sf->search_method = BIGDIA;
sf->disable_split_var_thresh = 64;
sf->disable_filter_search_var_thresh = 64; */
}
if
(
speed
>=
5
)
{
int
i
;
sf
->
comp_inter_joint_search_thresh
=
BLOCK_SIZES
;
sf
->
use_one_partition_size_always
=
1
;
sf
->
always_this_block_size
=
BLOCK_16X16
;
sf
->
tx_size_search_method
=
frame_is_intra_only
(
cm
)
?
USE_FULL_RD
:
USE_LARGESTALL
;
sf
->
mode_search_skip_flags
=
FLAG_SKIP_INTRA_DIRMISMATCH
|
FLAG_SKIP_INTRA_BESTINTER
|
FLAG_SKIP_COMP_BESTINTRA
|
FLAG_SKIP_COMP_REFMISMATCH
|
FLAG_SKIP_INTRA_LOWVAR
|
FLAG_EARLY_TERMINATE
;
sf
->
use_rd_breakout
=
1
;
sf
->
use_lp32x32fdct
=
1
;
sf
->
optimize_coefficients
=
0
;
sf
->
auto_mv_step_size
=
1
;
// sf->reduce_first_step_size = 1;
// sf->reference_masking = 1;
sf
->
disable_split_mask
=
DISABLE_ALL_SPLIT
;
sf
->
search_method
=
HEX
;
sf
->
subpel_iters_per_step
=
1
;
sf
->
disable_split_var_thresh
=
64
;
sf
->
disable_filter_search_var_thresh
=
500
;
for
(
i
=
0
;
i
<
TX_SIZES
;
i
++
)
{
sf
->
intra_y_mode_mask
[
i
]
=
INTRA_DC_ONLY
;
sf
->
intra_uv_mode_mask
[
i
]
=
INTRA_DC_ONLY
;
}
sf
->
use_fast_coef_updates
=
2
;
sf
->
adaptive_rd_thresh
=
4
;
sf
->
mode_skip_start
=
6
;
}
}
void
vp9_set_speed_features
(
VP9_COMP
*
cpi
)
{
SPEED_FEATURES
*
sf
=
&
cpi
->
sf
;
VP9_COMMON
*
cm
=
&
cpi
->
common
;
...
...
@@ -599,9 +774,9 @@ void vp9_set_speed_features(VP9_COMP *cpi) {
int
speed
=
cpi
->
speed
;
int
i
;
//
Only modes 0 and 1 supported for now in experimental code basa
e
if
(
mode
>
1
)
mode
=
1
;
//
Convert negative speed to positiv
e
if
(
speed
<
0
)
speed
=
-
speed
;
for
(
i
=
0
;
i
<
MAX_MODES
;
++
i
)
cpi
->
mode_chosen_counts
[
i
]
=
0
;
...
...
@@ -663,6 +838,7 @@ void vp9_set_speed_features(VP9_COMP *cpi) {
break
;
case
1
:
#if CONFIG_MULTIPLE_ARF
// Switch segmentation off.
sf
->
static_segmentation
=
0
;
...
...
@@ -844,6 +1020,9 @@ void vp9_set_speed_features(VP9_COMP *cpi) {
sf
->
mode_skip_start
=
6
;
}
break
;
case
2
:
set_rt_speed_feature
(
cm
,
sf
,
speed
);
break
;
};
/* switch */
// Set rd thresholds based on mode and speed setting
...
...
This diff is collapsed.
Click to expand it.
warnings.c
+
4
−
12
View file @
a2c01ed5
...
...
@@ -71,14 +71,6 @@ static int continue_prompt(int num_warnings) {
return
c
==
'y'
;
}
static
void
check_lag_in_frames_realtime_deadline
(
int
lag_in_frames
,
int
deadline
,
struct
WarningList
*
warning_list
)
{
if
(
deadline
==
VPX_DL_REALTIME
&&
lag_in_frames
!=
0
)
add_warning
(
lag_in_frames_with_realtime
,
warning_list
);
}
static
void
check_quantizer
(
int
min_q
,
int
max_q
,
struct
WarningList
*
warning_list
)
{
const
int
lossless
=
min_q
==
0
&&
max_q
==
0
;
...
...
@@ -88,7 +80,7 @@ static void check_quantizer(int min_q, int max_q,
void
check_encoder_config
(
int
disable_prompt
,
const
struct
VpxEncoderConfig
*
global_config
,
const
struct
vpx_codec_enc_cfg
*
stream_config
)
{
struct
vpx_codec_enc_cfg
*
stream_config
)
{
int
num_warnings
=
0
;
struct
WarningListNode
*
warning
=
NULL
;
struct
WarningList
warning_list
=
{
0
};
...
...
@@ -96,9 +88,9 @@ void check_encoder_config(int disable_prompt,
check_quantizer
(
stream_config
->
rc_min_quantizer
,
stream_config
->
rc_max_quantizer
,
&
warning_list
);
check_lag_in_frames_realtime_deadline
(
stream_config
->
g_lag_in_frames
,
global_config
->
deadline
,
&
warning_list
)
;
if
(
global_config
->
deadline
==
VPX_DL_REALTIME
)
stream_config
->
g_lag_in_frames
=
0
;
/* Count and print warnings. */
for
(
warning
=
warning_list
.
warning_node
;
...
...
This diff is collapsed.
Click to expand it.
warnings.h
+
1
−
1
View file @
a2c01ed5
...
...
@@ -20,6 +20,6 @@ struct VpxEncoderConfig;
*/
void
check_encoder_config
(
int
disable_prompt
,
const
struct
VpxEncoderConfig
*
global_config
,
const
struct
vpx_codec_enc_cfg
*
stream_config
);
struct
vpx_codec_enc_cfg
*
stream_config
);
#endif // WARNINGS_H_
This diff is collapsed.
Click to expand it.
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!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets