Skip to content

vdpau: Add support for P010 and P016 formats to query.

Chris Rankin requested to merge rankinc/mesa:vdpau-10bit-formats into main
vdpau: Add support for P010 and P016 formats to query.

Cc: mesa-stable

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10614
Signed-off-by: Chris Rankin <rankincj@gmail.com>

Allow cards that support decoder profile HEVC_MAIN_10 to advertise their support for P010 and P016. This changes the output of vdpauinfo accordingly:

$ diff -u vdpauinfo-BASE vdpauinfo-NEW 
--- vdpauinfo-BASE	2024-02-21 16:43:35.915555003 +0000
+++ vdpauinfo-NEW	2024-02-21 16:43:45.966571631 +0000
@@ -9,7 +9,7 @@
 420    16384 16384  NV12 YV12 
 422    16384 16384  UYVY YUYV 
 444    16384 16384  Y8U8V8A8 V8U8Y8A8 
-420_16 16384 16384  
+420_16 16384 16384  P010 P016 
 422_16 16384 16384  
 444_16 16384 16384  

Edit: Having thought about this some more, and comparing with output from a hybrid Intel/NVIDIA laptop, I am wondering if the difference should actually look more like this:

$ diff -u vdpauinfo-BASE vdpauinfo-NEW 
--- vdpauinfo-BASE	2024-02-22 00:23:04.191367176 +0000
+++ vdpauinfo-NEW	2024-02-22 00:23:11.637380717 +0000
@@ -6,10 +6,10 @@
 
 name   width height types
 -------------------------------------------
-420    16384 16384  NV12 YV12 
-422    16384 16384  UYVY YUYV 
-444    16384 16384  Y8U8V8A8 V8U8Y8A8 
-420_16 16384 16384  
+420    16384 16384  NV12 YV12 UYVY YUYV Y8U8V8A8 V8U8Y8A8 P010 P016 
+422    16384 16384  NV12 YV12 UYVY YUYV Y8U8V8A8 V8U8Y8A8 P010 P016 
+444    16384 16384  NV12 YV12 UYVY YUYV Y8U8V8A8 V8U8Y8A8 P010 P016 
+420_16 16384 16384  NV12 YV12 UYVY YUYV Y8U8V8A8 V8U8Y8A8 P010 P016 
 422_16 16384 16384  
 444_16 16384 16384  

Edit: I have obtained vdpauinfo output from a PC with an NVIDIA graphics card rather than hybrid Intel / NVIDIA graphics:

Information string: NVIDIA VDPAU Driver Shared Library  545.29.06  Thu Nov 16 01:46:47 UTC 2023

Video surface:

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

so the original behaviour is clearly the correct behaviour.

Edited by Chris Rankin

Merge request reports