Giter Site home page Giter Site logo

intel / libva-utils Goto Github PK

View Code? Open in Web Editor NEW
195.0 31.0 161.0 2.3 MB

Libva-utils is a collection of tests for VA-API (VIdeo Acceleration API)

Home Page: https://01.org/linuxmedia

License: Other

Makefile 0.37% Shell 0.03% C 67.11% C++ 32.17% M4 0.15% Meson 0.17%

libva-utils's Issues

"skipped" should be recorded in xml output

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.

Compilation fails if configured with --disable-x11

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.

Compile failure when libva-wayland not present

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'

compiled error for the libva-utils with --enable-tests on 1.8.0.pre1 tarball

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

  • '[' 2 '!=' 0 ']'
  • echo Error....
    Error....

Reported-by: Focus Luo [email protected]

TEST_P(VAAPIGetCreateConfig, CreateConfigWithAttributes)

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?

putsurface-wayland compile error

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.

debian control files not used by packagers

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.

[media/libva][Libva-Utils] vainfo can't show the libva version info

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)

Release h264encode crashes on KBL @ 4K

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.`

test failures when hybrid-codec enabled

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

v2.0 compile error in test

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

Libva-Utils fails to compile with GCC 7.1.1

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  - ^

should not use the value returned from vaGetConfigAttributes directly for vaCreateConfig

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.

SurfaceAttributes should not be set together

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.

libva-utils pre-release tarballs and release tarball name should be hyphenated instead of underscored.

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

frame_num is not continuous

The error frame_num is 257, the previous frame_number is 255, it should be 256. Could you help me to fix this issue? below setting can reproduce this issue. the frequency is %100.

INPUT: IntraPeriod : 260
INPUT: IDRPeriod : 260
INPUT: IpPeriod : 1

image

Links are out of date

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.

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

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

avcenc.c:236:32: error: ‘struct <anonymous>’ has no member named ‘roi_rc_qp_delat_support’

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

Make check-local should not auto-run gtests as a pre-requisite by default

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.