Commit graph

405 commits

Author SHA1 Message Date
Matthew Waters
7a44219656 [548/906] GstGLDifferenceMatte: update for GstGLMeta 2014-03-15 18:36:46 +01:00
Matthew Waters
02fcc954de [547/906] GstGLBumper: fix libPNG complaining about invalid png files
We failed to inform libPNG that we had already read the header
2014-03-15 18:36:46 +01:00
Matthew Waters
f0035b9a9b [546/906] GstGLFilterSobel: update for GstGLMeta 2014-03-15 18:36:46 +01:00
Matthew Waters
da4c698a50 [545/906] GstGLBumper: update for GstGLMeta 2014-03-15 18:36:46 +01:00
Matthew Waters
3affb44884 [544/906] fix memory leaks from not g_free()ing string returned by gst_element_get_name 2014-03-15 18:36:46 +01:00
Matthew Waters
3be415e5c9 [541/906] GstGLTestSrc: generate a GLBufferPool instead of a VideoBufferPool in decide_allocation 2014-03-15 18:36:46 +01:00
Matthew Waters
7c0c039933 [540/906] GstGLMosaic: update for GstGLMeta 2014-03-15 18:36:46 +01:00
Matthew Waters
9f51f1721e [539/906] GstGLImageSink: fold multiple fields into one and use VIDEO_SINK_* for window width/height
replace the caps information with a GstVideoInfo
place the window width/height information width VIDEO_SINK
2014-03-15 18:36:46 +01:00
Matthew Waters
84bf052181 [538/906] GstGLDeinterlace: update for GstGLMeta 2014-03-15 18:36:46 +01:00
Matthew Waters
d4045e7699 [537/906] GstGLFilterReflectedScreen: update for GstGLMeta 2014-03-15 18:36:46 +01:00
Matthew Waters
5402a43d80 [536/906] GstGLFilterGlass: update for GstGLMeta 2014-03-15 18:36:46 +01:00
Matthew Waters
a93c464c5b [535/906] GstGLFilterLaplacian: update for GstGLMeta 2014-03-15 18:36:46 +01:00
Matthew Waters
ddbfe41721 [534/906] GstGLFilterCube: Update for GstGLMeta 2014-03-15 18:36:46 +01:00
Matthew Waters
58c27d8ef2 [533/906] GstGLFilterBlur: update for GstGLMeta 2014-03-15 18:36:46 +01:00
Matthew Waters
9ab50ed175 [531/906] GstGLEffects: update for GstGLMeta 2014-03-15 18:36:45 +01:00
Matthew Waters
ed5deaa29b [530/906] GstGLUpload: fix video scaling and use GL_UPLOAD_CAPS 2014-03-15 18:36:45 +01:00
Matthew Waters
d03ffe867d [529/906] GstGLDownload: fix video scaling and use GL_DOWNLOAD_CAPS 2014-03-15 18:36:45 +01:00
Matthew Waters
65c0afe557 [526/906] GstGLTestSrc: update for 1.0
implement decide_allocation
rename push_src_create to _fill
use GstVideoInfo to convert times
make use of GstGLMeta and friends
2014-03-15 18:36:45 +01:00
Matthew Waters
ce3b50484f [525/906] GstGLDownload: add allocation methods and use GstGLMeta
make GstGLDownload work with the new GstGLMeta and friends
2014-03-15 18:36:45 +01:00
Matthew Waters
3d7788dabb [523/906] update for meta API changes 2014-03-15 18:36:45 +01:00
Matthew Waters
08349cff6d [519/906] GstGLUpload: implement the allocation funcs and use GstGLMeta
make use of the new GstGLMeta, GstGLMemory and GstGLBufferPool objects
2014-03-15 18:36:45 +01:00
Matthew Waters
4d7bb47b75 [518/906] GstGLImageSink: add propose_allocation impl and use GstGLMeta
make use of GstGLMeta and GstGLMemory
2014-03-15 18:36:45 +01:00
Matthew Waters
71c6aae707 [513/906] Remove GstGLBuffer (to be replaced by GstGLMeta) 2014-03-15 18:36:44 +01:00
Matthew Waters
d39eb40a40 [510/906] GstGLImageSink: update for 1.0 2014-03-15 18:36:44 +01:00
Matthew Waters
590c3f4060 [508/906] GstGLDownload: update for 1.0 2014-03-15 18:36:44 +01:00
Matthew Waters
00c11d955e [507/906] GstGLTestSrc: update for 1.0 2014-03-15 18:36:44 +01:00
Matthew Waters
42127be707 [506/906] GstGLUpload: update for 1.0 2014-03-15 18:36:44 +01:00
Matthew Waters
620d330953 [505/906] GstGLColorscale: update for 1.0 2014-03-15 18:36:44 +01:00
Matthew Waters
d66bd69b36 [503/906] Rename GST_BOILERPLATE_* to G_DEFINE_TYPE_* and move _base_init into _class_init 2014-03-15 18:36:44 +01:00
Matthew Waters
6f2acb94c6 [502/906] Update versioning for gstreamer 1.0
Renames GST_MAJORMINOR to GST_API_VERSION in build files
removes -lgstinterfaces from _LDADD flags
2014-03-15 18:36:44 +01:00
Julien Isorce
a9d4210388 [499/906] examples: fix build on MacOSX 2014-03-15 18:36:43 +01:00
Julien Isorce
0c7080e7a1 [498/906] gldisplay: don't pass non-constant strings as printf format strings
Fixes 'format not a string literal and no format arguments' on darwin
2014-03-15 18:36:43 +01:00
Julien Isorce
865e431a75 [496/906] cmake build: add path to config.h on APPLE 2014-03-15 18:36:43 +01:00
Julien Isorce
7e45f26a21 [494/906] cmake build: use config.h from win32/common and add some guidelines 2014-03-15 18:36:43 +01:00
Tim-Philipp Müller
5b9e4b8282 [493/906] glfiltershader: fix crash when loading shader file
Just use g_file_get_contents() instead of home-made file loading.
Fixes two issues - one is that we should pass "r" to fopen and
not O_RDONLY, the other is that an incorrect variable was used
to read the file length, leading to an empty shader file.

Spotted by: Wang Xin-yu (王昕宇) <comicfans44@gmail.com>

https://bugzilla.gnome.org/show_bug.cgi?id=702844
https://bugzilla.gnome.org/show_bug.cgi?id=702845

Conflicts:
	gst/gl/gstglfiltershader.c
2014-03-15 18:36:43 +01:00
Julien Isorce
052c23c3c5 [491/906] glES2.0: properly fails if driver/kernel inconsistency 2014-03-15 18:36:43 +01:00
Julien Isorce
2394987226 [490/906] gldisplay: error out instead of g_assert 2014-03-15 18:36:43 +01:00
Julien Isorce
20ac2cc4aa [489/906] glimagesink: pixel-aspect-ratio property now returns "1/1" by default
Previously it was not set
Fix bug #671734 (compatibility with Totem)
2014-03-15 18:36:43 +01:00
Julien Isorce
b88351ad0c [488/906] libvisual-gl: full compatibility with projectM-libvisual if libprojectM >= 2.0.1
Fix bug #310775
2014-03-15 18:36:43 +01:00
Sebastian Dröge
6bb3f66c42 [487/906] gl: Fix compiler warnings
'if statement has empty body', which were real bugs and

'comparison of unsigned expression < 0 is always false', which was
only an unneeded comparison.
2014-03-15 18:36:43 +01:00
Julien Isorce
5091066426 [483/906] glelements: do not leak parent when using gst_pad_get_parent 2014-03-15 18:36:43 +01:00
Julien Isorce
f639d6096d [481/906] feature checking: error out instead of doing nothing if an OpenGL feature is not present
Fix bug #572767
2014-03-15 18:36:42 +01:00
Julien Isorce
9e535a0410 [480/906] win32 builds: add glshader filter sources to vs9 and codeblocks
Also fix some warnings from msvc9 and mingw-3.4.5
2014-03-15 18:36:42 +01:00
Julien Isorce
cc70130c6f [475/906] docs: add glmosaic and glshader to docs 2014-03-15 18:36:42 +01:00
Julien Isorce
533e180ce8 [474/906] build: make libjpeg use conditional
Disable gloverlay element if we do not hve libjpeg
2014-03-15 18:36:42 +01:00
Julien Isorce
a7587aa44e [473/906] cmake build: 2.8 is now required and add jpeg
jpeg and png should be optional but our cmake build is still in pre-alpha
2014-03-15 18:36:42 +01:00
Stefan Sauer
aacf88ffa5 [472/906] linpng: make libpng use conditional
Disable 3 elements if we don't have libpng.
2014-03-15 18:36:42 +01:00
Luc Deschenaux
268f1a30b2 [471/906] glshader: add dynamic fragment shader filter
Also add fragment shader parser
Fix bug #600195
2014-03-15 18:36:42 +01:00
Anthony Violo
7d4de78102 [470/906] gloverlay: add jpeg support
Fix bug #636070
2014-03-15 18:36:42 +01:00
Anthony Violo
351a6d9d01 [469/906] gloverlay: manage ratio texture
Fix bug #630525
2014-03-15 18:36:42 +01:00
Sebastian Dröge
4732eb4d68 [465/906] gl: Fix variable unused but set compiler warnings 2014-03-15 18:36:41 +01:00
Sreerenj Balachandran
b1166ed0c4 [464/906] glimagesink: Interface query should return FALSE if the supplied interface is not GST_TYPE_X_OVERLAY 2014-03-15 18:36:41 +01:00
Stefan Kost
edefb7826c [462/906] various: add missing G_PARAM_STATIC_STRINGS flags
Canonicalize property names as needed. Includes some gst-indent changes as well :/
2014-03-15 18:36:41 +01:00
Stefan Kost
ac138f74a1 [461/906] xoverlay: require base from git and update to new API 2014-03-15 18:36:41 +01:00
Edward Hervey
b9c68baddc [460/906] gstgleffects: Fix upper bound of an array iteration
10 is above NEEDED_TEXTURES (currently 5) and makes the code consistent
with the rest of the usage in the file.
2014-03-15 18:36:41 +01:00
Julien Isorce
dab7bdf2da [458/906] glfilterreflectedscreen: fix some warnings from msvc9 2014-03-15 18:36:41 +01:00
Julien Isorce
2c43a348fa [456/906] glfilter/glmixer/gltestsrc/glupload: throw an element error if no parent bin
Fixes bug #602153
2014-03-15 18:36:41 +01:00
Julien Isorce
2b46c87bd0 [455/906] glimagesink: handle pixel-aspect-ratio 2014-03-15 18:36:41 +01:00
Filippo Argiolas
00030c2bdd [454/906] blur: fix gaussian kernel computation 2014-03-15 18:36:41 +01:00
Filippo Argiolas
17a33cd19a [453/906] blur: give up some accuracy for speed
Settle with 7x7 gaussian convolution kernels, maybe slightly less
accurate than previous 9x9 but fast enough to be able to use it on i915.
About a 20% percent speed gain (again, roughly measured with
videotestsrc and glimagesink sync=false). No noticeable rendering
difference with current effects.
2014-03-15 18:36:41 +01:00
Filippo Argiolas
a9aa0ab2ee [452/906] sin: get rid of hls conversion code
Get rid of buggy and complicated hls conversion code for the sin effect.
The only thing needed was hue anyway and it is easily calculated using
Preucil formula for rgb to polar coordinates conversion.
Now works on i915 (removed all the IF blocks). Still needs some tuning,
I wonder if it will ever work properly.
2014-03-15 18:36:41 +01:00
Roland Peffer
e2f9424e04 [451/906] glupload: par is already handled in fixate_caps function
Fixes bug #593165
2014-03-15 18:36:41 +01:00
Julien Isorce
6c2c3b44ee [450/906] indent: gstglupload.c 2014-03-15 18:36:41 +01:00
Filippo Argiolas
3d14e9684d [449/906] sobel: drop unused single pass sobel shader
Drop unused sobel shader, if anyone still needs it, git log is your
friend.
2014-03-15 18:36:41 +01:00
Filippo Argiolas
c888188422 [448/906] xray: increase edges visibility
Some little fine tuning, still not completely satisfied yet.
2014-03-15 18:36:41 +01:00
Filippo Argiolas
87fda0d867 [447/906] xray: port to the new separable sobel convolution
Port xray effect to use the same sobel convolution just used in
glfiltersobel. Now xray too works on i915 (a bit slow).
2014-03-15 18:36:40 +01:00
Filippo Argiolas
021a28657d [446/906] blur: forgot to add all the changes in previous commit 2014-03-15 18:36:40 +01:00
Filippo Argiolas
556b1b79e4 [445/906] blur: use draw_texture from glfilter 2014-03-15 18:36:40 +01:00
Filippo Argiolas
ac190bc460 [444/906] laplacian: precalculate coordinates
Precalculate coordinates to avoid unneeded texture indirections.
Now laplacian works on i915.
2014-03-15 18:36:40 +01:00
Filippo Argiolas
270ce448e4 [443/906] sobel: move some highly duplicated code into glfilter
Add a new convenience function in GstGLFilter that just draws an input
texture to a target texture using a simple shader with just a "tex"
uniform sampler.
Move draw_texture from glfiltersobel to glfilter. Still need to update
other plugins to this.
2014-03-15 18:36:40 +01:00
Filippo Argiolas
b3c4eb4c61 [442/906] blur: optimize coordinates calculations
Save 28 instructions on i915 (mainly redundant MOVs) and gain a 25%
(roughly measured with videotestsrc and glimagesink sync=false) speed
bump
2014-03-15 18:36:40 +01:00
Filippo Argiolas
5fd66383ab [441/906] sobel: convolve only luma
Rework Sobel a little bit again making it work as the old one:
1. desaturate input texture
2. calculate horizontal convolution for x gradient and vertical
   convolution for y gradient at the same time (halves the number of
   needed texture lookups)
3. store results in a single texture (red and green channel)
4. calculate remaining convolution (same as above switching vertical and
   horizontal)
5. calculate length of gradient using red and green as x and y
   components.
Optimize wherever possible, store kernels as constants in the shaders,
remove unneeded uniforms. Restore invert property carefully avoiding
using IF.
Still not sure if "full color" convolution will be needed, glfiltersobel
is to be intended as a demo filter and xray, the only effect which uses
sobel only needs edge intensity. Dropping it for now.
2014-03-15 18:36:40 +01:00
Filippo Argiolas
49df4dca3c [440/906] sobel: implement sobel filter using separable kernels
Reimplement sobel in a multipass fully separated convolution:
- calculate x gradient map convolving first horizontally with blurring
  kernel and then vertically with differentiating kernel
- calculate y gradient map convolving first vertically with blurring
  kernel and then horizonally with differentiating kernel
- calculate length of the gradient vector
Particular care was needed with normalization of the blurring kernel and
with grey level offset of the differentiating one to prevent overflow of
rgb values from the [0.0,1.0] range in intermediate passes.
Now works on i915.
2014-03-15 18:36:40 +01:00
Filippo Argiolas
002f069962 [439/906] sobel: get rid of #version 120 dependent array constructors 2014-03-15 18:36:40 +01:00
Pierre Pouzol
f8871ff33a [438/906] glfilterreflectedscreen: improve behavior and add some properties
Fixes bug #612163
2014-03-15 18:36:40 +01:00
Julien Isorce
7660fcbd30 [437/906] glfilterreflectedscreen: remove unused code (copied/pasted from glfilterglass) 2014-03-15 18:36:40 +01:00
Julien Isorce
28a11181c8 [436/906] gleffectssources: fix some warnings from msvc9 2014-03-15 18:36:40 +01:00
Julien Isorce
a1cd1cdc69 [435/906] GNUStep build: add glfilterreflectedscreen sources 2014-03-15 18:36:40 +01:00
Pierre Pouzol
8c9500e9d6 [434/906] glfilterreflectedscreen: forgot to add sources 2014-03-15 18:36:40 +01:00
Pierre Pouzol
59b9cc9ebd [433/906] glfilterreflectedscreen: add new OpenGL Reflected Screen filter
Fixes bug #612163
2014-03-15 18:36:40 +01:00
Filippo Argiolas
0cae67172a [430/906] convolution: save some indirection grouping math and sampling
Thanks to Eric Anholt I've finally understood (at least I hope) how to
count texture indirections and save up some.  Texture sampling dependent
on the result of some math counts as an indirection phase. Grouped
texture lookups with no math involved count as a single indirection.
Math on the coordinates count as indirection.
So the best thing is to group all the math involving coordinates and
then do all the lookups.
This saves enough indirections to make glfilterblur and glow effect
work, albeit a bit slowly, on i915.
2014-03-15 18:36:39 +01:00
Filippo Argiolas
e7d083fcc0 [429/906] laplacian: remove unused norm_const and norm_offset uniforms
Remove unused uniforms from the laplacian filter. Also remove if
kernel[i] != 0 checks so that it compiles where IF is not available.
Again, big thanks to Eric Anholt for the hints.
2014-03-15 18:36:39 +01:00
Eric Anholt
2c905bda24 [428/906] laplacian: Avoid using GLSL 1.20 features in a non-#versioned shader.
Fixes compile on Mesa.
2014-03-15 18:36:39 +01:00
Filippo Argiolas
b59d050e84 [427/906] rgb_to_curve: save up a texture indirection
Apparently assigning gl_TexCoord to a temp count as an indirection.
Using it directly avoids it and limits indirections to four not
exceeding i915 limit. Now xpro effect works on i915.
2014-03-15 18:36:39 +01:00
Vinson Lee
f6b0a1db7b [426/906] multiply: fix a compilation error with Apple compiler
Fix multiply_fragment_source to compile with Apple GLSL compiler.

https://bugzilla.gnome.org/show_bug.cgi?id=616748
2014-03-15 18:36:39 +01:00
Filippo Argiolas
7ee7688ae8 [425/906] twirl: get rid of polar coordinates conversion
Get rid of polar coordinates in the twirl effect. The same can be done
using a rotation matrix, saving alu instructions and, most of all,
avoiding the use of the evil atan() function (which uses IF operators).
Calculate rotation angle in a saner, understandable way.
Works on i915! (Hope it still works elsewhere too as I'm not able to
test at the moment)
2014-03-15 18:36:39 +01:00
Filippo Argiolas
797250d9c2 [424/906] tunnel: get rid of polar coordinates conversion
Get rid of polar coordinates in the tunnel effect as the same can easily
be done just clamping the radius and multiplying.
Remove the evil atan() call that uses branching and a lot of unneeded alu
instructions. Now works on i915!
2014-03-15 18:36:39 +01:00
Filippo Argiolas
98752e51da [423/906] convolution: generate gaussian kernel on the fly
Generate a normalized gaussian kernel with given size and standard
deviation on the fly.
Remove "norm_const" uniform from convolution shaders and provide a
normalized kernel instead. Remove norm_offset uniform as it was always
zero, will reintroduce it if really needed in the future. Thanks to Eric
Anholt for suggesting it.
Save some ALU instruction calculating directly the coordinate for
texture lookup instead of summing an offset.
Still exceed maximum indirect texture lookups on i915, the only solution
I see is using a 3x3 kernel.
2014-03-15 18:36:39 +01:00
Filippo Argiolas
e602d818e3 [422/906] convolution: reduce the number of register used
Reduce the number of register calculating texture lookup offset on the
fly. It was just a simple sequence, no need to store it in a array.
Fixes maximum number of registers exceeded error with i915. Still
exceed maximum indirect texture lookups and maximum ALU instructions.
Maybe we should gave up some blur goodness and use lightly more little
kernels.
2014-03-15 18:36:39 +01:00
Filippo Argiolas
a3454365fc [421/906] convolution: don't check kernel[i] to be non zero
Apparently saving up some texture lookup for zero kernel elements is
definitely not worth the use of branching. This way convolution
fragment programs also work where IF operator is not supported (tested
on i915 and nouveau). See also discussion on bug #615696.
Thanks to Eric Anholt for spotting this.
2014-03-15 18:36:39 +01:00
Filippo Argiolas
f979b52e5c [420/906] blur: use common shader sources
Port blur filter to use the common convolution shaders in
gstgleffectssources.c. This reduces code duplication and, incidentally,
the shaders in the common file were already updated to not use array
constructor and to not depend on #version 120.
First step towards bug #615696 fixing.
2014-03-15 18:36:39 +01:00
Filippo Argiolas
fe42e22e84 [419/906] blur: remove horizontal flip
Apparently there was some stale horizontal flip function still there
from my summer of code experiments. Remove it.
2014-03-15 18:36:39 +01:00
Filippo Argiolas
4ff22b2c67 [418/906] effects: disable gst-indent in the sources
Fix some crazy formatting caused by gst-indent previous runs and disable
the script for this file. The best would be to move shaders into
separate files and load them at runtime or hardcode them at compile
time.
2014-03-15 18:36:39 +01:00
Руслан Ижбулатов
e42b3eddbf [417/906] glbumper: Use png_sig_cmp() instead of png_check_sig()
Fixes bug #613186
2014-03-15 18:36:39 +01:00
Tim-Philipp Müller
f82dd7d5e2 [416/906] gl: use gst_element_class_set_details_simple()
Fixes #613371.
2014-03-15 18:36:39 +01:00
David Hoyt
9a49a81c22 [414/906] glbumper/gldifferencematte/gloverlay: libpng 1.4.x compatible
Fix bug #608643
2014-03-15 18:36:39 +01:00
Julien Isorce
8937128d62 [412/906] Cocoa backend: improve support on GNUStep 2014-03-15 18:36:38 +01:00
Julien Isorce
ba4ca3bced [409/906] gleffects: indent and fix some warnings in ES 2.0 mode 2014-03-15 18:36:38 +01:00
Julien Isorce
e002f92e6d [408/906] gleffects: start to make it compatible with OpenGL ES 2.0
For now only identity, mirror and squeeze effects are available.
Maybe some factorization is needed about compilation shader
before to put the other effects since only a copy/past is needed,
at least until effect number 9: heat.
The effects from 10:sepia to 15:glow require more work.
2014-03-15 18:36:38 +01:00
Julien Isorce
3e1bffc802 [406/906] glimagesink: add a client-data property
Also add it to glfilterapp.

Fixes #559131
2014-03-15 18:36:38 +01:00