[patch porting R2->R3] for bug 17183 - video screen shaking (libmix part)

BZ: 21825

solution reworked as code base changed
Signed-off-by: Weian Chen <weian.chen@intel.com>

Change-Id: Ie53c7c639d9a152c487a8f0e8ad1d707bf5d5cf3
Reviewed-on: http://android.intel.com:8080/33455
Reviewed-by: Ding, Haitao <haitao.ding@intel.com>
Tested-by: Ding, Haitao <haitao.ding@intel.com>
Reviewed-by: buildbot <buildbot@intel.com>
Tested-by: buildbot <buildbot@intel.com>
diff --git a/videodecoder/VideoDecoderAVC.h b/videodecoder/VideoDecoderAVC.h
index c3a1fe5..1794e03 100644
--- a/videodecoder/VideoDecoderAVC.h
+++ b/videodecoder/VideoDecoderAVC.h
@@ -65,7 +65,7 @@
     };
 
     enum {
-        AVC_EXTRA_SURFACE_NUMBER = 6,
+        AVC_EXTRA_SURFACE_NUMBER = 11,
         // maximum DPB (Decoded Picture Buffer) size
         MAX_REF_NUMBER = 16,
         DPB_SIZE = 17,         // DPB_SIZE = MAX_REF_NUMBER + 1,
diff --git a/videodecoder/VideoDecoderBase.cpp b/videodecoder/VideoDecoderBase.cpp
index 15df3ca..1cf8e25 100644
--- a/videodecoder/VideoDecoderBase.cpp
+++ b/videodecoder/VideoDecoderBase.cpp
@@ -34,10 +34,10 @@
 #define ANDROID_DISPLAY_HANDLE 0x18C34078
 
 // TODO: check what is the best number. Must be at least 2 to support one backward reference frame.
-// Currently set to 3 to support  2 backward reference frames. This value is used for AVC frame reordering only.
+// Currently set to 8 to support 7 backward reference frames. This value is used for AVC frame reordering only.
 // e.g:
 // POC: 4P,  8P,  10P,  6B and mNextOutputPOC = 5
-#define OUTPUT_WINDOW_SIZE 3
+#define OUTPUT_WINDOW_SIZE 8
 
 
 VideoDecoderBase::VideoDecoderBase(const char *mimeType, _vbp_parser_type type)
diff --git a/videodecoder/VideoDecoderDefs.h b/videodecoder/VideoDecoderDefs.h
index 0e9949e..f4cea28 100644
--- a/videodecoder/VideoDecoderDefs.h
+++ b/videodecoder/VideoDecoderDefs.h
@@ -102,7 +102,7 @@
 };
 
 
-#define MAX_GRAPHIC_NUM 16+1+6 // max DPB +1+AVC_EXTRA_NUM
+#define MAX_GRAPHIC_NUM 16 + 1 + 11 // max DPB + 1 + AVC_EXTRA_NUM
 
 struct VideoConfigBuffer {
     uint8_t *data;