diff mbox series

[v1,7/8] media: uapi: Init VP9 stateless decode params

Message ID 20220127025544.10854-8-yunfei.dong@mediatek.com (mailing list archive)
State New, archived
Headers show
Series support mt8195 decoder | expand

Commit Message

Yunfei Dong Jan. 27, 2022, 2:55 a.m. UTC
Init some of VP9 frame decode params to default value.

Signed-off-by: Yunfei Dong <yunfei.dong@mediatek.com>
---
 drivers/media/v4l2-core/v4l2-ctrls-core.c | 8 ++++++++
 1 file changed, 8 insertions(+)

Comments

Chen-Yu Tsai Jan. 27, 2022, 9:23 a.m. UTC | #1
Hi,

On Thu, Jan 27, 2022 at 10:56 AM Yunfei Dong <yunfei.dong@mediatek.com> wrote:
>
> Init some of VP9 frame decode params to default value.
>
> Signed-off-by: Yunfei Dong <yunfei.dong@mediatek.com>

Maybe add

Fixes: b88dbe38dca8 ("media: uapi: Add VP9 stateless decoder controls")

> ---
>  drivers/media/v4l2-core/v4l2-ctrls-core.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
>
> diff --git a/drivers/media/v4l2-core/v4l2-ctrls-core.c b/drivers/media/v4l2-core/v4l2-ctrls-core.c
> index 54abe5245dcc..b25c77b8a445 100644
> --- a/drivers/media/v4l2-core/v4l2-ctrls-core.c
> +++ b/drivers/media/v4l2-core/v4l2-ctrls-core.c
> @@ -112,6 +112,7 @@ static void std_init_compound(const struct v4l2_ctrl *ctrl, u32 idx,
>         struct v4l2_ctrl_mpeg2_picture *p_mpeg2_picture;
>         struct v4l2_ctrl_mpeg2_quantisation *p_mpeg2_quant;
>         struct v4l2_ctrl_vp8_frame *p_vp8_frame;
> +       struct v4l2_ctrl_vp9_frame *p_vp9_frame;
>         struct v4l2_ctrl_fwht_params *p_fwht_params;
>         void *p = ptr.p + idx * ctrl->elem_size;
>
> @@ -152,6 +153,13 @@ static void std_init_compound(const struct v4l2_ctrl *ctrl, u32 idx,
>                 p_vp8_frame = p;
>                 p_vp8_frame->num_dct_parts = 1;
>                 break;
> +       case V4L2_CTRL_TYPE_VP9_FRAME:
> +               p_vp9_frame = p;
> +               p_vp9_frame->profile = 0;
> +               p_vp9_frame->bit_depth = 8;
> +               p_vp9_frame->flags |= V4L2_VP9_FRAME_FLAG_X_SUBSAMPLING |
> +                       V4L2_VP9_FRAME_FLAG_Y_SUBSAMPLING;
> +               break;
>         case V4L2_CTRL_TYPE_FWHT_PARAMS:
>                 p_fwht_params = p;
>                 p_fwht_params->version = V4L2_FWHT_VERSION;
> --
> 2.25.1
>
AngeloGioacchino Del Regno Jan. 27, 2022, 10:35 a.m. UTC | #2
Il 27/01/22 03:55, Yunfei Dong ha scritto:
> Init some of VP9 frame decode params to default value.
> 
> Signed-off-by: Yunfei Dong <yunfei.dong@mediatek.com>

Hello Yunfei,

This patch is not strictly related to MediaTek SoCs, since it's
modfying v4l2-core.
Can you please send this patch separately?

Thanks,
Angelo

> ---
>   drivers/media/v4l2-core/v4l2-ctrls-core.c | 8 ++++++++
>   1 file changed, 8 insertions(+)
> 
> diff --git a/drivers/media/v4l2-core/v4l2-ctrls-core.c b/drivers/media/v4l2-core/v4l2-ctrls-core.c
> index 54abe5245dcc..b25c77b8a445 100644
> --- a/drivers/media/v4l2-core/v4l2-ctrls-core.c
> +++ b/drivers/media/v4l2-core/v4l2-ctrls-core.c
> @@ -112,6 +112,7 @@ static void std_init_compound(const struct v4l2_ctrl *ctrl, u32 idx,
>   	struct v4l2_ctrl_mpeg2_picture *p_mpeg2_picture;
>   	struct v4l2_ctrl_mpeg2_quantisation *p_mpeg2_quant;
>   	struct v4l2_ctrl_vp8_frame *p_vp8_frame;
> +	struct v4l2_ctrl_vp9_frame *p_vp9_frame;
>   	struct v4l2_ctrl_fwht_params *p_fwht_params;
>   	void *p = ptr.p + idx * ctrl->elem_size;
>   
> @@ -152,6 +153,13 @@ static void std_init_compound(const struct v4l2_ctrl *ctrl, u32 idx,
>   		p_vp8_frame = p;
>   		p_vp8_frame->num_dct_parts = 1;
>   		break;
> +	case V4L2_CTRL_TYPE_VP9_FRAME:
> +		p_vp9_frame = p;
> +		p_vp9_frame->profile = 0;
> +		p_vp9_frame->bit_depth = 8;
> +		p_vp9_frame->flags |= V4L2_VP9_FRAME_FLAG_X_SUBSAMPLING |
> +			V4L2_VP9_FRAME_FLAG_Y_SUBSAMPLING;
> +		break;
>   	case V4L2_CTRL_TYPE_FWHT_PARAMS:
>   		p_fwht_params = p;
>   		p_fwht_params->version = V4L2_FWHT_VERSION;
>
Yunfei Dong Jan. 28, 2022, 3:28 a.m. UTC | #3
Hi Chen-Yu,

Thanks for your suggestion.
Send this patch again.
On Thu, 2022-01-27 at 17:23 +0800, Chen-Yu Tsai wrote:
> Hi,
> 
> On Thu, Jan 27, 2022 at 10:56 AM Yunfei Dong <
> yunfei.dong@mediatek.com> wrote:
> > 
> > Init some of VP9 frame decode params to default value.
> > 
> > Signed-off-by: Yunfei Dong <yunfei.dong@mediatek.com>
> 
> Maybe add
> 
> Fixes: b88dbe38dca8 ("media: uapi: Add VP9 stateless decoder
> controls")
> 
Best Regards,
Yunfei Dong
> > ---
> >  drivers/media/v4l2-core/v4l2-ctrls-core.c | 8 ++++++++
> >  1 file changed, 8 insertions(+)
> > 
> > diff --git a/drivers/media/v4l2-core/v4l2-ctrls-core.c
> > b/drivers/media/v4l2-core/v4l2-ctrls-core.c
> > index 54abe5245dcc..b25c77b8a445 100644
> > --- a/drivers/media/v4l2-core/v4l2-ctrls-core.c
> > +++ b/drivers/media/v4l2-core/v4l2-ctrls-core.c
> > @@ -112,6 +112,7 @@ static void std_init_compound(const struct
> > v4l2_ctrl *ctrl, u32 idx,
> >         struct v4l2_ctrl_mpeg2_picture *p_mpeg2_picture;
> >         struct v4l2_ctrl_mpeg2_quantisation *p_mpeg2_quant;
> >         struct v4l2_ctrl_vp8_frame *p_vp8_frame;
> > +       struct v4l2_ctrl_vp9_frame *p_vp9_frame;
> >         struct v4l2_ctrl_fwht_params *p_fwht_params;
> >         void *p = ptr.p + idx * ctrl->elem_size;
> > 
> > @@ -152,6 +153,13 @@ static void std_init_compound(const struct
> > v4l2_ctrl *ctrl, u32 idx,
> >                 p_vp8_frame = p;
> >                 p_vp8_frame->num_dct_parts = 1;
> >                 break;
> > +       case V4L2_CTRL_TYPE_VP9_FRAME:
> > +               p_vp9_frame = p;
> > +               p_vp9_frame->profile = 0;
> > +               p_vp9_frame->bit_depth = 8;
> > +               p_vp9_frame->flags |=
> > V4L2_VP9_FRAME_FLAG_X_SUBSAMPLING |
> > +                       V4L2_VP9_FRAME_FLAG_Y_SUBSAMPLING;
> > +               break;
> >         case V4L2_CTRL_TYPE_FWHT_PARAMS:
> >                 p_fwht_params = p;
> >                 p_fwht_params->version = V4L2_FWHT_VERSION;
> > --
> > 2.25.1
> >
Yunfei Dong Jan. 28, 2022, 3:29 a.m. UTC | #4
Hi AngeloGioacchino,

Thanks for your suggestion,

Separate this patch with mt8195 support, and sent it again.
On Thu, 2022-01-27 at 11:35 +0100, AngeloGioacchino Del Regno wrote:
> Il 27/01/22 03:55, Yunfei Dong ha scritto:
> > Init some of VP9 frame decode params to default value.
> > 
> > Signed-off-by: Yunfei Dong <yunfei.dong@mediatek.com>
> 
> Hello Yunfei,
> 
> This patch is not strictly related to MediaTek SoCs, since it's
> modfying v4l2-core.
> Can you please send this patch separately?
> 
> Thanks,
> Angelo
> 
Best Regards,
Yunfei Dong
> > ---
> >   drivers/media/v4l2-core/v4l2-ctrls-core.c | 8 ++++++++
> >   1 file changed, 8 insertions(+)
> > 
> > diff --git a/drivers/media/v4l2-core/v4l2-ctrls-core.c
> > b/drivers/media/v4l2-core/v4l2-ctrls-core.c
> > index 54abe5245dcc..b25c77b8a445 100644
> > --- a/drivers/media/v4l2-core/v4l2-ctrls-core.c
> > +++ b/drivers/media/v4l2-core/v4l2-ctrls-core.c
> > @@ -112,6 +112,7 @@ static void std_init_compound(const struct
> > v4l2_ctrl *ctrl, u32 idx,
> >   	struct v4l2_ctrl_mpeg2_picture *p_mpeg2_picture;
> >   	struct v4l2_ctrl_mpeg2_quantisation *p_mpeg2_quant;
> >   	struct v4l2_ctrl_vp8_frame *p_vp8_frame;
> > +	struct v4l2_ctrl_vp9_frame *p_vp9_frame;
> >   	struct v4l2_ctrl_fwht_params *p_fwht_params;
> >   	void *p = ptr.p + idx * ctrl->elem_size;
> >   
> > @@ -152,6 +153,13 @@ static void std_init_compound(const struct
> > v4l2_ctrl *ctrl, u32 idx,
> >   		p_vp8_frame = p;
> >   		p_vp8_frame->num_dct_parts = 1;
> >   		break;
> > +	case V4L2_CTRL_TYPE_VP9_FRAME:
> > +		p_vp9_frame = p;
> > +		p_vp9_frame->profile = 0;
> > +		p_vp9_frame->bit_depth = 8;
> > +		p_vp9_frame->flags |= V4L2_VP9_FRAME_FLAG_X_SUBSAMPLING
> > |
> > +			V4L2_VP9_FRAME_FLAG_Y_SUBSAMPLING;
> > +		break;
> >   	case V4L2_CTRL_TYPE_FWHT_PARAMS:
> >   		p_fwht_params = p;
> >   		p_fwht_params->version = V4L2_FWHT_VERSION;
> > 
> 
>
diff mbox series

Patch

diff --git a/drivers/media/v4l2-core/v4l2-ctrls-core.c b/drivers/media/v4l2-core/v4l2-ctrls-core.c
index 54abe5245dcc..b25c77b8a445 100644
--- a/drivers/media/v4l2-core/v4l2-ctrls-core.c
+++ b/drivers/media/v4l2-core/v4l2-ctrls-core.c
@@ -112,6 +112,7 @@  static void std_init_compound(const struct v4l2_ctrl *ctrl, u32 idx,
 	struct v4l2_ctrl_mpeg2_picture *p_mpeg2_picture;
 	struct v4l2_ctrl_mpeg2_quantisation *p_mpeg2_quant;
 	struct v4l2_ctrl_vp8_frame *p_vp8_frame;
+	struct v4l2_ctrl_vp9_frame *p_vp9_frame;
 	struct v4l2_ctrl_fwht_params *p_fwht_params;
 	void *p = ptr.p + idx * ctrl->elem_size;
 
@@ -152,6 +153,13 @@  static void std_init_compound(const struct v4l2_ctrl *ctrl, u32 idx,
 		p_vp8_frame = p;
 		p_vp8_frame->num_dct_parts = 1;
 		break;
+	case V4L2_CTRL_TYPE_VP9_FRAME:
+		p_vp9_frame = p;
+		p_vp9_frame->profile = 0;
+		p_vp9_frame->bit_depth = 8;
+		p_vp9_frame->flags |= V4L2_VP9_FRAME_FLAG_X_SUBSAMPLING |
+			V4L2_VP9_FRAME_FLAG_Y_SUBSAMPLING;
+		break;
 	case V4L2_CTRL_TYPE_FWHT_PARAMS:
 		p_fwht_params = p;
 		p_fwht_params->version = V4L2_FWHT_VERSION;