summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorU. Artie Eoff <ullysses.a.eoff@intel.com>2016-09-07 13:43:36 -0700
committerSean V Kelley <seanvk@posteo.de>2016-09-08 15:21:41 -0700
commitac0b762e70268063a6e55ae7aa85734b1562af6d (patch)
tree828fad1ad29d9c74ff821d6c8b5317052db482ff /test
parenteca0f2bf98397ab8e3463cac61017a46263e24a1 (diff)
test: add jpeg entrypoint test
Add a test to verify the i965_CreateConfig functionality for the VAProfileJPEGBaseline/VAEntrypointVLD entrypoint based on platform supported or not. Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com> Reviewed-by: Sean V Kelley <seanvk@posteo.de>
Diffstat (limited to 'test')
-rw-r--r--test/i965_jpeg_decode_test.cpp37
1 files changed, 32 insertions, 5 deletions
diff --git a/test/i965_jpeg_decode_test.cpp b/test/i965_jpeg_decode_test.cpp
index 3a1c68f..f65aa77 100644
--- a/test/i965_jpeg_decode_test.cpp
+++ b/test/i965_jpeg_decode_test.cpp
@@ -35,16 +35,43 @@
namespace JPEG {
+class JPEGDecodeTest : public I965TestFixture
+{
+protected:
+ static const VAEntrypoint entrypoint = VAEntrypointVLD;
+};
+
+TEST_F(JPEGDecodeTest, Entrypoint)
+{
+ VAConfigID config = VA_INVALID_ID;
+ ConfigAttribs attributes;
+ struct i965_driver_data *i965(*this);
+
+ ASSERT_PTR(i965);
+
+ if (HAS_JPEG_DECODING(i965)) {
+ config = createConfig(profile, entrypoint, attributes);
+ } else {
+ VAStatus status = i965_CreateConfig(
+ *this, profile, entrypoint, attributes.data(), attributes.size(),
+ &config);
+ EXPECT_STATUS_EQ(VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT, status);
+ EXPECT_INVALID_ID(config);
+ }
+
+ if (config != VA_INVALID_ID)
+ destroyConfig(config);
+}
+
class FourCCTest
- : public I965TestFixture
+ : public JPEGDecodeTest
, public ::testing::WithParamInterface<
std::tuple<TestPattern::SharedConst, const char*> >
{
protected:
- static const VAEntrypoint entrypoint = VAEntrypointVLD;
-
- virtual void SetUp() {
- I965TestFixture::SetUp();
+ virtual void SetUp()
+ {
+ JPEGDecodeTest::SetUp();
std::string sFourcc;
std::tie(testPattern, sFourcc) = GetParam();