Received: by 2002:ab2:3350:0:b0:1f4:6588:b3a7 with SMTP id o16csp1796602lqe; Mon, 8 Apr 2024 23:46:23 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUAKRIr70phWzPO2S2DUjMt5PXjF1l0muMaggaWwf07COgR0PnSBC0wD6bjr6ILYBqXkRYpJtMW4LnlzZQzNtKSrP5IiCjA2oHu4B4QOA== X-Google-Smtp-Source: AGHT+IGehzT2N7rmstD6vr4oq3rmg9xMEPgPARWA5Mmr0FgDVmWGKv0uMDXktyt5oO2GDyNpCdwF X-Received: by 2002:a17:903:22ce:b0:1e4:54d1:a159 with SMTP id y14-20020a17090322ce00b001e454d1a159mr3373019plg.47.1712645182831; Mon, 08 Apr 2024 23:46:22 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712645182; cv=pass; d=google.com; s=arc-20160816; b=i3FVfi05e88HXMWz5ULRgOwkEjVX1HpZGbZEQzQ/GCp3tdKlTULiwKTLNqyjYL0KBx WeFDtJ7YsKTUAJjKLsdum8dgbsW1XVXKFzeszWbxl5Bk9mwzOwH+EggT2M/y+cuYuFYL pAWUMByWzgO6lktJvmgIDY+D0qM2UvVyNO9LFase5IOS+mdzL9FsUvgsz1uTXPI3flj9 xgiVtk7YzdKOgf6kEwC1RlS7/7lQFKkaFi9czmJoYPJDrfApOmFQRf5RBkbm+Bm43ZBq B5UGWlVstz2xlHj7Cz89nO7NlyF4aLqMBz4PDVbBlfH/+bRMsdhtX9DZwX4Q/t4INnBf S08g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=1By4C96PsvcGaXtscQ2J2MMRcbf/nDmQwUtSXEsx0UU=; fh=63zJE2pkfcWKzZJsDz7t/ZccqFfmmvABwIdGm1GG2cc=; b=ErJ0PNmqsdEtKTibHDhrseQgM0cD2HWLiZwCL8xADLbNstdY7MKy6oksQq+93NV6wz b1+RMOcCElF88qekBiXMB+eafuhboD7pLPT67JGlHvg+0UdycTuMIQy62pnaqkYLoI8m 4mPIb9Ay2JZP/NKzppk2OnzXJQntz5XK6Fge5lFh77ANHS++mQi71rZczDj3j2rSQmYx iCEQhmIYjNM5hfEzPppAa0GwJgyz0vgiYQ/+fe7QK5CwMYpJCNpre6n/GNeCYP6QSoFI NdhMxVSlPMa4JqdnXoIIVZgC4G4WBAPKIxpTmHkcb1WSXS7f2aIbayO2/TjqKiPrWgyL j2zA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=lLBttngE; arc=pass (i=1 spf=pass spfdomain=mediatek.com dkim=pass dkdomain=mediatek.com dmarc=pass fromdomain=mediatek.com); spf=pass (google.com: domain of linux-kernel+bounces-136318-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-136318-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id lm12-20020a170903298c00b001e3d3ae4d74si6569278plb.28.2024.04.08.23.46.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Apr 2024 23:46:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-136318-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=lLBttngE; arc=pass (i=1 spf=pass spfdomain=mediatek.com dkim=pass dkdomain=mediatek.com dmarc=pass fromdomain=mediatek.com); spf=pass (google.com: domain of linux-kernel+bounces-136318-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-136318-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 735BFB23316 for ; Tue, 9 Apr 2024 06:45:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 378257C6E9; Tue, 9 Apr 2024 06:44:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b="lLBttngE" Received: from mailgw01.mediatek.com (unknown [60.244.123.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5BE14757F2; Tue, 9 Apr 2024 06:44:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=60.244.123.138 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712645090; cv=none; b=PRhm7/ET4OQne/uJ17kOJjpOBKADqDZffQjMbe7AZbpNpLlzIccQHnIIJpyVr3MEu5rTtxhc3ooS+/1ptI/r7v6oQaNCSBUc40OMswPxFqilrgF5HeDsEf4+vxafd2sNc/Vdq6HW0vBehiXfTCe7qi+15LzjMfuu8SA8EVLHcfY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712645090; c=relaxed/simple; bh=5GP1+BHoeHheZFdogUL8dW/blvK7u6Y7gZFK8nSf2nQ=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=UNxlAq6Zj+eMpI1kX87V5pGWhB+EM2xe5zVmEhFAiZF9pfTvY+5/xnpuYyRzlaI3jMGllwIjNLlQDerJsuqI2KK7qwinHEfsIqKcSZP6f/VoLepXR1UqJmdS+XaV9MzeYxlHJ7wceVdI75Ux7vtWG0QFuUhg2cXkaQ8yzk+yOgQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=mediatek.com; spf=pass smtp.mailfrom=mediatek.com; dkim=pass (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b=lLBttngE; arc=none smtp.client-ip=60.244.123.138 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=mediatek.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mediatek.com X-UUID: a1d9ce9cf63c11eeb8927bc1f75efef4-20240409 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Type:Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=1By4C96PsvcGaXtscQ2J2MMRcbf/nDmQwUtSXEsx0UU=; b=lLBttngEF8lq/8kSqW1Vrp8Fl8vDe//tE6YvFvnBHZKVAlhSkHF0VrIusL9W7OwX+xY2SiBO4vMS15sMD4jWA3exmnrRo0GINU3jPveJRXld/GkD4UjgvXWXecRtMMaB1maZxAwFVwwDBsyYbFV2K5/KsAf/6UN19bm1Q/e+sgE=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.37,REQID:decda469-c787-4dbc-ad66-6873950450d6,IP:0,U RL:0,TC:0,Content:0,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTION: release,TS:0 X-CID-META: VersionHash:6f543d0,CLOUDID:5f4a7482-4f93-4875-95e7-8c66ea833d57,B ulkID:nil,BulkQuantity:0,Recheck:0,SF:102,TC:nil,Content:0,EDM:-3,IP:nil,U RL:0,File:nil,RT:nil,Bulk:nil,QS:nil,BEC:nil,COL:0,OSI:0,OSA:0,AV:0,LES:1, SPR:NO,DKR:0,DKP:0,BRR:0,BRE:0 X-CID-BVR: 0,NGT X-CID-BAS: 0,NGT,0,_ X-CID-FACTOR: TF_CID_SPAM_SNR X-UUID: a1d9ce9cf63c11eeb8927bc1f75efef4-20240409 Received: from mtkmbs10n2.mediatek.inc [(172.21.101.183)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 1277947394; Tue, 09 Apr 2024 14:44:36 +0800 Received: from mtkmbs13n2.mediatek.inc (172.21.101.108) by mtkmbs13n2.mediatek.inc (172.21.101.108) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.26; Tue, 9 Apr 2024 14:44:35 +0800 Received: from mhfsdcap04.gcn.mediatek.inc (10.17.3.154) by mtkmbs13n2.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.1118.26 via Frontend Transport; Tue, 9 Apr 2024 14:44:34 +0800 From: Yunfei Dong To: =?UTF-8?q?N=C3=ADcolas=20F=20=2E=20R=20=2E=20A=20=2E=20Prado?= , Nicolas Dufresne , Hans Verkuil , AngeloGioacchino Del Regno , Benjamin Gaignard , Nathan Hebert , Sebastian Fricke CC: Hsin-Yi Wang , Fritz Koenig , Daniel Vetter , Steve Cho , Yunfei Dong , , , , , , Subject: [PATCH v2,3/5] media: mediatek: vcodec: add MM21 format definition Date: Tue, 9 Apr 2024 14:44:29 +0800 Message-ID: <20240409064431.16909-4-yunfei.dong@mediatek.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240409064431.16909-1-yunfei.dong@mediatek.com> References: <20240409064431.16909-1-yunfei.dong@mediatek.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-MTK: N Adding the definition of MM21 format to calculate bytesperline and sizeimage of plane[0] and plane[1]. Signed-off-by: Yunfei Dong --- drivers/media/v4l2-core/v4l2-common.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/media/v4l2-core/v4l2-common.c b/drivers/media/v4l2-core/v4l2-common.c index cef1492dba22..0d5de132e07f 100644 --- a/drivers/media/v4l2-core/v4l2-common.c +++ b/drivers/media/v4l2-core/v4l2-common.c @@ -269,6 +269,8 @@ const struct v4l2_format_info *v4l2_format_info(u32 format) .block_w = { 64, 64, 0, 0 }, .block_h = { 64, 64, 0, 0 }}, { .format = V4L2_PIX_FMT_MT2110R, .pixel_enc = V4L2_PIXEL_ENC_YUV, .mem_planes = 2, .comp_planes = 2, .bpp = { 5, 5, 0, 0 }, .bpp_div = { 4, 4, 1, 1 }, .hdiv = 1, .vdiv = 2, .block_w = { 64, 64, 0, 0 }, .block_h = { 64, 64, 0, 0 }}, + { .format = V4L2_PIX_FMT_MM21, .pixel_enc = V4L2_PIXEL_ENC_YUV, .mem_planes = 2, .comp_planes = 2, .bpp = { 1, 1, 0, 0 }, .bpp_div = { 1, 1, 1, 1 }, .hdiv = 1, .vdiv = 2, + .block_w = { 64, 64, 0, 0 }, .block_h = { 64, 64, 0, 0 }}, /* YUV planar formats */ { .format = V4L2_PIX_FMT_NV12, .pixel_enc = V4L2_PIXEL_ENC_YUV, .mem_planes = 1, .comp_planes = 2, .bpp = { 1, 2, 0, 0 }, .bpp_div = { 1, 1, 1, 1 }, .hdiv = 2, .vdiv = 2 }, -- 2.18.0