Age | Commit message (Collapse) | Author | Files | Lines |
|
jpege/jpegd and avce/avcd config tests to check against all supported
entrypoints for a profile. UNSUPPORTED_PROFILE is expected
when no entrypoints are available for a given profile, else
expect UNSUPPORTED_ENTRYPOINT.
Signed-off-by: Daniel Charles <daniel.charles@intel.com>
Reviewed-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
|
|
Otherwise the package created by 'make dist' doesn't include the
missing file
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
(cherry picked from commit ed6baee7d523d512ac296d71132c26b37c0d818a)
|
|
The YUVImage class allows for more efficient (faster)
operations on the YUV input/output of these tests.
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
|
|
Add stream operators for std::valarray.
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
|
|
Add a class that employs std::valarray and std::slice
to manage YUV input/output data. Using valarray's and
slice's are generally more efficient than std::vector
in most test use cases where YUV data is needed.
Current test cases that are using different (yet
similar) code to manage it's own YUV input/output
data can eventually converge onto use of this common
class instead.
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
|
|
The speed of random number generation can have a
significant impact on test execution time when
initializing large arrays of random values. The C++
random number engines and generators are much slower
than std::rand.
Thus, use C's rand() to generate pseudo-random values
within a given [min,max] range. For testing purposes,
deterministic sequences would be preferable anyway.
That is, if a particular sequence exposes a test failure,
then we can reproduce it later. Also, we seed the
pseudo-random number generator with the current time
so that the sequence is not always the same across
executions. The seed is then recorded in the test
results so that the sequence can be reproduced if
needed.
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
|
|
The timer is useful to quickly instrument various sections
of code during test development optimization tasks or other
timing needs.
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
|
|
std::valarray can fuse elementwise operations across arrays for
more efficient comparison.
Signed-off-by: Scott D Phillips <scott.d.phillips@intel.com>
Reviewed-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
|
|
Add some simple avce context tests to verify various
encode context fields are appropriately configured.
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
|
|
Driver does not require config attributes to create a config.
Thus, allow I965TestFixture::createConfig to be called without
specifying ConfigAttribs.
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
|
|
The driver does not require surfaces to create a context.
That is, i965_CreateContext can accept an empty render_targets
list. Thus, make Surfaces an optional parameter to
I965TestFixture::createContext so that simple tests don't
have to bother with Surfaces if they are irrelevant to
the test case.
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
|
|
Instantiate the JPEG encode/decode Entrypoint tests from
the common I965ConfigTest fixture with additional test
inputs. Also, separate them into their own files. This
changes their test case names, too.
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
|
|
Add a common I965ConfigTest parameterized test fixture with
a i965_CreateConfig test case and add the AVC encode/decode
create config test instantiations with associated profile
and entrypoint inputs.
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
|
|
Add ostream operators for VAProfile and VAEntrypoint so
the testing framework and tests can log them by name.
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
|
|
Move the VADisplay, vaInitialize and vaTerminate responsibility
out of the I965TestFixture class and into a global
I965TestEnvironment (::testing::Environment) singleton.
The I965TestEnvironment singleton instance is registered with
the gtest framework at startup and it's SetUp and TearDown routines
are executed before and after all tests are executed. This
allows all tests to obtain access to the VADisplay et. al.
outside of an I965TestFixture instance.
Essentially, this results in only one VADisplay being shared
between all executed test cases and one init/term sequence
for the entire test program execution. This more closely
resembles how several real-world programs would use the
driver (i.e. init driver once, encode/decode multiple streams
and terminate driver once).
Prior to this, each test case had it's own VADisplay instance
and init/term sequence. That behavior can still be achieved by
executing one test case at a time via the --gtest_filter option.
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
|
|
Add test to verify correct result for create surfaces with
supported and unsupported pixel formats.
Currently the IYUV pixel format case fails... see
https://bugs.freedesktop.org/show_bug.cgi?id=98033
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
|
|
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>
|
|
...plus optimize TestInput::toOutputFourcc()
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
|
|
Move JPEG::Encode::TestInput member initialization to its static
"create" routine so that an empty/invalid Shared can be returned
if the input fourcc is not handled/implemented. This will allow
a caller/test to react appropriately.
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
|
|
Make initialization of YUV input for jpeg encode a
little faster, esp. for larger resolution.
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
|
|
Let the ::JPEG::Encode::TestInput class deal with
converting from its input fourcc to its expected
output fourcc.
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
|
|
...and make the constructor private so that only Shared
instances can be created.
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
|
|
Move the ::JPEG::Encode::TestInputCreator's to the
i965_jpeg_test_data[.h|.cpp] files.
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
|
|
Move the implementation of JPEG::Encode::TestInput to the
compilation unit file (.cpp). This helps reduce the number
of include headers needed in the header file.
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
|
|
The ::JPEG::Encode::TestInput::SharedConst typedef should
actually use a 'const TestInput' template parameter
for the std::shared_ptr. Hence, the name.
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
|
|
The toString template is generic and should be part of the
i965_streamable.h header.
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
|
|
Both jpeg decode and encode test files use this macro.
So move it to the common test.h header to avoid duplicating
it.
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
|
|
Add JPEG encode tests that encode raw I420 and NV12 data
at quality 100 and then decodes them to verify proper
encoding.
Currently, the 7680x4320 I420 test fails because ~40-60
Y-values (i.e. plane 0) in each line from the decoded
bitstream are off by more than 2 of the original raw
I420 values. It is not clear why only this resolution
exhibits this problem.
v2: don't create any input data in test fixture if
jpeg encoding is not supported.
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
|
|
Common utilities and functions that may be useful for multiple
tests.
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
|
|
Add a wrapper that calls the driver i965_SyncSurface.
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
|
|
Add convenience streamable operators for VA and other common
data structures so that tests can log them as needed.
v2: put std::array stream operators into the std namespace
otherwise gcc 5.x complains.
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
|
|
Add support for calling i965_CreateSurfaces2 so that we
can pass VASurfaceAttributes. This is needed to set a
particular surface pixel format in some tests.
We must call i965_CreateSurfaces2 via the vtable since
it is a static function within the i965_drv_video.c
file... thus hidden.
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
|
|
Put the JPEG decode tests and test data into its own
namespace so that it can be distinguished from encode.
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
|
|
Move static definitions of JPEG TestPatternData into the .cpp
so that multiple files can include the i965_jpeg_test_data.h
header file. Otherwise, there will be "multiple definition"
compiler errors.
Also, change generateSolid to be inline for the same reason.
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
|
|
If the hardware does not support jpeg decode, then log this
information and return from the test early.
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
|
|
Add I965TestFixture::getFullTestName to allow tests to
log the current test's name.
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
|
|
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>
|
|
Add some more convenience test macros and wrap the
VAStatus in a class so that it can be streamed by its
name instead of its value by the gtest framework.
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
|
|
Use hsample and vsample factor in printComponentDataTo to
avoid invalid indexes into the data array.
This fixes a segfault in the jpeg fourcc tests that may be
triggered during 'make check'.
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
|
|
Add various tests to verify the integrity of the
chipset and pciid definitions and lookups.
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
|
|
Add some basic object_heap tests to verify logical
usage.
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
|
|
Test that the driver properly decodes JPEG data that
is encoded in various fourcc formats.
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
|
|
Add basic i965 initialize test to verify certain driver data
is properly initialized and to demonstrate the usage of the
I965TestFixture class.
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
|
|
Add an i965 test fixture class which creates a va drm display
for driver testing and initializes/terminates va. It also
provides some conversion operators for converting to various
driver data types. Various driver wrapper functions are
provided, too, for convenience.
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
|
|
Link the i965 convenience library to the i965 test
executable for testing.
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
|
|
Add test_i965_drv_video as noinst program with an initial
test main() definition.
Also provide a test.h header with common test includes and
definitions that can be included by all test compilation
units.
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
|
|
Define autoconf/automake rules to build libgtest.la
as a convenience library.
Add --enable-tests configure option (default:no).
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
|
|
We will use the Google Test Framework for testing.
Google Test is not meant to be packaged and used as a system
dependency like other libraries. Google Test recommends that
it be custom compiled for each project that uses it. Thus,
we'll keep our own copy of it here and compile it as needed.
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
|