Commit 4a5765c2 authored by Pawel Osciak's avatar Pawel Osciak Committed by Commit Bot

Add a feature flag for VA-API VP8 video encoder.

Add a feature flag to enable VA-API-based VP8 hardware video encode
acceleration.

BUG=794608
TEST=run Chrome with feature disabled/enabled, verify availability

Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel
Change-Id: I5866d7b158a071ea94b06d49453af1ec85ba3e2e
Reviewed-on: https://chromium-review.googlesource.com/1068905Reviewed-by: default avatarDale Curtis <dalecurtis@chromium.org>
Commit-Queue: Pawel Osciak <posciak@chromium.org>
Cr-Commit-Position: refs/heads/master@{#561303}
parent a7ef6612
......@@ -305,6 +305,10 @@ const base::Feature kUnifiedAutoplay{"UnifiedAutoplay",
const base::Feature kUseSurfaceLayerForVideo{"UseSurfaceLayerForVideo",
base::FEATURE_DISABLED_BY_DEFAULT};
// Enable VA-API hardware encode acceleration for VP8.
const base::Feature kVaapiVP8Encoder{"VaapiVP8Encoder",
base::FEATURE_DISABLED_BY_DEFAULT};
// Inform video blitter of video color space.
const base::Feature kVideoBlitColorAccuracy{"video-blit-color-accuracy",
base::FEATURE_ENABLED_BY_DEFAULT};
......
......@@ -131,6 +131,7 @@ MEDIA_EXPORT extern const base::Feature kUseAndroidOverlay;
MEDIA_EXPORT extern const base::Feature kUseAndroidOverlayAggressively;
MEDIA_EXPORT extern const base::Feature kUseNewMediaCache;
MEDIA_EXPORT extern const base::Feature kUseR16Texture;
MEDIA_EXPORT extern const base::Feature kVaapiVP8Encoder;
MEDIA_EXPORT extern const base::Feature kVideoBlitColorAccuracy;
MEDIA_EXPORT extern const base::Feature kUnifiedAutoplay;
MEDIA_EXPORT extern const base::Feature kUseSurfaceLayerForVideo;
......
......@@ -24,6 +24,8 @@
#include "base/sys_info.h"
#include "build/build_config.h"
#include "media/base/media_switches.h"
// Auto-generated for dlopen libva libraries
#include "media/gpu/vaapi/va_stubs.h"
......@@ -176,6 +178,14 @@ bool IsBlackListedDriver(const std::string& va_vendor_string,
return true;
}
}
// TODO(posciak): Remove once VP8 encoding is to be enabled by default.
if (mode == VaapiWrapper::CodecMode::kEncode &&
va_profile == VAProfileVP8Version0_3 &&
!base::FeatureList::IsEnabled(kVaapiVP8Encoder)) {
return true;
}
return false;
}
......
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