Skip to content
GitLab
Menu
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
c9f660d8
Commit
c9f660d8
authored
Feb 20, 2015
by
Marco
Committed by
Gerrit Code Review
Feb 20, 2015
Browse files
Merge "Remove a few unneccessary multiplications in denoiser."
parents
8724d31d
8f84fbe7
Changes
1
Hide whitespace changes
Inline
Side-by-side
vp9/encoder/vp9_denoiser.c
View file @
c9f660d8
...
...
@@ -45,7 +45,7 @@ static int delta_thresh(BLOCK_SIZE bs, int increase_denoising) {
static
int
noise_motion_thresh
(
BLOCK_SIZE
bs
,
int
increase_denoising
)
{
(
void
)
bs
;
(
void
)
increase_denoising
;
return
25
*
25
;
return
6
25
;
}
static
unsigned
int
sse_thresh
(
BLOCK_SIZE
bs
,
int
increase_denoising
)
{
...
...
@@ -53,8 +53,8 @@ static unsigned int sse_thresh(BLOCK_SIZE bs, int increase_denoising) {
}
static
int
sse_diff_thresh
(
BLOCK_SIZE
bs
,
int
increase_denoising
,
int
m
v_row
,
int
mv_col
)
{
if
(
m
v_row
*
mv_row
+
mv_col
*
mv_col
>
int
m
otion_magnitude
)
{
if
(
m
otion_magnitude
>
noise_motion_thresh
(
bs
,
increase_denoising
))
{
return
0
;
}
else
{
...
...
@@ -219,7 +219,7 @@ static VP9_DENOISER_DECISION perform_motion_compensation(VP9_DENOISER *denoiser,
// If the best reference frame uses inter-prediction and there is enough of a
// difference in sum-squared-error, use it.
if
(
frame
!=
INTRA_FRAME
&&
sse_diff
>
sse_diff_thresh
(
bs
,
increase_denoising
,
mv_row
,
mv_col
))
{
sse_diff
>
sse_diff_thresh
(
bs
,
increase_denoising
,
*
motion_magnitude
))
{
mbmi
->
ref_frame
[
0
]
=
ctx
->
best_reference_frame
;
mbmi
->
mode
=
ctx
->
best_sse_inter_mode
;
mbmi
->
mv
[
0
]
=
ctx
->
best_sse_mv
;
...
...
@@ -241,8 +241,8 @@ static VP9_DENOISER_DECISION perform_motion_compensation(VP9_DENOISER *denoiser,
*
mbmi
=
saved_mbmi
;
return
COPY_BLOCK
;
}
if
(
mv_row
*
mv_row
+
mv_col
*
mv_col
>
8
*
noise_motion_thresh
(
bs
,
increase_denoising
))
{
if
(
*
motion_magnitude
>
(
noise_motion_thresh
(
bs
,
increase_denoising
)
<<
3
)
)
{
// Restore everything to its original state
*
mbmi
=
saved_mbmi
;
return
COPY_BLOCK
;
...
...
Write
Preview
Supports
Markdown
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