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
be029580
Commit
be029580
authored
Jul 14, 2016
by
Urvang Joshi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix warnings reported by -Wshadow: Part3: test/ directory
Change-Id: I6fbe203d37010e47f198215f499c3fa1043fd042
parent
72d3ba8a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
20 deletions
+19
-20
test/av1_inv_txfm_test.cc
test/av1_inv_txfm_test.cc
+4
-5
test/convolve_test.cc
test/convolve_test.cc
+9
-8
test/lpf_8_test.cc
test/lpf_8_test.cc
+2
-2
test/partial_idct_test.cc
test/partial_idct_test.cc
+4
-5
No files found.
test/av1_inv_txfm_test.cc
View file @
be029580
...
...
@@ -139,7 +139,6 @@ class AV1PartialIDctTest
};
TEST_P
(
AV1PartialIDctTest
,
RunQuantCheck
)
{
ACMRandom
rnd
(
ACMRandom
::
DeterministicSeed
());
int
size
;
switch
(
tx_size_
)
{
case
TX_4X4
:
size
=
4
;
break
;
...
...
@@ -160,7 +159,7 @@ TEST_P(AV1PartialIDctTest, RunQuantCheck) {
DECLARE_ALIGNED
(
16
,
tran_low_t
,
output_ref_block
[
kMaxNumCoeffs
]);
int
max_error
=
0
;
for
(
int
i
=
0
;
i
<
count_test_block
;
++
i
)
{
for
(
int
m
=
0
;
m
<
count_test_block
;
++
m
)
{
// clear out destination buffer
memset
(
dst1
,
0
,
sizeof
(
*
dst1
)
*
block_size
);
memset
(
dst2
,
0
,
sizeof
(
*
dst2
)
*
block_size
);
...
...
@@ -169,11 +168,11 @@ TEST_P(AV1PartialIDctTest, RunQuantCheck) {
ACMRandom
rnd
(
ACMRandom
::
DeterministicSeed
());
for
(
int
i
=
0
;
i
<
count_test_block
;
++
i
)
{
for
(
int
n
=
0
;
n
<
count_test_block
;
++
n
)
{
// Initialize a test block with input range [-255, 255].
if
(
i
==
0
)
{
if
(
n
==
0
)
{
for
(
int
j
=
0
;
j
<
block_size
;
++
j
)
input_extreme_block
[
j
]
=
255
;
}
else
if
(
i
==
1
)
{
}
else
if
(
n
==
1
)
{
for
(
int
j
=
0
;
j
<
block_size
;
++
j
)
input_extreme_block
[
j
]
=
-
255
;
}
else
{
for
(
int
j
=
0
;
j
<
block_size
;
++
j
)
{
...
...
test/convolve_test.cc
View file @
be029580
...
...
@@ -220,23 +220,24 @@ void highbd_filter_block2d_8_c(const uint16_t *src_ptr,
// Vertical pass (transposed intermediate -> dst).
{
uint16_t
*
src
_ptr
=
intermediate_buffer
;
const
uint16_t
*
interm
_ptr
=
intermediate_buffer
;
const
int
dst_next_row_stride
=
dst_stride
-
output_width
;
unsigned
int
i
,
j
;
for
(
i
=
0
;
i
<
output_height
;
++
i
)
{
for
(
j
=
0
;
j
<
output_width
;
++
j
)
{
// Apply filter...
const
int
temp
=
(
src_ptr
[
0
]
*
VFilter
[
0
])
+
(
src_ptr
[
1
]
*
VFilter
[
1
])
+
(
src_ptr
[
2
]
*
VFilter
[
2
])
+
(
src_ptr
[
3
]
*
VFilter
[
3
])
+
(
src_ptr
[
4
]
*
VFilter
[
4
])
+
(
src_ptr
[
5
]
*
VFilter
[
5
])
+
(
src_ptr
[
6
]
*
VFilter
[
6
])
+
(
src_ptr
[
7
]
*
VFilter
[
7
])
+
(
AV1_FILTER_WEIGHT
>>
1
);
// Rounding
const
int
temp
=
(
interm_ptr
[
0
]
*
VFilter
[
0
])
+
(
interm_ptr
[
1
]
*
VFilter
[
1
])
+
(
interm_ptr
[
2
]
*
VFilter
[
2
])
+
(
interm_ptr
[
3
]
*
VFilter
[
3
])
+
(
interm_ptr
[
4
]
*
VFilter
[
4
])
+
(
interm_ptr
[
5
]
*
VFilter
[
5
])
+
(
interm_ptr
[
6
]
*
VFilter
[
6
])
+
(
interm_ptr
[
7
]
*
VFilter
[
7
])
+
(
AV1_FILTER_WEIGHT
>>
1
);
// Rounding
// Normalize back to 0-255...
*
dst_ptr
++
=
clip_pixel_highbd
(
temp
>>
AV1_FILTER_SHIFT
,
bd
);
src
_ptr
+=
intermediate_height
;
interm
_ptr
+=
intermediate_height
;
}
src
_ptr
+=
intermediate_next_stride
;
interm
_ptr
+=
intermediate_next_stride
;
dst_ptr
+=
dst_next_row_stride
;
}
}
...
...
test/lpf_8_test.cc
View file @
be029580
...
...
@@ -260,7 +260,7 @@ TEST_P(Loop8Test6Param, OperationCheck) {
loopfilter_op_
(
s
+
8
+
p
*
8
,
p
,
blimit
,
limit
,
thresh
,
count_
));
#endif // CONFIG_AOM_HIGHBITDEPTH
for
(
int
j
=
0
;
j
<
kNumCoeffs
;
++
j
)
{
for
(
j
=
0
;
j
<
kNumCoeffs
;
++
j
)
{
err_count
+=
ref_s
[
j
]
!=
s
[
j
];
}
if
(
err_count
&&
!
err_count_total
)
{
...
...
@@ -424,7 +424,7 @@ TEST_P(Loop8Test9Param, OperationCheck) {
ASM_REGISTER_STATE_CHECK
(
loopfilter_op_
(
s
+
8
+
p
*
8
,
p
,
blimit0
,
limit0
,
thresh0
,
blimit1
,
limit1
,
thresh1
));
#endif // CONFIG_AOM_HIGHBITDEPTH
for
(
int
j
=
0
;
j
<
kNumCoeffs
;
++
j
)
{
for
(
j
=
0
;
j
<
kNumCoeffs
;
++
j
)
{
err_count
+=
ref_s
[
j
]
!=
s
[
j
];
}
if
(
err_count
&&
!
err_count_total
)
{
...
...
test/partial_idct_test.cc
View file @
be029580
...
...
@@ -55,7 +55,6 @@ class PartialIDctTest : public ::testing::TestWithParam<PartialInvTxfmParam> {
};
TEST_P
(
PartialIDctTest
,
RunQuantCheck
)
{
ACMRandom
rnd
(
ACMRandom
::
DeterministicSeed
());
int
size
;
switch
(
tx_size_
)
{
case
TX_4X4
:
size
=
4
;
break
;
...
...
@@ -76,7 +75,7 @@ TEST_P(PartialIDctTest, RunQuantCheck) {
DECLARE_ALIGNED
(
16
,
tran_low_t
,
output_ref_block
[
kMaxNumCoeffs
]);
int
max_error
=
0
;
for
(
int
i
=
0
;
i
<
count_test_block
;
++
i
)
{
for
(
int
m
=
0
;
m
<
count_test_block
;
++
m
)
{
// clear out destination buffer
memset
(
dst1
,
0
,
sizeof
(
*
dst1
)
*
block_size
);
memset
(
dst2
,
0
,
sizeof
(
*
dst2
)
*
block_size
);
...
...
@@ -85,11 +84,11 @@ TEST_P(PartialIDctTest, RunQuantCheck) {
ACMRandom
rnd
(
ACMRandom
::
DeterministicSeed
());
for
(
int
i
=
0
;
i
<
count_test_block
;
++
i
)
{
for
(
int
n
=
0
;
n
<
count_test_block
;
++
n
)
{
// Initialize a test block with input range [-255, 255].
if
(
i
==
0
)
{
if
(
n
==
0
)
{
for
(
int
j
=
0
;
j
<
block_size
;
++
j
)
input_extreme_block
[
j
]
=
255
;
}
else
if
(
i
==
1
)
{
}
else
if
(
n
==
1
)
{
for
(
int
j
=
0
;
j
<
block_size
;
++
j
)
input_extreme_block
[
j
]
=
-
255
;
}
else
{
for
(
int
j
=
0
;
j
<
block_size
;
++
j
)
{
...
...
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