From patchwork Sat Nov 13 21:09:09 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ridley Combs X-Patchwork-Id: 31402 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:d206:0:0:0:0:0 with SMTP id q6csp3679037iob; Sat, 13 Nov 2021 13:11:17 -0800 (PST) X-Google-Smtp-Source: ABdhPJzL7VcSe0/fJpj/O5Vc0axOB8SfL4oIlmPiqDvf27yjpuAw1Zr2fBBHu0hzQ1bGd1k/R3K2 X-Received: by 2002:a05:6402:4315:: with SMTP id m21mr36333741edc.54.1636837876937; Sat, 13 Nov 2021 13:11:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636837876; cv=none; d=google.com; s=arc-20160816; b=dvRYxpBX5E9GiRQ/83HZujeqeqPhpqXEv4j9pi5XjO1BQiltI0MJQADGBDX3OzkGLb d5OrJl2nXczJNlW0Iw+dRDZMyPbXBPp79c8k6NfevuMUuq3uiyaPuEBqgrJ13GdSDuV6 LVr+H74W9hwQOSsYlcDfgrA9kTWTX7LG8svtqOh1kr6/dVcQkNn4N5I7BMewtyWYRntP DtdDm4/W5FbAZ5Dd3Ed7JLgOF07ozmVXQhAgzRZwaQqdfoDlBWzPD6sLKuC2Hq2xVfpn yuKIwVDSjbLjccyxCVcewJnZoqTWLqJ7WN2C0/sQFp627pNcEK7a1zCjfjvPibZ9y3dL q/2Q== 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=6lVIrkMm6KPrqXeTn+IiiYDr4flZ0ORA+A5kcjYrrGo=; b=f2eG/TLPiXWaDd2jivU+txWietwHeT61DWwP8BXJWN4IdANzD+6eZCqlT+15ShX2vN 8y9KRxmfvcogFPJ7dn46IYc0StRFgOKeapPczBNpM4y7SXet9hufLM4SJ4qTJOzB6g7/ o1PyChoQvvBKPqUAaeNwZaM3wM+dhjejTD4h6F/EqApx7c6wcfYze3rkzomwJ1WXTNw3 YF9jTuPrNg0X1PZkoJsAiHkgWnY8yC7UEiHldnd2722LvAM1e+sB88TO7W/Q7rLrMNy/ ox0tNStSOrI5Y2UFPLChxDwAEgg+/sIbpHnbZlUv9epQAZ/Auz2xlUdSjid7rQTeLhOl C9ug== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@rcombs.me header.s=google header.b=lkl+HZDj; 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 z9si25037791edc.496.2021.11.13.13.11.16; Sat, 13 Nov 2021 13:11: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=lkl+HZDj; 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 32F4268AE96; Sat, 13 Nov 2021 23:09:40 +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 DFF2E68AE52 for ; Sat, 13 Nov 2021 23:09:28 +0200 (EET) Received: by mail-io1-f42.google.com with SMTP id e144so15848030iof.3 for ; Sat, 13 Nov 2021 13:09:28 -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=fII5PjthrjHamJsAyrtOHkH7y2pej7OdhiTi3QeFUd4=; b=lkl+HZDjsDYWzADakx+NsBgj2EAqehw7I6TIAs1ocX5usoSIZbouiDZGw115XCuHNE 9l+JyzIOM9js8O1oYCl2VFjVsV3Vsy3+qwDUurQIf6AjQIRZfLXSW6LCY38ZZ99sIqg0 Uwdevg2hGkzcCG0e7ShKsRl/nhGAYVrmpWspGeoYInMV12J0g9KlaMVKlHoAQiJBIQdL b+7U13DXarpdFKlA3ZRmnKIqYDVZMXmCUYIRps0qYtDSPKORmDoKOCK+9qe5PbLjv2eZ MW3AAR5cPrVQsFpQ+WrmRwUBGxFnEDNFg7oLro2qkAcuPqBUACr16ImtdcCg8Q4XaRsT a/4w== 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=fII5PjthrjHamJsAyrtOHkH7y2pej7OdhiTi3QeFUd4=; b=3BsjjGbuoNMUOmsc+OesNNpy25kSdYEUWDFsVxZVxcL+6ZHFposdApF+vja/V9CemC 1juXKio9s/jb6uPhPcEJWCyyz/UPZ+OkH+M1Y+4SwELpE2ryenvV1hAaHjlyQuwO5aFc saGnuHBAXeVVcVYxgOOqtIEAiY4ptqPYjGzIdjFvY0FzGvxDKM/kzYiSOVJI1ph2kehZ HkEMYAcOxG9vcf6ty8V7cv2aLLj3FFRe9l6gbaUJhMxcB4l/n0hOXBpEqlPGmvDd3VvF pjVjUKfgT6FSkIeMTXJ9vOfi8LBM0KQu6ZbTZoEVn0m1eT0+JXZDzvOGWXJ4W5fxP8Ox 6g+A== X-Gm-Message-State: AOAM530QfHp8BoITVISB3NIMDKFytiPQyZTSNytBHfBmtE45wtIcEhrQ mSjXcsk3+y4j9JEywNYJxbcM3L2pKiS66zA= X-Received: by 2002:a02:6064:: with SMTP id d36mr20252901jaf.80.1636837767358; Sat, 13 Nov 2021 13:09:27 -0800 (PST) Received: from rcombs-mbp.localdomain ([2601:243:2000:5ac:516:f322:7db9:ae0a]) by smtp.gmail.com with ESMTPSA id j23sm5243896iog.53.2021.11.13.13.09.26 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 13 Nov 2021 13:09:26 -0800 (PST) From: rcombs To: ffmpeg-devel@ffmpeg.org Date: Sat, 13 Nov 2021 15:09:09 -0600 Message-Id: <20211113210916.49167-8-rcombs@rcombs.me> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211113210916.49167-1-rcombs@rcombs.me> References: <20211113210916.49167-1-rcombs@rcombs.me> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 08/15] lavc/h264dec: 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: JknL+UlkJ5yT --- libavcodec/h264_slice.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c index 89ea16a57f..476a14d485 100644 --- a/libavcodec/h264_slice.c +++ b/libavcodec/h264_slice.c @@ -798,6 +798,10 @@ static enum AVPixelFormat get_pixel_format(H264Context *h, int force_callback) const enum AVPixelFormat *choices = pix_fmts; int i; +#if CONFIG_H264_VIDEOTOOLBOX_HWACCEL + *fmt++ = AV_PIX_FMT_VIDEOTOOLBOX; +#endif + switch (h->ps.sps->bit_depth_luma) { case 9: if (CHROMA444(h)) { @@ -872,9 +876,6 @@ static enum AVPixelFormat get_pixel_format(H264Context *h, int force_callback) #endif #if CONFIG_H264_VAAPI_HWACCEL *fmt++ = AV_PIX_FMT_VAAPI; -#endif -#if CONFIG_H264_VIDEOTOOLBOX_HWACCEL - *fmt++ = AV_PIX_FMT_VIDEOTOOLBOX; #endif if (h->avctx->codec->pix_fmts) choices = h->avctx->codec->pix_fmts;