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
d6fc63ac
Commit
d6fc63ac
authored
Oct 22, 2015
by
Ronald S. Bultje
Committed by
Gerrit Code Review
Oct 22, 2015
Browse files
Options
Browse Files
Download
Plain Diff
Merge "Adjust superframe-is-optional unit test for vp10 superframe syntax."
parents
dbefcc06
aa112565
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
7 deletions
+20
-7
test/superframe_test.cc
test/superframe_test.cc
+20
-7
No files found.
test/superframe_test.cc
View file @
d6fc63ac
...
...
@@ -16,8 +16,13 @@
namespace
{
const
int
kTestMode
=
0
;
const
int
kSuperframeSyntax
=
1
;
typedef
std
::
tr1
::
tuple
<
libvpx_test
::
TestMode
,
int
>
SuperframeTestParam
;
class
SuperframeTest
:
public
::
libvpx_test
::
EncoderTest
,
public
::
libvpx_test
::
CodecTestWithParam
<
libvpx_test
::
TestMode
>
{
public
::
libvpx_test
::
CodecTestWithParam
<
SuperframeTestParam
>
{
protected:
SuperframeTest
()
:
EncoderTest
(
GET_PARAM
(
0
)),
modified_buf_
(
NULL
),
last_sf_pts_
(
0
)
{}
...
...
@@ -25,9 +30,13 @@ class SuperframeTest : public ::libvpx_test::EncoderTest,
virtual
void
SetUp
()
{
InitializeConfig
();
SetMode
(
GET_PARAM
(
1
));
const
SuperframeTestParam
input
=
GET_PARAM
(
1
);
const
libvpx_test
::
TestMode
mode
=
std
::
tr1
::
get
<
kTestMode
>
(
input
);
const
int
syntax
=
std
::
tr1
::
get
<
kSuperframeSyntax
>
(
input
);
SetMode
(
mode
);
sf_count_
=
0
;
sf_count_max_
=
INT_MAX
;
is_vp10_style_superframe_
=
syntax
;
}
virtual
void
TearDown
()
{
...
...
@@ -50,7 +59,8 @@ class SuperframeTest : public ::libvpx_test::EncoderTest,
const
uint8_t
marker
=
buffer
[
pkt
->
data
.
frame
.
sz
-
1
];
const
int
frames
=
(
marker
&
0x7
)
+
1
;
const
int
mag
=
((
marker
>>
3
)
&
3
)
+
1
;
const
unsigned
int
index_sz
=
2
+
mag
*
frames
;
const
unsigned
int
index_sz
=
2
+
mag
*
(
frames
-
is_vp10_style_superframe_
);
if
((
marker
&
0xe0
)
==
0xc0
&&
pkt
->
data
.
frame
.
sz
>=
index_sz
&&
buffer
[
pkt
->
data
.
frame
.
sz
-
index_sz
]
==
marker
)
{
...
...
@@ -75,6 +85,7 @@ class SuperframeTest : public ::libvpx_test::EncoderTest,
return
pkt
;
}
int
is_vp10_style_superframe_
;
int
sf_count_
;
int
sf_count_max_
;
vpx_codec_cx_pkt_t
modified_pkt_
;
...
...
@@ -92,9 +103,11 @@ TEST_P(SuperframeTest, TestSuperframeIndexIsOptional) {
EXPECT_EQ
(
sf_count_
,
1
);
}
VP9_INSTANTIATE_TEST_CASE
(
SuperframeTest
,
::
testing
::
Values
(
::
libvpx_test
::
kTwoPassGood
));
VP9_INSTANTIATE_TEST_CASE
(
SuperframeTest
,
::
testing
::
Combine
(
::
testing
::
Values
(
::
libvpx_test
::
kTwoPassGood
),
::
testing
::
Values
(
0
)));
VP10_INSTANTIATE_TEST_CASE
(
SuperframeTest
,
::
testing
::
Values
(
::
libvpx_test
::
kTwoPassGood
));
VP10_INSTANTIATE_TEST_CASE
(
SuperframeTest
,
::
testing
::
Combine
(
::
testing
::
Values
(
::
libvpx_test
::
kTwoPassGood
),
::
testing
::
Values
(
CONFIG_MISC_FIXES
)));
}
// 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