Change variables and function's return type to unsigned int to be able to
hold
4010803200 (level_idc is 186) which is bigger then INT_MAX.
> gen9_hevc_enc_utils.c:72:19: warning: implicit conversion from 'long' to
> 'int' changes value from
4010803200 to -
284164096 [-Wconstant-conversion]
> max_bps =
4010803200;
> ~ ^~~~~~~~~~
Signed-off-by: Victor Toso <victortoso@redhat.com>
#include "intel_driver.h"
#include "gen9_hevc_enc_utils.h"
-static int
+static unsigned int
hevc_get_max_mbps(unsigned int level_idc)
{
- int max_bps = 0;
+ unsigned int max_bps = 0;
switch (level_idc) {
case 30:
unsigned int frame_rate)
{
double bits_per_mb, tmp_f;
- int max_mbps, num_mb_per_frame;
+ int num_mb_per_frame;
+ unsigned int max_mbps;
unsigned long long max_byte_per_pic, max_byte_per_pic_not0;
int profile_level_max_frame;
double frameRateD = 100;