Commit Graph

177 Commits

Author SHA1 Message Date
U. Artie Eoff 15fb08bd93 test/fixture: add new profile/entrypoint methods
Existing profile/entrypoint methods require too
much state overhead in the fixture and force tests
to make multiple calls to different methods to get
the information they need.  Thus, add new methods
for profile/entrypoint queries so tests can regain
more control and simplicity.  These new methods
also do not require member variables to operate.

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2018-01-29 13:35:50 +08:00
Xu Guangxin 9c42f5ae8b android: remove vaPutSurface dependency
vaPutSurface only used in libva-utils. The actual application/omx
implementation never use it.
It will introduce many header files in android framework.Android change
rapidly, the directory or file name changed in versionto version. It's
hard to catch up and maintain support for many versionof android.
2018-01-26 10:33:56 +08:00
Sreerenj Balachandran cd548ed0d8 vainfo: dynamically allocate memory for VAEntrypoint list
https://github.com/01org/libva-utils/pull/68
2018-01-26 09:00:12 +08:00
Sreerenj Balachandran e5c2de2220 Stats/PreEnc: vainfo: Add PreEnc entrypoint
libva PR: https://github.com/01org/libva/pull/110

Signed-off-by: Sreerenj Balachandran <sreerenj.balachandran@intel.com>
2018-01-26 09:00:12 +08:00
Pengfei Qu be2cdc7b35 fix the regression of unit test
this add the minium resolution check in the unit test

Signed-off-by: Pengfei Qu <Pengfei.Qu@intel.com>
2018-01-23 09:22:53 -08:00
U. Artie Eoff 7eab433e0e test/data: define more bitmask data for config attributes
Define valid bitmasks for remaining read/write config
attributes...

  VAConfigAttribEncPackedHeaders
  VAConfigAttribEncInterlaced
  VAConfigAttribFEIFunctionType

This will ensure VAAPIGetCreateConfig/CreateConfigWithAttributes
test cases only use one bitmask for each supported value when
calling vaCreateConfig for these bitfield config attributes.

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2018-01-22 09:43:28 -08:00
U. Artie Eoff 3185565776 test/fixture: remove legacy config and surface methods
These fixture methods have been replaced with consolidated
and more flexible methods and are no longer used.

Also, remove associated legacy member variables.

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2018-01-22 09:43:28 -08:00
U. Artie Eoff 258f28b122 test/createcontext: use new getMinMaxSurfaceResolution method
The min/max resolution query was consolidated in the fixture.

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2018-01-22 09:43:28 -08:00
U. Artie Eoff db37306549 test/createsurfaces: refactor and fix test bugs
Take into account bitfield attributes when creating
config and surfaces.

Use new fixture methods for greater control in test
cases.

Fixes #91
Fixes #92

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2018-01-22 09:43:28 -08:00
U. Artie Eoff 8233c42170 test/data: define bitmask data for surface attributes
Add definitions for the VASurfaceAttribMemoryType bitmask
surface attribute.

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2018-01-22 09:43:28 -08:00
U. Artie Eoff dfec7ba7d9 test/fixture: consolidate surface methods
Consolidate surface methods with refactored logic to allow
tests to take more control of parameters.  Also, the
existing doCreateSurfaces suffers from a surface format
logic bug.  The new consolidated createSurfaces does not
suffer from this bug.

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2018-01-22 09:43:28 -08:00
U. Artie Eoff cde70e171e test/get_create_config: fix test cases
Use the new config methods from fixture.

Also, properly handle config attributes that use bitfields.
That is, some attributes require only one bitmask/value
for vaCreateConfig, therefore we cannot directly use
the attribute returned from vaGetConfigAttributes since
those bitfield attributes will return a bitfield value with
"all" OR'd supported bitmask choices.

Fixes #86

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2018-01-22 09:43:28 -08:00
U. Artie Eoff d663ed8a0f test/data: define config attribute BitMask map
Add typedef for BitMasks and define a config attrib map
for specific bit mask values.

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2018-01-22 09:43:28 -08:00
U. Artie Eoff eb91e3ca70 test/createcontext: use new fixture config methods
Use the new config methods from the test fixture.

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2018-01-22 09:43:28 -08:00
U. Artie Eoff 4dc43077ef test/create_buffer: use new fixture config methods
Use the new config methods in the test fixture and
refactor some variables.

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2018-01-22 09:43:28 -08:00
U. Artie Eoff b66e14ff98 test/config_attribs: use new fixture config methods
Use the new config methods in the test fixture and
validate bitfield config attributes.

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2018-01-22 09:43:28 -08:00
U. Artie Eoff 7123066703 test/data: add rate control and decode slice mode values
Add definitions for valid VA rate controls and decode
slice mode values that can be used by test cases.

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2018-01-22 09:43:28 -08:00
U. Artie Eoff c17bbc0820 test/fixture: consolidate config methods
Define 4 new config methods that provide the functionality
of the existing 11 similar methods.  The usage of the existing
methods will be replaced by the new methods in successive
commits.

These new methods will also give control back to the test
cases to handle config attributes depending on need/use-case
and reduce the number fixture member variables needed.

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2018-01-22 09:43:28 -08:00
U. Artie Eoff ebe0e519d5 test/data: use g_ prefix for global vars, not m_
The m_ prefix for a variable indicates it's a member
variable.  The g_ prefix indicates it's a global variable.

Use the correct prefix in test_data.h for global variables
and update usage accordingly.

Also, cleanup test_data.h formatting.

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2018-01-22 09:43:28 -08:00
U. Artie Eoff 71abeb23a5 test/data: add new VA_RT_FORMAT_RGB32_BPP
The list was missing the recently added
VA_RT_FORMAT_RGB32_BPP format.  So add it.

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2018-01-22 09:43:28 -08:00
Jayesh Kumar Tank 7b85ff442d test/query_config: cleanup test cases
Use const and references appropriately.

Streamline logic, variable names and code formatting

Signed-off-by: Jayesh Kumar Tank <jayesh.kumarx.tank@intel.com>
2018-01-12 08:35:10 +08:00
Jayesh Kumar Tank 712ed54a8e test/queryvendor: cleanup test cases
Streamline logic and code formatting.

Signed-off-by: Jayesh Kumar Tank <jayesh.kumarx.tank@intel.com>
2018-01-12 08:35:10 +08:00
U. Artie Eoff 7a08da06dd test/init_terminate: cleanup test cases
Streamline logic, variable names and code formatting

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2018-01-12 08:35:10 +08:00
U. Artie Eoff 39e9331fbe test/get_max_values: cleanup test cases
Streamline logic and code formatting.

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2018-01-12 08:35:10 +08:00
U. Artie Eoff 79e14c92ed test/get_create_config: cleanup test cases
Use const and references appropriately.

Streamline logic, variable names and code formatting

Also remove useless test.

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2018-01-12 08:35:10 +08:00
U. Artie Eoff d7ccf14a33 test/display_attribs: cleanup test cases
Use const and references appropriately.

Streamline logic, variable names and code formatting.

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2018-01-12 08:35:10 +08:00
U. Artie Eoff 75a94e7fec test/createsurfaces: cleanup test cases
Use const and references appropriately.

Streamline logic, variable names and code formatting.

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2018-01-12 08:35:10 +08:00
U. Artie Eoff 91f13b3deb test/createcontext: cleanup test cases
Use const and references appropriately.

Streamline logic, variable names and code formatting.

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2018-01-12 08:35:10 +08:00
U. Artie Eoff 1c9d266188 test/createbuffer: cleanup test cases
Use const and references appropriately.

Streamline logic, variable names and code formatting.

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2018-01-12 08:35:10 +08:00
U. Artie Eoff 62028d2bac test/config_attribs: cleanup test cases
Use const and references appropriately.

Streamline logic, variable names and code formatting.

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2018-01-12 08:35:10 +08:00
U. Artie Eoff c0ab3b99fc test/fixture: const and var reference corrections
Various const corrections for member functions/params and
pass-by-ref instead of pass-by-val.

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2018-01-12 08:35:10 +08:00
U. Artie Eoff ff0d21efcd test: use common typedefs
Use the new typedefs in tests.

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2018-01-12 08:35:10 +08:00
U. Artie Eoff 27e027ff5f test: add some common typedefs
Add typedefs for some commonly used data types.

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2018-01-12 08:35:10 +08:00
U. Artie Eoff a95be999a7 test: remove local va_version.h.in
The locally generated va_version.h was erroneous and
not even being used in the tests.  This is because
va/va.h already includes the "real" va/va_version.h.

Thus, remove local va_version.h.in.

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2018-01-12 08:35:10 +08:00
U. Artie Eoff 57bd8dbe97 test/fixture: remove shadow variable
m_querySurfaceAttribList was redefined in
doQuerySurfacesWithConfigAttribs which shadows the member
variable of the same name.  Removing the redefinition does
not break tests, so remove it.

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2018-01-12 08:35:10 +08:00
Jun Zhao 9cf3c47d92 decode/loadjpeg: Add return value check for fread.
Check the return value to fix build warning.

Signed-off-by: Jun Zhao <jun.zhao@intel.com>
2018-01-11 08:34:21 +08:00
Xiang, Haihao aa563e23a6 vp9enc: set a reasonable bitrate for VBR when the max bitrate isn't specified
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
2018-01-09 16:19:53 +08:00
Xiang, Haihao 6da04bc3eb vp9enc: Add an option to specify whether low power mode is used
--low_power <mode>>
0: Normal mode
1: Low power mode
others: Auto mode

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
2018-01-09 16:19:53 +08:00
Xiang, Haihao b9d60da862 vp9enc: try low power mode if non-low power mode isn't supported
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
2018-01-09 16:19:53 +08:00
U. Artie Eoff dbdcc10a62 test/createcontext: check min surface resolution
The minimum surface resolution needs to be considered
when creating a context in CreateContext test.

Fixes #83

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2018-01-05 08:41:33 -08:00
U. Artie Eoff e6a5bc0f2f test/fixture: add doGetMinSurfaceResolution
Add method to get minimum allowed surface resolution.
If driver does not specify, then assume 1x1 is min.

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2018-01-05 08:41:33 -08:00
U. Artie Eoff dfc6ff4d29 test/fixture: set default max surface resolution
If driver does not specify the max surface resolution,
then assume "any" max is allowed (up to numeric_limits).

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2018-01-05 08:41:33 -08:00
U. Artie Eoff 2db00b120f test: use Resolution struct instead of std::pair
Use the a Resolution object in tests.

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2018-01-05 08:41:33 -08:00
U. Artie Eoff f0a5963ab9 test/internal: add interal test for Resolution definition
Add test_internal.cpp to test Resolution logic.

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2018-01-05 08:41:33 -08:00
U. Artie Eoff 9973b64985 test/utils: define Resolution structure
Add test_utils header with Resolution structure definition
for use in tests.

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2018-01-05 08:41:33 -08:00
U. Artie Eoff 0c43cd0418 test: fix header guards
Ensure all test headers have a header guard and that
each guard is unique.

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2018-01-02 11:20:10 -08:00
U. Artie Eoff b1f2c831d3 test/VAAPIQueryVendor: combine .h and .cpp contents
The header is only needed in one compilation unit.
Thus, move it's contents to the compilation unit to
reduce unnecessary complexity and maintenance.

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2018-01-02 11:19:31 -08:00
U. Artie Eoff bf6d91af63 test/VAAPIQueryConfig: combine .h and .cpp contents
The header is only needed in one compilation unit.
Thus, move it's contents to the compilation unit to
reduce unnecessary complexity and maintenance.

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2018-01-02 11:19:31 -08:00
U. Artie Eoff ea2e00239c test/VAAPIInitTerminate: combine .h and .cpp contents
The header is only needed in one compilation unit.
Thus, move it's contents to the compilation unit to
reduce unnecessary complexity and maintenance.

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2018-01-02 11:19:31 -08:00
U. Artie Eoff e2b5fecb57 test/VAAPIGetMaxValues: combine .h and .cpp contents
The header is only needed in one compilation unit.
Thus, move its contents to the compilation unit to
reduce unnecessary complexity and maintenance.

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2018-01-02 11:19:31 -08:00