Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 815569 - Enabling VDPAU within Mesa
Summary: Enabling VDPAU within Mesa
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: mesa
Version: 18
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Tom "spot" Callaway
QA Contact: Dan Mashal
URL:
Whiteboard:
: 768145 (view as bug list)
Depends On:
Blocks: FE-Legal F18-accepted, F18FinalFreezeExcept
TreeView+ depends on / blocked
 
Reported: 2012-04-23 21:42 UTC by Nicolas Chauvet (kwizart)
Modified: 2013-12-03 10:43 UTC (History)
19 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-05-25 00:05:14 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Enable VDPAU within mesa (1.87 KB, patch)
2012-04-23 21:42 UTC, Nicolas Chauvet (kwizart)
no flags Details | Diff
Add --with=vdpau option to mesa.spec (2.33 KB, patch)
2013-01-06 20:12 UTC, Stefan Becker
no flags Details | Diff

Description Nicolas Chauvet (kwizart) 2012-04-23 21:42:42 UTC
Created attachment 579702 [details]
Enable VDPAU within mesa

Description of problem:
Current  support a vdpau state tracker

Version-Release number of selected component (if applicable):
Mesa 8.0.x in F-17 and later.

How reproducible:
always

Steps to Reproduce:
1. vdpauinfo with nouveau,r300,r600 should reports some decoders capabilities.

  
Actual results:
output nothing

Expected results:
$ vdpauinfo
...
Decoder capabilities:

name               level macbs width height
-------------------------------------------
MPEG1                16 262144  8192  8192
MPEG2_SIMPLE         16 262144  8192  8192
MPEG2_MAIN           16 262144  8192  8192
...

Additional info:
I've successfully tested a captured DVB-t stream with a VDPAU enabled player.
I'm not sure of either VDPAU can be enabled in the "without hardware" case.
I will try to reproduce on an Intel card.

Comment 1 Nicolas Chauvet (kwizart) 2012-04-23 21:54:15 UTC
Scratch built:
http://koji.fedoraproject.org/koji/taskinfo?taskID=4016470

Related components:
(Open)
Review Request: libva-vdpau-driver - HW video decode support for VDPAU platforms
https://bugzilla.redhat.com/show_bug.cgi?id=771254

(Closed)
gstreamer-plugins-bad-free can enable libvdpau-devel
https://bugzilla.redhat.com/show_bug.cgi?id=734242

Comment 2 Nicolas Chauvet (kwizart) 2012-04-23 21:57:11 UTC
*** Bug 768145 has been marked as a duplicate of this bug. ***

Comment 3 Nicolas Chauvet (kwizart) 2012-04-23 22:01:22 UTC
The previous report was worded as VA-API activation but was searching for libvdpau_r600.so which is the result of the VDPAU activation. VA-API state tracker is marked as un-maintained in mesa-8.0.x. So I guess VDPAU was actually intended in this previous report.

Comment 4 Gianluca Cecchi 2012-06-06 09:03:09 UTC
Hello I would like to use vdpau with nouveau too.
Currently my F17 has:
mesa-dri-drivers-8.0.3-1.fc17.x86_64
mesa-libOSMesa-8.0.3-1.fc17.x86_64
mesa-libGL-8.0.3-1.fc17.x86_64
mesa-libxatracker-8.0.3-1.fc17.x86_64
mesa-libglapi-8.0.3-1.fc17.x86_64
mesa-libGLU-8.0.3-1.fc17.x86_64
mesa-dri-filesystem-8.0.3-1.fc17.x86_64

I'm going to test with 
- Asus U36sd and hybrid graphics (nVidia is GeForce GT520M):
00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09) (prog-if 00 [VGA controller])
01:00.0 VGA compatible controller: nVidia Corporation Device 1050 (rev ff) (prog-if ff)

- pc with GeForce 9600GT

I have not understood how to download mesa-8.0.2-4.fc18.src.rpm as in comment#1 and compare the spec file with current F17 one.
Is it possible to rebase the source?
Or can you give the changes to put inside the F17 spec file, so that I can recompile myself and test?
Thanks in advance

Comment 5 Martin Dengler 2012-06-11 14:25:06 UTC
(In reply to comment #4)
> Or can you give the changes to put inside the F17 spec file, so that I can
> recompile myself and test?
> Thanks in advance

Nicolas's scratch builds have expired.  I have built a F17 RPM; you can download it and the SRPM at http://koji.fedoraproject.org/koji/taskinfo?taskID=4150636 .  You will also want the libva-vdpau radeon driver RPM/SRPM at http://koji.fedoraproject.org/koji/taskinfo?taskID=4150630 .

Comment 6 Gianluca Cecchi 2012-08-07 08:35:57 UTC
I missed that scratch build... I don't know if current updates include vdpau support
At this moment my packages from standard F17 repo are:
mesa-dri-drivers-8.0.3-3.fc17.x86_64
libva-vdpau-driver-0.7.3-2.fc17.x86_64
libvdpau-0.4.1-7.fc17.x86_64
mesa-libGL-8.0.3-3.fc17.x86_64
mesa-libGLU-8.0.3-3.fc17.x86_64
mesa-libOSMesa-8.0.3-3.fc17.x86_64
libvdpau-docs-0.4.1-7.fc17.x86_64
vdpauinfo-0.0.6-4.fc17.x86_64
mesa-libGL-8.0.3-3.fc17.i686
mesa-dri-filesystem-8.0.3-3.fc17.x86_64
mesa-libglapi-8.0.3-3.fc17.x86_64
mesa-libxatracker-8.0.3-3.fc17.x86_64
mesa-libglapi-8.0.3-3.fc17.i686
libva-utils-1.0.15-2.fc17.x86_64
libva-1.0.15-2.fc17.x86_64


$ sudo optirun /usr/bin/vdpauinfo
display: :0   screen: 0
Failed to open VDPAU backend libvdpau_nvidia.so: cannot open shared object file: No such file or directory
Error creating VDPAU device: 1

While I see in libva-vdpau-driver rpm only

/usr/lib64/dri/nvidia_drv_video.so
/usr/lib64/dri/s3g_drv_video.so
/usr/lib64/dri/vdpau_drv_video.so
/usr/share/doc/libva-vdpau-driver-0.7.3
/usr/share/doc/libva-vdpau-driver-0.7.3/AUTHORS
/usr/share/doc/libva-vdpau-driver-0.7.3/COPYING
/usr/share/doc/libva-vdpau-driver-0.7.3/NEWS
/usr/share/doc/libva-vdpau-driver-0.7.3/README

Do I have to create any soft link to have it working?

Comment 7 Kevin DeKorte 2012-09-19 14:01:23 UTC
I have an r600 based video card and while I can build mesa with the --enable-vdpau and get some support, I would prefer if mesa came with this feature enabled.

vdpauinfo currently reports the following

vdpauinfo 
display: :0   screen: 0
Failed to open VDPAU backend libvdpau_r600.so: cannot open shared object file: No such file or directory
Error creating VDPAU device: 1

Comment 8 Kevin DeKorte 2012-12-21 16:13:49 UTC
Any update on mesa being built with the --enable-vdpau option? Would be nice to have for F18

Comment 9 Dan Mashal 2012-12-22 04:12:26 UTC
The method to add this as noted in the patch is extremely trivial. What's the hold up? This is not enabled on 16,17,or 18. 

Adding to f18-nth to get some response here.

Comment 10 drago01 2012-12-26 10:51:53 UTC
I have not looked at the code but there is a potential problem here:

If the vdpau support is implemented using the hardware decoders it should be fine but if it is implemented using shaders we can't due to patents. That would be the same as allowing ffmpeg in.

Comment 11 Dan Mashal 2012-12-26 12:12:47 UTC
(In reply to comment #10)
> I have not looked at the code but there is a potential problem here:
> 
> If the vdpau support is implemented using the hardware decoders it should be
> fine but if it is implemented using shaders we can't due to patents. That
> would be the same as allowing ffmpeg in.

Please look at the patch and comment, it's very a simple patch to the spec file.

Comment 12 drago01 2012-12-26 12:17:26 UTC
(In reply to comment #11)
> (In reply to comment #10)
> > I have not looked at the code but there is a potential problem here:
> > 
> > If the vdpau support is implemented using the hardware decoders it should be
> > fine but if it is implemented using shaders we can't due to patents. That
> > would be the same as allowing ffmpeg in.
> 
> Please look at the patch and comment, it's very a simple patch to the spec
> file.

It has nothing to do with the spec file itself. But with the VDPAU code in mesa that gets enabled.

If that code implements patented codecs using shaders we cannot enable it in fedora.

Comment 13 Dan Mashal 2012-12-26 12:18:25 UTC
It doesn't look like it does. I will attempt a scratch build and see what happens.

Comment 14 Dan Mashal 2012-12-26 21:54:14 UTC
(In reply to comment #12)
> (In reply to comment #11)
> > (In reply to comment #10)
> > > I have not looked at the code but there is a potential problem here:
> > > 
> > > If the vdpau support is implemented using the hardware decoders it should be
> > > fine but if it is implemented using shaders we can't due to patents. That
> > > would be the same as allowing ffmpeg in.
> > 
> > Please look at the patch and comment, it's very a simple patch to the spec
> > file.
> 
> It has nothing to do with the spec file itself. But with the VDPAU code in
> mesa that gets enabled.
> 
> If that code implements patented codecs using shaders we cannot enable it in
> fedora.


https://koji.fedoraproject.org/koji/taskinfo?taskID=4820643

Scratch build successful. Not seeing any licensing issues here. Please double check it or let me know how I can check if there is an issue.

Comment 15 drago01 2012-12-26 22:31:10 UTC
I have no idea how you can conclude that there is a no license issue by doing a scratch build. You have to checkout and review the *code* and verify that the implementation is actually just sending and getting frames from dedicated hardware rather then implement the decoding using shaders.

Comment 16 Dan Mashal 2012-12-26 22:56:43 UTC
Yeah I have no idea how to do that offhand. The rpmbuild just generated some libs. I guess I'll have to look at the code that generated those libs. Thanks.

Comment 17 Dan Mashal 2012-12-26 23:39:38 UTC
Looking at the code with an untrained eye it looks like it does direct hardware rendering (briefly looked at r600).

spot, can you take a look?

Comment 18 Stefan Becker 2013-01-06 20:12:45 UTC
Created attachment 673465 [details]
Add --with=vdpau option to mesa.spec

I understand that Fedora has problems with legally encumbered code. But what about a solution so that, e.g. RPMFusion, could rebuild the Fedora SRPM and *only* generate the VDPAU driver package? If Fedora integrates the attached patch to the mesa package then there would be no need to fork the package downstream.

I've opened a discussion about this solution on the RPMFusion bugzilla:

   https://bugzilla.rpmfusion.org/show_bug.cgi?id=2633

Comment 19 Dan Mashal 2013-01-23 02:50:36 UTC
spot is working on this.

Comment 20 Kevin DeKorte 2013-03-22 13:31:46 UTC
Any update on this?

Comment 21 Liang Suilong 2013-05-05 15:36:28 UTC
I build some package and create a repo for UVD VDPAU hardware decoding. 

Here is the repo URL. All the RPMs, SRPMs and SPECs are there.
http://www.liangsuilong.info/repo/

I wrote a blog post to describe the repo.
http://www.liangsuilong.info/?p=1609

I fetch the latest mesa master branch code. but fails to compile mesa-libOSMesa. I just drop it in this build. All pacakges are not built on koji, just built on my local machine. Because mesa-git requires libdrm-2.4.44. At this time, Fedora 18 just contains libdrm-2.4.42.

Comment 22 Dan Mashal 2013-05-25 00:05:14 UTC
Without much response from maintainers it looks like this is getting enabled in Fedora 19 officially.

Comment 23 Kevin DeKorte 2013-06-01 14:42:51 UTC
Looks like they enabled vdpau, but disabled all the decoders. 

Video surface:

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

Decoder capabilities:

name               level macbs width height
-------------------------------------------

Output surface:

name              width height nat types
----------------------------------------------------
B8G8R8A8          8192  8192    y  NV12 YV12 UYVY YUYV Y8U8V8A8 V8U8Y8A8 
R8G8B8A8          8192  8192    y  NV12 YV12 UYVY YUYV Y8U8V8A8 V8U8Y8A8 
R10G10B10A2       8192  8192    y  NV12 YV12 UYVY YUYV Y8U8V8A8 V8U8Y8A8 
B10G10R10A2       8192  8192    y  NV12 YV12 UYVY YUYV Y8U8V8A8 V8U8Y8A8


Note You need to log in before you can comment on or make changes to this bug.