Corrected libmix image encoder's max coded size computing formula for small images on max quality.

BZ: 170493

Issue: the current max JPEG coded size computing
formula fit large images, but its output was too small
if working on small images (320*240/640*480 on 100).

Solution: Corrected that formula.

Change-Id: I670506c937090db19190b81803955f085a5ea93a
Signed-off-by: Jing SUN <jing.a.sun@intel.com>
diff --git a/imageencoder/ImageEncoder.cpp b/imageencoder/ImageEncoder.cpp
index c7b522d..741b74c 100644
--- a/imageencoder/ImageEncoder.cpp
+++ b/imageencoder/ImageEncoder.cpp
@@ -284,6 +284,8 @@
 	/* Create a coded buffer */
 	coded_buf_size = (((context_width+15)/16)*((context_height+15)/16)*160) + 640;
 	coded_buf_size = (coded_buf_size+0xf) & ~0xf;
+	coded_buf_size = (coded_buf_size<3145728)? 3145728:coded_buf_size; /* At least 3MB */
+
 	va_status = vaCreateBuffer(va_dpy, va_contextid, VAEncCodedBufferType, coded_buf_size,
 					1, NULL, &va_codedbufferid);
 	if (va_status != VA_STATUS_SUCCESS) {