2021-01-04 06:59:46

by Dikshita Agarwal

[permalink] [raw]
Subject: [PATCH v4 0/2] Add base layer priority id control

This series adds base layer priority id control for encoder
and support for the same in venus driver.

Changes since v3:
- Rebased the changes on latest media tree.
- Addressed the comments.
- Added driver side implementation for new control.

Dikshita Agarwal (2):
media: v4l2-ctrl: Add base layer priority id control.
venus: venc : Add support for priority ID control.

Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst | 9 +++++++++
drivers/media/platform/qcom/venus/core.h | 2 ++
drivers/media/platform/qcom/venus/venc_ctrls.c | 9 ++++++++-
drivers/media/v4l2-core/v4l2-ctrls.c | 1 +
include/uapi/linux/v4l2-controls.h | 1 +
5 files changed, 21 insertions(+), 1 deletion(-)

--
2.7.4


2021-01-04 07:01:13

by Dikshita Agarwal

[permalink] [raw]
Subject: [PATCH v4 2/2] venus: venc : Add support for priority ID control.

Add support for base layer priority ID control in
encoder.
This is a preparation patch to support v6.

Signed-off-by: Dikshita Agarwal <[email protected]>
---
drivers/media/platform/qcom/venus/core.h | 2 ++
drivers/media/platform/qcom/venus/venc_ctrls.c | 9 ++++++++-
2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/drivers/media/platform/qcom/venus/core.h b/drivers/media/platform/qcom/venus/core.h
index 54c42a3..a346ddc 100644
--- a/drivers/media/platform/qcom/venus/core.h
+++ b/drivers/media/platform/qcom/venus/core.h
@@ -274,6 +274,8 @@ struct venc_controls {
u32 hevc;
u32 vp9;
} level;
+
+ u32 base_priority_id;
};

struct venus_buffer {
diff --git a/drivers/media/platform/qcom/venus/venc_ctrls.c b/drivers/media/platform/qcom/venus/venc_ctrls.c
index 7d010d8..3ead51c 100644
--- a/drivers/media/platform/qcom/venus/venc_ctrls.c
+++ b/drivers/media/platform/qcom/venus/venc_ctrls.c
@@ -294,6 +294,9 @@ static int venc_op_s_ctrl(struct v4l2_ctrl *ctrl)
return ret;
}
break;
+ case V4L2_CID_MPEG_VIDEO_BASELAYER_PRIORITY_ID:
+ ctr->base_priority_id = ctrl->val;
+ break;
default:
return -EINVAL;
}
@@ -309,7 +312,7 @@ int venc_ctrl_init(struct venus_inst *inst)
{
int ret;

- ret = v4l2_ctrl_handler_init(&inst->ctrl_handler, 53);
+ ret = v4l2_ctrl_handler_init(&inst->ctrl_handler, 54);
if (ret)
return ret;

@@ -523,6 +526,10 @@ int venc_ctrl_init(struct venus_inst *inst)
V4L2_CID_MPEG_VIDEO_FRAME_LTR_INDEX, 0,
(MAX_LTR_FRAME_COUNT - 1), 1, 0);

+ v4l2_ctrl_new_std(&inst->ctrl_handler, &venc_ctrl_ops,
+ V4L2_CID_MPEG_VIDEO_BASELAYER_PRIORITY_ID, 0,
+ 6, 1, 0);
+
ret = inst->ctrl_handler.error;
if (ret)
goto err;
--
2.7.4

2021-01-12 12:32:14

by Stanimir Varbanov

[permalink] [raw]
Subject: Re: [PATCH v4 2/2] venus: venc : Add support for priority ID control.



On 1/4/21 7:41 AM, Dikshita Agarwal wrote:
> Add support for base layer priority ID control in
> encoder.
> This is a preparation patch to support v6.
>
> Signed-off-by: Dikshita Agarwal <[email protected]>
> ---
> drivers/media/platform/qcom/venus/core.h | 2 ++
> drivers/media/platform/qcom/venus/venc_ctrls.c | 9 ++++++++-
> 2 files changed, 10 insertions(+), 1 deletion(-)

Acked-by: Stanimir Varbanov <[email protected]>


--
regards,
Stan

2021-01-13 16:46:41

by Hans Verkuil

[permalink] [raw]
Subject: Re: [PATCH v4 0/2] Add base layer priority id control

Hi Dikshita,

On 04/01/2021 06:41, Dikshita Agarwal wrote:
> This series adds base layer priority id control for encoder
> and support for the same in venus driver.

Posted a pull request for this series and the "Add new controls for QP and
layer bitrate" series.

Note that because the "Add encoder ctrls for long term reference" is not
merged, the control ID for V4L2_CID_MPEG_VIDEO_BASELAYER_PRIORITY_ID changed
and that you need to rebase the "Add encoder ctrls for long term reference"
series accordingly.

Regards,

Hans

>
> Changes since v3:
> - Rebased the changes on latest media tree.
> - Addressed the comments.
> - Added driver side implementation for new control.
>
> Dikshita Agarwal (2):
> media: v4l2-ctrl: Add base layer priority id control.
> venus: venc : Add support for priority ID control.
>
> Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst | 9 +++++++++
> drivers/media/platform/qcom/venus/core.h | 2 ++
> drivers/media/platform/qcom/venus/venc_ctrls.c | 9 ++++++++-
> drivers/media/v4l2-core/v4l2-ctrls.c | 1 +
> include/uapi/linux/v4l2-controls.h | 1 +
> 5 files changed, 21 insertions(+), 1 deletion(-)
>