[Libva] [PATCH intel-driver 11/11] test: jpeg/enc: add tests for Y800 inputs
U. Artie Eoff
ullysses.a.eoff at intel.com
Wed Sep 28 20:36:11 UTC 2016
Add support for Y800 input data for jpeg encode tests.
Signed-off-by: U. Artie Eoff <ullysses.a.eoff at intel.com>
---
test/i965_jpeg_encode_test.cpp | 10 +++++-----
test/i965_jpeg_test_data.cpp | 12 ++++++++++++
test/i965_jpeg_test_data.h | 8 ++++++++
3 files changed, 25 insertions(+), 5 deletions(-)
diff --git a/test/i965_jpeg_encode_test.cpp b/test/i965_jpeg_encode_test.cpp
index 789d4f35c228..86473a984ec0 100644
--- a/test/i965_jpeg_encode_test.cpp
+++ b/test/i965_jpeg_encode_test.cpp
@@ -481,7 +481,7 @@ INSTANTIATE_TEST_CASE_P(
::testing::ValuesIn(
std::vector<TestInputCreator::SharedConst>(
5, TestInputCreator::SharedConst(new RandomSizeCreator))),
- ::testing::Values("I420", "NV12", "UYVY", "YUY2")
+ ::testing::Values("I420", "NV12", "UYVY", "YUY2", "Y800")
)
);
@@ -515,7 +515,7 @@ INSTANTIATE_TEST_CASE_P(
Common, JPEGEncodeInputTest,
::testing::Combine(
::testing::ValuesIn(generateCommonInputs()),
- ::testing::Values("I420", "NV12", "UYVY", "YUY2")
+ ::testing::Values("I420", "NV12", "UYVY", "YUY2", "Y800")
)
);
@@ -525,7 +525,7 @@ INSTANTIATE_TEST_CASE_P(
::testing::Values(
TestInputCreator::Shared(new FixedSizeCreator({8192, 8192}))
),
- ::testing::Values("I420", "NV12", "UYVY", "YUY2")
+ ::testing::Values("I420", "NV12", "UYVY", "YUY2", "Y800")
)
);
@@ -562,7 +562,7 @@ INSTANTIATE_TEST_CASE_P(
Edge, JPEGEncodeInputTest,
::testing::Combine(
::testing::ValuesIn(generateEdgeCaseInputs()),
- ::testing::Values("I420", "NV12", "UYVY", "YUY2")
+ ::testing::Values("I420", "NV12", "UYVY", "YUY2", "Y800")
)
);
@@ -580,7 +580,7 @@ INSTANTIATE_TEST_CASE_P(
Misc, JPEGEncodeInputTest,
::testing::Combine(
::testing::ValuesIn(generateMiscInputs()),
- ::testing::Values("I420", "NV12", "UYVY", "YUY2")
+ ::testing::Values("I420", "NV12", "UYVY", "YUY2", "Y800")
)
);
diff --git a/test/i965_jpeg_test_data.cpp b/test/i965_jpeg_test_data.cpp
index 6ca2d27e5fc8..956f7cfc0a1f 100644
--- a/test/i965_jpeg_test_data.cpp
+++ b/test/i965_jpeg_test_data.cpp
@@ -809,6 +809,14 @@ namespace Encode {
t->format = VA_RT_FORMAT_YUV422;
t->fourcc_output = VA_FOURCC_422H;
break;
+ case VA_FOURCC_Y800:
+ t->planes = 1;
+ t->widths = {w + (w & 1), 0, 0};
+ t->heights = {h + (h & 1), 0, 0};
+ t->format = VA_RT_FORMAT_YUV400;
+ t->fourcc_output = VA_FOURCC_Y800;
+ t->picture.num_components = 1;
+ break;
default:
return Shared(); // fourcc is unsupported
}
@@ -944,6 +952,10 @@ namespace Encode {
std::stable_partition(
result->begin(1), result->end(2), IsEvenIndex());
}
+ } else if (fourcc_output == VA_FOURCC_Y800) {
+ if (fourcc == VA_FOURCC_Y800) {
+ return shared_from_this();
+ }
}
return result;
diff --git a/test/i965_jpeg_test_data.h b/test/i965_jpeg_test_data.h
index f3113f50cfa4..938fb06b258c 100644
--- a/test/i965_jpeg_test_data.h
+++ b/test/i965_jpeg_test_data.h
@@ -237,6 +237,14 @@ namespace Decode {
pd->format = VA_RT_FORMAT_YUV444;
pd->pparam.components[0].h_sampling_factor = 1;
pd->pparam.components[0].v_sampling_factor = 1;
+ break;
+ case VA_FOURCC_Y800:
+ pd->format = VA_RT_FORMAT_YUV400;
+ pd->pparam.components[0].h_sampling_factor = 1;
+ pd->pparam.components[0].h_sampling_factor = 1;
+ pd->pparam.num_components = 1;
+ pd->sparam.num_components = 1;
+ break;
default:
break;
}
--
2.4.11
More information about the Libva
mailing list