From nobody Fri Dec 19 17:34:35 2025 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BD09CC04A95 for ; Sat, 22 Oct 2022 08:12:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233169AbiJVIMJ (ORCPT ); Sat, 22 Oct 2022 04:12:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35456 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233444AbiJVIJv (ORCPT ); Sat, 22 Oct 2022 04:09:51 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B0D2F2AD9; Sat, 22 Oct 2022 00:54:23 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 42AD360B80; Sat, 22 Oct 2022 07:53:25 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 05368C433C1; Sat, 22 Oct 2022 07:53:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666425204; bh=07aoPt2PLdRmIbDV/BxqUEGxeJXB49RcibykP7o7QNU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ma0u69HycetUov90DbXV8HjuRd/BZ1HCAUetAEseUaxIkekKzOyZoMuHIeRjaiQe2 YTjlwUUVXG8jMnP5tt9LTRZTW2bGuomiIqJKxJUDro87Tsp3IrIRJukbzYfNKqKoKo FS3HAY8313KA9q9SGtmdVnRAOgN3c3PIOvh0IOr4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Ming Qian , Hans Verkuil , Mauro Carvalho Chehab , Sasha Levin Subject: [PATCH 5.19 396/717] media: amphion: insert picture startcode after seek for vc1g format Date: Sat, 22 Oct 2022 09:24:35 +0200 Message-Id: <20221022072515.335312598@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221022072415.034382448@linuxfoundation.org> References: <20221022072415.034382448@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Ming Qian [ Upstream commit f7fd6c318c8a5d06bf3fe611f30763d62eaaf7f0 ] For format vc1, the amphion vpu requires driver to help insert some custom startcode before sequence and frame. the startcode is different for vc1l and vc1g format. But the sequence startcode is only needed at the beginning, and it's not expected after seek. driver need to treat the codec header and the first frame after seek as a normal frame, and insert picture startcode for it. In previous patch, I just fix it for vc1l format, and should fix the similar issue for vc1g too. Fixes: e670f5d672ef (media: amphion: only insert the first sequence startco= de for vc1l format) Signed-off-by: Ming Qian Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Sasha Levin --- drivers/media/platform/amphion/vpu_malone.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/amphion/vpu_malone.c b/drivers/media/pl= atform/amphion/vpu_malone.c index 542bbe361bd8..10553dd93c29 100644 --- a/drivers/media/platform/amphion/vpu_malone.c +++ b/drivers/media/platform/amphion/vpu_malone.c @@ -1277,7 +1277,7 @@ static int vpu_malone_insert_scode_vc1_g_pic(struct m= alone_scode_t *scode) vbuf =3D to_vb2_v4l2_buffer(scode->vb); data =3D vb2_plane_vaddr(scode->vb, 0); =20 - if (vbuf->sequence =3D=3D 0 || vpu_vb_is_codecconfig(vbuf)) + if (scode->inst->total_input_count =3D=3D 0 || vpu_vb_is_codecconfig(vbuf= )) return 0; if (MALONE_VC1_CONTAIN_NAL(*data)) return 0; --=20 2.35.1