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:
Arun Menon <avmenon@codeaurora.org>
Loading
Please register or sign in to comment