[webkit-reviews] review granted: [Bug 214316] [Cocoa] Add MediaCapabilities support for SW VP9 decoder. : [Attachment 404293] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Jul 14 16:55:45 PDT 2020
Eric Carlson <eric.carlson at apple.com> has granted Jer Noble
<jer.noble at apple.com>'s request for review:
Bug 214316: [Cocoa] Add MediaCapabilities support for SW VP9 decoder.
https://bugs.webkit.org/show_bug.cgi?id=214316
Attachment 404293: Patch
https://bugs.webkit.org/attachment.cgi?id=404293&action=review
--- Comment #6 from Eric Carlson <eric.carlson at apple.com> ---
Comment on attachment 404293
--> https://bugs.webkit.org/attachment.cgi?id=404293
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.
More information about the webkit-reviews
mailing list