diff options
author | Jeffrey Kardatzke <jkardatzke@google.com> | 2020-02-22 03:33:11 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2020-03-12 15:59:02 +0300 |
commit | 6f704b2fbbde0c9893ea59d54d76195d72ac63a1 (patch) | |
tree | 47eb4f79e65a02872971886957238f13019c9524 /drivers/media/platform/qcom/venus/venc.c | |
parent | 808431d6deacdbb34fdd1b59b622bc54cc444485 (diff) | |
download | linux-6f704b2fbbde0c9893ea59d54d76195d72ac63a1.tar.xz |
media: venus: support frame rate control
Add encoder control for enabling/disabling frame rate control via
V4L2_CID_MPEG_VIDEO_FRAME_RC_ENABLE. It is enabled by default.
Signed-off-by: Jeffrey Kardatzke <jkardatzke@google.com>
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 | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/media/platform/qcom/venus/venc.c b/drivers/media/platform/qcom/venus/venc.c index b6f242c4cb2c..9981a2a27c90 100644 --- a/drivers/media/platform/qcom/venus/venc.c +++ b/drivers/media/platform/qcom/venus/venc.c @@ -728,7 +728,9 @@ static int venc_set_properties(struct venus_inst *inst) if (ret) return ret; - if (ctr->bitrate_mode == V4L2_MPEG_VIDEO_BITRATE_MODE_VBR) + if (!ctr->rc_enable) + rate_control = HFI_RATE_CONTROL_OFF; + else if (ctr->bitrate_mode == V4L2_MPEG_VIDEO_BITRATE_MODE_VBR) rate_control = HFI_RATE_CONTROL_VBR_CFR; else rate_control = HFI_RATE_CONTROL_CBR_CFR; |