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
f01855b0
Commit
f01855b0
authored
11 years ago
by
Alex Converse
Committed by
Gerrit Code Review
11 years ago
Browse files
Options
Download
Plain Diff
Merge "Cache loop filter errors."
parents
11786b04
c0214e71
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
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
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
vp9/encoder/vp9_picklpf.c
+19
-2
vp9/encoder/vp9_picklpf.c
with
19 additions
and
2 deletions
vp9/encoder/vp9_picklpf.c
+
19
−
2
View file @
f01855b0
...
...
@@ -64,16 +64,23 @@ static void search_filter_level(const YV12_BUFFER_CONFIG *sd, VP9_COMP *cpi,
// range.
int
filt_mid
=
clamp
(
lf
->
filter_level
,
min_filter_level
,
max_filter_level
);
int
filter_step
=
filt_mid
<
16
?
4
:
filt_mid
/
4
;
// Sum squared error at each filter level
int
ss_err
[
MAX_LOOP_FILTER
+
1
];
// Set each entry to -1
vpx_memset
(
ss_err
,
0xFF
,
sizeof
(
ss_err
));
// Make a copy of the unfiltered / processed recon buffer
vpx_yv12_copy_y
(
cm
->
frame_to_show
,
&
cpi
->
last_frame_uf
);
best_err
=
try_filter_frame
(
sd
,
cpi
,
xd
,
cm
,
filt_mid
,
partial
);
filt_best
=
filt_mid
;
ss_err
[
filt_mid
]
=
best_err
;
while
(
filter_step
>
0
)
{
const
int
filt_high
=
MIN
(
filt_mid
+
filter_step
,
max_filter_level
);
const
int
filt_low
=
MAX
(
filt_mid
-
filter_step
,
min_filter_level
);
int
filt_err
;
// Bias against raising loop filter in favor of lowering it.
int
bias
=
(
best_err
>>
(
15
-
(
filt_mid
/
8
)))
*
filter_step
;
...
...
@@ -87,7 +94,12 @@ static void search_filter_level(const YV12_BUFFER_CONFIG *sd, VP9_COMP *cpi,
if
(
filt_direction
<=
0
&&
filt_low
!=
filt_mid
)
{
// Get Low filter error score
int
filt_err
=
try_filter_frame
(
sd
,
cpi
,
xd
,
cm
,
filt_low
,
partial
);
if
(
ss_err
[
filt_low
]
<
0
)
{
filt_err
=
try_filter_frame
(
sd
,
cpi
,
xd
,
cm
,
filt_low
,
partial
);
ss_err
[
filt_low
]
=
filt_err
;
}
else
{
filt_err
=
ss_err
[
filt_low
];
}
// If value is close to the best so far then bias towards a lower loop
// filter value.
if
((
filt_err
-
bias
)
<
best_err
)
{
...
...
@@ -101,7 +113,12 @@ static void search_filter_level(const YV12_BUFFER_CONFIG *sd, VP9_COMP *cpi,
// Now look at filt_high
if
(
filt_direction
>=
0
&&
filt_high
!=
filt_mid
)
{
int
filt_err
=
try_filter_frame
(
sd
,
cpi
,
xd
,
cm
,
filt_high
,
partial
);
if
(
ss_err
[
filt_high
]
<
0
)
{
filt_err
=
try_filter_frame
(
sd
,
cpi
,
xd
,
cm
,
filt_high
,
partial
);
ss_err
[
filt_high
]
=
filt_err
;
}
else
{
filt_err
=
ss_err
[
filt_high
];
}
// Was it better than the previous best?
if
(
filt_err
<
(
best_err
-
bias
))
{
best_err
=
filt_err
;
...
...
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