Merge "conf_files: kona: Tune perf xml for vp9 decoder"
diff --git a/conf_files/kona/mediacodec-seccomp.policy b/conf_files/kona/mediacodec-seccomp.policy
index 3bf11a3..0b75b84 100644
--- a/conf_files/kona/mediacodec-seccomp.policy
+++ b/conf_files/kona/mediacodec-seccomp.policy
@@ -17,3 +17,5 @@
 timer_create: 1
 timer_settime: 1
 rt_sigtimedwait: 1
+readlink: 1
+open: 1
diff --git a/mm-video-v4l2/vidc/vdec/inc/omx_vdec.h b/mm-video-v4l2/vidc/vdec/inc/omx_vdec.h
index b808d75..b666cd6 100644
--- a/mm-video-v4l2/vidc/vdec/inc/omx_vdec.h
+++ b/mm-video-v4l2/vidc/vdec/inc/omx_vdec.h
@@ -325,7 +325,7 @@
 	size_t offset;
 	size_t len;
 	uint32_t flags;
-	int64_t time_stamp;
+	uint64_t time_stamp;
 	enum vdec_picture pic_type;
 	void *client_data;
 	struct vdec_picsize picsize;
diff --git a/mm-video-v4l2/vidc/venc/inc/video_encoder_device_v4l2.h b/mm-video-v4l2/vidc/venc/inc/video_encoder_device_v4l2.h
index a8e77f2..569d53d 100644
--- a/mm-video-v4l2/vidc/venc/inc/video_encoder_device_v4l2.h
+++ b/mm-video-v4l2/vidc/venc/inc/video_encoder_device_v4l2.h
@@ -265,7 +265,7 @@
 struct statistics {
     struct timeval prev_tv;
     int prev_fbd;
-    int bytes_generated;
+    OMX_U32 bytes_generated;
 };
 
 enum rc_modes {
diff --git a/mm-video-v4l2/vidc/venc/src/video_encoder_device_v4l2.cpp b/mm-video-v4l2/vidc/venc/src/video_encoder_device_v4l2.cpp
index a9cc8b2..2b6521d 100644
--- a/mm-video-v4l2/vidc/venc/src/video_encoder_device_v4l2.cpp
+++ b/mm-video-v4l2/vidc/venc/src/video_encoder_device_v4l2.cpp
@@ -440,14 +440,14 @@
         /* calc avg. fps, bitrate */
         struct timeval tv;
         gettimeofday(&tv,NULL);
-        OMX_U64 time_diff = (tv.tv_sec * 1000000ULL + tv.tv_usec) -
-                (stats.prev_tv.tv_sec * 1000000ULL + stats.prev_tv.tv_usec);
+        OMX_U64 time_diff = ((uint64_t) tv.tv_sec * (uint64_t) 1000000ULL + (uint64_t) tv.tv_usec) -
+                ((uint64_t) stats.prev_tv.tv_sec * (uint64_t) 1000000ULL + (uint64_t) stats.prev_tv.tv_usec);
         if (time_diff >= 1000000) {
             OMX_U32 num_fbd = omx->handle->fbd - stats.prev_fbd;
             if (stats.prev_tv.tv_sec && num_fbd && time_diff) {
                 float framerate = num_fbd * 1000000/(float)time_diff;
-                OMX_U32 bitrate = (stats.bytes_generated * 8 / num_fbd) * framerate;
-                DEBUG_PRINT_INFO("stats: avg. fps %0.2f, bitrate %d",
+                OMX_U64 bitrate = (stats.bytes_generated * 8 / num_fbd) * framerate;
+                DEBUG_PRINT_INFO("stats: avg. fps %0.2f, bitrate %llu",
                     framerate, bitrate);
             }
             stats.prev_tv = tv;