Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b91c5bdc authored by qctecmdr Service's avatar qctecmdr Service Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: vidc: disable bitrate savings for VBR_CFR only"

parents 0429b5f9 04121731
Loading
Loading
Loading
Loading
+14 −0
Original line number Original line Diff line number Diff line
@@ -1061,6 +1061,7 @@ static inline int start_streaming(struct msm_vidc_inst *inst)
	struct hfi_device *hdev;
	struct hfi_device *hdev;
	struct hal_buffer_size_minimum b;
	struct hal_buffer_size_minimum b;
	u32 rc_mode;
	u32 rc_mode;
	int value = 0;


	dprintk(VIDC_DBG, "%s: %x : inst %pK\n", __func__,
	dprintk(VIDC_DBG, "%s: %x : inst %pK\n", __func__,
		hash32_ptr(inst->session), inst);
		hash32_ptr(inst->session), inst);
@@ -1086,6 +1087,19 @@ static inline int start_streaming(struct msm_vidc_inst *inst)
		}
		}
	}
	}


	value = msm_comm_g_ctrl_for_id(inst,
		V4L2_CID_MPEG_VIDC_VENC_BITRATE_SAVINGS);
	if (!value && rc_mode != V4L2_MPEG_VIDEO_BITRATE_MODE_VBR) {
		struct hal_enable enable;

		dprintk(VIDC_INFO,
			"Force enable bitrate savings for non-VBR_CFR\n");
		enable.enable = 1;
		rc = call_hfi_op(hdev, session_set_property,
			inst->session, HAL_PARAM_VENC_BITRATE_SAVINGS,
			&enable);
	}

	/* Check if current session is under HW capability */
	/* Check if current session is under HW capability */
	rc = msm_vidc_check_session_supported(inst);
	rc = msm_vidc_check_session_supported(inst);
	if (rc) {
	if (rc) {