Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
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
bbfbbbf6
Commit
bbfbbbf6
authored
Mar 21, 2014
by
Alex Converse
Browse files
Convert use_fast_lpf_pick to an enum.
Change-Id: I06e17b489dea74dedea356c73ef72dc5ffad3a30
parent
d070aa5d
Changes
4
Hide whitespace changes
Inline
Side-by-side
vp9/encoder/vp9_onyx_if.c
View file @
bbfbbbf6
...
...
@@ -843,7 +843,7 @@ static void set_rt_speed_feature(VP9_COMMON *cm,
if
(
speed
>=
4
)
{
sf
->
optimize_coefficients
=
0
;
sf
->
disable_split_mask
=
DISABLE_ALL_SPLIT
;
sf
->
use_fast_
lpf_pick
=
2
;
sf
->
lpf_pick
=
LPF_PICK_FROM_Q
;
sf
->
encode_breakout_thresh
=
700
;
}
if
(
speed
>=
5
)
{
...
...
@@ -942,7 +942,7 @@ void vp9_set_speed_features(VP9_COMP *cpi) {
sf
->
use_rd_breakout
=
0
;
sf
->
skip_encode_sb
=
0
;
sf
->
use_uv_intra_rd_estimate
=
0
;
sf
->
use_fast_
lpf_pick
=
0
;
sf
->
lpf_pick
=
LPF_PICK_FROM_FULL_IMAGE
;
sf
->
use_fast_coef_updates
=
0
;
sf
->
use_fast_coef_costing
=
0
;
sf
->
mode_skip_start
=
MAX_MODES
;
// Mode index at which mode skip mask set
...
...
@@ -2525,7 +2525,7 @@ static void loopfilter_frame(VP9_COMP *cpi, VP9_COMMON *cm) {
vpx_usec_timer_start
(
&
timer
);
vp9_pick_filter_level
(
cpi
->
Source
,
cpi
,
cpi
->
sf
.
use_fast_
lpf_pick
);
vp9_pick_filter_level
(
cpi
->
Source
,
cpi
,
cpi
->
sf
.
lpf_pick
);
vpx_usec_timer_mark
(
&
timer
);
cpi
->
time_pick_lpf
+=
vpx_usec_timer_elapsed
(
&
timer
);
...
...
vp9/encoder/vp9_onyx_int.h
View file @
bbfbbbf6
...
...
@@ -210,6 +210,15 @@ typedef enum {
VAR_BASED_PARTITION
}
PARTITION_SEARCH_TYPE
;
typedef
enum
{
// Try the full image with different values.
LPF_PICK_FROM_FULL_IMAGE
,
// Try a small portion of the image with different values.
LPF_PICK_FROM_SUBIMAGE
,
// Estimate the level based on quantizer and frame type
LPF_PICK_FROM_Q
,
}
LPF_PICK_METHOD
;
typedef
struct
{
// Frame level coding parameter update
int
frame_parameter_update
;
...
...
@@ -380,11 +389,8 @@ typedef struct {
// final encode.
int
use_uv_intra_rd_estimate
;
// This feature controls how the loop filter level is determined:
// 0: Try the full image with different values.
// 1: Try a small portion of the image with different values.
// 2: Estimate the level based on quantizer and frame type
int
use_fast_lpf_pick
;
// This feature controls how the loop filter level is determined.
LPF_PICK_METHOD
lpf_pick
;
// This feature limits the number of coefficients updates we actually do
// by only looking at counts from 1/2 the bands.
...
...
vp9/encoder/vp9_picklpf.c
View file @
bbfbbbf6
...
...
@@ -131,14 +131,14 @@ static void search_filter_level(const YV12_BUFFER_CONFIG *sd, VP9_COMP *cpi,
}
void
vp9_pick_filter_level
(
const
YV12_BUFFER_CONFIG
*
sd
,
VP9_COMP
*
cpi
,
int
method
)
{
LPF_PICK_METHOD
method
)
{
VP9_COMMON
*
const
cm
=
&
cpi
->
common
;
struct
loopfilter
*
const
lf
=
&
cm
->
lf
;
lf
->
sharpness_level
=
cm
->
frame_type
==
KEY_FRAME
?
0
:
cpi
->
oxcf
.
sharpness
;
if
(
method
==
2
)
{
if
(
method
==
LPF_PICK_FROM_Q
)
{
const
int
min_filter_level
=
0
;
const
int
max_filter_level
=
get_max_filter_level
(
cpi
);
const
int
q
=
vp9_ac_quant
(
cm
->
base_qindex
,
0
);
...
...
@@ -150,6 +150,6 @@ void vp9_pick_filter_level(const YV12_BUFFER_CONFIG *sd, VP9_COMP *cpi,
filt_guess
-=
4
;
lf
->
filter_level
=
clamp
(
filt_guess
,
min_filter_level
,
max_filter_level
);
}
else
{
search_filter_level
(
sd
,
cpi
,
method
==
1
);
search_filter_level
(
sd
,
cpi
,
method
==
LPF_PICK_FROM_SUBIMAGE
);
}
}
vp9/encoder/vp9_picklpf.h
View file @
bbfbbbf6
...
...
@@ -16,11 +16,13 @@
extern
"C"
{
#endif
#include "vp9/encoder/vp9_onyx_int.h"
struct
yv12_buffer_config
;
struct
VP9_COMP
;
void
vp9_pick_filter_level
(
const
struct
yv12_buffer_config
*
sd
,
struct
VP9_COMP
*
cpi
,
int
method
);
struct
VP9_COMP
*
cpi
,
LPF_PICK_METHOD
method
);
#ifdef __cplusplus
}
// extern "C"
#endif
...
...
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