Page MenuHomeFreeBSD

multimedia/libvdpau-va-gl: VDPAU driver with OpenGL/VAAPI backend
ClosedPublic

Authored by jbeich on Mar 19 2017, 5:15 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Mar 26, 12:56 PM
Unknown Object (File)
Feb 27 2024, 4:30 AM
Unknown Object (File)
Jan 8 2024, 4:13 AM
Unknown Object (File)
Jan 6 2024, 9:59 PM
Unknown Object (File)
Jan 3 2024, 3:32 PM
Unknown Object (File)
Dec 24 2023, 12:39 PM
Unknown Object (File)
Dec 21 2023, 3:42 AM
Unknown Object (File)
Dec 20 2023, 12:58 AM
Subscribers

Details

Summary

Let's add a wrapper for a number of VDPAU-only ports:

  • multimedia/gmerlin-avdecoder
  • multimedia/mplayer + multimedia/mplayer2
  • multimedia/mythtv + multimedia/mythtv-frontend
  • multimedia/vdr-plugin-xineliboutput

https://repology.org/metapackage/libvdpau-va-gl/versions

Test Plan

poudriere bulk -t is green for 10.3 i386/amd64, 11.0 i386/amd64, 12.0 amd64.

portlint -AC shows false positives for libvdpau plugins that don't need ldconfig cache. Let's not repeat multimedia/libva-*-driver folly.

Runtime testing was done on

$ vainfo
libva info: VA-API version 0.39.4
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/local/lib/va/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 1.7.3)
vainfo: Driver version: Intel i965 driver for Intel(R) Skylake - 1.7.3
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Simple            : VAEntrypointEncSlice
      VAProfileMPEG2Main              : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointEncSlice
      VAProfileH264ConstrainedBaseline: VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSliceLP
      VAProfileH264Main               : VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointEncSlice
      VAProfileH264Main               : VAEntrypointEncSliceLP
      VAProfileH264High               : VAEntrypointVLD
      VAProfileH264High               : VAEntrypointEncSlice
      VAProfileH264High               : VAEntrypointEncSliceLP
      VAProfileH264MultiviewHigh      : VAEntrypointVLD
      VAProfileH264MultiviewHigh      : VAEntrypointEncSlice
      VAProfileH264StereoHigh         : VAEntrypointVLD
      VAProfileH264StereoHigh         : VAEntrypointEncSlice
      VAProfileVC1Simple              : VAEntrypointVLD
      VAProfileVC1Main                : VAEntrypointVLD
      VAProfileVC1Advanced            : VAEntrypointVLD
      VAProfileNone                   : VAEntrypointVideoProc
      VAProfileJPEGBaseline           : VAEntrypointVLD
      VAProfileJPEGBaseline           : VAEntrypointEncPicture
      VAProfileVP8Version0_3          : VAEntrypointVLD
      VAProfileVP8Version0_3          : VAEntrypointEncSlice
      VAProfileHEVCMain               : VAEntrypointVLD
      VAProfileHEVCMain               : VAEntrypointEncSlice

but VDPAU only sees H264

$ vdpauinfo
display: :0   screen: 0
ATTENTION: default value of option force_s3tc_enable overridden by environment.
libva info: VA-API version 0.39.4
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/local/lib/va/i965_drv_video.so
libva info: Found init function __vaDriverInit_0_39
libva info: va_openDriver() returns 0
API version: 1
Information string: OpenGL/VAAPI backend for VDPAU

Video surface:

name   width height types
-------------------------------------------
420     4096  4096  NV12 YV12 UYVY YUYV Y8U8V8A8 V8U8Y8A8
422     4096  4096  NV12 YV12 UYVY YUYV Y8U8V8A8 V8U8Y8A8
444     4096  4096  NV12 YV12 UYVY YUYV Y8U8V8A8 V8U8Y8A8

Decoder capabilities:

name                        level macbs width height
----------------------------------------------------
MPEG1                          --- not supported ---
MPEG2_SIMPLE                   --- not supported ---
MPEG2_MAIN                     --- not supported ---
H264_BASELINE                  51 16384  2048  2048
H264_MAIN                      51 16384  2048  2048
H264_HIGH                      51 16384  2048  2048
VC1_SIMPLE                     --- not supported ---
VC1_MAIN                       --- not supported ---
VC1_ADVANCED                   --- not supported ---
MPEG4_PART2_SP                 --- not supported ---
MPEG4_PART2_ASP                --- not supported ---
DIVX4_QMOBILE                  --- not supported ---
DIVX4_MOBILE                   --- not supported ---
DIVX4_HOME_THEATER             --- not supported ---
DIVX4_HD_1080P                 --- not supported ---
DIVX5_QMOBILE                  --- not supported ---
DIVX5_MOBILE                   --- not supported ---
DIVX5_HOME_THEATER             --- not supported ---
DIVX5_HD_1080P                 --- not supported ---
H264_CONSTRAINED_BASELINE      51 16384  2048  2048
H264_EXTENDED                  --- not supported ---
H264_PROGRESSIVE_HIGH          --- not supported ---
H264_CONSTRAINED_HIGH          --- not supported ---
H264_HIGH_444_PREDICTIVE       --- not supported ---
HEVC_MAIN                      --- not supported ---
HEVC_MAIN_10                   --- not supported ---
HEVC_MAIN_STILL                --- not supported ---
HEVC_MAIN_12                   --- not supported ---
HEVC_MAIN_444                  --- not supported ---

Output surface:

name              width height nat types
----------------------------------------------------
B8G8R8A8         16384 16384    -
R8G8B8A8         16384 16384    -
R10G10B10A2      16384 16384    -
B10G10R10A2      16384 16384    -
A8               16384 16384    -

Bitmap surface:

name              width height
------------------------------
B8G8R8A8         16384 16384
R8G8B8A8         16384 16384
R10G10B10A2      16384 16384
B10G10R10A2      16384 16384
A8               16384 16384

Video mixer:

feature name                    sup
------------------------------------
DEINTERLACE_TEMPORAL             -
DEINTERLACE_TEMPORAL_SPATIAL     -
INVERSE_TELECINE                 -
NOISE_REDUCTION                  -
SHARPNESS                        -
LUMA_KEY                         -
HIGH QUALITY SCALING - L1        -
HIGH QUALITY SCALING - L2        -
HIGH QUALITY SCALING - L3        -
HIGH QUALITY SCALING - L4        -
HIGH QUALITY SCALING - L5        -
HIGH QUALITY SCALING - L6        -
HIGH QUALITY SCALING - L7        -
HIGH QUALITY SCALING - L8        -
HIGH QUALITY SCALING - L9        -

parameter name                  sup      min      max
-----------------------------------------------------
VIDEO_SURFACE_WIDTH              -
VIDEO_SURFACE_HEIGHT             -
CHROMA_TYPE                      -
LAYERS                           -

attribute name                  sup      min      max
-----------------------------------------------------
BACKGROUND_COLOR                 -
CSC_MATRIX                       -
NOISE_REDUCTION_LEVEL            -
SHARPNESS_LEVEL                  -
LUMA_KEY_MIN_LUMA                -
LUMA_KEY_MAX_LUMA                -


libvdpau-va-gl: Device::Resource::~Resource(): caught exception
libvdpau-va-gl: GLXGlobalContext::~GLXGlobalContext(): caught exception

Let's play 4K 60fps stream

$ mplayer -noconfig all -vo vdpau -vc ffh264vdpau /path/to/foo.mp4
MPlayer SVN-r37905-snapshot-4.0.0 (C) 2000-2016 MPlayer Team

Playing /path/to/foo.mp4
libavformat version 57.56.101 (external)
libavformat file format detected.
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x802fafaf0]Protocol name not provided, cannot determine if input is local or a network protocol, buffers and access patterns cannot be configured optimally without knowing the protocol
[lavf] stream 0: video (h264), -vid 0
VIDEO:  [H264]  3840x2160  24bpp  59.940 fps  48924.2 kbps (5972.2 kbyte/s)
ATTENTION: default value of option force_s3tc_enable overridden by environment.
libva info: VA-API version 0.39.4
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/local/lib/va/i965_drv_video.so
libva info: Found init function __vaDriverInit_0_39
libva info: va_openDriver() returns 0
==========================================================================
Forced video codec: ffh264vdpau
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
libavcodec version 57.64.101 (external)
Selected video codec: [ffh264vdpau] vfm: ffmpeg (FFmpeg H.264 (VDPAU))
==========================================================================
Clip info:
 major_brand: isom
 minor_version: 512
 compatible_brands: isomiso2avc1mp41
 encoder: Lavf57.41.100
Load subtitles in /path/to/
==========================================================================
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
AUDIO: 48000 Hz, 2 ch, floatle, 95.5 kbit/3.11% (ratio: 11932->384000)
Selected audio codec: [ffaac] afm: ffmpeg (FFmpeg AAC (MPEG-2/MPEG-4 Audio))
==========================================================================
AO: [oss] 48000Hz 2ch s16le (2 bytes per sample)
Starting playback...
Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
VO: [vdpau] 3840x2160 => 3840x2160 H.264 VDPAU acceleration
Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
VO: [vdpau] 3840x2160 => 3840x2160 H.264 VDPAU acceleration
[ASPECT] Warning: No suitable new res found!
[ASPECT] Warning: No suitable new res found!
V: 131.2   0/  0  8% 84%  0.0% 0 0


Exiting... (End of file)

Diff Detail

Repository
rP FreeBSD ports repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Add support for building/running tests. All fail with OTHER_FAULT and SEGFAULT inside a jail probably due to missing TEST_DEPENDS. Otherwise, here're the results:

$ make test
[...]
Test project /usr/ports/multimedia/libvdpau-va-gl/work/libvdpau-va-gl-0.4.2
      Start  1: test-000
 1/11 Test  #1: test-000 .........................   Passed    0.00 sec
      Start  2: test-001
 2/11 Test  #2: test-001 .........................   Passed    0.03 sec
      Start  3: test-002
 3/11 Test  #3: test-002 .........................   Passed    0.03 sec
      Start  4: test-003
 4/11 Test  #4: test-003 .........................   Passed    0.03 sec
      Start  5: test-004
 5/11 Test  #5: test-004 .........................   Passed    0.03 sec
      Start  6: test-005
 6/11 Test  #6: test-005 .........................   Passed    0.03 sec
      Start  7: test-006
 7/11 Test  #7: test-006 .........................   Passed    0.56 sec
      Start  8: test-007
 8/11 Test  #8: test-007 .........................   Passed    0.02 sec
      Start  9: test-008
 9/11 Test  #9: test-008 .........................   Passed    0.09 sec
      Start 10: test-009
10/11 Test #10: test-009 .........................   Passed    0.51 sec
      Start 11: test-010
11/11 Test #11: test-010 .........................   Passed    0.03 sec

100% tests passed, 0 tests failed out of 11

So this is a request from you for me to add and maintain this port?

I can accept this but I'd like to be sure I understand correctly.

Slightly reworded comment about symlinks.

So this is a request from you for me to add and maintain this port?

Correct. I don't plan to use this port, and you're already maintaining libva, libvdpau and their drivers.

Sorry it took so long.

I'm approving this and will add the port shortly to the ports tree.

Thanks for your submission.

This revision is now accepted and ready to land.Apr 2 2017, 3:57 PM
This revision was automatically updated to reflect the committed changes.