Commit Graph

232 Commits

Author SHA1 Message Date
Paul Adenot
5e1b03155c Bug 1879740 - Don't pass an UTF-8 string to system vsnprintf. r=media-playback-reviewers,chunmin
Differential Revision: https://phabricator.services.mozilla.com/D201606
2024-02-13 14:14:31 +00:00
Paul Adenot
87ec8b723e Bug 1877221 - Remove one more file related to obsolete ffmpeg FFT code. 2024-02-08 17:41:40 +01:00
Paul Adenot
62c44ff933 Bug 1877221 - Remove ARMv7 files related to obsolete FFT code in FFmpeg.
Differential Revision: https://phabricator.services.mozilla.com/D201098
2024-02-08 15:34:33 +00:00
Paul Adenot
7b929fd14e Bug 1877221 - Pull in new ffmpeg code, reapply patch. r=media-playback-reviewers,chunmin
Differential Revision: https://phabricator.services.mozilla.com/D199909
2024-02-08 10:39:54 +00:00
Paul Adenot
28601e544c Bug 1877221 - Adjust moz.build for new ffmpeg version. r=media-playback-reviewers,chunmin
Differential Revision: https://phabricator.services.mozilla.com/D199908
2024-02-08 10:39:53 +00:00
Paul Adenot
12b232b41b Bug 1877221 - Add new symbols and defines needed for current ffmpeg to build. r=media-playback-reviewers,chunmin
Differential Revision: https://phabricator.services.mozilla.com/D199907
2024-02-08 10:39:53 +00:00
Paul Adenot
c52b21b893 Bug 1749047 - Don't leak AVPacket. r=chunmin
Per FFmepg API's it has to be allocated on the heap and freed manually.
MakeScopeExit instead of uniqueptr + free policy is nicer I think because we
need to capture the FFmpegLibWrapper and all that.

Differential Revision: https://phabricator.services.mozilla.com/D196213
2023-12-22 21:39:15 +00:00
Chun-Min Chang
3ae0cd5065 Bug 1870952 - Move libvpx files to No MOZ_FFVPX_AUDIOONLY builds r=media-playback-reviewers,jolin
The `av_base64_encode` in `libvpxenc` [1] is only exposed in non
MOZ_FFVPX_AUDIOONLY builds [2]. The libvpx is for video, so its files
shouldn't be included in the audio-only (MOZ_FFVPX_AUDIOONLY) builds.

[1] https://searchfox.org/mozilla-central/rev/008ce958417fd724e02748740d669aafd49debb3/media/ffvpx/libavcodec/libvpxenc.c#1887
[2] https://searchfox.org/mozilla-central/rev/008ce958417fd724e02748740d669aafd49debb3/media/ffvpx/libavutil/avutil.symbols#6-9

Differential Revision: https://phabricator.services.mozilla.com/D196929
2023-12-20 18:26:28 +00:00
Chun-Min Chang
d9db7701f9 Bug 1869332 - Move libaom files to Non MOZ_FFVPX_AUDIOONLY builds r=media-playback-reviewers,jolin
The `av_base64_decode` and `av_base64_encode` in libaomenc.c are only
exposed in NON `MOZ_FFVPX_AUDIOONLY` builds [1], so libaom files should
be built in non audio-only builds as well.

[1] https://searchfox.org/mozilla-central/rev/008ce958417fd724e02748740d669aafd49debb3/media/ffvpx/libavutil/avutil.symbols#6-9

Differential Revision: https://phabricator.services.mozilla.com/D196925
2023-12-20 02:32:38 +00:00
Paul Adenot
430957a2aa Bug 1869332 - Add an av1 encoder based on libaom to ffvpx. r=chunmin
Depends on D196062

Differential Revision: https://phabricator.services.mozilla.com/D196063
2023-12-20 02:32:37 +00:00
Narcis Beleuzu
0f250fb8c2 Backed out 7 changesets (bug 1869332) for Android bustages. CLOSED TREE
Backed out changeset e1a7852ec85a (bug 1869332)
Backed out changeset 886e59d6495f (bug 1869332)
Backed out changeset 03ac3598f84f (bug 1869332)
Backed out changeset 5e775f2c2b9c (bug 1869332)
Backed out changeset 295a1e1f01d5 (bug 1869332)
Backed out changeset 2909ac6aeb41 (bug 1869332)
Backed out changeset dfab47873174 (bug 1869332)
2023-12-19 18:52:01 +02:00
Paul Adenot
536849cb5f Bug 1869332 - Add an av1 encoder based on libaom to ffvpx. r=chunmin
Differential Revision: https://phabricator.services.mozilla.com/D196063
2023-12-19 15:21:53 +00:00
Noemi Erli
862354d813 Backed out 7 changesets (bug 1869332) for causing libavcodec related bustages CLOSED TREE
Backed out changeset 1c0fd259312d (bug 1869332)
Backed out changeset d51eba30a225 (bug 1869332)
Backed out changeset 483d3f275da7 (bug 1869332)
Backed out changeset c401449274b4 (bug 1869332)
Backed out changeset c83313202040 (bug 1869332)
Backed out changeset 00ceb6e47715 (bug 1869332)
Backed out changeset 5acc2f4f12c2 (bug 1869332)
2023-12-14 12:02:45 +02:00
Paul Adenot
9556edc6a5 Bug 1869332 - Add an av1 encoder based on libaom to ffvpx. r=chunmin
Differential Revision: https://phabricator.services.mozilla.com/D196063
2023-12-14 09:12:35 +00:00
Stanca Serban
d84ca52ee4 Backed out 6 changesets (bug 1869332) for causing build bustages. CLOSED TREE
Backed out changeset 4f8c19f9dfcf (bug 1869332)
Backed out changeset 661e520c2991 (bug 1869332)
Backed out changeset 74e2acabc439 (bug 1869332)
Backed out changeset 1c4b5311ac03 (bug 1869332)
Backed out changeset af22bc552759 (bug 1869332)
Backed out changeset f557e130d997 (bug 1869332)
2023-12-13 18:13:24 +02:00
Paul Adenot
18f8661d6f Bug 1869332 - Add an av1 encoder based on libaom to ffvpx. r=chunmin
Differential Revision: https://phabricator.services.mozilla.com/D196063
2023-12-13 13:46:42 +00:00
Mike Hommey
619672a8e4 Bug 1867459 - Replace CPU_ARCH with TARGET_CPU. r=firefox-build-system-reviewers,sergesanspaille
Differential Revision: https://phabricator.services.mozilla.com/D195157
2023-12-08 10:43:59 +00:00
Chun-Min Chang
e416c3c2d6 Bug 1860899 - Expose encoder-related APIs from ffvpx/libavcodec r=padenot
Depends on D194127

Differential Revision: https://phabricator.services.mozilla.com/D194128
2023-12-08 06:17:02 +00:00
Chun-Min Chang
8b1a5f0602 Bug 1860899 - Alphabetize avcodec.symbols r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D194127
2023-12-08 06:17:01 +00:00
Chun-Min Chang
25fdc5577b Bug 1864008 - Integrate libvpx with libavcodec r=media-playback-reviewers,glandium,padenot
- Add libvpxdec.c and libvpxenc.c to libavcodec/moz.build
- Add ff_libvpx_vp{8,9}_{de, en}coder to codec_list
- Set CONFIG_LIBVPX on unix64 platforms
- Enable CONFIG_LIBVPX_VP*
- Expose libavcodec APIs that libvpx{dec, enc}.c need
- Expose libvpx APIS via gkcodecs' .symbols file if MOZ_SYSTEM_LIBVPX is
  not set

Differential Revision: https://phabricator.services.mozilla.com/D193601
2023-12-05 20:08:23 +00:00
Chun-Min Chang
4a98de4f29 Bug 1864008 - Copy libvpx files to ffvpx r=media-playback-reviewers,padenot
This patch copies the libvpx files from ffmpeg @ d9d5695390, which is
the current revision used in ffvpx, with the following command:

```
cp <FFMPEG>/libavcodec/libvpx* <GECKO>/media/ffvpx/libavcodec/
```

Differential Revision: https://phabricator.services.mozilla.com/D193600
2023-12-05 20:08:23 +00:00
Mike Hommey
a385c22fd5 Bug 1849049 - Don't try to export non-existing symbols. r=media-playback-reviewers,karlt
On e.g. Linux x86, ffvpx is built for audio only, and doesn't contain
some of the new symbols added in bug 1823953. In turn, with clang-trunk
(lld trunk, really), this leads to a hard error because lld is now less
lenient about the symbols listed in version scripts: they have to exist.

Differential Revision: https://phabricator.services.mozilla.com/D186393
2023-08-17 04:13:51 +00:00
Paul Adenot
46f3e6019f Bug 1846703 - Update vendored ffmpeg to d9d56953. r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D185921
2023-08-11 13:11:36 +00:00
Karl Tomlinson
ff49201f0f Bug 1358149 use fdlibm for inexact math functions in ffvpx/libavcodec r=padenot,firefox-build-system-reviewers,glandium
This includes the rdft FFT implementation.

Differential Revision: https://phabricator.services.mozilla.com/D185781
2023-08-10 19:46:05 +00:00
Paul Adenot
ae77ff9996 Bug 1828912 - Vendor libopus-related files in ffvpx. r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D181517
2023-08-08 12:12:43 +00:00
Paul Adenot
7cd491b638 Bug 1826382 - Update README_MOZILLA to mention that it can now handle PCM. r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D175157
2023-08-08 12:12:43 +00:00
Paul Adenot
86837f45cd Bug 1826382 - Vendor necessary files to decode all pcm types needed using ffmpeg. r=alwu,media-playback-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D174655
2023-08-08 12:12:41 +00:00
Paul Adenot
dc1e05bb52 Bug 1823953 - Update ffvpx's README_MOZILLA to mention that it can use libvorbis now. r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D175154
2023-08-08 12:12:41 +00:00
Paul Adenot
0211d2ff14 Bug 1823953 - Loop over avcodec_receive_frame when decoding using FFmpegAudioDecoder. r=alwu,media-playback-reviewers
It seems to work without, but the officiel ffmpeg command line utility and the
example for their internal library all do this.

This also splits the big DoDecode function into three sub-function for clarity,
as it was a bit hard with the #if statements.

Differential Revision: https://phabricator.services.mozilla.com/D173460
2023-08-08 12:12:40 +00:00
Paul Adenot
070b084f92 Bug 1823953 - Import libvorbis decoder integration into ffvpx. r=alwu,media-playback-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D173457
2023-08-08 12:12:40 +00:00
Paul Adenot
fa478cfce0 Bug 1823953 - Create libgkcodecs, move libvorbis and libogg to it. r=firefox-build-system-reviewers,geckoview-reviewers,glandium,owlish
We need to use libvorbis both from libavcodec and libxul during a transition
period while re-architecturing things, so this moves libvorbis and libogg (a
dependency) to a separate shared lib, linked when needed.

Differential Revision: https://phabricator.services.mozilla.com/D173458
2023-08-08 12:12:39 +00:00
Paul Adenot
c5f8f7659c Bug 1823953 - Update ffmpeg to revision 37cde570bc2. r=alwu,media-playback-reviewers
A regular update to current tip prior to adding a new decoder.

Differential Revision: https://phabricator.services.mozilla.com/D173456
2023-08-08 12:12:39 +00:00
Cristian Tuns
5d6b51256b Backed out 57 changesets (bug 1839389, bug 1840869, bug 1840399, bug 1840402, bug 1823953, bug 1828912, bug 1826382, bug 1837160, bug 1839391, bug 1833654) for causing build bustages in ogg_<something> CLOSED TREE
Backed out changeset 61356e1447e3 (bug 1823953)
Backed out changeset 85785505b6d6 (bug 1823953)
Backed out changeset 46a61cbfe8a8 (bug 1833654)
Backed out changeset 83e3de80337b (bug 1833654)
Backed out changeset 1a10c12874ac (bug 1840399)
Backed out changeset 6b087145b67f (bug 1833654)
Backed out changeset b9ac857ad43f (bug 1840399)
Backed out changeset 4b841e8dd033 (bug 1823953)
Backed out changeset 650e35803834 (bug 1823953)
Backed out changeset c11b58ac0709 (bug 1823953)
Backed out changeset c0249c90bc31 (bug 1823953)
Backed out changeset 8929288d5aec (bug 1823953)
Backed out changeset 828792b886bd (bug 1823953)
Backed out changeset 873f1d4a8875 (bug 1840869)
Backed out changeset a25abd05302c (bug 1823953)
Backed out changeset d4b1eb442c36 (bug 1840399)
Backed out changeset c25509d72a96 (bug 1840399)
Backed out changeset 0f72a0626a28 (bug 1840402)
Backed out changeset 82e7574364ce (bug 1840399)
Backed out changeset 93073105f063 (bug 1840399)
Backed out changeset 56ec8e3405e9 (bug 1840399)
Backed out changeset ff15dad37ab8 (bug 1840399)
Backed out changeset 0655ebd61eda (bug 1840399)
Backed out changeset 7bca1ae06c7d (bug 1828912)
Backed out changeset 8a5a849cfe5f (bug 1828912)
Backed out changeset 3d8422a2038a (bug 1828912)
Backed out changeset f08ee5de9370 (bug 1823953)
Backed out changeset a4eb210620ff (bug 1823953)
Backed out changeset aa8914cd55be (bug 1839391)
Backed out changeset 3ea1f43e4024 (bug 1823953)
Backed out changeset 3efe02ffa1c8 (bug 1826382)
Backed out changeset 81c4553ec23d (bug 1839391)
Backed out changeset 130894e4a781 (bug 1839391)
Backed out changeset 9a0247b0fc85 (bug 1839391)
Backed out changeset 11a923064382 (bug 1839391)
Backed out changeset 98ffb66160c3 (bug 1837160)
Backed out changeset a80dda9a220a (bug 1837160)
Backed out changeset 251b4ef97a2b (bug 1837160)
Backed out changeset 7372632eb32f (bug 1837160)
Backed out changeset c5d54bc3ee26 (bug 1839389)
Backed out changeset b232ec1bbc2d (bug 1833654)
Backed out changeset fc7ba125c2fe (bug 1833654)
Backed out changeset 8a47f6882e61 (bug 1823953)
Backed out changeset e29810541b53 (bug 1828912)
Backed out changeset bcf10730c8c9 (bug 1828912)
Backed out changeset 8df8290b6c33 (bug 1826382)
Backed out changeset 2811d12803cf (bug 1826382)
Backed out changeset 3fc718561ec9 (bug 1826382)
Backed out changeset 7827183776e1 (bug 1823953)
Backed out changeset a3eb5f228d9a (bug 1826382)
Backed out changeset 3113ad2e0987 (bug 1823953)
Backed out changeset 4b1dc01525af (bug 1823953)
Backed out changeset f7f4a7585ceb (bug 1823953)
Backed out changeset 93042f1becec (bug 1823953)
Backed out changeset b9ca30a0a066 (bug 1823953)
Backed out changeset 1000c4a6a92a (bug 1823953)
Backed out changeset 05dc13775fd6 (bug 1823953)
2023-08-01 09:37:39 -04:00
Paul Adenot
a4f56b65c9 Bug 1828912 - Vendor libopus-related files in ffvpx. r=alwu DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D181517
2023-08-01 12:41:06 +00:00
Paul Adenot
d7d8bf4831 Bug 1826382 - Update README_MOZILLA to mention that it can now handle PCM. r=alwu DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D175157
2023-08-01 12:41:05 +00:00
Paul Adenot
4c7bb6c7fd Bug 1823953 - Teach FFmpegAudioDecoder to now decode PCM. r=alwu,media-playback-reviewers DONTBUILD
This initialize the sample rate and channel layout attribute in the ffmpeg codec
codec context, necessary for PCM.

It's needed for some codecs but not all of them, and the decoder that wraps
libvorbis is one of them. This is necessary when a codec capabilities flag
include: `AV_CODEC_CAP_CHANNEL_CONF`. All channels are decoded as they are
present in the file, and the sample rate is also necessary when this flag is
present.

https://searchfox.org/mozilla-central/rev/8433b62e54fd30663e82f090c4d31554531a2e66/dom/media/platforms/ffmpeg/ffmpeg57/include/libavcodec/avcodec.h#911-914

Differential Revision: https://phabricator.services.mozilla.com/D174654
2023-08-01 12:41:05 +00:00
Paul Adenot
37daaf0278 Bug 1826382 - Vendor necessary files to decode all pcm types needed using ffmpeg. r=alwu,media-playback-reviewers DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D174655
2023-08-01 12:41:05 +00:00
Paul Adenot
0f2d2fe416 Bug 1823953 - Update ffvpx's README_MOZILLA to mention that it can use libvorbis now. r=alwu DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D175154
2023-08-01 12:41:04 +00:00
Paul Adenot
7b6f0b2fe5 Bug 1823953 - Loop over avcodec_receive_frame when decoding using FFmpegAudioDecoder. r=alwu,media-playback-reviewers DONTBUILD
It seems to work without, but the officiel ffmpeg command line utility and the
example for their internal library all do this.

This also splits the big DoDecode function into three sub-function for clarity,
as it was a bit hard with the #if statements.

Differential Revision: https://phabricator.services.mozilla.com/D173460
2023-08-01 12:41:04 +00:00
Paul Adenot
e667d69127 Bug 1823953 - Import libvorbis decoder integration into ffvpx. r=alwu,media-playback-reviewers DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D173457
2023-08-01 12:41:04 +00:00
Paul Adenot
3cc8cb3732 Bug 1823953 - Create libgkcodecs, move libvorbis and libogg to it. r=firefox-build-system-reviewers,geckoview-reviewers,glandium,owlish DONTBUILD
We need to use libvorbis both from libavcodec and libxul during a transition
period while re-architecturing things, so this moves libvorbis and libogg (a
dependency) to a separate shared lib, linked when needed.

Differential Revision: https://phabricator.services.mozilla.com/D173458
2023-08-01 12:41:03 +00:00
Paul Adenot
f11857f18e Bug 1823953 - Update ffmpeg to revision 37cde570bc2. r=alwu,media-playback-reviewers DONTBUILD
A regular update to current tip prior to adding a new decoder.

Differential Revision: https://phabricator.services.mozilla.com/D173456
2023-08-01 12:41:03 +00:00
stransky
c1ec3ecb8b Bug 1833855 [Linux] Build VA-API FFVPX support Linux/Gtk r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D178636
2023-06-22 13:42:38 +00:00
Cristian Tuns
ac8a8744d7 Backed out 14 changesets (bug 1833855) for causing build bustages in DMABufSurface.cpp CLOSED TREE
Backed out changeset b8daeb03b670 (bug 1833855)
Backed out changeset cc17af8bae3d (bug 1833855)
Backed out changeset 2d4f6b8ad5d3 (bug 1833855)
Backed out changeset 3b75e59357bb (bug 1833855)
Backed out changeset 86948033f163 (bug 1833855)
Backed out changeset 3e6387b95e39 (bug 1833855)
Backed out changeset 7f22e082786c (bug 1833855)
Backed out changeset 9d5ae056d3c8 (bug 1833855)
Backed out changeset b0a7ca2dfbd6 (bug 1833855)
Backed out changeset ac0947e6e601 (bug 1833855)
Backed out changeset a058367a436a (bug 1833855)
Backed out changeset 7b4da292159c (bug 1833855)
Backed out changeset d50ae530998d (bug 1833855)
Backed out changeset 895b93846598 (bug 1833855)
2023-06-22 08:05:40 -04:00
stransky
0223e22406 Bug 1833855 [Linux] Build VA-API FFVPX support Linux/Gtk r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D178636
2023-06-22 11:17:23 +00:00
Cristian Tuns
684fec2fef Backed out 14 changesets (bug 1833855) for causing build bustages in SharedSurface.cpp CLOSED TREE
Backed out changeset c3f7d1963902 (bug 1833855)
Backed out changeset 347c47f5542a (bug 1833855)
Backed out changeset 2c0807d0b39a (bug 1833855)
Backed out changeset 013d1d16194d (bug 1833855)
Backed out changeset 2e49d43a627c (bug 1833855)
Backed out changeset ea21e90a71dd (bug 1833855)
Backed out changeset 8d5d0690668c (bug 1833855)
Backed out changeset 4eb11068275d (bug 1833855)
Backed out changeset 15120d9c5b24 (bug 1833855)
Backed out changeset b75750bb7596 (bug 1833855)
Backed out changeset 6f94e3f002ed (bug 1833855)
Backed out changeset 3235825211f9 (bug 1833855)
Backed out changeset 47a6e9ed8828 (bug 1833855)
Backed out changeset b8013c43aa20 (bug 1833855)
2023-06-22 05:29:12 -04:00
stransky
0ad4303985 Bug 1833855 [Linux] Build VA-API FFVPX support Linux/Gtk r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D178636
2023-06-22 08:35:57 +00:00
Paul Adenot
99f32bee4d Bug 1819374 - Improve documentation about ffmpeg vendoring, adding information about header vendoring. r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D171249
2023-03-01 15:02:18 +00:00
Paul Adenot
7bdff5aeb2 Bug 1819374 - Update symbol list file for ffmpeg 6.0. r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D171246
2023-03-01 15:02:17 +00:00
Paul Adenot
a78a244d73 Bug 1819374 - Update ffmpeg to current master, revert codec, bsf and parser list to ffvpx's subset, reapply in-tree patch. r=alwu
This is an rsync of the source tree, and an `hg revert`:

- `libavcodec/codec_list.c`
- `libavcodec/bsf_list.c`
- `libavcodec/parser_list.c`

Differential Revision: https://phabricator.services.mozilla.com/D171245
2023-03-01 15:02:16 +00:00