Commit graph

37 commits

Author SHA1 Message Date
Haihao Xiang 5f859203ad gl: add support for Y212_LE / Y212_BE format
Because the color value is stored in MSB, so we can reuse the
Y210 code for P012_LE / P012_BE

Sample pipeline:
gst-launch-1.0 videotestsrc ! video/x-raw,format=Y212_LE ! glimagesink
2020-04-01 13:55:11 +08:00
Haihao Xiang 1db94e5205 gl: add support for P012_LE / P012_BE format
Because the color value is stored in MSB, so we can reuse the
P016_LE / P016_BE code for P012_LE / P012_BE
2020-03-24 14:29:38 +08:00
Haihao Xiang b3e9e3f747 glimagesink: add support for Y210 format
Y210 is a 10-bit YUY2, so we may re-use the YUY2 shaders but gl format
is set to RG16

Sample pipeline:
gst-launch-1.0 videotestsrc ! video/x-raw,format=Y210 ! glimagesink
2019-10-16 08:30:31 +08:00
David Trussel 0b362e5a4b glcolorconvert: add support for the NV16 and NV61 formats
NV16/NV61 is basically the same as NV12/NV21 with a higher chroma resolution.
Since only the size of the UV plane/texture is different, the same shaders are used as for NV12/NV21.
2019-10-15 22:53:56 +11:00
Haihao Xiang 7ef84fb757 glimagesink: add support for Y410 format
Sample pipeline:
gst-launch-1.0 videotestsrc ! video/x-raw,format=Y410 ! glimagesink
2019-10-15 04:44:02 +00:00
Seungha Yang fe9c38244f gl: Add support for P016 format
All implementation for P010_10LE/BE can be reused.
2019-08-08 11:46:16 +09:00
Haihao Xiang 6d0f796591 glimagesink: add support for P010 variants
This makes a pipeline below works:

little endian:
gst-launch-1.0 videotestsrc ! video/x-raw,format=P010_10LE ! glimagesink

big endian:
gst-launch-1.0 videotestsrc ! video/x-raw,format=P010_10BE ! glimagesink
2019-06-18 16:32:00 +08:00
Haihao Xiang 3f63295280 glimagesink: add support for BGR10A2_LE / RGB10A2_LE
This makes a pipeline below work:

gst-launch-1.0 videotestsrc ! video/x-raw,format={BGR10A2_LE, \
RGB10A2_LE} ! glimagesink
2019-06-18 02:58:16 +00:00
Matthew Waters 51f2d05ff6 gl/docs: add to new docs system 2019-05-21 01:49:48 +00:00
Haihao Xiang f0cbb78770 glimagesink: add support for VUYA format 2019-03-21 23:05:09 +00:00
Matthew Waters 3cfff727b1 glcolorconvert: add support for ARGB64 conversion 2018-05-05 21:24:25 +10:00
Tim-Philipp Müller c5b5ef16d3 gl: GST_EXPORT -> GST_GL_API
We need different export decorators for the different libs.
For now no actual change though, just rename before the release,
and add prelude headers to define the new decorator to GST_EXPORT.
2018-03-13 12:10:29 +00:00
Matthew Waters 9bafa08a5d gl/docs: massive update
- add Since: markers where necessary.
- document structs
- add documentation headers for each module (short_description,
  see_also, etc)
- reduce the number of warnings gtk-doc outputs
- fix spelling mistakes
2017-12-09 19:32:23 +00:00
Nirbheek Chauhan 6106816f50 gstgl: Add GST_EXPORT to all symbols used on Windows
This is a requirement for those symbols to be exported in gstgl-1.0.dll
when building with the MSVC compiler
2017-12-09 19:32:23 +00:00
Matthew Waters 1e8c7e0f31 gl: add necessary padding bytes to all public structs 2017-12-09 19:32:22 +00:00
Matthew Waters 4bbda2b626 glframebuffer: rewrite for a more consistent API
Facilities are given to create fbo's and attach GL memory (renderbuffers
or textures).  It also keeps track of the renderable size for use with
effective use with glViewport().
2017-12-09 19:32:21 +00:00
Matthew Waters a0a0e51249 glcolorconvert: implement usage of a buffer pool
Saves unnecessary glGenTextures and glDeleteTextures which may have a
non-trivial cost.
2017-12-09 19:32:14 +00:00
Matthew Waters c5f3406186 glcolorconvert: use the correct oes target string in the template caps 2017-12-09 19:32:10 +00:00
Matthew Waters 6141d3fc7e glcolorconvert: add support for converting texture targets
Solved with a simple shader templating mechanism and string replacements
of the necessary sampler types/texture accesses and texture coordinate
mangling for rectangular and external-oes textures.
2017-12-09 19:32:10 +00:00
Matthew Waters 681cb5b16d glmemory: add support for rectangle textures
Add the various tokens/strings for the differnet texture types (2D, rect, oes)

Changes the GLmemory api to include the GstGLTextureTarget in all relevant
functions.

Update the relevant caps/templates for 2D only textures.
2017-12-09 19:32:10 +00:00
Matthew Waters aa32408926 glcolorconvert: order the caps template so that RGBA is first
glcolorconvert ! glcolorconvert would sometimes negotiated RGB
(the first list entry) otherwise.
2017-12-09 19:32:10 +00:00
Lubosz Sarnecki dc47e6d3c0 glimagesinkbin: Add GstVideoOverlayCompositionMeta caps features
https://bugzilla.gnome.org/show_bug.cgi?id=745107
2017-12-09 19:32:06 +00:00
Jan Schmidt c2450a28f5 glcolorconvert: Improve passthrough check when no conversion is needed.
Make the passthrough check contingent on only the fields we
can modify being unchanged, and pre-compute it when caps
change instead of checking on each buffer. Makes the passthrough
more lenient if consumers are lax about making input and output
caps complete.
2017-12-09 19:32:00 +00:00
Matthew Waters 530ae2cbb0 glupload/download/convert: provide transform_caps functions
Allows finer grain decisions about formats and features at each
stage of the pipeline.
Also provide propose_allocation for glupload besed on the supported
methods.
2017-12-09 19:31:54 +00:00
Matthew Waters dac1e577e7 glcolorconvert: use the correct caps feature for supported caps
glcolorconvert currently only supports converting between GLMemory
targets.
2017-12-09 19:31:54 +00:00
Matthew Waters 1dfeae2c42 gl: split glcolorconvert usage from glupload
the separation allows the transfer operation to occur in a separate
thread/time which may increase performance in specific circumstances.
2017-12-09 19:31:52 +00:00
Matthew Waters b6fc74c9b8 glcolorconvert: add support for gl3 2017-12-09 19:31:50 +00:00
Wang Xin-yu (王昕宇) 77682a51e6 glcolorconvert: support RGB16/BGR16 video format upload
https://bugzilla.gnome.org/show_bug.cgi?id=738842
2017-12-09 19:31:48 +00:00
Matthew Waters 04b2144ff1 gl/colorconvert: use GstObject's lock instead of our own 2017-12-09 19:31:42 +00:00
Matthew Waters 8ac92cd90d gl/colorconvert: allocate output buffers
Allows the nop optimisation by simply reffing the input buffer.
2017-12-09 19:31:41 +00:00
Matthew Waters 625efc1757 gl/colorconvert: operate on buffers instead of memories 2017-12-09 19:31:41 +00:00
Matthew Waters 07b6bfeaa7 gl/colorconvert: use the texture scaling from the gl memory
The colorconvert values were not being used at all.

https://bugzilla.gnome.org/show_bug.cgi?id=729896
2017-12-09 19:31:40 +00:00
Matthew Waters 977c326c59 gl/colorconvert: implement lazy init 2017-12-09 19:31:40 +00:00
Matthew Waters 857200ff40 gl: make all GObjects inherit from GstObject
Aids memory leak debugging with GST_TRACE=mem-live
2017-12-09 19:31:39 +00:00
Matthew Waters 92c243be62 gl/color: pass large value by reference
Coverity 1199700
2017-12-09 19:31:36 +00:00
Matthew Waters 30c6efc432 gl/mem: allocate the memory per plane
This patch provides the basic infrastructure required for this.
Upload and Download has been ported to this.

Has the nice effect of allowing GstGLMemory to be our
refcounted texture object for any texture type (not just RGBA).

Should not lose any features/video formats.
2017-12-09 19:31:36 +00:00
Matthew Waters fba49c3463 gl: add colorconvert object that converts between color spaces/formats
Currently used by both upload and download objects separately.
2017-12-09 19:31:36 +00:00