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
34c4e1d6
Commit
34c4e1d6
authored
Jul 22, 2015
by
Scott LaVarnway
Committed by
Gerrit Code Review
Jul 22, 2015
Browse files
Options
Browse Files
Download
Plain Diff
Merge "Delete ChangeFilterWorks test"
parents
0fe589f2
1ec0853d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
110 deletions
+0
-110
test/convolve_test.cc
test/convolve_test.cc
+0
-110
No files found.
test/convolve_test.cc
View file @
34c4e1d6
...
...
@@ -902,116 +902,6 @@ TEST_P(ConvolveTest, FilterExtremes) {
}
}
DECLARE_ALIGNED
(
256
,
const
int16_t
,
kChangeFilters
[
16
][
8
])
=
{
{
0
,
0
,
0
,
0
,
0
,
0
,
0
,
128
},
{
0
,
0
,
0
,
0
,
0
,
0
,
128
},
{
0
,
0
,
0
,
0
,
0
,
128
},
{
0
,
0
,
0
,
0
,
128
},
{
0
,
0
,
0
,
128
},
{
0
,
0
,
128
},
{
0
,
128
},
{
128
},
{
0
,
0
,
0
,
0
,
0
,
0
,
0
,
128
},
{
0
,
0
,
0
,
0
,
0
,
0
,
128
},
{
0
,
0
,
0
,
0
,
0
,
128
},
{
0
,
0
,
0
,
0
,
128
},
{
0
,
0
,
0
,
128
},
{
0
,
0
,
128
},
{
0
,
128
},
{
128
}
};
/* This test exercises the horizontal and vertical filter functions. */
TEST_P
(
ConvolveTest
,
ChangeFilterWorks
)
{
uint8_t
*
const
in
=
input
();
uint8_t
*
const
out
=
output
();
/* Assume that the first input sample is at the 8/16th position. */
const
int
kInitialSubPelOffset
=
8
;
/* Filters are 8-tap, so the first filter tap will be applied to the pixel
* at position -3 with respect to the current filtering position. Since
* kInitialSubPelOffset is set to 8, we first select sub-pixel filter 8,
* which is non-zero only in the last tap. So, applying the filter at the
* current input position will result in an output equal to the pixel at
* offset +4 (-3 + 7) with respect to the current filtering position.
*/
const
int
kPixelSelected
=
4
;
/* Assume that each output pixel requires us to step on by 17/16th pixels in
* the input.
*/
const
int
kInputPixelStep
=
17
;
/* The filters are setup in such a way that the expected output produces
* sets of 8 identical output samples. As the filter position moves to the
* next 1/16th pixel position the only active (=128) filter tap moves one
* position to the left, resulting in the same input pixel being replicated
* in to the output for 8 consecutive samples. After each set of 8 positions
* the filters select a different input pixel. kFilterPeriodAdjust below
* computes which input pixel is written to the output for a specified
* x or y position.
*/
/* Test the horizontal filter. */
ASM_REGISTER_STATE_CHECK
(
UUT_
->
h8_
(
in
,
kInputStride
,
out
,
kOutputStride
,
kChangeFilters
[
kInitialSubPelOffset
],
kInputPixelStep
,
NULL
,
0
,
Width
(),
Height
()));
for
(
int
x
=
0
;
x
<
Width
();
++
x
)
{
const
int
kFilterPeriodAdjust
=
(
x
>>
3
)
<<
3
;
const
int
ref_x
=
kPixelSelected
+
((
kInitialSubPelOffset
+
kFilterPeriodAdjust
*
kInputPixelStep
)
>>
SUBPEL_BITS
);
ASSERT_EQ
(
lookup
(
in
,
ref_x
),
lookup
(
out
,
x
))
<<
"x == "
<<
x
<<
"width = "
<<
Width
();
}
/* Test the vertical filter. */
ASM_REGISTER_STATE_CHECK
(
UUT_
->
v8_
(
in
,
kInputStride
,
out
,
kOutputStride
,
NULL
,
0
,
kChangeFilters
[
kInitialSubPelOffset
],
kInputPixelStep
,
Width
(),
Height
()));
for
(
int
y
=
0
;
y
<
Height
();
++
y
)
{
const
int
kFilterPeriodAdjust
=
(
y
>>
3
)
<<
3
;
const
int
ref_y
=
kPixelSelected
+
((
kInitialSubPelOffset
+
kFilterPeriodAdjust
*
kInputPixelStep
)
>>
SUBPEL_BITS
);
ASSERT_EQ
(
lookup
(
in
,
ref_y
*
kInputStride
),
lookup
(
out
,
y
*
kInputStride
))
<<
"y == "
<<
y
;
}
/* Test the horizontal and vertical filters in combination. */
ASM_REGISTER_STATE_CHECK
(
UUT_
->
hv8_
(
in
,
kInputStride
,
out
,
kOutputStride
,
kChangeFilters
[
kInitialSubPelOffset
],
kInputPixelStep
,
kChangeFilters
[
kInitialSubPelOffset
],
kInputPixelStep
,
Width
(),
Height
()));
for
(
int
y
=
0
;
y
<
Height
();
++
y
)
{
const
int
kFilterPeriodAdjustY
=
(
y
>>
3
)
<<
3
;
const
int
ref_y
=
kPixelSelected
+
((
kInitialSubPelOffset
+
kFilterPeriodAdjustY
*
kInputPixelStep
)
>>
SUBPEL_BITS
);
for
(
int
x
=
0
;
x
<
Width
();
++
x
)
{
const
int
kFilterPeriodAdjustX
=
(
x
>>
3
)
<<
3
;
const
int
ref_x
=
kPixelSelected
+
((
kInitialSubPelOffset
+
kFilterPeriodAdjustX
*
kInputPixelStep
)
>>
SUBPEL_BITS
);
ASSERT_EQ
(
lookup
(
in
,
ref_y
*
kInputStride
+
ref_x
),
lookup
(
out
,
y
*
kOutputStride
+
x
))
<<
"x == "
<<
x
<<
", y == "
<<
y
;
}
}
}
/* This test exercises that enough rows and columns are filtered with every
possible initial fractional positions and scaling steps. */
TEST_P
(
ConvolveTest
,
CheckScalingFiltering
)
{
...
...
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