Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
aom-rav1e
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Xiph.Org
aom-rav1e
Commits
6202ce5a
Commit
6202ce5a
authored
9 years ago
by
Marco Paniconi
Committed by
Gerrit Code Review
9 years ago
Browse files
Options
Downloads
Plain Diff
Merge "vp9-noise estimate: Move level setting to a function."
parents
b38a7cd1
b12e3534
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
vp9/encoder/vp9_noise_estimate.c
+16
-10
16 additions, 10 deletions
vp9/encoder/vp9_noise_estimate.c
vp9/encoder/vp9_noise_estimate.h
+2
-0
2 additions, 0 deletions
vp9/encoder/vp9_noise_estimate.h
with
18 additions
and
10 deletions
vp9/encoder/vp9_noise_estimate.c
+
16
−
10
View file @
6202ce5a
...
...
@@ -82,6 +82,21 @@ static void copy_frame(YV12_BUFFER_CONFIG * const dest,
}
}
NOISE_LEVEL
vp9_noise_estimate_extract_level
(
NOISE_ESTIMATE
*
const
ne
)
{
int
noise_level
=
kLowLow
;
if
(
ne
->
value
>
(
ne
->
thresh
<<
1
))
{
noise_level
=
kHigh
;
}
else
{
if
(
ne
->
value
>
ne
->
thresh
)
noise_level
=
kMedium
;
else
if
(
ne
->
value
>
(
ne
->
thresh
>>
1
))
noise_level
=
kLow
;
else
noise_level
=
kLowLow
;
}
return
noise_level
;
}
void
vp9_update_noise_estimate
(
VP9_COMP
*
const
cpi
)
{
const
VP9_COMMON
*
const
cm
=
&
cpi
->
common
;
CYCLIC_REFRESH
*
const
cr
=
cpi
->
cyclic_refresh
;
...
...
@@ -220,16 +235,7 @@ void vp9_update_noise_estimate(VP9_COMP *const cpi) {
// Reset counter and check noise level condition.
ne
->
num_frames_estimate
=
30
;
ne
->
count
=
0
;
if
(
ne
->
value
>
(
ne
->
thresh
<<
1
))
{
ne
->
level
=
kHigh
;
}
else
{
if
(
ne
->
value
>
ne
->
thresh
)
ne
->
level
=
kMedium
;
else
if
(
ne
->
value
>
(
ne
->
thresh
>>
1
))
ne
->
level
=
kLow
;
else
ne
->
level
=
kLowLow
;
}
ne
->
level
=
vp9_noise_estimate_extract_level
(
ne
);
#if CONFIG_VP9_TEMPORAL_DENOISING
if
(
cpi
->
oxcf
.
noise_sensitivity
>
0
)
vp9_denoiser_set_noise_level
(
&
cpi
->
denoiser
,
ne
->
level
);
...
...
This diff is collapsed.
Click to expand it.
vp9/encoder/vp9_noise_estimate.h
+
2
−
0
View file @
6202ce5a
...
...
@@ -47,6 +47,8 @@ void vp9_noise_estimate_init(NOISE_ESTIMATE *const ne,
int
width
,
int
height
);
NOISE_LEVEL
vp9_noise_estimate_extract_level
(
NOISE_ESTIMATE
*
const
ne
);
void
vp9_update_noise_estimate
(
struct
VP9_COMP
*
const
cpi
);
#ifdef __cplusplus
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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