From: Matt Oliver <ffmpegagent@gmail.com>
To: ffmpeg-devel@ffmpeg.org
Cc: Michael Niedermayer <michael@niedermayer.cc>,
Matt Oliver <protogonoi@gmail.com>,
softworkz <softworkz@hotmail.com>, Marton Balint <cus@passwd.hu>,
Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Subject: [FFmpeg-devel] [PATCH v7] libx264: Set min build version to 158
Date: Thu, 09 Jun 2022 23:27:08 +0000
Message-ID: <pull.30.v7.ffstaging.FFmpeg.1654817228364.ffmpegagent@gmail.com> (raw)
In-Reply-To: <pull.30.v6.ffstaging.FFmpeg.1653568143191.ffmpegagent@gmail.com>
From: Matt Oliver <protogonoi@gmail.com>
Was "[PATCH] libx264: Do not explicitly set X264_API_IMPORTS"
Setting X264_API_IMPORTS only affects msvc builds and it breaks
linking to static builds (although is required for shared builds).
This flag is set by x264 in its pkgconfig as required since build
158 (a615f027ed172e2dd5380e736d487aa858a0c4ff) from July 2019.
So this patch updates configure to require a newer x264 build that
correctly sets the imports flag.
The min version requirement of 158 is applied for msvc builds only.
This is also removing the check for 'libx264 without pkg-config'
which was left for compatibility reasons about 7 years ago when
the pkg-config check was introduced by commit
e06263ef1e0e172b2c76070b3dc739411af08e82.
Co-authored-by: softworkz <softworkz@hotmail.com>
Signed-off-by: softworkz <softworkz@hotmail.com>
Signed-off-by: Matt Oliver <protogonoi@gmail.com>
---
libx264: Set min build version to 158
I'm submitting this patch on behalf of Matt with his permission.
There was agreement that the >= 158 version requirement should be
applied to MSVC builds only.
v2: restrict the version requirement to msvc builds
v3: fix unintended author change
v4: add missing braces
v5: fixed condition (again ;-)
v6: hope I got it now..
v7: add comment about dropping non-pkg-conf check, re-add libx262 check
Published-As: https://github.com/ffstaging/FFmpeg/releases/tag/pr-ffstaging-30%2Fsoftworkz%2Fsubmit_x264_api_imports_matt-v7
Fetch-It-Via: git fetch https://github.com/ffstaging/FFmpeg pr-ffstaging-30/softworkz/submit_x264_api_imports_matt-v7
Pull-Request: https://github.com/ffstaging/FFmpeg/pull/30
Range-diff vs v6:
1: 47843fb51e ! 1: 3baec48834 libx264: Set min build version to 158
@@ Commit message
So this patch updates configure to require a newer x264 build that
correctly sets the imports flag.
- The requirement for 158 is applied for msvc builds only,
- no change is made for all other cases.
+ The min version requirement of 158 is applied for msvc builds only.
+
+ This is also removing the check for 'libx264 without pkg-config'
+ which was left for compatibility reasons about 7 years ago when
+ the pkg-config check was introduced by commit
+ e06263ef1e0e172b2c76070b3dc739411af08e82.
Co-authored-by: softworkz <softworkz@hotmail.com>
Signed-off-by: softworkz <softworkz@hotmail.com>
@@ configure: enabled libvpx && {
- { require libx264 "stdint.h x264.h" x264_encoder_encode "-lx264 $pthreads_extralibs $libm_extralibs" &&
- warn "using libx264 without pkg-config"; } } &&
- require_cpp_condition libx264 x264.h "X264_BUILD >= 118" &&
-- check_cpp_condition libx262 x264.h "X264_MPEG2"
+enabled libx264 && check_pkg_config libx264 x264 "stdint.h x264.h" x264_encoder_encode &&
+ require_cpp_condition libx264 x264.h "X264_BUILD >= 118" && {
+ [ "$toolchain" != "msvc" ] ||
-+ require_cpp_condition libx264 x264.h "X264_BUILD >= 158"; }
++ require_cpp_condition libx264 x264.h "X264_BUILD >= 158"; } &&
+ check_cpp_condition libx262 x264.h "X264_MPEG2"
enabled libx265 && require_pkg_config libx265 x265 x265.h x265_api_get &&
require_cpp_condition libx265 x265.h "X265_BUILD >= 70"
- enabled libxavs && require libxavs "stdint.h xavs.h" xavs_encoder_encode "-lxavs $pthreads_extralibs $libm_extralibs"
## libavcodec/libx264.c ##
@@
configure | 8 ++++----
libavcodec/libx264.c | 4 ----
2 files changed, 4 insertions(+), 8 deletions(-)
diff --git a/configure b/configure
index 5a167613a4..3dca1c4bd3 100755
--- a/configure
+++ b/configure
@@ -6658,10 +6658,10 @@ enabled libvpx && {
enabled libwebp && {
enabled libwebp_encoder && require_pkg_config libwebp "libwebp >= 0.2.0" webp/encode.h WebPGetEncoderVersion
enabled libwebp_anim_encoder && check_pkg_config libwebp_anim_encoder "libwebpmux >= 0.4.0" webp/mux.h WebPAnimEncoderOptionsInit; }
-enabled libx264 && { check_pkg_config libx264 x264 "stdint.h x264.h" x264_encoder_encode ||
- { require libx264 "stdint.h x264.h" x264_encoder_encode "-lx264 $pthreads_extralibs $libm_extralibs" &&
- warn "using libx264 without pkg-config"; } } &&
- require_cpp_condition libx264 x264.h "X264_BUILD >= 118" &&
+enabled libx264 && check_pkg_config libx264 x264 "stdint.h x264.h" x264_encoder_encode &&
+ require_cpp_condition libx264 x264.h "X264_BUILD >= 118" && {
+ [ "$toolchain" != "msvc" ] ||
+ require_cpp_condition libx264 x264.h "X264_BUILD >= 158"; } &&
check_cpp_condition libx262 x264.h "X264_MPEG2"
enabled libx265 && require_pkg_config libx265 x265 x265.h x265_api_get &&
require_cpp_condition libx265 x265.h "X265_BUILD >= 70"
diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c
index 4ce3791ae8..14177b3016 100644
--- a/libavcodec/libx264.c
+++ b/libavcodec/libx264.c
@@ -37,10 +37,6 @@
#include "atsc_a53.h"
#include "sei.h"
-#if defined(_MSC_VER)
-#define X264_API_IMPORTS 1
-#endif
-
#include <x264.h>
#include <float.h>
#include <math.h>
base-commit: 5d5a01419928d0c00bae54f730eede150cd5b268
--
ffmpeg-codebot
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
next prev parent reply other threads:[~2022-06-09 23:27 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-20 23:11 [FFmpeg-devel] [PATCH] " Matt Oliver
2022-05-25 9:31 ` [FFmpeg-devel] [PATCH v2] " softworkz
2022-05-25 9:34 ` [FFmpeg-devel] [PATCH v3] " Matt Oliver
2022-05-25 9:38 ` Andreas Rheinhardt
2022-05-25 9:53 ` Soft Works
2022-05-25 11:05 ` [FFmpeg-devel] [PATCH v4] " Matt Oliver
2022-05-25 15:15 ` Michael Niedermayer
2022-05-25 22:53 ` Andreas Rheinhardt
2022-05-26 7:26 ` Soft Works
2022-05-26 7:28 ` [FFmpeg-devel] [PATCH v5] " Matt Oliver
2022-05-26 10:50 ` Michael Niedermayer
2022-05-26 11:20 ` Soft Works
2022-05-26 12:29 ` [FFmpeg-devel] [PATCH v6] " Matt Oliver
2022-06-08 20:22 ` Marton Balint
2022-06-08 22:50 ` Soft Works
2022-06-09 18:44 ` Marton Balint
2022-06-09 19:19 ` Soft Works
2022-06-09 23:27 ` Matt Oliver [this message]
2022-06-11 12:20 ` [FFmpeg-devel] [PATCH v7] " Marton Balint
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=pull.30.v7.ffstaging.FFmpeg.1654817228364.ffmpegagent@gmail.com \
--to=ffmpegagent@gmail.com \
--cc=andreas.rheinhardt@outlook.com \
--cc=cus@passwd.hu \
--cc=ffmpeg-devel@ffmpeg.org \
--cc=michael@niedermayer.cc \
--cc=protogonoi@gmail.com \
--cc=softworkz@hotmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git