Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Xiph.Org
aom-rav1e
Commits
c00e9c47
Commit
c00e9c47
authored
Jul 10, 2014
by
James Zern
Committed by
Gerrit Code Review
Jul 10, 2014
Browse files
Options
Browse Files
Download
Plain Diff
Merge changes Ie241772d,I3c72e226
* changes: tests: add API_REGISTER_STATE_CHECK call vp[89]_clear_system_state after longjmp
parents
32655853
29e1b1a4
Changes
20
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
163 additions
and
106 deletions
+163
-106
test/convolve_test.cc
test/convolve_test.cc
+26
-25
test/dct16x16_test.cc
test/dct16x16_test.cc
+8
-8
test/dct32x32_test.cc
test/dct32x32_test.cc
+6
-5
test/decode_test_driver.cc
test/decode_test_driver.cc
+1
-1
test/encode_test_driver.cc
test/encode_test_driver.cc
+1
-1
test/fdct4x4_test.cc
test/fdct4x4_test.cc
+7
-7
test/fdct8x8_test.cc
test/fdct8x8_test.cc
+7
-7
test/idct_test.cc
test/idct_test.cc
+4
-4
test/intrapred_test.cc
test/intrapred_test.cc
+4
-4
test/partial_idct_test.cc
test/partial_idct_test.cc
+4
-4
test/pp_filter_test.cc
test/pp_filter_test.cc
+3
-2
test/register_state_check.h
test/register_state_check.h
+65
-19
test/sad_test.cc
test/sad_test.cc
+8
-8
test/sixtap_predict_test.cc
test/sixtap_predict_test.cc
+4
-3
test/subtract_test.cc
test/subtract_test.cc
+1
-1
test/variance_test.cc
test/variance_test.cc
+10
-7
vp8/decoder/onyxd_if.c
vp8/decoder/onyxd_if.c
+1
-0
vp8/encoder/onyx_if.c
vp8/encoder/onyx_if.c
+1
-0
vp8/vp8_dx_iface.c
vp8/vp8_dx_iface.c
+1
-0
vp9/decoder/vp9_decoder.c
vp9/decoder/vp9_decoder.c
+1
-0
No files found.
test/convolve_test.cc
View file @
c00e9c47
...
@@ -264,7 +264,7 @@ TEST_P(ConvolveTest, CopyHoriz) {
...
@@ -264,7 +264,7 @@ TEST_P(ConvolveTest, CopyHoriz) {
uint8_t
*
const
out
=
output
();
uint8_t
*
const
out
=
output
();
DECLARE_ALIGNED
(
256
,
const
int16_t
,
filter8
[
8
])
=
{
0
,
0
,
0
,
128
,
0
,
0
,
0
,
0
};
DECLARE_ALIGNED
(
256
,
const
int16_t
,
filter8
[
8
])
=
{
0
,
0
,
0
,
128
,
0
,
0
,
0
,
0
};
REGISTER_STATE_CHECK
(
ASM_
REGISTER_STATE_CHECK
(
UUT_
->
h8_
(
in
,
kInputStride
,
out
,
kOutputStride
,
filter8
,
16
,
filter8
,
16
,
UUT_
->
h8_
(
in
,
kInputStride
,
out
,
kOutputStride
,
filter8
,
16
,
filter8
,
16
,
Width
(),
Height
()));
Width
(),
Height
()));
...
@@ -281,7 +281,7 @@ TEST_P(ConvolveTest, CopyVert) {
...
@@ -281,7 +281,7 @@ TEST_P(ConvolveTest, CopyVert) {
uint8_t
*
const
out
=
output
();
uint8_t
*
const
out
=
output
();
DECLARE_ALIGNED
(
256
,
const
int16_t
,
filter8
[
8
])
=
{
0
,
0
,
0
,
128
,
0
,
0
,
0
,
0
};
DECLARE_ALIGNED
(
256
,
const
int16_t
,
filter8
[
8
])
=
{
0
,
0
,
0
,
128
,
0
,
0
,
0
,
0
};
REGISTER_STATE_CHECK
(
ASM_
REGISTER_STATE_CHECK
(
UUT_
->
v8_
(
in
,
kInputStride
,
out
,
kOutputStride
,
filter8
,
16
,
filter8
,
16
,
UUT_
->
v8_
(
in
,
kInputStride
,
out
,
kOutputStride
,
filter8
,
16
,
filter8
,
16
,
Width
(),
Height
()));
Width
(),
Height
()));
...
@@ -298,7 +298,7 @@ TEST_P(ConvolveTest, Copy2D) {
...
@@ -298,7 +298,7 @@ TEST_P(ConvolveTest, Copy2D) {
uint8_t
*
const
out
=
output
();
uint8_t
*
const
out
=
output
();
DECLARE_ALIGNED
(
256
,
const
int16_t
,
filter8
[
8
])
=
{
0
,
0
,
0
,
128
,
0
,
0
,
0
,
0
};
DECLARE_ALIGNED
(
256
,
const
int16_t
,
filter8
[
8
])
=
{
0
,
0
,
0
,
128
,
0
,
0
,
0
,
0
};
REGISTER_STATE_CHECK
(
ASM_
REGISTER_STATE_CHECK
(
UUT_
->
hv8_
(
in
,
kInputStride
,
out
,
kOutputStride
,
filter8
,
16
,
filter8
,
16
,
UUT_
->
hv8_
(
in
,
kInputStride
,
out
,
kOutputStride
,
filter8
,
16
,
filter8
,
16
,
Width
(),
Height
()));
Width
(),
Height
()));
...
@@ -356,17 +356,17 @@ TEST_P(ConvolveTest, MatchesReferenceSubpixelFilter) {
...
@@ -356,17 +356,17 @@ TEST_P(ConvolveTest, MatchesReferenceSubpixelFilter) {
Width
(),
Height
());
Width
(),
Height
());
if
(
filters
==
eighttap_smooth
||
(
filter_x
&&
filter_y
))
if
(
filters
==
eighttap_smooth
||
(
filter_x
&&
filter_y
))
REGISTER_STATE_CHECK
(
ASM_
REGISTER_STATE_CHECK
(
UUT_
->
hv8_
(
in
,
kInputStride
,
out
,
kOutputStride
,
UUT_
->
hv8_
(
in
,
kInputStride
,
out
,
kOutputStride
,
filters
[
filter_x
],
16
,
filters
[
filter_y
],
16
,
filters
[
filter_x
],
16
,
filters
[
filter_y
],
16
,
Width
(),
Height
()));
Width
(),
Height
()));
else
if
(
filter_y
)
else
if
(
filter_y
)
REGISTER_STATE_CHECK
(
ASM_
REGISTER_STATE_CHECK
(
UUT_
->
v8_
(
in
,
kInputStride
,
out
,
kOutputStride
,
UUT_
->
v8_
(
in
,
kInputStride
,
out
,
kOutputStride
,
kInvalidFilter
,
16
,
filters
[
filter_y
],
16
,
kInvalidFilter
,
16
,
filters
[
filter_y
],
16
,
Width
(),
Height
()));
Width
(),
Height
()));
else
else
REGISTER_STATE_CHECK
(
ASM_
REGISTER_STATE_CHECK
(
UUT_
->
h8_
(
in
,
kInputStride
,
out
,
kOutputStride
,
UUT_
->
h8_
(
in
,
kInputStride
,
out
,
kOutputStride
,
filters
[
filter_x
],
16
,
kInvalidFilter
,
16
,
filters
[
filter_x
],
16
,
kInvalidFilter
,
16
,
Width
(),
Height
()));
Width
(),
Height
()));
...
@@ -414,17 +414,17 @@ TEST_P(ConvolveTest, MatchesReferenceAveragingSubpixelFilter) {
...
@@ -414,17 +414,17 @@ TEST_P(ConvolveTest, MatchesReferenceAveragingSubpixelFilter) {
Width
(),
Height
());
Width
(),
Height
());
if
(
filters
==
eighttap_smooth
||
(
filter_x
&&
filter_y
))
if
(
filters
==
eighttap_smooth
||
(
filter_x
&&
filter_y
))
REGISTER_STATE_CHECK
(
ASM_
REGISTER_STATE_CHECK
(
UUT_
->
hv8_avg_
(
in
,
kInputStride
,
out
,
kOutputStride
,
UUT_
->
hv8_avg_
(
in
,
kInputStride
,
out
,
kOutputStride
,
filters
[
filter_x
],
16
,
filters
[
filter_y
],
16
,
filters
[
filter_x
],
16
,
filters
[
filter_y
],
16
,
Width
(),
Height
()));
Width
(),
Height
()));
else
if
(
filter_y
)
else
if
(
filter_y
)
REGISTER_STATE_CHECK
(
ASM_
REGISTER_STATE_CHECK
(
UUT_
->
v8_avg_
(
in
,
kInputStride
,
out
,
kOutputStride
,
UUT_
->
v8_avg_
(
in
,
kInputStride
,
out
,
kOutputStride
,
filters
[
filter_x
],
16
,
filters
[
filter_y
],
16
,
filters
[
filter_x
],
16
,
filters
[
filter_y
],
16
,
Width
(),
Height
()));
Width
(),
Height
()));
else
else
REGISTER_STATE_CHECK
(
ASM_
REGISTER_STATE_CHECK
(
UUT_
->
h8_avg_
(
in
,
kInputStride
,
out
,
kOutputStride
,
UUT_
->
h8_avg_
(
in
,
kInputStride
,
out
,
kOutputStride
,
filters
[
filter_x
],
16
,
filters
[
filter_y
],
16
,
filters
[
filter_x
],
16
,
filters
[
filter_y
],
16
,
Width
(),
Height
()));
Width
(),
Height
()));
...
@@ -494,9 +494,10 @@ TEST_P(ConvolveTest, ChangeFilterWorks) {
...
@@ -494,9 +494,10 @@ TEST_P(ConvolveTest, ChangeFilterWorks) {
*/
*/
/* Test the horizontal filter. */
/* Test the horizontal filter. */
REGISTER_STATE_CHECK
(
UUT_
->
h8_
(
in
,
kInputStride
,
out
,
kOutputStride
,
ASM_REGISTER_STATE_CHECK
(
kChangeFilters
[
kInitialSubPelOffset
],
UUT_
->
h8_
(
in
,
kInputStride
,
out
,
kOutputStride
,
kInputPixelStep
,
NULL
,
0
,
Width
(),
Height
()));
kChangeFilters
[
kInitialSubPelOffset
],
kInputPixelStep
,
NULL
,
0
,
Width
(),
Height
()));
for
(
int
x
=
0
;
x
<
Width
();
++
x
)
{
for
(
int
x
=
0
;
x
<
Width
();
++
x
)
{
const
int
kFilterPeriodAdjust
=
(
x
>>
3
)
<<
3
;
const
int
kFilterPeriodAdjust
=
(
x
>>
3
)
<<
3
;
...
@@ -508,9 +509,10 @@ TEST_P(ConvolveTest, ChangeFilterWorks) {
...
@@ -508,9 +509,10 @@ TEST_P(ConvolveTest, ChangeFilterWorks) {
}
}
/* Test the vertical filter. */
/* Test the vertical filter. */
REGISTER_STATE_CHECK
(
UUT_
->
v8_
(
in
,
kInputStride
,
out
,
kOutputStride
,
ASM_REGISTER_STATE_CHECK
(
NULL
,
0
,
kChangeFilters
[
kInitialSubPelOffset
],
UUT_
->
v8_
(
in
,
kInputStride
,
out
,
kOutputStride
,
kInputPixelStep
,
Width
(),
Height
()));
NULL
,
0
,
kChangeFilters
[
kInitialSubPelOffset
],
kInputPixelStep
,
Width
(),
Height
()));
for
(
int
y
=
0
;
y
<
Height
();
++
y
)
{
for
(
int
y
=
0
;
y
<
Height
();
++
y
)
{
const
int
kFilterPeriodAdjust
=
(
y
>>
3
)
<<
3
;
const
int
kFilterPeriodAdjust
=
(
y
>>
3
)
<<
3
;
...
@@ -522,12 +524,11 @@ TEST_P(ConvolveTest, ChangeFilterWorks) {
...
@@ -522,12 +524,11 @@ TEST_P(ConvolveTest, ChangeFilterWorks) {
}
}
/* Test the horizontal and vertical filters in combination. */
/* Test the horizontal and vertical filters in combination. */
REGISTER_STATE_CHECK
(
UUT_
->
hv8_
(
in
,
kInputStride
,
out
,
kOutputStride
,
ASM_REGISTER_STATE_CHECK
(
kChangeFilters
[
kInitialSubPelOffset
],
UUT_
->
hv8_
(
in
,
kInputStride
,
out
,
kOutputStride
,
kInputPixelStep
,
kChangeFilters
[
kInitialSubPelOffset
],
kInputPixelStep
,
kChangeFilters
[
kInitialSubPelOffset
],
kChangeFilters
[
kInitialSubPelOffset
],
kInputPixelStep
,
kInputPixelStep
,
Width
(),
Height
()));
Width
(),
Height
()));
for
(
int
y
=
0
;
y
<
Height
();
++
y
)
{
for
(
int
y
=
0
;
y
<
Height
();
++
y
)
{
const
int
kFilterPeriodAdjustY
=
(
y
>>
3
)
<<
3
;
const
int
kFilterPeriodAdjustY
=
(
y
>>
3
)
<<
3
;
...
@@ -560,10 +561,10 @@ TEST_P(ConvolveTest, CheckScalingFiltering) {
...
@@ -560,10 +561,10 @@ TEST_P(ConvolveTest, CheckScalingFiltering) {
for
(
int
frac
=
0
;
frac
<
16
;
++
frac
)
{
for
(
int
frac
=
0
;
frac
<
16
;
++
frac
)
{
for
(
int
step
=
1
;
step
<=
32
;
++
step
)
{
for
(
int
step
=
1
;
step
<=
32
;
++
step
)
{
/* Test the horizontal and vertical filters in combination. */
/* Test the horizontal and vertical filters in combination. */
REGISTER_STATE_CHECK
(
UUT_
->
hv8_
(
in
,
kInputStride
,
out
,
kOutputStride
,
ASM_
REGISTER_STATE_CHECK
(
UUT_
->
hv8_
(
in
,
kInputStride
,
out
,
kOutputStride
,
eighttap
[
frac
],
step
,
eighttap
[
frac
],
step
,
eighttap
[
frac
],
step
,
eighttap
[
frac
],
step
,
Width
(),
Height
()));
Width
(),
Height
()));
CheckGuardBlocks
();
CheckGuardBlocks
();
...
...
test/dct16x16_test.cc
View file @
c00e9c47
...
@@ -311,9 +311,9 @@ class Trans16x16TestBase {
...
@@ -311,9 +311,9 @@ class Trans16x16TestBase {
test_input_block
[
j
]
=
src
[
j
]
-
dst
[
j
];
test_input_block
[
j
]
=
src
[
j
]
-
dst
[
j
];
}
}
REGISTER_STATE_CHECK
(
RunFwdTxfm
(
test_input_block
,
ASM_
REGISTER_STATE_CHECK
(
RunFwdTxfm
(
test_input_block
,
test_temp_block
,
pitch_
));
test_temp_block
,
pitch_
));
REGISTER_STATE_CHECK
(
RunInvTxfm
(
test_temp_block
,
dst
,
pitch_
));
ASM_
REGISTER_STATE_CHECK
(
RunInvTxfm
(
test_temp_block
,
dst
,
pitch_
));
for
(
int
j
=
0
;
j
<
kNumCoeffs
;
++
j
)
{
for
(
int
j
=
0
;
j
<
kNumCoeffs
;
++
j
)
{
const
uint32_t
diff
=
dst
[
j
]
-
src
[
j
];
const
uint32_t
diff
=
dst
[
j
]
-
src
[
j
];
...
@@ -344,7 +344,7 @@ class Trans16x16TestBase {
...
@@ -344,7 +344,7 @@ class Trans16x16TestBase {
input_block
[
j
]
=
rnd
.
Rand8
()
-
rnd
.
Rand8
();
input_block
[
j
]
=
rnd
.
Rand8
()
-
rnd
.
Rand8
();
fwd_txfm_ref
(
input_block
,
output_ref_block
,
pitch_
,
tx_type_
);
fwd_txfm_ref
(
input_block
,
output_ref_block
,
pitch_
,
tx_type_
);
REGISTER_STATE_CHECK
(
RunFwdTxfm
(
input_block
,
output_block
,
pitch_
));
ASM_
REGISTER_STATE_CHECK
(
RunFwdTxfm
(
input_block
,
output_block
,
pitch_
));
// The minimum quant value is 4.
// The minimum quant value is 4.
for
(
int
j
=
0
;
j
<
kNumCoeffs
;
++
j
)
for
(
int
j
=
0
;
j
<
kNumCoeffs
;
++
j
)
...
@@ -375,8 +375,8 @@ class Trans16x16TestBase {
...
@@ -375,8 +375,8 @@ class Trans16x16TestBase {
}
}
fwd_txfm_ref
(
input_extreme_block
,
output_ref_block
,
pitch_
,
tx_type_
);
fwd_txfm_ref
(
input_extreme_block
,
output_ref_block
,
pitch_
,
tx_type_
);
REGISTER_STATE_CHECK
(
RunFwdTxfm
(
input_extreme_block
,
ASM_
REGISTER_STATE_CHECK
(
RunFwdTxfm
(
input_extreme_block
,
output_block
,
pitch_
));
output_block
,
pitch_
));
// The minimum quant value is 4.
// The minimum quant value is 4.
for
(
int
j
=
0
;
j
<
kNumCoeffs
;
++
j
)
{
for
(
int
j
=
0
;
j
<
kNumCoeffs
;
++
j
)
{
...
@@ -421,7 +421,7 @@ class Trans16x16TestBase {
...
@@ -421,7 +421,7 @@ class Trans16x16TestBase {
for
(
int
j
=
1
;
j
<
kNumCoeffs
;
++
j
)
for
(
int
j
=
1
;
j
<
kNumCoeffs
;
++
j
)
output_ref_block
[
j
]
=
(
output_ref_block
[
j
]
/
ac_thred
)
*
ac_thred
;
output_ref_block
[
j
]
=
(
output_ref_block
[
j
]
/
ac_thred
)
*
ac_thred
;
inv_txfm_ref
(
output_ref_block
,
ref
,
pitch_
,
tx_type_
);
inv_txfm_ref
(
output_ref_block
,
ref
,
pitch_
,
tx_type_
);
REGISTER_STATE_CHECK
(
RunInvTxfm
(
output_ref_block
,
dst
,
pitch_
));
ASM_
REGISTER_STATE_CHECK
(
RunInvTxfm
(
output_ref_block
,
dst
,
pitch_
));
for
(
int
j
=
0
;
j
<
kNumCoeffs
;
++
j
)
for
(
int
j
=
0
;
j
<
kNumCoeffs
;
++
j
)
EXPECT_EQ
(
ref
[
j
],
dst
[
j
]);
EXPECT_EQ
(
ref
[
j
],
dst
[
j
]);
...
@@ -450,7 +450,7 @@ class Trans16x16TestBase {
...
@@ -450,7 +450,7 @@ class Trans16x16TestBase {
for
(
int
j
=
0
;
j
<
kNumCoeffs
;
++
j
)
for
(
int
j
=
0
;
j
<
kNumCoeffs
;
++
j
)
coeff
[
j
]
=
round
(
out_r
[
j
]);
coeff
[
j
]
=
round
(
out_r
[
j
]);
REGISTER_STATE_CHECK
(
RunInvTxfm
(
coeff
,
dst
,
16
));
ASM_
REGISTER_STATE_CHECK
(
RunInvTxfm
(
coeff
,
dst
,
16
));
for
(
int
j
=
0
;
j
<
kNumCoeffs
;
++
j
)
{
for
(
int
j
=
0
;
j
<
kNumCoeffs
;
++
j
)
{
const
uint32_t
diff
=
dst
[
j
]
-
src
[
j
];
const
uint32_t
diff
=
dst
[
j
]
-
src
[
j
];
...
...
test/dct32x32_test.cc
View file @
c00e9c47
...
@@ -112,8 +112,8 @@ TEST_P(Trans32x32Test, AccuracyCheck) {
...
@@ -112,8 +112,8 @@ TEST_P(Trans32x32Test, AccuracyCheck) {
test_input_block
[
j
]
=
src
[
j
]
-
dst
[
j
];
test_input_block
[
j
]
=
src
[
j
]
-
dst
[
j
];
}
}
REGISTER_STATE_CHECK
(
fwd_txfm_
(
test_input_block
,
test_temp_block
,
32
));
ASM_
REGISTER_STATE_CHECK
(
fwd_txfm_
(
test_input_block
,
test_temp_block
,
32
));
REGISTER_STATE_CHECK
(
inv_txfm_
(
test_temp_block
,
dst
,
32
));
ASM_
REGISTER_STATE_CHECK
(
inv_txfm_
(
test_temp_block
,
dst
,
32
));
for
(
int
j
=
0
;
j
<
kNumCoeffs
;
++
j
)
{
for
(
int
j
=
0
;
j
<
kNumCoeffs
;
++
j
)
{
const
uint32_t
diff
=
dst
[
j
]
-
src
[
j
];
const
uint32_t
diff
=
dst
[
j
]
-
src
[
j
];
...
@@ -150,7 +150,7 @@ TEST_P(Trans32x32Test, CoeffCheck) {
...
@@ -150,7 +150,7 @@ TEST_P(Trans32x32Test, CoeffCheck) {
const
int
stride
=
32
;
const
int
stride
=
32
;
vp9_fdct32x32_c
(
input_block
,
output_ref_block
,
stride
);
vp9_fdct32x32_c
(
input_block
,
output_ref_block
,
stride
);
REGISTER_STATE_CHECK
(
fwd_txfm_
(
input_block
,
output_block
,
stride
));
ASM_
REGISTER_STATE_CHECK
(
fwd_txfm_
(
input_block
,
output_block
,
stride
));
if
(
version_
==
0
)
{
if
(
version_
==
0
)
{
for
(
int
j
=
0
;
j
<
kNumCoeffs
;
++
j
)
for
(
int
j
=
0
;
j
<
kNumCoeffs
;
++
j
)
...
@@ -189,7 +189,8 @@ TEST_P(Trans32x32Test, MemCheck) {
...
@@ -189,7 +189,8 @@ TEST_P(Trans32x32Test, MemCheck) {
const
int
stride
=
32
;
const
int
stride
=
32
;
vp9_fdct32x32_c
(
input_extreme_block
,
output_ref_block
,
stride
);
vp9_fdct32x32_c
(
input_extreme_block
,
output_ref_block
,
stride
);
REGISTER_STATE_CHECK
(
fwd_txfm_
(
input_extreme_block
,
output_block
,
stride
));
ASM_REGISTER_STATE_CHECK
(
fwd_txfm_
(
input_extreme_block
,
output_block
,
stride
));
// The minimum quant value is 4.
// The minimum quant value is 4.
for
(
int
j
=
0
;
j
<
kNumCoeffs
;
++
j
)
{
for
(
int
j
=
0
;
j
<
kNumCoeffs
;
++
j
)
{
...
@@ -230,7 +231,7 @@ TEST_P(Trans32x32Test, InverseAccuracy) {
...
@@ -230,7 +231,7 @@ TEST_P(Trans32x32Test, InverseAccuracy) {
reference_32x32_dct_2d
(
in
,
out_r
);
reference_32x32_dct_2d
(
in
,
out_r
);
for
(
int
j
=
0
;
j
<
kNumCoeffs
;
++
j
)
for
(
int
j
=
0
;
j
<
kNumCoeffs
;
++
j
)
coeff
[
j
]
=
round
(
out_r
[
j
]);
coeff
[
j
]
=
round
(
out_r
[
j
]);
REGISTER_STATE_CHECK
(
inv_txfm_
(
coeff
,
dst
,
32
));
ASM_
REGISTER_STATE_CHECK
(
inv_txfm_
(
coeff
,
dst
,
32
));
for
(
int
j
=
0
;
j
<
kNumCoeffs
;
++
j
)
{
for
(
int
j
=
0
;
j
<
kNumCoeffs
;
++
j
)
{
const
int
diff
=
dst
[
j
]
-
src
[
j
];
const
int
diff
=
dst
[
j
]
-
src
[
j
];
const
int
error
=
diff
*
diff
;
const
int
error
=
diff
*
diff
;
...
...
test/decode_test_driver.cc
View file @
c00e9c47
...
@@ -32,7 +32,7 @@ vpx_codec_err_t Decoder::DecodeFrame(const uint8_t *cxdata, size_t size,
...
@@ -32,7 +32,7 @@ vpx_codec_err_t Decoder::DecodeFrame(const uint8_t *cxdata, size_t size,
void
*
user_priv
)
{
void
*
user_priv
)
{
vpx_codec_err_t
res_dec
;
vpx_codec_err_t
res_dec
;
InitOnce
();
InitOnce
();
REGISTER_STATE_CHECK
(
API_
REGISTER_STATE_CHECK
(
res_dec
=
vpx_codec_decode
(
&
decoder_
,
res_dec
=
vpx_codec_decode
(
&
decoder_
,
cxdata
,
static_cast
<
unsigned
int
>
(
size
),
cxdata
,
static_cast
<
unsigned
int
>
(
size
),
user_priv
,
0
));
user_priv
,
0
));
...
...
test/encode_test_driver.cc
View file @
c00e9c47
...
@@ -59,7 +59,7 @@ void Encoder::EncodeFrameInternal(const VideoSource &video,
...
@@ -59,7 +59,7 @@ void Encoder::EncodeFrameInternal(const VideoSource &video,
}
}
// Encode the frame
// Encode the frame
REGISTER_STATE_CHECK
(
API_
REGISTER_STATE_CHECK
(
res
=
vpx_codec_encode
(
&
encoder_
,
res
=
vpx_codec_encode
(
&
encoder_
,
video
.
img
(),
video
.
pts
(),
video
.
duration
(),
video
.
img
(),
video
.
pts
(),
video
.
duration
(),
frame_flags
,
deadline_
));
frame_flags
,
deadline_
));
...
...
test/fdct4x4_test.cc
View file @
c00e9c47
...
@@ -79,9 +79,9 @@ class Trans4x4TestBase {
...
@@ -79,9 +79,9 @@ class Trans4x4TestBase {
test_input_block
[
j
]
=
src
[
j
]
-
dst
[
j
];
test_input_block
[
j
]
=
src
[
j
]
-
dst
[
j
];
}
}
REGISTER_STATE_CHECK
(
RunFwdTxfm
(
test_input_block
,
ASM_
REGISTER_STATE_CHECK
(
RunFwdTxfm
(
test_input_block
,
test_temp_block
,
pitch_
));
test_temp_block
,
pitch_
));
REGISTER_STATE_CHECK
(
RunInvTxfm
(
test_temp_block
,
dst
,
pitch_
));
ASM_
REGISTER_STATE_CHECK
(
RunInvTxfm
(
test_temp_block
,
dst
,
pitch_
));
for
(
int
j
=
0
;
j
<
kNumCoeffs
;
++
j
)
{
for
(
int
j
=
0
;
j
<
kNumCoeffs
;
++
j
)
{
const
uint32_t
diff
=
dst
[
j
]
-
src
[
j
];
const
uint32_t
diff
=
dst
[
j
]
-
src
[
j
];
...
@@ -114,7 +114,7 @@ class Trans4x4TestBase {
...
@@ -114,7 +114,7 @@ class Trans4x4TestBase {
input_block
[
j
]
=
rnd
.
Rand8
()
-
rnd
.
Rand8
();
input_block
[
j
]
=
rnd
.
Rand8
()
-
rnd
.
Rand8
();
fwd_txfm_ref
(
input_block
,
output_ref_block
,
pitch_
,
tx_type_
);
fwd_txfm_ref
(
input_block
,
output_ref_block
,
pitch_
,
tx_type_
);
REGISTER_STATE_CHECK
(
RunFwdTxfm
(
input_block
,
output_block
,
pitch_
));
ASM_
REGISTER_STATE_CHECK
(
RunFwdTxfm
(
input_block
,
output_block
,
pitch_
));
// The minimum quant value is 4.
// The minimum quant value is 4.
for
(
int
j
=
0
;
j
<
kNumCoeffs
;
++
j
)
for
(
int
j
=
0
;
j
<
kNumCoeffs
;
++
j
)
...
@@ -145,8 +145,8 @@ class Trans4x4TestBase {
...
@@ -145,8 +145,8 @@ class Trans4x4TestBase {
}
}
fwd_txfm_ref
(
input_extreme_block
,
output_ref_block
,
pitch_
,
tx_type_
);
fwd_txfm_ref
(
input_extreme_block
,
output_ref_block
,
pitch_
,
tx_type_
);
REGISTER_STATE_CHECK
(
RunFwdTxfm
(
input_extreme_block
,
ASM_
REGISTER_STATE_CHECK
(
RunFwdTxfm
(
input_extreme_block
,
output_block
,
pitch_
));
output_block
,
pitch_
));
// The minimum quant value is 4.
// The minimum quant value is 4.
for
(
int
j
=
0
;
j
<
kNumCoeffs
;
++
j
)
{
for
(
int
j
=
0
;
j
<
kNumCoeffs
;
++
j
)
{
...
@@ -175,7 +175,7 @@ class Trans4x4TestBase {
...
@@ -175,7 +175,7 @@ class Trans4x4TestBase {
fwd_txfm_ref
(
in
,
coeff
,
pitch_
,
tx_type_
);
fwd_txfm_ref
(
in
,
coeff
,
pitch_
,
tx_type_
);
REGISTER_STATE_CHECK
(
RunInvTxfm
(
coeff
,
dst
,
pitch_
));
ASM_
REGISTER_STATE_CHECK
(
RunInvTxfm
(
coeff
,
dst
,
pitch_
));
for
(
int
j
=
0
;
j
<
kNumCoeffs
;
++
j
)
{
for
(
int
j
=
0
;
j
<
kNumCoeffs
;
++
j
)
{
const
uint32_t
diff
=
dst
[
j
]
-
src
[
j
];
const
uint32_t
diff
=
dst
[
j
]
-
src
[
j
];
...
...
test/fdct8x8_test.cc
View file @
c00e9c47
...
@@ -68,7 +68,7 @@ class FwdTrans8x8TestBase {
...
@@ -68,7 +68,7 @@ class FwdTrans8x8TestBase {
// Initialize a test block with input range [-255, 255].
// Initialize a test block with input range [-255, 255].
for
(
int
j
=
0
;
j
<
64
;
++
j
)
for
(
int
j
=
0
;
j
<
64
;
++
j
)
test_input_block
[
j
]
=
rnd
.
Rand8
()
-
rnd
.
Rand8
();
test_input_block
[
j
]
=
rnd
.
Rand8
()
-
rnd
.
Rand8
();
REGISTER_STATE_CHECK
(
ASM_
REGISTER_STATE_CHECK
(
RunFwdTxfm
(
test_input_block
,
test_output_block
,
pitch_
));
RunFwdTxfm
(
test_input_block
,
test_output_block
,
pitch_
));
for
(
int
j
=
0
;
j
<
64
;
++
j
)
{
for
(
int
j
=
0
;
j
<
64
;
++
j
)
{
...
@@ -97,7 +97,7 @@ class FwdTrans8x8TestBase {
...
@@ -97,7 +97,7 @@ class FwdTrans8x8TestBase {
// Initialize a test block with input range [-15, 15].
// Initialize a test block with input range [-15, 15].
for
(
int
j
=
0
;
j
<
64
;
++
j
)
for
(
int
j
=
0
;
j
<
64
;
++
j
)
test_input_block
[
j
]
=
(
rnd
.
Rand8
()
>>
4
)
-
(
rnd
.
Rand8
()
>>
4
);
test_input_block
[
j
]
=
(
rnd
.
Rand8
()
>>
4
)
-
(
rnd
.
Rand8
()
>>
4
);
REGISTER_STATE_CHECK
(
ASM_
REGISTER_STATE_CHECK
(
RunFwdTxfm
(
test_input_block
,
test_output_block
,
pitch_
));
RunFwdTxfm
(
test_input_block
,
test_output_block
,
pitch_
));
for
(
int
j
=
0
;
j
<
64
;
++
j
)
{
for
(
int
j
=
0
;
j
<
64
;
++
j
)
{
...
@@ -139,7 +139,7 @@ class FwdTrans8x8TestBase {
...
@@ -139,7 +139,7 @@ class FwdTrans8x8TestBase {
test_input_block
[
j
]
=
src
[
j
]
-
dst
[
j
];
test_input_block
[
j
]
=
src
[
j
]
-
dst
[
j
];
}
}
REGISTER_STATE_CHECK
(
ASM_
REGISTER_STATE_CHECK
(
RunFwdTxfm
(
test_input_block
,
test_temp_block
,
pitch_
));
RunFwdTxfm
(
test_input_block
,
test_temp_block
,
pitch_
));
for
(
int
j
=
0
;
j
<
64
;
++
j
)
{
for
(
int
j
=
0
;
j
<
64
;
++
j
)
{
if
(
test_temp_block
[
j
]
>
0
)
{
if
(
test_temp_block
[
j
]
>
0
)
{
...
@@ -152,7 +152,7 @@ class FwdTrans8x8TestBase {
...
@@ -152,7 +152,7 @@ class FwdTrans8x8TestBase {
test_temp_block
[
j
]
*=
4
;
test_temp_block
[
j
]
*=
4
;
}
}
}
}
REGISTER_STATE_CHECK
(
ASM_
REGISTER_STATE_CHECK
(
RunInvTxfm
(
test_temp_block
,
dst
,
pitch_
));
RunInvTxfm
(
test_temp_block
,
dst
,
pitch_
));
for
(
int
j
=
0
;
j
<
64
;
++
j
)
{
for
(
int
j
=
0
;
j
<
64
;
++
j
)
{
...
@@ -202,11 +202,11 @@ class FwdTrans8x8TestBase {
...
@@ -202,11 +202,11 @@ class FwdTrans8x8TestBase {
test_input_block
[
j
]
=
src
[
j
]
-
dst
[
j
];
test_input_block
[
j
]
=
src
[
j
]
-
dst
[
j
];
}
}
REGISTER_STATE_CHECK
(
ASM_
REGISTER_STATE_CHECK
(
RunFwdTxfm
(
test_input_block
,
test_temp_block
,
pitch_
));
RunFwdTxfm
(
test_input_block
,
test_temp_block
,
pitch_
));
REGISTER_STATE_CHECK
(
ASM_
REGISTER_STATE_CHECK
(
fwd_txfm_ref
(
test_input_block
,
ref_temp_block
,
pitch_
,
tx_type_
));
fwd_txfm_ref
(
test_input_block
,
ref_temp_block
,
pitch_
,
tx_type_
));
REGISTER_STATE_CHECK
(
ASM_
REGISTER_STATE_CHECK
(
RunInvTxfm
(
test_temp_block
,
dst
,
pitch_
));
RunInvTxfm
(
test_temp_block
,
dst
,
pitch_
));
for
(
int
j
=
0
;
j
<
64
;
++
j
)
{
for
(
int
j
=
0
;
j
<
64
;
++
j
)
{
...
...
test/idct_test.cc
View file @
c00e9c47
...
@@ -52,7 +52,7 @@ TEST_P(IDCTTest, TestGuardBlocks) {
...
@@ -52,7 +52,7 @@ TEST_P(IDCTTest, TestGuardBlocks) {
TEST_P
(
IDCTTest
,
TestAllZeros
)
{
TEST_P
(
IDCTTest
,
TestAllZeros
)
{
int
i
;
int
i
;
REGISTER_STATE_CHECK
(
UUT
(
input
,
output
,
16
,
output
,
16
));
ASM_
REGISTER_STATE_CHECK
(
UUT
(
input
,
output
,
16
,
output
,
16
));
for
(
i
=
0
;
i
<
256
;
i
++
)
for
(
i
=
0
;
i
<
256
;
i
++
)
if
((
i
&
0xF
)
<
4
&&
i
<
64
)
if
((
i
&
0xF
)
<
4
&&
i
<
64
)
...
@@ -65,7 +65,7 @@ TEST_P(IDCTTest, TestAllOnes) {
...
@@ -65,7 +65,7 @@ TEST_P(IDCTTest, TestAllOnes) {
int
i
;
int
i
;
input
[
0
]
=
4
;
input
[
0
]
=
4
;
REGISTER_STATE_CHECK
(
UUT
(
input
,
output
,
16
,
output
,
16
));
ASM_
REGISTER_STATE_CHECK
(
UUT
(
input
,
output
,
16
,
output
,
16
));
for
(
i
=
0
;
i
<
256
;
i
++
)
for
(
i
=
0
;
i
<
256
;
i
++
)
if
((
i
&
0xF
)
<
4
&&
i
<
64
)
if
((
i
&
0xF
)
<
4
&&
i
<
64
)
...
@@ -79,7 +79,7 @@ TEST_P(IDCTTest, TestAddOne) {
...
@@ -79,7 +79,7 @@ TEST_P(IDCTTest, TestAddOne) {
for
(
i
=
0
;
i
<
256
;
i
++
)
predict
[
i
]
=
i
;
for
(
i
=
0
;
i
<
256
;
i
++
)
predict
[
i
]
=
i
;
input
[
0
]
=
4
;
input
[
0
]
=
4
;
REGISTER_STATE_CHECK
(
UUT
(
input
,
predict
,
16
,
output
,
16
));
ASM_
REGISTER_STATE_CHECK
(
UUT
(
input
,
predict
,
16
,
output
,
16
));
for
(
i
=
0
;
i
<
256
;
i
++
)
for
(
i
=
0
;
i
<
256
;
i
++
)
if
((
i
&
0xF
)
<
4
&&
i
<
64
)
if
((
i
&
0xF
)
<
4
&&
i
<
64
)
...
@@ -93,7 +93,7 @@ TEST_P(IDCTTest, TestWithData) {
...
@@ -93,7 +93,7 @@ TEST_P(IDCTTest, TestWithData) {
for
(
i
=
0
;
i
<
16
;
i
++
)
input
[
i
]
=
i
;
for
(
i
=
0
;
i
<
16
;
i
++
)
input
[
i
]
=
i
;
REGISTER_STATE_CHECK
(
UUT
(
input
,
output
,
16
,
output
,
16
));
ASM_
REGISTER_STATE_CHECK
(
UUT
(
input
,
output
,
16
,
output
,
16
));
for
(
i
=
0
;
i
<
256
;
i
++
)
for
(
i
=
0
;
i
<
256
;
i
++
)
if
((
i
&
0xF
)
>
3
||
i
>
63
)
if
((
i
&
0xF
)
>
3
||
i
>
63
)
...
...
test/intrapred_test.cc
View file @
c00e9c47
...
@@ -261,10 +261,10 @@ class IntraPredYTest
...
@@ -261,10 +261,10 @@ class IntraPredYTest
virtual
void
Predict
(
MB_PREDICTION_MODE
mode
)
{
virtual
void
Predict
(
MB_PREDICTION_MODE
mode
)
{
mbptr_
->
mode_info_context
->
mbmi
.
mode
=
mode
;
mbptr_
->
mode_info_context
->
mbmi
.
mode
=
mode
;
REGISTER_STATE_CHECK
(
pred_fn_
(
mbptr_
,
ASM_
REGISTER_STATE_CHECK
(
pred_fn_
(
mbptr_
,
data_ptr_
[
0
]
-
kStride
,
data_ptr_
[
0
]
-
kStride
,
data_ptr_
[
0
]
-
1
,
kStride
,
data_ptr_
[
0
]
-
1
,
kStride
,
data_ptr_
[
0
],
kStride
));
data_ptr_
[
0
],
kStride
));
}
}
intra_pred_y_fn_t
pred_fn_
;
intra_pred_y_fn_t
pred_fn_
;
...
...
test/partial_idct_test.cc
View file @
c00e9c47
...
@@ -118,8 +118,8 @@ TEST_P(PartialIDctTest, RunQuantCheck) {
...
@@ -118,8 +118,8 @@ TEST_P(PartialIDctTest, RunQuantCheck) {
=
(
output_ref_block
[
j
]
/
1828
)
*
1828
;
=
(
output_ref_block
[
j
]
/
1828
)
*
1828
;
}
}
REGISTER_STATE_CHECK
(
full_itxfm_
(
test_coef_block1
,
dst1
,
size
));
ASM_
REGISTER_STATE_CHECK
(
full_itxfm_
(
test_coef_block1
,
dst1
,
size
));
REGISTER_STATE_CHECK
(
partial_itxfm_
(
test_coef_block1
,
dst2
,
size
));
ASM_
REGISTER_STATE_CHECK
(
partial_itxfm_
(
test_coef_block1
,
dst2
,
size
));
for
(
int
j
=
0
;
j
<
block_size
;
++
j
)
{
for
(
int
j
=
0
;
j
<
block_size
;
++
j
)
{
const
int
diff
=
dst1
[
j
]
-
dst2
[
j
];
const
int
diff
=
dst1
[
j
]
-
dst2
[
j
];
...
@@ -182,8 +182,8 @@ TEST_P(PartialIDctTest, ResultsMatch) {
...
@@ -182,8 +182,8 @@ TEST_P(PartialIDctTest, ResultsMatch) {
memcpy
(
test_coef_block2
,
test_coef_block1
,
memcpy
(
test_coef_block2
,
test_coef_block1
,
sizeof
(
*
test_coef_block2
)
*
block_size
);
sizeof
(
*
test_coef_block2
)
*
block_size
);
REGISTER_STATE_CHECK
(
full_itxfm_
(
test_coef_block1
,
dst1
,
size
));
ASM_
REGISTER_STATE_CHECK
(
full_itxfm_
(
test_coef_block1
,
dst1
,
size
));
REGISTER_STATE_CHECK
(
partial_itxfm_
(
test_coef_block2
,
dst2
,
size
));
ASM_
REGISTER_STATE_CHECK
(
partial_itxfm_
(
test_coef_block2
,
dst2
,
size
));
for
(
int
j
=
0
;
j
<
block_size
;
++
j
)
{
for
(
int
j
=
0
;
j
<
block_size
;
++
j
)
{
const
int
diff
=
dst1
[
j
]
-
dst2
[
j
];
const
int
diff
=
dst1
[
j
]
-
dst2
[
j
];
...
...
test/pp_filter_test.cc
View file @
c00e9c47
...
@@ -80,8 +80,9 @@ TEST_P(VP8PostProcessingFilterTest, FilterOutputCheck) {
...
@@ -80,8 +80,9 @@ TEST_P(VP8PostProcessingFilterTest, FilterOutputCheck) {
// Initialize pixels in the output to 99.
// Initialize pixels in the output to 99.
(
void
)
vpx_memset
(
dst_image
,
99
,
output_size
);
(
void
)
vpx_memset
(
dst_image
,
99
,
output_size
);
REGISTER_STATE_CHECK
(
GetParam
()(
src_image_ptr
,
dst_image_ptr
,
input_stride
,
ASM_REGISTER_STATE_CHECK
(
output_stride
,
block_width
,
flimits
,
16
));
GetParam
()(
src_image_ptr
,
dst_image_ptr
,
input_stride
,
output_stride
,
block_width
,
flimits
,
16
));