MMFMWK-7030 [Linux_MX6QP_ARD]IMXCameraApp:When Enabled "save time to image" item, preview, find the time can not display completely. 100%

As IPU need 8 pixels alignment, add one workaround in base text overlay
to generate 8 pixels alignment text video buffer. The side effect should
cause all text a little smaller.

Upstream Status: Inappropriate [i.MX specific]

Signed-off-by: Song Bing b06498@freescale.com
diff --git a/ext/pango/gstbasetextoverlay.c b/ext/pango/gstbasetextoverlay.c
index 6403d8e..f942fa3 100755
--- a/ext/pango/gstbasetextoverlay.c
+++ b/ext/pango/gstbasetextoverlay.c
@@ -1757,6 +1757,10 @@
 
   g_mutex_lock (GST_BASE_TEXT_OVERLAY_GET_CLASS (overlay)->pango_lock);
 
+  /* i.MX special, will cause text a little small */
+  overlay->width = GST_ROUND_DOWN_8 (overlay->width);
+  overlay->height = GST_ROUND_DOWN_8 (overlay->height);
+
   if (overlay->auto_adjust_size) {
     /* 640 pixel is default */
     scalef_x = scalef_y = (double) (overlay->width) / DEFAULT_SCALE_BASIS;
@@ -1917,6 +1921,9 @@
   scalef_x *= overlay->render_scale;
   scalef_y *= overlay->render_scale;
 
+ GST_DEBUG_OBJECT (overlay, "Rendering with width %d and height %d "
+      , width, height);
+
   if (width <= 0 || height <= 0) {
     g_mutex_unlock (GST_BASE_TEXT_OVERLAY_GET_CLASS (overlay)->pango_lock);
     GST_DEBUG_OBJECT (overlay,