commit ede4345734371ac35b4e50cea7ef3332dabd54d5 log] tgz] author Thomas Guilbert <tguilbert@chromium.org> Fri Mar 29 00:41:41 2019 committer Commit Bot <commit-bot@chromium.org> Fri Mar 29 00:41:41 2019 tree f080b1491989147ce933995d70b9d5b00903ea86 parent 03f18d657fb317d32d6b2e1502df786f59338140 diff]

Use dav1d by default This CL turns on dav1d by default. It also disables libaom to save on binary size. Bug: 924370 Change-Id: I4d331a3b66fe6031930f5f56880866b9a3c92df8 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1539901 Commit-Queue: Chrome Cunningham <chcunningham@chromium.org> Auto-Submit: Thomas Guilbert <tguilbert@chromium.org> Reviewed-by: Tom Finegan <tomfinegan@chromium.org> Reviewed-by: Chrome Cunningham <chcunningham@chromium.org> Cr-Commit-Position: refs/heads/master@{#645600}

@@ -258,10 +258,6 @@ const base::Feature kD3D11VideoDecoderIgnoreWorkarounds{ "D3D11VideoDecoderIgnoreWorkarounds", base::FEATURE_DISABLED_BY_DEFAULT}; -// Enable usage of dav1d for AV1 video decoding. -const base::Feature kDav1dVideoDecoder{"Dav1dVideoDecoder", - base::FEATURE_DISABLED_BY_DEFAULT}; - // Falls back to other decoders after audio/video decode error happens. The // implementation may choose different strategies on when to fallback. See // DecoderStream for details. When disabled, playback will fail immediately

@@ -101,7 +101,6 @@ MEDIA_EXPORT extern const base::Feature kBackgroundVideoPauseOptimization; MEDIA_EXPORT extern const base::Feature kD3D11VideoDecoder; MEDIA_EXPORT extern const base::Feature kD3D11VideoDecoderIgnoreWorkarounds; -MEDIA_EXPORT extern const base::Feature kDav1dVideoDecoder; MEDIA_EXPORT extern const base::Feature kExternalClearKeyForTesting; MEDIA_EXPORT extern const base::Feature kFallbackAfterDecodeError; MEDIA_EXPORT extern const base::Feature kHardwareMediaKeyHandling;

@@ -36,6 +36,10 @@ #include "media/filters/aom_video_decoder.h" #endif +#if BUILDFLAG(ENABLE_DAV1D_DECODER) +#include "media/filters/dav1d_video_decoder.h" +#endif + #if BUILDFLAG(ENABLE_FFMPEG) #include "media/filters/ffmpeg_video_decoder.h" #endif @@ -300,7 +304,10 @@ video_decoder.reset(new VpxVideoDecoder()); #endif -#if BUILDFLAG(ENABLE_LIBAOM_DECODER) +#if BUILDFLAG(ENABLE_DAV1D_DECODER) + if (config.codec == cdm::kCodecAv1) + video_decoder.reset(new Dav1dVideoDecoder(null_media_log.get())); +#elif BUILDFLAG(ENABLE_LIBAOM_DECODER) if (config.codec == cdm::kCodecAv1) video_decoder.reset(new AomVideoDecoder(null_media_log.get())); #endif

@@ -84,12 +84,14 @@ # are combined and we could override more logging than expected. enable_logging_override = !use_jumbo_build && is_chromecast - # Dav1d is only enabled when av1 decoding is enabled. if (is_win && target_cpu == "arm64") { # TODO: Enable dav1d for Windows ARM64. https://crbug.com/941022 enable_dav1d_decoder = false + } else if (is_fuchsia && target_cpu == "x64") { + # TODO: Fix media_unittests for fuchsia X64. https://crbug.com/930300 + enable_dav1d_decoder = false } else { - enable_dav1d_decoder = enable_libaom_decoder + enable_dav1d_decoder = !is_android && !is_ios } }

@@ -121,12 +121,7 @@ #endif #if BUILDFLAG(ENABLE_DAV1D_DECODER) - if (base::FeatureList::IsEnabled(kDav1dVideoDecoder)) - video_decoders->push_back(std::make_unique<Dav1dVideoDecoder>(media_log)); -#if BUILDFLAG(ENABLE_LIBAOM_DECODER) - else - video_decoders->push_back(std::make_unique<AomVideoDecoder>(media_log)); -#endif + video_decoders->push_back(std::make_unique<Dav1dVideoDecoder>(media_log)); #elif BUILDFLAG(ENABLE_LIBAOM_DECODER) video_decoders->push_back(std::make_unique<AomVideoDecoder>(media_log)); #endif

@@ -252,18 +252,6 @@ media::ProgressivePipelineIntegrationFuzzerTest test; test.RunTest(data, size); } - -#if BUILDFLAG(ENABLE_DAV1D_DECODER) - { - // Rerun the test with the dav1d video decoder instead of libaom. Note: - // this ends up running for all SRC fuzzing and not just AV1 content, but - // that's true for our entire corpus. - base::test::ScopedFeatureList features_with_dav1d; - features_with_dav1d.InitAndEnableFeature(media::kDav1dVideoDecoder); - media::ProgressivePipelineIntegrationFuzzerTest test; - test.RunTest(data, size); - } -#endif } else { // Sequentially fuzz with new and old MSE buffering APIs. See // https://crbug.com/718641. @@ -281,17 +269,6 @@ media::MediaSourcePipelineIntegrationFuzzerTest test; test.RunTest(data, size, MseFuzzerVariantEnumToMimeTypeString(variant)); } - -#if BUILDFLAG(ENABLE_DAV1D_DECODER) - // Rerun the test with the dav1d video decoder instead of libaom. No need to - // run with ByPts in both configurations, just use the default. - if (variant == MP4_AV1) { - base::test::ScopedFeatureList features_with_dav1d; - features_with_dav1d.InitAndEnableFeature(media::kDav1dVideoDecoder); - media::MediaSourcePipelineIntegrationFuzzerTest test; - test.RunTest(data, size, MseFuzzerVariantEnumToMimeTypeString(variant)); - } -#endif } return 0;

@@ -74,12 +74,7 @@ #endif #if BUILDFLAG(ENABLE_DAV1D_DECODER) - if (base::FeatureList::IsEnabled(kDav1dVideoDecoder)) - video_decoders.push_back(std::make_unique<Dav1dVideoDecoder>(media_log)); -#if BUILDFLAG(ENABLE_LIBAOM_DECODER) - else - video_decoders.push_back(std::make_unique<AomVideoDecoder>(media_log)); -#endif + video_decoders.push_back(std::make_unique<Dav1dVideoDecoder>(media_log)); #elif BUILDFLAG(ENABLE_LIBAOM_DECODER) video_decoders.push_back(std::make_unique<AomVideoDecoder>(media_log)); #endif