diff options
author | Dikshita Agarwal <dikshita@codeaurora.org> | 2021-03-24 12:54:32 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2021-04-06 15:49:25 +0300 |
commit | f2fb3f02abe2e66fefcc045767dd7d16e5730a45 (patch) | |
tree | 3c02d7a20a677ec406780c846c8bed54a02367df /drivers/media/platform/qcom/venus/venc.c | |
parent | f15c54cf3f684cd1a65f6ebc55ee9ada533ec6ef (diff) | |
download | linux-f2fb3f02abe2e66fefcc045767dd7d16e5730a45.tar.xz |
media: venus: venc: Add support for Long Term Reference (LTR) controls
Add support for below LTR controls in encoder:
- V4L2_CID_MPEG_VIDEO_LTR_COUNT
- V4L2_CID_MPEG_VIDEO_FRAME_LTR_INDEX
- V4L2_CID_MPEG_VIDEO_USE_LTR_FRAMES
Signed-off-by: Dikshita Agarwal <dikshita@codeaurora.org>
Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/media/platform/qcom/venus/venc.c')
-rw-r--r-- | drivers/media/platform/qcom/venus/venc.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/media/platform/qcom/venus/venc.c b/drivers/media/platform/qcom/venus/venc.c index 505d092dc433..a17ada576450 100644 --- a/drivers/media/platform/qcom/venus/venc.c +++ b/drivers/media/platform/qcom/venus/venc.c @@ -546,6 +546,7 @@ static int venc_set_properties(struct venus_inst *inst) struct hfi_quantization quant; struct hfi_quantization_range quant_range; struct hfi_enable en; + struct hfi_ltr_mode ltr_mode; u32 ptype, rate_control, bitrate; u32 profile, level; int ret; @@ -722,6 +723,14 @@ static int venc_set_properties(struct venus_inst *inst) if (ret) return ret; + ptype = HFI_PROPERTY_PARAM_VENC_LTRMODE; + ltr_mode.ltr_count = ctr->ltr_count; + ltr_mode.ltr_mode = HFI_LTR_MODE_MANUAL; + ltr_mode.trust_mode = 1; + ret = hfi_session_set_property(inst, ptype, <r_mode); + if (ret) + return ret; + switch (inst->hfi_codec) { case HFI_VIDEO_CODEC_H264: profile = ctr->profile.h264; |