x264 is a free library for encoding H.264/AVC (aka MPEG-4 Part 10)
video streams.
Encoder features
* CAVLC/CABAC
* Multi-references
* Intra: all modes (4x4 and 16x16 with all predictions)
* Inter P: all partitions (from 16x16 down to 4x4)
* Inter B: partitions from 16x16 down to 8x8 (including SKIP/DIRECT)
* Ratecontrol: constant quantizer, constant bitrate, or multipass ABR
* Scene cut detection
===> The following configuration options are available for libx264-0.165.3223_1:
ASM=on: Use optimized assembly code
LTO=on: Use Link-Time Optimization
OPTIMIZED_CFLAGS=on: Use extra compiler optimizations
===> Use 'make config' to modify these settings
multimedia/*x264: Update to 0.165.3223 and transfer maintainership
* Switch to GStreamer's meson branch as it simplifies builds and is
faster
* Transfer maintainership to multimedia
* Remove DEBUG, GPAC, OPENCL and PGO options
By switching to Meson we can utilize the framework for debug builds
GPAC is broken upstream
OPENCL (lookahead) has very little advantage now that core count for
CPUs are much higher than a decade ago and with x264's limited
parallelization. It's also much simplier than x264's other code paths.
PGO pulls in GCC with no to little benefit
* Add LTO and OPTIMIZED_CFLAGS options
Available only on aarch64 and amd64, enabled by default
Reviewed by: bofh (previous iteration and discussed on Matrix)
multimedia: remove 'Created by' lines
A big Thank You to the original contributors of these ports:
* Aaron LI <aly@aaronly.me>
* Alexander Botero-Lowry <alexbl@FreeBSD.org>
* Alexander Logvinov <ports@logvinov.com>
* Alexey Dokuchaev <danfe@FreeBSD.org>
* Anders Nordby <anders@FreeBSD.org>
* Andrew Pantyukhin <infofarmer@FreeBSD.org>
* Andrew Thompson <andy@fud.org.nz>
* Andrew Thompson <thompsa@FreeBSD.org>
* Angel Carpintero <ack@telefonica.net>
* Anish Mistry (with help from mean)
* Anonymous <swell.k@gmail.com>
(Only the first 15 lines of the commit message are shown above )
multimedia/libx264: fix build on riscv64
ld: error: relocation R_RISCV_HI20 cannot be used against symbol
__stack_chk_guard; recompile with -fPIC
>>> defined in /lib/libc.so.7
>>> referenced by osdep.c
>>> common/osdep.o:(x264_mdate)
multimedia/{lib,}x264: return to building with clang on powerpc64 elfv2
Head r359981 and r359994 reverted commits that caused clang to run in infinite
loop, allocating all available memory and crashing the system.
multimedia/libx264: unbreak on arm* with LLD
ld: error: can't create dynamic relocation R_ARM_ABS32 against local symbol in
readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to
allow text relocations in the output
>>> defined in common/arm/mc-a-8.o
>>> referenced by common/arm/mc-a-8.o:(memcpy_table)
multimedia/libx264: add -znotext to LDFLAGS on i386, for lld
Example error:
/usr/bin/ld: error: can't create dynamic relocation R_386_PC32 against
symbol: gettimeofday in readonly segment; recompile object files
with -fPIC
This port links some non-PIC code, which fails with lld as it defaults
to disallowing relocations against read-only segments. For i386 we can
just add -znotext unconditionally: for GNU BFD ld it just affirms BFD's
existing default.
PR: 214864, 230214
Reviewed by: koobs
Approved by: koobs
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D17201
multimedia/libx264: set LLD_UNSAFE for i386 and armv7
libx264 has relocations against readonly segment(s) and lld exits with
an error suggesting recompiling with -fPIC. As this may introduce a
performance impact, for now just fall back to GNU ld.bfd.
PR: 230214
Approved by: koobs (maintainer)
MFH: 2018Q3
multimedia/x264: enable FFMS, LAVF, SWSCALE by default
Without FFmpeg-based demuxers x264 CLI can only read raw formats as
source. So, enable more options to allow the binary package not only
write but also read mp4/mkv.
PR: 220694
Approved by: koobs (maintainer)
MFH: 2017Q3 (usability improvement)
Differential Revision: https://reviews.freebsd.org/D11566
multimedia/libx264: yasm is only used on x86, other archs use GNU as
PR: 220694
Approved by: koobs (maintainer)
MFH: 2017Q3 (minor build optimization)
Differential Revision: https://reviews.freebsd.org/D11566
multimedia/x264: yasm is only used by libx264, so move ASM option there
PR: 220694
Approved by: koobs (maintainer)
MFH: 2017Q3 (minor build optimization)
Differential Revision: https://reviews.freebsd.org/D11566
multimedia/x264: add OPENCL option, enabled by default
Before OpenCL can be used for lookahead install at least one
implementation: devel/freeocl, devel/pocl, lang/beignet or lang/clover.
$ x264 --fullhelp | fgrep opencl
--opencl Enable use of OpenCL
--opencl-clbin <string> Specify path of compiled OpenCL kernel cache
--opencl-device <integer> Specify OpenCL device ordinal
where the options also work in other apps e.g.,
$ ffmpeg -i <input-file> -codec:v libx264 -x264opts opencl:opencl-device=1
<output-file>
$ mpv --ovc libx264 --ovcopts-add x264opts=opencl:opencl-device=1 -o
<output-file> <input-file>
Differential Revision: https://reviews.freebsd.org/D7958
Approved by: koobs (maintainer)
multimedia/x264: don't require SSE on i386 with ASM=on (default)
Remove "-march=i686 -mfpmath=sse -msse" and "-msse2" on later versions
when building C files. This doesn't affect hand-written assembly which
relies on CPUID but may pessimize compiler (around 2.3 % on Skylake).
Differential Revision: https://reviews.freebsd.org/D7958
Approved by: koobs (maintainer)
multimedia/{,lib}x264: modernize
- Convert to option helpers
- Convert to USES=localbase + respect CPPFLAGS
- Convert to USES=shebangfix (can be zsh->bash symlink)
- Simplify SLAVE_PORT conditionals into ?=, += and !target()
- Drop unnecessary `cd` before PGO sample
- Drop no longer necessary .include <bsd.port.options.mk>
Approved by: koobs (maintainer, via private mail)
Differential Revision: https://reviews.freebsd.org/D5862
multimedia/libx264: Move libx264 stdin.h patch to x264 port
Move the libx264 patch for stdint.h handling on FreeBSD to the multimedia/x264
port, as FILESDIR is inherited from there, thus causing the patch not to be
applied.
Reported by: kwm
Reviewed by: kwm
Tested by: kwm
Differential Revision: https://reviews.freebsd.org/D3168
multimedia/{lib}x264: Fix distinfo's
Delete distinfo from libx264 since it is s now subordinate to the x264 port.
Also correctly update distinfo for x264, including the example.y4m.bz2 video
file for profile guided optimization (OPTION: PGO).
PR: 201260
Reported by: Ajtim <lumiwa gmail com> (via email)
multimedia/{lib}x264: Update to 0.144.2533 and major refactor
- Update to 0.144.2533 (from upstream stable branch) [1]
- Switch x264 and libx264 ports to master/slave ports respectively
- Bump PORTREVISION for dependent ports as the shared library version
has changed.
multimedia/x264:
- Clean up and update "updating instructions" in Makefile header
- Tweak COMMENT
- Only LIB_DEPENDS on libx264 and add PLIST_FILES if this isn't the
libx264 port.
- Allow COMMENT, USES, OPTIONS_*, CONFIGURE_ARGS to be overriden in
libx264 port.
(Only the first 15 lines of the commit message are shown above )
Our stdint.h is a symlink to sys/stdint.h so we need to teach x264 the
header guard of the sys/stdint.h file. Otherwise compiling software with the
x264.h header will generate a warning about the mismatch header guard.
Approved by: maintainer (koobs@)
Differential Revision: https://reviews.freebsd.org/D2863
multimedia/{lib}x264: Update minimum yasm version
Update the minimum version of yasm required in BUILD_DEPENDS.
PR: 196991
Submitted by: takefu airport.fm
Pull in upstream commits to our libx264 to deal with the clang 3.5
-integrated-as defaults for ARMv6 compilation.
Handling for koobs@ while he's on vacation.
PR: 196591
Submitted by: mikael.urankar@gmail.com
Approved by: mentor (implicit)
multimedia/libx264: Fix PGO/GCC options
- Revert options helpers for PGO and GCC .. *shakes fist*. We end up
setting USE_GCC=yes yes otherwise, and that's not valid.
- libx264 and x264 share the same distfiles, use the same DIST_SUBDIR
multimedia/x264: General overhaul
- Split x264 into two ports: the CLI application (x264), and the library
(libx264). This will allow x264 to use lavf and friends from ffmpeg for
decoding and demuxing while preventing a circular dependency between the
two: x264 can depend on ffmpeg, but ffmpeg will depend on libx264 rather
than x264.
- Add the LAVF option to the CLI port, making the dependency on ffmpeg
optional.
- Update to 0.142.2455.
- Amend fixes to local patches so that they can apply to the new upstream
files.
- Provide the git revision and other version information to the build
environment, allowing the CLI binary to display this information (like the
Windows builds).
- Remove unsupported build options (X11_OUTPUT).
- Ensure that the library and CLI ports each have the appropriate options.
- Add notes for future contributors who wish to update the ports.
- Bump PORTREVISION for all dependent ports.
PR: 187805
Differential Revision: https://reviews.freebsd.org/D1159
Submitted by: Andrew Berg <aberg010@my.hennepintech.edu>
Approved by: koobs (maintainer, mentor)