Closed
Bug 1497294
Opened 6 years ago
Closed 6 years ago
Native support for MFVideoFormat_P010 / DXGI_FORMAT_P010
Categories
(Core :: Graphics: Layers, enhancement)
Tracking
()
RESOLVED
FIXED
mozilla64
Tracking | Status | |
---|---|---|
firefox64 | --- | fixed |
People
(Reporter: jya, Assigned: jya)
References
()
Details
Attachments
(8 files)
46 bytes,
text/x-phabricator-request
|
Details | Review | |
46 bytes,
text/x-phabricator-request
|
Details | Review | |
46 bytes,
text/x-phabricator-request
|
Details | Review | |
46 bytes,
text/x-phabricator-request
|
Details | Review | |
46 bytes,
text/x-phabricator-request
|
Details | Review | |
46 bytes,
text/x-phabricator-request
|
Details | Review | |
46 bytes,
text/x-phabricator-request
|
Details | Review | |
46 bytes,
text/x-phabricator-request
|
Details | Review |
Bug 1495025 added support for 10/16 bits hardware decoding. The texture coming out of the decoder are DXGI_FORMAT_P010.
Right now, those are immediately converted into RGBA and then passed to the compositor.
Like with did for DXGI_FORMAT_NV12 we should natively handle those without requiring the need for a RGB conversion on hardware supporting it.
Assignee | ||
Comment 1•6 years ago
|
||
Using an Intel 630 playing https://mega.nz/#!hJdFEIBI!uSOjZtkkjIVYSfqD9aSfONf1yq__uQvlsf47pCtFvdQ (The World in HDR) shows the GPU decoder hitting 67.3% and the videoprocessing hitting 70.5% (numbers retrieved using DXVA checker).
Playback stats shows about 15% of the frames are dropped by the compositor. So it's not super smooth.
Interestingly Chrome really struggles playing this video, it uses the software decoder for some reasons and playback experience is much worse than Firefox (with bug 1495025 in)
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Comment 3•6 years ago
|
||
Assignee | ||
Comment 4•6 years ago
|
||
The methods BytesPerPixel, SurfaceFormatForColorDepth, BitDepthForColorDepth, ColorDepthForBitDepth and RescalingFactorForColorDepth all directly depends on the types defined in Types.h, they also return constant values.
As such it makes more sense to have them defined at the same level where the types themselves are declared.
Depends on D8065
Assignee | ||
Comment 5•6 years ago
|
||
Wasn't having any impact whatsoever as hr would have been E_FAILED.
Depends on D8073
Assignee | ||
Comment 6•6 years ago
|
||
This allows to more easily construct it and add new values as needed.
The other bool members could be made to be part of the set, but this would require more significant code change.
Depends on D8082
Assignee | ||
Comment 7•6 years ago
|
||
This is only used with DXVA decoder. P016 is just like NV12 but with 16 bits data..
Depends on D8129
Updated•6 years ago
|
Attachment #9015513 -
Attachment description: Bug 1497294 - P3. Fix type in AL D3D11 compositor → Bug 1497294 - P3. Fix typo in AL D3D11 compositor
Assignee | ||
Comment 8•6 years ago
|
||
The Windows' hardware decoder always return an image whose dimensions are multiple of 16 pixels. As such, the image coming out of the decoder is typically bigger than the wanted image.
The D3D11 documentation states that " If you try and copy outside the destination resource or specify a source box that is larger than the source resource, the behavior of CopySubresourceRegion is undefined."
We've always copied from a bigger texture into a smaller one without specifying clipping. It seems to have always worked but falls into the undefined behaviour category.
So to be extra safe, we clip the source so that it matches the dimension of the destination texture.
Depends on D8129
Updated•6 years ago
|
Attachment #9015850 -
Attachment description: Bug 1497294 - P4. Clip source to destination size when copying the D3D11 texture. → Bug 1497294 - P5. Clip source to destination size when copying the D3D11 texture.
Updated•6 years ago
|
Attachment #9015667 -
Attachment description: Bug 1497294 - P4. Add P016 surface format support. → Bug 1497294 - P6. Add P016 surface format support.
Assignee | ||
Comment 9•6 years ago
|
||
Depends on D8203
Assignee | ||
Comment 10•6 years ago
|
||
It just doesn't work.
We add the preference media.wmf.force.allow-p010-format to force enable it.
Depends on D8136
Updated•6 years ago
|
Attachment #9015667 -
Attachment description: Bug 1497294 - P6. Add P016 surface format support. → Bug 1497294 - P6. Add P016 and P010 surface format support.
Updated•6 years ago
|
Attachment #9015667 -
Attachment description: Bug 1497294 - P6. Add P016 and P010 surface format support. → Bug 1497294 - P7. Add P016 and P010 surface format support.
Comment 11•6 years ago
|
||
Pushed by jyavenard@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/a6481e1de633
P1. Remove duplicated method. r=nical
https://hg.mozilla.org/integration/autoland/rev/da3c96e21a15
P2. Move type related constant methods to Types.h r=nical
https://hg.mozilla.org/integration/autoland/rev/45cbc8ce2df1
P3. Fix typo in AL D3D11 compositor r=mattwoodrow
https://hg.mozilla.org/integration/autoland/rev/7a75881a8684
P4. Use EnumSet with D3D11DeviceStatus and checks for P010 and P016 support. r=mattwoodrow
https://hg.mozilla.org/integration/autoland/rev/e62671b3410d
P5. Clip source to destination size when copying the D3D11 texture. r=mattwoodrow
https://hg.mozilla.org/integration/autoland/rev/227a0a6ae1df
P6. Fix NV12 playback on legacy D3D11 compositor. r=mattwoodrow
https://hg.mozilla.org/integration/autoland/rev/1b12b56178b6
P7. Add P016 and P010 surface format support. r=jgilbert
https://hg.mozilla.org/integration/autoland/rev/c2666a1b9efc
P8. Disable P010 surface type with nvidia adapters. r=mattwoodrow
Comment 12•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/a6481e1de633
https://hg.mozilla.org/mozilla-central/rev/da3c96e21a15
https://hg.mozilla.org/mozilla-central/rev/45cbc8ce2df1
https://hg.mozilla.org/mozilla-central/rev/7a75881a8684
https://hg.mozilla.org/mozilla-central/rev/e62671b3410d
https://hg.mozilla.org/mozilla-central/rev/227a0a6ae1df
https://hg.mozilla.org/mozilla-central/rev/1b12b56178b6
https://hg.mozilla.org/mozilla-central/rev/c2666a1b9efc
Status: NEW → RESOLVED
Closed: 6 years ago
status-firefox64:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla64
You need to log in
before you can comment on or make changes to this bug.
Description
•