After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 767635 - gleffects: fix little rectangel appears at the center when use squeeze and tunnel effects
gleffects: fix little rectangel appears at the center when use squeeze and tu...
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal normal
: 1.8.3
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-06-14 06:03 UTC by Haihua Hu
Modified: 2016-06-15 09:21 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
fix squeeze and tunnel effects shader issue (1.28 KB, patch)
2016-06-14 06:05 UTC, Haihua Hu
none Details | Review
The frames which has this issue (431.77 KB, image/jpeg)
2016-06-14 06:07 UTC, Haihua Hu
  Details
Add protection in case length could be 0 (1.55 KB, patch)
2016-06-14 07:07 UTC, Haihua Hu
committed Details | Review

Description Haihua Hu 2016-06-14 06:03:14 UTC
Should use highp precision, these two shader will calculate the verctor length and use it as denominator. But length could be zero which will cause undefine behaviour.
Comment 1 Haihua Hu 2016-06-14 06:05:48 UTC
Created attachment 329755 [details] [review]
fix squeeze and tunnel effects shader issue
Comment 2 Haihua Hu 2016-06-14 06:07:19 UTC
Created attachment 329756 [details]
The frames which has this issue
Comment 3 Sebastian Dröge (slomo) 2016-06-14 06:18:24 UTC
Couldn't that still be 0? Instead of that, maybe it should be set to a very small value if it is 0?
Comment 4 Haihua Hu 2016-06-14 06:23:19 UTC
(In reply to Sebastian Dröge (slomo) from comment #3)
> Couldn't that still be 0? Instead of that, maybe it should be set to a very
> small value if it is 0?

If Use mediump, the 0 area will be very large on some platform, e.g my i.mx6Q. But use highp, these area is very small too see.
Comment 5 Haihua Hu 2016-06-14 07:00:42 UTC
(In reply to Sebastian Dröge (slomo) from comment #3)
> Couldn't that still be 0? Instead of that, maybe it should be set to a very
> small value if it is 0?

Let me try to add a very small value to length.
Comment 6 Haihua Hu 2016-06-14 07:07:21 UTC
Created attachment 329759 [details] [review]
Add protection in case length could be 0
Comment 7 Matthew Waters (ystreet00) 2016-06-15 09:20:33 UTC
commit 5e8a650130d932a10b9dd8ae4f2cf7b4b714e472
Author: Haihua Hu <jared.hu@nxp.com>
Date:   Tue Jun 14 13:48:09 2016 +0800

    gleffects: fix little rectangle that appears at the center of squeeze and tunnel effects
    
    These two shader will calculate the vector length and use it as denominator.
    But length could be zero which will cause undefine behaviour. Add protection for
    this condition
    
    https://bugzilla.gnome.org/show_bug.cgi?id=767635

and 1.8 0e395b5c620c0ca6e7189328de3d848f42dc443b