summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorU. Artie Eoff <ullysses.a.eoff@intel.com>2016-09-28 13:36:11 -0700
committerSean V Kelley <seanvk@posteo.de>2016-10-03 11:31:24 -0700
commitfa21a443ae83eb90bef041b114c4308f5d0e3847 (patch)
tree8bf6656781c47c1959612d3bb03b9d7d5b69bb2e /test
parent2d0bb8fbdc15c0323fdbee2dfb5f10e7226fcb1b (diff)
test: jpeg/enc: add tests for Y800 inputs
Add support for Y800 input data for jpeg encode tests. 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_encode_test.cpp10
-rw-r--r--test/i965_jpeg_test_data.cpp12
-rw-r--r--test/i965_jpeg_test_data.h8
3 files changed, 25 insertions, 5 deletions
diff --git a/test/i965_jpeg_encode_test.cpp b/test/i965_jpeg_encode_test.cpp
index 789d4f3..86473a9 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 6ca2d27..956f7cf 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 f3113f5..938fb06 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;
}