Bug 2075057

Summary: Rebase to 1.5 with AV1 support
Product: Red Hat Enterprise Linux 9 Reporter: Nicolas Chauvet (kwizart) <kwizart>
Component: libvdpauAssignee: Benjamin Tissoires <btissoir>
Status: CLOSED ERRATA QA Contact: Peter Kopec <pekopec>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: CentOS StreamCC: bstinson, btissoir, jwboyer, ndegraef, pekopec, tpelka
Target Milestone: rcKeywords: Triaged
Target Release: ---Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: libvdpau-1.5-1.el9 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-05-09 07:52:54 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Nicolas Chauvet (kwizart) 2022-04-13 14:04:22 UTC
Description of problem:
libvdpau in current centos-stream doesn't provide the full feature capabilities of the vdpau API by lacking support of the AV1 codec.

Version-Release number of selected component (if applicable):
Current CentOS Stream 9

How reproducible:
always

Steps to Reproduce:
1. Build an application with VDPAU AV1 support enabled (ffmpeg, gst, etc)
2. Use an AV1 enable vdpau backend (NVIDIA binary driver with Ampere GPU, or any other API bridge: vaapi, v4l2, etc).


Actual results:
vdpauinfo on current centos stream doesn't show an AV1 entry because the libvdpau wrapper library doesn't provide this codec.



Expected results:
vdpauinfo                                                                                                                                  
display: :1   screen: 0
API version: 1
Information string: NVIDIA VDPAU Driver Shared Library  510.60.02  Wed Mar 16 11:15:55 UTC 2022

Video surface:

name   width height types
-------------------------------------------
420     4096  4096  NV12 YV12 
422     4096  4096  UYVY YUYV 
444     4096  4096  NV24 YV24 
420_16  4096  4096  P010 P016 
422_16  4096  4096  UYVY YUYV 
444_16  4096  4096  Y_U_V_444_16 

Decoder capabilities:

name                        level macbs width height
----------------------------------------------------
MPEG1                           0 65536  4080  4080
MPEG2_SIMPLE                    3 65536  4080  4080
MPEG2_MAIN                      3 65536  4080  4080
H264_BASELINE                  51 65536  4096  4096
H264_MAIN                      51 65536  4096  4096
H264_HIGH                      51 65536  4096  4096
VC1_SIMPLE                      1  8190  2048  2048
VC1_MAIN                        2  8190  2048  2048
VC1_ADVANCED                    4  8190  2048  2048
MPEG4_PART2_SP                  3  8192  2048  2048
MPEG4_PART2_ASP                 5  8192  2048  2048
DIVX4_QMOBILE                   0  8192  2048  2048
DIVX4_MOBILE                    0  8192  2048  2048
DIVX4_HOME_THEATER              0  8192  2048  2048
DIVX4_HD_1080P                  0  8192  2048  2048
DIVX5_QMOBILE                   0  8192  2048  2048
DIVX5_MOBILE                    0  8192  2048  2048
DIVX5_HOME_THEATER              0  8192  2048  2048
DIVX5_HD_1080P                  0  8192  2048  2048
H264_CONSTRAINED_BASELINE      51 65536  4096  4096
H264_EXTENDED                  51 65536  4096  4096
H264_PROGRESSIVE_HIGH          51 65536  4096  4096
H264_CONSTRAINED_HIGH          51 65536  4096  4096
H264_HIGH_444_PREDICTIVE       51 65536  4096  4096
VP9_PROFILE_0                  --- not supported ---
VP9_PROFILE_1                  --- not supported ---
VP9_PROFILE_2                  --- not supported ---
VP9_PROFILE_3                  --- 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 ---
HEVC_MAIN_444_10               --- not supported ---
HEVC_MAIN_444_12               --- not supported ---
AV1_MAIN                       --- not supported ---
AV1_HIGH                       --- not supported ---
AV1_PROFESSIONAL               --- not supported --


Additional info:

The solution is to rebase libvdpau to 1.5 (pending MR in gitlab).

vdpauinfo will be made available on EPEL with the needed backport to display AV1 support availability.

Comment 1 Nicolas Chauvet (kwizart) 2022-04-19 15:46:59 UTC
Merge request at gitlab.com (still require to upload the newer libvdpau-1.5 to lookaside cache).
https://gitlab.com/redhat/centos-stream/rpms/libvdpau/-/merge_requests/2

Comment 2 Nicolas Chauvet (kwizart) 2022-12-01 10:24:30 UTC
Hello @Benjamin Tissoires 

You are supposed to be the Red Hat assignee for the bug.
Can you help me going this issue forward ?
First, I need you to upload the libvdpau archive into the rhel lookaside cache.

Thanks in advance.

Comment 3 Benjamin Tissoires 2022-12-01 11:23:51 UTC
(In reply to Nicolas Chauvet (kwizart) from comment #2)
> Hello @Benjamin Tissoires 
> 
> You are supposed to be the Red Hat assignee for the bug.
> Can you help me going this issue forward ?
> First, I need you to upload the libvdpau archive into the rhel lookaside
> cache.

So after fighting internal systems for a long time this morning I managed to upload the source. Sorry for the delay.

However, the "first" thing is actually not uploading the source unfortunately. It is to check with everyone if the rebase is allowed and if QA has the bandwidth to test it.

It's a good thing that you added steps to reproduce the issue you are seeing, because QA will be able to validate more easily (I am not sure we have a lot of tests for libvdpau).

I'll try to sort out the RHEL internals today.

Comment 4 Nicolas Chauvet (kwizart) 2022-12-01 12:49:18 UTC
Thanks for the update.

As libvdpau is concerned, the only needed test is to be able to advertise the AV1 specific struct (such as VdpPictureInfoAV1) and definitions in libvdpau-devel so that VDPAU enabled applications can use it.

For the Record, one reason why libvpdau is in RHEL instead of EPEL is because RHEL can build for i686 (whereas EPEL not).
So nothing else will make use of libvdpau inside RHEL itslef (at least until mesa is rebased to a later version that will support AV1 in vdpau / and mesa-vdpau-driver is enabled in RHEL, which is not the case anyway).

libvdpau been a FLOSS part of graphic drivers (including Nvidia proprietary driver), updating it will allow to advertise the full capabilities of the driver to 3rd part applications.

So the best test that can be provided as part of the QA for this component is to build vdpauinfo-1.5 (available in Fedora, older version currently provided in EPEL9) with this updated libvdpau and to verify that the AV1 specific fields appear, like with:
$ vdpauinfo
...
AV1_MAIN                       --- not supported ---
AV1_HIGH                       --- not supported ---
AV1_PROFESSIONAL               --- not supported ---
...

Hope this helps.

Comment 6 Nicolas Chauvet (kwizart) 2022-12-14 09:29:19 UTC
Side note (and reminder), this also applies to RHEL8 if possible (and RHEL7, but that one migth be too far).

Comment 11 Peter Kopec 2023-02-08 11:45:18 UTC
I have tested libvdpau-1.4-4.el9.x86_64 and libvdpau-1.5-1.el9.x86_64 on GA104 (RTX 3070) and i have some output for both.
I have used vdpauinfo-1.5-2.fc38.x86_64 and also vdpauinfo-1.4-4.fc37.x86_64.
I am using NVIDIA VDPAU Driver Shared Library  525.85.05

Output section of AV1 
AV1_MAIN                       16 262144  8192  8192
AV1_HIGH                       --- not supported ---
AV1_PROFESSIONAL               --- not supported ---

Comment 12 Niels De Graef 2023-02-08 12:31:49 UTC
That looks fine. "Main", "High" and "Professional" are profiles for AV1 [1] and which ones are supported depends on both the hardware and software. If 1 is supported, we have AV1 support

[1]: https://aomedia.org/av1/specification/annex-a/

Comment 13 Nicolas Chauvet (kwizart) 2023-02-08 13:37:40 UTC
Thx for the work on this.
Also worth mentioning https://developer.nvidia.com/video-encode-and-decode-gpu-support-matrix-new for features set according to hardware in the nvidia case.

There is no mention for HIGH/PROFESSIONAL AV1 profiles. Only 8bit or 10bit that applies to MAIN or HIGH profiles

Comment 15 errata-xmlrpc 2023-05-09 07:52:54 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (libvdpau bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2023:2392