From patchwork Wed Dec 22 00:07:19 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ridley Combs X-Patchwork-Id: 32811 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:cd86:0:0:0:0:0 with SMTP id d128csp5916390iog; Tue, 21 Dec 2021 16:07:46 -0800 (PST) X-Google-Smtp-Source: ABdhPJwy6pBdW2YAlXVJm96HnbZmqJmZTjBwT0f7ctYc7gXwVO+LEFk+4rPLIDhqKTLvF7H3+TN6 X-Received: by 2002:a17:906:3a4a:: with SMTP id a10mr539426ejf.253.1640131666611; Tue, 21 Dec 2021 16:07:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1640131666; cv=none; d=google.com; s=arc-20160816; b=MhwZ5XwRSXVp7OQY3pujgpV/qlqDqO3bs2Zck5ZlF37xQMsDBsDjEHv+TdQW+U8gYt vMsvISyiekApuvfHwoedJ0xJrO+x8tVQ8BkZCTd8HCGVgKTv5ivvVLKDWrKO3FloZBSd RlDTcSy7YCDbWUIvjgHuZenhtceeS1kODSj1hcobXZaYi39y5u554ku3g3lIlGloanpS yRIPgAr+cuJvHdtMtVljEiHHvrjeLk3WZy/pkKDFoCzPMNfrjQ1bveBRlzc4YvilALzU i7wOW2VV46OioJrtOPG5O/OZIBsCDwQGN/2z4VgShjxT4YHBRc233SBb3s3+1CCiEj4p EdqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:message-id:date:to:from :dkim-signature:delivered-to; bh=GlHUpHadqkbQlUlCKglVQdM0ICv4QOlXv6iE0B9C9yg=; b=0NJ6o2FliDuJuTQ7mhx7a2Oskoyh0nY4zhnKzJuUM3e5Yewei+CbC1xvqSzcNCN6Tc WcY3y4K0kfw5plD+PquITJWLOkTs81DcML2+jd8Jz3pZqPNnJmVtqKmCVL0EENfcNYgA YZYLTWPCZw+Gbs+AjbTBKs6yvW8TbqvlmovEY/DZj0vkezP4xilUHrf5GQ1oZZXIV5Qx Yoz7B/Keo79I4pk7I+nFTwIEJmQ+q/oklf0Nea0sqFY4S/GiuOYeQwuTVxaRWpJvc6To Q3fowwb3kORVZ/dnJTEkO0ax8xPFLJiRdGP70vkeMZ04pfYoalEWf9ijPx+NT9rnoAFQ vvGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@rcombs.me header.s=google header.b=UCLavP5K; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=rcombs.me Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id oz7si155449ejc.318.2021.12.21.16.07.45; Tue, 21 Dec 2021 16:07:46 -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=@rcombs.me header.s=google header.b=UCLavP5K; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=rcombs.me Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 58FA568AF04; Wed, 22 Dec 2021 02:07:41 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-il1-f179.google.com (mail-il1-f179.google.com [209.85.166.179]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 3C5DF6802C1 for ; Wed, 22 Dec 2021 02:07:34 +0200 (EET) Received: by mail-il1-f179.google.com with SMTP id w1so493558ilh.9 for ; Tue, 21 Dec 2021 16:07:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rcombs.me; s=google; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=wbQBtgmMdtPOYEr6wlUk3J1lia9CjtrIQx1zKOpQX/g=; b=UCLavP5KBA7c4wFYa1TMsZkCwAASehjzTeR5faet8Ii8diasu5almb/fpsnBMcXWne tsFZe3mr6FwC03WbPA3fhmS8H+u9SKCf9lZjxp4x3B09WGjgQO5Kmy4TfPNSq0+f4Fu+ W6YvtiGkuq2Ki/rqzC0l59zX4YSjyh/pbedKek4DnW+8BU31glLB+YViYTsYVdBwgZBh 69L5P/xWLdNWo6DASOnJy+zTFLfHgAimfsl3oC7DPhShnR+otfix+/H27VUMlu5ohFeA WpTt/pKqK973wjhgF5nis0nXmG0P8WTj4HegiIziq0gscM6iasyy6/k96z07UCGZOh2l yeDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=wbQBtgmMdtPOYEr6wlUk3J1lia9CjtrIQx1zKOpQX/g=; b=IixlpWsMVXx8duS3PhH/7cz4J7ThhFv8CRBZkRaMc2hzQDkpZBKoXnqEOzdaNXDFkV duL7mA/DHBY0KYrTmX6qld6j2W7de0YI6LmmCmrbVJp2KlKnByrtC/LeMToDYCEarso2 JuWEmqH4Vtvd+RWfivMcEsMgn1rkUkLV9OBxBXBfhIlTrJf8PM2oktheyAHHSCnsKk0l UfOLwtqrcDUhk8OqLIDCL1S1NHAoeZCEf4osFz+s0X5HxIC0CryInFVrkkx/UNgOFMKy IneaC1bZdlu6qv1H//jznSu2wKnLQt06Vof4YB3GNKX8zwfctxvWqAZI59QA5Z3UJwHB kqWQ== X-Gm-Message-State: AOAM532/0oi/WEU7nvb7VQu2z2O3Scf4h+yc3v3NEJJW4iy0HItyGgXi CZcNLcY9JG98KEGYVb9u6AjQ7Zpwv12SwVE= X-Received: by 2002:a05:6e02:1945:: with SMTP id x5mr273048ilu.287.1640131652389; Tue, 21 Dec 2021 16:07:32 -0800 (PST) Received: from rcombs-mbp.localdomain ([2601:243:2000:5ac:d068:8cb9:95e2:de39]) by smtp.gmail.com with ESMTPSA id a1sm238240ilj.35.2021.12.21.16.07.31 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 21 Dec 2021 16:07:31 -0800 (PST) From: rcombs To: ffmpeg-devel@ffmpeg.org Date: Tue, 21 Dec 2021 18:07:19 -0600 Message-Id: <20211222000725.38266-1-rcombs@rcombs.me> X-Mailer: git-send-email 2.33.1 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 1/7] configure: fix setting OBJCCFLAGS 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: eOVwdnD7GnPg We call this OBJCFLAGS in help text, but common.mak looks for OBJCCFLAGS. --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index 3abc4428e5..d49457d192 100755 --- a/configure +++ b/configure @@ -7643,7 +7643,7 @@ LN_S=$ln_s CPPFLAGS=$CPPFLAGS CFLAGS=$CFLAGS CXXFLAGS=$CXXFLAGS -OBJCFLAGS=$OBJCFLAGS +OBJCCFLAGS=$OBJCFLAGS ASFLAGS=$ASFLAGS NVCCFLAGS=$nvccflags AS_C=$AS_C From patchwork Wed Dec 22 00:07:20 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ridley Combs X-Patchwork-Id: 32816 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:cd86:0:0:0:0:0 with SMTP id d128csp5920734iog; Tue, 21 Dec 2021 16:14:24 -0800 (PST) X-Google-Smtp-Source: ABdhPJyAd/OVv0jye1mo2dMT0jtpRZ5O35OdkHc1UXHsKyhL+6VU7XxpyvATXT2HoKriZOIPECLB X-Received: by 2002:a17:907:3e8e:: with SMTP id hs14mr531691ejc.705.1640132064045; Tue, 21 Dec 2021 16:14:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1640132064; cv=none; d=google.com; s=arc-20160816; b=EECPLqiNfKggBSnj3Td703dvyJZL59wwV4Aa5eiHEuyjhcJmRMLWEY2PxEpVO/cVhF 0aY0A0COndFrye5Qu6OW6yf+zN0KeqcrBJxeTb6319idG1JBZMpvwt6QSTnqurGViJ1+ nzpSZRqkpq/N5yMBjpXd82xdMBKh0ZoePAb8fticRbNoYoxShMR+zPT83BubhFtswX96 8Dttsk7hkCJtWwEh1d33UzyOaYkxCqCboyElwVpamoffJex/xZGkTydtl098ShokUHxf vD1Q824uHh9t1e4/Yv2hrDznrIf0X7HYcE/7XXX3yiW7y4DaNHGohsdGHjb4FhlxX2Nf 5JUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:references:in-reply-to:message-id :date:to:from:dkim-signature:delivered-to; bh=pinCM9Ov7Ag0znzsZDgZntbpXL2xJg6Da3sZ1yztb3k=; b=pTiyvn/aUxAWNzW/gIRmYIuigaPm5ro7SSjCGXY3f5mJOw2o1SqieAbVRQS3roGSjx +XFCBCommKRlgQjkPJb3vBvS/tDOoFaBLRY7OLWj5HBD2QMeJSnh39bWTfrtWlUlPr+9 0Mk1DPIMdk9S/cLxZXftbXtN1mLYqTVF0atHCNd7WvQtWQdJxW3tV9dAr77/3UpVf59y Lnn393t4spYZCzTc87MWKLSjVNEgTBL1Rswzeo8Ew7M1NScc6HF/0z6UwWOGOx2bpf6L Qs/py1sIbO8AMs6n7xJ71QjoFP9/dNXQ1hNh08biyzQq+FDoxLH2aeHjtCB4SxLdptiM 0//w== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@rcombs.me header.s=google header.b=KgQsbboG; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=rcombs.me Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id qf36si199471ejc.77.2021.12.21.16.14.23; Tue, 21 Dec 2021 16:14:24 -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=@rcombs.me header.s=google header.b=KgQsbboG; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=rcombs.me Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 64E2C68AF86; Wed, 22 Dec 2021 02:14:17 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pf1-f175.google.com (mail-pf1-f175.google.com [209.85.210.175]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 3719668AF34 for ; Wed, 22 Dec 2021 02:14:11 +0200 (EET) Received: by mail-pf1-f175.google.com with SMTP id t123so688462pfc.13 for ; Tue, 21 Dec 2021 16:14:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rcombs.me; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=XTZo2gp2oXsTF12PfqsLvCDWNLwSN4uBUiX7+BR3tDE=; b=KgQsbboGchR2Ll6VdThlAX5Jt3sc8yc6SCq5RslhDX5tLB+DCUkJuTfD26YScZuEjp V815D/3xQxCH3gFnLOAjY49A0MfbkI1Demafyn618s3+QAWjCXnAEv6zgaoUYhnwMV48 hw5szxzVNf8Ah8jD5/jN6kyhrl29QW3jv/1yfb0cRKLkBqYL3FORTa17PcQfavrg9ofY HvU7NNN35mzBSwU4LvNeZaklM5U/K5MCzy1XGKMmx6ZSEfaFynb0R8AkyvnGpT3Ljrd7 +CdvrYYC82Nu5og+GcsfH9umonZ7arCkJg1r3UViiaG0afxTGUqPW1lbswoWgipJSxu6 8jDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=XTZo2gp2oXsTF12PfqsLvCDWNLwSN4uBUiX7+BR3tDE=; b=rG9RiFrQ8Gxp0weUsRcdCxz8RIoySWgZ4NzI4fsfLxV1jKb7ze/xdcBgeizcV8Higp zGrsnODiM2/WeKc3nkevv48TgUkrQtv/UvzXe4pUBxfZacZTg4TYTIRj0TZWwqneZDOC 6xrNzFoHZzVTWNMv4GRGKBmYoRV3QpIWKuySOpPso8Np9HIPg39I/Oz+xtk/y/MJwuFQ 8bZkSq/w2f9apF4dacb0Q1634WurrQZJLF6pFVAjuEJYNxYwjQlvG5brjUjC16gJkzHz CyJKuQrV4RPQXCNnHA66of3P3zgtqFWejFsxhwvHRCV8eI4tDqfxFDF8oLWsVjv2g7IG AMqg== X-Gm-Message-State: AOAM532VKr27MHnB7/ISb4vfuF6Mz+jui75YbUwkA67UINWBVBZK37xE JWXKgwXUJaAuEvT0IvpB2eYpKTCwDcPNk5k= X-Received: by 2002:a05:6e02:12ce:: with SMTP id i14mr278934ilm.99.1640131653176; Tue, 21 Dec 2021 16:07:33 -0800 (PST) Received: from rcombs-mbp.localdomain ([2601:243:2000:5ac:d068:8cb9:95e2:de39]) by smtp.gmail.com with ESMTPSA id a1sm238240ilj.35.2021.12.21.16.07.32 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 21 Dec 2021 16:07:32 -0800 (PST) From: rcombs To: ffmpeg-devel@ffmpeg.org Date: Tue, 21 Dec 2021 18:07:20 -0600 Message-Id: <20211222000725.38266-2-rcombs@rcombs.me> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211222000725.38266-1-rcombs@rcombs.me> References: <20211222000725.38266-1-rcombs@rcombs.me> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 2/7] configure: fix .d generation for C++ and Obj-C files 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: Uf/QVUSeeJlv --- configure | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configure b/configure index d49457d192..3ed7467252 100755 --- a/configure +++ b/configure @@ -7693,6 +7693,8 @@ ASDEP_FLAGS=$ASDEP_FLAGS X86ASMDEP=$X86ASMDEP X86ASMDEP_FLAGS=$X86ASMDEP_FLAGS CC_DEPFLAGS=$CC_DEPFLAGS +CXX_DEPFLAGS=$CXX_DEPFLAGS +OBJCC_DEPFLAGS=$OBJC_DEPFLAGS AS_DEPFLAGS=$AS_DEPFLAGS X86ASM_DEPFLAGS=$X86ASM_DEPFLAGS HOSTCC=$host_cc From patchwork Wed Dec 22 00:07:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ridley Combs X-Patchwork-Id: 32815 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:cd86:0:0:0:0:0 with SMTP id d128csp5920650iog; Tue, 21 Dec 2021 16:14:15 -0800 (PST) X-Google-Smtp-Source: ABdhPJxy+iWUxE4IxHFrTxMOJ6kj6OyaoP0zg93S7yySe9mg66ZQ9sei3Go/qdlkZNwoqcTS3v9g X-Received: by 2002:a05:6402:90d:: with SMTP id g13mr619525edz.156.1640132055522; Tue, 21 Dec 2021 16:14:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1640132055; cv=none; d=google.com; s=arc-20160816; b=WMsf7Ni4Oe6IXlK4ARtjkzK+aMQ40oAV7x6hUT/IOXDPfhwrUCmmVwW96cQLok3/E5 rGbkz6QlWTFw4/onxcbxzBmjIWO3yOVbyZGainB4LI7BvuU1xIQLsY0umdVo8fmn5L3k NRIJJJEKmdGIUESUm3vL8chlvJLXNbTAAe+Mk0i6n6AZYXmhMq43Vb7OKrUxjpTTAnVP bz9CqmaYUcQS6BLCbtmDkt/JBc/1SOgQgSnY1iJfK1mj6hFTaLLI9h3e2bXzPyR0a1Sk 6wtJlzJuzdO/i30585dSM+azfu09plZV4yAorBCNHeYIR39n0Gp9EyPeDBsH43PX9Ue/ FvVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:references:in-reply-to:message-id :date:to:from:dkim-signature:delivered-to; bh=p02irp+cgBG2uhXwCdPCzOMce2yeovMSyGK0n3BEM+8=; b=Pv4P62Kf0hKlrFzyVgGmv8ZP4swPDTLizZrlfcipBg7DZOCaV2mGlHcAY1NNSnoNmf lAtb2San9lHnwcc4Gq8/ei2JIYc0AGp+ohwTpaXN2rz4SgzIvunMXyxyH3eMNMP3Navw h2+hMK1ON2tGPN/8UBPlxZKUHWjLOtXRvxY2mHMJYwEUhH0ojfzNGNECBRvtud/sgjPI Z0SnX0XNGrLeYo8RDhyJ/oA3T4/IE5+Md4Z3e8mXSTrAJAD/NVOPNQg5/Cx6tZUSXRkV SybAdkAERbDFNtc+0PzDP3LJb6uRbtWRKssjoGN8FKpW/EGhBLyQd1b7TXpf/QipNerr VpeA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@rcombs.me header.s=google header.b=QYbM6884; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=rcombs.me Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id cs10si174055ejc.434.2021.12.21.16.14.15; Tue, 21 Dec 2021 16:14:15 -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=@rcombs.me header.s=google header.b=QYbM6884; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=rcombs.me Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 571A068A538; Wed, 22 Dec 2021 02:14:12 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pg1-f180.google.com (mail-pg1-f180.google.com [209.85.215.180]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id EFE7C68AE3E for ; Wed, 22 Dec 2021 02:14:05 +0200 (EET) Received: by mail-pg1-f180.google.com with SMTP id 200so491788pgg.3 for ; Tue, 21 Dec 2021 16:14:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rcombs.me; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=0bwKKfuDVf7mo1s2m+kBt1oOiiU4zry6KDXY14Bkzh8=; b=QYbM68845iU2g6upkYW1WH0PR5xFKD7Dr6YvzpxSmYEAmOtK8CY8BTVTtZpikZde4l IEaoeoV9y3WzPTuKlq/0U6IBO7ay23lWjUPI3egPZxSKWHpCXT3QXYv26bv7yktzhMZ2 yv2OaR/2JGNa9Ca4N/xAUTIoOguvuS4s5ggZQUJWROjzQ4woVJGDsJ9T0UkteKdfQeDO S3IXsK0lZr0rFsHj4pVVS3j4Ql3/EWPll+4V3B+hJe8gB4ZV05qVx0B3FEkcHgbMEZXH vcpcgnMsYwcoKK9AmpvTFuLAHYsSKpHOPua9wIeBH9vUHjVb5YCZ6xfJg4eaIf/GK3Zj zbIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=0bwKKfuDVf7mo1s2m+kBt1oOiiU4zry6KDXY14Bkzh8=; b=IsxGOr4ttkfz/8t/xu/x2Irm7NPMI5ES/AWUCDKCih/psqVF4RQBNeTbEQ73bvPBwp DDkzSR+jFffuAXtR55A3og+TpOZlLZPQU1CvRAcUFRplzzqGz9NgEgdJv+kut0e6I1qI 3LlU1rZ5YB5aERxH2g05ZgjDGY95+RW/QDKk33mSfg9fvKw9dEoR4Tzr4/T7u9kDrcRT lmgjlhWbgynOI0ihiEwBgKec3iM0D65xjWpJ16iwKWJB8KEtjDGB3L5zbEkShxq9fVJa LG3hw97Wod2r3J9ZK/Efu6b5U8CZjabiPZFaguxhjv9qYWyBkGlcGYybgCPMYcZUvK1u 8bPA== X-Gm-Message-State: AOAM533RirkcA4kLrG7gymYBNkAGhWrfM5106umSOHRZyppTNhhnARwq oAgLMjEHuy/SjL1ZzHCu+pnifLdmnnKV534= X-Received: by 2002:a05:6e02:20ee:: with SMTP id q14mr303925ilv.44.1640131654164; Tue, 21 Dec 2021 16:07:34 -0800 (PST) Received: from rcombs-mbp.localdomain ([2601:243:2000:5ac:d068:8cb9:95e2:de39]) by smtp.gmail.com with ESMTPSA id a1sm238240ilj.35.2021.12.21.16.07.33 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 21 Dec 2021 16:07:33 -0800 (PST) From: rcombs To: ffmpeg-devel@ffmpeg.org Date: Tue, 21 Dec 2021 18:07:21 -0600 Message-Id: <20211222000725.38266-3-rcombs@rcombs.me> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211222000725.38266-1-rcombs@rcombs.me> References: <20211222000725.38266-1-rcombs@rcombs.me> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 3/7] lavfi/metal: don't use braced-include for internal headers 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: KmpbDjBVv41K --- libavfilter/metal/utils.m | 2 +- libavfilter/vf_yadif_videotoolbox.m | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/libavfilter/metal/utils.m b/libavfilter/metal/utils.m index 759ebedfba..f831502065 100644 --- a/libavfilter/metal/utils.m +++ b/libavfilter/metal/utils.m @@ -17,7 +17,7 @@ */ #include "libavutil/log.h" -#include +#include "utils.h" void ff_metal_compute_encoder_dispatch(id device, id pipeline, diff --git a/libavfilter/vf_yadif_videotoolbox.m b/libavfilter/vf_yadif_videotoolbox.m index af83a73e89..65f155982e 100644 --- a/libavfilter/vf_yadif_videotoolbox.m +++ b/libavfilter/vf_yadif_videotoolbox.m @@ -20,11 +20,11 @@ */ #include "internal.h" +#include "metal/utils.h" #include "yadif.h" -#include -#include -#include -#include +#include "libavutil/avassert.h" +#include "libavutil/hwcontext.h" +#include "libavutil/objc.h" extern char ff_vf_yadif_videotoolbox_metallib_data[]; extern unsigned int ff_vf_yadif_videotoolbox_metallib_len; From patchwork Wed Dec 22 00:07:22 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ridley Combs X-Patchwork-Id: 32812 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:cd86:0:0:0:0:0 with SMTP id d128csp5916484iog; Tue, 21 Dec 2021 16:07:57 -0800 (PST) X-Google-Smtp-Source: ABdhPJzNJr7bWz1/eeXuv9ND/50QqhdlGhxW6Nok1QlEH+K3CLppsFNk5omYvR5m2/crp6uw6ODZ X-Received: by 2002:a50:d710:: with SMTP id t16mr609582edi.50.1640131677031; Tue, 21 Dec 2021 16:07:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1640131677; cv=none; d=google.com; s=arc-20160816; b=aDo/E/qJ61lFqNmirO7P++Uyz0EF2UZPRau4Sm/8sLDKE7M5c4L4v++oV9zoeruNPO Cs2/0WeU+dQnx/A/MYWVCqLb27DCgtglf1L3Vj5FVcyqYJfv8252gQeKCcXDkZVXyYYA vXj4Ltv060Qat5S2wV98QtrX4blN7avLcjWYFaSVylU4CvnkEdPgVj3oKbn2CgEw/v5u lpBDQz4Juh6QQHulBF0MIJlv65K7X+6l9hX23xntFLmQjVLQCXT8Ag8mc6Z33F3Ik5R6 ongYb10UAWpgQf7V2LC8O/afYKSL72Sm3wrW73LsBGm+7CgCNz5Y63Kirwi78keijCxo 1ySA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:references:in-reply-to:message-id :date:to:from:dkim-signature:delivered-to; bh=iPLB7j4dAx0oRtM30i7hlmPOUUeBZKjxR/fcdmvFsOk=; b=KXFaL/n5QkIBuUKf+LSgzYKWJyY7E5aGfIMAkR3zFMKcqXtwE6A3FSzpAGdVsv/UHg R7kONmD7s2P9LDTzgrwITxC+ydG2nVVGB0vQDB3ymnHSt9dLzJOcopADic/kHBRmVw0w 8ig6I0sLqKloVtFUV0ymNtxu/0j4lXhLg8DUH//zk0w9tPJXilbzRyITJ3MZhFzZqP7b NAYjE51gMvHR5zvB8XJM31ors3iF/8DoEIOEef5T4mn+K/fe5vbN/hOMrJ6lp8blq6T/ E912RyYeseKJZ2A2BTTxm+BwGJIsOKpMGAd0mth0Ar65/o+rlNYUryIaZvZ/PQ1od5kK 5gdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@rcombs.me header.s=google header.b=OnpFfw8t; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=rcombs.me Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id 16si158581ejn.81.2021.12.21.16.07.56; Tue, 21 Dec 2021 16:07:57 -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=@rcombs.me header.s=google header.b=OnpFfw8t; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=rcombs.me Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 9E18F68AF42; Wed, 22 Dec 2021 02:07:43 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-il1-f182.google.com (mail-il1-f182.google.com [209.85.166.182]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id C819568AF12 for ; Wed, 22 Dec 2021 02:07:36 +0200 (EET) Received: by mail-il1-f182.google.com with SMTP id e8so479854ilm.13 for ; Tue, 21 Dec 2021 16:07:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rcombs.me; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=J4YnNt/Xud+HhLHinFB9eSei6lvIWe6WnARVr3FGM1w=; b=OnpFfw8tLMTgrpr6t0OmF4FSxVCZ4yagn5ITgnUmhaQvwn9iBDjy+16dnbiJNmVdJy rkNW9LQctWh1SWSAeu0FQe6QUKaZ1gotC+MZFU2a6Ue6pqEc/GROvV1Ns4WlG+vbKqSc DNL6L1u3KQKC4CATDBgVhfI1Q+jKab3rBjvgoKBnKOLR615uZXJmONV3ZJR7wknnRrnE +V4+aWRwQP4aJcy84RRQaiuegH4J+4JO3fXxtJYoU4icHCXYwcskj7m/H1N6NA6kIeKM BAXbdGUxSLtC9dFOZsPKAid6JVDLu7GyrXMxrm+GmGHbr6f+yJrYfrgJkUJlW8vJ+TeN 93BA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=J4YnNt/Xud+HhLHinFB9eSei6lvIWe6WnARVr3FGM1w=; b=d4r0iMOgVhVeCGZ+xeH8Sy381EcMsQZt7I/iPkbzMppNCVSutok1jMHywCXdjMFpWH mkN7pWDdOJo15BuRosafMAiZ4ESnjrEoVIemETdGz6ehV110NUfOxi/hr76OjFouP7BD f3Rfaf7881q14xShdRA+qW5xKrGTogiA3BBbUNBXKtBLEg2yPopf1rEJlQetqXOs239g mxpGYSFifyW9FriqZHyJ2Wbo/Fmpx4pbXhXAYKIUvCgldUz7cLaNiOd/NiRmoQhAyNdJ rGRPITAVbiC8/t85piroLeKFaao0akwEnbeX6asprafoz4FYQNIsqRoDXRiTbJO9CIKS 78Iw== X-Gm-Message-State: AOAM5325dDciaLL6x/o0V/qcAql9GhufjTb6eu2OUcZLmJWHdc5dmLhi 2/wyXi+HUdH3doO7P+JBeyLRo9jAYd4jb7I= X-Received: by 2002:a92:db0f:: with SMTP id b15mr296897iln.45.1640131655215; Tue, 21 Dec 2021 16:07:35 -0800 (PST) Received: from rcombs-mbp.localdomain ([2601:243:2000:5ac:d068:8cb9:95e2:de39]) by smtp.gmail.com with ESMTPSA id a1sm238240ilj.35.2021.12.21.16.07.34 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 21 Dec 2021 16:07:34 -0800 (PST) From: rcombs To: ffmpeg-devel@ffmpeg.org Date: Tue, 21 Dec 2021 18:07:22 -0600 Message-Id: <20211222000725.38266-4-rcombs@rcombs.me> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211222000725.38266-1-rcombs@rcombs.me> References: <20211222000725.38266-1-rcombs@rcombs.me> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 4/7] configure: ensure we use the macOS SDK's metal compiler by default 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: X/gahB5FMhhs Apparently on some OS and Xcode versions this can select an iOS SDK, which in turn may fail on the affected versions. --- configure | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 3ed7467252..06a4d3f485 100755 --- a/configure +++ b/configure @@ -3844,8 +3844,8 @@ host_cc_default="gcc" doxygen_default="doxygen" install="install" ln_s_default="ln -s -f" -metalcc_default="xcrun metal" -metallib_default="xcrun metallib" +metalcc_default="xcrun -sdk macosx metal" +metallib_default="xcrun -sdk macosx metallib" nm_default="nm -g" pkg_config_default=pkg-config ranlib_default="ranlib" From patchwork Wed Dec 22 00:07:23 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ridley Combs X-Patchwork-Id: 32813 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:cd86:0:0:0:0:0 with SMTP id d128csp5916576iog; Tue, 21 Dec 2021 16:08:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJy6YSHXUtUy3JjmEwOSPLguxGijflnHY6PHOHfuS9/Gv49VvWDokd+wOWIv5sxIBuhiZbhS X-Received: by 2002:a17:906:e118:: with SMTP id gj24mr577888ejb.138.1640131686275; Tue, 21 Dec 2021 16:08:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1640131686; cv=none; d=google.com; s=arc-20160816; b=hZFHqK7RYUzm9x6rD9SASNeEPX9frK9YxkMriVXMtsRQbV2rC4QNYfrlotiyWo2NUD e0ZBL8OuhHIS0V4/CX/yDEN7RHr0KnJVBDrJj66S61G3sj5FAGPey8GP13Hj4Yb6bzQb 7wOCPmooN1Bmgo5gncZVmGS3lEdZQG9LhPx4/s8Sr49b5g78J6uVFdLWM3yhltjErkUe Iamla5dNXdVMKrAO7DBK4qwAUvWnyfxl4vY2Q2E7XsVRMESGmuq/NYpTJ/59YKUirkMx NyiI4nicCaFRGlHZIiCPCpXbMXWSftLCiRsYVmbiyFGpxzqYV+WIb9e8c5GeGFKxw2n3 CHzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:references:in-reply-to:message-id :date:to:from:dkim-signature:delivered-to; bh=V/x5SAymS6n4CY5n0gTb+GgLqvgga8kVL8+g8F9Icfc=; b=TV+fTHgnP8Sk57v+CpAyDwDs+0CF9oAPkvnQBwYec4wCIQXMlSMO6ot8Lvs73Y5n20 B6IGgd+vQO6d+iWx0GWncbJimrEy4PkC0za3cmWEyz4mzut65YB92gIY0igkEVv4SY6D YyctVp5M0H1CXTO+XKtpasXdKliCQjrd6xr6yAMOT0e8/khXEI3wsokPq1J9dHbzUzTK hHKBoZ2roenYjyUUeZt6lxufuhRNKbBeh38TAksAseiV3oIVnO2qghJW1Zf7nmIfrUTH zwQzmbwyD7ir9PddkilHyaI66kJCQ+jChdGi9IrtqeFngs3tgjJ/QWILF+Fmd37/6N5T C+lA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@rcombs.me header.s=google header.b=HFXur2Z9; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=rcombs.me Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id h20si198916edv.237.2021.12.21.16.08.05; Tue, 21 Dec 2021 16:08:06 -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=@rcombs.me header.s=google header.b=HFXur2Z9; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=rcombs.me Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 9629D68AF5D; Wed, 22 Dec 2021 02:07:45 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-io1-f42.google.com (mail-io1-f42.google.com [209.85.166.42]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 1AF2368AEFF for ; Wed, 22 Dec 2021 02:07:38 +0200 (EET) Received: by mail-io1-f42.google.com with SMTP id y70so710686iof.2 for ; Tue, 21 Dec 2021 16:07:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rcombs.me; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=nVfv0ejQ4ZMQrie7ehwkVjZhULL1rPwCsGgDrkEzbj4=; b=HFXur2Z9Yo+1U1JAnoY3x4iPqHFQqSgEp49XZE4a7b6E+GKe84Qm/k/MTdEIT4EHtQ EFdRpPkR4DM4v1qfSBPQjue5MvtmWL2WL6qNyY5kY6/p7HO+bPFlYM/QfNr82V4CcIFt Ukmv0YWnvD5QpeBiXmH6jaWcKWMDjq8Owu6qlLxwFujR9y3LjhEoOvFqxIasISeooaKQ BImLDGlyA8jbbPGOe6R9bix6DO1A8KMVQ5wXhcMnPRHdIp9z5QGwv08RdkpyqN9UiQnF GXPMJjutFzGdHnmSPbnskll2/Ki9QD15iZTg5UlngjfyS2HIvtn4XeIde67E3hJJt163 bK3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=nVfv0ejQ4ZMQrie7ehwkVjZhULL1rPwCsGgDrkEzbj4=; b=ydwIKtVnsxgqqlJpvWCjq0V+0gavLYclpvUDvzJMA8cV7Bf9YLTnXCkPYap4ieC+v3 IfzK68fMRgqD8FBEG+/TQFmWOpe/BjiBFoerbDvNEpBNrvLfv+rg8vBxmcsvrkxIA27t iPQpSosJxcdx+OW4rsfPhyNJXyhprcp6uuxK0Ve9c+MzgRXKxPiM5/Pk0HyLKlaFDDoK EVq3VUdRjBkTXEIkjv/EcwpEDegXnabU6UpitTaTDtF2HKGBPCZIMzvH7zJ4Ylo9sRg4 FMukwVroX2VVUdDRSQsmOAWOmUjdf6q5JtL9xJ10acd9oTW+2laNmsh02k9QMbaemZzx 15lQ== X-Gm-Message-State: AOAM532lRVGQJ6/scdAH/aNI/qTMUn6LidmizYXjwM744nzvBxKTM1SF diCFWo3HY03Z5bpvjk1uhRAsj8IcgVVo3Go= X-Received: by 2002:a05:6638:160d:: with SMTP id x13mr284610jas.120.1640131656283; Tue, 21 Dec 2021 16:07:36 -0800 (PST) Received: from rcombs-mbp.localdomain ([2601:243:2000:5ac:d068:8cb9:95e2:de39]) by smtp.gmail.com with ESMTPSA id a1sm238240ilj.35.2021.12.21.16.07.35 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 21 Dec 2021 16:07:35 -0800 (PST) From: rcombs To: ffmpeg-devel@ffmpeg.org Date: Tue, 21 Dec 2021 18:07:23 -0600 Message-Id: <20211222000725.38266-5-rcombs@rcombs.me> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211222000725.38266-1-rcombs@rcombs.me> References: <20211222000725.38266-1-rcombs@rcombs.me> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 5/7] configure: test the metal compiler before use 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: LMpgZ888EL7Q Apparently Metal.framework is included with the command line tools (and thus may be present without Xcode), but the Metal compiler is only included as part of Xcode. --- configure | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configure b/configure index 06a4d3f485..cb02c54bf1 100755 --- a/configure +++ b/configure @@ -6365,6 +6365,8 @@ enabled videotoolbox && { check_func_headers CoreVideo/CVImageBuffer.h kCVImageBufferTransferFunction_SMPTE_ST_428_1 "-framework CoreVideo" } +enabled metal && test_cmd $metalcc -v || disable metal + check_struct "sys/time.h sys/resource.h" "struct rusage" ru_maxrss check_type "windows.h dxva.h" "DXVA_PicParams_AV1" -DWINAPI_FAMILY=WINAPI_FAMILY_DESKTOP_APP -D_CRT_BUILD_DESKTOP_APP=0 From patchwork Wed Dec 22 00:07:24 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ridley Combs X-Patchwork-Id: 32814 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:cd86:0:0:0:0:0 with SMTP id d128csp5916713iog; Tue, 21 Dec 2021 16:08:16 -0800 (PST) X-Google-Smtp-Source: ABdhPJwNV+ynfSmkmRoEw4uZWnW2B46fzDm1EDZ68KwwFmbfOBxl+MDwR+uBqRAAHaK5lZHgSAel X-Received: by 2002:a05:6402:438a:: with SMTP id o10mr579893edc.353.1640131696507; Tue, 21 Dec 2021 16:08:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1640131696; cv=none; d=google.com; s=arc-20160816; b=q2j1tCC35f7xvsmp6/5vid7c8rw6i9u5ugwcCyaQUK+lny/N2LeOI8Vp/nfQxoW+tb uwnle/vkygHXGUm8rTUMafPdAuI3pc4NprX0iBL+6TqX4xsWgQ08smzOrrEBf6ZaKIIK cUI+4850bLC0vUAqsiqvVDaonKYtaNC7y0cDxvSkIduVd68kebG2OnxrpyUOlEQzXIhT jp3zBB78xyDN6lwZ2r94+AaNnGEkbWV6QNn+CB7cOcjpjmWzgZd3vrI4ln2SEPmpES0/ DMHgqZJlJx+On6iRrszEekbFan/nLdp9Jwy2+vTLHVVWW3zhmMQ/9/8PJcfKdowl0554 pK1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:references:in-reply-to:message-id :date:to:from:dkim-signature:delivered-to; bh=sfp3CxH1U/b8mdfmcLvxX1X44xawZk3ILWqbHp3d9G8=; b=Ndva5TNdrCmPRJq8Z8FH97fUNBTEk21C2yyqUh9VnHCQ2R5WCBTiyB1fxHgY2ipqQp JCoknHI6BZ4fgnnNTelUM1Nnu1uHLU2lCaiJ/u/ShG5M1VA+zSW1G93UchdKiyKPCCgj 0GxbXr5XNWLqUKEejqw+D/2Ne24PDq8/OuQhQ4AqthCu2RVjNe5MzLpy/z1a6E6xyvuR GINMbZlnHjhhcB65FnbyExgbdyeJR+rHz1EsYwn5EarGMrGUai9wj6cHiTYhNLYZWFiP XF+kIFDnf4XAQXszvjDTiQRZbrNGIuXjZJvyB/It665UKL5KlHCcCKSzmMXFAnmO6xOn 1k5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@rcombs.me header.s=google header.b="rV/pIhRr"; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=rcombs.me Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id h1si149919ejq.449.2021.12.21.16.08.16; Tue, 21 Dec 2021 16:08:16 -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=@rcombs.me header.s=google header.b="rV/pIhRr"; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=rcombs.me Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id A6A6E68AF6F; Wed, 22 Dec 2021 02:07:46 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-io1-f43.google.com (mail-io1-f43.google.com [209.85.166.43]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id A4A4D68AF4C for ; Wed, 22 Dec 2021 02:07:38 +0200 (EET) Received: by mail-io1-f43.google.com with SMTP id m9so754999iop.0 for ; Tue, 21 Dec 2021 16:07:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rcombs.me; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=AfFwT1vzbvjhMZkqNDhfs9WjzHbghrFvqXrfiJkj8nM=; b=rV/pIhRrf63dxxhpFu+qa5JfpbeN1a82yDG/R5868SWyHAnMzWuu/mg90AEoi8efxA zju93qA+HEueM+ckllZCIeDjY0frtdS7XkWIygjULyjjn2eiVy86kCIcDL+seaoQqOoe 1W5Ah9KQJnZltRmpAfSCWeE8/uM2W1oPiHRdwBlSdXIq95MljkZJZeYpH4DuE73/2m8u WFpcsh/IFsb7GsBKZZn3caAg8N0tT4AlUgxnH3593FPox502rvFv880kTXh7X918UF0T yyDzG8Es3EwcszSw78MUd3avj99U8IIbQZ5EIkbv5EsyOEWrvF7oOhEURLik0xqbnf33 4uOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=AfFwT1vzbvjhMZkqNDhfs9WjzHbghrFvqXrfiJkj8nM=; b=Pe66OnKYM2njAv3mJjqBpH7a8mRw49C/dZIVtEv0uB9RqaG9eAr6fvdW3AtdLCHTju Y3BQx34GyoulLN6aNo/bYb5pgMuq7kj60GL/haNa54XEGI17ElgxB7gLYlAta8WALAzs 7CQ+K+K2A+X/smsFm4lUQ6t3f+bf64gZrWuk8UuBhnTuMvgSZARfDRozyAaTSu5yxzHL pwxa71fmZ2k4rOHOcQgR1SX7shKguPd2OnD/I2KV9Ajf8oHanXCbhgZmBBYBV3I3oumw 0zE1R6nptmLfsVHik9PUFM4WA/971KYN6j3y9oOZIEZ0MDtln+ExlgXfF8sb4IeBqvi1 jP4w== X-Gm-Message-State: AOAM532QjaHY7CYuBv0sCbstoeWxlrbP8I0X+IlRE4THxN+q2Ufxl02f Q6a0QLZB7Bm4HMp1Lb0Wjy1oZ40Snmt70pQ= X-Received: by 2002:a02:a88f:: with SMTP id l15mr255654jam.231.1640131657093; Tue, 21 Dec 2021 16:07:37 -0800 (PST) Received: from rcombs-mbp.localdomain ([2601:243:2000:5ac:d068:8cb9:95e2:de39]) by smtp.gmail.com with ESMTPSA id a1sm238240ilj.35.2021.12.21.16.07.36 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 21 Dec 2021 16:07:36 -0800 (PST) From: rcombs To: ffmpeg-devel@ffmpeg.org Date: Tue, 21 Dec 2021 18:07:24 -0600 Message-Id: <20211222000725.38266-6-rcombs@rcombs.me> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211222000725.38266-1-rcombs@rcombs.me> References: <20211222000725.38266-1-rcombs@rcombs.me> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 6/7] lavfi/metal: fix build on pre-10.15 SDKs 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: noQZXVdBX5+s --- libavfilter/metal/utils.m | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavfilter/metal/utils.m b/libavfilter/metal/utils.m index f831502065..f365d3ceea 100644 --- a/libavfilter/metal/utils.m +++ b/libavfilter/metal/utils.m @@ -29,6 +29,8 @@ void ff_metal_compute_encoder_dispatch(id device, NSUInteger h = pipeline.maxTotalThreadsPerThreadgroup / w; MTLSize threadsPerThreadgroup = MTLSizeMake(w, h, 1); BOOL fallback = YES; + // MAC_OS_X_VERSION_10_15 is only defined on SDKs new enough to include its functionality (including iOS, tvOS, etc) +#ifdef MAC_OS_X_VERSION_10_15 if (@available(macOS 10.15, iOS 11, tvOS 14.5, *)) { if ([device supportsFamily:MTLGPUFamilyCommon3]) { MTLSize threadsPerGrid = MTLSizeMake(width, height, 1); @@ -36,6 +38,7 @@ void ff_metal_compute_encoder_dispatch(id device, fallback = NO; } } +#endif if (fallback) { MTLSize threadgroups = MTLSizeMake((width + w - 1) / w, (height + h - 1) / h, From patchwork Wed Dec 22 00:07:25 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ridley Combs X-Patchwork-Id: 32817 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:cd86:0:0:0:0:0 with SMTP id d128csp5921358iog; Tue, 21 Dec 2021 16:15:26 -0800 (PST) X-Google-Smtp-Source: ABdhPJxJamCkFu3rQyby/Zm4pKt9qo10fjThC38P40/6KR5t1aT1AJcy7XsPhrU9KZ0dXsNpWQ3K X-Received: by 2002:a17:906:a0d:: with SMTP id w13mr580005ejf.642.1640132125985; Tue, 21 Dec 2021 16:15:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1640132125; cv=none; d=google.com; s=arc-20160816; b=nMM67KMeQsIOj68rXaKY//LcSG9O9t7C4kyGEl31fbsGeGBoioLSy6Bx5nDuIj33Xc TlXMzeG/t4KDo9dtZgl2ctwF1+48DEMeYrbADkN8T3JfGcg1ayeI7J+x1Q0DEdc4MAaR viABBsCU/sVrMwbMdmDk1gjgvC8WgdcD1uEQyh22yuRMVwkPYSZKAXpDX0AC2tzm6IKm RfybgQ/QLF3FcV6ZYEqSkT1x9ETEME5ZVC52rstEdS/2d6jk/BK0WRYiWj+aH1XNpSDE zGAZOk4WHruOcYNYqu1w78n7oU4poH9OeLAhiK4ZIRzmo0huYhkh5RGmNEfAan2u7uxQ 2Y5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:references:in-reply-to:message-id :date:to:from:dkim-signature:delivered-to; bh=s49+9FJgIctPRrdqS2Z5uR48+jdzFWDjR4tUKE7EgYU=; b=KfnMspOFIeHxefREGNL2hHPgH3sPBV/TDRaG8djicfDV79KO5pfqw1EV3z8k8mco+U KOZrmYn5liaxd7VnhjAjd/m7HpYzMOFqmMVPhenTnTRBxQ9jEpbNoJt8t3ZduxFGtEmZ 1/HEZ6ME7/hn8xoph7pGzjnh4VDkW0o2DU14zr+aU/Aw4itDEWi749X4R6NffMDYzab+ c9eV5kvrsbeSy/XikFkujvk3iwQLNFQX1phwZqo8+2egXRGXFtETibl7bsWwnXnKUQmX EkRm0XnBN2oTtiUfdPs90WEZxqDTCINeA3JhGgrZqT3jimXxSCUJKRnDPSZ+KapS+pEe W3jQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@rcombs.me header.s=google header.b=SCkHa5dj; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=rcombs.me Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id gb9si189039ejc.256.2021.12.21.16.15.25; Tue, 21 Dec 2021 16:15:25 -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=@rcombs.me header.s=google header.b=SCkHa5dj; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=rcombs.me Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 89AF268AF04; Wed, 22 Dec 2021 02:15:23 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qk1-f182.google.com (mail-qk1-f182.google.com [209.85.222.182]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 2271E68AE6F for ; Wed, 22 Dec 2021 02:15:17 +0200 (EET) Received: by mail-qk1-f182.google.com with SMTP id f138so695430qke.10 for ; Tue, 21 Dec 2021 16:15:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rcombs.me; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=Kz9saHUQ0iQh2XPQGyltBgzqHch+WMktFlSDzs1jj1g=; b=SCkHa5djERGhnl16OaWZz5FrAavyuajK1kWQHtsL8kI3qofcQ/393UvKAFsQlvw3jA z7wrRW/H+qTOvdtsd3bTxLKIXbN3SO773Q01fEZKWBRKb6gqcL+fcVDevD0U6MDlpJqk lFA8m1Bn3uhqn3JWBBnD4fXjUtI1xRr5O3IyJN0G2xE6umwYrEuAmNqJN4y5gM7EDyxF C1pYG4x372Ij88pBlVFnPazE75yFsQKfxdUNy+sKPASkUnbSauCT+c2gWrqeMeQV8TUv f4eiblUVD5hW47LHfMnsuVbWxyWwEQf+iZ0arMGKYE9awdvbxc2vDAlPHU4h4V4lWNcB KWWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Kz9saHUQ0iQh2XPQGyltBgzqHch+WMktFlSDzs1jj1g=; b=Pq8tuBdTDjm+ICU8/MlgwPuOW1TeESvtzPhF3/qosfdkDOmW66GS8V+XhC3UeLHVtl y9WJhgdJUL3Ve14QCoq2mYxgdFn6/ci0Vq2CzWNboXkmd71e773SYpjMxxdyD0VW7F/h yvqpsHLmvHue8IBcH86lt6gus4ocNl79Y9peX46iiNFcCrkqTaEfEEElWwCdoFCVh+M6 XmIPEWw+pBJ4sVIUPc1uhOYbmDjcs7sv4XoqvWOmzf3xdatg6Z1p8jsq/JZAhnJ+AnoM znbolKNMIrAigqwmNMaMHWXgU1U5E2spbV4hQk+FIUZpuxxJp/B3HHiMID2rNGL+bHae yrjw== X-Gm-Message-State: AOAM5328fXvZE+2eNTR6+7Zif6GAQlSkBJtAkvVRIQbnb8d6DQjNhgIJ oX2NPY+IeGAqedDIIdeXuMvyLEQfirvtbB0= X-Received: by 2002:a02:c80d:: with SMTP id p13mr296050jao.138.1640131657976; Tue, 21 Dec 2021 16:07:37 -0800 (PST) Received: from rcombs-mbp.localdomain ([2601:243:2000:5ac:d068:8cb9:95e2:de39]) by smtp.gmail.com with ESMTPSA id a1sm238240ilj.35.2021.12.21.16.07.37 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 21 Dec 2021 16:07:37 -0800 (PST) From: rcombs To: ffmpeg-devel@ffmpeg.org Date: Tue, 21 Dec 2021 18:07:25 -0600 Message-Id: <20211222000725.38266-7-rcombs@rcombs.me> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211222000725.38266-1-rcombs@rcombs.me> References: <20211222000725.38266-1-rcombs@rcombs.me> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 7/7] lavfi/metal: fix build with pre-10.11 deployment targets 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: LGO4KS6JCH9A - Ensure the yadif .metal compiles when targeting any Metal runtime version - Use some preprocessor awkwardness to ensure Core Video's Metal-specific functionality is exposed regardless of our deployment target (this works around what seems to be an SDK header bug, filed as FB9816002) - Ensure all direct references to Metal functions and classes are gated behind runtime version checks (this satisfies clang's deployment-target violation warnings provided by -Wunguarded-availability). --- libavfilter/metal/utils.h | 28 +++++++- libavfilter/metal/vf_yadif_videotoolbox.metal | 11 ++- libavfilter/vf_yadif_videotoolbox.m | 67 ++++++++++++++++--- 3 files changed, 94 insertions(+), 12 deletions(-) diff --git a/libavfilter/metal/utils.h b/libavfilter/metal/utils.h index bd0319f63c..7350d42a35 100644 --- a/libavfilter/metal/utils.h +++ b/libavfilter/metal/utils.h @@ -20,16 +20,40 @@ #define AVFILTER_METAL_UTILS_H #include + +#include + +// CoreVideo accidentally(?) preprocessor-gates Metal functionality +// on MAC_OS_X_VERSION_MIN_REQUIRED >= 101100 (FB9816002). +// There doesn't seem to be any particular reason for this, +// so here we temporarily redefine it to at least that value +// so CV will give us CVMetalTextureRef and the related functions. + +#if defined(MAC_OS_X_VERSION_MIN_REQUIRED) && (MAC_OS_X_VERSION_MIN_REQUIRED < 101100) +#define ORIG_MAC_OS_X_VERSION_MIN_REQUIRED MAC_OS_X_VERSION_MIN_REQUIRED +#undef MAC_OS_X_VERSION_MIN_REQUIRED +#define MAC_OS_X_VERSION_MIN_REQUIRED 101100 +#endif + #include +#ifdef ORIG_MAC_OS_X_VERSION_MIN_REQUIRED +#undef MAC_OS_X_VERSION_MIN_REQUIRED +#define MAC_OS_X_VERSION_MIN_REQUIRED ORIG_MAC_OS_X_VERSION_MIN_REQUIRED +#undef ORIG_MAC_OS_X_VERSION_MIN_REQUIRED +#endif + void ff_metal_compute_encoder_dispatch(id device, id pipeline, id encoder, - NSUInteger width, NSUInteger height); + NSUInteger width, NSUInteger height) + API_AVAILABLE(macos(10.11), ios(8.0)); CVMetalTextureRef ff_metal_texture_from_pixbuf(void *avclass, CVMetalTextureCacheRef textureCache, CVPixelBufferRef pixbuf, int plane, - MTLPixelFormat format); + MTLPixelFormat format) + API_AVAILABLE(macos(10.11), ios(8.0)); + #endif /* AVFILTER_METAL_UTILS_H */ diff --git a/libavfilter/metal/vf_yadif_videotoolbox.metal b/libavfilter/metal/vf_yadif_videotoolbox.metal index 50783f2ffe..8a3d41a30f 100644 --- a/libavfilter/metal/vf_yadif_videotoolbox.metal +++ b/libavfilter/metal/vf_yadif_videotoolbox.metal @@ -26,6 +26,15 @@ using namespace metal; +/* + * Version compat shims + */ + +#if __METAL_VERSION__ < 210 +#define max3(x, y, z) max(x, max(y, z)) +#define min3(x, y, z) min(x, min(y, z)) +#endif + /* * Parameters */ @@ -44,7 +53,7 @@ struct deintParams { */ #define accesstype access::sample -const sampler s(coord::pixel); +constexpr sampler s(coord::pixel); template T tex2D(texture2d tex, uint x, uint y) diff --git a/libavfilter/vf_yadif_videotoolbox.m b/libavfilter/vf_yadif_videotoolbox.m index 65f155982e..455745817f 100644 --- a/libavfilter/vf_yadif_videotoolbox.m +++ b/libavfilter/vf_yadif_videotoolbox.m @@ -26,10 +26,12 @@ #include "libavutil/hwcontext.h" #include "libavutil/objc.h" +#include + extern char ff_vf_yadif_videotoolbox_metallib_data[]; extern unsigned int ff_vf_yadif_videotoolbox_metallib_len; -typedef struct YADIFVTContext { +typedef struct API_AVAILABLE(macos(10.11), ios(8.0)) YADIFVTContext { YADIFContext yadif; AVBufferRef *device_ref; @@ -44,7 +46,12 @@ typedef struct YADIFVTContext { id mtlParamsBuffer; CVMetalTextureCacheRef textureCache; -} YADIFVTContext; +} YADIFVTContext API_AVAILABLE(macos(10.11), ios(8.0)); + +// Using sizeof(YADIFVTContext) outside of an availability check will error +// if we're targeting an older OS version, so we need to calculate the size ourselves +// (we'll statically verify it's correct in yadif_videotoolbox_init behind a check) +#define YADIF_VT_CTX_SIZE (sizeof(YADIFContext) + sizeof(void*) * 10) struct mtlYadifParams { uint channels; @@ -62,7 +69,7 @@ static void call_kernel(AVFilterContext *ctx, id next, int channels, int parity, - int tff) + int tff) API_AVAILABLE(macos(10.11), ios(8.0)) { YADIFVTContext *s = ctx->priv; id buffer = s->mtlQueue.commandBuffer; @@ -93,7 +100,7 @@ static void call_kernel(AVFilterContext *ctx, } static void filter(AVFilterContext *ctx, AVFrame *dst, - int parity, int tff) + int parity, int tff) API_AVAILABLE(macos(10.11), ios(8.0)) { YADIFVTContext *s = ctx->priv; YADIFContext *y = &s->yadif; @@ -162,7 +169,7 @@ exit: return; } -static av_cold void yadif_videotoolbox_uninit(AVFilterContext *ctx) +static av_cold void do_uninit(AVFilterContext *ctx) API_AVAILABLE(macos(10.11), ios(8.0)) { YADIFVTContext *s = ctx->priv; YADIFContext *y = &s->yadif; @@ -188,7 +195,15 @@ static av_cold void yadif_videotoolbox_uninit(AVFilterContext *ctx) } } -static av_cold int yadif_videotoolbox_init(AVFilterContext *ctx) + +static av_cold void yadif_videotoolbox_uninit(AVFilterContext *ctx) +{ + if (@available(macOS 10.11, iOS 8.0, *)) { + do_uninit(ctx); + } +} + +static av_cold int do_init(AVFilterContext *ctx) API_AVAILABLE(macos(10.11), ios(8.0)) { YADIFVTContext *s = ctx->priv; NSError *err = nil; @@ -261,7 +276,19 @@ fail: return AVERROR_EXTERNAL; } -static int config_input(AVFilterLink *inlink) +static av_cold int yadif_videotoolbox_init(AVFilterContext *ctx) +{ + if (@available(macOS 10.11, iOS 8.0, *)) { + // Ensure we calculated YADIF_VT_CTX_SIZE correctly + static_assert(YADIF_VT_CTX_SIZE == sizeof(YADIFVTContext), "Incorrect YADIF_VT_CTX_SIZE value!"); + return do_init(ctx); + } else { + av_log(ctx, AV_LOG_ERROR, "Metal is not available on this OS version\n"); + return AVERROR(ENOSYS); + } +} + +static int do_config_input(AVFilterLink *inlink) API_AVAILABLE(macos(10.11), ios(8.0)) { AVFilterContext *ctx = inlink->dst; YADIFVTContext *s = ctx->priv; @@ -283,7 +310,18 @@ static int config_input(AVFilterLink *inlink) return 0; } -static int config_output(AVFilterLink *link) +static int config_input(AVFilterLink *inlink) +{ + AVFilterContext *ctx = inlink->dst; + if (@available(macOS 10.11, iOS 8.0, *)) { + return do_config_input(inlink); + } else { + av_log(ctx, AV_LOG_ERROR, "Metal is not available on this OS version\n"); + return AVERROR(ENOSYS); + } +} + +static int do_config_output(AVFilterLink *link) API_AVAILABLE(macos(10.11), ios(8.0)) { AVHWFramesContext *output_frames; AVFilterContext *ctx = link->src; @@ -347,6 +385,17 @@ exit: return ret; } +static int config_output(AVFilterLink *link) +{ + AVFilterContext *ctx = link->src; + if (@available(macOS 10.11, iOS 8.0, *)) { + return do_config_output(link); + } else { + av_log(ctx, AV_LOG_ERROR, "Metal is not available on this OS version\n"); + return AVERROR(ENOSYS); + } +} + #define FLAGS AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_FILTERING_PARAM #define CONST(name, help, val, unit) { name, help, 0, AV_OPT_TYPE_CONST, {.i64=val}, INT_MIN, INT_MAX, FLAGS, unit } @@ -394,7 +443,7 @@ static const AVFilterPad yadif_videotoolbox_outputs[] = { AVFilter ff_vf_yadif_videotoolbox = { .name = "yadif_videotoolbox", .description = NULL_IF_CONFIG_SMALL("YADIF for VideoToolbox frames using Metal compute"), - .priv_size = sizeof(YADIFVTContext), + .priv_size = YADIF_VT_CTX_SIZE, .priv_class = &yadif_videotoolbox_class, .init = yadif_videotoolbox_init, .uninit = yadif_videotoolbox_uninit,