From patchwork Thu May 26 07:28:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aman Karmani X-Patchwork-Id: 35938 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:6914:b0:82:6b11:2509 with SMTP id q20csp241211pzj; Thu, 26 May 2022 00:28:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzWAiQ7BEkYR58iXNwqr72su1G8Ob1Atm0M9C60Nfhp5bjO/bUUwCC5GJwXbzHuvNHDRjNq X-Received: by 2002:a17:907:16a4:b0:6ff:15a6:5d0f with SMTP id hc36-20020a17090716a400b006ff15a65d0fmr5342867ejc.4.1653550103809; Thu, 26 May 2022 00:28:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653550103; cv=none; d=google.com; s=arc-20160816; b=tXO0YWZcAdXDVJS38kbQVFIHihvMy0JldhSVz1EdIgoxyntFjT7bbSSV6fAm17ZRLX cLpZZlB6sCm1Z4nkC2PhA8E+kL+xP5nc63xva4N4UoA4QnffZCaFU+fQsNYDSvzTDwUT JXTbMBmsjGhwontXd4Tz2YQf5VDNpOFxPIiMuwKjRHTDC636dR7KtGb+0yCPnDSa6A1Y zGRTPMnx9+DAZLAFsVS3Ssn6omdDX5GTBPBpabmkzXtOT6k/Os3jiqZ9900XY2kajY1h knb853thZDnnh6ZVOAU7/tl0HtdiNTROokKAX8pTy/jU8tOVHfpvI7nfQ7mL7Pi2i0pO 0HVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:to:mime-version:fcc:date:references :in-reply-to:message-id:from:dkim-signature:delivered-to; bh=8e4Rn+sacJgYjTeiu+u4nPXE+J3PqiQgjTuDmWv7orc=; b=usn1BbFhCaLm4MapdX4XlynfcqmiMaf5JCkjZxWqJU320KuKoeqEDSmfTDgFlLgTNf 9+bvBFJgh5ANzbLIcyF86VKoJlu7I5rTNuVbgRrSCzhgNCJlZAtqI9/Pb5SBnPKaSCHI lBMx71q7l3jR/O7LkiyBkOiFfZOYRCWK2IFcHIuJkqhhdVHDUsocf04Vqlz3lcVjCRav BbuhBKRvD6H+RwQ01Fbr6oGQwPDbLQkityVayZliMMY0R2xVpFJkhvGShTwcUTY+NPw0 sU0Zkh+/xxDZIiL59x1E/FeXDD3xkdsdzKw65aiSVXBEeF7pZELFy91jFwLuwRgiWeMj P8VQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20210112 header.b=NewB9PeL; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id tc9-20020a1709078d0900b006f38a65b1c2si750663ejc.848.2022.05.26.00.28.23; Thu, 26 May 2022 00:28:23 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20210112 header.b=NewB9PeL; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 12A7568B59D; Thu, 26 May 2022 10:28:21 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pj1-f51.google.com (mail-pj1-f51.google.com [209.85.216.51]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id A9C5468B1A5 for ; Thu, 26 May 2022 10:28:13 +0300 (EEST) Received: by mail-pj1-f51.google.com with SMTP id cv10so1050813pjb.4 for ; Thu, 26 May 2022 00:28:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:message-id:in-reply-to:references:date:subject:fcc :content-transfer-encoding:mime-version:to:cc; bh=jeDKkHDWrQQA1nMvBiMD6Q+z9aPJHJnv1aMXDFRe9kA=; b=NewB9PeLKiWP5KgGzcQKIaQhBNhQBI81XmakbLHuiBUPMV6LZd8YU2PfxmbzxeWtDd FLijN9Lf/lJfLYbz6wR2FGehNp7z6unvR+eTJrFTiU/ywY4BmKfpcxMgiEtO5pQ0yslL 9Xv/9MWKMg8LOsf29OnslTrLEnkuD0gqn3/eUsIMlr8S6G12d9S8uZrRVxDTLwEvy5Vz IJJRu6fkcjHD+pHGMKfBVHlMP9wqkCMrr83my8QsdN11n7vLCpSeKD831r8o1CD/KR/i 2s+lUJgBqyS4woayCQegZT2guSlo8DBsn8APgMEIa2CG6y6aE3guBOlWKa6Fr5NeuCoo uz5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:message-id:in-reply-to:references:date :subject:fcc:content-transfer-encoding:mime-version:to:cc; bh=jeDKkHDWrQQA1nMvBiMD6Q+z9aPJHJnv1aMXDFRe9kA=; b=hdtUgcLpjThTU4IEU8WKMmq6xKSs+0C59OeR/iptzd6DiYHwBsICufgKnELG5lTYiC g+q+bMBCrag6LWr4+uWLxpOGRfzYHWQXYT8PaFwUZ7ewl5cbQ/VnKbJj1Cx6gmdD6Ud0 AZOScu3EaK/AtV2FkNMUe4mDEnUEO/wju71QSSfX3eDjGZ930Wz4HCrH6PFDHFeKmL2M BwK3swJjLLOpo1S3+1k5zDcfhxuHgo0v1THgKeRse9ri7qSZ1nFjNdBwEwO3XFwfXQ87 HVRnwgvPB5OPK2s7zx6lSdMQDEY6piHSyjd938vnSHu53M9TBYyNzJ5XXkxxB3Gf3KH+ AcXg== X-Gm-Message-State: AOAM531TDdVvVD7tdPytS/wL285kysGYOaPtNHOv1j8UT/2ZDOegsonO euQ2nAKqTVUfSB+nGn9cIMYyOSQylTFUMQ== X-Received: by 2002:a17:90b:48c7:b0:1e2:3aad:e144 with SMTP id li7-20020a17090b48c700b001e23aade144mr511974pjb.188.1653550091852; Thu, 26 May 2022 00:28:11 -0700 (PDT) Received: from [127.0.0.1] (master.gitmailbox.com. [34.83.118.50]) by smtp.gmail.com with ESMTPSA id p9-20020a170902f08900b0015e8d4eb25fsm682002pla.169.2022.05.26.00.28.11 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 May 2022 00:28:11 -0700 (PDT) From: Matt Oliver X-Google-Original-From: Matt Oliver Message-Id: In-Reply-To: References: Date: Thu, 26 May 2022 07:28:10 +0000 Fcc: Sent MIME-Version: 1.0 To: ffmpeg-devel@ffmpeg.org Subject: [FFmpeg-devel] [PATCH v5] libx264: Set min build version to 158 X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Michael Niedermayer , softworkz , Matt Oliver , Andreas Rheinhardt Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: e8OGi33cDk2G From: Matt Oliver 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 requirement for 158 is applied for msvc builds only, no change is made for all other cases. Co-authored-by: softworkz Signed-off-by: softworkz Signed-off-by: Matt Oliver --- 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 ;-) Published-As: https://github.com/ffstaging/FFmpeg/releases/tag/pr-ffstaging-30%2Fsoftworkz%2Fsubmit_x264_api_imports_matt-v5 Fetch-It-Via: git fetch https://github.com/ffstaging/FFmpeg pr-ffstaging-30/softworkz/submit_x264_api_imports_matt-v5 Pull-Request: https://github.com/ffstaging/FFmpeg/pull/30 Range-diff vs v4: 1: 0d1bee35b0 ! 1: 8c4fe7ffc2 libx264: Set min build version to 158 @@ configure: enabled libvpx && { - 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 >= 158" || -+ { "$toolchain" != msvc && require_cpp_condition libx264 x264.h "X264_BUILD >= 118"; }; } ++ require_cpp_condition libx264 x264.h "X264_BUILD >= 118" && { ++ "$toolchain" != msvc || require_cpp_condition libx264 x264.h "X264_BUILD >= 158"; } 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" configure | 8 +++----- libavcodec/libx264.c | 4 ---- 2 files changed, 3 insertions(+), 9 deletions(-) base-commit: b033913d1c5998a29dfd13e9906dd707ff6eff12 diff --git a/configure b/configure index f115b21064..e46d362b04 100755 --- a/configure +++ b/configure @@ -6656,11 +6656,9 @@ 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" && - 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"; } 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" 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 #include #include