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

Commit bce83add authored by Qiwei Liu's avatar Qiwei Liu
Browse files

msm: vidc: fix encoder bw voting for rc_off case



In rc_off case, bitrate is not set, use a pre-defined
value for bw calculation.

Change-Id: I0ba6a37572d9cfaace6428d8dd4c0a65182de05f
Signed-off-by: default avatarQiwei Liu <qiweil@codeaurora.org>
parent 1f90b6b5
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -654,7 +654,8 @@ static unsigned long __calculate_encoder(struct vidc_bus_vote_data *d,
	fps = d->fps;
	width = max(d->input_width, BASELINE_DIMENSIONS.width);
	height = max(d->input_height, BASELINE_DIMENSIONS.height);
	bitrate = d->bitrate / 1000000;
	bitrate = d->bitrate > 0 ? d->bitrate / 1000000 :
		__lut(width, height, fps)->bitrate;
	lcu_size = d->lcu_size;
	lcu_per_frame = DIV_ROUND_UP(width, lcu_size) *
		DIV_ROUND_UP(height, lcu_size);