Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x264: update to 0.164.3108 #27814

Merged
merged 2 commits into from
Mar 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gnome/gstreamer010-gst-plugins-ugly/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ PortGroup muniversal 1.0
name gstreamer010-gst-plugins-ugly
set my_name gst-plugins-ugly
version 0.10.19
revision 14
revision 15
description \
A set of good-quality plug-ins for GStreamer that might pose distribution \
problems.
Expand Down
2 changes: 1 addition & 1 deletion gnome/gstreamer1-gst-plugins-ugly/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ name gstreamer1-gst-plugins-ugly
set my_name gst-plugins-ugly
# please only commit stable updates (even numbered releases)
version 1.24.9
revision 0
revision 1
description A set of good-quality plug-ins for GStreamer that might pose distribution problems.
long_description GStreamer Ugly Plug-ins is a set of plug-ins that have good quality \
and correct functionality, but distributing them might pose problems. \
Expand Down
2 changes: 1 addition & 1 deletion multimedia/VLC2/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ universal_variant no
##
if {(${subport} eq ${name}) || (${subport} eq "lib${name}")} {
version 2.2.8
revision 22
revision 23
license GPL-2+

master_sites https://download.videolan.org/pub/videolan/vlc/${version}/
Expand Down
2 changes: 1 addition & 1 deletion multimedia/avidemux/Portfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4

Check warning on line 1 in multimedia/avidemux/Portfile

View workflow job for this annotation

GitHub Actions / macos-15

port lint avidemux: Warning: Dependency path:bin/pkg-config:pkgconfig specified multiple times in depends_build

Check warning on line 1 in multimedia/avidemux/Portfile

View workflow job for this annotation

GitHub Actions / macos-14

port lint avidemux: Warning: Dependency path:bin/pkg-config:pkgconfig specified multiple times in depends_build

Check warning on line 1 in multimedia/avidemux/Portfile

View workflow job for this annotation

GitHub Actions / macos-13

port lint avidemux: Warning: Dependency path:bin/pkg-config:pkgconfig specified multiple times in depends_build

PortSystem 1.0
PortGroup cmake 1.1
Expand All @@ -20,7 +20,7 @@

name avidemux
version 2.8.1
revision 6
revision 7

categories multimedia
platforms macosx
Expand Down
2 changes: 1 addition & 1 deletion multimedia/ffmpeg-devel/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ set my_name ffmpeg
conflicts ffmpeg

version 7.1.1
revision 0
revision 1
epoch 2

license LGPL-2.1+
Expand Down
2 changes: 1 addition & 1 deletion multimedia/ffmpeg/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ conflicts ffmpeg-devel

# Please increase the revision of mpv whenever ffmpeg's version is updated.
version 4.4.5
revision 6
revision 7
epoch 1

license LGPL-2.1+
Expand Down
2 changes: 1 addition & 1 deletion multimedia/ffmpeg4/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ set my_name ffmpeg

# Please increase the revision of mpv whenever ffmpeg's version is updated.
version 4.4.5
revision 4
revision 5

license LGPL-2.1+
categories multimedia
Expand Down
2 changes: 1 addition & 1 deletion multimedia/ffmpeg6/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ name ffmpeg6
set my_name ffmpeg

version 6.1.2
revision 4
revision 5
epoch 0

license LGPL-2.1+
Expand Down
2 changes: 1 addition & 1 deletion multimedia/ffmpeg7/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ name ffmpeg7
set my_name ffmpeg

version 7.1
revision 6
revision 7

license LGPL-2.1+
categories multimedia
Expand Down
2 changes: 1 addition & 1 deletion multimedia/libquicktime-devel/Portfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4

Check warning on line 1 in multimedia/libquicktime-devel/Portfile

View workflow job for this annotation

GitHub Actions / macos-15

port lint libquicktime-devel: Warning: Unnecessary platforms line as darwin is the default

Check warning on line 1 in multimedia/libquicktime-devel/Portfile

View workflow job for this annotation

GitHub Actions / macos-14

port lint libquicktime-devel: Warning: Unnecessary platforms line as darwin is the default

Check warning on line 1 in multimedia/libquicktime-devel/Portfile

View workflow job for this annotation

GitHub Actions / macos-13

port lint libquicktime-devel: Warning: Unnecessary platforms line as darwin is the default

PortSystem 1.0

Expand All @@ -7,7 +7,7 @@
conflicts libquicktime
version 1.2.4-20210720
git.branch 27295919b3a1036ba8bc06cec414dcc501f72d89
revision 1
revision 2
checksums rmd160 e815c290bad27200c8a44ffeded444013136bf10 \
sha256 7335c99c5a5872c8c4193d5eb7f846a843c5cac7a24995bd03ea6a23b3446c24 \
size 819687
Expand Down
2 changes: 1 addition & 1 deletion multimedia/libquicktime/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ PortSystem 1.0
name libquicktime
conflicts libquicktime-devel
version 1.2.4
revision 11
revision 12
categories multimedia
maintainers nomaintainer
license LGPL-2.1
Expand Down
2 changes: 1 addition & 1 deletion multimedia/mythtv.27/Portfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4

Check warning on line 1 in multimedia/mythtv.27/Portfile

View workflow job for this annotation

GitHub Actions / macos-13

port test mythtv.27: Warning: mythtv.27 is configured to build for the architecture(s) 'x86_64', but did not install any Mach-O files.

Check warning on line 1 in multimedia/mythtv.27/Portfile

View workflow job for this annotation

GitHub Actions / macos-13

port lint mythtv.27: Warning: Line 70 contains tab but modeline says tabs should be expanded Warning: Line 71 contains tab but modeline says tabs should be expanded Warning: Line 72 contains tab but modeline says tabs should be expanded Warning: Line 74 contains tab but modeline says tabs should be expanded Warning: Line 75 contains tab but modeline says tabs should be expanded Warning: Line 76 contains tab but modeline says tabs should be expanded Warning: Line 77 contains tab but modeline says tabs should be expanded Warning: Line 79 contains tab but modeline says tabs should be expanded Warning: Line 80 contains tab but modeline says tabs should be expanded Warning: Line 81 contains tab but modeline says tabs should be expanded Warning: Line 82 contains tab but modeline says tabs should be expanded Warning: Line 83 contains tab but modeline says tabs should be expanded Warning: Line 84 contains tab but modeline says tabs should be expanded Warning: Line 85 contains tab but modeline says tabs should be expanded Warning: Line 86 contains tab but modeline says tabs should be expanded Warning: Line 87 contains tab but modeline says tabs should be expanded Warning: Line 88 contains tab but modeline says tabs should be expanded Warning: Line 89 contains tab but modeline says tabs should be expanded Warning: Line 90 contains tab but modeline says tabs should be expanded Warning: Line 92 contains tab but modeline says tabs should be expanded Warning: Line 93 contains tab but modeline says tabs should be expanded Warning: Line 94 contains tab but modeline says tabs should be expanded Warning: Line 95 contains tab but modeline says tabs should be expanded Warning: Line 96 contains tab but modeline says tabs should be expanded Warning: Line 97 contains tab but modeline says tabs should be expanded Warning: Line 98 contains tab but modeline says tabs should be expanded Warning: Line 99 contains tab but modeline says tabs should be expanded Warning: Line 100 contains tab but modeline says tabs should be expanded Warning: Line 101 contains tab but modeline says tabs should be expanded Warning: Line 102 contains tab but modeline says tabs should be expanded Warning: Line 103 contains tab but modeline says tabs should be expanded Warning: Line 104 contains tab but modeline says tabs should be expanded Warning: Line 105 contains tab but modeline says tabs should be expanded Warning: Line 106 contains tab but modeline says tabs should be expanded Warning: Line 107 contains tab but modeline says tabs should be expanded Warning: Line 108 contains tab but modeline says tabs should be expanded Warning: Line 109 contains tab but modeline says tabs should be expanded Warning: Line 110 contains tab but modeline says tabs should be expanded Warning: Line 111 contains tab but modeline says tabs should be expanded Warning: Line 112 contains tab but modeline says tabs should be expanded Warning: Line 113 contains tab but modeline says tabs should be expanded Warning: Line 114 contains tab but modeline says tabs should be expanded Warning: Line 115 contains tab but modeline says tabs should be expanded Warning: Line 116 contains tab but modeline says tabs should be expanded Warning: Line 118 contains tab but modeline says tabs should be expanded Warning: Line 120 contains tab but modeline says tabs should be expanded Warning: Line 122 contains tab but modeline says tabs should be expanded Warning: Line 124 contains tab but modeline says tabs should be expanded Warning: Line 125 contains tab but modeline says tabs should be expanded Warning: Line 126 contains tab but modeline says tabs should be expanded Warning: Line 127 contains tab but modeline says tabs should be expanded Warning: Line 128 contains tab but modeline says tabs should be expanded Warning: Line 129 contains tab but modeline says tabs should be expanded Warning: Line 131 contains tab but modeline says tabs should be expanded Warning: Line 132 contains tab but modeline says tabs should be expanded Warning: Line 134 contains tab but modeline says tabs should be expanded Warning: Line

PortSystem 1.0
PortGroup github 1.0
Expand All @@ -10,7 +10,7 @@
set majorversion .27
set minorversion .7
set lastcommit 20180201
set corerev 4
set corerev 5
set pluginsrev 5
github.setup MythTV mythtv ${shorthash}
# Change github.tarball_from to 'releases' or 'archive' next update
Expand Down
2 changes: 1 addition & 1 deletion multimedia/mythtv.28/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ set shorthash 8238e839
set majorversion .28
set minorversion .2
set lastcommit 20180201
set corerev 11
set corerev 12
set pluginsrev 6
set metarev 0
github.setup MythTV mythtv ${shorthash}
Expand Down
2 changes: 1 addition & 1 deletion multimedia/transcode/Portfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4

Check warning on line 1 in multimedia/transcode/Portfile

View workflow job for this annotation

GitHub Actions / macos-15

port lint transcode: Warning: Line 85 contains tab but modeline says tabs should be expanded

Check warning on line 1 in multimedia/transcode/Portfile

View workflow job for this annotation

GitHub Actions / macos-14

port lint transcode: Warning: Line 85 contains tab but modeline says tabs should be expanded

Check warning on line 1 in multimedia/transcode/Portfile

View workflow job for this annotation

GitHub Actions / macos-13

port lint transcode: Warning: Line 85 contains tab but modeline says tabs should be expanded

PortSystem 1.0
PortGroup muniversal 1.0

name transcode
version 1.1.7
revision 29
revision 30
epoch 1
license GPL-2+
categories multimedia
Expand Down
56 changes: 36 additions & 20 deletions multimedia/x264/Portfile
Original file line number Diff line number Diff line change
@@ -1,42 +1,51 @@
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4

PortSystem 1.0
PortGroup gitlab 1.0
PortGroup muniversal 1.0
PortGroup xcodeversion 1.0
PortGroup xcode_workaround 1.0

name x264
version 20191217
gitlab.instance https://code.videolan.org
# Get latest stable commit id from
# https://code.videolan.org/videolan/x264/-/tree/stable
# Get minor version (X264_BUILD) from
# https://code.videolan.org/videolan/x264/-/blob/stable/x264.h
# Run port livecheck to get patch version
# Change in minor version requires rev-bumping dependents
gitlab.setup videolan x264 31e19f92f00c7003fa115047ce50978bc98c3a0d
version 0.164.3108
revision 0
epoch 1
categories multimedia
license GPL-2+
platforms darwin
maintainers {devans @dbevans} openmaintainer
maintainers {devans @dbevans} {makr @mohd-akram} openmaintainer
description x264 - a free h264/avc encoder
long_description x264 is a free library for encoding H264/AVC video streams. \
The code is written by Laurent Aimar, Eric Petit(OS X), Min \
Chen (vfw/nasm), Justin Clay(vfw), Måns Rullgård and Loren \
Merritt from scratch. It is released under the terms of the \
GPL license.
homepage https://www.videolan.org/x264.html
master_sites https://download.videolan.org/pub/videolan/x264/snapshots/

dist_subdir x264
distname ${name}-snapshot-${version}-2245-stable

use_bzip2 yes

checksums rmd160 6a204dfd1d56faf2d9c0ff2b90642507112f291d \
sha256 b2495c8f2930167d470994b1ce02b0f4bfb24b3317ba36ba7f112e9809264160 \
size 770169
checksums rmd160 e006e270e1c87c70ddee225ebaf2f586ad8620f3 \
sha256 01a4acb74eea1118c3aa96c3e18ee3384bc1f2bc670f31fb0f63be853e4d9d08 \
size 778279

minimum_xcodeversions {9 3.1}

depends_build port:nasm

# as of 20190313 the PPC assembly uses VSX, which is Power7+ only. We could disable asm, but
# instead we can use the previous ppc assembly, which does compile and provides the same functions
patchfiles-append patch-x264-older-ppc-code.diff \
patch-x264-apple-silicon.diff
patchfiles altivec-x264.patch

set rev [lindex [split ${version} .] 2]
set sha [string range ${gitlab.version} 0 6]

post-patch {
reinplace "s|ver=\"x\"|ver=\"$rev $sha\"|" \
${worksrcpath}/version.sh
reinplace "s|version=\"\"|version=\" r$rev $sha\"|" \
${worksrcpath}/version.sh
}

configure.args --enable-pic \
--enable-shared \
Expand All @@ -48,6 +57,10 @@ configure.args --enable-pic \
--disable-gpac \
--disable-lsmash

platform darwin powerpc {
configure.args-append --disable-vsx
}

# as of build 148 asm optimizations are believed to work with x86_64 Snow Leopard and up
# please file a ticket if you have evidence to the contrary
# i386 clang build issues remain which break i386 build when asm optimizations are enabled
Expand Down Expand Up @@ -86,10 +99,13 @@ platform darwin 8 {

# sets its own optflags
configure.optflags
configure.cflags-append -I. -fno-common -read_only_relocs suppress

destroot.args DIR_INSTALL=${destroot}${prefix}

build.target default

livecheck.type none
# Can't livecheck stable branch but use it to validate version matches commit
livecheck.url https://artifacts.videolan.org/x264/release-macos-arm64/
livecheck.type regex
livecheck.version $rev
livecheck.regex "r(\[0-9]+)-$sha"
83 changes: 83 additions & 0 deletions multimedia/x264/files/altivec-x264.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
--- common/ppc/ppccommon.h 2021-01-10 14:00:05.489543000 -0500
+++ common/ppc/ppccommon.h 2021-01-10 14:03:38.828554000 -0500
@@ -90,6 +90,37 @@
vec_s8_t v;
} vec_s8_u;

+// vec_xxpermdi is quite useful but some version of clang do not expose it
+#if !HAVE_VSX || (defined(__clang__) && __clang_major__ < 6)
+static const vec_u8_t xxpermdi0_perm = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05,
+ 0x06, 0x07, 0x10, 0x11, 0x12, 0x13,
+ 0x14, 0x15, 0x16, 0x17 };
+static const vec_u8_t xxpermdi1_perm = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05,
+ 0x06, 0x07, 0x18, 0x19, 0x1A, 0x1B,
+ 0x1C, 0x1D, 0x1E, 0x1F };
+static const vec_u8_t xxpermdi2_perm = { 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D,
+ 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13,
+ 0x14, 0x15, 0x16, 0x17 };
+static const vec_u8_t xxpermdi3_perm = { 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D,
+ 0x0E, 0x0F, 0x18, 0x19, 0x1A, 0x1B,
+ 0x1C, 0x1D, 0x1E, 0x1F };
+#define xxpermdi(a, b, c) vec_perm(a, b, xxpermdi##c##_perm)
+#elif (defined(__GNUC__) && (__GNUC__ > 6 || (__GNUC__ == 6 && __GNUC_MINOR__ >= 3))) || \
+ (defined(__clang__) && __clang_major__ >= 7) && __POWER7_VECTOR__
+#define xxpermdi(a, b, c) vec_xxpermdi(a, b, c)
+#endif
+
+// vec_xxpermdi has its endianness bias exposed in early gcc and clang
+#ifdef WORDS_BIGENDIAN
+#ifndef xxpermdi
+#define xxpermdi(a, b, c) vec_xxpermdi(a, b, c)
+#endif
+#else
+#ifndef xxpermdi
+#define xxpermdi(a, b, c) vec_xxpermdi(b, a, ((c >> 1) | (c & 1) << 1) ^ 3)
+#endif
+#endif
+
/***********************************************************************
* Null vector
**********************************************************************/
@@ -150,7 +181,7 @@
**********************************************************************/
#ifndef __POWER9_VECTOR__
#define VEC_STORE8( v, p ) \
- vec_vsx_st( vec_xxpermdi( v, vec_vsx_ld( 0, p ), 1 ), 0, p )
+ vec_vsx_st( xxpermdi( v, vec_vsx_ld( 0, p ), 1 ), 0, p )
#else
#define VEC_STORE8( v, p ) vec_xst_len( v, p, 8 )
#endif
@@ -304,33 +335,3 @@
#define vec_absd( a, b ) vec_sub( vec_max( a, b ), vec_min( a, b ) )
#endif

-// vec_xxpermdi is quite useful but some version of clang do not expose it
-#if !HAVE_VSX || (defined(__clang__) && __clang_major__ < 6)
-static const vec_u8_t xxpermdi0_perm = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05,
- 0x06, 0x07, 0x10, 0x11, 0x12, 0x13,
- 0x14, 0x15, 0x16, 0x17 };
-static const vec_u8_t xxpermdi1_perm = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05,
- 0x06, 0x07, 0x18, 0x19, 0x1A, 0x1B,
- 0x1C, 0x1D, 0x1E, 0x1F };
-static const vec_u8_t xxpermdi2_perm = { 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D,
- 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13,
- 0x14, 0x15, 0x16, 0x17 };
-static const vec_u8_t xxpermdi3_perm = { 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D,
- 0x0E, 0x0F, 0x18, 0x19, 0x1A, 0x1B,
- 0x1C, 0x1D, 0x1E, 0x1F };
-#define xxpermdi(a, b, c) vec_perm(a, b, xxpermdi##c##_perm)
-#elif (defined(__GNUC__) && (__GNUC__ > 6 || (__GNUC__ == 6 && __GNUC_MINOR__ >= 3))) || \
- (defined(__clang__) && __clang_major__ >= 7)
-#define xxpermdi(a, b, c) vec_xxpermdi(a, b, c)
-#endif
-
-// vec_xxpermdi has its endianness bias exposed in early gcc and clang
-#ifdef WORDS_BIGENDIAN
-#ifndef xxpermdi
-#define xxpermdi(a, b, c) vec_xxpermdi(a, b, c)
-#endif
-#else
-#ifndef xxpermdi
-#define xxpermdi(a, b, c) vec_xxpermdi(b, a, ((c >> 1) | (c & 1) << 1) ^ 3)
-#endif
-#endif
Loading
Loading