From patchwork Wed Apr 10 12:42:17 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: ayaka X-Patchwork-Id: 10893811 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id F2BE41515 for ; Wed, 10 Apr 2019 12:42:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D62C226B39 for ; Wed, 10 Apr 2019 12:42:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CA3D3289D7; Wed, 10 Apr 2019 12:42:57 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 5E6D926B39 for ; Wed, 10 Apr 2019 12:42:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject: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=nbXyv9Q3zBaIPu4LUvTen1pB23mraTz0Nnv+OLQJbt4=; b=Gg/XuaPmDcFbuv vCNA9K7+1rMiS6/jsMAMMQuUkAKpiwWOO+5bdoUcld/J2bisYOnrXSbJnNZ6A6ntKiI5dU7Ajn61v fOMavokUGCxv59jqPN75nEPWCyI3veAr8LVmnXXFZO+CbLLmpHhIAHZaLVnJk+wq9bZb46GXil8E8 qjERS6DwVrJkzrV8+AGBOuOjpPGfchkRPfXbM6c4pLwYQnEbNZ/rA6720UGGBmHD/gKCSiHhLDbBR 1JYcrbwwL3cJJVpXK5Z9Q0mAzGFi/rcjiOKiRJavtDXEw5Nhq1KZzuW7JEwST2250PB37QcOyp+nr mcPspw+Bn1sZpINTgqHw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hECZ3-0002dv-Tm; Wed, 10 Apr 2019 12:42:53 +0000 Received: from kozue.soulik.info ([2001:19f0:7000:8404:5054:ff:fe75:428f]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hECYy-0002cn-IJ for linux-rockchip@lists.infradead.org; Wed, 10 Apr 2019 12:42:52 +0000 Received: from misaki.sumomo.pri (unknown [IPv6:2001:470:b30d:2:c604:15ff:0:401]) by kozue.soulik.info (Postfix) with ESMTPA id 6AE57100D71; Wed, 10 Apr 2019 21:43:24 +0900 (JST) From: ayaka To: linux-media@vger.kernel.org Subject: [PATCH v3 0/9] [WIP]: rockchip mpp for v4l2 video deocder Date: Wed, 10 Apr 2019 20:42:17 +0800 Message-Id: <20190410124226.8612-1-ayaka@soulik.info> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190410_054249_843699_06DB5CD9 X-CRM114-Status: UNSURE ( 9.64 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: paul.kocialkowski@bootlin.com, maxime.ripard@bootlin.com, joro@8bytes.org, Randy 'ayaka' Li , randy.li@rock-chips.com, jernej.skrabec@gmail.com, nicolas@ndufresne.ca, hverkuil@xs4all.nl, linux-rockchip@lists.infradead.org, thomas.petazzoni@bootlin.com, groeck@chromium.org, mchehab@kernel.org, ezequiel@collabora.com, posciak@chromium.org Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Randy 'ayaka' Li Although I really hate the bitstream construction in kernel and I think many people realise its problems, I still take the advise from ndufresne to release this version. This should be released in a early week but I was sick that time. After reviewed the documents from Rockchip and I have confirmed that with some rockchip staff, those documents are not update to date. So you may find some part is different comparing to official document. The v4l2-request-test from bootlin won't work. Its slice data doesn't have a start code which making it not a complete nal unit. And I found its slice header information may not be correct. Even comparing to the Big buck bunny's origin files, neither the slice data nor sequence information matches. I extracted a slice data from Rockchip mpp to verify my driver, it work fine, you can find it on my github. I only verified the I slice now, I have not verified P or B slice. Hopefully it would work. I have the same problem with v4l2-request-test on HEVC as well so even this version shipped with HEVC bitstream construction, I didn't know whether it would work. I need some time to prepare the userspace tool or it is really hard for HEVC to write slice info manually. Changlog v3: add AVC support for rkvdec v2: add MPEG-2 support for vdpu2 v1: inital version Randy Li (7): staging: video: rockchip: add v4l2 decoder rockchip: mpp: rkvdec: rbsp [WIP]: rockchip: mpp: HEVC decoder ctrl data [TEST]: rockchip: mpp: support qtable [TEST]: rockchip: mpp: vdpu2: move qtable to input buffer arm64: dts: rockchip: boost clocks for rk3328 arm64: dts: rockchip: add video codec for rk3328 ayaka (2): [WIP]: rockchip: mpp: H.264 decoder ctrl data [TEST]: rkvdec: spspps address alignment arch/arm64/boot/dts/rockchip/rk3328-evb.dts | 32 + .../arm64/boot/dts/rockchip/rk3328-rock64.dts | 32 + arch/arm64/boot/dts/rockchip/rk3328.dtsi | 112 +- drivers/staging/Kconfig | 2 + drivers/staging/Makefile | 1 + drivers/staging/rockchip-mpp/Kconfig | 33 + drivers/staging/rockchip-mpp/Makefile | 12 + drivers/staging/rockchip-mpp/mpp_debug.h | 87 + drivers/staging/rockchip-mpp/mpp_dev_common.c | 1390 +++++++ drivers/staging/rockchip-mpp/mpp_dev_common.h | 215 + drivers/staging/rockchip-mpp/mpp_dev_rkvdec.c | 924 +++++ drivers/staging/rockchip-mpp/mpp_dev_vdpu2.c | 607 +++ drivers/staging/rockchip-mpp/mpp_service.c | 197 + drivers/staging/rockchip-mpp/mpp_service.h | 38 + .../staging/rockchip-mpp/rkvdec/avc-data.c | 239 ++ .../staging/rockchip-mpp/rkvdec/avc-data.h | 40 + drivers/staging/rockchip-mpp/rkvdec/avc.c | 259 ++ drivers/staging/rockchip-mpp/rkvdec/cabac.h | 3614 +++++++++++++++++ drivers/staging/rockchip-mpp/rkvdec/hal.h | 70 + .../staging/rockchip-mpp/rkvdec/hevc-data.c | 208 + .../staging/rockchip-mpp/rkvdec/hevc-data.h | 27 + drivers/staging/rockchip-mpp/rkvdec/hevc.c | 169 + drivers/staging/rockchip-mpp/rkvdec/rbsp.c | 96 + drivers/staging/rockchip-mpp/rkvdec/rbsp.h | 30 + drivers/staging/rockchip-mpp/rkvdec/regs.h | 377 ++ drivers/staging/rockchip-mpp/vdpu2/avc.c | 165 + drivers/staging/rockchip-mpp/vdpu2/hal.h | 52 + drivers/staging/rockchip-mpp/vdpu2/mpeg2.c | 277 ++ drivers/staging/rockchip-mpp/vdpu2/regs.h | 670 +++ include/uapi/video/rk_vpu_service.h | 101 + 30 files changed, 10072 insertions(+), 4 deletions(-) create mode 100644 drivers/staging/rockchip-mpp/Kconfig create mode 100644 drivers/staging/rockchip-mpp/Makefile create mode 100644 drivers/staging/rockchip-mpp/mpp_debug.h create mode 100644 drivers/staging/rockchip-mpp/mpp_dev_common.c create mode 100644 drivers/staging/rockchip-mpp/mpp_dev_common.h create mode 100644 drivers/staging/rockchip-mpp/mpp_dev_rkvdec.c create mode 100644 drivers/staging/rockchip-mpp/mpp_dev_vdpu2.c create mode 100644 drivers/staging/rockchip-mpp/mpp_service.c create mode 100644 drivers/staging/rockchip-mpp/mpp_service.h create mode 100644 drivers/staging/rockchip-mpp/rkvdec/avc-data.c create mode 100644 drivers/staging/rockchip-mpp/rkvdec/avc-data.h create mode 100644 drivers/staging/rockchip-mpp/rkvdec/avc.c create mode 100644 drivers/staging/rockchip-mpp/rkvdec/cabac.h create mode 100644 drivers/staging/rockchip-mpp/rkvdec/hal.h create mode 100644 drivers/staging/rockchip-mpp/rkvdec/hevc-data.c create mode 100644 drivers/staging/rockchip-mpp/rkvdec/hevc-data.h create mode 100644 drivers/staging/rockchip-mpp/rkvdec/hevc.c create mode 100644 drivers/staging/rockchip-mpp/rkvdec/rbsp.c create mode 100644 drivers/staging/rockchip-mpp/rkvdec/rbsp.h create mode 100644 drivers/staging/rockchip-mpp/rkvdec/regs.h create mode 100644 drivers/staging/rockchip-mpp/vdpu2/avc.c create mode 100644 drivers/staging/rockchip-mpp/vdpu2/hal.h create mode 100644 drivers/staging/rockchip-mpp/vdpu2/mpeg2.c create mode 100644 drivers/staging/rockchip-mpp/vdpu2/regs.h create mode 100644 include/uapi/video/rk_vpu_service.h