Commit b612839e authored by Miguel Casas-Sanchez's avatar Miguel Casas-Sanchez Committed by Commit Bot

media: enable VEA |min_resolution| for PeerConnection on CrOS

crrev.com/c/1828078 added and wired the video encode acceleration
minimum resolution; this info is used from peerconnection's
rtc_video_encoder.cc and video_codec_factory.cc to avoid using a hw
accelerator for resolutions below the given one, if the appropriate
flag is enabled.

This CL enables the use of such mode by default on ChromeOS.

TEST=https://codepen.io/miguelao/full/jONQBYb on kohaku, then
inspecting chrome:webrtc-internals, verifying that resolutions
below 321x241 are encoded using libvpx while larger ones are
encoded using "VaapiVidoeEncodeAccelerator", i.e. the video encode
accelerator in Chrome, in this case VA-API. Joining a
Meet conference with a few bots and all working as expected,
see https://imgur.com/a/B1713ID

Bug: 1052352
Change-Id: I7def6906955bdce182a594f6092d462a25bd37a8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2057244Reviewed-by: default avatarFlorent Castelli <orphis@chromium.org>
Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Commit-Queue: Kentaro Hara <haraken@chromium.org>
Auto-Submit: Miguel Casas <mcasas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#742159}
parent 9305de49
...@@ -339,8 +339,15 @@ const base::FeatureParam<int> kForceDarkBackgroundLightnessThresholdParam{ ...@@ -339,8 +339,15 @@ const base::FeatureParam<int> kForceDarkBackgroundLightnessThresholdParam{
&kForceWebContentsDarkMode, "background_lightness_threshold", -1}; &kForceWebContentsDarkMode, "background_lightness_threshold", -1};
// Instructs WebRTC to honor the Min/Max Video Encode Accelerator dimensions. // Instructs WebRTC to honor the Min/Max Video Encode Accelerator dimensions.
const base::Feature kWebRtcUseMinMaxVEADimensions{ const base::Feature kWebRtcUseMinMaxVEADimensions {
"WebRtcUseMinMaxVEADimensions", base::FEATURE_DISABLED_BY_DEFAULT}; "WebRtcUseMinMaxVEADimensions",
// TODO(crbug.com/1008491): enable other platforms.
#if defined(OS_CHROMEOS)
base::FEATURE_ENABLED_BY_DEFAULT
#else
base::FEATURE_DISABLED_BY_DEFAULT
#endif
};
// Blink garbage collection. // Blink garbage collection.
// Enables compaction of backing stores on Blink's heap. // Enables compaction of backing stores on Blink's heap.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment