Quantcast
Channel: Intel® Software - Media
Viewing all articles
Browse latest Browse all 2185

How to Linux multithread to va-api hardware acceleration?

$
0
0

 

Hello?

In a Linux environment, video transcoding is performed using multi-threading in an account with a video group.
The first thread is processing video transcoding 'va_getDriverName() failed with operation failed, driver_name = i965' when the second thread calls the CreateVAAPIDevice() function
However, when calling the CreateAVAPIDevice() function when executing the process with the root account, the iHD_drv_video.so library is called and processed normally

First thread..

libva info: VA-API version 0.35.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 info: Found init function __vaDriverInit_0_32
libva info: va_openDriver() returns 0

Second thread..

libva info: VA-API version 0.35.0
libva info: va_getDriverName() returns 1
libva error: va_getDriverName() failed with operation failed,driver_name=i965
terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc

 

I want to run the program from a user other than the root account
Should a user in the video group call the CreateAVAPIDevice () function only once when the application is running?

Thanks in advance.

 

My Linux environment..

$ ll /opt/intel/mediasdk/lib64

drwxr-xr-x  2 root root       76  4월 28  2015 ./
drwxr-xr-x 10 root root     4096  5월 11 01:47 ../
-rwxr-xr-x  1 root root 25162960  2월 17  2015 iHD_drv_video.so*
-rwxr-xr-x  1 root root 10605896  2월 17  2015 libmfxhw64-p.so.1.14*
lrwxrwxrwx  1 root root       20  4월 28  2015 libmfxhw64.so -> libmfxhw64-p.so.1.14*

$ id
uid=201(k3) gid=200(informix) groups=200(informix),39(video)

$ ll /dev/dri

drwxr-xr-x  2 root root       100  5월 28 02:40 ./
drwxr-xr-x 19 root root      3220  5월 28 02:40 ../
crw-rw-rw-  1 root video 226,   0  5월 28 02:40 card0
crw-rw-rw-  1 root video 226,  64  5월 28 02:40 controlD64
crw-rw-rw-  1 root video 226, 128  5월 28 02:40 renderD128

$ vainfo
error: can't connect to X server!
libva info: VA-API version 0.35.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 info: Found init function __vaDriverInit_0_32
libva info: va_openDriver() returns 0
vainfo: VA-API version: 0.35 (libva 1.3.1)
vainfo: Driver version: 16.4.32088-ubit
vainfo: Supported profile and entrypoints
      VAProfileNone                   : VAEntrypointVideoProc
      VAProfileNone                   : <unknown entrypoint>
      VAProfileMPEG2Simple            : VAEntrypointEncSlice
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointEncSlice
      VAProfileMPEG2Main              : VAEntrypointVLD
      VAProfileMPEG4Simple            : VAEntrypointVLD
      VAProfileMPEG4AdvancedSimple    : VAEntrypointVLD
      VAProfileMPEG4Main              : VAEntrypointVLD
      VAProfileH264Baseline           : VAEntrypointEncSlice
      VAProfileH264Baseline           : <unknown entrypoint>
      VAProfileH264Baseline           : <unknown entrypoint>
      VAProfileH264Main               : VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointEncSlice
      VAProfileH264Main               : <unknown entrypoint>
      VAProfileH264Main               : <unknown entrypoint>
      VAProfileH264High               : VAEntrypointVLD
      VAProfileH264High               : VAEntrypointEncSlice
      VAProfileH264High               : <unknown entrypoint>
      VAProfileH264High               : <unknown entrypoint>
      VAProfileVC1Simple              : VAEntrypointVLD
      VAProfileVC1Main                : VAEntrypointVLD
      VAProfileVC1Advanced            : VAEntrypointVLD
      VAProfileJPEGBaseline           : VAEntrypointVLD
      VAProfileJPEGBaseline           : VAEntrypointEncPicture
      VAProfileH264ConstrainedBaseline: VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
      VAProfileH264ConstrainedBaseline: <unknown entrypoint>
      VAProfileH264ConstrainedBaseline: <unknown entrypoint>
      VAProfileVP8Version0_3          : VAEntrypointEncSlice
      VAProfileVP8Version0_3          : VAEntrypointVLD
      VAProfileVP8Version0_3          : <unknown entrypoint>

$ env

LIBVA_DRIVERS_PATH=/opt/intel/mediasdk/lib64
LIBVA_DRIVER_NAME=iHD
MFX_HOME=/opt/intel/mediasdk

 

 


Viewing all articles
Browse latest Browse all 2185

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>