VP9 Profile 2 10 bits fails to decode with hardware decoder

RESOLVED FIXED in Firefox 64

Status

()

defect
P3
normal
RESOLVED FIXED
9 months ago
8 months ago

People

(Reporter: jya, Assigned: jya)

Tracking

(Blocks 1 bug)

unspecified
mozilla64
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox64 fixed)

Details

Attachments

(8 attachments)

Assignee

Description

9 months ago
Try to open a video with a machine that supports VP9 profile 2 10 bits (Intel 8th gen or nvidia 10xx and later)

You get a decoding error.

Reason for this is we always attempt to decode into a NV12 surface, and the decoder won't let you.
Priority: -- → P3
Assignee

Comment 1

9 months ago
When decoding a vp9 profile 2 (10 bits), the MF_E_TRANSFORM_STREAM_CHANGE message is returned. We need to look for alternative format type other than NV12: 10/16 bits.

When using those formats, we can no longer assume that the D3D11ShareHandleImage can use NV12. So we will convert to RGBA32 on the fly via a MFT.
Assignee

Comment 2

9 months ago
I find it easier to read than a function pointer making you search elsewhere to see what it's about

Depends on D7294
Assignee

Comment 3

9 months ago
This allows more easily the creation of the MFT required to convert to a RGBA32 image when doing a readback.

Depends on D7295
Assignee

Comment 4

9 months ago
Depends on D7296
Assignee

Comment 5

9 months ago
As we do not have an IMF nor D3D11 NV12 image, we always require a full copy of the data that will deinterleave the chroma channels.

Depends on D7316
Comment on attachment 9013330 [details]
Bug 1495025 - P1. Search for alternative pixel format when stream change.

Chris Pearce (:cpearce) has approved the revision.
Attachment #9013330 - Flags: review+
Comment on attachment 9013331 [details]
Bug 1495025 - P2. Use lambda for callback.

Chris Pearce (:cpearce) has approved the revision.
Attachment #9013331 - Flags: review+
Comment on attachment 9013333 [details]
Bug 1495025 - P3. Store original IMFMediaType's subtype in D3D11SharedHandleImage.

Chris Pearce (:cpearce) has approved the revision.
Attachment #9013333 - Flags: review+
Comment on attachment 9013378 [details]
Bug 1495025 - P5. Add Windows P010 and P016 support for software decoder

Chris Pearce (:cpearce) has approved the revision.
Attachment #9013378 - Flags: review+
Comment on attachment 9013371 [details]
Bug 1495025 - P4. Add COLOR_16 type

Nicolas Silva [:nical] has approved the revision.
Attachment #9013371 - Flags: review+
Assignee

Comment 11

9 months ago
Depends on D7316

Comment 12

9 months ago
Pushed by jyavenard@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/208624601a18
P1. Search for alternative pixel format when stream change. r=cpearce
https://hg.mozilla.org/integration/autoland/rev/c548d816019d
P2. Use lambda for callback. r=cpearce
https://hg.mozilla.org/integration/autoland/rev/c3b43ee1092e
P3. Store original IMFMediaType's subtype in D3D11SharedHandleImage. r=cpearce
https://hg.mozilla.org/integration/autoland/rev/25895d283d47
P4. Add COLOR_16 type r=nical
https://hg.mozilla.org/integration/autoland/rev/528dbc463c22
P5. Add Windows P010 and P016 support for software decoder r=cpearce
https://hg.mozilla.org/integration/autoland/rev/263d4f722174
P6. Remove now unused paramater. r=bryce
Assignee

Updated

9 months ago
Assignee: nobody → jyavenard
Flags: needinfo?(jyavenard)
Assignee

Comment 14

9 months ago
I can't reproduce that failure with identical patches.

I don't think it had any relations with that webgl failure.

https://treeherder.mozilla.org/#/jobs?repo=try&selectedJob=203847594&revision=c54ca4cb1c36244c4e1c36239c5dc5e23130f10f

I'll reland shortly

Comment 15

9 months ago
Pushed by jyavenard@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/c62823871aca
P1. Search for alternative pixel format when stream change. r=cpearce
https://hg.mozilla.org/integration/mozilla-inbound/rev/f1afe7e2a9e3
P2. Use lambda for callback. r=cpearce
https://hg.mozilla.org/integration/mozilla-inbound/rev/7fd1f6103294
P3. Store original IMFMediaType's subtype in D3D11SharedHandleImage. r=cpearce
https://hg.mozilla.org/integration/mozilla-inbound/rev/9f59a50dcc6d
P4. Add COLOR_16 type r=nical
https://hg.mozilla.org/integration/mozilla-inbound/rev/68efa7588ba8
P5. Add Windows P010 and P016 support for software decoder r=cpearce
https://hg.mozilla.org/integration/mozilla-inbound/rev/24d67618f6b9
P6. Remove now unused paramater. r=bryce
Assignee

Comment 17

8 months ago
That test is invalid and based on wrong premises.

Yes, the encoded image is 1920x1080

however it has a display aspect ratio set at [SAR 171:176 DAR 19:11]

So it is to be displayed as 1920x1111.

In the test we read:
    // It was found that Firefox's videoHeight doesn't report the
    // correct answer for this video resource, though the uploaded
    // video texture is the correct size.
so videoHeight must be 1111, if it's not it's wrong.

Why that test ever passed is a mystery, it shouldn't

Where does that test come from?
Flags: needinfo?(jyavenard) → needinfo?(jgilbert)
Assignee

Comment 18

8 months ago
FWIW, Chrome displays it as 1920x1112
Edge displays it as 1865x1080

so all browsers have similar behaviour
Assignee

Updated

8 months ago
Flags: needinfo?(jgilbert)

Comment 20

8 months ago
Pushed by jyavenard@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/107add19c310
P1. Search for alternative pixel format when stream change. r=cpearce
https://hg.mozilla.org/integration/mozilla-inbound/rev/2851d7aead76
P2. Use lambda for callback. r=cpearce
https://hg.mozilla.org/integration/mozilla-inbound/rev/5e7ea76f73f3
P3. Store original IMFMediaType's subtype in D3D11SharedHandleImage. r=cpearce
https://hg.mozilla.org/integration/mozilla-inbound/rev/9818fa498ba5
P4. Add COLOR_16 type r=nical
https://hg.mozilla.org/integration/mozilla-inbound/rev/b88586cb4fdd
P5. Add Windows P010 and P016 support for software decoder r=cpearce
https://hg.mozilla.org/integration/mozilla-inbound/rev/982f91f69b39
P6. Remove now unused paramater. r=bryce
Assignee

Updated

8 months ago
See Also: → 1497294
(In reply to Jean-Yves Avenard [:jya] from comment #17)
> That test is invalid and based on wrong premises.
> 
> Yes, the encoded image is 1920x1080
> 
> however it has a display aspect ratio set at [SAR 171:176 DAR 19:11]
> 
> So it is to be displayed as 1920x1111.
> 
> In the test we read:
>     // It was found that Firefox's videoHeight doesn't report the
>     // correct answer for this video resource, though the uploaded
>     // video texture is the correct size.
> so videoHeight must be 1111, if it's not it's wrong.
> 
> Why that test ever passed is a mystery, it shouldn't
> 
> Where does that test come from?

As the path hints, it's from the webgl2 conformance tests.

Comment 23

8 months ago
Pushed by jyavenard@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/2a9f2418655a
P7. Silence compilation warning r=mattwoodrow
You need to log in before you can comment on or make changes to this bug.