Closed
Bug 1133633
Opened 10 years ago
Closed 10 years ago
Poor video decoding performance on mac when using VideoToolbox
Categories
(Core :: Audio/Video, defect, P2)
Tracking
()
RESOLVED
FIXED
mozilla40
People
(Reporter: jya, Assigned: jya)
References
(Blocks 1 open bug)
Details
Attachments
(2 files)
7.58 KB,
patch
|
rillian
:
review+
lmandel
:
approval-mozilla-beta+
|
Details | Diff | Splinter Review |
3.29 KB,
patch
|
mattwoodrow
:
review+
Sylvestre
:
approval-mozilla-aurora+
Sylvestre
:
approval-mozilla-beta+
|
Details | Diff | Splinter Review |
There appears to be severe performance issue with the Apple VideoToolbox decoder even with hardware acceleration is enabled.
A 4K YouTube videos show lots of dropped frame when using VideoToolBox with Intel GPU.
On a late-2013 macbook air (Intel HD5000), the average time it takes to decode a 4K frame is:
- Software decode: 95ms average, max 469ms
- VideoToolbox with HW acceleration: 31ms average, max 326ms
- VDA (pure HW acceleration): .63ms average, max 97ms
To not have dropped frames, we must decode in less than 30ms a 4K @ 30Hz. As it is the VideoToolbox decoder is borderline in the average case, and way over at its worse.
This patch track the attempt to prefer the VDA decoder for higher resolution video.
Assignee | ||
Updated•10 years ago
|
Summary: Prefer VDA decoder for some videos. → Poor video decoding performance on mac when using VideoToolbox
Assignee | ||
Comment 1•10 years ago
|
||
Add detection if decoding is hardware accelerated and related log
Attachment #8565776 -
Flags: review?(giles)
Assignee | ||
Updated•10 years ago
|
Assignee: nobody → jyavenard
Status: NEW → ASSIGNED
Comment 2•10 years ago
|
||
Comment on attachment 8565776 [details] [diff] [review]
Part1. Add logging reporting if we are using HW accelerated decode
Review of attachment 8565776 [details] [diff] [review]:
-----------------------------------------------------------------
r=me with question addressed.
::: dom/media/fmp4/apple/AppleVTDecoder.cpp
@@ +317,5 @@
> + LOG("AppleVTDecoder: %s hardware accelerated decoding",
> + (rv == noErr && isUsingHW == kCFBooleanTrue) ? "using" : "not using");
> + } else {
> + LOG("AppleVTDecoder: using software decoding "
> + "(platform doesn't support HW acceleration)");
Is this true? Do we know MacOS X 10.8 and earlier won't use hardware acceleration, despite the property key not being defined in the API?
Attachment #8565776 -
Flags: review?(giles) → review+
Assignee | ||
Comment 3•10 years ago
|
||
As far as I can say, is that there's no way to tell.
Even the doc about kVTVideoDecoderSpecification_EnableHardwareAcceleratedVideoDecoder are confusing at best as the only guaranteed behaviour is when you set it to false, in which case HW acceleration will be disabled.
It is suggested that the VT decoder will, when it's true or not set decide what to use and when.
However, reports like bug 1132994, indicates to me that unless it's set to true, we won't get HW acceleration (as that's the only difference between 35 and 36)
On my mac pro, while the key exist, I can't query it, and when requesting all VTSession keys anything related to HW is missing (and VDA always return an error)
Updated•10 years ago
|
Priority: -- → P1
Comment 4•10 years ago
|
||
Who knows then. I just wanted to make sure we didn't leave a confusing message in the log. How about "Couldn't determine hardware acceleration status."?
Assignee | ||
Comment 5•10 years ago
|
||
Keywords: leave-open
Comment 6•10 years ago
|
||
Comment 7•10 years ago
|
||
Comment on attachment 8565776 [details] [diff] [review]
Part1. Add logging reporting if we are using HW accelerated decode
Requestint 36 uplift of teh initial logging patch.
Approval Request Comment
[Feature/regressing bug #]: MSE and mp4 playback on Mac.
[User impact if declined]: Slow video decoding on some systems.
[Describe test coverage new/current, TreeHerder]: Landed on m-c.
[Risks and why]: This just adds logging plumbing. Risk should be low.
[String/UUID change made/needed]: None.
Attachment #8565776 -
Flags: approval-mozilla-aurora?
Comment 8•10 years ago
|
||
Comment on attachment 8565776 [details] [diff] [review]
Part1. Add logging reporting if we are using HW accelerated decode
Looks like this may do a bit more than just logging but we definitely want the change in 37 Beta 1 in which we're testing MSE on OSX. 37 is now Beta so clearing Aurora request and approving for Beta.
Beta+
Attachment #8565776 -
Flags: approval-mozilla-aurora? → approval-mozilla-beta+
Comment 9•10 years ago
|
||
status-firefox37:
--- → fixed
Updated•10 years ago
|
Updated•10 years ago
|
Priority: P1 → P2
Assignee | ||
Comment 10•10 years ago
|
||
enable async decoding on apple VT.
Attachment #8585883 -
Flags: review?(matt.woodrow)
Updated•10 years ago
|
Attachment #8585883 -
Flags: review?(matt.woodrow) → review+
Assignee | ||
Comment 11•10 years ago
|
||
Comment 12•10 years ago
|
||
Assignee | ||
Comment 13•10 years ago
|
||
Comment on attachment 8585883 [details] [diff] [review]
Part2. Enable async decoding on mac
Approval Request Comment
[Feature/regressing bug #]: 1133633
[User impact if declined]: stuttering playback, dropped frames
[Describe test coverage new/current, TreeHerder]: This patch significantly improve the performance of the decoder on mac, a 4K video will go from 60% dropped frames to 0%. Patch will have to be rebase for beta.
[Risks and why]: Low.
[String/UUID change made/needed]: None
Attachment #8585883 -
Flags: approval-mozilla-beta?
Attachment #8585883 -
Flags: approval-mozilla-aurora?
Comment 14•10 years ago
|
||
Jean-Yves, are you planning to provide the beta patch?
Flags: needinfo?(jyavenard)
Updated•10 years ago
|
Attachment #8585883 -
Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Assignee | ||
Comment 15•10 years ago
|
||
Comment on attachment 8585883 [details] [diff] [review]
Part2. Enable async decoding on mac
I remove the request for beta uplift.
MSE isn't enabled on mac in beta, so let's urgent there.
Flags: needinfo?(jyavenard)
Attachment #8585883 -
Flags: approval-mozilla-beta?
Assignee | ||
Updated•10 years ago
|
Keywords: leave-open
Assignee | ||
Updated•10 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Updated•10 years ago
|
status-firefox40:
--- → fixed
Target Milestone: --- → mozilla40
Comment 16•10 years ago
|
||
Assignee | ||
Comment 17•10 years ago
|
||
Comment on attachment 8585883 [details] [diff] [review]
Part2. Enable async decoding on mac
We may enable MSE in 38.. So we would want that in as well.
Attachment #8585883 -
Flags: approval-mozilla-beta?
Updated•10 years ago
|
Comment 18•10 years ago
|
||
Comment on attachment 8585883 [details] [diff] [review]
Part2. Enable async decoding on mac
Taking it in case we decide to do something with MSE under Mac.
Should be in 38 beta 4.
Attachment #8585883 -
Flags: approval-mozilla-beta? → approval-mozilla-beta+
Assignee | ||
Comment 19•10 years ago
|
||
You need to log in
before you can comment on or make changes to this bug.
Description
•