RESOLVED FIXED Bug 214316
[Cocoa] Add MediaCapabilities support for SW VP9 decoder.
https://bugs.webkit.org/show_bug.cgi?id=214316
Summary [Cocoa] Add MediaCapabilities support for SW VP9 decoder.
Jer Noble
Reported 2020-07-14 13:22:48 PDT
[Cocoa] Add MediaCapabilities support for SW VP9 decoder.
Attachments
Patch (56.40 KB, patch)
2020-07-14 13:41 PDT, Jer Noble
no flags
Patch (55.44 KB, patch)
2020-07-14 13:48 PDT, Jer Noble
no flags
Patch (55.19 KB, patch)
2020-07-14 14:03 PDT, Jer Noble
no flags
Patch (55.02 KB, patch)
2020-07-14 15:28 PDT, Jer Noble
eric.carlson: review+
Patch for landing (59.73 KB, patch)
2020-07-15 10:56 PDT, Jer Noble
no flags
Patch for landing (60.44 KB, patch)
2020-07-16 09:21 PDT, Jer Noble
no flags
Radar WebKit Bug Importer
Comment 1 2020-07-14 13:38:37 PDT
Jer Noble
Comment 2 2020-07-14 13:41:40 PDT
Jer Noble
Comment 3 2020-07-14 13:48:21 PDT
Jer Noble
Comment 4 2020-07-14 14:03:15 PDT
Jer Noble
Comment 5 2020-07-14 15:28:35 PDT
Eric Carlson
Comment 6 2020-07-14 16:55:45 PDT
Comment on attachment 404293 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=404293&action=review > Source/WebCore/ChangeLog:11 > + both on the system battery status, but also power adapter status, and these need to be shipped Nit: s/both on the system battery status, but also power adapter status/both on the system battery status and the power adapter status/ > Source/WebCore/platform/cocoa/SystemBattery.mm:104 > + CFDictionaryRef description = IOPSGetPowerSourceDescription(powerSourcesInfo.get(), CFArrayGetValueAtIndex(powerSourcesList.get(), i)); IOPSGetPowerSourceDescription can return NULL according to the docs, and CFDictionaryGetValue(NULL) will crash. > Source/WebCore/platform/graphics/cocoa/VP9UtilitiesCocoa.mm:97 > + // HW VP9 Decoder Profile 0 & 2: > + if (!codecConfiguration.profile && codecConfiguration.profile != 2) I don't think you want the `!` here > Source/WebCore/platform/graphics/cocoa/VP9UtilitiesCocoa.mm:101 > + // HW VP9 Decoder supports up to Level 6: > + if (codecConfiguration.level > 60) Is it 6 or 60? > Source/WebCore/platform/graphics/cocoa/VP9UtilitiesCocoa.mm:109 > + if (codecConfiguration.chromaSubsampling > 1) It'd be nice to have an enum for the chromaSubsampling values, or at least a named constant for 420 > Source/WebCore/platform/graphics/cocoa/VP9UtilitiesCocoa.mm:117 > + if (videoConfiguration.height <= 2160 && videoConfiguration.framerate > 120) Named constants would be helpful for future engineers. > Source/WebCore/platform/graphics/cocoa/VP9UtilitiesCocoa.mm:119 > + else if (videoConfiguration.height > 2160 && videoConfiguration.framerate > 30) Ditto > Source/WebCore/platform/graphics/cocoa/VP9UtilitiesCocoa.mm:130 > + if (videoConfiguration.height <= 1080 && videoConfiguration.framerate > 60) Ditto > Source/WebCore/platform/graphics/cocoa/VP9UtilitiesCocoa.mm:132 > + if (videoConfiguration.height <= 2160 && videoConfiguration.framerate > 30) Ditto > Source/WebCore/platform/graphics/cocoa/VP9UtilitiesCocoa.mm:153 > + auto is4kScreen = [](float width, float height, float scale) { Why have the width parameter if it isn't used? > Source/WebCore/platform/graphics/cocoa/VP9UtilitiesCocoa.mm:155 > + return height * scale >= 2160; `2160` again. > Source/WebCore/testing/Internals.h:1025 > + void setHardwareVP9DecoderDisabledForTesting(bool); > + void setVP9ScreenSizeAndScale(double, double, double); All four should have the "ForTesting" suffix or none should.
Jer Noble
Comment 7 2020-07-15 10:56:24 PDT
Created attachment 404358 [details] Patch for landing
Jer Noble
Comment 8 2020-07-16 09:21:20 PDT
Created attachment 404446 [details] Patch for landing
EWS
Comment 9 2020-07-16 13:49:40 PDT
Committed r264476: <https://trac.webkit.org/changeset/264476> All reviewed patches have been landed. Closing bug and clearing flags on attachment 404446 [details].
Note You need to log in before you can comment on or make changes to this bug.