From patchwork Mon Nov 9 16:22:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emmanuel Gil Peyrot X-Patchwork-Id: 68759 X-Patchwork-Delegate: hverkuil@xs4all.nl Received: from vger.kernel.org ([23.128.96.18]) by www.linuxtv.org with esmtp (Exim 4.92) (envelope-from ) id 1kcC3J-004jV5-NE; Mon, 09 Nov 2020 18:38:06 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729533AbgKISiE (ORCPT + 1 other); Mon, 9 Nov 2020 13:38:04 -0500 Received: from 82-65-109-163.subs.proxad.net ([82.65.109.163]:40196 "EHLO luna.linkmauve.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729243AbgKISiE (ORCPT ); Mon, 9 Nov 2020 13:38:04 -0500 Received: by luna.linkmauve.fr (Postfix, from userid 1000) id E561EF41591; Mon, 9 Nov 2020 17:23:08 +0100 (CET) From: Emmanuel Gil Peyrot To: Ezequiel Garcia , Philipp Zabel , Mauro Carvalho Chehab , Greg Kroah-Hartman , linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Cc: Emmanuel Gil Peyrot Subject: [RESEND PATCH 1/2] media: uapi: Expose VP8 probability lengths as defines Date: Mon, 9 Nov 2020 17:22:43 +0100 Message-Id: <20201109162244.16531-2-linkmauve@linkmauve.fr> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201109162244.16531-1-linkmauve@linkmauve.fr> References: <20201109162244.16531-1-linkmauve@linkmauve.fr> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-LSpam-Score: -2.4 (--) X-LSpam-Report: No, score=-2.4 required=5.0 tests=BAYES_00=-1.9,HEADER_FROM_DIFFERENT_DOMAINS=0.5,MAILING_LIST_MULTI=-1 autolearn=ham autolearn_force=no These values will be used by various drivers implementing the VP8 stateless API. This had been suggested by Ezequiel Garcia for the Cedrus VP8 driver. Signed-off-by: Emmanuel Gil Peyrot --- include/media/vp8-ctrls.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/media/vp8-ctrls.h b/include/media/vp8-ctrls.h index 53cba826e482..a920493361dc 100644 --- a/include/media/vp8-ctrls.h +++ b/include/media/vp8-ctrls.h @@ -53,11 +53,13 @@ struct v4l2_vp8_quantization_header { __u16 padding; }; +#define V4L2_VP8_COEFF_PROB_CNT 11 +#define V4L2_VP8_MV_PROB_CNT 19 struct v4l2_vp8_entropy_header { - __u8 coeff_probs[4][8][3][11]; + __u8 coeff_probs[4][8][3][V4L2_VP8_COEFF_PROB_CNT]; __u8 y_mode_probs[4]; __u8 uv_mode_probs[3]; - __u8 mv_probs[2][19]; + __u8 mv_probs[2][V4L2_VP8_MV_PROB_CNT]; __u8 padding[3]; }; From patchwork Mon Nov 9 16:22:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emmanuel Gil Peyrot X-Patchwork-Id: 68762 X-Patchwork-Delegate: hverkuil@xs4all.nl Received: from vger.kernel.org ([23.128.96.18]) by www.linuxtv.org with esmtp (Exim 4.92) (envelope-from ) id 1kcC3R-004jWL-JW; Mon, 09 Nov 2020 18:38:13 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730269AbgKISiI (ORCPT + 1 other); Mon, 9 Nov 2020 13:38:08 -0500 Received: from 82-65-109-163.subs.proxad.net ([82.65.109.163]:40198 "EHLO luna.linkmauve.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729491AbgKISiF (ORCPT ); Mon, 9 Nov 2020 13:38:05 -0500 Received: by luna.linkmauve.fr (Postfix, from userid 1000) id EA159F41592; Mon, 9 Nov 2020 17:23:10 +0100 (CET) From: Emmanuel Gil Peyrot To: Ezequiel Garcia , Philipp Zabel , Mauro Carvalho Chehab , Greg Kroah-Hartman , linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Cc: Emmanuel Gil Peyrot Subject: [RESEND PATCH 2/2] media: hantro: Use VP8 lengths defined in uapi Date: Mon, 9 Nov 2020 17:22:44 +0100 Message-Id: <20201109162244.16531-3-linkmauve@linkmauve.fr> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201109162244.16531-1-linkmauve@linkmauve.fr> References: <20201109162244.16531-1-linkmauve@linkmauve.fr> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-LSpam-Score: -2.4 (--) X-LSpam-Report: No, score=-2.4 required=5.0 tests=BAYES_00=-1.9,HEADER_FROM_DIFFERENT_DOMAINS=0.5,MAILING_LIST_MULTI=-1 autolearn=ham autolearn_force=no Signed-off-by: Emmanuel Gil Peyrot --- drivers/staging/media/hantro/hantro_vp8.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/media/hantro/hantro_vp8.c b/drivers/staging/media/hantro/hantro_vp8.c index 0e02d147b189..91ec9a05645b 100644 --- a/drivers/staging/media/hantro/hantro_vp8.c +++ b/drivers/staging/media/hantro/hantro_vp8.c @@ -23,11 +23,11 @@ struct vp8_prob_tbl_packed { u8 padding1; /* mv prob */ - u8 prob_mv_context[2][19]; + u8 prob_mv_context[2][V4L2_VP8_MV_PROB_CNT]; u8 padding2[2]; /* coeff probs */ - u8 prob_coeffs[4][8][3][11]; + u8 prob_coeffs[4][8][3][V4L2_VP8_COEFF_PROB_CNT]; u8 padding3[96]; };