Commit 47941088 authored by Stefano Sabatini's avatar Stefano Sabatini

Add frei0r filter.

See thread:
Subject: [FFmpeg-devel] [POC] frei0r wrapper
Date: Tue, 24 Aug 2010 21:37:32 +0200

Originally committed as revision 25165 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 21e681ba
......@@ -36,6 +36,7 @@ version <next>:
- G.722 ADPCM audio encoder/decoder
- R10k video decoder
- ocv_smooth filter
- frei0r wrapper filter
version 0.6:
......
......@@ -162,6 +162,7 @@ Configuration options:
External library support:
--enable-avisynth enable reading of AVISynth script files [no]
--enable-bzlib enable bzlib [autodetect]
--enable-frei0r enable frei0r video filtering
--enable-libopencore-amrnb enable AMR-NB de/encoding via libopencore-amrnb [no]
--enable-libopencore-amrwb enable AMR-WB decoding via libopencore-amrwb [no]
--enable-libopencv enable video filtering via libopencv [no]
......@@ -873,6 +874,7 @@ CONFIG_LIST="
ffprobe
ffserver
fft
frei0r
golomb
gpl
gray
......@@ -1050,6 +1052,7 @@ HAVE_LIST="
poll_h
setrlimit
strerror_r
strtok_r
struct_addrinfo
struct_ipv6_mreq
struct_sockaddr_in6
......@@ -1383,6 +1386,9 @@ vfwcap_indev_extralibs="-lavicap32"
x11_grab_device_indev_deps="x11grab XShmCreateImage"
x11_grab_device_indev_extralibs="-lX11 -lXext -lXfixes"
# filters
frei0r_filter_deps="frei0r dlopen strtok_r"
# protocols
gopher_protocol_deps="network"
http_protocol_deps="network"
......@@ -2647,6 +2653,7 @@ check_func mkstemp
check_func ${malloc_prefix}posix_memalign && enable posix_memalign
check_func setrlimit
check_func strerror_r
check_func strtok_r
check_func_headers io.h setmode
check_func_headers lzo/lzo1x.h lzo1x_999_compress
check_lib2 "windows.h psapi.h" GetProcessMemoryInfo -lpsapi
......@@ -2720,6 +2727,7 @@ check_mathfunc truncf
# these are off by default, so fail if requested and not available
enabled avisynth && require2 vfw32 "windows.h vfw.h" AVIFileInit -lavifil32
enabled frei0r && { check_header frei0r.h || die "ERROR: frei0r.h header not found"; }
enabled libdirac && add_cflags $(pkg-config --cflags dirac) &&
require libdirac libdirac_decoder/dirac_parser.h dirac_decoder_init $(pkg-config --libs dirac) &&
require libdirac libdirac_encoder/dirac_encoder.h dirac_encoder_init $(pkg-config --libs dirac)
......@@ -3012,6 +3020,7 @@ echo "threading support ${thread_type-no}"
echo "SDL support ${sdl-no}"
echo "Sun medialib support ${mlib-no}"
echo "AVISynth enabled ${avisynth-no}"
echo "frei0r enabled ${frei0r-no}"
echo "libdc1394 support ${libdc1394-no}"
echo "libdirac enabled ${libdirac-no}"
echo "libfaac enabled ${libfaac-no}"
......
......@@ -81,6 +81,56 @@ The following command:
will convert the input video to the format "yuv420p".
@section frei0r
Apply a frei0r effect to the input video.
To enable compilation of this filter you need to install the frei0r
header and configure FFmpeg with --enable-frei0r.
The filter supports the syntax:
@example
@var{filter_name}:@var{param1}:@var{param2}:...:@var{paramN}
@end example
@var{filter_name} is the name to the frei0r effect to load. If the
environment variable @env{FREI0R_PATH} is defined, the frei0r effect
is searched in each one of the directories specified by the colon
separated list in @env{FREIOR_PATH}, otherwise in the standard frei0r
paths, which are in this order: @file{HOME/.frei0r-1/lib/},
@file{/usr/local/lib/frei0r-1/}, @file{/usr/lib/frei0r-1/}.
@var{param1}, @var{param2}, ... , @var{paramN} specify the parameters
for the frei0r effect.
A frei0r effect parameter can be a boolean (whose values are specified
with "y" and "n"), a double, a color (specified by the syntax
@var{R}/@var{G}/@var{B}, @var{R}, @var{G}, and @var{B} being float
numbers from 0.0 to 1.0) or by an @code{av_parse_color()} color
description), a position (specified by the syntax @var{X}/@var{Y},
@var{X} and @var{Y} being float numbers) and a string.
The number and kind of parameters depend on the loaded effect. If an
effect parameter is not specified the default value is set.
Some examples follow:
@example
# apply the distort0r effect, set the first two double parameters
frei0r=distort0r:0.5:0.01
# apply the colordistance effect, takes a color as first parameter
frei0r=colordistance:0.2/0.3/0.4
frei0r=colordistance:violet
frei0r=colordistance:0x112233
# apply the perspective effect, specify the top left and top right
# image positions
frei0r=perspective:0.2/0.2:0.8/0.2
@end example
For more information see:
@url{http://piksel.org/frei0r}
@section hflip
Flip the input video horizontally.
......
......@@ -20,6 +20,7 @@ OBJS-$(CONFIG_ASPECT_FILTER) += vf_aspect.o
OBJS-$(CONFIG_CROP_FILTER) += vf_crop.o
OBJS-$(CONFIG_FIFO_FILTER) += vf_fifo.o
OBJS-$(CONFIG_FORMAT_FILTER) += vf_format.o
OBJS-$(CONFIG_FREI0R_FILTER) += vf_frei0r.o
OBJS-$(CONFIG_HFLIP_FILTER) += vf_hflip.o
OBJS-$(CONFIG_NOFORMAT_FILTER) += vf_format.o
OBJS-$(CONFIG_NULL_FILTER) += vf_null.o
......
......@@ -40,6 +40,7 @@ void avfilter_register_all(void)
REGISTER_FILTER (CROP, crop, vf);
REGISTER_FILTER (FIFO, fifo, vf);
REGISTER_FILTER (FORMAT, format, vf);
REGISTER_FILTER (FREI0R, frei0r, vf);
REGISTER_FILTER (HFLIP, hflip, vf);
REGISTER_FILTER (NOFORMAT, noformat, vf);
REGISTER_FILTER (NULL, null, vf);
......
......@@ -25,7 +25,7 @@
#include "libavutil/avutil.h"
#define LIBAVFILTER_VERSION_MAJOR 1
#define LIBAVFILTER_VERSION_MINOR 39
#define LIBAVFILTER_VERSION_MINOR 40
#define LIBAVFILTER_VERSION_MICRO 0
#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment