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
3d0135f1
Commit
3d0135f1
authored
Apr 19, 2017
by
Jim Bankoski
Committed by
James Bankoski
Apr 23, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
EndToEndTest : split into tests that runs per commit and nightly.
Change-Id: I00af23ce8c62123a634aa34c46475edc0f4d428e
parent
57ec566c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
3 deletions
+35
-3
test/end_to_end_test.cc
test/end_to_end_test.cc
+35
-3
No files found.
test/end_to_end_test.cc
View file @
3d0135f1
...
...
@@ -85,17 +85,17 @@ int is_extension_y4m(const char *filename) {
return
!
strcmp
(
dot
,
".y4m"
);
}
class
EndToEndTest
Large
class
EndToEndTest
:
public
::
libaom_test
::
EncoderTest
,
public
::
libaom_test
::
CodecTestWith3Params
<
libaom_test
::
TestMode
,
TestVideoParam
,
int
>
{
protected:
EndToEndTest
Large
()
EndToEndTest
()
:
EncoderTest
(
GET_PARAM
(
0
)),
test_video_param_
(
GET_PARAM
(
2
)),
cpu_used_
(
GET_PARAM
(
3
)),
psnr_
(
0.0
),
nframes_
(
0
),
encoding_mode_
(
GET_PARAM
(
1
))
{}
virtual
~
EndToEndTest
Large
()
{}
virtual
~
EndToEndTest
()
{}
virtual
void
SetUp
()
{
InitializeConfig
();
...
...
@@ -162,6 +162,8 @@ class EndToEndTestLarge
libaom_test
::
TestMode
encoding_mode_
;
};
class
EndToEndTestLarge
:
public
EndToEndTest
{};
TEST_P
(
EndToEndTestLarge
,
EndtoEndPSNRTest
)
{
cfg_
.
rc_target_bitrate
=
kBitrate
;
cfg_
.
g_error_resilient
=
0
;
...
...
@@ -187,8 +189,38 @@ TEST_P(EndToEndTestLarge, EndtoEndPSNRTest) {
EXPECT_GT
(
psnr
,
GetPsnrThreshold
());
}
TEST_P
(
EndToEndTest
,
EndtoEndPSNRTest
)
{
cfg_
.
rc_target_bitrate
=
kBitrate
;
cfg_
.
g_error_resilient
=
0
;
cfg_
.
g_profile
=
test_video_param_
.
profile
;
cfg_
.
g_input_bit_depth
=
test_video_param_
.
input_bit_depth
;
cfg_
.
g_bit_depth
=
test_video_param_
.
bit_depth
;
init_flags_
=
AOM_CODEC_USE_PSNR
;
if
(
cfg_
.
g_bit_depth
>
8
)
init_flags_
|=
AOM_CODEC_USE_HIGHBITDEPTH
;
testing
::
internal
::
scoped_ptr
<
libaom_test
::
VideoSource
>
video
;
if
(
is_extension_y4m
(
test_video_param_
.
filename
))
{
video
.
reset
(
new
libaom_test
::
Y4mVideoSource
(
test_video_param_
.
filename
,
0
,
kFrames
));
}
else
{
video
.
reset
(
new
libaom_test
::
YUVVideoSource
(
test_video_param_
.
filename
,
test_video_param_
.
fmt
,
kWidth
,
kHeight
,
kFramerate
,
1
,
0
,
kFrames
));
}
ASSERT_TRUE
(
video
.
get
()
!=
NULL
);
ASSERT_NO_FATAL_FAILURE
(
RunLoop
(
video
.
get
()));
const
double
psnr
=
GetAveragePsnr
();
EXPECT_GT
(
psnr
,
GetPsnrThreshold
());
}
AV1_INSTANTIATE_TEST_CASE
(
EndToEndTestLarge
,
::
testing
::
ValuesIn
(
kEncodingModeVectors
),
::
testing
::
ValuesIn
(
kTestVectors
),
::
testing
::
ValuesIn
(
kCpuUsedVectors
));
AV1_INSTANTIATE_TEST_CASE
(
EndToEndTest
,
::
testing
::
Values
(
kEncodingModeVectors
[
0
]),
::
testing
::
Values
(
kTestVectors
[
2
]),
// 444
::
testing
::
Values
(
kCpuUsedVectors
[
2
]));
}
// namespace
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