Extend VideoConfigVP8 Structure to enable VP8 encode

BZ: 122118

Set some picture parameter for VP8 encode otherwise FW will hang.

Change-Id: Ie2991c2b33a109d35943d1c2192e5fca96108210
Signed-off-by: Liu Bolun <bolun.liu@intel.com>
Reviewed-on: http://android.intel.com:8080/117864
Reviewed-by: Ding, Haitao <haitao.ding@intel.com>
Reviewed-by: Shi, PingX <pingx.shi@intel.com>
Tested-by: Shi, PingX <pingx.shi@intel.com>
Reviewed-by: buildbot <buildbot@intel.com>
Tested-by: buildbot <buildbot@intel.com>
diff --git a/videoencoder/VideoEncoderDef.h b/videoencoder/VideoEncoderDef.h
index 4f36303..08f9e7a 100644
--- a/videoencoder/VideoEncoderDef.h
+++ b/videoencoder/VideoEncoderDef.h
@@ -612,6 +612,12 @@
 	uint32_t no_ref_last;
 	uint32_t no_ref_gf;
 	uint32_t no_ref_arf;
+	uint32_t refresh_last;
+	uint32_t refresh_golden_frame;
+	uint32_t refresh_alternate_frame;
+	uint32_t refresh_entropy_probs;
+	uint32_t value;
+	unsigned char sharpness_level;
 
 	VideoConfigVP8 () {
 		type = VideoConfigTypeVP8;
diff --git a/videoencoder/VideoEncoderVP8.cpp b/videoencoder/VideoEncoderVP8.cpp
index d8d05b0..84a0746 100644
--- a/videoencoder/VideoEncoderVP8.cpp
+++ b/videoencoder/VideoEncoderVP8.cpp
@@ -32,8 +32,14 @@
 
 	mVideoConfigVP8.force_kf = 0;
 	mVideoConfigVP8.no_ref_last = 0;
-	mVideoConfigVP8.no_ref_gf = 0;
-	mVideoConfigVP8.no_ref_arf = 0;
+	mVideoConfigVP8.no_ref_gf = 1;
+	mVideoConfigVP8.no_ref_arf = 1;
+	mVideoConfigVP8.refresh_last = 1;
+	mVideoConfigVP8.refresh_golden_frame = 1;
+	mVideoConfigVP8.refresh_alternate_frame = 1;
+	mVideoConfigVP8.refresh_entropy_probs = 0;
+	mVideoConfigVP8.value = 0;
+	mVideoConfigVP8.sharpness_level = 0;
 
 	mComParams.profile = VAProfileVP8Version0_3;
 }
@@ -93,7 +99,13 @@
     vp8PicParam.pic_flags.bits.no_ref_last = mVideoConfigVP8.no_ref_last;
     vp8PicParam.pic_flags.bits.no_ref_gf = mVideoConfigVP8.no_ref_gf;
     vp8PicParam.pic_flags.bits.no_ref_arf = mVideoConfigVP8.no_ref_arf;
-    vp8PicParam.pic_flags.value = 0;
+    vp8PicParam.pic_flags.bits.refresh_last = mVideoConfigVP8.refresh_last;
+    vp8PicParam.pic_flags.bits.refresh_golden_frame = mVideoConfigVP8.refresh_golden_frame;
+    vp8PicParam.pic_flags.bits.refresh_alternate_frame = mVideoConfigVP8.refresh_alternate_frame;
+    vp8PicParam.pic_flags.bits.refresh_entropy_probs = mVideoConfigVP8.refresh_entropy_probs;
+    vp8PicParam.pic_flags.bits.num_token_partitions = 2;
+//    vp8PicParam.pic_flags.value = mVideoConfigVP8.value;
+    vp8PicParam.sharpness_level = mVideoConfigVP8.sharpness_level;
 
     vaStatus = vaCreateBuffer(
             mVADisplay, mVAContext,