773 Commits

Author SHA1 Message Date
Brian Matherly
a7b36436a0 Fill uninitialized gaps between grid images
If the imagegrid images do not perfectly fill the destination buffer,
the dst image ends up with artifacts due to uninitialized memory.

As reported here:
https://forum.shotcut.org/t/artifacts-with-a-grid-filter-when-video-mode-and-original-video-aspect-ratios-dont-match-up/30688
2021-11-14 17:02:25 -08:00
Dan Dennedy
700564265a add an invert parameter to bluescreen0r 2021-10-08 17:32:33 -07:00
Dan Dennedy
86475d3e11 Merge pull request #113 from mingwandroid/master
Support MSYS2/mingw-w64
2020-12-08 22:02:41 -08:00
Ray Donnelly
be4dcc6afa Support MSYS2/mingw-w64 2020-12-03 03:06:02 +01:00
Ray Donnelly
4e7e0f40d1 Fix out-of-source-tree CXX build failures
Lack of CXXFLAGS here. I would expect that CPPFLAGS would
have made it through but that seems not to be the case.

Anyway it seems like being able to specify global CXXFLAGS
in one place is useful and this achieves that too.
2020-12-03 03:06:02 +01:00
Dan Dennedy
3d3c4a6acb fix autoconf fails without opencv
Also fixes the OpenCV-based plugins actually building and installing when
OpenCV present.
2020-12-01 22:10:51 -08:00
Denis Roio
3a1f95e493 Merge pull request #112 from mingwandroid/master
Fix build for opencv4
2020-12-01 13:21:44 +01:00
Ray Donnelly
51e8342063 Fix autotools build for opencv4
The CMake build already works
2020-12-01 03:02:42 +01:00
d-j-a-y
a312322d83 Add FX aech0r . Aim to simulate an analog video echo. (#73)
* Add FX aech0r . Aim to simulate an analog video echo.

* Lighter or Darker mode
* Transform the echo to RGB world

TODO : Fix sse2 version - __SSE2__WIP
RGB plane fade is not ported in sse2 (m_rgb and m_flag_b tests)

files  :
          src/Makefile.am
          src/filter/CMakeLists.txt
+         src/filter/aech0r/aech0r.cpp
+         src/filter/aech0r/CMakeLists.txt

* Add FX aech0r (FIXED). Aim to simulate an analog video echo with some colors tweaks

* Bright or Dark mode
* Transform the echo to RGB world
* Strobe

* filter/aechor : Fix 'Fade Factor' description (range->)

* filter/aechor : Fix the default values

* spell fix

Co-authored-by: Poren Chiang <ren.chiang@gmail.com>

* typo fix

Co-authored-by: Poren Chiang <ren.chiang@gmail.com>

Co-authored-by: Poren Chiang <ren.chiang@gmail.com>
2020-09-16 11:11:59 -07:00
Dan Dennedy
69d3968a95 Merge pull request #104 from mypopydev/master
using the void keyword in function declaration
2020-09-15 12:21:18 -07:00
Brendan Hack
0a81c1702e Fix build warning in 64 bit Windows 2020-09-14 20:11:36 -07:00
Dan Dennedy
bf7d77dd6e fix #108 docker and travis-CI builds 2020-09-12 13:17:12 -07:00
Jun Zhao
844573f22a using the void keyword in function declaration
Using the void keyword in function declaration to fix the build
warning when enable frei0r in FFmpeg, the warning message like"
frei0r.h:230:1: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
  230 | int f0r_init();
      | ^~~
CC	libavfilter/vf_gblur.o
frei0r.h:236:1: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
  236 | void f0r_deinit();
      | ^~~~
"
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2020-08-06 22:24:36 +08:00
IOhannes m zmölnig
9d3a813d19 spelling fixes
in English, you cannot really say that "foo allows to do bar".
the correct version is "foo allows someone to do bar" (in the
generic case, use 'one' for <someone>)
2020-05-25 09:00:41 -07:00
Dan Dennedy
c0c8eed79f Merge pull request #101 from kwizart/more_opencv4
Consolidated opencv4 support
2020-05-25 08:58:26 -07:00
Nicolas Chauvet
49dbdfa314 Clean executable on sources files 2020-05-25 10:41:44 +02:00
Nicolas Chauvet
796d122587 Switch to OpenCV4 enums
Signed-off-by: Nicolas Chauvet <kwizart@gmail.com>
2020-05-25 09:51:23 +02:00
Stefan Brüns
ce89da4892 Port facebl0r to OpenCV C++ API
TrackedObj has been converted to a class, and the update_hue_image and
camshift_track_face methods are now members of it, instead of passing
the object as a parameter.

Also, the various cv::Mat instances are kept, instead of destroying and
recreating these on various occasions.

The plugin now only accepts BGRA8888 as image format, as this is the
expected layout throughout the code (default openCV channel order).

The plugin has been tested using the following gstreamer pipeline:
gst-launch-1.0 v4l2src ! image/jpeg,width=640,rate=1/15 \
  ! jpegdec ! videoconvert \
  ! frei0r-filter-facebl0r ellipse=1 \
    classifier=/usr/share/OpenCV/haarcascades/haarcascade_frontalface_default.xml \
  ! videoconvert ! autovideosink
2020-05-25 09:48:08 +02:00
Raphael Graf
35c6497781 facedetect: Support opencv4 2020-05-25 09:47:55 +02:00
Dan Dennedy
b8d4e0595c fix c0rners filter top and left edge artifacts at default full size 2020-04-11 11:54:37 -07:00
Jaromil
0d4b3421af Documentation updates for release v1.7.0 2019-12-06 17:18:02 +01:00
Dan Dennedy
836afcd4c0 fix premultiplied alpha blending in cairogradient 2019-11-30 14:35:46 -08:00
Ross Lagerwall
5c8474694d Bump the minor version of IIRblur 2019-10-27 18:11:54 +07:00
Ross Lagerwall
7e39c37af3 Speed up cairoblend by reducing memory copies
Instead of premultiplying the destination buffer in-place and using
cairo to copy the destination to the output buffer, premultiply the
destination directly to the output buffer and skip the first cairo
paint.

This reduces the time to blend two 4K video frames processed in parallel
across four cores from 16.8 ms to 13.7 ms (and reduces memory bandwidth
usage if you're constrained by that).
2019-10-27 18:11:54 +07:00
Ross Lagerwall
f597474eac Inline the CLAMP0255 function
Inlining the CLAMP0255 function decreases the time to apply the
saturat0r to a 4K video frame from 65 ms to 21 ms.  This is probably
because the compiler has better optimization opportunities rather than
because of the call overhead.
2019-10-27 18:11:54 +07:00
Ross Lagerwall
86bd21cf68 Use system memcpy for blur fast path
Use system memcpy for blur fast path rather than a hand-rolled one. This
should be faster.
2019-10-27 18:11:54 +07:00
Ross Lagerwall
fca57cb88d Fix blur with amount 0.0
If the blur amount is 0.0, actually use 0.0 for the amount rather than
scaling it to 0.5. This avoids applying a small amount of blur and
allows taking the direct copy fast path.
2019-10-27 18:11:54 +07:00
Dan Dennedy
9e76889f2a Merge branch 'Undoundoundo-master' 2019-10-25 12:41:27 +07:00
Dan Dennedy
91759a93df increase minor version of select0r 2019-10-25 12:41:16 +07:00
Undoundoundo
fe12b815d7 Merge pull request #1 from Undoundoundo/Undoundoundo-select0r-huedist
Correction for cylindrical hue term distance
2019-10-20 13:38:29 -04:00
Undoundoundo
5780adb20c Correction for cylindrical hue term distance
Corrects the discontinuous nature of the hue term distance function - which could lead to visibly different colors being considered close matches - into a continuous one.  This is a behavior-modifying change.  For more details, see https://github.com/dyne/frei0r/issues/87
2019-10-20 13:36:42 -04:00
Thomas Perl
805c46542f scanline0r: Smoother scanline appearance (#86)
* scanline0r: Smoother scanline appearance

* scanline0r: Bump minor version, fix description
2019-10-17 20:03:55 -07:00
Ross Lagerwall
aae9d12eb0 Speed up premultiply with 0 alpha
Skip the multiplications if the alpha channel is 0 to speed up cases
where the image is mostly fully transparent. perf showed this function
to be a hotspot when compositing a mostly transparent image onto a video
at 4K resolution.

Timings in ms with a (best-case) fully transparent 3840x2160 image:

        Before       After
-02     8.7          5.1
-03     8.7          4.1
2019-10-14 11:36:51 -07:00
Dan Dennedy
1f75f4b87b fix vertigo not preserving inframe alpha channel 2019-10-13 14:55:26 -07:00
Dan Dennedy
3652de5870 fix rgbnoise not preserving inframe alpha channel 2019-09-08 13:19:49 -07:00
Dan Dennedy
b965471207 fix gaussian IIRBlur segfault on width > 3840 2019-08-08 11:53:29 -07:00
Dan Dennedy
8eaa9a185e clean indentation in blur 2019-08-08 11:46:21 -07:00
Dan Dennedy
118a589e39 Fix IIRblur with fibe3_8 leaves garbage at bottom. 2019-07-14 21:01:43 -07:00
Henner Zeller
f1b10747ee CLAMP() macro: parenthesize all parameters inside macro body. (#84)
* CLAMP() macro: parenthesize all parameters inside macro body.

Also, rename parameter 'l' and 'u' to 'low' and 'up' to make it harder to
mistake the 'l' (letter L) for a '1' (one).

* Rename low/up to min/max
2019-06-17 01:13:10 -07:00
Henner Zeller
76d0961566 Clamp the ranges for 'channel' and 'histogramPosition' to valid numbers. (#83)
* Clamp the ranges for 'channel' and 'histogramPosition' to valid numbers.

Before, it was possible to set non-sense values outside the ranges which
resulted in glitches (at best), as these values were directly used in
switch/case statements.

Document the valid ranges in the 'explanation' documentation string.

While at it
 - make channel and histogramPosition an enumeration.
 - showHistogram is only a boolean. Represent internally as char.
 - There are bunch of places that switch/case through the
   parameter indexes. Make that an enum as well so that there is a more
   readable relationship between these.

* o Default channel: LUMA instead of RED (increased minor version)
o use CLAMP() macro.
2019-06-17 01:12:25 -07:00
Raphael Graf
a70b39438f Include GNUInstallDirs before using CMAKE_INSTALL_LIBDIR 2019-05-08 07:49:09 -07:00
Dan Dennedy
910121ab6f Install plugins into CMAKE_INSTALL_LIBDIR 2019-05-07 11:31:18 -07:00
Thomas Coldrick
dc73fa9473 CMakeLists: Don't hardcode pkgconfig install dir
Currently the pkgconfig files are hardcoded to be installed to
`$CMAKE_INSTALL_PREFIX/lib/pkgconfig`, which affects installations that
are using a differente library directory. This patch allows the use of
the GNUInstallDirs package to modify the installation libdir at build
time and to install the pkgconfig files to
`$CMAKE_INSTALL_LIBDIR`/pkgconfig.

Addresses #79

A previous attempt was made in #80, which failed without the
GNUInstallDirs package being required.
2019-05-07 11:19:16 -07:00
Dan Dennedy
9584ec4a7c Fix name of docker image. 2019-04-26 14:48:46 -07:00
Dan Dennedy
9f3f353697 Use docker for autotools build.
We are building a docker image so me may as well use it to make a
build that uses the OpenCV and GAVL dependencies.
2019-04-26 13:17:47 -07:00
Dan Dennedy
e8fea27226 Test install on Travis CI. 2019-04-26 12:39:49 -07:00
Dan Dennedy
0dc64dba1e Revert "Install pkgconfig files into CMAKE_INSTALL_LIBDIR"
This reverts commit fe776711dd.
2019-04-25 22:32:53 -07:00
Dan Dennedy
81030aa7c7 Revert "Test install on Travis CI."
This reverts commit 17112929da.
2019-04-25 22:31:59 -07:00
Dan Dennedy
17112929da Test install on Travis CI. 2019-04-25 22:22:44 -07:00
Thomas Coldrick
fe776711dd Install pkgconfig files into CMAKE_INSTALL_LIBDIR
Currently the pkgconfig files are installed in `lib/pkgconfig`, which
causes issues in installations with an alternate CMAKE_INSTALL_LIBDIR.

Addresses #79
2019-04-25 19:27:58 -07:00