From patchwork Mon Nov 22 20:53: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: 31527 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:d206:0:0:0:0:0 with SMTP id q6csp7584206iob; Mon, 22 Nov 2021 12:55:30 -0800 (PST) X-Google-Smtp-Source: ABdhPJw+fHVYjZgqwj4e5sJjlZPf5yiRylfBzURUW6QEO4pkg5nfZ/xt8ZACEFuaiH9+7xAkIVm0 X-Received: by 2002:a17:906:6bc4:: with SMTP id t4mr79301ejs.259.1637614530147; Mon, 22 Nov 2021 12:55:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1637614530; cv=none; d=google.com; s=arc-20160816; b=MEtlhvAS6j5ZcHogkDUz25UH4tRXJtKBZK/pnaxkEZtn9eqXUAfiumTBQ3OGM06zkI tAZdJN20iV7jiOYv1b2Bm4YZAdEmQeAdShi3yRPaMyjC4weR0GbFrGtWZfvECbkVhjYY cgFysYcEald5/Woy39eTWirxEc8JxaW/urV0IkeIPpAPcso6VPzjVVe7UcGyIfY0ggqn RjgU6HZ8dhjAXRrchEvEWeNYT36eHv2dsXGQLNGnPMgrsWSd7Wj0XyKZTgaA0PQxQcj4 45jnRHxpHcy4azUY+irp62qdedpUSt9VGGcVBP91jTphE/QguMlnhCRmhcie1V3OKpbK QCzQ== 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=rZ0xnsPV90GQ4obuvyfsL+5QLDnrW30/nxh9CQOQH0PxutPXhdHvs7gKpMiCNSkh76 R11c0s/vywNsPLYbuIL5ny0n/ZDTExj71qcmh033LZn3FIfG7rIQz8Fqot3x4PfZ7kzC xtQBmZPSGrt48MWnU8XDfUovn36hKYK6FHXUk+ySbaIiDDk2yhlqxqcuU2Cw6SLaE9fn B80/ULxfHFAO4+7ylbtR+E9i0r74/2PtNlwVq/iTNMODNAs4m1o2sE6ZpboQR9opc8Gl mNVDiiMj2dK4NeSj6cOru61+KN5MrtkH3dQhdbRCbKWTNQ12LZd0Z8qz4onirTi2WVIU XHAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@rcombs.me header.s=google header.b=MkXJz5sA; 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 b13si33887610edz.495.2021.11.22.12.55.29; Mon, 22 Nov 2021 12:55:30 -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=MkXJz5sA; 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 37E3E68AC4D; Mon, 22 Nov 2021 22:53:53 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-il1-f176.google.com (mail-il1-f176.google.com [209.85.166.176]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 5805E68A44C for ; Mon, 22 Nov 2021 22:53:41 +0200 (EET) Received: by mail-il1-f176.google.com with SMTP id t8so9583715ilu.8 for ; Mon, 22 Nov 2021 12:53:41 -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=MkXJz5sAzFhuD88Efo6FS2dtsJQKxGPZFvq+LRXp6BXpU/TZyaczeAlfCZF46Dkf6a yoBFM0r02XoxfhtrtjR0ti0R1RqxsMn98ageMTWc26eEoGi3cY4NWCBJDLFAHIqWODXG 95RBSxnxQeoun1gOOdTa0q80UcAriV/vUy3lCGSYwNpXffYY+PcYrcNs22cGi8Dt7gal dWHvCIN3ZJH7lL6Fdthc/KXS7b4awOUNABmuebWVrfh/Z/fvkXRsAGvqjzGpSnaxaS1S J+JHSnL0bHFXv7MuydLFCj3ov+cj+S8ykxWtgBb/kME6PRlaLO22A49QkFbBEOCO2+S4 9oNQ== 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=bVLWqEFGqfKkUZ9kPDIfyHwVjAiDqXLaL78fYYtS/KlSjO8xby76WhUw1j6uhetRAu g8gHfU/X5JFNx7RUIgKfO0fCr2KXDxMD04msq1Eo/ls+NVY3tgteooIr2KraOZxuIybl WR3kMm/6FJeRzr57Zn6EPoXTeQG18b4NmEAJ3UWU2EOUf25TkDrBkgTXIwzUVGpPhs7L /317RU6P86KAsJQ9Yl21HstyGaL4lr57BiGQIQPrsCjFQvHhQq1osw9Hllztk42RDXog AMwSllSNB1Hu/m4iEpxm+TKV0K2QTsRd7i4V4bDSSZGNnKsS0s+z9X4UEEw60dhoaiMX OCIw== X-Gm-Message-State: AOAM533s95ue9P7bP0rFVosMj1KznfClOhperhd2TPzKHRMlY47KOf31 g/GzizNnn+CCDxys3apuyKdnw0hBfgy1280= X-Received: by 2002:a05:6e02:1541:: with SMTP id j1mr21493057ilu.177.1637614419768; Mon, 22 Nov 2021 12:53:39 -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:39 -0800 (PST) From: rcombs To: ffmpeg-devel@ffmpeg.org Date: Mon, 22 Nov 2021 14:53:22 -0600 Message-Id: <20211122205330.43546-8-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 08/16] 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: RXlJNRX0V0zH --- 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;