From patchwork Mon Nov 22 20:53: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: 31533 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:d206:0:0:0:0:0 with SMTP id q6csp7584685iob; Mon, 22 Nov 2021 12:55:54 -0800 (PST) X-Google-Smtp-Source: ABdhPJy1cZwHGr4PCkCKh+FnWNmUf2DHICE1+Enp21oVvNU3BmjYxyTwP4nusoVdJFhHSXJX070U X-Received: by 2002:a17:907:96a9:: with SMTP id hd41mr65201ejc.413.1637614553847; Mon, 22 Nov 2021 12:55:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1637614553; cv=none; d=google.com; s=arc-20160816; b=ABbVAalQ/DuoRIfEpL9aGXL71uaFvOsuDlz5hEn2nAczpWDNM/prK5ghHOpMSnrur3 kzzsKmCbFiCw/glPGsE0pbuGZw6wQ4hOqRLlHqRzB3KoU5MSbbG8vxKfTEOdPEAydNTB s9k6l4dosFzJAQ8sIcFUOC3LZOhNO3/A2caScEVLHkc0ly1kcQskr/L9brN/WCwExkAt ZmP0+/Cr/ZI99oOHM41RtuRj6TPZc5bYzlb4nEPnC80auDNM7gZdQAnfhGj+/c/Bv1Ln YjoYtq59hZzATOWQj4lNzlnOnHmnIbxNnLOpfESx0f0hGTlyfzVL9LQl0owHlknzpjYQ yJYA== 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=pHj6+0cXNR7QKWO5kzAtHLBypsL5hpyNYv3kixZSVbg=; b=ae7tUg0okH0g9ly6m52hCwS3a6PHAY2yN0KQ/zJZV8ry0eVpOLwR0S1vaXkJrpPYhd Vc6XxcESQn2MYlLxzbfV++x9jNVWpXGc6nBMyoxwnAlrB3ASLFnFgLpciobrBzaTJtYS r/8ez5WVSrBpTmCepsLFZkQyeTScPpdF5lCBnnmbiFZycjG4UfKqHVmkLPsZNQg53N/d FKpMV4t2t5QF8LbPT/jSc9cgTbtR5ecmTumlZ9ACN4tz8aq7W0r3Nk6VC83JVke2IVYJ dxfIcrRlbC1u1cgHxRwhuAdphmsywPbzWE1+IOU54ZL93KTkWMfRZly3NblFHj5kYAPj weVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@rcombs.me header.s=google header.b=X84Ok0lj; 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 y11si30921742edc.377.2021.11.22.12.55.53; Mon, 22 Nov 2021 12:55:53 -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=X84Ok0lj; 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 17ECD68A8E7; Mon, 22 Nov 2021 22:53:55 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-il1-f172.google.com (mail-il1-f172.google.com [209.85.166.172]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 4E4A3689F59 for ; Mon, 22 Nov 2021 22:53:42 +0200 (EET) Received: by mail-il1-f172.google.com with SMTP id t8so9583763ilu.8 for ; Mon, 22 Nov 2021 12:53:42 -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=5BkYfYLit1/tWm0Ip0avOh412R4H0ZmbSSS6/YcUY+U=; b=X84Ok0ljNORpgzphvMC4qN8ky2Zb4tStMjMqCz/JQWR64xXSrNIAmd5qF1Cq3JlwPC cN33+6db7btDjkj1rWf8XPRLg0XDWH1WG4UI0bpz/dNheV+/rWeqwlKUpX1pzvtsCpe+ 85VScx68mSF2K9x0dtRXmR3hQSpOdPlXJOlt7UjiRVjK3yDtiWB3VNaR1XmtWarnMxwI hXO+eVFyKo1WT90MAtD7cQn36pj0upj42LrIPZ4tMzjghQuEAmVkHyXHbI9qebfQt5vj QuI26VdTaKckpbISBuPcrDlszf4Nio70d4Ld4N4wv+tmKp1xRR0SvWe2Ssxujo8g44Cl 5xUw== 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=5BkYfYLit1/tWm0Ip0avOh412R4H0ZmbSSS6/YcUY+U=; b=cwC9urjH9rXMIZqjYIcMoYsKBKPkWLlK3OPims59cP48+IIEA+Y2bVuCX/ldV4CEKW sPdlxAlWbXT7n08nfc6gFy3FuMfNN3V7LMVUpSqiI3hy6jGuSuzI/WGRjNJbLFxsA5hh dmPCqByvVYwxIoFMSHhljNcRMneJvaCVwtOhiwpMjqzT6T4n1wAc/6S6bRcAmx1zdKzf LpJOoBKn63dT2kUE5sge2h93Mf5rFHikw4drhBWmEXpstgCSgs/mjP7wX9hE5+tr9Tz/ aeUr8idNaXd43XUVKk6mOWt/tyfz6V+aMaW8fNCR5BPr3S+4FzLde9R/f69hP1DVBrV2 e/7A== X-Gm-Message-State: AOAM5307atZgZ1nSwt6GBxU2dSI7bQN7yPDTXm+5XAvPAJcWP7+xf680 7bO57j3V/5ZA3lphaII2yYRosQiN7NfTD+o= X-Received: by 2002:a05:6e02:219a:: with SMTP id j26mr16851436ila.323.1637614420646; Mon, 22 Nov 2021 12:53:40 -0800 (PST) Received: from rcombs-mbp.localdomain ([2601:243:2000:5ac:edf5:499:2479:42a8]) by smtp.gmail.com with ESMTPSA id b3sm3571580ile.26.2021.11.22.12.53.39 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 22 Nov 2021 12:53:40 -0800 (PST) From: rcombs To: ffmpeg-devel@ffmpeg.org Date: Mon, 22 Nov 2021 14:53:23 -0600 Message-Id: <20211122205330.43546-9-rcombs@rcombs.me> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211122205330.43546-1-rcombs@rcombs.me> References: <20211122205330.43546-1-rcombs@rcombs.me> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 09/16] lavc/hevcdec: support all color formats in videotoolbox hwaccel 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: OQTEyLo1pbGo --- libavcodec/hevcdec.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/libavcodec/hevcdec.c b/libavcodec/hevcdec.c index 3e19f4ebed..47c551237f 100644 --- a/libavcodec/hevcdec.c +++ b/libavcodec/hevcdec.c @@ -401,6 +401,10 @@ static enum AVPixelFormat get_format(HEVCContext *s, const HEVCSPS *sps) CONFIG_HEVC_VDPAU_HWACCEL) enum AVPixelFormat pix_fmts[HWACCEL_MAX + 2], *fmt = pix_fmts; +#if CONFIG_HEVC_VIDEOTOOLBOX_HWACCEL + *fmt++ = AV_PIX_FMT_VIDEOTOOLBOX; +#endif + switch (sps->pix_fmt) { case AV_PIX_FMT_YUV420P: case AV_PIX_FMT_YUVJ420P: @@ -419,9 +423,6 @@ static enum AVPixelFormat get_format(HEVCContext *s, const HEVCSPS *sps) #endif #if CONFIG_HEVC_NVDEC_HWACCEL *fmt++ = AV_PIX_FMT_CUDA; -#endif -#if CONFIG_HEVC_VIDEOTOOLBOX_HWACCEL - *fmt++ = AV_PIX_FMT_VIDEOTOOLBOX; #endif break; case AV_PIX_FMT_YUV420P10: @@ -435,9 +436,6 @@ static enum AVPixelFormat get_format(HEVCContext *s, const HEVCSPS *sps) #if CONFIG_HEVC_VAAPI_HWACCEL *fmt++ = AV_PIX_FMT_VAAPI; #endif -#if CONFIG_HEVC_VIDEOTOOLBOX_HWACCEL - *fmt++ = AV_PIX_FMT_VIDEOTOOLBOX; -#endif #if CONFIG_HEVC_VDPAU_HWACCEL *fmt++ = AV_PIX_FMT_VDPAU; #endif