Граф коммитов

1297 Коммитов

Автор SHA1 Сообщение Дата
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 0fcc0bd516 Bug 1496529 - P10. Add to libvpx decoder low latency mode. r=bryce
Depends on D7909

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

--HG--
extra : moz-landing-system : lando
2018-10-09 22:59:47 +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 2349b2eb93 Bug 1496529 - P7. Pass full range of CreateDecoderParam::Option to RemoteVideoDecoder r=bryce
Depends on D7882

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

--HG--
extra : moz-landing-system : lando
2018-10-09 16:59:24 +00:00
Jean-Yves Avenard 38ff84370c Bug 1496529 - P6. Always run EMEDecryptor on the decoder's taskqueue. r=bryce
P2 changed the way the H264Converter would be calling the decoder. The assumption in the EMEDecryptor was pretty incorrect to start with.

Depends on D7865

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

--HG--
extra : moz-landing-system : lando
2018-10-09 22:58:05 +00:00
Jean-Yves Avenard e9c79b802d Bug 1496529 - P3. Make the Apple H264 decoder provide 0 latency option. r=bryce
When used with the LowLatency option, we guarantee that the stream will contain no B-frame, as such we can reduce the re-ordering queue to zero. The apple VT decoder already returns frames in decode order making this change trivial.

Depends on D7861

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

--HG--
extra : moz-landing-system : lando
2018-10-09 16:59:05 +00:00
Jean-Yves Avenard 523200b148 Bug 1496529 - P2. Make H264Converter use provided decoder's TaskQueue. r=bryce
The H264Converter can be used on a thread that isn't a nsThread or a TaskQueue, so having the H264Converter dispatching tasks isn't going to work

So instead we run all the code on the decoder's taskqueue using promise chaining.
All internal methods are made to assert that they are running on the task queue accordingly

Depends on D7860

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

--HG--
extra : moz-landing-system : lando
2018-10-09 23:05:40 +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 c0ac48ee0c Bug 1322234 - P3. Add method to read a VP9 profile from a VP9 bitstream r=TD-Linux
Depends on D7616

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

--HG--
extra : moz-landing-system : lando
2018-10-04 09:43:57 +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 be4b99eff2 Bug 1496222 - Add missing pixel format in FFmpeg decoder r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D7664

--HG--
extra : moz-landing-system : lando
2018-10-04 09:46:33 +00:00
Jean-Yves Avenard f97bb952b9 Bug 1493198 - P5. Don't restrict high bit depth images on Windows r=bryce
Both D3D11 compositor and WebRender now supports 10/12 bits images.

Depends on D6688

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

--HG--
extra : moz-landing-system : lando
2018-09-26 15:01:57 +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 2a38025bd4 Bug 1469711 - P3. Allow HDR vp9 decoding with D3D11 compositor r=bryce
The D3D11 compositor now supports 10 and 12 bits image

Depends on D6498

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

--HG--
extra : moz-landing-system : lando
2018-09-24 01:28:29 +00:00
Bryce Van Dyk 413ba3feef Bug 1487811 - P1: Update Widevine headers and C++ code to prepare for CDM interface 10 support. r=cpearce
Update content_decryption_module.h and other Widevine headers. This removes the
CDM8 interface and adds in the CDM10 and CDM11 interfaces. As such this patch
removes references to CDM8 from the code and adds some of the foundations for
supporting CDM10. Most of the CDM10 code will be implemented in another bug, but
there are a number of cases where it was straight forward to shuffle CDM8+9 code
-> CDM9+10, rather than deleting it and replacing it later.

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

--HG--
extra : moz-landing-system : lando
2018-09-13 14:49:10 +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 ebe177f75e Bug 1489102 - P5. Ensure the Opus decoder never returns an empty sample. r=bryce
This leads to audio content having negative start time

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

--HG--
extra : moz-landing-system : lando
2018-09-07 18:38:34 +00:00
Jean-Yves Avenard 032d3b87d7 Bug 1488065 - Update ffvpx to version n4.0.2-6-g2be51cbeea. r=bryce
Differential Revision: https://phabricator.services.mozilla.com/D5041

--HG--
rename : media/ffvpx/libavcodec/null_bsf.c => media/ffvpx/libavcodec/mpegvideodata.h
extra : moz-landing-system : lando
2018-09-06 13:18:00 +00:00
Jean-Yves Avenard 43c1f52a3b Bug 1487792 - Do not drain the FFmpeg parsers. r=bryce
In FFmpeg 4.0 and later, draining the parser will cause later decoding error as the decoder expects to only be fed a null packet.
It was also unnecessary for earlier version of FFmpeg

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

--HG--
extra : moz-landing-system : lando
2018-09-06 11:18:28 +00:00
Coroiu Cristina 79c7b523f8 Backed out changeset 29daa22239e9 (bug 1488065) for mda failures at dom/media/test/test_videoPlaybackQuality_totalFrames.html 2018-09-06 14:06:11 +03:00
Jean-Yves Avenard 38a3bd2e77 Bug 1488065 - Update ffvpx to version n4.0.2-6-g2be51cbeea. r=bryce
Differential Revision: https://phabricator.services.mozilla.com/D5041

--HG--
rename : media/ffvpx/libavcodec/null_bsf.c => media/ffvpx/libavcodec/mpegvideodata.h
extra : moz-landing-system : lando
2018-09-06 08:42:52 +00:00
Jean-Yves Avenard 95343883e7 Bug 1486080 - Always allocate memory to pass extradata. r=padenot
Despite wording of the documentation to the contrary, we can't provide a static pointer to an immutable object.
Apparently, it's always been that way.

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

--HG--
extra : moz-landing-system : lando
2018-08-27 13:22:26 +00:00
Jean-Yves Avenard d643f0e549 Bug 1484242 - P2. Add AllocationWrapper::CreateDecoder convenience method. r=bryce
This method will allocate a decoder according to the GlobalAllocPolicy. On Android API 18 and lower, there can only be a single decoder created at a time. The promise returned by CreateDecoder will only be resolved once the allocation policy permits a new decoder to be created.

Differential Revision: https://phabricator.services.mozilla.com/D3678
2018-08-21 15:20:54 +02:00
Jean-Yves Avenard d3b19c39b3 Bug 1484242 - P1. Add AllocationPolicy objects. r=bryce
We extract the GlobalAllocationPolicy and the MediaDataDecoder wrapper from MediaFormatReader.

They will be used to create a new wrapping class that will serialize allocation and initalization of decoders if the platform requires it.

Differential Revision: https://phabricator.services.mozilla.com/D3676
2018-08-21 15:20:54 +02:00
Jean-Yves Avenard 384be24476 Bug 1482847 - Fix android decoder creation. r=jolin
A mDisplay vs mImage mixup. We also set both values in CreateTrackInfoWithMIMETypeAndContainerTypeExtraParameters to prevent similar issues in the future.

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

--HG--
extra : moz-landing-system : lando
2018-08-20 15:47:21 +00:00
Jean-Yves Avenard 2cdf517489 Bug 1484648 - Implement CodecProxy::IsHardwareAccelerated. r=jolin
Differential Revision: https://phabricator.services.mozilla.com/D3789

--HG--
extra : moz-landing-system : lando
2018-08-20 15:42:33 +00:00
John Lin c10cb88742 Bug 1480533 - drop frames with presentation time earlier than what's already output. r=jya
MediaCodec products out of order buffers for some Twitch (60fps)
streams. Detecting and discarding these frames asap to make the
buffers available to codec sooner, reducing the chances of
starvation.

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

--HG--
extra : moz-landing-system : lando
2018-08-09 16:29:51 +00:00
Karl Tomlinson 146c0a09dd bug 1476231 add accessor for ffvpx real DFT functions r=jya
MozReview-Commit-ID: AF2jl6ZnD4z

--HG--
extra : rebase_source : c7f6c60e3f1b282db5aef2f7b84f23b46734513f
2018-07-14 12:32:20 +12:00
Karl Tomlinson c0bf3f57b9 bug 1476231 link ffmpeg real DFT functions r=jya
MozReview-Commit-ID: 1K5tta51rBB

--HG--
extra : rebase_source : 11355d14e69ca8f79c504274e4cdc78748af1a1d
2018-07-14 11:57:45 +12:00
Jean-Yves Avenard d7eb320e7a Bug 1476975 - P3. Fix canPlayType/isTypeSupported for AV1 content. r=dminor
AV1 support is behind a pref, as such, the result of canPlayType should depends on the value of that pref.

Additionally to this change we remove AOMDecoder::IsSupportedCodec as it implied confusion on what a codec mimetype is. There are two type of codec mimetype: the one describing the container content ("av1") and the one describing the codec itself "video/av1")
AOMDecoder shouldn't know anything about containers (e.g. mp4 or webm)

--HG--
extra : rebase_source : 72ebe662f76fb6c9d8be1f753890601aac440061
2018-07-20 10:24:56 +02:00
Noemi Erli 76fe049448 Backed out 3 changesets (bug 1476975) for mochitest failures on test_can_play_type_webm.html
Backed out changeset 91585d095420 (bug 1476975)
Backed out changeset 798f4894ffd5 (bug 1476975)
Backed out changeset b5377ceef34f (bug 1476975)
2018-07-20 21:27:01 +03:00