2022-07-12 12:40:29

by Viswanath Boma

[permalink] [raw]
Subject: [PATCH 1/7] venus : Add default values for the control V4L2_CID_COLORIMETRY_HDR10_MASTERING_DISPLAY

From: Stanimir Varbanov <[email protected]>

V4l2 encoder compliance expecting default values of colormetry for the control.

Change-Id: I1db0d4940b54e033d646ce39d60dc488afba8d58
Signed-off-by: Viswanath Boma <[email protected]>
---
drivers/media/platform/qcom/venus/venc_ctrls.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/media/platform/qcom/venus/venc_ctrls.c b/drivers/media/platform/qcom/venus/venc_ctrls.c
index ea5805e71c143..37ba7d97f99b2 100644
--- a/drivers/media/platform/qcom/venus/venc_ctrls.c
+++ b/drivers/media/platform/qcom/venus/venc_ctrls.c
@@ -352,6 +352,8 @@ static const struct v4l2_ctrl_ops venc_ctrl_ops = {
int venc_ctrl_init(struct venus_inst *inst)
{
int ret;
+ struct v4l2_ctrl_hdr10_mastering_display p_hdr10_mastering = { {34000, 13250, 7500 },
+ { 16000, 34500, 3000 }, 15635, 16450, 10000000, 500 };

ret = v4l2_ctrl_handler_init(&inst->ctrl_handler, 58);
if (ret)
@@ -580,7 +582,7 @@ int venc_ctrl_init(struct venus_inst *inst)

v4l2_ctrl_new_std_compound(&inst->ctrl_handler, &venc_ctrl_ops,
V4L2_CID_COLORIMETRY_HDR10_MASTERING_DISPLAY,
- v4l2_ctrl_ptr_create(NULL));
+ v4l2_ctrl_ptr_create((void *)&p_hdr10_mastering));

v4l2_ctrl_new_std(&inst->ctrl_handler, &venc_ctrl_ops,
V4L2_CID_MPEG_VIDEO_INTRA_REFRESH_PERIOD, 0,
--
2.17.1


2022-07-12 12:46:06

by Manivannan Sadhasivam

[permalink] [raw]
Subject: Re: [PATCH 1/7] venus : Add default values for the control V4L2_CID_COLORIMETRY_HDR10_MASTERING_DISPLAY

On Tue, Jul 12, 2022 at 05:53:41PM +0530, Viswanath Boma wrote:
> From: Stanimir Varbanov <[email protected]>
>
> V4l2 encoder compliance expecting default values of colormetry for the control.
>
> Change-Id: I1db0d4940b54e033d646ce39d60dc488afba8d58

What does this represent here? I'm pretty sure it is meaningless to the
upstream kernel, so please get rid of it.

> Signed-off-by: Viswanath Boma <[email protected]>

Since Stan is the original author of this and following patches, there
should be a s-o-b tag from him. After that you should add yours
indicating that you are carrying the patches from Stan.

Also, please add a cover letter stating the purpose of this series, how
it is tested, and with any other relevant information.

Thanks,
Mani

> ---
> drivers/media/platform/qcom/venus/venc_ctrls.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/media/platform/qcom/venus/venc_ctrls.c b/drivers/media/platform/qcom/venus/venc_ctrls.c
> index ea5805e71c143..37ba7d97f99b2 100644
> --- a/drivers/media/platform/qcom/venus/venc_ctrls.c
> +++ b/drivers/media/platform/qcom/venus/venc_ctrls.c
> @@ -352,6 +352,8 @@ static const struct v4l2_ctrl_ops venc_ctrl_ops = {
> int venc_ctrl_init(struct venus_inst *inst)
> {
> int ret;
> + struct v4l2_ctrl_hdr10_mastering_display p_hdr10_mastering = { {34000, 13250, 7500 },
> + { 16000, 34500, 3000 }, 15635, 16450, 10000000, 500 };
>
> ret = v4l2_ctrl_handler_init(&inst->ctrl_handler, 58);
> if (ret)
> @@ -580,7 +582,7 @@ int venc_ctrl_init(struct venus_inst *inst)
>
> v4l2_ctrl_new_std_compound(&inst->ctrl_handler, &venc_ctrl_ops,
> V4L2_CID_COLORIMETRY_HDR10_MASTERING_DISPLAY,
> - v4l2_ctrl_ptr_create(NULL));
> + v4l2_ctrl_ptr_create((void *)&p_hdr10_mastering));
>
> v4l2_ctrl_new_std(&inst->ctrl_handler, &venc_ctrl_ops,
> V4L2_CID_MPEG_VIDEO_INTRA_REFRESH_PERIOD, 0,
> --
> 2.17.1
>

2022-07-12 12:59:42

by Viswanath Boma

[permalink] [raw]
Subject: [PATCH 3/7] venus : CAPTURE Plane width/height alignment with OUT plane.

From: Stanimir Varbanov <[email protected]>

V4l2 encoder compliance set-format test cases failing as Capture plane width/height not aligned to OUT plane .

Change-Id: I7318a8a750f720e81b7b51520823b68ff13a2697
Signed-off-by: Viswanath Boma <[email protected]>
---
drivers/media/platform/qcom/venus/venc.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/platform/qcom/venus/venc.c b/drivers/media/platform/qcom/venus/venc.c
index 21bff25e3f814..b56960d7f6c89 100644
--- a/drivers/media/platform/qcom/venus/venc.c
+++ b/drivers/media/platform/qcom/venus/venc.c
@@ -192,10 +192,8 @@ venc_try_fmt_common(struct venus_inst *inst, struct v4l2_format *f)
pixmp->height = clamp(pixmp->height, frame_height_min(inst),
frame_height_max(inst));

- if (f->type == V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE) {
- pixmp->width = ALIGN(pixmp->width, 128);
- pixmp->height = ALIGN(pixmp->height, 32);
- }
+ pixmp->width = ALIGN(pixmp->width, 128);
+ pixmp->height = ALIGN(pixmp->height, 32);

pixmp->width = ALIGN(pixmp->width, 2);
pixmp->height = ALIGN(pixmp->height, 2);
--
2.17.1

2022-07-12 13:02:40

by Viswanath Boma

[permalink] [raw]
Subject: [PATCH 6/7] venus : Remove the capture plane settings for venc_g_parm/venc_s_parm

v4l2 compliance expecting settings for out buffer only and the same
values will be propagated to capture buffer setting by h/w encoder .
settings on cpature plane are optional , required only if
offline-encoding supports.

error details : fail: v4l2-test-formats.cpp(1350): !ret

Change-Id: I3d33bf1443cb5b20c3be6ce7c86df53aafb7918e
Signed-off-by: Viswanath Boma <[email protected]>
---
drivers/media/platform/qcom/venus/venc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/media/platform/qcom/venus/venc.c b/drivers/media/platform/qcom/venus/venc.c
index 4f10f5de7e3e6..420691f71121e 100644
--- a/drivers/media/platform/qcom/venus/venc.c
+++ b/drivers/media/platform/qcom/venus/venc.c
@@ -390,7 +390,7 @@ static int venc_s_parm(struct file *file, void *fh, struct v4l2_streamparm *a)
struct v4l2_fract *timeperframe = &out->timeperframe;
u64 us_per_frame, fps;

- if (a->type != V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE &&
+ if (a->type != V4L2_BUF_TYPE_VIDEO_OUTPUT &&
a->type != V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE)
return -EINVAL;

@@ -422,7 +422,7 @@ static int venc_g_parm(struct file *file, void *fh, struct v4l2_streamparm *a)
{
struct venus_inst *inst = to_inst(file);

- if (a->type != V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE &&
+ if (a->type != V4L2_BUF_TYPE_VIDEO_OUTPUT &&
a->type != V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE)
return -EINVAL;

--
2.17.1

2022-07-12 13:04:08

by Viswanath Boma

[permalink] [raw]
Subject: [PATCH 2/7] venus : Addition of control support - V4L2_CID_MIN_BUFFERS_FOR_OUTPUT

V4l2 encoder compliance expecting minimum buffers support for the application to allocate
buffers as per the control support values.

Change-Id: Idb41ff7dce8b8138f28df01d045eae6facf7e93d
Signed-off-by: Viswanath Boma <[email protected]>
---
drivers/media/platform/qcom/venus/venc_ctrls.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/media/platform/qcom/venus/venc_ctrls.c b/drivers/media/platform/qcom/venus/venc_ctrls.c
index 37ba7d97f99b2..95fdad160732b 100644
--- a/drivers/media/platform/qcom/venus/venc_ctrls.c
+++ b/drivers/media/platform/qcom/venus/venc_ctrls.c
@@ -355,7 +355,7 @@ int venc_ctrl_init(struct venus_inst *inst)
struct v4l2_ctrl_hdr10_mastering_display p_hdr10_mastering = { {34000, 13250, 7500 },
{ 16000, 34500, 3000 }, 15635, 16450, 10000000, 500 };

- ret = v4l2_ctrl_handler_init(&inst->ctrl_handler, 58);
+ ret = v4l2_ctrl_handler_init(&inst->ctrl_handler, 59);
if (ret)
return ret;

@@ -435,6 +435,9 @@ int venc_ctrl_init(struct venus_inst *inst)
V4L2_MPEG_VIDEO_VP8_PROFILE_3,
0, V4L2_MPEG_VIDEO_VP8_PROFILE_0);

+ v4l2_ctrl_new_std(&inst->ctrl_handler, &venc_ctrl_ops,
+ V4L2_CID_MIN_BUFFERS_FOR_OUTPUT, 4, 11, 1, 4);
+
v4l2_ctrl_new_std(&inst->ctrl_handler, &venc_ctrl_ops,
V4L2_CID_MPEG_VIDEO_BITRATE, BITRATE_MIN, BITRATE_MAX,
BITRATE_STEP, BITRATE_DEFAULT);
--
2.17.1

2022-07-12 13:07:29

by Viswanath Boma

[permalink] [raw]
Subject: [PATCH 7/7] venus : Allow MIN/MAX settings for the v4l2 encoder controls defined range .

From: Vikash Garodia <[email protected]>

Control MIN/MAX range defined as 0 to 1 ,as MIN value setting enabled
for V4L2_CID_MPEG_VIDEO_H264_8X8_TRANSFORM .

error details: fail: v4l2-test-controls.cpp(516): invalid maximum range check

Change-Id: I8db2585d35a72bf238cec4cd8f49661170e98a85
Signed-off-by: Viswanath Boma <[email protected]>
---
drivers/media/platform/qcom/venus/venc_ctrls.c | 13 -------------
1 file changed, 13 deletions(-)

diff --git a/drivers/media/platform/qcom/venus/venc_ctrls.c b/drivers/media/platform/qcom/venus/venc_ctrls.c
index 95fdad160732b..6dcbd3baa9c86 100644
--- a/drivers/media/platform/qcom/venus/venc_ctrls.c
+++ b/drivers/media/platform/qcom/venus/venc_ctrls.c
@@ -323,19 +323,6 @@ static int venc_op_s_ctrl(struct v4l2_ctrl *ctrl)
if (ctr->profile.h264 != V4L2_MPEG_VIDEO_H264_PROFILE_HIGH &&
ctr->profile.h264 != V4L2_MPEG_VIDEO_H264_PROFILE_CONSTRAINED_HIGH)
return -EINVAL;
-
- /*
- * In video firmware, 8x8 transform is supported only for
- * high profile(HP) and constrained high profile(CHP).
- * If client wants to disable 8x8 transform for HP/CHP,
- * it is better to set profile as main profile(MP).
- * Because there is no difference between HP and MP
- * if we disable 8x8 transform for HP.
- */
-
- if (ctrl->val == 0)
- return -EINVAL;
-
ctr->h264_8x8_transform = ctrl->val;
break;
default:
--
2.17.1

2022-07-12 14:01:40

by Nicolas Dufresne

[permalink] [raw]
Subject: Re: [PATCH 1/7] venus : Add default values for the control V4L2_CID_COLORIMETRY_HDR10_MASTERING_DISPLAY

Le mardi 12 juillet 2022 à 17:53 +0530, Viswanath Boma a écrit :
> From: Stanimir Varbanov <[email protected]>
>
> V4l2 encoder compliance expecting default values of colormetry for the control.

nit: colormetry -> colorimetry

>
> Change-Id: I1db0d4940b54e033d646ce39d60dc488afba8d58
> Signed-off-by: Viswanath Boma <[email protected]>
> ---
> drivers/media/platform/qcom/venus/venc_ctrls.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/media/platform/qcom/venus/venc_ctrls.c b/drivers/media/platform/qcom/venus/venc_ctrls.c
> index ea5805e71c143..37ba7d97f99b2 100644
> --- a/drivers/media/platform/qcom/venus/venc_ctrls.c
> +++ b/drivers/media/platform/qcom/venus/venc_ctrls.c
> @@ -352,6 +352,8 @@ static const struct v4l2_ctrl_ops venc_ctrl_ops = {
> int venc_ctrl_init(struct venus_inst *inst)
> {
> int ret;
> + struct v4l2_ctrl_hdr10_mastering_display p_hdr10_mastering = { {34000, 13250, 7500 },
> + { 16000, 34500, 3000 }, 15635, 16450, 10000000, 500 };

What is the origin of these values ? Should this be done in the control
framework instead ?

>
> ret = v4l2_ctrl_handler_init(&inst->ctrl_handler, 58);
> if (ret)
> @@ -580,7 +582,7 @@ int venc_ctrl_init(struct venus_inst *inst)
>
> v4l2_ctrl_new_std_compound(&inst->ctrl_handler, &venc_ctrl_ops,
> V4L2_CID_COLORIMETRY_HDR10_MASTERING_DISPLAY,
> - v4l2_ctrl_ptr_create(NULL));
> + v4l2_ctrl_ptr_create((void *)&p_hdr10_mastering));
>
> v4l2_ctrl_new_std(&inst->ctrl_handler, &venc_ctrl_ops,
> V4L2_CID_MPEG_VIDEO_INTRA_REFRESH_PERIOD, 0,

2022-07-18 10:52:32

by Viswanath Boma (Temp)

[permalink] [raw]
Subject: RE: [PATCH 1/7] venus : Add default values for the control V4L2_CID_COLORIMETRY_HDR10_MASTERING_DISPLAY



-----Original Message-----
From: Nicolas Dufresne <[email protected]>
Sent: Tuesday, July 12, 2022 7:04 PM
To: Viswanath Boma (Temp) (QUIC) <[email protected]>; video.upstream.external <[email protected]>; [email protected]; Andy Gross <[email protected]>; [email protected]; Mauro Carvalho Chehab <[email protected]>; [email protected]; [email protected]; [email protected]
Subject: Re: [PATCH 1/7] venus : Add default values for the control V4L2_CID_COLORIMETRY_HDR10_MASTERING_DISPLAY

WARNING: This email originated from outside of Qualcomm. Please be wary of any links or attachments, and do not enable macros.

Le mardi 12 juillet 2022 à 17:53 +0530, Viswanath Boma a écrit :
> From: Stanimir Varbanov <[email protected]>
>
> V4l2 encoder compliance expecting default values of colormetry for the control.

nit: colormetry -> colorimetry
[vboma]
Will ensure with next patch set .
>
> Change-Id: I1db0d4940b54e033d646ce39d60dc488afba8d58
> Signed-off-by: Viswanath Boma <[email protected]>
> ---
> drivers/media/platform/qcom/venus/venc_ctrls.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/media/platform/qcom/venus/venc_ctrls.c
> b/drivers/media/platform/qcom/venus/venc_ctrls.c
> index ea5805e71c143..37ba7d97f99b2 100644
> --- a/drivers/media/platform/qcom/venus/venc_ctrls.c
> +++ b/drivers/media/platform/qcom/venus/venc_ctrls.c
> @@ -352,6 +352,8 @@ static const struct v4l2_ctrl_ops venc_ctrl_ops =
> { int venc_ctrl_init(struct venus_inst *inst) {
> int ret;
> + struct v4l2_ctrl_hdr10_mastering_display p_hdr10_mastering = { {34000, 13250, 7500 },
> + { 16000, 34500, 3000 }, 15635, 16450, 10000000, 500 };

What is the origin of these values ? Should this be done in the control framework instead ?
[vboma]
Control frame work handling the min/max value that required with the default control object.
As per @Stanimir Varbanov (Consultant) inputs ,added these values for the default .
HI , @Stanimir Varbanov (Consultant) , could you please share more info as required .

>
> ret = v4l2_ctrl_handler_init(&inst->ctrl_handler, 58);
> if (ret)
> @@ -580,7 +582,7 @@ int venc_ctrl_init(struct venus_inst *inst)
>
> v4l2_ctrl_new_std_compound(&inst->ctrl_handler, &venc_ctrl_ops,
> V4L2_CID_COLORIMETRY_HDR10_MASTERING_DISPLAY,
> - v4l2_ctrl_ptr_create(NULL));
> + v4l2_ctrl_ptr_create((void
> + *)&p_hdr10_mastering));
>
> v4l2_ctrl_new_std(&inst->ctrl_handler, &venc_ctrl_ops,
> V4L2_CID_MPEG_VIDEO_INTRA_REFRESH_PERIOD, 0,

2022-07-18 11:35:23

by Viswanath Boma (Temp)

[permalink] [raw]
Subject: RE: [PATCH 1/7] venus : Add default values for the control V4L2_CID_COLORIMETRY_HDR10_MASTERING_DISPLAY



-----Original Message-----
From: Manivannan Sadhasivam <[email protected]>
Sent: Tuesday, July 12, 2022 6:05 PM
To: Viswanath Boma (Temp) (QUIC) <[email protected]>
Cc: video.upstream.external <[email protected]>; [email protected]; Andy Gross <[email protected]>; [email protected]; Mauro Carvalho Chehab <[email protected]>; [email protected]; [email protected]; [email protected]
Subject: Re: [PATCH 1/7] venus : Add default values for the control V4L2_CID_COLORIMETRY_HDR10_MASTERING_DISPLAY

WARNING: This email originated from outside of Qualcomm. Please be wary of any links or attachments, and do not enable macros.

On Tue, Jul 12, 2022 at 05:53:41PM +0530, Viswanath Boma wrote:
> From: Stanimir Varbanov <[email protected]>
>
> V4l2 encoder compliance expecting default values of colormetry for the control.
>
> Change-Id: I1db0d4940b54e033d646ce39d60dc488afba8d58

What does this represent here? I'm pretty sure it is meaningless to the upstream kernel, so please get rid of it.
[vboma]
Will ensure with next patch set

> Signed-off-by: Viswanath Boma <[email protected]>

Since Stan is the original author of this and following patches, there should be a s-o-b tag from him. After that you should add yours indicating that you are carrying the patches from Stan.

Also, please add a cover letter stating the purpose of this series, how it is tested, and with any other relevant information.

Thanks,
Mani
[vboma]
Will ensure with next patch set
> ---
> drivers/media/platform/qcom/venus/venc_ctrls.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/media/platform/qcom/venus/venc_ctrls.c
> b/drivers/media/platform/qcom/venus/venc_ctrls.c
> index ea5805e71c143..37ba7d97f99b2 100644
> --- a/drivers/media/platform/qcom/venus/venc_ctrls.c
> +++ b/drivers/media/platform/qcom/venus/venc_ctrls.c
> @@ -352,6 +352,8 @@ static const struct v4l2_ctrl_ops venc_ctrl_ops =
> { int venc_ctrl_init(struct venus_inst *inst) {
> int ret;
> + struct v4l2_ctrl_hdr10_mastering_display p_hdr10_mastering = { {34000, 13250, 7500 },
> + { 16000, 34500, 3000 }, 15635, 16450, 10000000, 500 };
>
> ret = v4l2_ctrl_handler_init(&inst->ctrl_handler, 58);
> if (ret)
> @@ -580,7 +582,7 @@ int venc_ctrl_init(struct venus_inst *inst)
>
> v4l2_ctrl_new_std_compound(&inst->ctrl_handler, &venc_ctrl_ops,
> V4L2_CID_COLORIMETRY_HDR10_MASTERING_DISPLAY,
> - v4l2_ctrl_ptr_create(NULL));
> + v4l2_ctrl_ptr_create((void
> + *)&p_hdr10_mastering));
>
> v4l2_ctrl_new_std(&inst->ctrl_handler, &venc_ctrl_ops,
> V4L2_CID_MPEG_VIDEO_INTRA_REFRESH_PERIOD, 0,
> --
> 2.17.1
>

2022-07-25 09:14:49

by Stanimir Varbanov

[permalink] [raw]
Subject: Re: [PATCH 1/7] venus : Add default values for the control V4L2_CID_COLORIMETRY_HDR10_MASTERING_DISPLAY



On 7/12/22 16:34, Nicolas Dufresne wrote:
> Le mardi 12 juillet 2022 à 17:53 +0530, Viswanath Boma a écrit :
>> From: Stanimir Varbanov <[email protected]>
>>
>> V4l2 encoder compliance expecting default values of colormetry for the control.
>
> nit: colormetry -> colorimetry
>
>>
>> Change-Id: I1db0d4940b54e033d646ce39d60dc488afba8d58
>> Signed-off-by: Viswanath Boma <[email protected]>
>> ---
>> drivers/media/platform/qcom/venus/venc_ctrls.c | 4 +++-
>> 1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/media/platform/qcom/venus/venc_ctrls.c b/drivers/media/platform/qcom/venus/venc_ctrls.c
>> index ea5805e71c143..37ba7d97f99b2 100644
>> --- a/drivers/media/platform/qcom/venus/venc_ctrls.c
>> +++ b/drivers/media/platform/qcom/venus/venc_ctrls.c
>> @@ -352,6 +352,8 @@ static const struct v4l2_ctrl_ops venc_ctrl_ops = {
>> int venc_ctrl_init(struct venus_inst *inst)
>> {
>> int ret;
>> + struct v4l2_ctrl_hdr10_mastering_display p_hdr10_mastering = { {34000, 13250, 7500 },
>> + { 16000, 34500, 3000 }, 15635, 16450, 10000000, 500 };
>
> What is the origin of these values ? Should this be done in the control
> framework instead ?

We needed some safe default values to satisfy v4l2 control. I took the
values from here [1].

I'm not sure do we need them in v4l2 control core (most probably it is a
good to have it), Hans ?

>
>>
>> ret = v4l2_ctrl_handler_init(&inst->ctrl_handler, 58);
>> if (ret)
>> @@ -580,7 +582,7 @@ int venc_ctrl_init(struct venus_inst *inst)
>>
>> v4l2_ctrl_new_std_compound(&inst->ctrl_handler, &venc_ctrl_ops,
>> V4L2_CID_COLORIMETRY_HDR10_MASTERING_DISPLAY,
>> - v4l2_ctrl_ptr_create(NULL));
>> + v4l2_ctrl_ptr_create((void *)&p_hdr10_mastering));
>>
>> v4l2_ctrl_new_std(&inst->ctrl_handler, &venc_ctrl_ops,
>> V4L2_CID_MPEG_VIDEO_INTRA_REFRESH_PERIOD, 0,
>

--
regards,
Stan

[1] https://www.elecard.com/page/article_hdr

2022-07-25 09:19:01

by Stanimir Varbanov

[permalink] [raw]
Subject: Re: [PATCH 1/7] venus : Add default values for the control V4L2_CID_COLORIMETRY_HDR10_MASTERING_DISPLAY

Hi Viswanath,

On 7/12/22 15:23, Viswanath Boma wrote:
> From: Stanimir Varbanov <[email protected]>

In fact this comes from you, please drop 'From'.

>
> V4l2 encoder compliance expecting default values of colormetry for the control.
>
> Change-Id: I1db0d4940b54e033d646ce39d60dc488afba8d58

Drop this.

> Signed-off-by: Viswanath Boma <[email protected]>
> ---
> drivers/media/platform/qcom/venus/venc_ctrls.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/media/platform/qcom/venus/venc_ctrls.c b/drivers/media/platform/qcom/venus/venc_ctrls.c
> index ea5805e71c143..37ba7d97f99b2 100644
> --- a/drivers/media/platform/qcom/venus/venc_ctrls.c
> +++ b/drivers/media/platform/qcom/venus/venc_ctrls.c
> @@ -352,6 +352,8 @@ static const struct v4l2_ctrl_ops venc_ctrl_ops = {
> int venc_ctrl_init(struct venus_inst *inst)
> {
> int ret;
> + struct v4l2_ctrl_hdr10_mastering_display p_hdr10_mastering = { {34000, 13250, 7500 },
> + { 16000, 34500, 3000 }, 15635, 16450, 10000000, 500 };

Please do this with proper indentation.

>
> ret = v4l2_ctrl_handler_init(&inst->ctrl_handler, 58);
> if (ret)
> @@ -580,7 +582,7 @@ int venc_ctrl_init(struct venus_inst *inst)
>
> v4l2_ctrl_new_std_compound(&inst->ctrl_handler, &venc_ctrl_ops,
> V4L2_CID_COLORIMETRY_HDR10_MASTERING_DISPLAY,
> - v4l2_ctrl_ptr_create(NULL));
> + v4l2_ctrl_ptr_create((void *)&p_hdr10_mastering));

I think you do not need to cast to (void *).

>
> v4l2_ctrl_new_std(&inst->ctrl_handler, &venc_ctrl_ops,
> V4L2_CID_MPEG_VIDEO_INTRA_REFRESH_PERIOD, 0,

--
regards,
Stan

2022-07-25 10:42:33

by Stanimir Varbanov

[permalink] [raw]
Subject: Re: [PATCH 2/7] venus : Addition of control support - V4L2_CID_MIN_BUFFERS_FOR_OUTPUT



On 7/12/22 15:23, Viswanath Boma wrote:
> V4l2 encoder compliance expecting minimum buffers support for the application to allocate
> buffers as per the control support values.

Please start the sentence from the beginning.

>
> Change-Id: Idb41ff7dce8b8138f28df01d045eae6facf7e93d

No Change-Ids, please.

> Signed-off-by: Viswanath Boma <[email protected]>
> ---
> drivers/media/platform/qcom/venus/venc_ctrls.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/media/platform/qcom/venus/venc_ctrls.c b/drivers/media/platform/qcom/venus/venc_ctrls.c
> index 37ba7d97f99b2..95fdad160732b 100644
> --- a/drivers/media/platform/qcom/venus/venc_ctrls.c
> +++ b/drivers/media/platform/qcom/venus/venc_ctrls.c
> @@ -355,7 +355,7 @@ int venc_ctrl_init(struct venus_inst *inst)
> struct v4l2_ctrl_hdr10_mastering_display p_hdr10_mastering = { {34000, 13250, 7500 },
> { 16000, 34500, 3000 }, 15635, 16450, 10000000, 500 };
>
> - ret = v4l2_ctrl_handler_init(&inst->ctrl_handler, 58);
> + ret = v4l2_ctrl_handler_init(&inst->ctrl_handler, 59);
> if (ret)
> return ret;
>
> @@ -435,6 +435,9 @@ int venc_ctrl_init(struct venus_inst *inst)
> V4L2_MPEG_VIDEO_VP8_PROFILE_3,
> 0, V4L2_MPEG_VIDEO_VP8_PROFILE_0);
>
> + v4l2_ctrl_new_std(&inst->ctrl_handler, &venc_ctrl_ops,

You did not provide a g_ctrl handler for this ?

> + V4L2_CID_MIN_BUFFERS_FOR_OUTPUT, 4, 11, 1, 4);
> +
> v4l2_ctrl_new_std(&inst->ctrl_handler, &venc_ctrl_ops,
> V4L2_CID_MPEG_VIDEO_BITRATE, BITRATE_MIN, BITRATE_MAX,
> BITRATE_STEP, BITRATE_DEFAULT);

--
regards,
Stan

2022-07-25 11:01:47

by Stanimir Varbanov

[permalink] [raw]
Subject: Re: [PATCH 7/7] venus : Allow MIN/MAX settings for the v4l2 encoder controls defined range .



On 7/12/22 15:23, Viswanath Boma wrote:
> From: Vikash Garodia <[email protected]>
>
> Control MIN/MAX range defined as 0 to 1 ,as MIN value setting enabled
> for V4L2_CID_MPEG_VIDEO_H264_8X8_TRANSFORM .
>
> error details: fail: v4l2-test-controls.cpp(516): invalid maximum range check
>
> Change-Id: I8db2585d35a72bf238cec4cd8f49661170e98a85
> Signed-off-by: Viswanath Boma <[email protected]>
> ---
> drivers/media/platform/qcom/venus/venc_ctrls.c | 13 -------------
> 1 file changed, 13 deletions(-)
>
> diff --git a/drivers/media/platform/qcom/venus/venc_ctrls.c b/drivers/media/platform/qcom/venus/venc_ctrls.c
> index 95fdad160732b..6dcbd3baa9c86 100644
> --- a/drivers/media/platform/qcom/venus/venc_ctrls.c
> +++ b/drivers/media/platform/qcom/venus/venc_ctrls.c
> @@ -323,19 +323,6 @@ static int venc_op_s_ctrl(struct v4l2_ctrl *ctrl)
> if (ctr->profile.h264 != V4L2_MPEG_VIDEO_H264_PROFILE_HIGH &&
> ctr->profile.h264 != V4L2_MPEG_VIDEO_H264_PROFILE_CONSTRAINED_HIGH)
> return -EINVAL;
> -
> - /*
> - * In video firmware, 8x8 transform is supported only for
> - * high profile(HP) and constrained high profile(CHP).
> - * If client wants to disable 8x8 transform for HP/CHP,
> - * it is better to set profile as main profile(MP).
> - * Because there is no difference between HP and MP
> - * if we disable 8x8 transform for HP.
> - */
> -

Please keep the comment.

> - if (ctrl->val == 0)
> - return -EINVAL;
> -
> ctr->h264_8x8_transform = ctrl->val;
> break;
> default:

--
regards,
Stan

2022-08-08 09:44:35

by Viswanath Boma

[permalink] [raw]
Subject: [PATCH V2 0/7] Fixes for Encoder Compliance issues.

From: Viswanath Boma <[email protected]>

Fixes for Video Encoder complaince issues .
Tested on v5.15 kernel and the chrome/client binary details -
v4l2-compliance 1.22.1



Dikshita Agarwal (1):
venus : Addition of support for VIDIOC_TRY_ENCODER_CMD

Stanimir Varbanov (2):
venus : Add default values for the control
V4L2_CID_COLORIMETRY_HDR10_MASTERING_DISPLAY
venus : CAPTURE Plane width/height alignment with OUT plane.

Vikash Garodia (1):
venus : Allow MIN/MAX settings for the v4l2 encoder controls defined
range.

Viswanath Boma (3):
venus : Addition of control support - V4L2_CID_MIN_BUFFERS_FOR_OUTPUT
venus : Addition of EOS Event support for Encoder
venus : Remove the capture plane settings for venc_g_parm/venc_s_parm

drivers/media/platform/qcom/venus/venc.c | 26 ++++++++++----
.../media/platform/qcom/venus/venc_ctrls.c | 35 ++++++++++++++++---
2 files changed, 50 insertions(+), 11 deletions(-)

--
2.17.1

2022-08-08 09:44:54

by Viswanath Boma

[permalink] [raw]
Subject: [PATCH V2 7/7] venus : Allow MIN/MAX settings for the v4l2 encoder controls defined range.

From: Vikash Garodia <[email protected]>

Control MIN/MAX range defined as 0 to 1, as MIN value setting enabled
for V4L2_CID_MPEG_VIDEO_H264_8X8_TRANSFORM.

error details: fail: v4l2-test-controls.cpp(516):
invalid maximum range check

Acked-by: Stanimir Varbanov <[email protected]>
Signed-off-by: Viswanath Boma <[email protected]>
Signed-off-by: Vikash Garodia <[email protected]>
Signed-off-by: Dikshita Agarwal <[email protected]>
---
drivers/media/platform/qcom/venus/venc_ctrls.c | 2 --
1 file changed, 2 deletions(-)

diff --git a/drivers/media/platform/qcom/venus/venc_ctrls.c b/drivers/media/platform/qcom/venus/venc_ctrls.c
index b4437cf598ff1..e55f7a0b39608 100644
--- a/drivers/media/platform/qcom/venus/venc_ctrls.c
+++ b/drivers/media/platform/qcom/venus/venc_ctrls.c
@@ -334,8 +334,6 @@ static int venc_op_s_ctrl(struct v4l2_ctrl *ctrl)
* if we disable 8x8 transform for HP.
*/

- if (ctrl->val == 0)
- return -EINVAL;

ctr->h264_8x8_transform = ctrl->val;
break;
--
2.17.1

2022-08-08 09:46:01

by Viswanath Boma

[permalink] [raw]
Subject: [PATCH V2 1/7] venus : Add default values for the control

From: Stanimir Varbanov <[email protected]>

V4l2 encoder compliance expecting default values of colorimetry
for the control.

Acked-by: Stanimir Varbanov <[email protected]>
Signed-off-by: Stanimir Varbanov <[email protected]>
Signed-off-by: Vikash Garodia <[email protected]>
Signed-off-by: Viswanath Boma <[email protected]>
---
drivers/media/platform/qcom/venus/venc_ctrls.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/media/platform/qcom/venus/venc_ctrls.c b/drivers/media/platform/qcom/venus/venc_ctrls.c
index ea5805e71c143..aa44c0b3ceb57 100644
--- a/drivers/media/platform/qcom/venus/venc_ctrls.c
+++ b/drivers/media/platform/qcom/venus/venc_ctrls.c
@@ -352,6 +352,10 @@ static const struct v4l2_ctrl_ops venc_ctrl_ops = {
int venc_ctrl_init(struct venus_inst *inst)
{
int ret;
+ struct v4l2_ctrl_hdr10_mastering_display p_hdr10_mastering = {
+ { 34000, 13250, 7500 },
+ { 16000, 34500, 3000 }, 15635, 16450, 10000000, 500,
+ };

ret = v4l2_ctrl_handler_init(&inst->ctrl_handler, 58);
if (ret)
@@ -580,7 +584,7 @@ int venc_ctrl_init(struct venus_inst *inst)

v4l2_ctrl_new_std_compound(&inst->ctrl_handler, &venc_ctrl_ops,
V4L2_CID_COLORIMETRY_HDR10_MASTERING_DISPLAY,
- v4l2_ctrl_ptr_create(NULL));
+ v4l2_ctrl_ptr_create((void *)&p_hdr10_mastering));

v4l2_ctrl_new_std(&inst->ctrl_handler, &venc_ctrl_ops,
V4L2_CID_MPEG_VIDEO_INTRA_REFRESH_PERIOD, 0,
--
2.17.1

2022-08-08 09:46:59

by Viswanath Boma

[permalink] [raw]
Subject: [PATCH V2 5/7] venus : Addition of support for VIDIOC_TRY_ENCODER_CMD

From: Dikshita Agarwal <[email protected]>

v4l2 compliance expecting support for vidioc_try_encoder_cmd .

error details : test VIDIOC_(TRY_)ENCODER_CMD: FAIL

Acked-by: Stanimir Varbanov <[email protected]>
Signed-off-by: Viswanath Boma <[email protected]>
Signed-off-by: Dikshita Agarwal <[email protected]>
Signed-off-by: Vikash Garodia <[email protected]>
---
drivers/media/platform/qcom/venus/venc.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/media/platform/qcom/venus/venc.c b/drivers/media/platform/qcom/venus/venc.c
index 17312d316f93d..966f41f3603ec 100644
--- a/drivers/media/platform/qcom/venus/venc.c
+++ b/drivers/media/platform/qcom/venus/venc.c
@@ -588,6 +588,7 @@ static const struct v4l2_ioctl_ops venc_ioctl_ops = {
.vidioc_subscribe_event = venc_subscribe_event,
.vidioc_unsubscribe_event = v4l2_event_unsubscribe,
.vidioc_encoder_cmd = venc_encoder_cmd,
+ .vidioc_try_encoder_cmd = v4l2_m2m_ioctl_try_encoder_cmd,
};

static int venc_pm_get(struct venus_inst *inst)
--
2.17.1