media/gpu/vaapi_wrapper: simplify internal VASupportedProfiles class
VASupportedProfiles is an internal class of vaapi_wrapper.cc in charge of enumerating the encoding/decoding video/image profiles supported in Chrome. It basically holds a |supported_profiles_| member, filled upon construction from GetSupportedProfileInfosForCodecModeInternal(). This CL: - Refactors GetSupportedProfileInfosForCodecModeInternal(), renaming it to FillSupportedProfileInfos()) to do all the enumerations needed, and reorders a bit the contents of the for-for-for loops, so that IsEntrypointSupported_Locked() is unnecessary and removed entirely. - Changes the signature of IsProfileSupported() to maybe-return a ptr to the ProfileInfo entry (and not a bool), which simplifies callsites. - Removes GetSupportedProfileInfosForCodecMode(), simplifying some of the callsites as well (except GetSupported...ForTesting() which is made a friend). - Sprinkles static_assert()s to verify sizes of constexpr data structs. This CL also removes the references to VAProfileVP9Profile1 and 3, because those are not present in my experience in the wild, neither in libva impls nor in videos, and are not properly validated nor tested. Bug: 1040291, 1105103 Change-Id: I6717cac3e57f5e304eae04272842efacf7e1f762 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2292780Reviewed-by:Hirokazu Honda <hiroh@chromium.org> Commit-Queue: Miguel Casas <mcasas@chromium.org> Cr-Commit-Position: refs/heads/master@{#788767}
Showing
This diff is collapsed.
Please register or sign in to comment