All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yuqing Zhu <carol.zhu@nxp.com>
To: <openembedded-core@lists.openembedded.org>
Cc: Yuqing Zhu <carol.zhu@nxp.com>
Subject: [poky][PATCH 6/6] gstreamer1.0-plugins-bad: Fix little rectangel appears at the center when use squeeze and tunnel effects
Date: Mon, 4 Jul 2016 13:46:33 +0800	[thread overview]
Message-ID: <1467611193-31658-7-git-send-email-carol.zhu@nxp.com> (raw)
In-Reply-To: <1467611193-31658-1-git-send-email-carol.zhu@nxp.com>

Signed-off-by: Yuqing Zhu <carol.zhu@nxp.com>
---
 ...effects-fix-little-rectangel-appears-at-t.patch | 46 ++++++++++++++++++++++
 .../gstreamer/gstreamer1.0-plugins-bad_1.8.2.bb    |  1 +
 2 files changed, 47 insertions(+)
 create mode 100755 meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0007-glplugin-gleffects-fix-little-rectangel-appears-at-t.patch

diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0007-glplugin-gleffects-fix-little-rectangel-appears-at-t.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0007-glplugin-gleffects-fix-little-rectangel-appears-at-t.patch
new file mode 100755
index 0000000..90bfba9
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0007-glplugin-gleffects-fix-little-rectangel-appears-at-t.patch
@@ -0,0 +1,46 @@
+From 43549773608b4f58dc664b7115a1ef0dcb32f251 Mon Sep 17 00:00:00 2001
+From: Haihua Hu <jared.hu@nxp.com>
+Date: Tue, 14 Jun 2016 13:48:09 +0800
+Subject: [PATCH 1/2] [glplugin]gleffects: fix little rectangel appears at the
+ center when use squeeze and tunnel effects
+
+These two shader will calculate the verctor length and use it as denominator.
+But length could be zero which will cause undefine behaviour. Add protection for
+this condition
+
+Upstream-Status: Backport [1.8.3]
+
+https://bugzilla.gnome.org/show_bug.cgi?id=767635
+
+Signed-off-by: Haihua Hu <jared.hu@nxp.com>
+---
+ ext/gl/effects/gstgleffectssources.c | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/ext/gl/effects/gstgleffectssources.c b/ext/gl/effects/gstgleffectssources.c
+index 6bdc155..3e87b8b 100644
+--- a/ext/gl/effects/gstgleffectssources.c
++++ b/ext/gl/effects/gstgleffectssources.c
+@@ -100,7 +100,8 @@ const gchar *squeeze_fragment_source_gles2 =
+   "void main () {"
+   "  vec2 texturecoord = v_texcoord.xy;"
+   "  vec2 normcoord = texturecoord - 0.5;"
+-  "  float r = length (normcoord);"
++  /* Add a very small value to length otherwise it could be 0 */
++  "  float r = length (normcoord)+0.01;"
+   "  r = pow(r, 0.40)*1.3;"
+   "  normcoord = normcoord / r;"
+   "  texturecoord = (normcoord + 0.5);"
+@@ -136,7 +137,8 @@ const gchar *tunnel_fragment_source_gles2 =
+    * rect textures */
+   "  normcoord = (texturecoord - 0.5);"
+   "  float r = length(normcoord);"
+-  "  normcoord *= clamp (r, 0.0, 0.275) / r;"
++  "  if (r > 0.0)"
++  "    normcoord *= clamp (r, 0.0, 0.275) / r;"
+   "  texturecoord = normcoord + 0.5;"
+   "  gl_FragColor = texture2D (tex, texturecoord);"
+   "}";
+-- 
+1.9.1
+
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.8.2.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.8.2.bb
index 49b3677..d0912b2 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.8.2.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.8.2.bb
@@ -17,6 +17,7 @@ SRC_URI = " \
     file://0004-glcolorconvert-don-t-use-the-predefined-variable-nam.patch \
     file://0005-glshader-add-glBindFragDataLocation.patch \
     file://0006-glcolorconvert-GLES3-deprecates-texture2D-and-it-doe.patch \
+    file://0007-glplugin-gleffects-fix-little-rectangel-appears-at-t.patch \
 "
 SRC_URI[md5sum] = "83abc2e70684e7b195f18ca2992ef6e8"
 SRC_URI[sha256sum] = "d7995317530c8773ec088f94d9320909d41da61996b801ebacce9a56af493f97"
-- 
1.9.1



      parent reply	other threads:[~2016-07-04  6:03 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-04  5:46 [poky][PATCH 0/6] Add patches for gstreamer1.0-plugins-bad V1.8.2 Yuqing Zhu
2016-07-04  5:46 ` [poky][PATCH 1/6] gstreamer1.0-plugins-bad: Enable gldeinterlace on OpenGL ES Yuqing Zhu
2016-07-04 10:18   ` Burton, Ross
2016-07-05  8:41     ` Yuqing Zhu
2016-12-15 11:37   ` Nicolas Dechesne
2016-07-04  5:46 ` [poky][PATCH 2/6] gstreamer1.0-plugins-bad: Implement multiple render targets for GLES3 Yuqing Zhu
2016-07-04  5:46 ` [poky][PATCH 3/6] gstreamer1.0-plugins-bad: Don't use the predefined variable name in glcolorconvert Yuqing Zhu
2016-07-04  5:46 ` [poky][PATCH 4/6] gstreamer1.0-plugins-bad: Add glBindFragDataLocation in glshader Yuqing Zhu
2016-07-04  5:46 ` [poky][PATCH 5/6] gstreamer1.0-plugins-bad: Use the newer texture() function in glcolorconvert Yuqing Zhu
2016-07-04  5:46 ` Yuqing Zhu [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1467611193-31658-7-git-send-email-carol.zhu@nxp.com \
    --to=carol.zhu@nxp.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.