msm: vidc: venc: set signal_info to firmware always
Currently setting signal_info, only if colorspace info is set properly. But sometimes client can set only range. So need to send signal_info always to firmware. Change-Id: I5282ec01b473485ec39f39abbf7160b9c5cc0256 Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
This commit is contained in:
parent
1fc52e7df4
commit
b6bf411cd0
@ -1853,6 +1853,9 @@ int msm_venc_s_ctrl(struct msm_vidc_inst *inst, struct v4l2_ctrl *ctrl)
|
||||
inst->clk_data.frame_rate = 1 << 16;
|
||||
}
|
||||
break;
|
||||
case V4L2_CID_MPEG_VIDC_VIDEO_FULL_RANGE:
|
||||
inst->full_range = ctrl->val;
|
||||
break;
|
||||
case V4L2_CID_MPEG_VIDC_CAPTURE_FRAME_RATE:
|
||||
case V4L2_CID_MPEG_VIDC_VIDEO_HEVC_MAX_HIER_CODING_LAYER:
|
||||
case V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_TYPE:
|
||||
@ -1872,7 +1875,6 @@ int msm_venc_s_ctrl(struct msm_vidc_inst *inst, struct v4l2_ctrl *ctrl)
|
||||
case V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L4_QP:
|
||||
case V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L5_QP:
|
||||
case V4L2_CID_MPEG_VIDC_VIDEO_COLOR_SPACE:
|
||||
case V4L2_CID_MPEG_VIDC_VIDEO_FULL_RANGE:
|
||||
case V4L2_CID_MPEG_VIDC_VIDEO_TRANSFER_CHARS:
|
||||
case V4L2_CID_MPEG_VIDC_VIDEO_MATRIX_COEFFS:
|
||||
case V4L2_CID_MPEG_VIDC_VIDEO_VPE_CSC:
|
||||
@ -3611,16 +3613,24 @@ int msm_venc_set_video_signal_info(struct msm_vidc_inst *inst)
|
||||
ctrl_fr = get_ctrl(inst, V4L2_CID_MPEG_VIDC_VIDEO_FULL_RANGE);
|
||||
ctrl_tr = get_ctrl(inst, V4L2_CID_MPEG_VIDC_VIDEO_TRANSFER_CHARS);
|
||||
ctrl_mc = get_ctrl(inst, V4L2_CID_MPEG_VIDC_VIDEO_MATRIX_COEFFS);
|
||||
if (ctrl_cs->val == MSM_VIDC_RESERVED_1)
|
||||
return 0;
|
||||
|
||||
signal_info.enable = true;
|
||||
signal_info.video_format = MSM_VIDC_NTSC;
|
||||
signal_info.video_full_range = ctrl_fr->val;
|
||||
signal_info.color_description = 1;
|
||||
signal_info.color_primaries = ctrl_cs->val;
|
||||
signal_info.transfer_characteristics = ctrl_tr->val;
|
||||
signal_info.matrix_coeffs = ctrl_mc->val;
|
||||
memset(&signal_info, 0, sizeof(struct hfi_video_signal_metadata));
|
||||
if (inst->full_range == COLOR_RANGE_UNSPECIFIED &&
|
||||
ctrl_cs->val == MSM_VIDC_RESERVED_1)
|
||||
signal_info.enable = false;
|
||||
else
|
||||
signal_info.enable = true;
|
||||
|
||||
if (signal_info.enable) {
|
||||
signal_info.video_format = MSM_VIDC_NTSC;
|
||||
signal_info.video_full_range = ctrl_fr->val;
|
||||
if (ctrl_cs->val != MSM_VIDC_RESERVED_1) {
|
||||
signal_info.color_description = 1;
|
||||
signal_info.color_primaries = ctrl_cs->val;
|
||||
signal_info.transfer_characteristics = ctrl_tr->val;
|
||||
signal_info.matrix_coeffs = ctrl_mc->val;
|
||||
}
|
||||
}
|
||||
|
||||
s_vpr_h(inst->sid, "%s: %d %d %d %d\n", __func__,
|
||||
signal_info.color_primaries, signal_info.video_full_range,
|
||||
|
@ -1438,6 +1438,7 @@ void *msm_vidc_open(int core_id, int session_type)
|
||||
inst->all_intra = false;
|
||||
inst->max_filled_len = 0;
|
||||
inst->entropy_mode = HFI_H264_ENTROPY_CABAC;
|
||||
inst->full_range = COLOR_RANGE_UNSPECIFIED;
|
||||
|
||||
for (i = SESSION_MSG_INDEX(SESSION_MSG_START);
|
||||
i <= SESSION_MSG_INDEX(SESSION_MSG_END); i++) {
|
||||
|
@ -44,6 +44,7 @@
|
||||
#define DCVS_FTB_WINDOW 16
|
||||
/* Superframe can have maximum of 32 frames */
|
||||
#define VIDC_SUPERFRAME_MAX 32
|
||||
#define COLOR_RANGE_UNSPECIFIED (-1)
|
||||
|
||||
#define V4L2_EVENT_VIDC_BASE 10
|
||||
#define INPUT_MPLANE V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE
|
||||
@ -553,6 +554,7 @@ struct msm_vidc_inst {
|
||||
bool all_intra;
|
||||
bool is_perf_eligible_session;
|
||||
u32 max_filled_len;
|
||||
int full_range;
|
||||
};
|
||||
|
||||
extern struct msm_vidc_drv *vidc_driver;
|
||||
|
Loading…
Reference in New Issue
Block a user