Commit f0ddb4e9 authored by Dikshita Agarwal's avatar Dikshita Agarwal Committed by Mauro Carvalho Chehab
Browse files

media: venus: venc: set IDR period to FW only for H264 & HEVC



HFI_PROPERTY_CONFIG_VENC_IDR_PERIOD is supported for only
H264 & HEVC codec. There is no need to set it for VP8 since
all key frames are treated as IDR frames for VP8.

Signed-off-by: default avatarDikshita Agarwal <dikshita@codeaurora.org>
Signed-off-by: default avatarStanimir Varbanov <stanimir.varbanov@linaro.org>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent 002c22bd
Loading
Loading
Loading
Loading
+13 −10
Original line number Diff line number Diff line
@@ -598,6 +598,8 @@ static int venc_set_properties(struct venus_inst *inst)
			return ret;
	}

	if (inst->fmt_cap->pixfmt == V4L2_PIX_FMT_H264 ||
	    inst->fmt_cap->pixfmt == V4L2_PIX_FMT_HEVC) {
		/* IDR periodicity, n:
		 * n = 0 - only the first I-frame is IDR frame
		 * n = 1 - all I-frames will be IDR frames
@@ -608,6 +610,7 @@ static int venc_set_properties(struct venus_inst *inst)
		ret = hfi_session_set_property(inst, ptype, &idrp);
		if (ret)
			return ret;
	}

	if (ctr->num_b_frames) {
		u32 max_num_b_frames = NUM_B_FRAMES_MAX;