Closed Bug 1210727 Opened 9 years ago Closed 4 years ago

[meta] Add VA-API hardware decoding support on Linux

Categories

(Core :: Audio/Video: Playback, enhancement, P3)

Desktop
Linux
enhancement

Tracking

()

RESOLVED FIXED

People

(Reporter: jya, Assigned: stransky)

References

(Depends on 1 open bug, )

Details

(Keywords: meta, parity-chrome)

This would do decoding only ; not rendering (yet)
Hardware decoding on Intel Ironlake should be used only for 720p and lower. 
Hardware 1080p decoding on Intel Ironlake is slower than software decoding on CPU: https://bugs.freedesktop.org/show_bug.cgi?id=47858

GPU model from about:support
Intel Open Source Technology Center -- Mesa DRI Intel(R) Ironlake Mobile 

I need to fill separate issue about VA-API on Ironlake or drop this info here is fine?
(In reply to russianneuromancer from comment #1)
> Hardware decoding on Intel Ironlake should be used only for 720p and lower. 
> Hardware 1080p decoding on Intel Ironlake is slower than software decoding
> on CPU: https://bugs.freedesktop.org/show_bug.cgi?id=47858
> 
> GPU model from about:support
> Intel Open Source Technology Center -- Mesa DRI Intel(R) Ironlake Mobile 
> 
> I need to fill separate issue about VA-API on Ironlake or drop this info
> here is fine?

We have a generic preference to disable hardware acceleration, I'll hook it up to vaapi, but I have no intention at this stage to make specific cases for particular chipset.

Would have to be in a separate bug.
Gentle reminder:

* Our guidelines ask you don't argue about priority setting on bugs. Triage leads and Mozillians working on the bug set the priority. See: https://bugzilla.mozilla.org/page.cgi?id=etiquette.html
* "Me too" or "Fix this or I'm moving to Chrome/Lynx/Gopher/Edge/Webkit" comments are off topic and just add noise.
Flags: needinfo?(mhoye)
(In reply to Paul Menzel from comment #11)
> Laurent, if this is still reproducible – I only have 45.9.0 here –, could
> you please create a separate report for this issue? That’d be great.

Is there already a separate report for this issue? There are also some other useful informations gone (i can't remember exactly, but e.g. regarding OpenGL acceleration).
Yes, we also need accelerated layers to be able to render the frames. And right now, this has taken a set back and the feature has been disabled for now.
Depends on: ogl-linux-beta
Just FYI: https://chromium-review.googlesource.com/c/532294 this will be [chrome-parity] soon
Whiteboard: [parity-chrome][qf] → [parity-chrome]
Assignee: jyavenard → nobody

The dependency of this bug could probably changed from ogl-linux-beta to bug 1491303, as webrender will replace all the old rendering architecture and is already enabled on linux + intel in nightly.

Type: defect → enhancement
Depends on: 1543217, 1554251
No longer depends on: ogl-linux-beta
OS: Unspecified → Linux
Hardware: Unspecified → Desktop

Although this bug is only about decoding support, I'd like to leave a note about the rendering: AFAIK rendering without any slow copies requires DMABUF support, so processes can share resources on the GPU.
For the Wayland backend this about to land, see bug 1552590, quote:

Wayland dmabuf surface are located in GPU and can be attached as EGLImage or wl_buffer. It allows direct rendering to GPU and share the HW buffer across processes.

Also see bug 1010527

I've recently spent some time testing the implementations in various browsers. Chromium implements VA-API but it's disabled in official builds and fragile, breaking regularly. Webkit uses gstreamer-vaapi and I've had quality issues with that using both Intel (wrong colours) and AMD (blur) hardware.

I've seen Mozilla tracks issues for VA-API and VDPAU/NVDEC. Have you seen libplacebo1? It encapsulates the core video rendering used in mpv in a reusable library. mpv's video acceleration has been stable and flawless for both VAAPI and NVDEC (and DXVA, FWIW, but I've no experience with that) for years. In contrast to the browsers' and gstreamer va-api implementations, I've never had performance, stability or quality issues with mpv.

In fact, hundreds (thousands?) of Firefox users use several WebExtensions to have videos played in mpv2,3,4.

I haven't worked with either Firefox or mpv code so I can only speak from a user's perspective right now. I just thought, it might be worth to consider implementing libplacebo instead of rolling an own implementation for va-api and vdpau/nvdec. libplacebo is licensed in LGPLv2.1.

Note: I initially wanted to post this in #1210726, quoting first comment:

This bug will track support for hardware decoding on Linux and the various system available (VA-API, VDPAU, DXVA and others)

There's so many frameworks available, it's hard to keep track!

But this one's locked. If it suits better there, feel free to move this comment.

@grmat libplacebo is a renderer not a hardware decoder and is unfit to be used in a browser. First thing we need dmabuf support so that we can import decoded frames without copying them back to the system RAM and then display it on the screen. If I understand it correctly this is the toughest part.

That should be bug 1572697 for Wayland.

HW decoding support has landed at Bug 1616185.

Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → DUPLICATE

I'm glad to here that, but what about support for Firefox on X11? Is it given up?

(In reply to lilydjwg from comment #30)

I'm glad to here that, but what about support for Firefox on X11? Is it given up?

Hardware decoding is platform independent so it generally works under X11 as it's implemented as Bug 1616185.
For whole playback chain see Bug 1610199 what's needed to be done fox X11.
I was closing this one as it refers to HW decode only, not the playback.
The overall video playback is tracked at Bug 1210726.

No longer depends on: egl-linux-vaapi

(In reply to lilydjwg from comment #30)

I'm glad to here that, but what about support for Firefox on X11? Is it given up?

Filed Bug 1619523 for it.

See Also: → 1619523
Summary: Add VA-API hardware decoding support on Linux → [WAYLAND] Add VA-API hardware decoding support on Linux
Status: RESOLVED → REOPENED
Resolution: DUPLICATE → ---
Summary: [WAYLAND] Add VA-API hardware decoding support on Linux → [meta] Add VA-API hardware decoding support on Linux

re-opening as a meta bug for VA-API implementation (including X11)

Blocks: 1619523
See Also: 1619523
No longer blocks: 1619523

Reminder that there is still a bounty for this issue at BountySource

https://www.bountysource.com/issues/55506502-add-va-api-hardware-decoding-support-on-linux

I got an email from BountySource that they're going to start taking old bounties for themselves starting 2020-07-1 (reproduced below)

In my opinion the bounty was already earned when this issue was resolved but I don't know who gets to be the arbiter.

Hi, 
You are receiving this email because we are updating the Bountysource Terms of Service, effective 1st July 2020.

What's changing?
We have added a Time-Out clause to the Bounties section of the agreement:

2.13 Bounty Time-Out. 
If no Solution is accepted within two years after a Bounty is posted, then the Bounty will be withdrawn and the amount posted for the Bounty will be retained by Bountysource. For Bounties posted before June 30, 2018, the Backer may redeploy their Bounty to a new Issue by contacting support@bountysource.com before July 1, 2020. If the Backer does not redeploy their Bounty by the deadline, the Bounty will be withdrawn and the amount posted for the Bounty will be retained by Bountysource.

You can read the full Terms of Service here

What do I need to do?
If you agree to the new terms, you don't have to do anything.  

If you have a bounty posted prior to June 30, 2018 that is not currently being solved, email us at support@bountysource.com to redeploy your bounty.  Or, if you do not agree with the new terms, please discontinue using Bountysource.

Thanks for reading

Bountysource Team

(In reply to eric.riese from comment #34)

In my opinion the bounty was already earned when this issue was resolved but I don't know who gets to be the arbiter.

That would certainly be Martin Stránský :)
Martin, do you want to claim the bounty? If you don't care about it / don't need it yourself, you could donate it or so.

Flags: needinfo?(stransky)

(In reply to Robert Mader [:rmader] from comment #35)

(In reply to eric.riese from comment #34)

In my opinion the bounty was already earned when this issue was resolved but I don't know who gets to be the arbiter.

That would certainly be Martin Stránský :)
Martin, do you want to claim the bounty? If you don't care about it / don't need it yourself, you could donate it or so.

Okay, I'll try to claim it and send it to a charity.

Flags: needinfo?(stransky)

This needs to be closed to claim the bounty at https://www.bountysource.com/issues/55506502-meta-add-va-api-hardware-decoding-support-on-linux so closing this one.

Wayland va-api decoding was implemented by Bug 1616185
X11 variant is pending at Bug 1619523

Status: REOPENED → RESOLVED
Closed: 5 years ago4 years ago
Resolution: --- → FIXED

This should depend on bug 1616185 and bug 1619523 so it's easier to find where the work happened.

Assignee: nobody → stransky
Depends on: egl-linux-vaapi
You need to log in before you can comment on or make changes to this bug.