chromium-browser-stable-test/chromium-vaapi.patch

53 lines
2.3 KiB
Diff
Raw Normal View History

2023-07-06 12:37:14 +00:00
From: Mikhail Novosyolov <m.novosyolov@rosalinux.ru>
Subject: Enable VA-API on desktop Linux by default
* enable VaapiVideoDecoderLinuxGL (equivalent of --enable-features=VaapiVideoDecoderLinuxGL)
which is needed to make VA-API work on desktop Linux
* track that VaapiVideoDecoder does not get disabled on updates
* enable HW decoding in WebRTC where possible
2023-09-29 11:40:52 +03:00
(Nostromo video conferencing (moconf.ru) allows to choose a WebRTC codec when creating a room)
2023-07-06 12:37:14 +00:00
2023-09-29 11:40:52 +03:00
Equivalent for Google Chrome without this patch:
$ google-chrome --enable-features=VaapiVideoDecoder,VaapiVideoDecodeLinuxGL
(without HW decoding in WebRTC)
2023-07-06 12:37:14 +00:00
2023-09-29 11:40:52 +03:00
VA-API is also enabled out of the box in Ubuntu's Chromium snap in the hwacc-beta channel:
https://git.launchpad.net/~chromium-team/chromium-browser/+git/snap-from-source/tree/?h=hwacc-beta
See build/chromium-patches/optimization/topic-intel
As a result, this patch makes VA-API work out of the box on Intel GPUs.
Tests showed that it does not work on AMD and Nvidia (with vaapi-driver-vdpau).
2023-07-06 12:37:14 +00:00
--- chromium-114.0.5735.198.orig/media/base/media_switches.cc 2023-07-06 13:31:24.435089557 +0300
+++ chromium-114.0.5735.198/media/base/media_switches.cc 2023-07-06 13:53:23.922855598 +0300
@@ -717,14 +717,15 @@
// chromeos, but needs an experiment on linux.
BASE_FEATURE(kVaapiVideoDecodeLinux,
"VaapiVideoDecoder",
- base::FEATURE_ENABLED_BY_DEFAULT);
+ base::FEATURE_ENABLED_BY_DEFAULT); // keep enabled
BASE_FEATURE(kVaapiVideoDecodeLinuxGL,
"VaapiVideoDecodeLinuxGL",
- base::FEATURE_DISABLED_BY_DEFAULT);
+ base::FEATURE_ENABLED_BY_DEFAULT);
BASE_FEATURE(kVaapiVideoEncodeLinux,
"VaapiVideoEncoder",
+ // TODO: test and enable later? See also IS_CHROMEOS bellow.
base::FEATURE_DISABLED_BY_DEFAULT);
// Ignore the non-intel driver blacklist for VaapiVideoDecoder implementations.
@@ -801,11 +802,7 @@
// Enable VP9 k-SVC decoding with HW decoder for webrtc use case.
BASE_FEATURE(kVp9kSVCHWDecoding,
"Vp9kSVCHWDecoding",
-#if BUILDFLAG(IS_CHROMEOS)
base::FEATURE_ENABLED_BY_DEFAULT
-#else
- base::FEATURE_DISABLED_BY_DEFAULT
-#endif
);
// Takes a reference on a video frame, keeping it alive during the duration of a