Compare commits

...

2 Commits

Author SHA1 Message Date
30ddc39ed5 update README and init PGO 2025-12-20 12:02:06 -06:00
25093463af fix darwin not packaging 2025-12-20 11:57:18 -06:00
3 changed files with 49 additions and 37 deletions

View File

@@ -35,13 +35,14 @@ The default enabled libraries included in the `ffmpeg` build are:
- libmp3lame - libmp3lame
The user-overridable compile options are: The user-overridable compile options are:
- `CLEAN`: clean build directories before building (default: ON)
- `LTO`: enable link time optimization (default: ON)
- `OPT`: optimization level (0-3) (default: 3)
- `STATIC`: static or shared build (default: ON)
- `ARCH`: architecture type (x86-64-v{1,2,3,4}, armv8-a, etc) (default: native)
- `PREFIX`: prefix to install to, default is local install in ./gitignore/sysroot (default: local)
- `ENABLE`: configure what ffmpeg enables (default: libsvtav1_psy libopus libdav1d libaom librav1e libvmaf libx264 libx265 libwebp libmp3lame) - `ENABLE`: configure what ffmpeg enables (default: libsvtav1_psy libopus libdav1d libaom librav1e libvmaf libx264 libx265 libwebp libmp3lame)
- `PREFIX`: prefix to install to, default is local install in ./gitignore/sysroot (default: local)
- `STATIC`: static or shared build (default: ON)
- `LTO`: enable link time optimization (default: ON)
- `CLEAN`: clean build directories before building (default: ON)
- `PGO`: enable profile guided optimization (default: OFF)
- `ARCH`: architecture type (x86-64-v{1,2,3,4}, armv8-a, etc) (default: native)
- `OPT`: optimization level (0-3) (default: 3)
Examples: Examples:
- only build libsvtav1_psy and libopus: `ENABLE='libsvtav1_psy libopus' ./scripts/build.sh` - only build libsvtav1_psy and libopus: `ENABLE='libsvtav1_psy libopus' ./scripts/build.sh`
@@ -120,33 +121,41 @@ efg -i input [options]
Example usage: Example usage:
- `efg -i input.mkv -p` - `efg -i input.mkv -p`
``` ```
1 +------------------------------------------------------------------------------------------------------+ 10000 +------------------------------------------------------------------------------------------------------------------------------------------+
| *****G***** + + + | | **G* + + + + + |
| *****G** '/tmp/plot.dat' ***G*** | | ** /Volumes/External/ffmpeg-builder/gitignore/tmp/efg-matrix-reloaded.mkv/plot.dat ***G*** |
0.95 |-+ ***** +-| | *G** |
| **G* | | **G |
| *** | 9000 |-+ ** +-|
| **** | | *G** |
0.9 |-+ *G* +-| | **G |
| **** |
| **** |
0.85 |-+ *G* +-|
| *** |
| **** |
0.8 |-+ *G* +-|
| *** |
| **** |
| *G* |
0.75 |-+ *** +-|
| **** |
| *G* |
0.7 |-+ *** +-|
| ** | | ** |
| *** |
| *G* | | *G* |
0.65 |-+ *** +-| 8000 |-+ ** +-|
| **** | | *G** |
| + + + *| | **G |
0.6 +------------------------------------------------------------------------------------------------------+ | ** |
| *G** |
7000 |-+ **G* +-|
| ** |
| *G* |
| **G** |
6000 |-+ **G* +-|
| ** |
| *G* |
| **G** |
| **G* |
5000 |-+ **G** +-|
| **G****G* |
| **G** |
| **G****G* |
| **G****G* |
4000 |-+ **G****G****G* +-|
| **G****|
| |
| |
| + + + + + |
3000 +------------------------------------------------------------------------------------------------------------------------------------------+
0 5 10 15 20 25 30
``` ```

View File

@@ -1007,6 +1007,7 @@ build_ffmpeg() {
# lto is broken on darwin for ffmpeg only # lto is broken on darwin for ffmpeg only
# https://trac.ffmpeg.org/ticket/11479 # https://trac.ffmpeg.org/ticket/11479
local ltoBackup="${LTO}"
if is_darwin; then if is_darwin; then
LTO=OFF LTO=OFF
for flag in "${FFMPEG_EXTRA_FLAGS[@]}"; do for flag in "${FFMPEG_EXTRA_FLAGS[@]}"; do
@@ -1023,6 +1024,7 @@ build_ffmpeg() {
meta_configure_build \ meta_configure_build \
"${ffmpegFlags[@]}" || return 1 "${ffmpegFlags[@]}" || return 1
LTO="${ltoBackup}"
${SUDO_MODIFY} cp ff*_g "${PREFIX}/bin" ${SUDO_MODIFY} cp ff*_g "${PREFIX}/bin"
sanitize_sysroot_libs \ sanitize_sysroot_libs \
libavcodec libavdevice libavfilter libswscale \ libavcodec libavdevice libavfilter libswscale \

View File

@@ -14,6 +14,9 @@ DEFAULT_CLEAN=ON
FB_COMP_OPTS_DESC['LTO']='enable link time optimization' FB_COMP_OPTS_DESC['LTO']='enable link time optimization'
DEFAULT_LTO=ON DEFAULT_LTO=ON
FB_COMP_OPTS_DESC['PGO']='enable profile guided optimization'
DEFAULT_PGO=OFF
FB_COMP_OPTS_DESC['OPT']='optimization level (0-3)' FB_COMP_OPTS_DESC['OPT']='optimization level (0-3)'
DEFAULT_OPT=3 DEFAULT_OPT=3
@@ -41,9 +44,7 @@ libmp3lame\
" "
# user-overridable compile option variable names # user-overridable compile option variable names
FB_COMP_OPTS=( FB_COMP_OPTS=("${!FB_COMP_OPTS_DESC[@]}")
CLEAN LTO OPT STATIC ARCH PREFIX ENABLE
)
# sets FB_COMP_OPTS to allow for user-overriding # sets FB_COMP_OPTS to allow for user-overriding
check_compile_opts_override() { check_compile_opts_override() {