gecko-dev/media/ffvpx/README_MOZILLA
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

48 lines
3.6 KiB
Plaintext

This directory contains files used in gecko builds from FFmpeg
(http://ffmpeg.org). The current files are from FFmpeg as of
revision n4.0.2-6-g2be51cbeea
All source files match their path from the library's source archive.
Currently, we only use the vp8 and vp9 portion of the library, and only on x86
based platforms. If this changes, configuration files will most likely
need to be updated.
AVX2 must be disabled on Linux 32 bits due to the use of yasm 1.1 on the build bots.
Once yasm is upgraded to 1.2 or later, AVX2 code could be re-enabled.
Add --disable-avx2 to configure on those platforms.
configuration files were generated as follow using the configure script:
./configure --disable-everything --disable-protocols --disable-demuxers --disable-muxers --disable-filters --disable-programs --disable-doc --disable-parsers --enable-parser=vp8 --enable-parser=vp9 --enable-decoder=vp8 --enable-decoder=vp9 --disable-static --enable-shared --disable-debug --disable-sdl2 --disable-libxcb --disable-securetransport --disable-iconv --disable-swresample --disable-swscale --disable-avdevice --disable-avfilter --disable-avformat --disable-d3d11va --disable-dxva2 --disable-vaapi --disable-vdpau --disable-videotoolbox --enable-decoder=flac --enable-asm --enable-x86asm --disable-cuvid --disable-cuda
config*:
replace: /HAVE_(MALLOC_H|ARC4RANDOM|LOCALTIME_R|MEMALIGN|POSIX_MEMALIGN)/d
config_unix32.h:
add to configure command: --disable-asm --disable-x86asm --cc='clang -m32'
config_android.h:
./configure --disable-everything --disable-protocols --disable-demuxers --disable-muxers --disable-filters --disable-programs --disable-doc --disable-parsers --disable-static --enable-shared --disable-debug --disable-sdl2 --disable-libxcb --disable-securetransport --disable-iconv --disable-swresample --disable-swscale --disable-avdevice --disable-avfilter --disable-avformat --disable-d3d11va --disable-dxva2 --disable-vaapi --disable-vdpau --disable-videotoolbox --enable-decoder=flac --disable-asm --disable-cuvid --disable-cuda --cross-prefix=~/.mozbuild/android-ndk-r15c/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi- --target-os=linux --arch=arm --enable-cross-compile --sysroot=~/.mozbuild/android-ndk-r15c/platforms/android-24/arch-arm
config_unix32.h/config_unix64.h/config_unix64.asm:
replace: s/HAVE_SYSCTL 1/HAVE_SYSCTL 0
config_win32/64.h/asm:
add to configure command: --toolchain=msvc
Regenerate defaults_disabled.{h,asm} with:
$ grep -E ".*_(INDEV|OUTDEV|DECODER|ENCODER|DEMUXER|MUXER|PARSER|FILTER|HWACCEL|PROTOCOL|ENCODERS|DECODERS|HWACCELS|INDEVS|OUTDEVS|FILTERS|DEMUXERS|MUXERS|PROTOCOLS|BSF) 0" config.h | sort -u > ~/Work/Mozilla/mozilla-central/media/ffvpx/defaults_disabled.h
$ grep -E ".*_(INDEV|OUTDEV|DECODER|ENCODER|DEMUXER|MUXER|PARSER|FILTER|HWACCEL|PROTOCOL|ENCODERS|DECODERS|HWACCELS|INDEVS|OUTDEVS|FILTERS|DEMUXERS|MUXERS|PROTOCOLS|BSF) 0" config.asm | sort -u > ~/Work/Mozilla/mozilla-central/media/ffvpx/defaults_disabled.asm
All new decoders/muxers/encoders/... should be added in the list of dummy functions found in libavcodec/dummy_funcs.c
otherwise linkage will fail on Windows. On other platforms they are optimised out and aren't necessary.
The GNU comm utility is a useful tool to compare and extract only the changes.
To update the source tree, perform a diff on the files listed in FILES.
The diffs should typically apply to the ffvpx tree.
e.g. something like this would do:
Run in the ffmpeg original tree:
$ for i in `cat $PATH_CENTRAL/media/ffvpx/FILES`; do git diff $REV_LASTSYNC HEAD >> patch.diff; done
Then apply patch.diff on the ffvpx tree.
Compilation will reveal if any files are missing.