|
@@ -515,11 +515,6 @@ int msm_vidc_update_cap_value(struct msm_vidc_inst *inst, u32 cap_id,
|
|
{
|
|
{
|
|
int prev_value = 0;
|
|
int prev_value = 0;
|
|
|
|
|
|
- if (!inst) {
|
|
|
|
- d_vpr_e("%s: invalid params\n", __func__);
|
|
|
|
- return -EINVAL;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
prev_value = inst->capabilities[cap_id].value;
|
|
prev_value = inst->capabilities[cap_id].value;
|
|
|
|
|
|
if (is_meta_cap(inst, cap_id)) {
|
|
if (is_meta_cap(inst, cap_id)) {
|
|
@@ -810,11 +805,6 @@ int msm_vidc_adjust_entropy_mode(void *instance, struct v4l2_ctrl *ctrl)
|
|
struct msm_vidc_inst *inst = (struct msm_vidc_inst *) instance;
|
|
struct msm_vidc_inst *inst = (struct msm_vidc_inst *) instance;
|
|
s32 profile = -1;
|
|
s32 profile = -1;
|
|
|
|
|
|
- if (!inst) {
|
|
|
|
- d_vpr_e("%s: invalid params\n", __func__);
|
|
|
|
- return -EINVAL;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
/* ctrl is always NULL in streamon case */
|
|
/* ctrl is always NULL in streamon case */
|
|
adjusted_value = ctrl ? ctrl->val :
|
|
adjusted_value = ctrl ? ctrl->val :
|
|
inst->capabilities[ENTROPY_MODE].value;
|
|
inst->capabilities[ENTROPY_MODE].value;
|
|
@@ -846,11 +836,6 @@ int msm_vidc_adjust_bitrate_mode(void *instance, struct v4l2_ctrl *ctrl)
|
|
int lossless, frame_rc, bitrate_mode, frame_skip;
|
|
int lossless, frame_rc, bitrate_mode, frame_skip;
|
|
u32 hfi_value = 0;
|
|
u32 hfi_value = 0;
|
|
|
|
|
|
- if (!inst) {
|
|
|
|
- d_vpr_e("%s: invalid params\n", __func__);
|
|
|
|
- return -EINVAL;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
bitrate_mode = inst->capabilities[BITRATE_MODE].value;
|
|
bitrate_mode = inst->capabilities[BITRATE_MODE].value;
|
|
lossless = inst->capabilities[LOSSLESS].value;
|
|
lossless = inst->capabilities[LOSSLESS].value;
|
|
frame_rc = inst->capabilities[FRAME_RC_ENABLE].value;
|
|
frame_rc = inst->capabilities[FRAME_RC_ENABLE].value;
|
|
@@ -892,11 +877,6 @@ int msm_vidc_adjust_profile(void *instance, struct v4l2_ctrl *ctrl)
|
|
struct msm_vidc_inst *inst = (struct msm_vidc_inst *) instance;
|
|
struct msm_vidc_inst *inst = (struct msm_vidc_inst *) instance;
|
|
s32 pix_fmt = -1;
|
|
s32 pix_fmt = -1;
|
|
|
|
|
|
- if (!inst) {
|
|
|
|
- d_vpr_e("%s: invalid params\n", __func__);
|
|
|
|
- return -EINVAL;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
adjusted_value = ctrl ? ctrl->val : inst->capabilities[PROFILE].value;
|
|
adjusted_value = ctrl ? ctrl->val : inst->capabilities[PROFILE].value;
|
|
|
|
|
|
/* PIX_FMTS dependency is common across all chipsets.
|
|
/* PIX_FMTS dependency is common across all chipsets.
|
|
@@ -935,11 +915,6 @@ int msm_vidc_adjust_ltr_count(void *instance, struct v4l2_ctrl *ctrl)
|
|
s32 layer_type = -1, enh_layer_count = -1;
|
|
s32 layer_type = -1, enh_layer_count = -1;
|
|
u32 num_ref_frames = 0, max_exceeding_ref_frames = 0;
|
|
u32 num_ref_frames = 0, max_exceeding_ref_frames = 0;
|
|
|
|
|
|
- if (!inst) {
|
|
|
|
- d_vpr_e("%s: invalid params\n", __func__);
|
|
|
|
- return -EINVAL;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
adjusted_value = ctrl ? ctrl->val : inst->capabilities[LTR_COUNT].value;
|
|
adjusted_value = ctrl ? ctrl->val : inst->capabilities[LTR_COUNT].value;
|
|
|
|
|
|
if (msm_vidc_get_parent_value(inst, LTR_COUNT, BITRATE_MODE,
|
|
if (msm_vidc_get_parent_value(inst, LTR_COUNT, BITRATE_MODE,
|
|
@@ -1011,11 +986,6 @@ int msm_vidc_adjust_use_ltr(void *instance, struct v4l2_ctrl *ctrl)
|
|
s32 adjusted_value, ltr_count;
|
|
s32 adjusted_value, ltr_count;
|
|
struct msm_vidc_inst *inst = (struct msm_vidc_inst *) instance;
|
|
struct msm_vidc_inst *inst = (struct msm_vidc_inst *) instance;
|
|
|
|
|
|
- if (!inst) {
|
|
|
|
- d_vpr_e("%s: invalid params\n", __func__);
|
|
|
|
- return -EINVAL;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
adjusted_value = ctrl ? ctrl->val : inst->capabilities[USE_LTR].value;
|
|
adjusted_value = ctrl ? ctrl->val : inst->capabilities[USE_LTR].value;
|
|
|
|
|
|
/*
|
|
/*
|
|
@@ -1051,11 +1021,6 @@ int msm_vidc_adjust_mark_ltr(void *instance, struct v4l2_ctrl *ctrl)
|
|
s32 adjusted_value, ltr_count;
|
|
s32 adjusted_value, ltr_count;
|
|
struct msm_vidc_inst *inst = (struct msm_vidc_inst *) instance;
|
|
struct msm_vidc_inst *inst = (struct msm_vidc_inst *) instance;
|
|
|
|
|
|
- if (!inst) {
|
|
|
|
- d_vpr_e("%s: invalid params\n", __func__);
|
|
|
|
- return -EINVAL;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
adjusted_value = ctrl ? ctrl->val : inst->capabilities[MARK_LTR].value;
|
|
adjusted_value = ctrl ? ctrl->val : inst->capabilities[MARK_LTR].value;
|
|
|
|
|
|
/*
|
|
/*
|
|
@@ -1088,11 +1053,6 @@ int msm_vidc_adjust_delta_based_rc(void *instance, struct v4l2_ctrl *ctrl)
|
|
struct msm_vidc_inst *inst = (struct msm_vidc_inst *) instance;
|
|
struct msm_vidc_inst *inst = (struct msm_vidc_inst *) instance;
|
|
s32 rc_type = -1;
|
|
s32 rc_type = -1;
|
|
|
|
|
|
- if (!inst) {
|
|
|
|
- d_vpr_e("%s: invalid params\n", __func__);
|
|
|
|
- return -EINVAL;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
adjusted_value = ctrl ? ctrl->val :
|
|
adjusted_value = ctrl ? ctrl->val :
|
|
inst->capabilities[TIME_DELTA_BASED_RC].value;
|
|
inst->capabilities[TIME_DELTA_BASED_RC].value;
|
|
|
|
|
|
@@ -1117,11 +1077,6 @@ int msm_vidc_adjust_output_order(void *instance, struct v4l2_ctrl *ctrl)
|
|
s32 tn_mode = -1, display_delay = -1, display_delay_enable = -1;
|
|
s32 tn_mode = -1, display_delay = -1, display_delay_enable = -1;
|
|
u32 adjusted_value;
|
|
u32 adjusted_value;
|
|
|
|
|
|
- if (!inst) {
|
|
|
|
- d_vpr_e("%s: invalid params\n", __func__);
|
|
|
|
- return -EINVAL;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
adjusted_value = ctrl ? ctrl->val :
|
|
adjusted_value = ctrl ? ctrl->val :
|
|
inst->capabilities[OUTPUT_ORDER].value;
|
|
inst->capabilities[OUTPUT_ORDER].value;
|
|
|
|
|
|
@@ -1155,11 +1110,6 @@ int msm_vidc_adjust_input_buf_host_max_count(void *instance, struct v4l2_ctrl *c
|
|
|
|
|
|
u32 adjusted_value;
|
|
u32 adjusted_value;
|
|
|
|
|
|
- if (!inst) {
|
|
|
|
- d_vpr_e("%s: invalid params\n", __func__);
|
|
|
|
- return -EINVAL;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
adjusted_value = ctrl ? ctrl->val :
|
|
adjusted_value = ctrl ? ctrl->val :
|
|
inst->capabilities[INPUT_BUF_HOST_MAX_COUNT].value;
|
|
inst->capabilities[INPUT_BUF_HOST_MAX_COUNT].value;
|
|
|
|
|
|
@@ -1178,11 +1128,6 @@ int msm_vidc_adjust_output_buf_host_max_count(void *instance, struct v4l2_ctrl *
|
|
|
|
|
|
u32 adjusted_value;
|
|
u32 adjusted_value;
|
|
|
|
|
|
- if (!inst) {
|
|
|
|
- d_vpr_e("%s: invalid params\n", __func__);
|
|
|
|
- return -EINVAL;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
adjusted_value = ctrl ? ctrl->val :
|
|
adjusted_value = ctrl ? ctrl->val :
|
|
inst->capabilities[OUTPUT_BUF_HOST_MAX_COUNT].value;
|
|
inst->capabilities[OUTPUT_BUF_HOST_MAX_COUNT].value;
|
|
|
|
|
|
@@ -1202,11 +1147,6 @@ int msm_vidc_adjust_transform_8x8(void *instance, struct v4l2_ctrl *ctrl)
|
|
struct msm_vidc_inst *inst = (struct msm_vidc_inst *) instance;
|
|
struct msm_vidc_inst *inst = (struct msm_vidc_inst *) instance;
|
|
s32 profile = -1;
|
|
s32 profile = -1;
|
|
|
|
|
|
- if (!inst) {
|
|
|
|
- d_vpr_e("%s: invalid params\n", __func__);
|
|
|
|
- return -EINVAL;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
adjusted_value = ctrl ? ctrl->val :
|
|
adjusted_value = ctrl ? ctrl->val :
|
|
inst->capabilities[TRANSFORM_8X8].value;
|
|
inst->capabilities[TRANSFORM_8X8].value;
|
|
|
|
|
|
@@ -1237,11 +1177,6 @@ int msm_vidc_adjust_chroma_qp_index_offset(void *instance,
|
|
s32 adjusted_value;
|
|
s32 adjusted_value;
|
|
struct msm_vidc_inst *inst = (struct msm_vidc_inst *) instance;
|
|
struct msm_vidc_inst *inst = (struct msm_vidc_inst *) instance;
|
|
|
|
|
|
- if (!inst) {
|
|
|
|
- d_vpr_e("%s: invalid params\n", __func__);
|
|
|
|
- return -EINVAL;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
adjusted_value = ctrl ? ctrl->val :
|
|
adjusted_value = ctrl ? ctrl->val :
|
|
inst->capabilities[CHROMA_QP_INDEX_OFFSET].value;
|
|
inst->capabilities[CHROMA_QP_INDEX_OFFSET].value;
|
|
|
|
|
|
@@ -1306,11 +1241,6 @@ int msm_vidc_adjust_slice_count(void *instance, struct v4l2_ctrl *ctrl)
|
|
u32 update_cap, max_avg_slicesize, output_width, output_height;
|
|
u32 update_cap, max_avg_slicesize, output_width, output_height;
|
|
u32 min_width, min_height, max_width, max_height, fps;
|
|
u32 min_width, min_height, max_width, max_height, fps;
|
|
|
|
|
|
- if (!inst) {
|
|
|
|
- d_vpr_e("%s: invalid params\n", __func__);
|
|
|
|
- return -EINVAL;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
slice_mode = ctrl ? ctrl->val :
|
|
slice_mode = ctrl ? ctrl->val :
|
|
inst->capabilities[SLICE_MODE].value;
|
|
inst->capabilities[SLICE_MODE].value;
|
|
|
|
|
|
@@ -1437,11 +1367,6 @@ static int msm_vidc_adjust_static_layer_count_and_type(struct msm_vidc_inst *ins
|
|
{
|
|
{
|
|
bool hb_requested = false;
|
|
bool hb_requested = false;
|
|
|
|
|
|
- if (!inst) {
|
|
|
|
- d_vpr_e("%s: invalid params\n", __func__);
|
|
|
|
- return -EINVAL;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
if (!layer_count) {
|
|
if (!layer_count) {
|
|
i_vpr_h(inst, "client not enabled layer encoding\n");
|
|
i_vpr_h(inst, "client not enabled layer encoding\n");
|
|
goto exit;
|
|
goto exit;
|
|
@@ -1523,11 +1448,6 @@ int msm_vidc_adjust_layer_count(void *instance, struct v4l2_ctrl *ctrl)
|
|
s32 client_layer_count;
|
|
s32 client_layer_count;
|
|
struct msm_vidc_inst *inst = (struct msm_vidc_inst *) instance;
|
|
struct msm_vidc_inst *inst = (struct msm_vidc_inst *) instance;
|
|
|
|
|
|
- if (!inst) {
|
|
|
|
- d_vpr_e("%s: invalid params\n", __func__);
|
|
|
|
- return -EINVAL;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
client_layer_count = ctrl ? ctrl->val :
|
|
client_layer_count = ctrl ? ctrl->val :
|
|
inst->capabilities[ENH_LAYER_COUNT].value;
|
|
inst->capabilities[ENH_LAYER_COUNT].value;
|
|
|
|
|
|
@@ -1572,11 +1492,6 @@ int msm_vidc_adjust_gop_size(void *instance, struct v4l2_ctrl *ctrl)
|
|
s32 adjusted_value, enh_layer_count = -1;
|
|
s32 adjusted_value, enh_layer_count = -1;
|
|
u32 min_gop_size, num_subgops;
|
|
u32 min_gop_size, num_subgops;
|
|
|
|
|
|
- if (!inst) {
|
|
|
|
- d_vpr_e("%s: invalid params\n", __func__);
|
|
|
|
- return -EINVAL;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
adjusted_value = ctrl ? ctrl->val : inst->capabilities[GOP_SIZE].value;
|
|
adjusted_value = ctrl ? ctrl->val : inst->capabilities[GOP_SIZE].value;
|
|
|
|
|
|
if (msm_vidc_get_parent_value(inst, GOP_SIZE,
|
|
if (msm_vidc_get_parent_value(inst, GOP_SIZE,
|
|
@@ -1611,11 +1526,6 @@ int msm_vidc_adjust_b_frame(void *instance, struct v4l2_ctrl *ctrl)
|
|
s32 adjusted_value, enh_layer_count = -1;
|
|
s32 adjusted_value, enh_layer_count = -1;
|
|
const u32 max_bframe_size = 7;
|
|
const u32 max_bframe_size = 7;
|
|
|
|
|
|
- if (!inst) {
|
|
|
|
- d_vpr_e("%s: invalid params\n", __func__);
|
|
|
|
- return -EINVAL;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
adjusted_value = ctrl ? ctrl->val : inst->capabilities[B_FRAME].value;
|
|
adjusted_value = ctrl ? ctrl->val : inst->capabilities[B_FRAME].value;
|
|
|
|
|
|
if (msm_vidc_get_parent_value(inst, B_FRAME,
|
|
if (msm_vidc_get_parent_value(inst, B_FRAME,
|
|
@@ -1647,11 +1557,6 @@ int msm_vidc_adjust_bitrate(void *instance, struct v4l2_ctrl *ctrl)
|
|
u32 layer_br_caps[6] = {L0_BR, L1_BR, L2_BR, L3_BR, L4_BR, L5_BR};
|
|
u32 layer_br_caps[6] = {L0_BR, L1_BR, L2_BR, L3_BR, L4_BR, L5_BR};
|
|
u32 max_bitrate = 0;
|
|
u32 max_bitrate = 0;
|
|
|
|
|
|
- if (!inst) {
|
|
|
|
- d_vpr_e("%s: invalid params\n", __func__);
|
|
|
|
- return -EINVAL;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
/* ignore layer bitrate when total bitrate is set */
|
|
/* ignore layer bitrate when total bitrate is set */
|
|
if (inst->capabilities[BIT_RATE].flags & CAP_FLAG_CLIENT_SET) {
|
|
if (inst->capabilities[BIT_RATE].flags & CAP_FLAG_CLIENT_SET) {
|
|
/*
|
|
/*
|
|
@@ -1738,11 +1643,6 @@ int msm_vidc_adjust_layer_bitrate(void *instance, struct v4l2_ctrl *ctrl)
|
|
u32 old_br = 0, new_br = 0, exceeded_br = 0;
|
|
u32 old_br = 0, new_br = 0, exceeded_br = 0;
|
|
s32 max_bitrate;
|
|
s32 max_bitrate;
|
|
|
|
|
|
- if (!inst) {
|
|
|
|
- d_vpr_e("%s: invalid params\n", __func__);
|
|
|
|
- return -EINVAL;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
if (!ctrl)
|
|
if (!ctrl)
|
|
return 0;
|
|
return 0;
|
|
|
|
|
|
@@ -1813,11 +1713,6 @@ int msm_vidc_adjust_peak_bitrate(void *instance, struct v4l2_ctrl *ctrl)
|
|
struct msm_vidc_inst *inst = (struct msm_vidc_inst *) instance;
|
|
struct msm_vidc_inst *inst = (struct msm_vidc_inst *) instance;
|
|
s32 rc_type = -1, bitrate = -1;
|
|
s32 rc_type = -1, bitrate = -1;
|
|
|
|
|
|
- if (!inst) {
|
|
|
|
- d_vpr_e("%s: invalid params\n", __func__);
|
|
|
|
- return -EINVAL;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
adjusted_value = ctrl ? ctrl->val :
|
|
adjusted_value = ctrl ? ctrl->val :
|
|
inst->capabilities[PEAK_BITRATE].value;
|
|
inst->capabilities[PEAK_BITRATE].value;
|
|
|
|
|
|
@@ -1888,11 +1783,6 @@ int msm_vidc_adjust_hevc_min_qp(void *instance, struct v4l2_ctrl *ctrl)
|
|
|
|
|
|
struct msm_vidc_inst *inst = (struct msm_vidc_inst *) instance;
|
|
struct msm_vidc_inst *inst = (struct msm_vidc_inst *) instance;
|
|
|
|
|
|
- if (!inst) {
|
|
|
|
- d_vpr_e("%s: invalid params\n", __func__);
|
|
|
|
- return -EINVAL;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
if (ctrl)
|
|
if (ctrl)
|
|
msm_vidc_update_cap_value(inst, MIN_FRAME_QP,
|
|
msm_vidc_update_cap_value(inst, MIN_FRAME_QP,
|
|
ctrl->val, __func__);
|
|
ctrl->val, __func__);
|
|
@@ -1908,11 +1798,6 @@ int msm_vidc_adjust_hevc_max_qp(void *instance, struct v4l2_ctrl *ctrl)
|
|
|
|
|
|
struct msm_vidc_inst *inst = (struct msm_vidc_inst *) instance;
|
|
struct msm_vidc_inst *inst = (struct msm_vidc_inst *) instance;
|
|
|
|
|
|
- if (!inst) {
|
|
|
|
- d_vpr_e("%s: invalid params\n", __func__);
|
|
|
|
- return -EINVAL;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
if (ctrl)
|
|
if (ctrl)
|
|
msm_vidc_update_cap_value(inst, MAX_FRAME_QP,
|
|
msm_vidc_update_cap_value(inst, MAX_FRAME_QP,
|
|
ctrl->val, __func__);
|
|
ctrl->val, __func__);
|
|
@@ -1928,11 +1813,6 @@ int msm_vidc_adjust_hevc_i_frame_qp(void *instance, struct v4l2_ctrl *ctrl)
|
|
|
|
|
|
struct msm_vidc_inst *inst = (struct msm_vidc_inst *) instance;
|
|
struct msm_vidc_inst *inst = (struct msm_vidc_inst *) instance;
|
|
|
|
|
|
- if (!inst) {
|
|
|
|
- d_vpr_e("%s: invalid params\n", __func__);
|
|
|
|
- return -EINVAL;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
if (ctrl)
|
|
if (ctrl)
|
|
msm_vidc_update_cap_value(inst, I_FRAME_QP,
|
|
msm_vidc_update_cap_value(inst, I_FRAME_QP,
|
|
ctrl->val, __func__);
|
|
ctrl->val, __func__);
|
|
@@ -1950,11 +1830,6 @@ int msm_vidc_adjust_hevc_p_frame_qp(void *instance, struct v4l2_ctrl *ctrl)
|
|
|
|
|
|
struct msm_vidc_inst *inst = (struct msm_vidc_inst *) instance;
|
|
struct msm_vidc_inst *inst = (struct msm_vidc_inst *) instance;
|
|
|
|
|
|
- if (!inst) {
|
|
|
|
- d_vpr_e("%s: invalid params\n", __func__);
|
|
|
|
- return -EINVAL;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
if (ctrl)
|
|
if (ctrl)
|
|
msm_vidc_update_cap_value(inst, P_FRAME_QP,
|
|
msm_vidc_update_cap_value(inst, P_FRAME_QP,
|
|
ctrl->val, __func__);
|
|
ctrl->val, __func__);
|
|
@@ -1972,11 +1847,6 @@ int msm_vidc_adjust_hevc_b_frame_qp(void *instance, struct v4l2_ctrl *ctrl)
|
|
|
|
|
|
struct msm_vidc_inst *inst = (struct msm_vidc_inst *) instance;
|
|
struct msm_vidc_inst *inst = (struct msm_vidc_inst *) instance;
|
|
|
|
|
|
- if (!inst) {
|
|
|
|
- d_vpr_e("%s: invalid params\n", __func__);
|
|
|
|
- return -EINVAL;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
if (ctrl)
|
|
if (ctrl)
|
|
msm_vidc_update_cap_value(inst, B_FRAME_QP,
|
|
msm_vidc_update_cap_value(inst, B_FRAME_QP,
|
|
ctrl->val, __func__);
|
|
ctrl->val, __func__);
|
|
@@ -1995,11 +1865,6 @@ int msm_vidc_adjust_blur_type(void *instance, struct v4l2_ctrl *ctrl)
|
|
s32 rc_type = -1, roi_enable = -1;
|
|
s32 rc_type = -1, roi_enable = -1;
|
|
s32 pix_fmts = -1, min_quality = -1;
|
|
s32 pix_fmts = -1, min_quality = -1;
|
|
|
|
|
|
- if (!inst) {
|
|
|
|
- d_vpr_e("%s: invalid params\n", __func__);
|
|
|
|
- return -EINVAL;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
adjusted_value = ctrl ? ctrl->val :
|
|
adjusted_value = ctrl ? ctrl->val :
|
|
inst->capabilities[BLUR_TYPES].value;
|
|
inst->capabilities[BLUR_TYPES].value;
|
|
|
|
|
|
@@ -2058,11 +1923,6 @@ int msm_vidc_adjust_all_intra(void *instance, struct v4l2_ctrl *ctrl)
|
|
s32 gop_size = -1, bframe = -1;
|
|
s32 gop_size = -1, bframe = -1;
|
|
u32 width, height, fps, mbps, max_mbps;
|
|
u32 width, height, fps, mbps, max_mbps;
|
|
|
|
|
|
- if (!inst || !inst->core) {
|
|
|
|
- d_vpr_e("%s: invalid params\n", __func__);
|
|
|
|
- return -EINVAL;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
adjusted_value = inst->capabilities[ALL_INTRA].value;
|
|
adjusted_value = inst->capabilities[ALL_INTRA].value;
|
|
|
|
|
|
if (msm_vidc_get_parent_value(inst, ALL_INTRA, GOP_SIZE,
|
|
if (msm_vidc_get_parent_value(inst, ALL_INTRA, GOP_SIZE,
|
|
@@ -2101,11 +1961,6 @@ int msm_vidc_adjust_blur_resolution(void *instance, struct v4l2_ctrl *ctrl)
|
|
struct msm_vidc_inst *inst = (struct msm_vidc_inst *) instance;
|
|
struct msm_vidc_inst *inst = (struct msm_vidc_inst *) instance;
|
|
s32 blur_type = -1;
|
|
s32 blur_type = -1;
|
|
|
|
|
|
- if (!inst) {
|
|
|
|
- d_vpr_e("%s: invalid params\n", __func__);
|
|
|
|
- return -EINVAL;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
adjusted_value = ctrl ? ctrl->val :
|
|
adjusted_value = ctrl ? ctrl->val :
|
|
inst->capabilities[BLUR_RESOLUTION].value;
|
|
inst->capabilities[BLUR_RESOLUTION].value;
|
|
|
|
|
|
@@ -2129,11 +1984,6 @@ int msm_vidc_adjust_brs(void *instance, struct v4l2_ctrl *ctrl)
|
|
s32 rc_type = -1, layer_enabled = -1, layer_type = -1;
|
|
s32 rc_type = -1, layer_enabled = -1, layer_type = -1;
|
|
bool hp_requested = false;
|
|
bool hp_requested = false;
|
|
|
|
|
|
- if (!inst) {
|
|
|
|
- d_vpr_e("%s: invalid params\n", __func__);
|
|
|
|
- return -EINVAL;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
adjusted_value = ctrl ? ctrl->val :
|
|
adjusted_value = ctrl ? ctrl->val :
|
|
inst->capabilities[CONTENT_ADAPTIVE_CODING].value;
|
|
inst->capabilities[CONTENT_ADAPTIVE_CODING].value;
|
|
|
|
|
|
@@ -2188,11 +2038,6 @@ int msm_vidc_adjust_bitrate_boost(void *instance, struct v4l2_ctrl *ctrl)
|
|
s32 min_quality = -1, rc_type = -1;
|
|
s32 min_quality = -1, rc_type = -1;
|
|
u32 max_bitrate = 0, bitrate = 0;
|
|
u32 max_bitrate = 0, bitrate = 0;
|
|
|
|
|
|
- if (!inst) {
|
|
|
|
- d_vpr_e("%s: invalid params\n", __func__);
|
|
|
|
- return -EINVAL;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
adjusted_value = ctrl ? ctrl->val :
|
|
adjusted_value = ctrl ? ctrl->val :
|
|
inst->capabilities[BITRATE_BOOST].value;
|
|
inst->capabilities[BITRATE_BOOST].value;
|
|
|
|
|
|
@@ -2245,11 +2090,6 @@ int msm_vidc_adjust_min_quality(void *instance, struct v4l2_ctrl *ctrl)
|
|
u32 width, height, frame_rate;
|
|
u32 width, height, frame_rate;
|
|
struct v4l2_format *f;
|
|
struct v4l2_format *f;
|
|
|
|
|
|
- if (!inst) {
|
|
|
|
- d_vpr_e("%s: invalid params\n", __func__);
|
|
|
|
- return -EINVAL;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
adjusted_value = ctrl ? ctrl->val : inst->capabilities[MIN_QUALITY].value;
|
|
adjusted_value = ctrl ? ctrl->val : inst->capabilities[MIN_QUALITY].value;
|
|
|
|
|
|
/*
|
|
/*
|
|
@@ -2358,11 +2198,6 @@ int msm_vidc_adjust_preprocess(void *instance, struct v4l2_ctrl *ctrl)
|
|
u32 width, height, frame_rate, operating_rate, max_fps;
|
|
u32 width, height, frame_rate, operating_rate, max_fps;
|
|
struct v4l2_format *f;
|
|
struct v4l2_format *f;
|
|
|
|
|
|
- if (!inst || !inst->core) {
|
|
|
|
- d_vpr_e("%s: invalid params\n", __func__);
|
|
|
|
- return -EINVAL;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
adjusted_value = inst->capabilities[REQUEST_PREPROCESS].value;
|
|
adjusted_value = inst->capabilities[REQUEST_PREPROCESS].value;
|
|
|
|
|
|
width = inst->crop.width;
|
|
width = inst->crop.width;
|
|
@@ -2413,11 +2248,6 @@ int msm_vidc_adjust_enc_lowlatency_mode(void *instance, struct v4l2_ctrl *ctrl)
|
|
struct msm_vidc_inst *inst = (struct msm_vidc_inst *) instance;
|
|
struct msm_vidc_inst *inst = (struct msm_vidc_inst *) instance;
|
|
s32 rc_type = -1;
|
|
s32 rc_type = -1;
|
|
|
|
|
|
- if (!inst) {
|
|
|
|
- d_vpr_e("%s: invalid params\n", __func__);
|
|
|
|
- return -EINVAL;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
adjusted_value = ctrl ? ctrl->val :
|
|
adjusted_value = ctrl ? ctrl->val :
|
|
inst->capabilities[LOWLATENCY_MODE].value;
|
|
inst->capabilities[LOWLATENCY_MODE].value;
|
|
|
|
|
|
@@ -2442,11 +2272,6 @@ int msm_vidc_adjust_dec_lowlatency_mode(void *instance, struct v4l2_ctrl *ctrl)
|
|
struct msm_vidc_inst *inst = (struct msm_vidc_inst *) instance;
|
|
struct msm_vidc_inst *inst = (struct msm_vidc_inst *) instance;
|
|
s32 outbuf_fence = MSM_VIDC_META_DISABLE;
|
|
s32 outbuf_fence = MSM_VIDC_META_DISABLE;
|
|
|
|
|
|
- if (!inst) {
|
|
|
|
- d_vpr_e("%s: invalid params\n", __func__);
|
|
|
|
- return -EINVAL;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
adjusted_value = ctrl ? ctrl->val :
|
|
adjusted_value = ctrl ? ctrl->val :
|
|
inst->capabilities[LOWLATENCY_MODE].value;
|
|
inst->capabilities[LOWLATENCY_MODE].value;
|
|
|
|
|
|
@@ -2472,10 +2297,6 @@ int msm_vidc_adjust_session_priority(void *instance, struct v4l2_ctrl *ctrl)
|
|
|
|
|
|
struct msm_vidc_inst *inst = (struct msm_vidc_inst *)instance;
|
|
struct msm_vidc_inst *inst = (struct msm_vidc_inst *)instance;
|
|
|
|
|
|
- if (!inst) {
|
|
|
|
- d_vpr_e("%s: invalid params\n", __func__);
|
|
|
|
- return -EINVAL;
|
|
|
|
- }
|
|
|
|
/*
|
|
/*
|
|
* Priority handling
|
|
* Priority handling
|
|
* Client will set 0 (realtime), (1 to 4) (non-realtime)
|
|
* Client will set 0 (realtime), (1 to 4) (non-realtime)
|
|
@@ -2510,11 +2331,6 @@ int msm_vidc_adjust_roi_info(void *instance, struct v4l2_ctrl *ctrl)
|
|
struct msm_vidc_inst *inst = (struct msm_vidc_inst *) instance;
|
|
struct msm_vidc_inst *inst = (struct msm_vidc_inst *) instance;
|
|
s32 rc_type = -1, pix_fmt = -1;
|
|
s32 rc_type = -1, pix_fmt = -1;
|
|
|
|
|
|
- if (!inst) {
|
|
|
|
- d_vpr_e("%s: invalid params\n", __func__);
|
|
|
|
- return -EINVAL;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
adjusted_value = ctrl ? ctrl->val : inst->capabilities[META_ROI_INFO].value;
|
|
adjusted_value = ctrl ? ctrl->val : inst->capabilities[META_ROI_INFO].value;
|
|
|
|
|
|
if (msm_vidc_get_parent_value(inst, META_ROI_INFO, BITRATE_MODE,
|
|
if (msm_vidc_get_parent_value(inst, META_ROI_INFO, BITRATE_MODE,
|
|
@@ -2542,11 +2358,6 @@ int msm_vidc_adjust_dec_outbuf_fence(void *instance, struct v4l2_ctrl *ctrl)
|
|
u32 adjusted_value = 0;
|
|
u32 adjusted_value = 0;
|
|
s32 picture_order = -1;
|
|
s32 picture_order = -1;
|
|
|
|
|
|
- if (!inst) {
|
|
|
|
- d_vpr_e("%s: invalid params\n", __func__);
|
|
|
|
- return -EINVAL;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
adjusted_value = ctrl ? ctrl->val : inst->capabilities[META_OUTBUF_FENCE].value;
|
|
adjusted_value = ctrl ? ctrl->val : inst->capabilities[META_OUTBUF_FENCE].value;
|
|
|
|
|
|
if (msm_vidc_get_parent_value(inst, META_OUTBUF_FENCE, OUTPUT_ORDER,
|
|
if (msm_vidc_get_parent_value(inst, META_OUTBUF_FENCE, OUTPUT_ORDER,
|
|
@@ -2572,10 +2383,6 @@ int msm_vidc_adjust_dec_outbuf_fence_type(void *instance, struct v4l2_ctrl *ctrl
|
|
struct msm_vidc_inst *inst = (struct msm_vidc_inst *) instance;
|
|
struct msm_vidc_inst *inst = (struct msm_vidc_inst *) instance;
|
|
struct msm_vidc_core *core;
|
|
struct msm_vidc_core *core;
|
|
|
|
|
|
- if (!inst || !inst->core) {
|
|
|
|
- d_vpr_e("%s: invalid params\n", __func__);
|
|
|
|
- return -EINVAL;
|
|
|
|
- }
|
|
|
|
capability = inst->capabilities;
|
|
capability = inst->capabilities;
|
|
core = inst->core;
|
|
core = inst->core;
|
|
|
|
|
|
@@ -2608,10 +2415,6 @@ int msm_vidc_adjust_dec_outbuf_fence_direction(void *instance, struct v4l2_ctrl
|
|
struct msm_vidc_inst *inst = (struct msm_vidc_inst *) instance;
|
|
struct msm_vidc_inst *inst = (struct msm_vidc_inst *) instance;
|
|
struct msm_vidc_core *core;
|
|
struct msm_vidc_core *core;
|
|
|
|
|
|
- if (!inst || !inst->core) {
|
|
|
|
- d_vpr_e("%s: invalid params\n", __func__);
|
|
|
|
- return -EINVAL;
|
|
|
|
- }
|
|
|
|
capability = inst->capabilities;
|
|
capability = inst->capabilities;
|
|
core = inst->core;
|
|
core = inst->core;
|
|
|
|
|
|
@@ -2642,11 +2445,6 @@ int msm_vidc_adjust_dec_slice_mode(void *instance, struct v4l2_ctrl *ctrl)
|
|
s32 picture_order = -1;
|
|
s32 picture_order = -1;
|
|
s32 outbuf_fence = 0;
|
|
s32 outbuf_fence = 0;
|
|
|
|
|
|
- if (!inst) {
|
|
|
|
- d_vpr_e("%s: invalid params\n", __func__);
|
|
|
|
- return -EINVAL;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
adjusted_value = ctrl ? ctrl->val : inst->capabilities[SLICE_DECODE].value;
|
|
adjusted_value = ctrl ? ctrl->val : inst->capabilities[SLICE_DECODE].value;
|
|
|
|
|
|
if (msm_vidc_get_parent_value(inst, SLICE_DECODE, LOWLATENCY_MODE,
|
|
if (msm_vidc_get_parent_value(inst, SLICE_DECODE, LOWLATENCY_MODE,
|
|
@@ -2673,11 +2471,6 @@ int msm_vidc_adjust_eva_stats(void *instance, struct v4l2_ctrl *ctrl)
|
|
struct msm_vidc_inst *inst = (struct msm_vidc_inst *) instance;
|
|
struct msm_vidc_inst *inst = (struct msm_vidc_inst *) instance;
|
|
s32 rc_type = -1;
|
|
s32 rc_type = -1;
|
|
|
|
|
|
- if (!inst) {
|
|
|
|
- d_vpr_e("%s: invalid params\n", __func__);
|
|
|
|
- return -EINVAL;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
adjusted_value = ctrl ? ctrl->val : inst->capabilities[META_EVA_STATS].value;
|
|
adjusted_value = ctrl ? ctrl->val : inst->capabilities[META_EVA_STATS].value;
|
|
|
|
|
|
if (msm_vidc_get_parent_value(inst, META_EVA_STATS, BITRATE_MODE,
|
|
if (msm_vidc_get_parent_value(inst, META_EVA_STATS, BITRATE_MODE,
|
|
@@ -2702,11 +2495,6 @@ int msm_vidc_adjust_sei_mastering_disp(void *instance, struct v4l2_ctrl *ctrl)
|
|
struct msm_vidc_inst *inst = (struct msm_vidc_inst *) instance;
|
|
struct msm_vidc_inst *inst = (struct msm_vidc_inst *) instance;
|
|
s32 profile = -1;
|
|
s32 profile = -1;
|
|
|
|
|
|
- if (!inst) {
|
|
|
|
- d_vpr_e("%s: invalid params\n", __func__);
|
|
|
|
- return -EINVAL;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
adjusted_value = ctrl ? ctrl->val : inst->capabilities[META_SEI_MASTERING_DISP].value;
|
|
adjusted_value = ctrl ? ctrl->val : inst->capabilities[META_SEI_MASTERING_DISP].value;
|
|
|
|
|
|
if (msm_vidc_get_parent_value(inst, META_SEI_MASTERING_DISP, PROFILE,
|
|
if (msm_vidc_get_parent_value(inst, META_SEI_MASTERING_DISP, PROFILE,
|
|
@@ -2738,11 +2526,6 @@ int msm_vidc_adjust_sei_cll(void *instance, struct v4l2_ctrl *ctrl)
|
|
struct msm_vidc_inst *inst = (struct msm_vidc_inst *) instance;
|
|
struct msm_vidc_inst *inst = (struct msm_vidc_inst *) instance;
|
|
s32 profile = -1;
|
|
s32 profile = -1;
|
|
|
|
|
|
- if (!inst) {
|
|
|
|
- d_vpr_e("%s: invalid params\n", __func__);
|
|
|
|
- return -EINVAL;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
adjusted_value = ctrl ? ctrl->val : inst->capabilities[META_SEI_CLL].value;
|
|
adjusted_value = ctrl ? ctrl->val : inst->capabilities[META_SEI_CLL].value;
|
|
|
|
|
|
if (msm_vidc_get_parent_value(inst, META_SEI_CLL, PROFILE,
|
|
if (msm_vidc_get_parent_value(inst, META_SEI_CLL, PROFILE,
|
|
@@ -2773,11 +2556,6 @@ int msm_vidc_adjust_hdr10plus(void *instance, struct v4l2_ctrl *ctrl)
|
|
struct msm_vidc_inst *inst = (struct msm_vidc_inst *) instance;
|
|
struct msm_vidc_inst *inst = (struct msm_vidc_inst *) instance;
|
|
s32 profile = -1;
|
|
s32 profile = -1;
|
|
|
|
|
|
- if (!inst) {
|
|
|
|
- d_vpr_e("%s: invalid params\n", __func__);
|
|
|
|
- return -EINVAL;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
adjusted_value = ctrl ? ctrl->val : inst->capabilities[META_HDR10PLUS].value;
|
|
adjusted_value = ctrl ? ctrl->val : inst->capabilities[META_HDR10PLUS].value;
|
|
|
|
|
|
if (msm_vidc_get_parent_value(inst, META_HDR10PLUS, PROFILE,
|
|
if (msm_vidc_get_parent_value(inst, META_HDR10PLUS, PROFILE,
|
|
@@ -2810,11 +2588,6 @@ int msm_vidc_adjust_transcoding_stats(void *instance, struct v4l2_ctrl *ctrl)
|
|
u32 width, height, fps;
|
|
u32 width, height, fps;
|
|
struct v4l2_format *f;
|
|
struct v4l2_format *f;
|
|
|
|
|
|
- if (!inst) {
|
|
|
|
- d_vpr_e("%s: invalid params\n", __func__);
|
|
|
|
- return -EINVAL;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
adjusted_value = ctrl ? ctrl->val :
|
|
adjusted_value = ctrl ? ctrl->val :
|
|
inst->capabilities[META_TRANSCODING_STAT_INFO].value;
|
|
inst->capabilities[META_TRANSCODING_STAT_INFO].value;
|
|
|
|
|
|
@@ -2872,12 +2645,6 @@ int msm_vidc_set_header_mode(void *instance,
|
|
int header_mode, prepend_sps_pps;
|
|
int header_mode, prepend_sps_pps;
|
|
u32 hfi_value = 0;
|
|
u32 hfi_value = 0;
|
|
|
|
|
|
-
|
|
|
|
- if (!inst) {
|
|
|
|
- d_vpr_e("%s: invalid params\n", __func__);
|
|
|
|
- return -EINVAL;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
header_mode = inst->capabilities[cap_id].value;
|
|
header_mode = inst->capabilities[cap_id].value;
|
|
prepend_sps_pps = inst->capabilities[PREPEND_SPSPPS_TO_IDR].value;
|
|
prepend_sps_pps = inst->capabilities[PREPEND_SPSPPS_TO_IDR].value;
|
|
|
|
|
|
@@ -2908,12 +2675,6 @@ int msm_vidc_set_deblock_mode(void *instance,
|
|
s32 alpha = 0, beta = 0;
|
|
s32 alpha = 0, beta = 0;
|
|
u32 lf_mode, hfi_value = 0, lf_offset = 6;
|
|
u32 lf_mode, hfi_value = 0, lf_offset = 6;
|
|
|
|
|
|
-
|
|
|
|
- if (!inst) {
|
|
|
|
- d_vpr_e("%s: invalid params\n", __func__);
|
|
|
|
- return -EINVAL;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
rc = msm_vidc_v4l2_to_hfi_enum(inst, LF_MODE, &lf_mode);
|
|
rc = msm_vidc_v4l2_to_hfi_enum(inst, LF_MODE, &lf_mode);
|
|
if (rc)
|
|
if (rc)
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
@@ -2938,11 +2699,6 @@ int msm_vidc_set_constant_quality(void *instance,
|
|
u32 hfi_value = 0;
|
|
u32 hfi_value = 0;
|
|
s32 rc_type = -1;
|
|
s32 rc_type = -1;
|
|
|
|
|
|
- if (!inst) {
|
|
|
|
- d_vpr_e("%s: invalid params\n", __func__);
|
|
|
|
- return -EINVAL;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
if (msm_vidc_get_parent_value(inst, cap_id,
|
|
if (msm_vidc_get_parent_value(inst, cap_id,
|
|
BITRATE_MODE, &rc_type, __func__))
|
|
BITRATE_MODE, &rc_type, __func__))
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
@@ -2968,11 +2724,6 @@ int msm_vidc_set_vbr_related_properties(void *instance,
|
|
u32 hfi_value = 0;
|
|
u32 hfi_value = 0;
|
|
s32 rc_type = -1;
|
|
s32 rc_type = -1;
|
|
|
|
|
|
- if (!inst) {
|
|
|
|
- d_vpr_e("%s: invalid params\n", __func__);
|
|
|
|
- return -EINVAL;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
if (msm_vidc_get_parent_value(inst, cap_id,
|
|
if (msm_vidc_get_parent_value(inst, cap_id,
|
|
BITRATE_MODE, &rc_type, __func__))
|
|
BITRATE_MODE, &rc_type, __func__))
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
@@ -2998,11 +2749,6 @@ int msm_vidc_set_cbr_related_properties(void *instance,
|
|
u32 hfi_value = 0;
|
|
u32 hfi_value = 0;
|
|
s32 rc_type = -1;
|
|
s32 rc_type = -1;
|
|
|
|
|
|
- if (!inst) {
|
|
|
|
- d_vpr_e("%s: invalid params\n", __func__);
|
|
|
|
- return -EINVAL;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
if (msm_vidc_get_parent_value(inst, cap_id,
|
|
if (msm_vidc_get_parent_value(inst, cap_id,
|
|
BITRATE_MODE, &rc_type, __func__))
|
|
BITRATE_MODE, &rc_type, __func__))
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
@@ -3028,11 +2774,6 @@ int msm_vidc_set_use_and_mark_ltr(void *instance,
|
|
struct msm_vidc_inst *inst = (struct msm_vidc_inst *)instance;
|
|
struct msm_vidc_inst *inst = (struct msm_vidc_inst *)instance;
|
|
u32 hfi_value = 0;
|
|
u32 hfi_value = 0;
|
|
|
|
|
|
- if (!inst) {
|
|
|
|
- d_vpr_e("%s: invalid params\n", __func__);
|
|
|
|
- return -EINVAL;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
if (!inst->capabilities[LTR_COUNT].value ||
|
|
if (!inst->capabilities[LTR_COUNT].value ||
|
|
(inst->capabilities[cap_id].value ==
|
|
(inst->capabilities[cap_id].value ==
|
|
INVALID_DEFAULT_MARK_OR_USE_LTR)) {
|
|
INVALID_DEFAULT_MARK_OR_USE_LTR)) {
|
|
@@ -3065,11 +2806,6 @@ int msm_vidc_set_min_qp(void *instance,
|
|
u32 i_qp_enable = 0, p_qp_enable = 0, b_qp_enable = 0;
|
|
u32 i_qp_enable = 0, p_qp_enable = 0, b_qp_enable = 0;
|
|
u32 client_qp_enable = 0, hfi_value = 0, offset = 0;
|
|
u32 client_qp_enable = 0, hfi_value = 0, offset = 0;
|
|
|
|
|
|
- if (!inst) {
|
|
|
|
- d_vpr_e("%s: invalid params\n", __func__);
|
|
|
|
- return -EINVAL;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
if (inst->capabilities[MIN_FRAME_QP].flags & CAP_FLAG_CLIENT_SET)
|
|
if (inst->capabilities[MIN_FRAME_QP].flags & CAP_FLAG_CLIENT_SET)
|
|
min_qp_enable = 1;
|
|
min_qp_enable = 1;
|
|
|
|
|
|
@@ -3129,11 +2865,6 @@ int msm_vidc_set_max_qp(void *instance,
|
|
u32 i_qp_enable = 0, p_qp_enable = 0, b_qp_enable = 0;
|
|
u32 i_qp_enable = 0, p_qp_enable = 0, b_qp_enable = 0;
|
|
u32 client_qp_enable = 0, hfi_value = 0, offset = 0;
|
|
u32 client_qp_enable = 0, hfi_value = 0, offset = 0;
|
|
|
|
|
|
- if (!inst) {
|
|
|
|
- d_vpr_e("%s: invalid params\n", __func__);
|
|
|
|
- return -EINVAL;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
if (inst->capabilities[MAX_FRAME_QP].flags & CAP_FLAG_CLIENT_SET)
|
|
if (inst->capabilities[MAX_FRAME_QP].flags & CAP_FLAG_CLIENT_SET)
|
|
max_qp_enable = 1;
|
|
max_qp_enable = 1;
|
|
|
|
|
|
@@ -3193,11 +2924,6 @@ int msm_vidc_set_frame_qp(void *instance,
|
|
u32 i_qp_enable = 0, p_qp_enable = 0, b_qp_enable = 0;
|
|
u32 i_qp_enable = 0, p_qp_enable = 0, b_qp_enable = 0;
|
|
u32 client_qp_enable = 0, hfi_value = 0, offset = 0;
|
|
u32 client_qp_enable = 0, hfi_value = 0, offset = 0;
|
|
s32 rc_type = -1;
|
|
s32 rc_type = -1;
|
|
-
|
|
|
|
- if (!inst) {
|
|
|
|
- d_vpr_e("%s: invalid params\n", __func__);
|
|
|
|
- return -EINVAL;
|
|
|
|
- }
|
|
|
|
capab = inst->capabilities;
|
|
capab = inst->capabilities;
|
|
|
|
|
|
if (msm_vidc_get_parent_value(inst, cap_id,
|
|
if (msm_vidc_get_parent_value(inst, cap_id,
|
|
@@ -3260,11 +2986,6 @@ int msm_vidc_set_req_sync_frame(void *instance,
|
|
s32 prepend_spspps;
|
|
s32 prepend_spspps;
|
|
u32 hfi_value = 0;
|
|
u32 hfi_value = 0;
|
|
|
|
|
|
- if (!inst) {
|
|
|
|
- d_vpr_e("%s: invalid params\n", __func__);
|
|
|
|
- return -EINVAL;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
prepend_spspps = inst->capabilities[PREPEND_SPSPPS_TO_IDR].value;
|
|
prepend_spspps = inst->capabilities[PREPEND_SPSPPS_TO_IDR].value;
|
|
if (prepend_spspps)
|
|
if (prepend_spspps)
|
|
hfi_value = HFI_SYNC_FRAME_REQUEST_WITH_PREFIX_SEQ_HDR;
|
|
hfi_value = HFI_SYNC_FRAME_REQUEST_WITH_PREFIX_SEQ_HDR;
|
|
@@ -3287,11 +3008,6 @@ int msm_vidc_set_chroma_qp_index_offset(void *instance,
|
|
u32 hfi_value = 0, chroma_qp_offset_mode = 0, chroma_qp = 0;
|
|
u32 hfi_value = 0, chroma_qp_offset_mode = 0, chroma_qp = 0;
|
|
u32 offset = 12;
|
|
u32 offset = 12;
|
|
|
|
|
|
- if (!inst) {
|
|
|
|
- d_vpr_e("%s: invalid params\n", __func__);
|
|
|
|
- return -EINVAL;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
if (inst->capabilities[cap_id].flags & CAP_FLAG_CLIENT_SET)
|
|
if (inst->capabilities[cap_id].flags & CAP_FLAG_CLIENT_SET)
|
|
chroma_qp_offset_mode = HFI_FIXED_CHROMAQP_OFFSET;
|
|
chroma_qp_offset_mode = HFI_FIXED_CHROMAQP_OFFSET;
|
|
else
|
|
else
|
|
@@ -3316,11 +3032,6 @@ int msm_vidc_set_slice_count(void *instance,
|
|
s32 slice_mode = -1;
|
|
s32 slice_mode = -1;
|
|
u32 hfi_value = 0, set_cap_id = 0;
|
|
u32 hfi_value = 0, set_cap_id = 0;
|
|
|
|
|
|
- if (!inst) {
|
|
|
|
- d_vpr_e("%s: invalid params\n", __func__);
|
|
|
|
- return -EINVAL;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
slice_mode = inst->capabilities[SLICE_MODE].value;
|
|
slice_mode = inst->capabilities[SLICE_MODE].value;
|
|
|
|
|
|
if (slice_mode == V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_SINGLE) {
|
|
if (slice_mode == V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_SINGLE) {
|
|
@@ -3353,11 +3064,6 @@ int msm_vidc_set_nal_length(void *instance,
|
|
struct msm_vidc_inst *inst = (struct msm_vidc_inst *)instance;
|
|
struct msm_vidc_inst *inst = (struct msm_vidc_inst *)instance;
|
|
u32 hfi_value = HFI_NAL_LENGTH_STARTCODES;
|
|
u32 hfi_value = HFI_NAL_LENGTH_STARTCODES;
|
|
|
|
|
|
- if (!inst) {
|
|
|
|
- d_vpr_e("%s: invalid params\n", __func__);
|
|
|
|
- return -EINVAL;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
if (!inst->capabilities[WITHOUT_STARTCODE].value) {
|
|
if (!inst->capabilities[WITHOUT_STARTCODE].value) {
|
|
hfi_value = HFI_NAL_LENGTH_STARTCODES;
|
|
hfi_value = HFI_NAL_LENGTH_STARTCODES;
|
|
} else {
|
|
} else {
|
|
@@ -3381,11 +3087,6 @@ int msm_vidc_set_layer_count_and_type(void *instance,
|
|
struct msm_vidc_inst *inst = (struct msm_vidc_inst *)instance;
|
|
struct msm_vidc_inst *inst = (struct msm_vidc_inst *)instance;
|
|
u32 hfi_layer_count, hfi_layer_type = 0;
|
|
u32 hfi_layer_count, hfi_layer_type = 0;
|
|
|
|
|
|
- if (!inst) {
|
|
|
|
- d_vpr_e("%s: invalid params\n", __func__);
|
|
|
|
- return -EINVAL;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
if (!inst->bufq[OUTPUT_PORT].vb2q->streaming) {
|
|
if (!inst->bufq[OUTPUT_PORT].vb2q->streaming) {
|
|
/* set layer type */
|
|
/* set layer type */
|
|
hfi_layer_type = inst->hfi_layer_type;
|
|
hfi_layer_type = inst->hfi_layer_type;
|
|
@@ -3425,11 +3126,6 @@ int msm_vidc_set_gop_size(void *instance,
|
|
struct msm_vidc_inst *inst = (struct msm_vidc_inst *)instance;
|
|
struct msm_vidc_inst *inst = (struct msm_vidc_inst *)instance;
|
|
u32 hfi_value;
|
|
u32 hfi_value;
|
|
|
|
|
|
- if (!inst) {
|
|
|
|
- d_vpr_e("%s: invalid params\n", __func__);
|
|
|
|
- return -EINVAL;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
if (inst->bufq[OUTPUT_PORT].vb2q->streaming) {
|
|
if (inst->bufq[OUTPUT_PORT].vb2q->streaming) {
|
|
if (inst->hfi_layer_type == HFI_HIER_B) {
|
|
if (inst->hfi_layer_type == HFI_HIER_B) {
|
|
i_vpr_l(inst,
|
|
i_vpr_l(inst,
|
|
@@ -3456,11 +3152,6 @@ int msm_vidc_set_bitrate(void *instance,
|
|
struct msm_vidc_inst *inst = (struct msm_vidc_inst *)instance;
|
|
struct msm_vidc_inst *inst = (struct msm_vidc_inst *)instance;
|
|
u32 hfi_value = 0;
|
|
u32 hfi_value = 0;
|
|
|
|
|
|
- if (!inst) {
|
|
|
|
- d_vpr_e("%s: invalid params\n", __func__);
|
|
|
|
- return -EINVAL;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
/* set Total Bitrate */
|
|
/* set Total Bitrate */
|
|
if (inst->capabilities[BIT_RATE].flags & CAP_FLAG_CLIENT_SET)
|
|
if (inst->capabilities[BIT_RATE].flags & CAP_FLAG_CLIENT_SET)
|
|
goto set_total_bitrate;
|
|
goto set_total_bitrate;
|
|
@@ -3491,11 +3182,6 @@ int msm_vidc_set_layer_bitrate(void *instance,
|
|
struct msm_vidc_inst *inst = (struct msm_vidc_inst *)instance;
|
|
struct msm_vidc_inst *inst = (struct msm_vidc_inst *)instance;
|
|
u32 hfi_value = 0;
|
|
u32 hfi_value = 0;
|
|
|
|
|
|
- if (!inst) {
|
|
|
|
- d_vpr_e("%s: invalid params\n", __func__);
|
|
|
|
- return -EINVAL;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
if (!inst->bufq[OUTPUT_PORT].vb2q->streaming)
|
|
if (!inst->bufq[OUTPUT_PORT].vb2q->streaming)
|
|
return 0;
|
|
return 0;
|
|
|
|
|
|
@@ -3539,11 +3225,6 @@ int msm_vidc_set_session_priority(void *instance,
|
|
u32 hfi_value = 0;
|
|
u32 hfi_value = 0;
|
|
struct msm_vidc_inst *inst = (struct msm_vidc_inst *)instance;
|
|
struct msm_vidc_inst *inst = (struct msm_vidc_inst *)instance;
|
|
|
|
|
|
- if (!inst) {
|
|
|
|
- d_vpr_e("%s: invalid params\n", __func__);
|
|
|
|
- return -EINVAL;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
hfi_value = inst->capabilities[cap_id].value;
|
|
hfi_value = inst->capabilities[cap_id].value;
|
|
if (!is_critical_priority_session(inst))
|
|
if (!is_critical_priority_session(inst))
|
|
hfi_value = inst->capabilities[cap_id].value +
|
|
hfi_value = inst->capabilities[cap_id].value +
|
|
@@ -3564,11 +3245,6 @@ int msm_vidc_set_flip(void *instance,
|
|
u32 hflip, vflip, hfi_value = HFI_DISABLE_FLIP;
|
|
u32 hflip, vflip, hfi_value = HFI_DISABLE_FLIP;
|
|
struct msm_vidc_inst *inst = (struct msm_vidc_inst *)instance;
|
|
struct msm_vidc_inst *inst = (struct msm_vidc_inst *)instance;
|
|
|
|
|
|
- if (!inst) {
|
|
|
|
- d_vpr_e("%s: invalid params\n", __func__);
|
|
|
|
- return -EINVAL;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
hflip = inst->capabilities[HFLIP].value;
|
|
hflip = inst->capabilities[HFLIP].value;
|
|
vflip = inst->capabilities[VFLIP].value;
|
|
vflip = inst->capabilities[VFLIP].value;
|
|
|
|
|
|
@@ -3602,11 +3278,6 @@ int msm_vidc_set_preprocess(void *instance,
|
|
struct msm_vidc_inst *inst = (struct msm_vidc_inst *)instance;
|
|
struct msm_vidc_inst *inst = (struct msm_vidc_inst *)instance;
|
|
u32 hfi_value;
|
|
u32 hfi_value;
|
|
|
|
|
|
- if (!inst) {
|
|
|
|
- d_vpr_e("%s: invalid params\n", __func__);
|
|
|
|
- return -EINVAL;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
rc = msm_vidc_packetize_control(inst, cap_id, HFI_PAYLOAD_U32_ENUM,
|
|
rc = msm_vidc_packetize_control(inst, cap_id, HFI_PAYLOAD_U32_ENUM,
|
|
&hfi_value, sizeof(u32), __func__);
|
|
&hfi_value, sizeof(u32), __func__);
|
|
if (rc)
|
|
if (rc)
|
|
@@ -3622,11 +3293,6 @@ int msm_vidc_set_rotation(void *instance,
|
|
struct msm_vidc_inst *inst = (struct msm_vidc_inst *)instance;
|
|
struct msm_vidc_inst *inst = (struct msm_vidc_inst *)instance;
|
|
u32 hfi_value;
|
|
u32 hfi_value;
|
|
|
|
|
|
- if (!inst) {
|
|
|
|
- d_vpr_e("%s: invalid params\n", __func__);
|
|
|
|
- return -EINVAL;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
rc = msm_vidc_v4l2_to_hfi_enum(inst, cap_id, &hfi_value);
|
|
rc = msm_vidc_v4l2_to_hfi_enum(inst, cap_id, &hfi_value);
|
|
if (rc)
|
|
if (rc)
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
@@ -3647,11 +3313,6 @@ int msm_vidc_set_blur_resolution(void *instance,
|
|
s32 blur_type = -1;
|
|
s32 blur_type = -1;
|
|
u32 hfi_value, blur_width, blur_height;
|
|
u32 hfi_value, blur_width, blur_height;
|
|
|
|
|
|
- if (!inst) {
|
|
|
|
- d_vpr_e("%s: invalid params\n", __func__);
|
|
|
|
- return -EINVAL;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
if (msm_vidc_get_parent_value(inst, cap_id,
|
|
if (msm_vidc_get_parent_value(inst, cap_id,
|
|
BLUR_TYPES, &blur_type, __func__))
|
|
BLUR_TYPES, &blur_type, __func__))
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
@@ -3726,10 +3387,6 @@ int msm_vidc_set_csc_custom_matrix(void *instance,
|
|
s32 csc_bias_payload[MAX_BIAS_COEFFS + 2];
|
|
s32 csc_bias_payload[MAX_BIAS_COEFFS + 2];
|
|
s32 csc_limit_payload[MAX_LIMIT_COEFFS + 2];
|
|
s32 csc_limit_payload[MAX_LIMIT_COEFFS + 2];
|
|
|
|
|
|
- if (!inst || !inst->core) {
|
|
|
|
- d_vpr_e("%s: invalid params\n", __func__);
|
|
|
|
- return -EINVAL;
|
|
|
|
- }
|
|
|
|
core = inst->core;
|
|
core = inst->core;
|
|
if (!core->platform) {
|
|
if (!core->platform) {
|
|
d_vpr_e("%s: invalid core platform\n", __func__);
|
|
d_vpr_e("%s: invalid core platform\n", __func__);
|
|
@@ -3816,11 +3473,6 @@ int msm_vidc_set_reserve_duration(void *instance,
|
|
u32 hfi_value = 0;
|
|
u32 hfi_value = 0;
|
|
struct msm_vidc_inst *inst = (struct msm_vidc_inst *)instance;
|
|
struct msm_vidc_inst *inst = (struct msm_vidc_inst *)instance;
|
|
|
|
|
|
- if (!inst) {
|
|
|
|
- d_vpr_e("%s: invalid params\n", __func__);
|
|
|
|
- return -EINVAL;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
/* reserve hardware only when input port is streaming*/
|
|
/* reserve hardware only when input port is streaming*/
|
|
if (!inst->bufq[INPUT_PORT].vb2q->streaming)
|
|
if (!inst->bufq[INPUT_PORT].vb2q->streaming)
|
|
return 0;
|
|
return 0;
|
|
@@ -3851,11 +3503,6 @@ int msm_vidc_set_level(void *instance,
|
|
struct msm_vidc_inst *inst = (struct msm_vidc_inst *)instance;
|
|
struct msm_vidc_inst *inst = (struct msm_vidc_inst *)instance;
|
|
u32 hfi_value = 0;
|
|
u32 hfi_value = 0;
|
|
|
|
|
|
- if (!inst) {
|
|
|
|
- d_vpr_e("%s: invalid params\n", __func__);
|
|
|
|
- return -EINVAL;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
hfi_value = inst->capabilities[cap_id].value;
|
|
hfi_value = inst->capabilities[cap_id].value;
|
|
if (!(inst->capabilities[cap_id].flags & CAP_FLAG_CLIENT_SET))
|
|
if (!(inst->capabilities[cap_id].flags & CAP_FLAG_CLIENT_SET))
|
|
hfi_value = HFI_LEVEL_NONE;
|
|
hfi_value = HFI_LEVEL_NONE;
|
|
@@ -3875,11 +3522,6 @@ int msm_vidc_set_q16(void *instance,
|
|
struct msm_vidc_inst *inst = (struct msm_vidc_inst *)instance;
|
|
struct msm_vidc_inst *inst = (struct msm_vidc_inst *)instance;
|
|
u32 hfi_value = 0;
|
|
u32 hfi_value = 0;
|
|
|
|
|
|
- if (!inst) {
|
|
|
|
- d_vpr_e("%s: invalid params\n", __func__);
|
|
|
|
- return -EINVAL;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
hfi_value = inst->capabilities[cap_id].value;
|
|
hfi_value = inst->capabilities[cap_id].value;
|
|
|
|
|
|
rc = msm_vidc_packetize_control(inst, cap_id, HFI_PAYLOAD_Q16,
|
|
rc = msm_vidc_packetize_control(inst, cap_id, HFI_PAYLOAD_Q16,
|
|
@@ -3897,11 +3539,6 @@ int msm_vidc_set_u32(void *instance,
|
|
struct msm_vidc_inst *inst = (struct msm_vidc_inst *)instance;
|
|
struct msm_vidc_inst *inst = (struct msm_vidc_inst *)instance;
|
|
u32 hfi_value;
|
|
u32 hfi_value;
|
|
|
|
|
|
- if (!inst) {
|
|
|
|
- d_vpr_e("%s: invalid params\n", __func__);
|
|
|
|
- return -EINVAL;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
if (inst->capabilities[cap_id].flags & CAP_FLAG_MENU) {
|
|
if (inst->capabilities[cap_id].flags & CAP_FLAG_MENU) {
|
|
rc = msm_vidc_v4l2_menu_to_hfi(inst, cap_id, &hfi_value);
|
|
rc = msm_vidc_v4l2_menu_to_hfi(inst, cap_id, &hfi_value);
|
|
if (rc)
|
|
if (rc)
|
|
@@ -3925,11 +3562,6 @@ int msm_vidc_set_u32_packed(void *instance,
|
|
struct msm_vidc_inst *inst = (struct msm_vidc_inst *)instance;
|
|
struct msm_vidc_inst *inst = (struct msm_vidc_inst *)instance;
|
|
u32 hfi_value;
|
|
u32 hfi_value;
|
|
|
|
|
|
- if (!inst) {
|
|
|
|
- d_vpr_e("%s: invalid params\n", __func__);
|
|
|
|
- return -EINVAL;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
if (inst->capabilities[cap_id].flags & CAP_FLAG_MENU) {
|
|
if (inst->capabilities[cap_id].flags & CAP_FLAG_MENU) {
|
|
rc = msm_vidc_v4l2_menu_to_hfi(inst, cap_id, &hfi_value);
|
|
rc = msm_vidc_v4l2_menu_to_hfi(inst, cap_id, &hfi_value);
|
|
if (rc)
|
|
if (rc)
|
|
@@ -3953,11 +3585,6 @@ int msm_vidc_set_u32_enum(void *instance,
|
|
struct msm_vidc_inst *inst = (struct msm_vidc_inst *)instance;
|
|
struct msm_vidc_inst *inst = (struct msm_vidc_inst *)instance;
|
|
u32 hfi_value;
|
|
u32 hfi_value;
|
|
|
|
|
|
- if (!inst) {
|
|
|
|
- d_vpr_e("%s: invalid params\n", __func__);
|
|
|
|
- return -EINVAL;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
rc = msm_vidc_v4l2_to_hfi_enum(inst, cap_id, &hfi_value);
|
|
rc = msm_vidc_v4l2_to_hfi_enum(inst, cap_id, &hfi_value);
|
|
if (rc)
|
|
if (rc)
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
@@ -3977,10 +3604,6 @@ int msm_vidc_set_s32(void *instance,
|
|
struct msm_vidc_inst *inst = (struct msm_vidc_inst *)instance;
|
|
struct msm_vidc_inst *inst = (struct msm_vidc_inst *)instance;
|
|
s32 hfi_value = 0;
|
|
s32 hfi_value = 0;
|
|
|
|
|
|
- if (!inst) {
|
|
|
|
- d_vpr_e("%s: invalid params\n", __func__);
|
|
|
|
- return -EINVAL;
|
|
|
|
- }
|
|
|
|
hfi_value = inst->capabilities[cap_id].value;
|
|
hfi_value = inst->capabilities[cap_id].value;
|
|
|
|
|
|
rc = msm_vidc_packetize_control(inst, cap_id, HFI_PAYLOAD_S32,
|
|
rc = msm_vidc_packetize_control(inst, cap_id, HFI_PAYLOAD_S32,
|
|
@@ -3999,10 +3622,6 @@ int msm_vidc_set_stage(void *instance,
|
|
struct msm_vidc_core *core;
|
|
struct msm_vidc_core *core;
|
|
struct msm_vidc_inst *inst = (struct msm_vidc_inst *)instance;
|
|
struct msm_vidc_inst *inst = (struct msm_vidc_inst *)instance;
|
|
|
|
|
|
- if (!inst || !inst->core) {
|
|
|
|
- d_vpr_e("%s: invalid params\n", __func__);
|
|
|
|
- return -EINVAL;
|
|
|
|
- }
|
|
|
|
core = inst->core;
|
|
core = inst->core;
|
|
|
|
|
|
rc = call_session_op(core, decide_work_mode, inst);
|
|
rc = call_session_op(core, decide_work_mode, inst);
|
|
@@ -4029,10 +3648,6 @@ int msm_vidc_set_pipe(void *instance,
|
|
struct msm_vidc_core *core;
|
|
struct msm_vidc_core *core;
|
|
struct msm_vidc_inst *inst = (struct msm_vidc_inst *)instance;
|
|
struct msm_vidc_inst *inst = (struct msm_vidc_inst *)instance;
|
|
|
|
|
|
- if (!inst || !inst->core) {
|
|
|
|
- d_vpr_e("%s: invalid params\n", __func__);
|
|
|
|
- return -EINVAL;
|
|
|
|
- }
|
|
|
|
core = inst->core;
|
|
core = inst->core;
|
|
|
|
|
|
rc = call_session_op(core, decide_work_route, inst);
|
|
rc = call_session_op(core, decide_work_route, inst);
|
|
@@ -4058,11 +3673,6 @@ int msm_vidc_set_vui_timing_info(void *instance,
|
|
struct msm_vidc_inst *inst = (struct msm_vidc_inst *)instance;
|
|
struct msm_vidc_inst *inst = (struct msm_vidc_inst *)instance;
|
|
u32 hfi_value;
|
|
u32 hfi_value;
|
|
|
|
|
|
- if (!inst) {
|
|
|
|
- d_vpr_e("%s: invalid params\n", __func__);
|
|
|
|
- return -EINVAL;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
/*
|
|
/*
|
|
* hfi is HFI_PROP_DISABLE_VUI_TIMING_INFO and v4l2 cap is
|
|
* hfi is HFI_PROP_DISABLE_VUI_TIMING_INFO and v4l2 cap is
|
|
* V4L2_CID_MPEG_VIDC_VUI_TIMING_INFO and hence reverse
|
|
* V4L2_CID_MPEG_VIDC_VUI_TIMING_INFO and hence reverse
|
|
@@ -4088,11 +3698,6 @@ int msm_vidc_set_outbuf_fence_type(void *instance,
|
|
struct msm_vidc_inst *inst = (struct msm_vidc_inst *)instance;
|
|
struct msm_vidc_inst *inst = (struct msm_vidc_inst *)instance;
|
|
u32 hfi_value;
|
|
u32 hfi_value;
|
|
|
|
|
|
- if (!inst) {
|
|
|
|
- d_vpr_e("%s: invalid params\n", __func__);
|
|
|
|
- return -EINVAL;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
if (inst->capabilities[OUTBUF_FENCE_TYPE].value ==
|
|
if (inst->capabilities[OUTBUF_FENCE_TYPE].value ==
|
|
MSM_VIDC_FENCE_NONE)
|
|
MSM_VIDC_FENCE_NONE)
|
|
return 0;
|
|
return 0;
|
|
@@ -4114,11 +3719,6 @@ int msm_vidc_set_outbuf_fence_direction(void *instance,
|
|
struct msm_vidc_inst *inst = (struct msm_vidc_inst *)instance;
|
|
struct msm_vidc_inst *inst = (struct msm_vidc_inst *)instance;
|
|
u32 hfi_value;
|
|
u32 hfi_value;
|
|
|
|
|
|
- if (!inst) {
|
|
|
|
- d_vpr_e("%s: invalid params\n", __func__);
|
|
|
|
- return -EINVAL;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
if (inst->capabilities[OUTBUF_FENCE_DIRECTION].value ==
|
|
if (inst->capabilities[OUTBUF_FENCE_DIRECTION].value ==
|
|
MSM_VIDC_FENCE_DIR_NONE)
|
|
MSM_VIDC_FENCE_DIR_NONE)
|
|
return 0;
|
|
return 0;
|