Commit Graph

387 Commits

Author SHA1 Message Date
Jean-Yves Avenard
84716a0281 Bug 1305340 - Enable low-latency decoding on Windows 10 and later. r=pehrsons
Chrome has had it enabled for years, we had disabled it originally due to crashes seen on Windows 7.

Differential Revision: https://phabricator.services.mozilla.com/D23656

--HG--
extra : moz-landing-system : lando
2019-03-15 12:26:59 +00:00
Jean-Yves Avenard
1d2b1aedfe Bug 1521370 - Remove unused method. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D22624

--HG--
extra : moz-landing-system : lando
2019-03-13 01:50:41 +00:00
Jean-Yves Avenard
dfa04f21b3 Bug 1521370 - Add crash guard around VPX decoder creation. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D21477

--HG--
extra : moz-landing-system : lando
2019-03-13 02:36:08 +00:00
Gurzau Raul
cdf9392948 Merge inbound to mozilla-central. a=merge 2019-03-01 15:01:31 +02:00
Jean-Yves Avenard
51e5ab32af Bug 1531500 - Fix HE-AAC with WMF decoder. r=cpearce
The rate changes after decoding the first sample to what was indicated in the container. The code to handle that case was incorrectly removed in bug  1530234

Differential Revision: https://phabricator.services.mozilla.com/D21618

--HG--
extra : moz-landing-system : lando
2019-03-01 00:54:32 +00:00
Jean-Yves Avenard
2acc7de1f6 Bug 1530234 - P2. Don't recalculate audio sample start time. r=bryce
The WMF audio decoder recalculated the timestamp of each audio sample according to the number of frames decoded so far.
This is incompatible with the trimming mechanism that rely on the timestamps of the audio to be matching what is found in the container.

All the other audio decoders do it that way already.

Depends on D20969

Differential Revision: https://phabricator.services.mozilla.com/D21305

--HG--
extra : moz-landing-system : lando
2019-02-27 14:19:00 +00:00
Ryan Hunt
00e98538aa Bug 1523969 part 6 - Move method definition inline comments to new line in 'dom/'. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D21106

--HG--
extra : rebase_source : ea3f51c2c11247114deccbc86e90fb02b8a97257
2019-02-25 16:05:29 -06:00
Jean-Yves Avenard
4b9d7d9972 Bug 1528652 - Don't use WMF for decoding VP9 with alpha content. r=kinetik
Differential Revision: https://phabricator.services.mozilla.com/D20957

--HG--
extra : moz-landing-system : lando
2019-02-25 01:17:31 +00:00
Jean-Yves Avenard
850a9d6aa7 Bug 1524890 - P17. Set duration on IMF sample. r=bryce
We didn't set the duration on the created IMF sample before sending it to the decoder.
For audio this isn't a problem as the duration is calculated from the number of frames returned.
For video however, the duration appears to have been calculated by WMF as the delta of pts. However, for the last frame, the value returned was set to a value not matching our input.

So we set the duration on the IMFSample so it doesn't have to make it up.

Setting the duration on the IMFSample isn't sufficient with Windows 7, which still continues to calculate it based on previous samples durations.
So we store the last sample duration and set it when draining.

Differential Revision: https://phabricator.services.mozilla.com/D20653

--HG--
extra : moz-landing-system : lando
2019-02-23 09:28:14 +00:00
Jean-Yves Avenard
4377bd3b8b Bug 1524890 - P11. Remove duration from AudioData construction parameter. r=bryce
It can be determined from the size of the buffer and the number of audio frames. Additionally, it ensures that the duration of the frame is always exactly what the AudioData contains.

Differential Revision: https://phabricator.services.mozilla.com/D20170

--HG--
extra : moz-landing-system : lando
2019-02-22 09:19:47 +00:00
Jean-Yves Avenard
7f3801ebd7 Bug 1524890 - P8. Rely on buffer length to calculate the number of frames. r=bryce
Differential Revision: https://phabricator.services.mozilla.com/D20166

--HG--
extra : moz-landing-system : lando
2019-02-22 09:19:00 +00:00
Ehsan Akhgari
e5e885ae31 Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre
# ignore-this-changeset

--HG--
extra : amend_source : 7221c8d15a765df71171099468e7c7faa648f37c
extra : histedit_source : a0cce6015636202bff09e35a13f72e03257a7695
2019-01-18 10:16:18 +01:00
John Lin
2a6faa6bf8 Bug 1508434 - p1: Support explicitly resetting seek threshold. r=jya
Usually the threshold is reset internally in MediaDataDecoder subclasses
that support the hint in their Flush() implementations so the value
will start fresh after seeking completed. But sometimes when there are
consecutive seek requests, MediaFormatReader::DecoderData::Flush() could
return early because DecoderData::mFlushed stays true when there is no
sample demuxed yet, and the threshold will not be cleared. Also, in
MediaFormatReader::SetVideoDecodeThreshold() we decide not to set the
hint when the seek target is close to EOS by checking the existence of
the next keyframe, and that could fail when there are gaps between MSE
buffered ranges. To make sure the hint is never out of date, we should
clear it rather than leaving it untouched.

Differential Revision: https://phabricator.services.mozilla.com/D15227

--HG--
extra : moz-landing-system : lando
2019-01-11 17:07:49 +00:00
Brindusan Cristian
e4a445730d Backed out 4 changesets (bug 1508434) for mda failures on test_waveShaperPassThrough.html. CLOSED TREE
Backed out changeset 1851290ec29b (bug 1508434)
Backed out changeset 12424313d637 (bug 1508434)
Backed out changeset 8fbed3243217 (bug 1508434)
Backed out changeset 25b67aa0ef55 (bug 1508434)
2019-01-09 21:00:35 +02:00
John Lin
3ef17ab0cb Bug 1508434 - p1: Support explicitly resetting seek threshold. r=jya
Usually the threshold is reset internally in MediaDataDecoder subclasses
that support the hint in their Flush() implementations so the value
will start fresh after seeking completed. But sometimes when there are
consecutive seek requests, MediaFormatReader::DecoderData::Flush() could
return early because DecoderData::mFlushed stays true when there is no
sample demuxed yet, and the threshold will not be cleared. Also, in
MediaFormatReader::SetVideoDecodeThreshold() we decide not to set the
hint when the seek target is close to EOS by checking the existence of
the next keyframe, and that could fail when there are gaps between MSE
buffered ranges. To make sure the hint is never out of date, we should
clear it rather than leaving it untouched.

Differential Revision: https://phabricator.services.mozilla.com/D15227

--HG--
extra : moz-landing-system : lando
2019-01-08 20:57:34 +00:00
Gabriele Svelto
19e52bebd4 Bug 1510582 - Remove useless inclusions of Services.h r=erahm
Differential Revision: https://phabricator.services.mozilla.com/D13240

--HG--
extra : moz-landing-system : lando
2018-11-28 17:25:23 +00:00
Sylvestre Ledru
804b8b8883 Bug 1204606 - Reformat of dom/media r=jya
# skip-blame

Differential Revision: https://phabricator.services.mozilla.com/D12251

--HG--
extra : moz-landing-system : lando
2018-11-19 13:25:37 +00:00
Jean-Yves Avenard
8ef35e13b5 Bug 1498788 - Adjust width and height so they are never bigger than source or destination. r=mattwoodrow
Why we would need this is unclear however. the destination texture should always be smaller than what comes out of the decoder.

Differential Revision: https://phabricator.services.mozilla.com/D8672

--HG--
extra : moz-landing-system : lando
2018-10-14 19:01:01 +00:00
Sylvestre Ledru
dd5741407b Bug 1498586 - Add clang-format off to avoid the reformatting of the data structures r=Ehsan
Too hard/impossible for the tool to format correctly these structs

Differential Revision: https://phabricator.services.mozilla.com/D8569

--HG--
extra : moz-landing-system : lando
2018-10-12 20:48:24 +00:00
Jean-Yves Avenard
c084a873d7 Bug 1497294 - P5. Clip source to destination size when copying the D3D11 texture. r=mattwoodrow
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

Differential Revision: https://phabricator.services.mozilla.com/D8203

--HG--
extra : moz-landing-system : lando
2018-10-11 01:43:29 +00:00
Jean-Yves Avenard
a6e92bb58d Bug 1496529 - P9. Enable low latency decoding on Windows. r=bryce
Depends on D7908

Differential Revision: https://phabricator.services.mozilla.com/D7909

--HG--
extra : moz-landing-system : lando
2018-10-09 16:59:32 +00:00
Jean-Yves Avenard
3a0d9bef61 Bug 1495025 - P6. Remove now unused paramater. r=bryce
Depends on D7316

Differential Revision: https://phabricator.services.mozilla.com/D7491
2018-10-08 15:52:01 +02:00
Jean-Yves Avenard
34eeec152b Bug 1495025 - P5. Add Windows P010 and P016 support for software decoder r=cpearce
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

Differential Revision: https://phabricator.services.mozilla.com/D7318
2018-10-08 15:52:01 +02:00
Jean-Yves Avenard
e0e52e125f Bug 1495025 - P3. Store original IMFMediaType's subtype in D3D11SharedHandleImage. r=cpearce
This allows more easily the creation of the MFT required to convert to a RGBA32 image when doing a readback.

Depends on D7295

Differential Revision: https://phabricator.services.mozilla.com/D7296
2018-10-08 15:52:00 +02:00
Jean-Yves Avenard
dd9e74b3bb Bug 1495025 - P2. Use lambda for callback. r=cpearce
I find it easier to read than a function pointer making you search elsewhere to see what it's about

Depends on D7294

Differential Revision: https://phabricator.services.mozilla.com/D7295
2018-10-08 15:52:00 +02:00
Jean-Yves Avenard
c8d172b91e Bug 1495025 - P1. Search for alternative pixel format when stream change. r=cpearce
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.

Differential Revision: https://phabricator.services.mozilla.com/D7294
2018-10-08 15:51:59 +02:00
Narcis Beleuzu
18849ef0ae Backed out 6 changesets (bug 1495025) for webgl2 failures on test_2_conformance2__textures__misc__npot-video-sizing.html
Backed out changeset 24d67618f6b9 (bug 1495025)
Backed out changeset 68efa7588ba8 (bug 1495025)
Backed out changeset 9f59a50dcc6d (bug 1495025)
Backed out changeset 7fd1f6103294 (bug 1495025)
Backed out changeset f1afe7e2a9e3 (bug 1495025)
Backed out changeset c62823871aca (bug 1495025)
2018-10-07 02:03:46 +03:00
Jean-Yves Avenard
a2ca04a901 Bug 1495025 - P6. Remove now unused paramater. r=bryce
Depends on D7316

Differential Revision: https://phabricator.services.mozilla.com/D7491
2018-10-06 21:31:22 +02:00
Jean-Yves Avenard
8acdf2fe0e Bug 1495025 - P5. Add Windows P010 and P016 support for software decoder r=cpearce
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

Differential Revision: https://phabricator.services.mozilla.com/D7318
2018-10-06 21:31:22 +02:00
Jean-Yves Avenard
96df06d643 Bug 1495025 - P3. Store original IMFMediaType's subtype in D3D11SharedHandleImage. r=cpearce
This allows more easily the creation of the MFT required to convert to a RGBA32 image when doing a readback.

Depends on D7295

Differential Revision: https://phabricator.services.mozilla.com/D7296
2018-10-06 21:31:22 +02:00
Jean-Yves Avenard
fca284e065 Bug 1495025 - P2. Use lambda for callback. r=cpearce
I find it easier to read than a function pointer making you search elsewhere to see what it's about

Depends on D7294

Differential Revision: https://phabricator.services.mozilla.com/D7295
2018-10-06 21:31:22 +02:00
Jean-Yves Avenard
93241b3850 Bug 1495025 - P1. Search for alternative pixel format when stream change. r=cpearce
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.

Differential Revision: https://phabricator.services.mozilla.com/D7294
2018-10-06 21:31:21 +02:00
Brindusan Cristian
070df1d4c1 Backed out 6 changesets (bug 1495025) for mochitest-webgl2 failures in test_2_conformance2__textures__misc__npot-video-sizing.html. CLOSED TREE
Backed out changeset 263d4f722174 (bug 1495025)
Backed out changeset 528dbc463c22 (bug 1495025)
Backed out changeset 25895d283d47 (bug 1495025)
Backed out changeset c3b43ee1092e (bug 1495025)
Backed out changeset c548d816019d (bug 1495025)
Backed out changeset 208624601a18 (bug 1495025)
2018-10-04 15:16:07 +03:00
Jean-Yves Avenard
519689d5ee Bug 1322234 - P4. Don't attempt to use Windows VP9 decoder for profile 1 and 3. r=bryce
The Windows VP9 hardware decoder currently do not support anything else than profile 0 and 2 (YUV420) and return garbage when decoding.

We error on those streams allowing to fall back on the ffvp9 software decoder.

Depends on D7647

Differential Revision: https://phabricator.services.mozilla.com/D7648

--HG--
extra : moz-landing-system : lando
2018-10-04 09:52:37 +00:00
Jean-Yves Avenard
84c750dbe6 Bug 1322234 - P1. Add option to disable hardware decoding. r=bryce
For know will only be used with Windows WMF decoders.

Differential Revision: https://phabricator.services.mozilla.com/D7615

--HG--
extra : moz-landing-system : lando
2018-10-04 09:42:56 +00:00
Jean-Yves Avenard
3bfe92e28f Bug 1495025 - P6. Remove now unused paramater. r=bryce
Depends on D7316

Differential Revision: https://phabricator.services.mozilla.com/D7491

--HG--
extra : moz-landing-system : lando
2018-10-04 09:47:59 +00:00
Jean-Yves Avenard
6450a31107 Bug 1495025 - P5. Add Windows P010 and P016 support for software decoder r=cpearce
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

Differential Revision: https://phabricator.services.mozilla.com/D7318

--HG--
extra : moz-landing-system : lando
2018-10-04 09:41:58 +00:00
Jean-Yves Avenard
034f4af789 Bug 1495025 - P3. Store original IMFMediaType's subtype in D3D11SharedHandleImage. r=cpearce
This allows more easily the creation of the MFT required to convert to a RGBA32 image when doing a readback.

Depends on D7295

Differential Revision: https://phabricator.services.mozilla.com/D7296

--HG--
extra : moz-landing-system : lando
2018-10-04 09:40:51 +00:00
Jean-Yves Avenard
888a458009 Bug 1495025 - P2. Use lambda for callback. r=cpearce
I find it easier to read than a function pointer making you search elsewhere to see what it's about

Depends on D7294

Differential Revision: https://phabricator.services.mozilla.com/D7295

--HG--
extra : moz-landing-system : lando
2018-10-04 09:40:18 +00:00
Jean-Yves Avenard
b1b4774ad7 Bug 1495025 - P1. Search for alternative pixel format when stream change. r=cpearce
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.

Differential Revision: https://phabricator.services.mozilla.com/D7294

--HG--
extra : moz-landing-system : lando
2018-10-04 09:39:50 +00:00
Jean-Yves Avenard
b10364a15f Bug 1493198 - P2. Use enum for describing color depth. r=mattwoodrow
Depends on D6662

Differential Revision: https://phabricator.services.mozilla.com/D6663

--HG--
extra : moz-landing-system : lando
2018-09-25 20:44:55 +00:00
Jean-Yves Avenard
1e194027cb Bug 1484783 - Ensure to read the default stride when hardware acceleration isn't usable. r=mattwoodrow
On some platforms where a hardware decoder is present, but non functioning, we would fail to initialize the video stride, leading to the frames being incorrectly displayed later.

Also delete the DXVA2 manager early under those circumstances

Differential Revision: https://phabricator.services.mozilla.com/D5402

--HG--
extra : moz-landing-system : lando
2018-09-11 00:52:09 +00:00
Jean-Yves Avenard
f278c2be62 Bug 1409664 - P16. Fix typo in variable name. r=bryce
Summary:

Depends on D1629

Tags: #secure-revision

Bug #: 1409664

Differential Revision: https://phabricator.services.mozilla.com/D1630
2018-07-03 11:45:21 -07:00
Jean-Yves Avenard
0c1b59ee76 Bug 1409664 - P12. Don't attempt to play non-supported AAC sampling rate. r=padenot
Summary:
We know those sampling rate aren't supported and cause initialization errors later.

Depends on D1624

Tags: #secure-revision

Bug #: 1409664

Differential Revision: https://phabricator.services.mozilla.com/D1625
2018-07-03 11:45:20 -07:00
sotaro
22c2a053bf Bug 1470386 - Recycle TextureClient at IMFYCbCrImage r=mattwoodrow 2018-06-28 12:56:36 +09:00
Jean-Yves Avenard
d677c92441 Bug 1470754 - Remove AMD VP9 MFT support r=bryce
Not even AMD supports it anymore.

Differential Revision: https://phabricator.services.mozilla.com/D1793
2018-06-25 17:49:48 +00:00
sotaro
5ae7f885d0 Bug 1466059 - Use DeviceManagerDx::GetImageDevice() in WMFVideoMFTManager::InitInternal() r=nical 2018-06-04 09:42:16 +09:00
Emilio Cobos Álvarez
fffb25b74f Bug 1465585: Switch from mozilla::Move to std::move. r=froydnj
This was done automatically replacing:

  s/mozilla::Move/std::move/
  s/ Move(/ std::move(/
  s/(Move(/(std::move(/

Removing the 'using mozilla::Move;' lines.

And then with a few manual fixups, see the bug for the split series..

MozReview-Commit-ID: Jxze3adipUh
2018-06-01 10:45:27 +02:00
Jean-Yves Avenard
5c9362146d Bug 1457499 - P3. Query decoded frame size instead of calculating it. r=bryce
Under most cases, the frame decoded height is just the displayed height rounded to the next 16 row aligned value.
However, this doesn't appear to always be the case. So we query the WMF framework for the decoded frame size.
We continue to use the displayed sizes as found in the SPS to ensure proper display of non 1:1 aspect ratio.

Adding diagnostic assertion to find potential regressions, we will address those as they come.

MozReview-Commit-ID: L8VowEw6L9F

--HG--
extra : rebase_source : 49acd9fd36469ee0a4e1ed0fe5cd6f2211ba8117
2018-05-16 11:09:20 +02:00
Jean-Yves Avenard
9ad27a22c2 Bug 1457499 - P2. Fix compilation warning. r=bryce
TaskQueue::Dispatch returns a nsresult which must be checked.

MozReview-Commit-ID: 7Tl7O96rQNt

--HG--
extra : rebase_source : e898b776f765a5641a794a7242715728940075f6
2018-05-16 11:03:05 +02:00