From mboxrd@z Thu Jan 1 00:00:00 1970 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 EAB14C27C4F for ; Tue, 18 Jun 2024 12:39:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=mMFnTIL2NbAMkawRaCwc8qPLaXPnK3k4bID5sKv9t60=; b=xxb5ENcsxCjoVqMicMCZN2qzzP hON/DUBTbxi7igsUnrnoEOgfMDcjWfzxPDA2Z+QezAVqbSIhbCwzMa8+pE8C2o1cn7p+GXlXtZuZj YKDU3EDeGqai0gLC2whtennIwacBKn0rQAEoCW1JphdVz+fiVA6lFYfpq38rz0k1gma01NCO7Rt8+ ThiMankqq5wfWPceRKxB2ENdG8p6YRk7I4vXUo/3ocGEugNeqIdZx5WnlULG5I3klXrJ5x4nKqxtr YyMfqyi7bl7sZ/BlUjJWAcifB5rV2J0/r5Ey6NNV2/J00OCOANeoVSc3qDZZZQXtDNH6UN5gVWdVj rUEKdWMQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sJY7k-0000000Euyc-32Zv; Tue, 18 Jun 2024 12:39:44 +0000 Received: from madrid.collaboradmins.com ([46.235.227.194]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sJY7h-0000000EuxL-0FJc; Tue, 18 Jun 2024 12:39:42 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1718714377; bh=e+/mKXkRdPvjBlGr8XNXuV89ZJiYt/k+nMVYcqGYbKw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ykziTRJg5Cai9lwNaWd4iGmTspqKZ/8uEq0NJOinsUZaTJgQRSq9nxRGFRXZOYqmq YwhMr3wTp0AjvEfb9B3pBj5Vclj264bU9APaHtq6XukCY5kJ/RMHnx4x6lL79m9Wif S95liCtyqX19lDj8euZlkjQ1vHZwmmU8DQNQnTMf4B+jqI+K2+7YijGPS1Ew6GU0uL U2kd1m6VD36AVzTp6dKuDvLFaDKR7zhAPLkrEBQcMywh6jLNA7jwqN7tXuVpEsrSno lm7dympUxa9TLpwKZWHrL2SzRElJLcNHLAP49S39FbDGis4BWJTiT3TReI8UjdpWOX pYRom/Y1ib8gQ== Received: from arisu.localnet (cola.collaboradmins.com [195.201.22.229]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: detlev) by madrid.collaboradmins.com (Postfix) with ESMTPSA id B09F73780BDB; Tue, 18 Jun 2024 12:39:34 +0000 (UTC) From: Detlev Casanova To: Jianfeng Liu Cc: alchark@gmail.com, andy.yan@rock-chips.com, conor+dt@kernel.org, cristian.ciocaltea@collabora.com, devicetree@vger.kernel.org, didi.debian@cknow.org, dsimic@manjaro.org, gregkh@linuxfoundation.org, heiko@sntech.de, krzk+dt@kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-staging@lists.linux.dev, liujianfeng1994@gmail.com, mchehab@kernel.org, nicolas@ndufresne.ca, robh@kernel.org, sebastian.reichel@collabora.com Subject: Re: [PATCH 1/3] media: rockchip: Introduce the rkvdec2 driver Date: Tue, 18 Jun 2024 08:39:07 -0400 Message-ID: <4302165.yKVeVyVuyW@arisu> Organization: Collabora In-Reply-To: <20240618121329.79936-1-liujianfeng1994@gmail.com> References: <4116468.VLH7GnMWUR@arisu> <20240618121329.79936-1-liujianfeng1994@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart4472750.OBFZWjSADL"; micalg="pgp-sha256"; protocol="application/pgp-signature" X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240618_053941_291516_B685F0B4 X-CRM114-Status: GOOD ( 15.64 ) 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 --nextPart4472750.OBFZWjSADL Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii"; protected-headers="v1" From: Detlev Casanova To: Jianfeng Liu Subject: Re: [PATCH 1/3] media: rockchip: Introduce the rkvdec2 driver Date: Tue, 18 Jun 2024 08:39:07 -0400 Message-ID: <4302165.yKVeVyVuyW@arisu> Organization: Collabora In-Reply-To: <20240618121329.79936-1-liujianfeng1994@gmail.com> MIME-Version: 1.0 On Tuesday, June 18, 2024 8:13:29 A.M. EDT Jianfeng Liu wrote: > Hi Detlev, > > On Fri, 14 Jun 2024 21:56:27 -0400, Detlev Casanova wrote: > >+ .frmsize = { > >+ .min_width = 16, > >+ .max_width = 65520, > >+ .step_width = 16, > >+ .min_height = 16, > >+ .max_height = 65520, > >+ .step_height = 16, > >+ }, > > I think the min/max width/height are incorrect. From rockchip's TRM V1.0 > Part1 page 374, supported image size is 64x64 to 65472x65472. Page 374 shows the sizes for h265. h264 is the next table, where 16x16 and 65520x65520 is documented. > And my > chromium can't use rkvdec2 because min width/height are set to 16, which > > will cause error at here in rkvdec2_h264_validate_sps: > >+ if (width > ctx->coded_fmt.fmt.pix_mp.width || > >+ height > ctx->coded_fmt.fmt.pix_mp.height) > >+ return -EINVAL; > > width is 16, height is 32 while ctx->coded_fmt.fmt.pix_mp.width and > ctx->coded_fmt.fmt.pix_mp.height are both 16. Maybe if (!(sps->flags & V4L2_H264_SPS_FLAG_FRAME_MBS_ONLY)) height *= 2; is causing issues in this case, I can check. > After changing them to 64 my chromium can use rkvdec2 to decode h264 > videos now. > > Anyway many thanks to your amazing work! > > Best regards, > Jianfeng --nextPart4472750.OBFZWjSADL Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEonF9IvGrXNkDg+CX5EFKUk4x7bYFAmZxf+sACgkQ5EFKUk4x 7bYJOAf/Zme2uxfjX+cwsN758W5amw+QvLxn04CfI871RZj09w3zEbV6ZQ1ZYAPg mG4XI/KLEUI/tDA0AX6DvEkK0K81bxsoPx+NTzH7sMpeoyq52NtrscARBNUE+jrW hiMntPl1ZnnQub2q4K36Lvdiao7vdsM4xBQZC+bq2qo/CaaSY1KvJou6wsgMvug9 lVVfhHT9EO2bpYntOpZgjJlleNCu6V1lN/b9VhKOFMxCAYhBKDMxXWnfJrx2J8sL ATZ68cdCoNSIC7xLlcMfOUzVM8lfTG/dvW8e+VLsoBBbX4FWll8Pk2wKC8r2/Sw8 /+doLEMSMZG4MUevBqAHFpjkXgkMbA== =KICS -----END PGP SIGNATURE----- --nextPart4472750.OBFZWjSADL--