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

Commit 1b0c12bb authored by Amit Shekhar's avatar Amit Shekhar
Browse files

msm: vidc: Allow all-intra encoding in CBR_CFR



CBR_CFR is one of the advertised rc mode for HEVC encoding.
However, all-intra is intended for quality bitstream. Hence,
fallback to VBR RC mode if client needs all-intra encoding.

Change-Id: Ib7cf49561f23076d136c58e0385db411e65883be
Signed-off-by: default avatarAmit Shekhar <ashekhar@codeaurora.org>
parent 06325259
Loading
Loading
Loading
Loading
+7 −0
Original line number Original line Diff line number Diff line
@@ -4308,6 +4308,13 @@ int handle_all_intra_restrictions(struct msm_vidc_inst *inst)
		return -ENOTSUPP;
		return -ENOTSUPP;
	}
	}


	/* CBR_CFR is one of the advertised rc mode for HEVC encoding.
	 * However, all-intra is intended for quality bitstream. Hence,
	 * fallback to VBR RC mode if client needs all-intra encoding.
	 */
	if (inst->rc_type == V4L2_MPEG_VIDEO_BITRATE_MODE_CBR)
		inst->rc_type = V4L2_MPEG_VIDEO_BITRATE_MODE_VBR;

	/* check supported bit rate mode and frame rate */
	/* check supported bit rate mode and frame rate */
	capability = &inst->capability;
	capability = &inst->capability;
	n_fps = inst->clk_data.frame_rate >> 16;
	n_fps = inst->clk_data.frame_rate >> 16;