From patchwork Mon Jun 20 17:55:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Jernej_=C5=A0krabec?= X-Patchwork-Id: 12888008 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E0D40C43334 for ; Mon, 20 Jun 2022 17:56:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=HFpcIjPOSaW35/8Pf5RRcX2l2ZIZuF+ruE6QWt1G9Po=; b=PbVRt/y6mQmhN/ UrPt1wy0ISYqpBzYrIZxSlfhJwkqIdvyhhUEoryrwmQMeSgPPDZn/wh8y7mdCN2/jxJNrM+qbhAZO wfBSt6hUEg2OedowGEXYIwpEqppDwlcOqDmqQ8niAXj3IjdWZhlzT0BFrn9exqQRi0x9ykjHRPO1k J5UtbBXufFRmEcqMOZ7VNDBgvAVeiySxbjRc9e8nigkzehCFQRZ+1CWgHBCJ7RaxxDdQlYGIReyFI tgeEWGylnz39tfHceI0kBJnmE81MVFM1XYdhhGAuOtYqAulcK+VZLR/0cQvs4jfd+MzTCUs4ubF/2 IPQYV70hZuph/LZ9RfAQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o3Lcg-001hRz-RU; Mon, 20 Jun 2022 17:55:39 +0000 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o3Lcb-001hP4-0y for linux-arm-kernel@lists.infradead.org; Mon, 20 Jun 2022 17:55:34 +0000 Received: by mail-wr1-x431.google.com with SMTP id i10so11943481wrc.0 for ; Mon, 20 Jun 2022 10:55:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=7Dx8kHYChInXA05yvjMTh5hDqDoL/JwqTYniVb/CEJw=; b=RWKEkdXq+lSk+dmdI6Iot8rAZyvslodnYkpKOvXWK2K1boPyqJvZE44FF88y2Emvbm +yXvUSTM8IH/gOAuYmyJYphk7VLlg7HcDGNSypDuEOXopHleVoqItdbjuY63AZUlEiKq eruxK5ScWYaLkwaR/E9jz8q8dmkHsUHfErc9XoD9L806hmBH7bC1TOB5kt1f2+K5PPHM YdpP1Gb/liecVdKNGquPCsbpStcSZrlH5QL27wGGjHxrEVclvULkCb07YHNXt1YaQIge Cj6PwnXTktHdBFWyPTrHDx2tW2JM7jmqXrLFwX8qtRxQTLXjrtYRrlwdMkAGuFZ3whhJ EesA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=7Dx8kHYChInXA05yvjMTh5hDqDoL/JwqTYniVb/CEJw=; b=EbJ8tWD07v+b4qwgqBQEw9ZUuV18tUH+p8BKmzKy82Minn/cJNCRDotewi3n3Tarqp Ws5Imq9BY1RXTw/xQcHZspO63ZInKhOORbAAxysV20YqspkhxMzXAyTtdlD+5PVciAS9 ZtwmmSI3fX03Mga0+5xCIgrJ1nXyol180x+sMe8kJRzUCX5oM57o1KqZ6ZRNZJYcHRzq Kwktia16mqr2QXMiAMkK66CqC2u37BAmb5uokrU+dgFhindVZxy0FoXcqvCXhllqSIym aJpgJcUg+p6ASrtS6PXx1EryHfdJO0U7FPAxP30eDfFPk4v98YxGfk+UW+8n26T3f/0g FT8A== X-Gm-Message-State: AJIora+xHH/hRl0BBGvMDZ3P3umPFIlTswAoRTGY1tyd0gixNQOdhVnO 5VpzwY2+q8i9uHWH9Z0UBEo= X-Google-Smtp-Source: AGRyM1tf6dHvP/4piBoIAhMdMxtYQKzRiL3AmGmYpf47aENlwuoGJoCvcq7wTdgbldWLXnoiTG8NnQ== X-Received: by 2002:a5d:5250:0:b0:21b:8b4e:ee54 with SMTP id k16-20020a5d5250000000b0021b8b4eee54mr9248694wrc.624.1655747729719; Mon, 20 Jun 2022 10:55:29 -0700 (PDT) Received: from kista.localdomain (213-161-3-76.dynamic.telemach.net. [213.161.3.76]) by smtp.gmail.com with ESMTPSA id 184-20020a1c02c1000000b0039db31f6372sm19620752wmc.2.2022.06.20.10.55.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Jun 2022 10:55:29 -0700 (PDT) From: Jernej Skrabec To: mripard@kernel.org, paul.kocialkowski@bootlin.com, wens@csie.org, samuel@sholland.org Cc: mchehab@kernel.org, gregkh@linuxfoundation.org, hverkuil-cisco@xs4all.nl, linux-media@vger.kernel.org, linux-staging@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, Jernej Skrabec Subject: [PATCH 0/7] media: cedrus: h265: Implement tiles support Date: Mon, 20 Jun 2022 19:55:10 +0200 Message-Id: <20220620175517.648767-1-jernej.skrabec@gmail.com> X-Mailer: git-send-email 2.36.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220620_105533_135494_0DBD2228 X-CRM114-Status: GOOD ( 12.50 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Now that we have full and stable HEVC uAPI, let's implement last big missing piece of HEVC in Cedrus - tiles support. This is done in last patch. Before that, there are bug fixes (patch 1 & 2, previously submitted separately in [1]), error handling improvements (patch 3, 4) and added helper for dealing with dynamic arrays (patch 5). These patches are based on top of [2]. Final fluster score with this series is 125/147. 11 bitstreams are MAIN10, which is not yet properly supported. 5 bitstreams need better memory management with auxiliary buffers (wip patches exists). 4 are too big and 2 probably fails due to ffmpeg implementation. Used ffmpeg source is in [3]. Note - Cedrus driver currently supports only one slice per request since HW takes data for 1 slice only. This can be improved by loading data for next slice automatically after HW signalled end of decoding. Something for later. Please take a look. Best regards, Jernej [1] https://patchwork.linuxtv.org/project/linux-media/list/?series=8187 [2] https://patchwork.linuxtv.org/project/linux-media/list/?series=8208 [3] https://github.com/jernejsk/FFmpeg/commits/hevc-mainline Jernej Skrabec (7): media: cedrus: h265: Fix flag name media: cedrus: h265: Fix logic for not low delay flag media: cedrus: Improve error messages for controls media: cedrus: Add error handling for failed setup media: cedrus: h265: Add a couple of error checks media: cedrus: Add helper for determining number of elements media: cedrus: h265: Implement support for tiles drivers/staging/media/sunxi/cedrus/cedrus.c | 28 +++- drivers/staging/media/sunxi/cedrus/cedrus.h | 7 +- .../staging/media/sunxi/cedrus/cedrus_dec.c | 25 ++- .../staging/media/sunxi/cedrus/cedrus_h264.c | 5 +- .../staging/media/sunxi/cedrus/cedrus_h265.c | 153 ++++++++++++++++-- .../staging/media/sunxi/cedrus/cedrus_mpeg2.c | 4 +- .../staging/media/sunxi/cedrus/cedrus_regs.h | 3 +- .../staging/media/sunxi/cedrus/cedrus_vp8.c | 5 +- 8 files changed, 204 insertions(+), 26 deletions(-)