From patchwork Wed Dec 29 06:16:25 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matt Oliver X-Patchwork-Id: 32939 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:cd86:0:0:0:0:0 with SMTP id d128csp11864111iog; Tue, 28 Dec 2021 22:16:48 -0800 (PST) X-Google-Smtp-Source: ABdhPJw3eoYftRzp953zW0suP++82IPUqGpq5NvStPtYtDD0vp20oRSDNxMvwBZQ2AZXWiTli36f X-Received: by 2002:a17:906:974c:: with SMTP id o12mr19406118ejy.229.1640758608209; Tue, 28 Dec 2021 22:16:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1640758608; cv=none; d=google.com; s=arc-20160816; b=tBM05/LA/GnooeX9y5Ipd0wH1BXMfao13WY9jP2jhgKQAmbM/VK61T53Q3Rkyu60e3 MzLykj+DOXYHfrjVhd0dZN5d34h1BnFGSPATOssl9ee5n5c/IIZ2/G3eTixXkBq29uCE 2aXe6HLYUY0oDZu+uod9pULmjB80A32QhQUEjmNBXbXpJqw/UEA3Onea0QOWGJDJIn1N dOPYBDkBzXL0gApKsn12Td03pGbANd45wIRJgABpPC3laCrj6H3txvxc+mVtI8fntRHm i+oQ7RBZ42nShIl4Out62G0uJU7wR5al11C/i3lZ00fGYPYNAQlyVcda09d90ZIZL6rO zPgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence:subject:to :message-id:date:from:mime-version:dkim-signature:delivered-to; bh=TMPKLEZp3Fj7Quo+j0voy/bCJyVeKeXd2V7jh6GSSX4=; b=Nsb0cnWV4xSWnTxDSujxlONm7EgD+Y7J2Un8XBppt+bQacdKJ4D6Qg8olbzhTE2xuy 646NYzI0AT7hejLLtGM+sTvyaaMN7uPasmWn76TiZvcFiYWNU6BbTCZZYIAyCXjzrIR6 j7W35wy9+YYLnXl6oS+8isk9WUof9VScc+903ipA4IUj7xwDQq/JDhv0aiCd39SjaHy/ TnDuM24nc7lkGY0JolR1y7ns16dhx2rrh2NZtr9MfIFe/pBoBAj8O7mgpPSeGQY6+hqY vVJZuyfEy8eukJJohMTb3kyKbw7nakkrxgvUFZ68ZZApLAcqpqKRKEbmDU86/bAWQWPM H33A== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20210112 header.b=GQswcg8+; 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 sa36si10370151ejc.291.2021.12.28.22.16.47; Tue, 28 Dec 2021 22:16:48 -0800 (PST) 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=GQswcg8+; 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 1AF0068AE10; Wed, 29 Dec 2021 08:16:45 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-ed1-f41.google.com (mail-ed1-f41.google.com [209.85.208.41]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 13AAE68A717 for ; Wed, 29 Dec 2021 08:16:38 +0200 (EET) Received: by mail-ed1-f41.google.com with SMTP id j6so82253456edw.12 for ; Tue, 28 Dec 2021 22:16:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:from:date:message-id:subject:to; bh=Zh8mR3cE5MCrrRfzbhHJafAhO9O3rUMwJtBkgRekd0k=; b=GQswcg8+WkY2cBWQpBKrvF1+PFzzpWJZfdtrMPQYfs4TVws4Zumf6WzYZhuWi5+kgZ 4o/jJYcG5kItKZ2Eoiz9oA8gxGcYU3+C35WQQJ9ZdVmBQUjnWyWDTSGA9q6I/wr8xWdl RWTgNx4vEwZx6KVQ08Zpj/vpgUK5BSc0rxQj1htegPLGM7KXvHw6THlRFso8dFvnhcxT VsrBOLsxXY2Wm/TRVL2eWxnO8YNAMwJ1Sgm7u2QC/Ceyf6CbHwZTFgyLf0kgmhLIIRj1 vM+VRRN0XmT+LY+Rqege8AlLKOKq4l9c7Chdy7staibdsi58a34OBJrwkV2oYQtiAaYw m7SQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=Zh8mR3cE5MCrrRfzbhHJafAhO9O3rUMwJtBkgRekd0k=; b=sO9aJ5k2rntwnbLI65ppyPYqhxJL8OoxTxvKCsIRODL5/nYXDhKSz9Z8LsU/wX1RJS GSHrm3xwlhUW+Mzal3maLi4HDAkOf2o0uYEOnD5pdwuUNzI2Gh/glN7/B+IbktNRtDR9 gXPJrgnvwRRkxNSZqi+9pKk+IJ34GMSzwe7/I/AiS4As0KojaH5Ap7iRlhyUL1xrLH1b 9P0v6GJR6VZYZ44ZQUBjQPTIESIGxh5Rmt8V6ZyG6cXC/qHAB3hNJ5LnIXyC8t3uQKAD c7n49cih28Am1LnoxM/aJE6hSZEgJKslTW77NagqkqXuvK95HUMOBZZAJ7QO9Fc7dLvq ViMA== X-Gm-Message-State: AOAM533L6Z3bT3RachvlfQ+8izohoDwHMTdQQmBrT01h8e5JWnLA6rJo 9eNO17PiIbvv3VIUIjdk3WdWfBLetnEuEvsM8O5ZF0Z49Sw= X-Received: by 2002:a05:6402:1d81:: with SMTP id dk1mr24387466edb.328.1640758597184; Tue, 28 Dec 2021 22:16:37 -0800 (PST) MIME-Version: 1.0 From: Matt Oliver Date: Wed, 29 Dec 2021 17:16:25 +1100 Message-ID: To: FFmpeg development discussions and patches X-Content-Filtered-By: Mailman/MimeDel 2.1.29 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: mOSHQo86Yn9D 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. Signed-off-by: Matt Oliver --- configure | 8 +++----- libavcodec/libx264.c | 4 ---- 2 files changed, 3 insertions(+), 9 deletions(-) -- diff --git a/configure b/configure index ede8f9777b..b35728aace 100755 --- a/configure +++ b/configure @@ -6535,11 +6535,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 21f434d06d..efbc9608c7 100644 --- a/libavcodec/libx264.c +++ b/libavcodec/libx264.c @@ -34,10 +34,6 @@ #include "atsc_a53.h" #include "sei.h" -#if defined(_MSC_VER) -#define X264_API_IMPORTS 1 -#endif - #include #include #include