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.
* 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>
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>
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>)
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
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).
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.
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.
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
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
* 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
* 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.
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.
Currently the pkgconfig files are installed in `lib/pkgconfig`, which
causes issues in installations with an alternate CMAKE_INSTALL_LIBDIR.
Addresses #79