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
1cf22723
Commit
1cf22723
authored
Sep 03, 2013
by
James Zern
Committed by
Gerrit Code Review
Sep 03, 2013
Browse files
Options
Browse Files
Download
Plain Diff
Merge "Fix intermediate height in convolve_c"
parents
010c0ad0
e326cecf
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
5 deletions
+36
-5
test/convolve_test.cc
test/convolve_test.cc
+35
-1
vp9/common/vp9_convolve.c
vp9/common/vp9_convolve.c
+1
-4
No files found.
test/convolve_test.cc
View file @
1cf22723
...
...
@@ -8,6 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#include <string.h>
#include "test/acm_random.h"
#include "test/register_state_check.h"
#include "test/util.h"
...
...
@@ -187,7 +188,7 @@ class ConvolveTest : public PARAMS(int, int, const ConvolveFunctions*) {
protected:
static
const
int
kDataAlignment
=
16
;
static
const
int
kOuterBlockSize
=
128
;
static
const
int
kOuterBlockSize
=
256
;
static
const
int
kInputStride
=
kOuterBlockSize
;
static
const
int
kOutputStride
=
kOuterBlockSize
;
static
const
int
kMaxDimension
=
64
;
...
...
@@ -224,6 +225,10 @@ class ConvolveTest : public PARAMS(int, int, const ConvolveFunctions*) {
input_
[
i
]
=
prng
.
Rand8Extremes
();
}
void
SetConstantInput
(
int
value
)
{
memset
(
input_
,
value
,
kInputBufferSize
);
}
void
CheckGuardBlocks
()
{
for
(
int
i
=
0
;
i
<
kOutputBufferSize
;
++
i
)
{
if
(
IsIndexInBorder
(
i
))
...
...
@@ -543,6 +548,35 @@ TEST_P(ConvolveTest, ChangeFilterWorks) {
}
}
/* This test exercises that enough rows and columns are filtered with every
possible initial fractional positions and scaling steps. */
TEST_P
(
ConvolveTest
,
CheckScalingFiltering
)
{
uint8_t
*
const
in
=
input
();
uint8_t
*
const
out
=
output
();
SetConstantInput
(
127
);
for
(
int
frac
=
0
;
frac
<
16
;
++
frac
)
{
for
(
int
step
=
1
;
step
<=
32
;
++
step
)
{
/* Test the horizontal and vertical filters in combination. */
REGISTER_STATE_CHECK
(
UUT_
->
hv8_
(
in
,
kInputStride
,
out
,
kOutputStride
,
vp9_sub_pel_filters_8
[
frac
],
step
,
vp9_sub_pel_filters_8
[
frac
],
step
,
Width
(),
Height
()));
CheckGuardBlocks
();
for
(
int
y
=
0
;
y
<
Height
();
++
y
)
{
for
(
int
x
=
0
;
x
<
Width
();
++
x
)
{
ASSERT_EQ
(
in
[
y
*
kInputStride
+
x
],
out
[
y
*
kOutputStride
+
x
])
<<
"x == "
<<
x
<<
", y == "
<<
y
<<
", frac == "
<<
frac
<<
", step == "
<<
step
;
}
}
}
}
}
using
std
::
tr1
::
make_tuple
;
const
ConvolveFunctions
convolve8_c
(
...
...
vp9/common/vp9_convolve.c
View file @
1cf22723
...
...
@@ -195,7 +195,7 @@ static void convolve_c(const uint8_t *src, ptrdiff_t src_stride,
* h == 64, taps == 8.
*/
uint8_t
temp
[
64
*
135
];
int
intermediate_height
=
MAX
(((
h
*
y_step_q4
)
>>
4
),
1
)
+
taps
-
1
;
int
intermediate_height
=
(((
h
-
1
)
*
y_step_q4
+
15
)
>>
4
)
+
taps
;
assert
(
w
<=
64
);
assert
(
h
<=
64
);
...
...
@@ -203,9 +203,6 @@ static void convolve_c(const uint8_t *src, ptrdiff_t src_stride,
assert
(
y_step_q4
<=
32
);
assert
(
x_step_q4
<=
32
);
if
(
intermediate_height
<
h
)
intermediate_height
=
h
;
convolve_horiz_c
(
src
-
src_stride
*
(
taps
/
2
-
1
),
src_stride
,
temp
,
64
,
filter_x
,
x_step_q4
,
filter_y
,
y_step_q4
,
w
,
intermediate_height
,
taps
);
...
...
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