Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id 5AB1BE00AE4; Mon, 28 Mar 2016 23:59:00 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on yocto-www.yoctoproject.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS autolearn=ham version=3.3.1 X-Spam-HAM-Report: * -0.0 SPF_HELO_PASS SPF: HELO matches SPF record * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] Received: from ptmx.org (ptmx.org [178.63.28.110]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id 95860E008EE for ; Mon, 28 Mar 2016 23:58:56 -0700 (PDT) Received: from [172.16.1.4] (chello062178118086.5.14.vie.surfer.at [62.178.118.86]) by ptmx.org (Postfix) with ESMTPSA id 0D6CD20CD2; Tue, 29 Mar 2016 08:58:54 +0200 (CEST) To: Yuqing Zhu , meta-freescale@yoctoproject.org References: <1454060516-30420-1-git-send-email-b54851@freescale.com> <1454060516-30420-2-git-send-email-b54851@freescale.com> From: Carlos Rafael Giani Message-ID: <56FA27AD.6010708@pseudoterminal.org> Date: Tue, 29 Mar 2016 08:58:53 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <1454060516-30420-2-git-send-email-b54851@freescale.com> Subject: Re: [meta-fsl-arm][PATCH v2 1/2] gstreamer1.0-plugins-base: Fix IMXCameraApp image time cannot display issue. X-BeenThere: meta-freescale@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Usage and development list for the meta-fsl-* layers List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Mar 2016 06:59:00 -0000 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit As said in the previous submission, I think this patch is acceptable, and a good example of something truly i.MX specific. Since 8/16-pixel alignments aren't exactly uncommon, I think this should be turned into a solution that can be upstreamed and is applicable to many other GStreamer plugins that generate video frames. However, at least for now, we can live with this patch. On 2016-01-29 10:41, Yuqing Zhu wrote: > IMXCameraApp: When Enabled "save time to image" item, preview, > find the time can not display completely. > > 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. > > Signed-off-by: Yuqing Zhu > --- > ...-Linux_MX6QP_ARD-IMXCameraApp-When-Enable.patch | 58 ++++++++++++++++++++++ > .../gstreamer/gstreamer1.0-plugins-base_%.bbappend | 8 ++- > 2 files changed, 64 insertions(+), 2 deletions(-) > create mode 100755 recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-MMFMWK-7030-Linux_MX6QP_ARD-IMXCameraApp-When-Enable.patch > > diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-MMFMWK-7030-Linux_MX6QP_ARD-IMXCameraApp-When-Enable.patch b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-MMFMWK-7030-Linux_MX6QP_ARD-IMXCameraApp-When-Enable.patch > new file mode 100755 > index 0000000..1f54fc1 > --- /dev/null > +++ b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-MMFMWK-7030-Linux_MX6QP_ARD-IMXCameraApp-When-Enable.patch > @@ -0,0 +1,58 @@ > +From f19e83a1a69a3dbbeb16dc4bcee3fb87317bb65b Mon Sep 17 00:00:00 2001 > +From: Song Bing > +Date: Mon, 11 Jan 2016 14:51:17 +0800 > +Subject: [PATCH] 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 > +--- > + ext/pango/gstbasetextoverlay.c | 12 ++++++++++-- > + 1 file changed, 10 insertions(+), 2 deletions(-) > + > +diff --git a/ext/pango/gstbasetextoverlay.c b/ext/pango/gstbasetextoverlay.c > +index 3e98aa1..de64c92 100755 > +--- a/ext/pango/gstbasetextoverlay.c > ++++ b/ext/pango/gstbasetextoverlay.c > +@@ -1545,7 +1545,7 @@ gst_base_text_overlay_render_pangocairo (GstBaseTextOverlay * overlay, > + gint unscaled_width, unscaled_height; > + gint width, height; > + gboolean full_width = FALSE; > +- double scalef = 1.0; > ++ double scalef = 1.0, scalefx, scalefy; > + double a, r, g, b; > + gdouble shadow_offset = 0.0; > + gdouble outline_offset = 0.0; > +@@ -1673,6 +1673,14 @@ gst_base_text_overlay_render_pangocairo (GstBaseTextOverlay * overlay, > + height = ceil (height * overlay->render_scale); > + scalef *= overlay->render_scale; > + > ++ /* i.MX special, will cause text a little small */ > ++ scalefx = scalef * ((gdouble)GST_ROUND_DOWN_8 (width)) / width; > ++ scalefy = scalef * ((gdouble)GST_ROUND_DOWN_8 (height)) / height; > ++ width = GST_ROUND_DOWN_8 (width); > ++ height = GST_ROUND_DOWN_8 (height); > ++ 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, > +@@ -1689,7 +1697,7 @@ gst_base_text_overlay_render_pangocairo (GstBaseTextOverlay * overlay, > + /* Prepare the transformation matrix. Note that the transformation happens > + * in reverse order. So for horizontal text, we will translate and then > + * scale. This is important to understand which scale shall be used. */ > +- cairo_matrix_init_scale (&cairo_matrix, scalef, scalef); > ++ cairo_matrix_init_scale (&cairo_matrix, scalefx, scalefy); > + > + if (overlay->use_vertical_render) { > + gint tmp; > +-- > +1.7.9.5 > + > diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_%.bbappend b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_%.bbappend > index ff4d77b..f1992c3 100644 > --- a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_%.bbappend > +++ b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_%.bbappend > @@ -1,7 +1,11 @@ > FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" > > -SRC_URI_append_mx6 = " file://gstplaybin-remove-flag-deinterlace.patch" > -SRC_URI_append_mx7 = " file://gstplaybin-remove-flag-deinterlace.patch" > +IMX_PATCHES = " file://gstplaybin-remove-flag-deinterlace.patch \ > + file://0001-MMFMWK-7030-Linux_MX6QP_ARD-IMXCameraApp-When-Enable.patch \ > +" > + > +SRC_URI_append_mx6 = "${IMX_PATCHES}" > +SRC_URI_append_mx7 = "${IMX_PATCHES}" > > PACKAGE_ARCH_mx6 = "${MACHINE_SOCARCH}" > PACKAGE_ARCH_mx7 = "${MACHINE_SOCARCH}"