Enable buffer sharing in libmix and close log

Change-Id: I09cf415f82e0490fb0d887f7207875ed150b8126
Signed-off-by: xli111 <xiaowei.a.li@intel.com>
diff --git a/mix_common/src/j_slist.cpp b/mix_common/src/j_slist.cpp
index 3168689..26435d8 100644
--- a/mix_common/src/j_slist.cpp
+++ b/mix_common/src/j_slist.cpp
@@ -137,7 +137,7 @@
 {
     JSList *traverse_item = list;
     while (traverse_item != NULL) {
-        if (func(traverse_item->data, data) != 0) break;
+        if (func(traverse_item->data, data) == 0) break;
         traverse_item = traverse_item->next;
     }
 
diff --git a/mix_video/src/Android.mk b/mix_video/src/Android.mk
index 39c057d..74e9849 100644
--- a/mix_video/src/Android.mk
+++ b/mix_video/src/Android.mk
@@ -1,7 +1,7 @@
 LOCAL_PATH := $(call my-dir)
 include $(CLEAR_VARS)
 
-MIXVIDEO_LOG_ENABLE := true
+MIXVIDEO_LOG_ENABLE := false
 
 LOCAL_SRC_FILES := 			\
 	mixvideothread.cpp			\
diff --git a/mix_video/src/mixvideo.cpp b/mix_video/src/mixvideo.cpp
index 5053595..c240350 100644
--- a/mix_video/src/mixvideo.cpp
+++ b/mix_video/src/mixvideo.cpp
@@ -2042,16 +2042,11 @@
         goto cleanup;
     }
 
-#if 1
-    va_status = vaCreateSurfaces(priv->va_display, width,
-                                 height, VA_RT_FORMAT_YUV420,
-                                 1, &surface);
-#else
     va_status = vaCreateSurfacesForUserPtr (
                     priv->va_display, width, height, VA_RT_FORMAT_YUV420, 1,
                     &surface, expected_size, VA_FOURCC_NV12, width, width, width,
                     0, width * height, width * height);
-#endif
+
 
     if (va_status != VA_STATUS_SUCCESS) {
         LOG_E("Failed vaCreateSurfaces\n");
diff --git a/mix_video/src/mixvideoformatenc_h264.cpp b/mix_video/src/mixvideoformatenc_h264.cpp
index 71d4282..6c2374a 100644
--- a/mix_video/src/mixvideoformatenc_h264.cpp
+++ b/mix_video/src/mixvideoformatenc_h264.cpp
@@ -2696,7 +2696,7 @@
     //h264_seq_param.seq_parameter_set_id = 176;
 
     // This is a temporary fix suggested by Binglin for bad encoding quality issue
-    //h264_seq_param.max_num_ref_frames = 1; // TODO: We need a long term design for this field
+    h264_seq_param.max_num_ref_frames = 1; // TODO: We need a long term design for this field
 
     LOG_V(
         "===h264 sequence params===\n");
@@ -2902,8 +2902,8 @@
         = this->disable_deblocking_filter_idc;
 
         // This is a temporary fix suggested by Binglin for bad encoding quality issue
-        //current_slice->slice_flags.bits.uses_long_term_ref = 0; // TODO: We need a long term design for this field
-        //current_slice->slice_flags.bits.is_long_term_ref = 0;   // TODO: We need a long term design for this field
+        current_slice->slice_flags.bits.uses_long_term_ref = 0; // TODO: We need a long term design for this field
+        current_slice->slice_flags.bits.is_long_term_ref = 0;   // TODO: We need a long term design for this field
 
         LOG_V(
             "======h264 slice params======\n");