summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAustin Yuan <shengquan.yuan@intel.com>2015-03-04 09:57:37 +0800
committerAustin Yuan <shengquan.yuan@intel.com>2015-03-04 09:57:37 +0800
commitc81d65f86cb1b8494d01290ed2a433a6f6ea371b (patch)
treec2bee969e3fb36c9352394f421bbf139cd0b4b0a
parent909125037e367bfe7187627620a0fdee7ba00ad6 (diff)
downloadlibva-c81d65f86cb1b8494d01290ed2a433a6f6ea371b.tar.gz
test: fix h264encode integer calculation overflow issue for 4K
Signed-off-by: Austin Yuan <shengquan.yuan@intel.com>
-rw-r--r--test/encode/h264encode.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/encode/h264encode.c b/test/encode/h264encode.c
index 13d7624..ed17c59 100644
--- a/test/encode/h264encode.c
+++ b/test/encode/h264encode.c
@@ -108,11 +108,11 @@ static unsigned long long srcyuv_frames = 0;
static int srcyuv_fourcc = VA_FOURCC_NV12;
static int calc_psnr = 0;
-static int frame_width = 176;
-static int frame_height = 144;
-static int frame_width_mbaligned;
-static int frame_height_mbaligned;
-static int frame_rate = 30;
+static unsigned int frame_width = 176;
+static unsigned int frame_height = 144;
+static unsigned int frame_width_mbaligned;
+static unsigned int frame_height_mbaligned;
+static unsigned int frame_rate = 30;
static unsigned int frame_count = 60;
static unsigned int frame_coded = 0;
static unsigned int frame_bitrate = 0;
@@ -1116,7 +1116,7 @@ static int setup_encode()
{
VAStatus va_status;
VASurfaceID *tmp_surfaceid;
- int codedbuf_size, i;
+ unsigned int codedbuf_size, i;
va_status = vaCreateConfig(va_dpy, h264_profile, VAEntrypointEncSlice,
&config_attrib[0], config_attrib_num, &config_id);