intel / libva-utils Goto Github PK
View Code? Open in Web Editor NEWLibva-utils is a collection of tests for VA-API (VIdeo Acceleration API)
Home Page: https://01.org/linuxmedia
License: Other
Libva-utils is a collection of tests for VA-API (VIdeo Acceleration API)
Home Page: https://01.org/linuxmedia
License: Other
When running configure on the summary there's no need to print an empty driver path. libva/intel-vaapi-driver is already printing such information
When a test is skipped, we should call RecordProperty("skipped", true);
so that this information is recorded in the xml output results. This will allow for xml post-processing scripts to detect skipped tests. For example, junit parsers can report skipped tests when a <skipped/>
tag exists in the xml output. Unfortunately, gtest doesn't support skipped tests directly (nor does it allow adding extra tags to the xml output)... but if we record this information in an attribute of the xml test report (i.e. via a call to gtest's RecordProperty
method), then we can post process the output and move the information to an inner tag when we want junit parsers to recognize skipped tests.
call vaCreateBuffer with such parameters (size = 4, num_elements=1, VAEncSequenceParameterBufferType), it return invalidate parameter , because size < sizeof(VAEncSequenceParameterBufferType)
Consider adding -Wall -Werror
as default compiler flags in project. This will encourage better coding practices.
TEST_F(VAAPIQueryVendor, Intel_i965_Vendor), if the vendor is not "Intel i965 driver". it will be failed.
Makefile.am
in putsurface
directory should skip compiling X11 version of the binary if X11 is not enabled.
| ../../git/putsurface/putsurface_x11.c:25:22: fatal error: X11/Xlib.h: No such file or directory
| #include <X11/Xlib.h>
| ^
| compilation terminated.
See intel/intel-vaapi-driver#335 for supporting argument
Compilation fails when libva-wayland
is not present but user explicitly uses --enable-wayland
.
Instead, configure should fail if requirements aren't met for user-specified options.
$ ./autogen.sh --disable-silent-rules --enable-drm --enable-x11 --enable-wayland --enable-tests
...
08:52:48,474 INFO - checking for DRM... yes
08:52:48,480 INFO - checking for LIBVA_DRM... yes
08:52:48,490 INFO - checking for LIBVA... yes
08:52:48,534 INFO - checking for X11... yes
08:52:48,543 INFO - checking for XEXT... yes
08:52:48,557 INFO - checking for XFIXES... yes
08:52:48,566 INFO - checking for LIBVA_X11... yes
08:52:48,577 INFO - checking for WAYLAND... yes
08:52:48,579 INFO - checking for wayland-scanner... /usr/bin/wayland-scanner
08:52:48,582 INFO - checking for LIBVA_WAYLAND... no
08:52:48,626 INFO - checking that generated files are newer than configure... done
08:52:48,626 INFO - configure: creating ./config.status
08:52:49,272 INFO - config.status: creating Makefile
08:52:49,284 INFO - config.status: creating common/Makefile
08:52:49,300 INFO - config.status: creating test/Makefile
08:52:49,319 INFO - config.status: creating test/va_version.h
08:52:49,335 INFO - config.status: creating vainfo/Makefile
08:52:49,354 INFO - config.status: creating encode/Makefile
08:52:49,368 INFO - config.status: creating decode/Makefile
08:52:49,381 INFO - config.status: creating putsurface/Makefile
08:52:49,395 INFO - config.status: creating config.h
08:52:49,403 INFO - config.status: executing depfiles commands
08:52:49,534 INFO - config.status: executing libtool commands
08:52:49,547 INFO -
08:52:49,547 INFO - libva-utils - 1.8.4.pre1
08:52:49,547 INFO -
08:52:49,547 INFO - Libva VA-API version ............. : 0.40.0
08:52:49,547 INFO - Installation prefix .............. : /opt/media/install
08:52:49,547 INFO - Extra window systems ............. : drm x11
08:52:49,547 INFO - Enable Unit-tests .................... : yes
...
08:52:50,789 INFO - ../common/.libs/libva-display.a(libva_display_la-va_display.o):(.data.rel+0x0): undefined reference to `va_display_hooks_wayland'
08:52:50,789 INFO - collect2: error: ld returned 1 exit status
08:52:50,791 INFO - Makefile:476: recipe for target 'loadjpeg' failed
08:52:50,791 INFO - make[2]: *** [loadjpeg] Error 1
08:52:50,791 INFO - make[2]: *** Waiting for unfinished jobs....
08:52:50,799 INFO - ../common/.libs/libva-display.a(libva_display_la-va_display.o):(.data.rel+0x0): undefined reference to `va_display_hooks_wayland'
1, tar jxvf libva_utils-1.8.0.pre1.tar.bz2
2, ./configure --prefix=/opt/X11R7 --enable-tests
3, result shown as below
gtest/src/gtest-all.cc:39:25: fatal error: gtest/gtest.h: No such file or directory
compilation terminated.
Makefile:597: recipe for target 'gtest/src/libgtest_la-gtest-all.lo' failed
make[2]: *** [gtest/src/libgtest_la-gtest-all.lo] Error 1
make[2]: Leaving directory '/home/focus/media_driver/libva_utils-1.8.0.pre1/test'
Makefile:457: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/focus/media_driver/libva_utils-1.8.0.pre1'
Makefile:388: recipe for target 'all' failed
make: *** [all] Error 2
Reported-by: Focus Luo [email protected]
this patch will add the --frames option in the cmd line. it will enable encoded frame number option
doLogSkipTest in fixture class should be able to differentiate between skip reason (ie. due to non supported profile or non supported entrypoint). And/OR should be able to accept generic arguments for skip reason.
this test call (line 63/66 of test_va_api_get_create_config.cpp)
doGetConfigAttributes(currentProfile,currentEntrypoint);
doCreateConfigWithAttrib(currentProfile,currentEntrypoint);
I don't think that the attributes from vaGetConfigAttributes can be directly used for vaCreateConfig
for example:
if (attrib[type] == VAConfigAttribRateControl && attrb[value] == 0x6) it means VBR & CBR support, but not mean you can set VBR|CBR directly to vaCreateConfig, right?
in TEST_P(VAAPICreateContext, CreateContext)
only max-resolution is checked.
putsurface_wayland fails to compile on Fedora if libwayland-server-devel is not installed:
putsurface_wayland.c:34:28: fatal error: wayland-server.h: No such file or directory #include <wayland-server.h>
On Fedora, the client and server development headers and libraries are provided by separate packages (Ubuntu provides both in one package). On Fedora, wayland-client.h header is provided by libwayland-client-devel package.
putsurface_wayland is a wayland client application and should not be including wayland-server.h... instead, it should include wayland-client.h. Also, configure.ac only checks for libwayland-client library, which is correct, thus we should not be using wayland-server files in source.
Upstream maintainers for debian based packaging do not use the control files in the project. They are poorly maintained and conflict with upstream packaging. Remove them.
root@media_libva_kbl:~# vainfo
libva info: VA-API version 0.39.4
libva info: va_getDriverName() returns 0
libva info: Trying to open /opt/X11R7/lib/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_0_39
libva info: va_openDriver() returns 0
vainfo: VA-API version: 0.39 (libva )
vainfo: Driver version: Intel i965 driver for Intel(R) Kabylake - 1.8.3.pre1 (glk-alpha-50-g4f91841)
run ./test_va_api without UMD_driver,
Program received signal SIGSEGV, Segmentation fault.
don't work , if the driver name change.
Issue relocated here from Libva due to move of test folder.
h264encode -w 3840 -h 2160 -f 60 --srcyuv <...> --fourcc NV12
on 1.7.3 crahes with:
h264encode: ../../libva-intel-driver-1.7.2/src/gen8_mfc.c:304: gen8_mfc_ind_obj_base_addr_state: Assertion
(mfc_context->mfc_indirect_pak_bse_object.end_offset) >= 0' failed.`
When intel-vaapi-driver is compiled with --enable-hybrid-codec
and intel-hybrid-driver is present, the intel-vaapi-driver loads the hybrid driver. This causes the following test cases to fail:
GetCreateConfig/VAAPIGetCreateConfig.CreateConfigNoAttributes/199
GetCreateConfig/VAAPIGetCreateConfig.CreateConfigNoAttributes/200
GetCreateConfig/VAAPIGetCreateConfig.CreateConfigNoAttributes/201
GetCreateConfig/VAAPIGetCreateConfig.CreateConfigNoAttributes/202
GetCreateConfig/VAAPIGetCreateConfig.CreateConfigNoAttributes/203
GetCreateConfig/VAAPIGetCreateConfig.CreateConfigNoAttributes/204
GetCreateConfig/VAAPIGetCreateConfig.CreateConfigNoAttributes/205
GetCreateConfig/VAAPIGetCreateConfig.CreateConfigNoAttributes/206
GetCreateConfig/VAAPIGetCreateConfig.CreateConfigWithAttributes/198
GetCreateConfig/VAAPIGetCreateConfig.CreateConfigWithAttributes/199
GetCreateConfig/VAAPIGetCreateConfig.CreateConfigWithAttributes/200
GetCreateConfig/VAAPIGetCreateConfig.CreateConfigWithAttributes/201
GetCreateConfig/VAAPIGetCreateConfig.CreateConfigWithAttributes/202
GetCreateConfig/VAAPIGetCreateConfig.CreateConfigWithAttributes/203
GetCreateConfig/VAAPIGetCreateConfig.CreateConfigWithAttributes/204
GetCreateConfig/VAAPIGetCreateConfig.CreateConfigWithAttributes/205
GetCreateConfig/VAAPIGetCreateConfig.CreateConfigWithAttributes/206
...with the following error messages:
test_va_api_fixture.cpp:496: Failure
Expected: vaStatus
Which is: 13
To be equal to: error
Which is: 12
vainfo fail to retrieve the libva version number after the libva-utils split from libva.
This is patch use to retrieve the libva version.
It require the fix changed (https://github.com/01org/libva/issues/95) in libva as well.
Can you please add one that package maintainer will have an idea on what changed ?
Thank you :)
On v2.0-branch, with --enable-tests
, the tests fail to compile with GCC >= 6. This is due to libva deprecated warnings and the tests are compiled with -Wall -Werror
. Older GCC versions do not appear to treat deprecated-declarations as errors even with -Wall -Werror
.
g++ -DHAVE_CONFIG_H -I. -I.. -I/home/uaeoff/Work/workspace/media/install/include -I/home/uaeoff/Work/workspace/media/install/include -DGTEST_HAS_PTHREAD=1 -DGTEST_USE_OWN_TR1_TUPLE=0 -DGTEST_LANG_CXX11=1 -DGTEST_HAS_TR1_TUPLE=1 -DPTHREADS -DVA_DRIVERS_PATH="\"/home/uaeoff/Work/workspace/media/install/lib/dri\"" -std=c++11 -I/home/uaeoff/Work/workspace/media/install/include -Wall -Werror -I../test/gtest/include -g3 -MT test_va_api-test_va_api_fixture.o -MD -MP -MF .deps/test_va_api-test_va_api_fixture.Tpo -c -o test_va_api-test_va_api_fixture.o `test -f 'test_va_api_fixture.cpp' || echo './'`test_va_api_fixture.cpp
In file included from test_va_api_fixture.h:27:0,
from test_va_api_fixture.cpp:25:
test_data.h:37:9: error: ‘VAProfileH264Baseline’ is deprecated [-Werror=deprecated-declarations]
VAProfileH264Baseline,
^~~~~~~~~~~~~~~~~~~~~
In file included from test_va_api_fixture.h:24:0,
from test_va_api_fixture.cpp:25:
/home/uaeoff/Work/workspace/media/install/include/va/va.h:327:5: note: declared here
VAProfileH264Baseline va_deprecated_enum = 5,
^~~~~~~~~~~~~~~~~~~~~
In file included from test_va_api_fixture.h:28:0,
from test_va_api_fixture.cpp:25:
test_streamable.h: In function ‘std::ostream& operator<<(std::ostream&, const VAProfile&)’:
test_streamable.h:73:10: error: ‘VAProfileH264Baseline’ is deprecated [-Werror=deprecated-declarations]
case VAProfileH264Baseline:
^~~~~~~~~~~~~~~~~~~~~
In file included from test_va_api_fixture.h:24:0,
from test_va_api_fixture.cpp:25:
/home/uaeoff/Work/workspace/media/install/include/va/va.h:327:5: note: declared here
VAProfileH264Baseline va_deprecated_enum = 5,
^~~~~~~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors
Makefile:635: recipe for target 'test_va_api-test_va_api_fixture.o' failed
make[2]: *** [test_va_api-test_va_api_fixture.o] Error 1
make[2]: Leaving directory '/home/uaeoff/Work/workspace/media/build/libva-utils/test'
Makefile:468: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/uaeoff/Work/workspace/media/build/libva-utils'
Makefile:400: recipe for target 'all' failed
make: *** [all] Error 2
this will add AUD nal unit
With current libva-intel-driver
master, h264encode on Kaby Lake causes the system to hang. avcencode works fine.
22:29:22,331 INFO - test_va_api_init_terminate.cpp: In member function 'void VAAPI::VAAPIInitTerminate::doInitTerminate()':
22:29:22,331 INFO - test_va_api_init_terminate.cpp:41:8: error: suggest explicit braces to avoid ambiguous 'else' [-Werror=dangling-else]
22:29:22,331 INFO - if (vaDisplay)
22:29:22,331 INFO - ^
it is duplicated from intel/intel-vaapi-driver#84
[ FAILED ] VAAPIDisplayAttribs.MaxNumDisplayAttribs
[ FAILED ] VAAPIDisplayAttribs.GetDisplayAttribs
[ FAILED ] VAAPIDisplayAttribs.SetDisplayAttribs
when max display attributes is zero
New vaStr... methods are being added in libva 2.0 (01org/libva/pull/117). Convert the tests to use the new methods instead of internal methods.
CreateSurfaces/VAAPICreateSurfaces.CreateSurfacesWithCofigAttribs/2226 ,
TEST_P(VAAPICreateSurfaces, CreateSurfacesWithCofigAttribs)
doGetConfigAttributes(currentProfile,
currentEntrypoint);
doQuerySurfacesWithConfigAttribs(currentProfile,
currentEntrypoint);
if driver support both VA_DEC_SLICE_MODE_NORMAL | VA_DEC_SLICE_MODE_BASE for VAConfigAttribDecSliceMode , it will failed.
when we call vaQuerySurfaceAttributes, for the attributes type == VASurfaceAttribMemoryType, driver may report several support memory type method, but it does not means you can set it directly into driver by vaCreateSurfaces. for example, if you set the value tobe VA_SURFACE_ATTRIB_MEM_TYPE_VA | VA_SURFACE_ATTRIB_MEM_TYPE_USER_PTR |VA_SURFACE_ATTRIB_MEM_TYPE_KERNEL_DRM | VA_SURFACE_ATTRIB_MEM_TYPE_DRM_PRIME = 0x30000005, but if vaCreateSurfaces set the value to be 0x30000005, driver certainly does not know the real memory type. it will block the test cases.
vaSetDriverName to i965
but actually the driver maybe is iHD or from other vendor
There are clearly copy & paste deps going on here from libva and some of the file permissions are wonky. Clean it up before I submit packages to OpenSuse. Also, cut an initial release.
test CreateBuffer/VAAPICreateBuffer.CreateBufferWithOutData/59
it will create VAMacroblockParameterBufferType buffer, but if driver dose not support macroblock parameter, it should return failed instead of VA_STATUS_SUCCESS
Current pre-release 1.8.0.pre1 tarball name is using underscores like libva_utils-1.8.0.pre1 when automated building systems require it to use hyphens to compile. To keep consistency with related projects this has to be changed to use hyphens on the package name.
Test should be:
$ ./autogen.sh --prefix= ... other config options if needed
$ make dist
The resultant tarball will be
libva-utils-1.8.0.tar.gz and libva-utils-1.8.0.tar.bz2
CXX test_va_api-test_va_api_fixture.o
In file included from test_va_api_fixture.cpp:25:0:
test_va_api_fixture.h:27:23: fatal error: test_data.h: No such file or directory
#include "test_data.h"
^
compilation terminated.
Various files (CONTRIBUTING.md, INSTALL, configure.ac, README.md) have links to the old "01org" URLs. Some of these links no longer work properly and should be updated to new "intel" URLs.
Expects there to be a putsurface bin program regardless...
Hello, partner. I find h.264 encode sample, but I can't find h.264 decode sample. Please supply h.264 encode sample, Thank you !
I think maybe VA_ENC_SLICE_STRUCTURE_ARBITRARY_ROWS was supposed to be non-zero, but right now this is an always false comparison:
https://github.com/01org/libva-utils/blob/c9af683d6cb1f7d79ac0a300cc0f586569466738/encode/h264encode.c#L1246
I was about to write similar code and couldn't get my head around how it is supposed to be used. Maybe it should be redefined to be 0x00000004
... ?
In the Debian package we included https://sources.debian.net/src/libva/1.7.3-2/debian/vainfo.1/. It would be great to have a manpage with extended content included in libva-utils itself.
There's a small tool (I'm not the author) which I found very useful to query all driver's capabilites:
http://ixia.jkqxz.net/~mrt/vadumpcaps.c
I think it would be a good idea to merge it, or something similar, besides vainfo, in this package.
To stay consistent with intel-vaapi-driver, can we change the tests enable flag to --enable-tests?
test_va_api_createbuffer.cpp line 171 doCreateContext(Resolution(1, 1)); not check the min resolution, it will failed. then cause CreateBuffer test failed.
vainfo libva info: VA-API version 0.40.0 libva info: va_getDriverName() returns 0 libva info: User requested driver 'iHD' libva info: Trying to open /opt/intel/mediasdk/lib64/iHD_drv_video.so libva error: dlopen of /opt/intel/mediasdk/lib64/iHD_drv_video.so failed: /opt/intel/mediasdk/lib64/iHD_drv_video.so: undefined symbol: drm_intel_gem_bo_unmap_wc libva info: va_openDriver() returns -1 vaInitialize failed with error code -1 (unknown libva error),exit
Making all in encode make[2]: Entering directory
/home/ubuntu/Downloads/libva-utils/encode'
CC avcenc-avcenc.o
avcenc.c: In function ‘create_encode_pipe’:
avcenc.c:236:32: error: ‘struct ’ has no member named ‘roi_rc_qp_delat_support’
roi_config->bits.roi_rc_qp_delat_support == 0) {
^
avcenc.c: In function ‘begin_picture’:
avcenc.c:861:27: error: ‘VAEncMiscParameterBufferROI’ has no member named ‘roi_flags’
misc_roi_param->roi_flags.bits.roi_value_is_qp_delta = 1;
^
make[2]: *** [avcenc-avcenc.o] Error 1
make[2]: Leaving directory /home/ubuntu/Downloads/libva-utils/encode' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory
/home/ubuntu/Downloads/libva-utils'
make: *** [all] Error 2
`
libva-utils - 1.8.0.pre2
Libva VA-API version ............. : 0.99.0
Installation prefix .............. : /usr/local
Extra window systems ............. : drm
Enable Unit-tests .................... : yes
skipped or not, every test case in test_va_api_createsurfaces.cpp is printing "SKIPPED" in console output unconditionally
Especially since we may have gtest failures that we want to just set aside and ignore. You break the build for packaging. Most packaging requires a make check-local. If for some reason one test is failing with libva, you make it impossible to actually package even if said test is not relevant. ALSO the basis of this github repo is not just the gtest for libva but also apps and utilities. Given our current track-record of issues with the gtests, I don't think this project is mature enough with its gtest implementations to be running this by default or at best allow a way to manually disable a test check.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.