video: driver: Cap chroma qp offset value other than -12 as 0
Cap chroma qp offset value other than -12 as 0. Change-Id: I0ca9c4844ab835a9365e695f38deff90768191aa Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>
This commit is contained in:

committed by
Gerrit - the friendly Code Review server

parent
e03d09350d
commit
942f406c42
@@ -16,8 +16,6 @@
|
||||
#define DEFAULT_VIDEO_CONCEAL_COLOR_BLACK 0x8020010
|
||||
#define MAX_LTR_FRAME_COUNT 2
|
||||
#define MAX_BASE_LAYER_PRIORITY_ID 63
|
||||
#define MIN_CHROMA_QP_OFFSET -12
|
||||
#define MAX_CHROMA_QP_OFFSET 0
|
||||
#define MAX_BITRATE 220000000
|
||||
#define DEFAULT_BITRATE 20000000
|
||||
#define MIN_QP_10BIT -12
|
||||
@@ -1233,7 +1231,8 @@ static struct msm_platform_inst_capability instance_data_waipio[] = {
|
||||
HFI_PROP_CHROMA_QP_OFFSET,
|
||||
CAP_FLAG_ROOT | CAP_FLAG_OUTPUT_PORT,
|
||||
{0}, {0},
|
||||
NULL, msm_vidc_set_chroma_qp_index_offset},
|
||||
msm_vidc_adjust_chroma_qp_index_offset,
|
||||
msm_vidc_set_chroma_qp_index_offset},
|
||||
|
||||
{DISPLAY_DELAY_ENABLE, DEC, H264|HEVC|VP9,
|
||||
V4L2_MPEG_MSM_VIDC_DISABLE, V4L2_MPEG_MSM_VIDC_ENABLE,
|
||||
|
@@ -24,6 +24,8 @@ int msm_vidc_adjust_mark_ltr(void *instance, struct v4l2_ctrl *ctrl);
|
||||
int msm_vidc_adjust_ir_random(void *instance, struct v4l2_ctrl *ctrl);
|
||||
int msm_vidc_adjust_delta_based_rc(void *instance, struct v4l2_ctrl *ctrl);
|
||||
int msm_vidc_adjust_transform_8x8(void *instance, struct v4l2_ctrl *ctrl);
|
||||
int msm_vidc_adjust_chroma_qp_index_offset(void *instance,
|
||||
struct v4l2_ctrl *ctrl);
|
||||
int msm_vidc_adjust_slice_count(void *instance, struct v4l2_ctrl *ctrl);
|
||||
int msm_vidc_adjust_layer_count(void *instance, struct v4l2_ctrl *ctrl);
|
||||
int msm_vidc_adjust_gop_size(void *instance, struct v4l2_ctrl *ctrl);
|
||||
|
@@ -67,6 +67,8 @@
|
||||
#define MIN_SLICE_HEIGHT 128
|
||||
#define MAX_BITRATE_BOOST 25
|
||||
#define MAX_SUPPORTED_MIN_QUALITY 70
|
||||
#define MIN_CHROMA_QP_OFFSET -12
|
||||
#define MAX_CHROMA_QP_OFFSET 0
|
||||
|
||||
#define DCVS_WINDOW 16
|
||||
#define ENC_FPS_WINDOW 3
|
||||
|
@@ -1157,6 +1157,31 @@ int msm_vidc_adjust_transform_8x8(void *instance, struct v4l2_ctrl *ctrl)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int msm_vidc_adjust_chroma_qp_index_offset(void *instance,
|
||||
struct v4l2_ctrl *ctrl)
|
||||
{
|
||||
struct msm_vidc_inst_capability *capability;
|
||||
s32 adjusted_value;
|
||||
struct msm_vidc_inst *inst = (struct msm_vidc_inst *) instance;
|
||||
|
||||
if (!inst || !inst->capabilities) {
|
||||
d_vpr_e("%s: invalid params\n", __func__);
|
||||
return -EINVAL;
|
||||
}
|
||||
capability = inst->capabilities;
|
||||
|
||||
adjusted_value = ctrl ? ctrl->val :
|
||||
capability->cap[CHROMA_QP_INDEX_OFFSET].value;
|
||||
|
||||
if (adjusted_value != MIN_CHROMA_QP_OFFSET)
|
||||
adjusted_value = MAX_CHROMA_QP_OFFSET;
|
||||
|
||||
msm_vidc_update_cap_value(inst, CHROMA_QP_INDEX_OFFSET,
|
||||
adjusted_value, __func__);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int msm_vidc_adjust_slice_count(void *instance, struct v4l2_ctrl *ctrl)
|
||||
{
|
||||
struct msm_vidc_inst *inst = (struct msm_vidc_inst *) instance;
|
||||
|
Reference in New Issue
Block a user