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

Commit 7dd76329 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: vidc: Set constrained intra refresh property"

parents 1e1d3b1d 6c4b64fd
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -2072,6 +2072,14 @@ int create_pkt_cmd_session_set_property(
		pkt->size += sizeof(u32) + sizeof(struct hfi_enable);
		break;
	}
	case HAL_PARAM_VENC_CONSTRAINED_INTRA_PRED:
	{
		create_pkt_enable(pkt->rg_property_data,
			HFI_PROPERTY_PARAM_VENC_CONSTRAINED_INTRA_PRED,
			((struct hal_enable *)pdata)->enable);
		pkt->size += sizeof(u32) + sizeof(struct hfi_enable);
		break;
	}
	/* FOLLOWING PROPERTIES ARE NOT IMPLEMENTED IN CORE YET */
	case HAL_CONFIG_BUFFER_REQUIREMENTS:
	case HAL_CONFIG_PRIORITY:
+23 −0
Original line number Diff line number Diff line
@@ -2713,10 +2713,33 @@ static int try_set_ctrl(struct msm_vidc_inst *inst, struct v4l2_ctrl *ctrl)
	}
	case V4L2_CID_MPEG_VIDC_VIDEO_INTRA_REFRESH_MODE: {
		struct v4l2_ctrl *air_mbs, *air_ref, *cir_mbs;
		bool is_cont_intra_supported = false;

		air_mbs = TRY_GET_CTRL(V4L2_CID_MPEG_VIDC_VIDEO_AIR_MBS);
		air_ref = TRY_GET_CTRL(V4L2_CID_MPEG_VIDC_VIDEO_AIR_REF);
		cir_mbs = TRY_GET_CTRL(V4L2_CID_MPEG_VIDC_VIDEO_CIR_MBS);

		is_cont_intra_supported =
		(inst->fmts[CAPTURE_PORT]->fourcc == V4L2_PIX_FMT_H264) ||
		(inst->fmts[CAPTURE_PORT]->fourcc == V4L2_PIX_FMT_HEVC);

		if (is_cont_intra_supported) {
			if (air_mbs || air_ref || cir_mbs)
				enable.enable = true;
			else
				enable.enable = false;

			rc = call_hfi_op(hdev, session_set_property,
				(void *)inst->session,
				HAL_PARAM_VENC_CONSTRAINED_INTRA_PRED, &enable);
			if (rc) {
				dprintk(VIDC_ERR,
					"Failed to set constrained intra\n");
				rc = -EINVAL;
				break;
			}
		}

		property_id = HAL_PARAM_VENC_INTRA_REFRESH;

		intra_refresh.mode = ctrl->val;
+2 −1
Original line number Diff line number Diff line
/* Copyright (c) 2012-2015, The Linux Foundation. All rights reserved.
/* Copyright (c) 2012-2016, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -231,6 +231,7 @@ enum hal_property {
	HAL_PARAM_VENC_BITRATE_TYPE,
	HAL_PARAM_VENC_H264_PIC_ORDER_CNT,
	HAL_PARAM_VENC_LOW_LATENCY,
	HAL_PARAM_VENC_CONSTRAINED_INTRA_PRED,
};

enum hal_domain {
+3 −1
Original line number Diff line number Diff line
/* Copyright (c) 2012-2015, The Linux Foundation. All rights reserved.
/* Copyright (c) 2012-2016, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -369,6 +369,8 @@ struct hfi_buffer_info {
	(HFI_PROPERTY_PARAM_VENC_COMMON_START + 0x028)
#define HFI_PROPERTY_PARAM_VENC_VPX_ERROR_RESILIENCE_MODE	\
	(HFI_PROPERTY_PARAM_VENC_COMMON_START + 0x029)
#define HFI_PROPERTY_PARAM_VENC_CONSTRAINED_INTRA_PRED	\
	(HFI_PROPERTY_PARAM_VENC_COMMON_START + 0x02B)
#define HFI_PROPERTY_PARAM_VENC_HIER_B_MAX_NUM_ENH_LAYER	\
	(HFI_PROPERTY_PARAM_VENC_COMMON_START + 0x02C)
#define  HFI_PROPERTY_PARAM_VENC_HIER_P_HYBRID_MODE	\