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

Commit d64baed2 authored by Chinmay Sawarkar's avatar Chinmay Sawarkar Committed by Gerrit - the friendly Code Review server
Browse files

msm: vidc: Use input bitrate to calculate decoder bus vote



By calculating bitrate at each frame, we get a better estimate
of the BW requirements of the decode session. Thus improving
performance and power usage.

CRs-Fixed: 2451137
Change-Id: I22f0029bbb7d501340469a317e89de7eb34717c4
Signed-off-by: default avatarChinmay Sawarkar <chinmays@codeaurora.org>
parent 05f2237d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -134,7 +134,7 @@ static unsigned long __calculate_decoder(struct vidc_bus_vote_data *d,
	lcu_per_frame = DIV_ROUND_UP(width, lcu_size) *
		DIV_ROUND_UP(height, lcu_size);

	bitrate = __lut(width, height, fps)->bitrate;
	bitrate = (d->bitrate + 1000000 - 1) / 1000000;

	bins_to_bit_factor = FP_INT(4);

+3 −0
Original line number Diff line number Diff line
@@ -344,6 +344,9 @@ int msm_comm_vote_bus(struct msm_vidc_core *core)
				(inst->clk_data.frame_rate >> 16) *
				vote_data[i].fps;
			}
		} else if (inst->session_type == MSM_VIDC_DECODER) {
			vote_data[i].bitrate =
				filled_len * vote_data[i].fps * 8;
		}

		vote_data[i].power_mode = 0;