Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
aom-rav1e
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Xiph.Org
aom-rav1e
Commits
775a4bed
Commit
775a4bed
authored
Apr 20, 2017
by
Sean Purser-Haskell
Committed by
Sean Purser-haskell
Apr 20, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Correct row padding to avoid overflow in all cases.
Change-Id: I88041e954fa6cff5986458309bb28fa2e3c9758c
parent
9aeaeb7d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
6 deletions
+4
-6
test/warp_filter_test_util.cc
test/warp_filter_test_util.cc
+4
-6
No files found.
test/warp_filter_test_util.cc
View file @
775a4bed
...
...
@@ -101,9 +101,8 @@ void AV1WarpFilterTest::RunCheckOutput(warp_affine_func test_impl) {
uint8_t
*
input
=
input_
+
border
;
// The warp functions always write rows with widths that are multiples of 8.
// So to avoid a buffer overflow, we may need to add a "tail" to the buffer
// for the last row (round up to the nearest 8 elements)
int
output_n
=
((
out_w
*
out_h
)
+
7
)
&
~
7
;
// So to avoid a buffer overflow, we may need to pad rows to a multiple of 8.
int
output_n
=
((
out_w
+
7
)
&
~
7
)
*
out_h
;
uint8_t
*
output
=
new
uint8_t
[
output_n
];
uint8_t
*
output2
=
new
uint8_t
[
output_n
];
int32_t
mat
[
8
];
...
...
@@ -225,9 +224,8 @@ void AV1HighbdWarpFilterTest::RunCheckOutput(
int
i
,
j
,
sub_x
,
sub_y
;
// The warp functions always write rows with widths that are multiples of 8.
// So to avoid a buffer overflow, we may need to add a "tail" to the buffer
// for the last row (round up to the nearest 8 elements)
int
output_n
=
((
out_w
*
out_h
)
+
7
)
&
~
7
;
// So to avoid a buffer overflow, we may need to pad rows to a multiple of 8.
int
output_n
=
((
out_w
+
7
)
&
~
7
)
*
out_h
;
uint16_t
*
input_
=
new
uint16_t
[
h
*
stride
];
uint16_t
*
input
=
input_
+
border
;
uint16_t
*
output
=
new
uint16_t
[
output_n
];
...
...
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