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

Commit 91b50eb9 authored by Shi Zhongbo's avatar Shi Zhongbo Committed by Gerrit - the friendly Code Review server
Browse files

msm: vidc: enable AVC lossless encoding



1. Enable AVC RC_LOSSLESS mode.
2. Set low latency mode by default for AVC lossless.

Change-Id: I5be9bae8406fac315606d37daeedd906b2055a6e
Signed-off-by: default avatarShi Zhongbo <zhongbos@codeaurora.org>
parent e309c5e8
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -1378,7 +1378,9 @@ static int msm_venc_resolve_rc_enable(struct msm_vidc_inst *inst,
	}

	codec = get_v4l2_codec(inst);
	if (msm_vidc_lossless_encode && codec == V4L2_PIX_FMT_HEVC) {
	if (msm_vidc_lossless_encode
		&& (codec == V4L2_PIX_FMT_HEVC ||
			codec == V4L2_PIX_FMT_H264)) {
		dprintk(VIDC_DBG,
			"Reset RC mode to RC_LOSSLESS for HEVC lossless encoding\n");
		inst->rc_type = RATE_CONTROL_LOSSLESS;
+6 −0
Original line number Diff line number Diff line
@@ -1490,6 +1490,12 @@ int msm_vidc_decide_work_mode_iris2(struct msm_vidc_inst *inst)
			/* For WORK_MODE_1, set Low Latency mode by default */
			latency.enable = true;
		}
		if (inst->rc_type == RATE_CONTROL_LOSSLESS &&
			out_f->fmt.pix_mp.pixelformat == V4L2_PIX_FMT_H264) {
			dprintk(VIDC_DBG,
				"Set work mode to low latency for AVC lossless encoding.");
			latency.enable = true;
		}
	} else {
		return -EINVAL;
	}