From patchwork Fri May 20 23:11:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aman Karmani X-Patchwork-Id: 35859 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a21:9992:b0:82:461d:f3b with SMTP id ve18csp828300pzb; Fri, 20 May 2022 16:12:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyYPXABNxEE7dF5fRoP1ZqZhKaC9RW4lLXsS9kkcyohs+ycGD2pa9ltwKNQy8p2+eb0Ml7J X-Received: by 2002:a05:6402:331d:b0:42a:d144:612c with SMTP id e29-20020a056402331d00b0042ad144612cmr13240422eda.325.1653088328420; Fri, 20 May 2022 16:12:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653088328; cv=none; d=google.com; s=arc-20160816; b=u4hS77ZwUh4mYXiJyah3TMG7RtVajDGA+eFZCT5sJ61znVxerbZjxk8pEIVQIKtzXA LsbvKSUFDXo3GNmxFJv/PsNLOXvNhdXZHiLTSekpNtSVAegZeBq4UWYOQoUv4A7h8tQ0 +8nq6fNc70FRyeKnOk6e6b/3ITkRcLYpKS8BTdpDCoOs+WSMczE8fh5lurj32wbv76S8 vrDGupCSddPuUR3kQfvI2CgZyrGEt38t7zop+smtPsPzFHeg/9iWqRcjUMfYeJLdaz3P M/RNE4KQsAjRhSB3ZjXEts/CkR7dICf2rJB1TzsGdLjWbLg8Wn6zrw5sh/cKOCl4L92c EOeA== 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:message-id:from :dkim-signature:delivered-to; bh=p2EQdUMLiG0HMmqOESzn/eJff4Mp+evkHbBO9zESb3c=; b=Yf4ppJ/abqu1OatlPcjnIufGBJlT45btVgiJOfInkXWDRbNaMIrpaF73kwq6rSKe6W Mpj5xf4UlapUo0vDUryjuOBokc3fvNt4lEqnCoPoAMYPH+SelUiWlSZjmiUxFQDHIHri HoAuflEKyjgjNol7JuhObc1Kjf6LgkxICZGdlSiiLsJXZ8SOQzkxQSJhuvPnxLw/acvv 9GE9j2GvjPUzBCIrbk+EMijMhbfOU4BiUivkrE0+m7r0yshtQrGsLAZih7JlUCwTFDiq wmMHmLbhCnj07TgG/5xQXu07wFG3Fi9mUb17WeuEb432pkn/+GT/7Vs/0926Qdn6iHQI 5pXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20210112 header.b=PXEVRl6U; 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 hp29-20020a1709073e1d00b006f000860e56si863039ejc.93.2022.05.20.16.12.03; Fri, 20 May 2022 16:12:08 -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=PXEVRl6U; 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 C72B368B48A; Sat, 21 May 2022 02:11:59 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pj1-f50.google.com (mail-pj1-f50.google.com [209.85.216.50]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id D876668B3C7 for ; Sat, 21 May 2022 02:11:53 +0300 (EEST) Received: by mail-pj1-f50.google.com with SMTP id a23-20020a17090acb9700b001df4e9f4870so8997065pju.1 for ; Fri, 20 May 2022 16:11:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:message-id:date:subject:fcc:content-transfer-encoding :mime-version:to:cc; bh=FDzrXBuZYFNeH1oEqw8J4iIQOkmRp1sC3XL1BPOaVP4=; b=PXEVRl6UTWwB467NXA8quCgyQZjjTtk64wweaDSJwKTuXcg6JCQWffsABdyT1ER8rC ie5oGX1YKebcM0m8pDzv3dbG8PZ4WLY1/BUZDPyAvF3tzQ66SOHOzkDoou0A2udSnMK2 Pcf6h6WEONv5uUc1d2NoA7oL80/MZNwTT10DWUJbyrXlGVScGxPYgh59sE4hHdGOOm7i zCAqxtGeJ4pE7sYLP+1Hi/eJztQ9y882ueqadXFa1/NylA5bxtFpCOkUBV2hlE3TpndX bpZcqZYiYtXZnvvEWLl7aLlIFUVatdxsXKzHtlSll9uC2xbLo9IHeOGD93FzyZqWl8Mk E4Ig== 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:date:subject:fcc :content-transfer-encoding:mime-version:to:cc; bh=FDzrXBuZYFNeH1oEqw8J4iIQOkmRp1sC3XL1BPOaVP4=; b=ZwVqJz8haO5llhkStVZJ9XAH1piOdqN1BncwyjLA5vvAblQGSAK3UFOlABXAKDR8tQ yZvMAQ2/NRYogBXtvPy+r0/549KTsXBiPZ0pEfIsBBOwRWOSQY5WnoDq/dUDVAbLH49+ utHDP3BZyzEpNfqVlmZRV1zpD5gCSAre4pYwhEOWnXRupBQPhXM5SFZGstt8N/5QyLgn sM5SyCCpGNY1WcZEX6mD8s+nG6Pp3/SwxX+SJomzW9RdytBScsx8wjEq/xg9o+m4vdZX gekuxkc219yTTgXUxciRuwDYwWB33yPrGMV/2HFYIPj5DeM9/DiNwGXO333zY0CL/v9l qnZA== X-Gm-Message-State: AOAM5312Mh3/jQc8vX119yTkcQpKrq8jutRvu6LlxXmlewBxgV7W3oLO dPYb1y483a7LFjNZtVXeYADbskpLTQhQ7Q== X-Received: by 2002:a17:90b:3b4c:b0:1dc:7edf:c92f with SMTP id ot12-20020a17090b3b4c00b001dc7edfc92fmr13234472pjb.91.1653088311554; Fri, 20 May 2022 16:11:51 -0700 (PDT) Received: from [127.0.0.1] (master.gitmailbox.com. [34.83.118.50]) by smtp.gmail.com with ESMTPSA id d19-20020a170902c19300b00161947ecc82sm253343pld.199.2022.05.20.16.11.50 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 20 May 2022 16:11:51 -0700 (PDT) From: Matt Oliver X-Google-Original-From: Matt Oliver Message-Id: Date: Fri, 20 May 2022 23:11:50 +0000 Fcc: Sent MIME-Version: 1.0 To: ffmpeg-devel@ffmpeg.org Subject: [FFmpeg-devel] [PATCH] 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: softworkz , Matt Oliver Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: AHckhQIz/aHk 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. Alternatively we can detect the x264 build version in configure and keep the fallback of manually setting the flag on older x264 builds that arent using pkgconfig (to keep the old behaviour) but that requires some complex configure changes. Submitted-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 seemed to be agreement that the 158 version limit should be applied to MSVC builds only. For the latter I'd need some help, because I can't test this and I'm not familiar enough with the configure script logic to make a change with sufficient confidence. Thanks, softworkz Published-As: https://github.com/ffstaging/FFmpeg/releases/tag/pr-ffstaging-30%2Fsoftworkz%2Fsubmit_x264_api_imports_matt-v1 Fetch-It-Via: git fetch https://github.com/ffstaging/FFmpeg pr-ffstaging-30/softworkz/submit_x264_api_imports_matt-v1 Pull-Request: https://github.com/ffstaging/FFmpeg/pull/30 configure | 7 ++----- libavcodec/libx264.c | 4 ---- 2 files changed, 2 insertions(+), 9 deletions(-) base-commit: 41a558fea06cc0a23b8d2d0dfb03ef6a25cf5100 diff --git a/configure b/configure index f115b21064..d977a97397 100755 --- a/configure +++ b/configure @@ -6656,11 +6656,8 @@ 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 >= 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