Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Xiph.Org
aom-rav1e
Commits
1580a88c
Commit
1580a88c
authored
Jun 19, 2014
by
Tim Kopp
Committed by
Gerrit Code Review
Jun 19, 2014
Browse files
Options
Browse Files
Download
Plain Diff
Merge "Implemented vp9_denoiser_{alloc,free}()"
parents
19125ae1
2a720673
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
0 deletions
+26
-0
vp9/encoder/vp9_denoiser.c
vp9/encoder/vp9_denoiser.c
+26
-0
No files found.
vp9/encoder/vp9_denoiser.c
View file @
1580a88c
...
...
@@ -40,10 +40,36 @@ void vp9_denoiser_update_frame_stats() {
int
vp9_denoiser_alloc
(
VP9_DENOISER
*
denoiser
,
int
width
,
int
height
,
int
border
)
{
assert
(
denoiser
);
denoiser
->
running_avg_y
.
stride
=
width
+
2
*
border
;
denoiser
->
running_avg_y
.
buf
=
calloc
(
((
2
*
border
)
+
width
)
*
((
2
*
border
)
+
height
),
sizeof
(
uint8_t
));
if
(
denoiser
->
running_avg_y
.
buf
==
NULL
)
{
vp9_denoiser_free
(
denoiser
);
return
1
;
}
denoiser
->
mc_running_avg_y
.
stride
=
width
+
2
*
border
;
denoiser
->
mc_running_avg_y
.
buf
=
calloc
(
((
2
*
border
)
+
width
)
*
((
2
*
border
)
+
height
),
sizeof
(
uint8_t
));
if
(
denoiser
->
mc_running_avg_y
.
buf
==
NULL
)
{
vp9_denoiser_free
(
denoiser
);
return
1
;
}
return
0
;
}
void
vp9_denoiser_free
(
VP9_DENOISER
*
denoiser
)
{
if
(
denoiser
->
running_avg_y
.
buf
!=
NULL
)
{
free
(
denoiser
->
running_avg_y
.
buf
);
}
if
(
denoiser
->
mc_running_avg_y
.
buf
!=
NULL
)
{
free
(
denoiser
->
mc_running_avg_y
.
buf
);
}
return
;
}
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