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

Commit bdcea9df authored by Linux Build Service Account's avatar Linux Build Service Account
Browse files

Merge 1d97a509 on remote branch

Change-Id: I2acc062a432789854181769795793490f6c50ae0
parents 3638174b 1d97a509
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -26,6 +26,15 @@ LINUXINCLUDE += -include $(srctree)/techpack/video/config/litovidconf.h
endif
endif

# auto-detect subdirs
ifeq ($(CONFIG_ARCH_SCUBA), y)
include $(srctree)/techpack/video/config/scubavid.conf
endif

ifeq ($(CONFIG_ARCH_SCUBA), y)
LINUXINCLUDE    += -include $(srctree)/techpack/video/config/scubavidconf.h
endif

LINUXINCLUDE    += -I$(srctree)/techpack/video/include \
                   -I$(srctree)/techpack/video/include/uapi

config/scubavid.conf

0 → 100644
+5 −0
Original line number Diff line number Diff line
ifeq ($(CONFIG_QGKI),y)
export CONFIG_MSM_VIDC_V4L2=y
else
export CONFIG_MSM_VIDC_V4L2=m
endif

config/scubavidconf.h

0 → 100644
+6 −0
Original line number Diff line number Diff line
/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * Copyright (c) 2021, The Linux Foundation. All rights reserved.
 */

#define CONFIG_MSM_VIDC_V4L2 1
+13 −0
Original line number Diff line number Diff line
@@ -117,6 +117,7 @@ enum v4l2_mpeg_vidc_extradata {
	EXTRADATA_ENC_INPUT_HDR10PLUS = 8,
	EXTRADATA_ENC_INPUT_CVP = 16,
	EXTRADATA_ENC_FRAME_QP = 32,
	EXTRADATA_ENC_INPUT_CROP = 64,
};
#define V4L2_CID_MPEG_VIDC_VIDEO_VUI_TIMING_INFO \
		(V4L2_CID_MPEG_MSM_VIDC_BASE + 19)
@@ -328,6 +329,17 @@ struct msm_vidc_aspect_ratio_payload {
	__u32 aspect_height;
};

#define MSM_VIDC_EXTRADATA_INPUT_CROP 0x0700000E
struct msm_vidc_input_crop_payload {
	__u32 size;
	__u32 version;
	__u32 port_index;
	__u32 left;
	__u32 top;
	__u32 width;
	__u32 height;
};

struct msm_vidc_misr_info {
	__u32 misr_set;
	__u32 misr_dpb_luma[8];
@@ -356,6 +368,7 @@ struct msm_vidc_output_crop_payload {
struct msm_vidc_extradata_index {
	__u32 type;
	union {
		struct msm_vidc_input_crop_payload input_crop;
		struct msm_vidc_aspect_ratio_payload aspect_ratio;
	};
};
+9 −1
Original line number Diff line number Diff line
@@ -522,6 +522,7 @@ static struct msm_vidc_ctrl msm_venc_ctrls[] = {
		.minimum = EXTRADATA_NONE,
		.maximum = EXTRADATA_ADVANCED | EXTRADATA_ENC_INPUT_ROI |
			EXTRADATA_ENC_INPUT_HDR10PLUS |
			EXTRADATA_ENC_INPUT_CROP |
			EXTRADATA_ENC_INPUT_CVP | EXTRADATA_ENC_FRAME_QP,
		.default_value = EXTRADATA_NONE,
		.menu_skip_mask = 0,
@@ -1787,7 +1788,8 @@ int msm_venc_s_ctrl(struct msm_vidc_inst *inst, struct v4l2_ctrl *ctrl)
			inst->prop.extradata_ctrls |= ctrl->val;

		if ((inst->prop.extradata_ctrls & EXTRADATA_ENC_INPUT_ROI) ||
		(inst->prop.extradata_ctrls & EXTRADATA_ENC_INPUT_HDR10PLUS)) {
		(inst->prop.extradata_ctrls & EXTRADATA_ENC_INPUT_HDR10PLUS) ||
		(inst->prop.extradata_ctrls & EXTRADATA_ENC_INPUT_CROP)) {
			f = &inst->fmts[INPUT_PORT].v4l2_fmt;
			f->fmt.pix_mp.num_planes = 2;
			f->fmt.pix_mp.plane_fmt[1].sizeimage =
@@ -4656,6 +4658,12 @@ int msm_venc_set_extradata(struct msm_vidc_inst *inst)
		}
	}

	if (inst->prop.extradata_ctrls & EXTRADATA_ENC_INPUT_CROP) {
		// Enable Input Crop Extradata
		msm_comm_set_index_extradata(inst, MSM_VIDC_EXTRADATA_INPUT_CROP, 0x1);
		s_vpr_l(inst->sid, "%s: enable input crop encoding\n", __func__);
	}

	if(!msm_vidc_cvp_usage)
		inst->prop.extradata_ctrls &= ~EXTRADATA_ENC_INPUT_CVP;

Loading