From patchwork Fri Apr 14 01:55:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ming Qian X-Patchwork-Id: 13210834 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 4CA33C77B6F for ; Fri, 14 Apr 2023 02:13:03 +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=TphrhH1YDDdxfFFC8YDBvgrYhZYvHQ0rFsRY+XKuyok=; b=a+MfRpF4YO+sKi t38zIy6JFmqHWEsCx/U78UB1utQoGXzeiLn4O8+XaISRXEkS3WMJvZYmGksOlOuqOyO2S5zGJVMOY uZxRsQXH1i8YT5BPcjpc3cMoBme5A94o2j4nJAOcaqx6tylQo5LtYUxrur/ktpncNrQdcWHgHX+65 4v8LtwWNlEUg2yRxQq/ecxvonZtlUaNg2Rn6F7GsBTpt1uHCCDaPnr0U9nBLu5w2Jlc2TORTw8/pX TYC7KxBeU8VRhRmcuBRWVSWW+zrogiqP7rmpgWDfJrrTVCxaPmqlKj9fMflCtH5Mz/gJduoEt7Hnf TXJQtfONOaCEudlkyJTA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pn8vB-0085Ve-0Q; Fri, 14 Apr 2023 02:12:17 +0000 Received: from mail-db8eur05on2062f.outbound.protection.outlook.com ([2a01:111:f400:7e1a::62f] helo=EUR05-DB8-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pn8v5-0085To-03 for linux-arm-kernel@lists.infradead.org; Fri, 14 Apr 2023 02:12:12 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=c6cILiX4wXF9K41Hkq59e83/ZEsdfzhIem+tEY5qpIF6pN14+4nu980lLP61xACkT/aVD1OYoxqHTTdc/m1lcKhubfreG6j6VMeXiZ7Xm/fSc3eP7Jt6KVnybHTj4w3iNoKbXMhVjhEgoBoiaJLadGyP3KX+po1zaLyOeunvvoyQua5R59uMN5xRJOt46nGhXmeB3fi0e7zpfYSIb2LelMMjuKbDKiFJQMpke1oOgCbEsat0NIDMXDotbrRGXLymB6j0p9FIUuN4OtwVgcgStnjwSQb/KT0lVorFyz5sZ3b/pDl5+Vfp7EgZQc9XwZhkaylSA9CkdZTHCdbtWDY/Nw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Zk4IZ76MKU4M3xvdoZJ5jc+nIK0/ySTzVEZsnaSj4Eo=; b=LpqyWX4l5AZZLx3baF6vGhdsMDQVAYpPMX3H1ZNlPbpJjwCOmUvzG6/xK99SzLo40xubrNd1Hxlv2Wy8bIZC+wO+MlgSHFvTj9zl9+YikmP9YQbLEpANGx2vWSktzAVGv0eXyLHIa/mi3e4oK98lJcePnsLbWguOhPNJD6uumdCAfzBtO3Wqq+/ErG14jisj5fVRWRDPNnk1KRI/TC8nGmJ9wkbtCvDUVA5q4z3MzKz7YdyWC+E5SWTIlHZSHgeo1D2ECkAxY6PzrMNPwrtF920UxWrvZut6vjRtrTMSJbO2tvJ9E/AZ7ZadWSmf0+18ekwtEi0zwrNoan2cEqr0BA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Zk4IZ76MKU4M3xvdoZJ5jc+nIK0/ySTzVEZsnaSj4Eo=; b=RxAto07WQj8Cq3Kufz2JhgYOLcdsbG7l+MXwnVWpB3wJH+S+wwOZX7mZOoIDdhNCJ7x7xr+heCngGJRfIqJPuf5QOf4+V2gdC9rJLDSpDmAlprGBA9oIF/xd3V9TLRYBLP4xJpBTInOITmt8EZMJgibcMihlfOc3B39RfIxE8Dg= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from DB8PR04MB6346.eurprd04.prod.outlook.com (2603:10a6:10:10c::14) by PA4PR04MB9342.eurprd04.prod.outlook.com (2603:10a6:102:2a6::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6277.38; Fri, 14 Apr 2023 01:56:08 +0000 Received: from DB8PR04MB6346.eurprd04.prod.outlook.com ([fe80::632b:b1a2:25a1:d364]) by DB8PR04MB6346.eurprd04.prod.outlook.com ([fe80::632b:b1a2:25a1:d364%3]) with mapi id 15.20.6298.030; Fri, 14 Apr 2023 01:56:08 +0000 From: Ming Qian To: mchehab@kernel.org, hverkuil-cisco@xs4all.nl Cc: shawnguo@kernel.org, robh+dt@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, xiahong.bao@nxp.com, eagle.zhou@nxp.com, tao.jiang_2@nxp.com, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH] media: amphion: drop repeated codec data for vc1l format Date: Fri, 14 Apr 2023 09:55:42 +0800 Message-Id: <20230414015543.6580-1-ming.qian@nxp.com> X-Mailer: git-send-email 2.38.1 X-ClientProxiedBy: SI2P153CA0017.APCP153.PROD.OUTLOOK.COM (2603:1096:4:140::10) To DB8PR04MB6346.eurprd04.prod.outlook.com (2603:10a6:10:10c::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DB8PR04MB6346:EE_|PA4PR04MB9342:EE_ X-MS-Office365-Filtering-Correlation-Id: b34842ff-afb8-4866-e5b9-08db3c8b69cc X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: iR1HoQh9A8SoG0YBN864NZt2FCh1bTP1detjICHUqWw4IVNwC4kZpjM6WkKSZhioe9V8PpnsXkJEuhHClCNOKM5HT3RwWHwcns/uwTrsKVYbPSNGq2rXsSUDyIL2stGLWCmrjWoJ3aeboG7Nmia2eGq+NJ+lyR36Uva6r4Rz1Ps3Fj5Es2y7p8wzCRbfrbYcfL7YUW1ouZ7AeMomfRKfYT/EnFe+VtPiLtSujREkorW0twX9eNIwWROUoNsYML9G/oTlFZjblp/N2b+h15h6r/IpwgWvRu6U+WR3ow4SyQSBDTpj2Y/yuAu21i7PHg013aSdMFVpp6iMe1fZsDGbf1WUKyyebYxuE9IGnHLKqWzIYucKbYDz+sHuGHEl4qZx1zYnQ+ou2XjeLKHhRgQqAbn+3HxFY97SBVDKzEtsBRnwqyNhPSK3WjQkLMbAsVU06HxAokAlWsDX2qWIL6TdeL0IJ/xpebhX2Ezaex1hhQUA1MM6Z10ZqsJmr6gPtxnlX7zwCeAGkqC+GBES5M/GpsfXbf1HXO+LNoGyy94awshZIkZAEeTCi6TGWybYZsSj+spaYiVKhkGuw+CSyqX+5gQ1xU09iBW9nQGuD7nSvSsWoOYbdQPCh/bR5TveiwZohg+AMFUM54Z1vaPaGq5ZYiLtt359jnQ/ivPJKhQ3+sw= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DB8PR04MB6346.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(346002)(366004)(396003)(136003)(376002)(39860400002)(451199021)(478600001)(6512007)(52116002)(186003)(26005)(5660300002)(44832011)(6506007)(1076003)(2906002)(316002)(6666004)(4326008)(6486002)(66476007)(66946007)(66556008)(8676002)(8936002)(41300700001)(7416002)(83380400001)(38350700002)(36756003)(2616005)(38100700002)(86362001)(32563001)(357404004);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: rNaL1GAFuNVud+L4Nh24cZk7DgIVa2/S36s1WDnHzFKxQs6qWdUXATpoXrrg962qEq85CpiJvVAgTuAhiYlj8IJJ3IEKO7VbkOoxwx5ZprqBCntBXHhCSD+iQSkDw8VfH2HX1ispBR/NOICazefYdZ0NuiMaDAMxXMEzbYhaAn6AoxGJkoyTP15jYewfRHUVSeRDcT0eHnU4QWwLxvv4mPoS7+QMtICvy0xsJHeTB5h2WJUPXLb9HjbEU6l2+evCaE1qK4F6rFy/CpjwYHXIEVIZFAK/JmGdVYrFihnMteYTRTl6uAQfGiNpyiiSnBk/D/o3zmqrbzFbGmKVKBXYF3+vqp19iu+PmoqyaZReYTiryffH/rQaa6rZRS3EbvyXE3fczqxZ1MQjyICyQ4Z/TZtvrX+XhcdW5RSZjyuAFDUWCFyrlUDeWWct3KQFRKDycoirYbLbXqLqzu8P0azG7CEqS/dYDkHFNnqtU2oW9ukcv9p8g4i9WXqlpIuUNtM+ry32vo0JTOkCxZHDfxtXXiZzIXaVJCaHmnYU76186+vgHuHxlmKcdhtW1KBNG6aW7IAki5MXhB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9-08db3c8b69cc X-MS-Exchange-CrossTenant-AuthSource: DB8PR04MB6346.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Apr 2023 01:56:07.9515 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 32VLx44TrDgRQc+JfNysFFIsVL9WcAJLO0uUSxkojMUtL63cjAgScPJBkVy+65U9XJs+wJqqnIQmFP/2l5WoZA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR04MB9342 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230413_191211_058934_0A0A6070 X-CRM114-Status: GOOD ( 11.17 ) 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 For format V4L2_PIX_FMT_VC1_ANNEX_L, the codec data is replaced with startcode, and then driver drop it, otherwise it may led to decoding error. It's amphion vpu's limitation Driver has dropped the first codec data, but need to drop the repeated codec data too. Fixes: e670f5d672ef ("media: amphion: only insert the first sequence startcode for vc1l format") Signed-off-by: Ming Qian Tested-by: xiahong.bao --- drivers/media/platform/amphion/vpu_malone.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/media/platform/amphion/vpu_malone.c b/drivers/media/platform/amphion/vpu_malone.c index ef44bff9fbaf..e96994437429 100644 --- a/drivers/media/platform/amphion/vpu_malone.c +++ b/drivers/media/platform/amphion/vpu_malone.c @@ -1344,6 +1344,8 @@ static int vpu_malone_insert_scode_vc1_l_seq(struct malone_scode_t *scode) int size = 0; u8 rcv_seqhdr[MALONE_VC1_RCV_SEQ_HEADER_LEN]; + if (vpu_vb_is_codecconfig(to_vb2_v4l2_buffer(scode->vb))) + scode->need_data = 0; if (scode->inst->total_input_count) return 0; scode->need_data = 0;