From patchwork Sat May 15 09:45:34 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zane van Iperen X-Patchwork-Id: 27786 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:b214:0:0:0:0:0 with SMTP id b20csp1184804iof; Sat, 15 May 2021 02:46:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxT4ngqJQbOV+tRMUypqwm3IujhOwDy0yI+B4Iet4KQcnQE2yE/bRdlnMoPpxSAK81TT0oX X-Received: by 2002:aa7:c7c5:: with SMTP id o5mr59948183eds.31.1621071979967; Sat, 15 May 2021 02:46:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621071979; cv=none; d=google.com; s=arc-20160816; b=AFAiBrsZ9utPNW2ousmh6/iOFiNgJrcXj5EdhL6RtLL0gyL4C2IOaOZbopHNAYAgOv BgDXHWeSqMxwNJe/MB1Iu+EHpbd5IxTTZOFnrzAGCV36YaSKGVKAbAx6HatnM+jlzpF5 m2Tbp/wGrWKpeqb+CW0qdCq5XvUjaWA0DmxU/q+28mez997ekgU8BS7GTQGHW79Bmdgq pIVUPFSjIP4qT53T9irM9tX2nqBajGLxyvbBZh3mgy125b8HORjHvM+g2yeX8PQKSikT Ts+xKOE76HKupMJezuAeHDZ1+smDBvFj1Mn/06jrA6ZuIs4qmJ4+xC2Nixt4g6IblLB/ Cd3g== 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=mrjS+UcnRS5uU3wUmwGA/mg/H3IbTDC3GRXCbOdj4P8=; b=g5G0BIijyxqwPv7HUiaG5FaRp06NE54KzMDaZFaO4vxZlykXYXhIzNDL7LW5ctwbu3 RKhBNdVLjvazTAaTyNMc5UwsvkDn43zSrWxQCKrPF1bdGGwRewg1aP95+itCYGwLWpge N9BBtiiOfIdfV0e11pzZKF8hLKe96rVAFu9XQ63iEJ1wcAVybrPhmLUZIDf1GB3YzxpY ceUbVTNgevqG8Jszeylhbs5UzNWe3KEWSuNnhM27ICs65CXTCAeQeistH3x8xmSGfug+ VK5NB7Fws+6L0gEppiJnH86xTXC5DTtVV2Lq/OLB2eUCs3JZYorCcgLF4xqvNCyFTm9u zOZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@zanevaniperen.com header.s=key1 header.b=Xk12ctGv; 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=NONE dis=NONE) header.from=zanevaniperen.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id y13si2806677ejb.12.2021.05.15.02.46.19; Sat, 15 May 2021 02:46:19 -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=@zanevaniperen.com header.s=key1 header.b=Xk12ctGv; 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=NONE dis=NONE) header.from=zanevaniperen.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id C69496882CB; Sat, 15 May 2021 12:46:15 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from out2.migadu.com (out2.migadu.com [188.165.223.204]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id D54EC680844 for ; Sat, 15 May 2021 12:46:08 +0300 (EEST) X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zanevaniperen.com; s=key1; t=1621071968; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=AWO2jLsTZseOoeTQTeZWm+Ns1abwS2IQfjgnMyeeolU=; b=Xk12ctGvgpP10vmPuJfJFdqYqt0dYOf8J3N32dgyUTrVJH5GQ5eaVwqgN9XCNUjojNyAl0 6eeJgy4PzhjfVcntoAV6y8owK3435Rw+Am/BWMqGw/ef767xkcbpRF7Ei2eh33/MaMngwF u9Pkp7zI+MbAFBCx7syn3LZdEI+qOaR9xZsq7MCZOoqYu/kan+Ky0cC0qfDhKeOPAC762b 8B+IrFruEn0idFlJr+eW+7muI7seqLwSNwF2xzn6ngWgJLd5uI5/xhhMZ4j6dCVWLX2eko Eua8eC388tX1jaOlNV2NAQZzjgS2DiuKsVG2Kvc2fH4YUm9zqs7MTdeTJjledg== From: Zane van Iperen To: ffmpeg-devel@ffmpeg.org Date: Sat, 15 May 2021 19:45:34 +1000 Message-Id: <20210515094534.2950-1-zane@zanevaniperen.com> MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: git-morningstar@zanevaniperen.com Subject: [FFmpeg-devel] [PATCH] avcodec/videotoolboxenc: #define TARGET_CPU_ARM64 to 0 if not provided by the SDK 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: hSakXrac/Hgj Fixes build failure on older SDKs without it. Fixes #9242 Signed-off-by: Zane van Iperen --- libavcodec/videotoolboxenc.c | 5 +++++ 1 file changed, 5 insertions(+) NB: This is untested, I do not have a Mac to try it on. diff --git a/libavcodec/videotoolboxenc.c b/libavcodec/videotoolboxenc.c index 58239e0ab9..3d3677362a 100644 --- a/libavcodec/videotoolboxenc.c +++ b/libavcodec/videotoolboxenc.c @@ -50,6 +50,11 @@ enum { kCVPixelFormatType_420YpCbCr10BiPlanarFullRange = 'xf20' }; enum { kCVPixelFormatType_420YpCbCr10BiPlanarVideoRange = 'x420' }; #endif +/* Older SDKs don't have this, make sure we can actually compile we're using one. */ +#ifndef TARGET_CPU_ARM64 +# define TARGET_CPU_ARM64 0 +#endif + typedef OSStatus (*getParameterSetAtIndex)(CMFormatDescriptionRef videoDesc, size_t parameterSetIndex, const uint8_t **parameterSetPointerOut,