[Libva] [PATCH intel-driver 3/5] test: add jpeg entrypoint test
U. Artie Eoff
ullysses.a.eoff at intel.com
Wed Sep 7 20:43:36 UTC 2016
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 at intel.com>
---
test/i965_jpeg_decode_test.cpp | 37 ++++++++++++++++++++++++++++++++-----
1 file changed, 32 insertions(+), 5 deletions(-)
diff --git a/test/i965_jpeg_decode_test.cpp b/test/i965_jpeg_decode_test.cpp
index 3a1c68f1fa4d..f65aa77cce75 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();
--
2.1.0
More information about the Libva
mailing list