Closed Bug 1864008 Opened 8 months ago Closed 7 months ago

Bring libvpx to ffvpx/libavcodecs

Categories

(Core :: Audio/Video, task, P1)

All
Linux
task

Tracking

()

RESOLVED FIXED
122 Branch
Tracking Status
firefox122 --- fixed

People

(Reporter: chunmin, Assigned: chunmin)

References

Details

Attachments

(7 files, 3 obsolete files)

Currently, there is no vpx encoder in ffvpx. To implement a VPX encoder with MediaDataEncoder interface through ffvpx/libavcodec, we need to bring libvpx to ffvpx.

This patch brings the platform-specific vpx_codec_build_config
implementation into libvpx since it will be used and exposed in the
following patches.

Depends on D193598

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/

Depends on D193599

  • Add libvpxdec.c and libvpxenc.c to libavcodec/moz.build
  • Add ff_libvpx_vp{8,9}_{de, en}coder to codec_list

Depends on D193600

Set CONFIG_LIBVPX on unix64 platforms and enable CONFIG_LIBVPX_VP*

Depends on D193601

Attachment #9363597 - Attachment description: WIP: Bug 1864008 - Set libvpx macros → WIP: Bug 1864008 - Add encoder APIs into FFmpegLibWrapper
Attachment #9363597 - Attachment description: WIP: Bug 1864008 - Add encoder APIs into FFmpegLibWrapper → WIP: Bug 1864008 - Add encoder-related APIs into FFmpegLibWrapper
No longer blocks: 1860925
Blocks: 1860899

Comment on attachment 9363597 [details]
WIP: Bug 1864008 - Add encoder-related APIs into FFmpegLibWrapper

Revision D193602 was moved to bug 1860899. Setting attachment 9363597 [details] to obsolete.

Attachment #9363597 - Attachment is obsolete: true
Attachment #9363593 - Attachment description: WIP: Bug 1864008 - Build libvpx with platform-specific vpx_config.c → Bug 1864008 - Build libvpx with platform-specific vpx_config.c
Attachment #9363595 - Attachment description: WIP: Bug 1864008 - Copy libvpx files to ffvpx → Bug 1864008 - Copy libvpx files to ffvpx
Attachment #9363596 - Attachment description: WIP: Bug 1864008 - Integrate libvpx with libavcodec → Bug 1864008 - Integrate libvpx with libavcodec
Attachment #9363594 - Attachment description: WIP: Bug 1864008 - Move libvpx to libgkcodecs → Bug 1864008 - Move libvpx to libgkcodecs

Depends on D193598

This patch is the first part that moves libvpx from libgkmedias to
libgkcodecs.

When ac_add_options --with-system-libvpx (and --without-sysroot if
needed) is set in mozconfig (MOZ_SYSTEM_LIBVPX case), the libvpx
installed in the system will be used and the media/libvpx won't be
built, so the libvpx APIs shouldn't be exposed via gkcodecs' symbols in
this case.

With the changes, the "vpx/..." headers #included in the VPX
encoders should be replaced with system headers like <vpx/...>
instead. While the VPX headers under dom/media are updated in this
patch, those headers under third_party/libwebrtc are set in a different
way in the following patches.

Since libpixman needs android_getCpuFeatures and _getCpuFamily APIs,
which were built by libvpx previously, cpu-features.c now is required to
be included in its moz.build to get the API it needs.

Depends on D195055

This patch addes trampoline headers for libvpx.

To follow the libwebrtc merge procedure, the vpx headers are silently
replaced with "trampoline" headers, which do nothing but include real
VPX headers. This makes the libwebrtc-merge process easier without
worrying headers' paths.

Depends on D195494

This patch sets rtc_build_libvpx to true in webrtc.gni, so the
moz.build file for third_party/libvpx can be generated by the
gn_processor in the next patch.

Depends on D195495

This patch overwrites moz.build files for libwebrtc.

The newly added libvpx_gn/moz.build and other build files are generated
automatically by running

./mach python python/mozbuild/mozbuild/gn_processor.py \
  dom/media/webrtc/third_party_build/gn-configs/webrtc.json

Depends on D195496

Attachment #9363594 - Attachment description: Bug 1864008 - Move libvpx to libgkcodecs → Bug 1864008 - Move libvpx to libgkcodecs, part 1
Attachment #9366960 - Attachment is obsolete: true
Attachment #9366963 - Attachment description: Bug 1864008 - Move libvpx to libgkcodecs, part 4 → Bug 1864008 - Move libvpx to libgkcodecs, part 3
Attachment #9366962 - Attachment is obsolete: true
Pushed by cchang@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/63ec56d06ad6
Build libvpx with platform-specific vpx_config.c r=media-playback-reviewers,glandium,karlt
https://hg.mozilla.org/integration/autoland/rev/b99801655626
Alphabetize gkcodecs.symbols r=glandium
https://hg.mozilla.org/integration/autoland/rev/4ad7de7e3c9c
Move libvpx to libgkcodecs, part 1 r=media-playback-reviewers,glandium,alwu,padenot
https://hg.mozilla.org/integration/autoland/rev/d43978d3d835
Move libvpx to libgkcodecs, part 2 r=webrtc-reviewers,padenot,mjf
https://hg.mozilla.org/integration/autoland/rev/87d8deb5500f
Move libvpx to libgkcodecs, part 3 r=webrtc-reviewers,padenot,mjf
https://hg.mozilla.org/integration/autoland/rev/4c80c48cc943
Copy libvpx files to ffvpx r=media-playback-reviewers,padenot
https://hg.mozilla.org/integration/autoland/rev/4e7047383483
Integrate libvpx with libavcodec r=media-playback-reviewers,glandium,padenot
See Also: → 1868618
Regressions: 1875201
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: