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

Commit f4065395 authored by Arun Menon's avatar Arun Menon
Browse files

msm: vidc: Avoid integer overflow for supported bitrate calculation



Supported bitrate is calculated as 40% of clock frequency.
However table[i].freq is an unsigned 32 bit integer. Multiplying
table[i].freq by 40 would cause an integer overflow and hence the
resulting supported_bitrate calculated for that frequency would
be lower. This would result in the frequency being bumped up
higher to meeting the bitrate requirement.

Change-Id: Idbdfd2301a6ad5b1d7ba0b7374375f9856f3e118
Signed-off-by: default avatarArun Menon <avmenon@codeaurora.org>
parent 65bdd3d2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment