linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RESEND PATCH 0/2] media: uapi: Expose VP8 probability lengths as defines
@ 2020-11-09 16:22 Emmanuel Gil Peyrot
  2020-11-09 16:22 ` [RESEND PATCH 1/2] " Emmanuel Gil Peyrot
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Emmanuel Gil Peyrot @ 2020-11-09 16:22 UTC (permalink / raw)
  To: Ezequiel Garcia, Philipp Zabel, Mauro Carvalho Chehab,
	Greg Kroah-Hartman, linux-media, linux-rockchip, devel,
	linux-kernel
  Cc: Emmanuel Gil Peyrot

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.

The only driver using this API (until now) has also been updated to use
these new defines.

This is a resend because I forgot to include most maintainers, sorry for
that.  It’s my very first patch to the kernel, I didn’t know about
scripts/get_maintainers.pl

Emmanuel Gil Peyrot (2):
  media: uapi: Expose probability lengths as defines
  media: hantro: Use VP8 lengths defined in uapi

 drivers/staging/media/hantro/hantro_vp8.c | 4 ++--
 include/media/vp8-ctrls.h                 | 6 ++++--
 2 files changed, 6 insertions(+), 4 deletions(-)

-- 
2.29.2


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [RESEND PATCH 1/2] media: uapi: Expose VP8 probability lengths as defines
  2020-11-09 16:22 [RESEND PATCH 0/2] media: uapi: Expose VP8 probability lengths as defines Emmanuel Gil Peyrot
@ 2020-11-09 16:22 ` Emmanuel Gil Peyrot
  2020-11-09 16:22 ` [RESEND PATCH 2/2] media: hantro: Use VP8 lengths defined in uapi Emmanuel Gil Peyrot
  2020-11-11  1:08 ` [RESEND PATCH 0/2] media: uapi: Expose VP8 probability lengths as defines Ezequiel Garcia
  2 siblings, 0 replies; 4+ messages in thread
From: Emmanuel Gil Peyrot @ 2020-11-09 16:22 UTC (permalink / raw)
  To: Ezequiel Garcia, Philipp Zabel, Mauro Carvalho Chehab,
	Greg Kroah-Hartman, linux-media, linux-rockchip, devel,
	linux-kernel
  Cc: Emmanuel Gil Peyrot

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 <linkmauve@linkmauve.fr>
---
 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];
 };
 
-- 
2.29.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [RESEND PATCH 2/2] media: hantro: Use VP8 lengths defined in uapi
  2020-11-09 16:22 [RESEND PATCH 0/2] media: uapi: Expose VP8 probability lengths as defines Emmanuel Gil Peyrot
  2020-11-09 16:22 ` [RESEND PATCH 1/2] " Emmanuel Gil Peyrot
@ 2020-11-09 16:22 ` Emmanuel Gil Peyrot
  2020-11-11  1:08 ` [RESEND PATCH 0/2] media: uapi: Expose VP8 probability lengths as defines Ezequiel Garcia
  2 siblings, 0 replies; 4+ messages in thread
From: Emmanuel Gil Peyrot @ 2020-11-09 16:22 UTC (permalink / raw)
  To: Ezequiel Garcia, Philipp Zabel, Mauro Carvalho Chehab,
	Greg Kroah-Hartman, linux-media, linux-rockchip, devel,
	linux-kernel
  Cc: Emmanuel Gil Peyrot

Signed-off-by: Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
---
 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];
 };
 
-- 
2.29.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [RESEND PATCH 0/2] media: uapi: Expose VP8 probability lengths as defines
  2020-11-09 16:22 [RESEND PATCH 0/2] media: uapi: Expose VP8 probability lengths as defines Emmanuel Gil Peyrot
  2020-11-09 16:22 ` [RESEND PATCH 1/2] " Emmanuel Gil Peyrot
  2020-11-09 16:22 ` [RESEND PATCH 2/2] media: hantro: Use VP8 lengths defined in uapi Emmanuel Gil Peyrot
@ 2020-11-11  1:08 ` Ezequiel Garcia
  2 siblings, 0 replies; 4+ messages in thread
From: Ezequiel Garcia @ 2020-11-11  1:08 UTC (permalink / raw)
  To: Emmanuel Gil Peyrot
  Cc: Ezequiel Garcia, Philipp Zabel, Mauro Carvalho Chehab,
	Greg Kroah-Hartman, linux-media, open list:ARM/Rockchip SoC...,
	devel, Linux Kernel Mailing List

Hi Emmanuel,

Thanks for the patch.

On Mon, 9 Nov 2020 at 15:37, Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> wrote:
>
> 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.
>
> The only driver using this API (until now) has also been updated to use
> these new defines.
>
> This is a resend because I forgot to include most maintainers, sorry for
> that.  It’s my very first patch to the kernel, I didn’t know about
> scripts/get_maintainers.pl
>

I haven't validated these two patches, but on a first look,
it seems it's a low-hanging fruit nice cleanup. Thanks for that!

Since it seems you are looking for interesting things to contribute,
note that the vp8-ctrls.h header is lacking some nice documentation
on each structure.

This should be done by looking at the VP8 syntax spec and documenting
things appropriately. See how it's done for H.264 and VP9:

https://patchwork.linuxtv.org/project/linux-media/patch/20200928201433.327068-1-ezequiel@collabora.com/
https://patchwork.kernel.org/project/linux-rockchip/patch/20201102190551.1223389-3-adrian.ratiu@collabora.com/

Thanks,
Ezequiel

> Emmanuel Gil Peyrot (2):
>   media: uapi: Expose probability lengths as defines
>   media: hantro: Use VP8 lengths defined in uapi
>
>  drivers/staging/media/hantro/hantro_vp8.c | 4 ++--
>  include/media/vp8-ctrls.h                 | 6 ++++--
>  2 files changed, 6 insertions(+), 4 deletions(-)
>
> --
> 2.29.2
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-11-11  1:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-09 16:22 [RESEND PATCH 0/2] media: uapi: Expose VP8 probability lengths as defines Emmanuel Gil Peyrot
2020-11-09 16:22 ` [RESEND PATCH 1/2] " Emmanuel Gil Peyrot
2020-11-09 16:22 ` [RESEND PATCH 2/2] media: hantro: Use VP8 lengths defined in uapi Emmanuel Gil Peyrot
2020-11-11  1:08 ` [RESEND PATCH 0/2] media: uapi: Expose VP8 probability lengths as defines Ezequiel Garcia

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).