Commit graph

352 commits

Author SHA1 Message Date
Matthew Waters
98249a57db gst: don't use volatile to mean atomic
volatile is not sufficient to provide atomic guarantees and real atomics
should be used instead.  GCC 11 has started warning about using volatile
with atomic operations.

https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719

Discovered in https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/868

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1073>
2021-03-19 04:20:19 +00:00
Stéphane Cerveau
90f640d90d videoscale: allow per feature registration
Split plugin into features including
dynamic types which can be indiviually
registered during a static build.

More details here:

https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1029>
2021-03-16 17:59:00 +00:00
Vivia Nikolaidou
b7b3ec6a6e videoscale: Support for alternate-field interlacing
Accept the negotiation, video-converter.c is aware of the half-height
already

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1027>
2021-02-04 18:28:54 +02:00
Marijn Suijten
abb026ec6a gl,video: Make ptrs to VideoInfo and (GL)AllocationParams immutable
These parameters are incorrectly regarded as mutable in G-IR making them
"incompatible" with languages that are explicit about mutability like
Rust. In order to clean up the code and expected API there, update the
signatures here, right at the source (instead of overriding them in
Gir.toml and hoping for the best).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1005>
2021-01-14 11:53:10 +00:00
Jan Alexander Steffens (heftig)
aa89ae8beb audio: video: Fix in/outbuf confusion of transform_meta
There are three instances where in- and outbuf have been swapped. This
didn't affect the correctness of the libs *filter code, but the
videoscale implementation swapped the arguments of meta->transform_func.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/853>
2020-10-08 18:30:39 +02:00
Tim-Philipp Müller
4f12ce6213 videoscale: make local quark vars static
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/802>
2020-08-28 12:30:43 +01:00
Sebastian Dröge
3edf390b4c videorate/videoscale/audioresample: Ensure that the caps returned from fixate_caps() are actually fixated
If there is some other field than the ones we care about left and not
fixated yet then basetransform will just error out. So instead just pass
the result through gst_caps_fixate() in the very end.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/799>
2020-08-26 09:10:29 +00:00
Sebastian Dröge
39dbbf1369 videoscale: Don't call NULL GstMeta transform function
It's optional and if it does not exist then no transformation is
possible.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/790>
2020-08-18 10:26:48 +03:00
Mathieu Duponchelle
cc516695b0 plugins: uddate gst_type_mark_as_plugin_api() calls 2020-06-06 00:41:17 +02:00
Mathieu Duponchelle
e666c9ec04 plugins: Use gst_type_mark_as_plugin_api() for all non-element plugin types 2020-06-03 22:44:23 -04:00
Michael Gruner
9a94b4cbc1 videoscale: reorder code to avoid indent missmatches
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/548>
2020-05-29 00:44:07 +00:00
Michael Gruner
c0ca12a3fb videoscale: transform size sensitive metas
Currently, videoscale just drops all metas that have other tags
besides video. However videoscale wont change the colorspace or
the orientation of the video so metas tagged as such may be
copied safely. Additionaly, given that videoscale will change
the frame size, we invoke the meta transform implementation
to give it the opportunity to scale accordingly.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/548>
2020-05-29 00:44:07 +00:00
Niels De Graef
1dd63e44b9 videoscale: Use G_DECLARE_FINAL_TYPE 2020-03-16 15:47:58 +00:00
Tim-Philipp Müller
289d8e53e2 Remove autotools build system 2019-10-13 14:15:43 +01:00
Thibault Saunier
27ba8d24ec doc: Port to hotdoc 2019-05-13 11:34:08 -04:00
Jan Alexander Steffens (heftig)
8cffa72356 videoscale: Round when fixating to nearest ints to reduce error 2019-01-14 10:18:21 +00:00
Jan Alexander Steffens (heftig)
89519e8809 videoscale: Choose the best dimensions for fixed PAR
We might not get an exact match for width or height if stepped ranges
are involved.
2019-01-14 10:18:21 +00:00
Xavier Claessens
201e7c7803 Meson: Generate pc file for all plugins in base
https://bugzilla.gnome.org/show_bug.cgi?id=794568
2018-04-25 11:05:56 +01:00
Nicolas Dufresne
8e6c6266d7 Remove plugin specific static build option
Static and dynamic plugins now have the same interface. The standard
--enable-static/--enable-shared toggle are sufficient.
2017-05-16 13:42:07 -04:00
Thibault Saunier
099ac9faf2 docs: Convert gtkdoc comments to markdown
Modernizing the documentation, making it simpler to read an
modify and allowing us to possibly switch to hotdoc in the
future.
2017-03-10 18:19:17 -03:00
Sebastian Dröge
49ac382b47 video-converter: Implement multi-threaded scaling/conversion
This adds a property to select the maximum number of threads to use for
conversion and scaling. During processing, each plane is split into
an equal number of consecutive lines that are then processed by each
thread.

During tests, this gave up to 1.8x speedup with 2 threads and up to 3.2x
speedup with 4 threads when converting e.g. 1080p to 4k in v210.

https://bugzilla.gnome.org/show_bug.cgi?id=778974
2017-02-23 21:55:29 +02:00
Nirbheek Chauhan
5c4f4ac1bd Add support for Meson as alternative/parallel build system
https://github.com/mesonbuild/meson

With contributions from:

Tim-Philipp Müller <tim@centricular.com>
Jussi Pakkanen <jpakkane@gmail.com> (original port)

Highlights of the features provided are:
* Faster builds on Linux (~40-50% faster)
* The ability to build with MSVC on Windows
* Generate Visual Studio project files
* Generate XCode project files
* Much faster builds on Windows (on-par with Linux)
* Seriously fast configure and building on embedded

... and many more. For more details see:

http://blog.nirbheek.in/2016/05/gstreamer-and-meson-new-hope.html
http://blog.nirbheek.in/2016/07/building-and-developing-gstreamer-using.html

Building with Meson should work on both Linux and Windows, but may
need a few more tweaks on other operating systems.
2016-08-20 11:09:51 +01:00
Tim-Philipp Müller
a62c7bd54c Fix use of undeclared core debug category symbols
libgstreamer currently exports some debug category
symbols GST_CAT_*, but those are not declared in any
public headers.

Some plugins and libgstvideo just use GST_DEBUG_CATEGORY_EXTERN()
to declare and use those, but that's just not right at
all, and it won't work on Windows with MSVC. Instead look
up the categories via the API.
2016-02-20 11:31:43 +00:00
Tim-Philipp Müller
ddfe7a2808 win32: remove outdated build cruft
This hasn't been touched for generations, doesn't work,
and is just causing confusion. We also don't want to
maintain these files manually.
2016-02-20 10:05:17 +00:00
Wim Taymans
3d733ad09f videoscale: fix gamma-decode option
We need to use the enum to configure the option now.
2015-09-03 17:56:05 +02:00
Wim Taymans
14083178b8 video: improve logging
Add logging categories for most video objects.
Remove some useless debug lines in video-info and videotestsrc.
Add a performance debug line in the video scaler.
2015-07-15 12:47:42 +02:00
Stefan Sauer
68c5adec38 videoscale: fix debug categories
Use a local category for the default category and fix the import for the
performance category.
2015-07-03 21:08:03 +02:00
Tim-Philipp Müller
ec5c93f169 docs: update element example pipelines
- gst-launch -> gst-launch-1.0
- use autoaudiosink and audiovideosink more often
- review pipeline examples and descriptions
2015-05-10 11:38:19 +01:00
Vivia Nikolaidou
c9cfd0196f video-converter: Change some implicit string enums to real enums
GST_VIDEO_CONVERTER_OPT_ALPHA_MODE, GST_VIDEO_CONVERTER_OPT_CHROMA_MODE,
GST_VIDEO_CONVERTER_OPT_MATRIX_MODE, GST_VIDEO_CONVERTER_OPT_GAMMA_MODE and
GST_VIDEO_CONVERTER_OPT_PRIMARIES_MODE were G_TYPE_STRING with only a few valid
options. Changed those to real enums.

https://bugzilla.gnome.org/show_bug.cgi?id=749104
2015-05-08 15:13:54 +02:00
Tim-Philipp Müller
c680e324bc Remove obsolete Android build cruft
This is not needed any longer.
2015-04-26 18:42:34 +01:00
Jan Schmidt
3d60fb654b docs: Add new video functions and objects. Cleanup a little.
Add GstVideoChroma, GstVideoDither, GstVideoScaler and friends to the docs.

Remove and clean up a few obsolete/deleted refs and typos
2015-03-13 01:08:25 +11:00
Luis de Bethencourt
f85212ed4b videoscale: fix memory leak
In gst_video_scale_fixate_caps () it can goto done without freeing the memory
of the tmp GstStructure. This makes it go out of scope and leak.

CID #1265766
2015-02-04 12:09:45 +00:00
Wim Taymans
47bd6a138c videoscale: don't do dithering 2015-01-28 17:30:53 +01:00
Wim Taymans
3db8879f25 videoscale: disable chroma and matrix operations
Ignore chroma subsampling and color matrix transformations like the
old videoscale used to do. This is to make the performance like it was
before.

See https://bugzilla.gnome.org/show_bug.cgi?id=741987
2015-01-27 10:52:29 +01:00
Wim Taymans
9efbba8c1c videoscale: use old property name
Unbreak ABI by changing to the old property name again.

https://bugzilla.gnome.org/show_bug.cgi?id=740798
2014-11-27 09:47:41 +01:00
Wim Taymans
43f44d41dc videoscale: add property to do scaling after gamma-decode 2014-11-25 11:54:51 +01:00
Wim Taymans
724b83c5f5 videoscale: add more scaling filters
Adjust the filter parameters so that they use the same number of taps
and method as the old ones.
Add some new filters
2014-11-25 11:28:42 +01:00
Wim Taymans
835422b2ea videoscale: port to new API 2014-11-10 11:45:52 +01:00
Luis de Bethencourt
f638f3b32b videoscale: remove FIXME about NV21 support
NV21 is already supported so removing FIXME about adding support for it.
2014-10-08 16:50:52 +01:00
Luis de Bethencourt
a4e9e1fe1b videoscale: avoid recalculating values
Avoid recalculating values used multiple times as base of index. Plus some style
fixes.

https://bugzilla.gnome.org/show_bug.cgi?id=737400
2014-09-26 15:31:55 +01:00
Ravi Kiran K N
f16cf75194 videoscale: support lanczos method for NV formats
Support lanczos scaling method for NV12 and NV21 formats.
Scale the 'Y' plane and scale 'NV' plane.
Implementation for submethods - int16, int32, float and double

https://bugzilla.gnome.org/show_bug.cgi?id=737400
2014-09-26 13:05:18 +01:00
Sebastian Dröge
5adff2e65a videoscale Use stride instead of width in more places 2014-09-23 23:12:19 +03:00
Sanjay NM
db296c5924 videoscale: Use width instead of stride in buffer offset calculation
https://bugzilla.gnome.org/show_bug.cgi?id=736944
2014-09-23 23:08:54 +03:00
Sanjay NM
6babe786f7 videoscale: Added NV support for 4Tap resize
https://bugzilla.gnome.org/show_bug.cgi?id=736845
2014-09-18 13:31:08 +03:00
Sanjay NM
8cab1ab5fc videoscale: Add NV21 support
https://bugzilla.gnome.org/show_bug.cgi?id=734650
2014-08-12 14:31:48 +03:00
Thiago Santos
3202938369 videoscale: vs_image: strides are a gsize
The strides that are set from the GstVideoInfo structs are
a gsize. Using an int can cause overflows when dealing with large
enough images

https://bugzilla.gnome.org/show_bug.cgi?id=731195
2014-06-09 23:38:39 -03:00
Sebastian Dröge
68f5350c66 Release 1.3.1 2014-05-03 17:50:10 +02:00
Tim-Philipp Müller
bcb8068e27 docs: remove outdated and pointless 'Last reviewed' lines from docs
They are very confusing for people, and more often than not
also just not very accurate. Seeing 'last reviewed: 2005' in
your docs is not very confidence-inspiring. Let's just remove
those comments.
2014-04-26 23:28:57 +01:00
Antonio Ospite
fdfc6baf14 videoscale: fix adding borders when NV12 is used
When the frame buffer is NV12 the borders are not added at all, fix that
and fill them to black.

https://bugzilla.gnome.org/show_bug.cgi?id=711003
2013-10-30 18:38:21 +01:00
Wim Taymans
58e6f33e35 videoscale: fix 4tap for RGB15 and RGB16
Fix component ordering, it's wrong in both the scanline and merge
function so it cancels eachother out and isn't really a except for
loss of precision of the green component.
Fix calculation of the filter weight
2013-09-12 12:27:19 +02:00