[project @ Initial revision]
7
AUTHORS
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
BEK - Bergen Senter for Elektronisk Kunst <bek@bek.no>
|
||||||
|
Jean-Sebastien Senecal (js@drone.ws)
|
||||||
|
Mathieu Guindon
|
||||||
|
Georg Seidel <georg@gephex.org>
|
||||||
|
Martin Bayer <martin@gephex.org>
|
||||||
|
Richard Spindler <richard.spindler@gmail.com>
|
||||||
|
|
||||||
340
COPYING
Normal file
@@ -0,0 +1,340 @@
|
|||||||
|
GNU GENERAL PUBLIC LICENSE
|
||||||
|
Version 2, June 1991
|
||||||
|
|
||||||
|
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||||
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
|
Preamble
|
||||||
|
|
||||||
|
The licenses for most software are designed to take away your
|
||||||
|
freedom to share and change it. By contrast, the GNU General Public
|
||||||
|
License is intended to guarantee your freedom to share and change free
|
||||||
|
software--to make sure the software is free for all its users. This
|
||||||
|
General Public License applies to most of the Free Software
|
||||||
|
Foundation's software and to any other program whose authors commit to
|
||||||
|
using it. (Some other Free Software Foundation software is covered by
|
||||||
|
the GNU Library General Public License instead.) You can apply it to
|
||||||
|
your programs, too.
|
||||||
|
|
||||||
|
When we speak of free software, we are referring to freedom, not
|
||||||
|
price. Our General Public Licenses are designed to make sure that you
|
||||||
|
have the freedom to distribute copies of free software (and charge for
|
||||||
|
this service if you wish), that you receive source code or can get it
|
||||||
|
if you want it, that you can change the software or use pieces of it
|
||||||
|
in new free programs; and that you know you can do these things.
|
||||||
|
|
||||||
|
To protect your rights, we need to make restrictions that forbid
|
||||||
|
anyone to deny you these rights or to ask you to surrender the rights.
|
||||||
|
These restrictions translate to certain responsibilities for you if you
|
||||||
|
distribute copies of the software, or if you modify it.
|
||||||
|
|
||||||
|
For example, if you distribute copies of such a program, whether
|
||||||
|
gratis or for a fee, you must give the recipients all the rights that
|
||||||
|
you have. You must make sure that they, too, receive or can get the
|
||||||
|
source code. And you must show them these terms so they know their
|
||||||
|
rights.
|
||||||
|
|
||||||
|
We protect your rights with two steps: (1) copyright the software, and
|
||||||
|
(2) offer you this license which gives you legal permission to copy,
|
||||||
|
distribute and/or modify the software.
|
||||||
|
|
||||||
|
Also, for each author's protection and ours, we want to make certain
|
||||||
|
that everyone understands that there is no warranty for this free
|
||||||
|
software. If the software is modified by someone else and passed on, we
|
||||||
|
want its recipients to know that what they have is not the original, so
|
||||||
|
that any problems introduced by others will not reflect on the original
|
||||||
|
authors' reputations.
|
||||||
|
|
||||||
|
Finally, any free program is threatened constantly by software
|
||||||
|
patents. We wish to avoid the danger that redistributors of a free
|
||||||
|
program will individually obtain patent licenses, in effect making the
|
||||||
|
program proprietary. To prevent this, we have made it clear that any
|
||||||
|
patent must be licensed for everyone's free use or not licensed at all.
|
||||||
|
|
||||||
|
The precise terms and conditions for copying, distribution and
|
||||||
|
modification follow.
|
||||||
|
|
||||||
|
GNU GENERAL PUBLIC LICENSE
|
||||||
|
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||||
|
|
||||||
|
0. This License applies to any program or other work which contains
|
||||||
|
a notice placed by the copyright holder saying it may be distributed
|
||||||
|
under the terms of this General Public License. The "Program", below,
|
||||||
|
refers to any such program or work, and a "work based on the Program"
|
||||||
|
means either the Program or any derivative work under copyright law:
|
||||||
|
that is to say, a work containing the Program or a portion of it,
|
||||||
|
either verbatim or with modifications and/or translated into another
|
||||||
|
language. (Hereinafter, translation is included without limitation in
|
||||||
|
the term "modification".) Each licensee is addressed as "you".
|
||||||
|
|
||||||
|
Activities other than copying, distribution and modification are not
|
||||||
|
covered by this License; they are outside its scope. The act of
|
||||||
|
running the Program is not restricted, and the output from the Program
|
||||||
|
is covered only if its contents constitute a work based on the
|
||||||
|
Program (independent of having been made by running the Program).
|
||||||
|
Whether that is true depends on what the Program does.
|
||||||
|
|
||||||
|
1. You may copy and distribute verbatim copies of the Program's
|
||||||
|
source code as you receive it, in any medium, provided that you
|
||||||
|
conspicuously and appropriately publish on each copy an appropriate
|
||||||
|
copyright notice and disclaimer of warranty; keep intact all the
|
||||||
|
notices that refer to this License and to the absence of any warranty;
|
||||||
|
and give any other recipients of the Program a copy of this License
|
||||||
|
along with the Program.
|
||||||
|
|
||||||
|
You may charge a fee for the physical act of transferring a copy, and
|
||||||
|
you may at your option offer warranty protection in exchange for a fee.
|
||||||
|
|
||||||
|
2. You may modify your copy or copies of the Program or any portion
|
||||||
|
of it, thus forming a work based on the Program, and copy and
|
||||||
|
distribute such modifications or work under the terms of Section 1
|
||||||
|
above, provided that you also meet all of these conditions:
|
||||||
|
|
||||||
|
a) You must cause the modified files to carry prominent notices
|
||||||
|
stating that you changed the files and the date of any change.
|
||||||
|
|
||||||
|
b) You must cause any work that you distribute or publish, that in
|
||||||
|
whole or in part contains or is derived from the Program or any
|
||||||
|
part thereof, to be licensed as a whole at no charge to all third
|
||||||
|
parties under the terms of this License.
|
||||||
|
|
||||||
|
c) If the modified program normally reads commands interactively
|
||||||
|
when run, you must cause it, when started running for such
|
||||||
|
interactive use in the most ordinary way, to print or display an
|
||||||
|
announcement including an appropriate copyright notice and a
|
||||||
|
notice that there is no warranty (or else, saying that you provide
|
||||||
|
a warranty) and that users may redistribute the program under
|
||||||
|
these conditions, and telling the user how to view a copy of this
|
||||||
|
License. (Exception: if the Program itself is interactive but
|
||||||
|
does not normally print such an announcement, your work based on
|
||||||
|
the Program is not required to print an announcement.)
|
||||||
|
|
||||||
|
These requirements apply to the modified work as a whole. If
|
||||||
|
identifiable sections of that work are not derived from the Program,
|
||||||
|
and can be reasonably considered independent and separate works in
|
||||||
|
themselves, then this License, and its terms, do not apply to those
|
||||||
|
sections when you distribute them as separate works. But when you
|
||||||
|
distribute the same sections as part of a whole which is a work based
|
||||||
|
on the Program, the distribution of the whole must be on the terms of
|
||||||
|
this License, whose permissions for other licensees extend to the
|
||||||
|
entire whole, and thus to each and every part regardless of who wrote it.
|
||||||
|
|
||||||
|
Thus, it is not the intent of this section to claim rights or contest
|
||||||
|
your rights to work written entirely by you; rather, the intent is to
|
||||||
|
exercise the right to control the distribution of derivative or
|
||||||
|
collective works based on the Program.
|
||||||
|
|
||||||
|
In addition, mere aggregation of another work not based on the Program
|
||||||
|
with the Program (or with a work based on the Program) on a volume of
|
||||||
|
a storage or distribution medium does not bring the other work under
|
||||||
|
the scope of this License.
|
||||||
|
|
||||||
|
3. You may copy and distribute the Program (or a work based on it,
|
||||||
|
under Section 2) in object code or executable form under the terms of
|
||||||
|
Sections 1 and 2 above provided that you also do one of the following:
|
||||||
|
|
||||||
|
a) Accompany it with the complete corresponding machine-readable
|
||||||
|
source code, which must be distributed under the terms of Sections
|
||||||
|
1 and 2 above on a medium customarily used for software interchange; or,
|
||||||
|
|
||||||
|
b) Accompany it with a written offer, valid for at least three
|
||||||
|
years, to give any third party, for a charge no more than your
|
||||||
|
cost of physically performing source distribution, a complete
|
||||||
|
machine-readable copy of the corresponding source code, to be
|
||||||
|
distributed under the terms of Sections 1 and 2 above on a medium
|
||||||
|
customarily used for software interchange; or,
|
||||||
|
|
||||||
|
c) Accompany it with the information you received as to the offer
|
||||||
|
to distribute corresponding source code. (This alternative is
|
||||||
|
allowed only for noncommercial distribution and only if you
|
||||||
|
received the program in object code or executable form with such
|
||||||
|
an offer, in accord with Subsection b above.)
|
||||||
|
|
||||||
|
The source code for a work means the preferred form of the work for
|
||||||
|
making modifications to it. For an executable work, complete source
|
||||||
|
code means all the source code for all modules it contains, plus any
|
||||||
|
associated interface definition files, plus the scripts used to
|
||||||
|
control compilation and installation of the executable. However, as a
|
||||||
|
special exception, the source code distributed need not include
|
||||||
|
anything that is normally distributed (in either source or binary
|
||||||
|
form) with the major components (compiler, kernel, and so on) of the
|
||||||
|
operating system on which the executable runs, unless that component
|
||||||
|
itself accompanies the executable.
|
||||||
|
|
||||||
|
If distribution of executable or object code is made by offering
|
||||||
|
access to copy from a designated place, then offering equivalent
|
||||||
|
access to copy the source code from the same place counts as
|
||||||
|
distribution of the source code, even though third parties are not
|
||||||
|
compelled to copy the source along with the object code.
|
||||||
|
|
||||||
|
4. You may not copy, modify, sublicense, or distribute the Program
|
||||||
|
except as expressly provided under this License. Any attempt
|
||||||
|
otherwise to copy, modify, sublicense or distribute the Program is
|
||||||
|
void, and will automatically terminate your rights under this License.
|
||||||
|
However, parties who have received copies, or rights, from you under
|
||||||
|
this License will not have their licenses terminated so long as such
|
||||||
|
parties remain in full compliance.
|
||||||
|
|
||||||
|
5. You are not required to accept this License, since you have not
|
||||||
|
signed it. However, nothing else grants you permission to modify or
|
||||||
|
distribute the Program or its derivative works. These actions are
|
||||||
|
prohibited by law if you do not accept this License. Therefore, by
|
||||||
|
modifying or distributing the Program (or any work based on the
|
||||||
|
Program), you indicate your acceptance of this License to do so, and
|
||||||
|
all its terms and conditions for copying, distributing or modifying
|
||||||
|
the Program or works based on it.
|
||||||
|
|
||||||
|
6. Each time you redistribute the Program (or any work based on the
|
||||||
|
Program), the recipient automatically receives a license from the
|
||||||
|
original licensor to copy, distribute or modify the Program subject to
|
||||||
|
these terms and conditions. You may not impose any further
|
||||||
|
restrictions on the recipients' exercise of the rights granted herein.
|
||||||
|
You are not responsible for enforcing compliance by third parties to
|
||||||
|
this License.
|
||||||
|
|
||||||
|
7. If, as a consequence of a court judgment or allegation of patent
|
||||||
|
infringement or for any other reason (not limited to patent issues),
|
||||||
|
conditions are imposed on you (whether by court order, agreement or
|
||||||
|
otherwise) that contradict the conditions of this License, they do not
|
||||||
|
excuse you from the conditions of this License. If you cannot
|
||||||
|
distribute so as to satisfy simultaneously your obligations under this
|
||||||
|
License and any other pertinent obligations, then as a consequence you
|
||||||
|
may not distribute the Program at all. For example, if a patent
|
||||||
|
license would not permit royalty-free redistribution of the Program by
|
||||||
|
all those who receive copies directly or indirectly through you, then
|
||||||
|
the only way you could satisfy both it and this License would be to
|
||||||
|
refrain entirely from distribution of the Program.
|
||||||
|
|
||||||
|
If any portion of this section is held invalid or unenforceable under
|
||||||
|
any particular circumstance, the balance of the section is intended to
|
||||||
|
apply and the section as a whole is intended to apply in other
|
||||||
|
circumstances.
|
||||||
|
|
||||||
|
It is not the purpose of this section to induce you to infringe any
|
||||||
|
patents or other property right claims or to contest validity of any
|
||||||
|
such claims; this section has the sole purpose of protecting the
|
||||||
|
integrity of the free software distribution system, which is
|
||||||
|
implemented by public license practices. Many people have made
|
||||||
|
generous contributions to the wide range of software distributed
|
||||||
|
through that system in reliance on consistent application of that
|
||||||
|
system; it is up to the author/donor to decide if he or she is willing
|
||||||
|
to distribute software through any other system and a licensee cannot
|
||||||
|
impose that choice.
|
||||||
|
|
||||||
|
This section is intended to make thoroughly clear what is believed to
|
||||||
|
be a consequence of the rest of this License.
|
||||||
|
|
||||||
|
8. If the distribution and/or use of the Program is restricted in
|
||||||
|
certain countries either by patents or by copyrighted interfaces, the
|
||||||
|
original copyright holder who places the Program under this License
|
||||||
|
may add an explicit geographical distribution limitation excluding
|
||||||
|
those countries, so that distribution is permitted only in or among
|
||||||
|
countries not thus excluded. In such case, this License incorporates
|
||||||
|
the limitation as if written in the body of this License.
|
||||||
|
|
||||||
|
9. The Free Software Foundation may publish revised and/or new versions
|
||||||
|
of the General Public License from time to time. Such new versions will
|
||||||
|
be similar in spirit to the present version, but may differ in detail to
|
||||||
|
address new problems or concerns.
|
||||||
|
|
||||||
|
Each version is given a distinguishing version number. If the Program
|
||||||
|
specifies a version number of this License which applies to it and "any
|
||||||
|
later version", you have the option of following the terms and conditions
|
||||||
|
either of that version or of any later version published by the Free
|
||||||
|
Software Foundation. If the Program does not specify a version number of
|
||||||
|
this License, you may choose any version ever published by the Free Software
|
||||||
|
Foundation.
|
||||||
|
|
||||||
|
10. If you wish to incorporate parts of the Program into other free
|
||||||
|
programs whose distribution conditions are different, write to the author
|
||||||
|
to ask for permission. For software which is copyrighted by the Free
|
||||||
|
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||||
|
make exceptions for this. Our decision will be guided by the two goals
|
||||||
|
of preserving the free status of all derivatives of our free software and
|
||||||
|
of promoting the sharing and reuse of software generally.
|
||||||
|
|
||||||
|
NO WARRANTY
|
||||||
|
|
||||||
|
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||||
|
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||||
|
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||||
|
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||||
|
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||||
|
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||||
|
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||||
|
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||||
|
REPAIR OR CORRECTION.
|
||||||
|
|
||||||
|
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||||
|
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||||
|
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||||
|
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||||
|
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||||
|
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||||
|
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||||
|
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||||
|
POSSIBILITY OF SUCH DAMAGES.
|
||||||
|
|
||||||
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
How to Apply These Terms to Your New Programs
|
||||||
|
|
||||||
|
If you develop a new program, and you want it to be of the greatest
|
||||||
|
possible use to the public, the best way to achieve this is to make it
|
||||||
|
free software which everyone can redistribute and change under these terms.
|
||||||
|
|
||||||
|
To do so, attach the following notices to the program. It is safest
|
||||||
|
to attach them to the start of each source file to most effectively
|
||||||
|
convey the exclusion of warranty; and each file should have at least
|
||||||
|
the "copyright" line and a pointer to where the full notice is found.
|
||||||
|
|
||||||
|
<one line to give the program's name and a brief idea of what it does.>
|
||||||
|
Copyright (C) <year> <name of author>
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
|
|
||||||
|
Also add information on how to contact you by electronic and paper mail.
|
||||||
|
|
||||||
|
If the program is interactive, make it output a short notice like this
|
||||||
|
when it starts in an interactive mode:
|
||||||
|
|
||||||
|
Gnomovision version 69, Copyright (C) year name of author
|
||||||
|
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||||
|
This is free software, and you are welcome to redistribute it
|
||||||
|
under certain conditions; type `show c' for details.
|
||||||
|
|
||||||
|
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||||
|
parts of the General Public License. Of course, the commands you use may
|
||||||
|
be called something other than `show w' and `show c'; they could even be
|
||||||
|
mouse-clicks or menu items--whatever suits your program.
|
||||||
|
|
||||||
|
You should also get your employer (if you work as a programmer) or your
|
||||||
|
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||||
|
necessary. Here is a sample; alter the names:
|
||||||
|
|
||||||
|
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||||
|
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||||
|
|
||||||
|
<signature of Ty Coon>, 1 April 1989
|
||||||
|
Ty Coon, President of Vice
|
||||||
|
|
||||||
|
This General Public License does not permit incorporating your program into
|
||||||
|
proprietary programs. If your program is a subroutine library, you may
|
||||||
|
consider it more useful to permit linking proprietary applications with the
|
||||||
|
library. If this is what you want to do, use the GNU Library General
|
||||||
|
Public License instead of this License.
|
||||||
236
INSTALL
Normal file
@@ -0,0 +1,236 @@
|
|||||||
|
Installation Instructions
|
||||||
|
*************************
|
||||||
|
|
||||||
|
Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free
|
||||||
|
Software Foundation, Inc.
|
||||||
|
|
||||||
|
This file is free documentation; the Free Software Foundation gives
|
||||||
|
unlimited permission to copy, distribute and modify it.
|
||||||
|
|
||||||
|
Basic Installation
|
||||||
|
==================
|
||||||
|
|
||||||
|
These are generic installation instructions.
|
||||||
|
|
||||||
|
The `configure' shell script attempts to guess correct values for
|
||||||
|
various system-dependent variables used during compilation. It uses
|
||||||
|
those values to create a `Makefile' in each directory of the package.
|
||||||
|
It may also create one or more `.h' files containing system-dependent
|
||||||
|
definitions. Finally, it creates a shell script `config.status' that
|
||||||
|
you can run in the future to recreate the current configuration, and a
|
||||||
|
file `config.log' containing compiler output (useful mainly for
|
||||||
|
debugging `configure').
|
||||||
|
|
||||||
|
It can also use an optional file (typically called `config.cache'
|
||||||
|
and enabled with `--cache-file=config.cache' or simply `-C') that saves
|
||||||
|
the results of its tests to speed up reconfiguring. (Caching is
|
||||||
|
disabled by default to prevent problems with accidental use of stale
|
||||||
|
cache files.)
|
||||||
|
|
||||||
|
If you need to do unusual things to compile the package, please try
|
||||||
|
to figure out how `configure' could check whether to do them, and mail
|
||||||
|
diffs or instructions to the address given in the `README' so they can
|
||||||
|
be considered for the next release. If you are using the cache, and at
|
||||||
|
some point `config.cache' contains results you don't want to keep, you
|
||||||
|
may remove or edit it.
|
||||||
|
|
||||||
|
The file `configure.ac' (or `configure.in') is used to create
|
||||||
|
`configure' by a program called `autoconf'. You only need
|
||||||
|
`configure.ac' if you want to change it or regenerate `configure' using
|
||||||
|
a newer version of `autoconf'.
|
||||||
|
|
||||||
|
The simplest way to compile this package is:
|
||||||
|
|
||||||
|
1. `cd' to the directory containing the package's source code and type
|
||||||
|
`./configure' to configure the package for your system. If you're
|
||||||
|
using `csh' on an old version of System V, you might need to type
|
||||||
|
`sh ./configure' instead to prevent `csh' from trying to execute
|
||||||
|
`configure' itself.
|
||||||
|
|
||||||
|
Running `configure' takes awhile. While running, it prints some
|
||||||
|
messages telling which features it is checking for.
|
||||||
|
|
||||||
|
2. Type `make' to compile the package.
|
||||||
|
|
||||||
|
3. Optionally, type `make check' to run any self-tests that come with
|
||||||
|
the package.
|
||||||
|
|
||||||
|
4. Type `make install' to install the programs and any data files and
|
||||||
|
documentation.
|
||||||
|
|
||||||
|
5. You can remove the program binaries and object files from the
|
||||||
|
source code directory by typing `make clean'. To also remove the
|
||||||
|
files that `configure' created (so you can compile the package for
|
||||||
|
a different kind of computer), type `make distclean'. There is
|
||||||
|
also a `make maintainer-clean' target, but that is intended mainly
|
||||||
|
for the package's developers. If you use it, you may have to get
|
||||||
|
all sorts of other programs in order to regenerate files that came
|
||||||
|
with the distribution.
|
||||||
|
|
||||||
|
Compilers and Options
|
||||||
|
=====================
|
||||||
|
|
||||||
|
Some systems require unusual options for compilation or linking that the
|
||||||
|
`configure' script does not know about. Run `./configure --help' for
|
||||||
|
details on some of the pertinent environment variables.
|
||||||
|
|
||||||
|
You can give `configure' initial values for configuration parameters
|
||||||
|
by setting variables in the command line or in the environment. Here
|
||||||
|
is an example:
|
||||||
|
|
||||||
|
./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
|
||||||
|
|
||||||
|
*Note Defining Variables::, for more details.
|
||||||
|
|
||||||
|
Compiling For Multiple Architectures
|
||||||
|
====================================
|
||||||
|
|
||||||
|
You can compile the package for more than one kind of computer at the
|
||||||
|
same time, by placing the object files for each architecture in their
|
||||||
|
own directory. To do this, you must use a version of `make' that
|
||||||
|
supports the `VPATH' variable, such as GNU `make'. `cd' to the
|
||||||
|
directory where you want the object files and executables to go and run
|
||||||
|
the `configure' script. `configure' automatically checks for the
|
||||||
|
source code in the directory that `configure' is in and in `..'.
|
||||||
|
|
||||||
|
If you have to use a `make' that does not support the `VPATH'
|
||||||
|
variable, you have to compile the package for one architecture at a
|
||||||
|
time in the source code directory. After you have installed the
|
||||||
|
package for one architecture, use `make distclean' before reconfiguring
|
||||||
|
for another architecture.
|
||||||
|
|
||||||
|
Installation Names
|
||||||
|
==================
|
||||||
|
|
||||||
|
By default, `make install' installs the package's commands under
|
||||||
|
`/usr/local/bin', include files under `/usr/local/include', etc. You
|
||||||
|
can specify an installation prefix other than `/usr/local' by giving
|
||||||
|
`configure' the option `--prefix=PREFIX'.
|
||||||
|
|
||||||
|
You can specify separate installation prefixes for
|
||||||
|
architecture-specific files and architecture-independent files. If you
|
||||||
|
pass the option `--exec-prefix=PREFIX' to `configure', the package uses
|
||||||
|
PREFIX as the prefix for installing programs and libraries.
|
||||||
|
Documentation and other data files still use the regular prefix.
|
||||||
|
|
||||||
|
In addition, if you use an unusual directory layout you can give
|
||||||
|
options like `--bindir=DIR' to specify different values for particular
|
||||||
|
kinds of files. Run `configure --help' for a list of the directories
|
||||||
|
you can set and what kinds of files go in them.
|
||||||
|
|
||||||
|
If the package supports it, you can cause programs to be installed
|
||||||
|
with an extra prefix or suffix on their names by giving `configure' the
|
||||||
|
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
|
||||||
|
|
||||||
|
Optional Features
|
||||||
|
=================
|
||||||
|
|
||||||
|
Some packages pay attention to `--enable-FEATURE' options to
|
||||||
|
`configure', where FEATURE indicates an optional part of the package.
|
||||||
|
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
|
||||||
|
is something like `gnu-as' or `x' (for the X Window System). The
|
||||||
|
`README' should mention any `--enable-' and `--with-' options that the
|
||||||
|
package recognizes.
|
||||||
|
|
||||||
|
For packages that use the X Window System, `configure' can usually
|
||||||
|
find the X include and library files automatically, but if it doesn't,
|
||||||
|
you can use the `configure' options `--x-includes=DIR' and
|
||||||
|
`--x-libraries=DIR' to specify their locations.
|
||||||
|
|
||||||
|
Specifying the System Type
|
||||||
|
==========================
|
||||||
|
|
||||||
|
There may be some features `configure' cannot figure out automatically,
|
||||||
|
but needs to determine by the type of machine the package will run on.
|
||||||
|
Usually, assuming the package is built to be run on the _same_
|
||||||
|
architectures, `configure' can figure that out, but if it prints a
|
||||||
|
message saying it cannot guess the machine type, give it the
|
||||||
|
`--build=TYPE' option. TYPE can either be a short name for the system
|
||||||
|
type, such as `sun4', or a canonical name which has the form:
|
||||||
|
|
||||||
|
CPU-COMPANY-SYSTEM
|
||||||
|
|
||||||
|
where SYSTEM can have one of these forms:
|
||||||
|
|
||||||
|
OS KERNEL-OS
|
||||||
|
|
||||||
|
See the file `config.sub' for the possible values of each field. If
|
||||||
|
`config.sub' isn't included in this package, then this package doesn't
|
||||||
|
need to know the machine type.
|
||||||
|
|
||||||
|
If you are _building_ compiler tools for cross-compiling, you should
|
||||||
|
use the option `--target=TYPE' to select the type of system they will
|
||||||
|
produce code for.
|
||||||
|
|
||||||
|
If you want to _use_ a cross compiler, that generates code for a
|
||||||
|
platform different from the build platform, you should specify the
|
||||||
|
"host" platform (i.e., that on which the generated programs will
|
||||||
|
eventually be run) with `--host=TYPE'.
|
||||||
|
|
||||||
|
Sharing Defaults
|
||||||
|
================
|
||||||
|
|
||||||
|
If you want to set default values for `configure' scripts to share, you
|
||||||
|
can create a site shell script called `config.site' that gives default
|
||||||
|
values for variables like `CC', `cache_file', and `prefix'.
|
||||||
|
`configure' looks for `PREFIX/share/config.site' if it exists, then
|
||||||
|
`PREFIX/etc/config.site' if it exists. Or, you can set the
|
||||||
|
`CONFIG_SITE' environment variable to the location of the site script.
|
||||||
|
A warning: not all `configure' scripts look for a site script.
|
||||||
|
|
||||||
|
Defining Variables
|
||||||
|
==================
|
||||||
|
|
||||||
|
Variables not defined in a site shell script can be set in the
|
||||||
|
environment passed to `configure'. However, some packages may run
|
||||||
|
configure again during the build, and the customized values of these
|
||||||
|
variables may be lost. In order to avoid this problem, you should set
|
||||||
|
them in the `configure' command line, using `VAR=value'. For example:
|
||||||
|
|
||||||
|
./configure CC=/usr/local2/bin/gcc
|
||||||
|
|
||||||
|
causes the specified `gcc' to be used as the C compiler (unless it is
|
||||||
|
overridden in the site shell script). Here is a another example:
|
||||||
|
|
||||||
|
/bin/bash ./configure CONFIG_SHELL=/bin/bash
|
||||||
|
|
||||||
|
Here the `CONFIG_SHELL=/bin/bash' operand causes subsequent
|
||||||
|
configuration-related scripts to be executed by `/bin/bash'.
|
||||||
|
|
||||||
|
`configure' Invocation
|
||||||
|
======================
|
||||||
|
|
||||||
|
`configure' recognizes the following options to control how it operates.
|
||||||
|
|
||||||
|
`--help'
|
||||||
|
`-h'
|
||||||
|
Print a summary of the options to `configure', and exit.
|
||||||
|
|
||||||
|
`--version'
|
||||||
|
`-V'
|
||||||
|
Print the version of Autoconf used to generate the `configure'
|
||||||
|
script, and exit.
|
||||||
|
|
||||||
|
`--cache-file=FILE'
|
||||||
|
Enable the cache: use and save the results of the tests in FILE,
|
||||||
|
traditionally `config.cache'. FILE defaults to `/dev/null' to
|
||||||
|
disable caching.
|
||||||
|
|
||||||
|
`--config-cache'
|
||||||
|
`-C'
|
||||||
|
Alias for `--cache-file=config.cache'.
|
||||||
|
|
||||||
|
`--quiet'
|
||||||
|
`--silent'
|
||||||
|
`-q'
|
||||||
|
Do not print messages saying which checks are being made. To
|
||||||
|
suppress all normal output, redirect it to `/dev/null' (any error
|
||||||
|
messages will still be shown).
|
||||||
|
|
||||||
|
`--srcdir=DIR'
|
||||||
|
Look for the package's source code in directory DIR. Usually
|
||||||
|
`configure' can determine that directory automatically.
|
||||||
|
|
||||||
|
`configure' also accepts some other, not widely useful, options. Run
|
||||||
|
`configure --help' for more details.
|
||||||
|
|
||||||
12
Makefile.am
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
# Copyright (C) 2007 Richard Spindler <richard.spindler AT gmail.com>
|
||||||
|
#
|
||||||
|
# This file is free software; as a special exception the author gives
|
||||||
|
# unlimited permission to copy and/or distribute it, with or without
|
||||||
|
# modifications, as long as this notice is preserved.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful, but
|
||||||
|
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
|
||||||
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
SUBDIRS=src include
|
||||||
|
EXTRA_DIST = Doxyfile
|
||||||
24
README
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
frei0r - a minimalistic plugin API for video effects
|
||||||
|
|
||||||
|
It is a minimalistic plugin API for video sources and filters. The behaviour of
|
||||||
|
the effects can be controlled from the host by simple parameters. The intent is
|
||||||
|
to solve the recurring reimplementation or adaptation issue of standard effects.
|
||||||
|
|
||||||
|
It is not meant as a generic API for all kinds of video applications.
|
||||||
|
|
||||||
|
There is no support for the requirements of special application areas like non
|
||||||
|
linear editors, hardware accelerated shader effects, and high precision video
|
||||||
|
processing. These advanced issues are not even solved satisfactory for non cross
|
||||||
|
application plugin apis and are still an evolving field.
|
||||||
|
|
||||||
|
The frei0r API is not meant to be a competing standard to more ambitious
|
||||||
|
efforts.
|
||||||
|
|
||||||
|
http://www.piksel.org/frei0r/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Optional Dependencies:
|
||||||
|
gavl, required for scale0tilt plugin, available at http://gmerlin.sourceforge.net/
|
||||||
|
|
||||||
|
OpenCV, required for facedetect plugin, available at http://opencvlibrary.sourceforge.net/
|
||||||
30
autogen.sh
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
#! /bin/sh
|
||||||
|
|
||||||
|
libtoolize --force --copy
|
||||||
|
|
||||||
|
echo aclocal...
|
||||||
|
(aclocal --version) < /dev/null > /dev/null 2>&1 || {
|
||||||
|
echo aclocal not found
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
aclocal || exit 1
|
||||||
|
|
||||||
|
echo automake...
|
||||||
|
(automake --version) < /dev/null > /dev/null 2>&1 || {
|
||||||
|
echo automake not found
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
automake --add-missing --copy --gnu || exit 1
|
||||||
|
|
||||||
|
echo autoconf...
|
||||||
|
(autoconf --version) < /dev/null > /dev/null 2>&1 || {
|
||||||
|
echo autoconf not found
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
autoconf || exit 1
|
||||||
|
|
||||||
|
exit 0
|
||||||
|
|
||||||
52
configure.ac
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
# -*- Autoconf -*-
|
||||||
|
# Process this file with autoconf to produce a configure script.
|
||||||
|
|
||||||
|
AC_PREREQ(2.59)
|
||||||
|
AC_INIT(frei0r-plugins, [1.1.20], [richard.spindler@gmail.com])
|
||||||
|
|
||||||
|
AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
|
||||||
|
|
||||||
|
# Checks for programs.
|
||||||
|
AC_PROG_CXX
|
||||||
|
AC_PROG_CC
|
||||||
|
AC_PROG_LIBTOOL
|
||||||
|
|
||||||
|
HAVE_OPENCV=false
|
||||||
|
PKG_CHECK_MODULES(OPENCV, opencv >= 1.0.0, [HAVE_OPENCV=true], [true])
|
||||||
|
if test x$HAVE_OPENCV = xfalse; then
|
||||||
|
AC_MSG_WARN([*** opencv >= 1.0.0 not found - this program enables optional plugin with the Open Source Computer Vision library >= 1.0.0 http://opencvlibrary.sourceforge.net/ ***])
|
||||||
|
else
|
||||||
|
OPENCV_CFLAGS="$OPENCV_CFLAGS -DOPENCV_PREFIX=`pkg-config opencv --variable=prefix`"
|
||||||
|
fi
|
||||||
|
AM_CONDITIONAL([HAVE_OPENCV], [test x$HAVE_OPENCV = xtrue])
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Checks for header files.
|
||||||
|
AC_HEADER_STDC
|
||||||
|
AC_CHECK_HEADERS([float.h inttypes.h limits.h stdlib.h string.h])
|
||||||
|
|
||||||
|
# Checks for typedefs, structures, and compiler characteristics.
|
||||||
|
AC_HEADER_STDBOOL
|
||||||
|
AC_C_CONST
|
||||||
|
AC_C_INLINE
|
||||||
|
|
||||||
|
# Checks for library functions.
|
||||||
|
AC_FUNC_MALLOC
|
||||||
|
AC_CHECK_FUNCS([floor memset pow sqrt])
|
||||||
|
|
||||||
|
HAVE_GAVL=false
|
||||||
|
PKG_CHECK_MODULES(GAVL, gavl >= 0.2.3, [HAVE_GAVL=true], [true])
|
||||||
|
if test x$HAVE_GAVL = xfalse; then
|
||||||
|
AC_MSG_WARN([*** gavl >= 0.2.3 not found - this program enables optional plugin with the gmerlin audio
|
||||||
|
video library >= 0.2.3 http://gmerlin.sourceforge.net/ ***])
|
||||||
|
fi
|
||||||
|
AM_CONDITIONAL([HAVE_GAVL], [test x$HAVE_GAVL = xtrue])
|
||||||
|
|
||||||
|
AC_CONFIG_FILES([
|
||||||
|
Makefile
|
||||||
|
include/Makefile
|
||||||
|
src/Makefile
|
||||||
|
])
|
||||||
|
|
||||||
|
AC_OUTPUT
|
||||||
8
frei0r-autoconf/AUTHORS
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
BEK - Bergen Senter for Elektronisk Kunst <bek@bek.no>
|
||||||
|
Jean-Sebastien Senecal (js@drone.ws)
|
||||||
|
Mathieu Guindon
|
||||||
|
Georg Seidel <georg@gephex.org>
|
||||||
|
Martin Bayer <martin@gephex.org>
|
||||||
|
Richard Spindler <richard.spindler@gmail.com>
|
||||||
|
Albert Frisch <albert.frisch@gmail.com>
|
||||||
|
|
||||||
340
frei0r-autoconf/COPYING
Normal file
@@ -0,0 +1,340 @@
|
|||||||
|
GNU GENERAL PUBLIC LICENSE
|
||||||
|
Version 2, June 1991
|
||||||
|
|
||||||
|
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||||
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
|
Preamble
|
||||||
|
|
||||||
|
The licenses for most software are designed to take away your
|
||||||
|
freedom to share and change it. By contrast, the GNU General Public
|
||||||
|
License is intended to guarantee your freedom to share and change free
|
||||||
|
software--to make sure the software is free for all its users. This
|
||||||
|
General Public License applies to most of the Free Software
|
||||||
|
Foundation's software and to any other program whose authors commit to
|
||||||
|
using it. (Some other Free Software Foundation software is covered by
|
||||||
|
the GNU Library General Public License instead.) You can apply it to
|
||||||
|
your programs, too.
|
||||||
|
|
||||||
|
When we speak of free software, we are referring to freedom, not
|
||||||
|
price. Our General Public Licenses are designed to make sure that you
|
||||||
|
have the freedom to distribute copies of free software (and charge for
|
||||||
|
this service if you wish), that you receive source code or can get it
|
||||||
|
if you want it, that you can change the software or use pieces of it
|
||||||
|
in new free programs; and that you know you can do these things.
|
||||||
|
|
||||||
|
To protect your rights, we need to make restrictions that forbid
|
||||||
|
anyone to deny you these rights or to ask you to surrender the rights.
|
||||||
|
These restrictions translate to certain responsibilities for you if you
|
||||||
|
distribute copies of the software, or if you modify it.
|
||||||
|
|
||||||
|
For example, if you distribute copies of such a program, whether
|
||||||
|
gratis or for a fee, you must give the recipients all the rights that
|
||||||
|
you have. You must make sure that they, too, receive or can get the
|
||||||
|
source code. And you must show them these terms so they know their
|
||||||
|
rights.
|
||||||
|
|
||||||
|
We protect your rights with two steps: (1) copyright the software, and
|
||||||
|
(2) offer you this license which gives you legal permission to copy,
|
||||||
|
distribute and/or modify the software.
|
||||||
|
|
||||||
|
Also, for each author's protection and ours, we want to make certain
|
||||||
|
that everyone understands that there is no warranty for this free
|
||||||
|
software. If the software is modified by someone else and passed on, we
|
||||||
|
want its recipients to know that what they have is not the original, so
|
||||||
|
that any problems introduced by others will not reflect on the original
|
||||||
|
authors' reputations.
|
||||||
|
|
||||||
|
Finally, any free program is threatened constantly by software
|
||||||
|
patents. We wish to avoid the danger that redistributors of a free
|
||||||
|
program will individually obtain patent licenses, in effect making the
|
||||||
|
program proprietary. To prevent this, we have made it clear that any
|
||||||
|
patent must be licensed for everyone's free use or not licensed at all.
|
||||||
|
|
||||||
|
The precise terms and conditions for copying, distribution and
|
||||||
|
modification follow.
|
||||||
|
|
||||||
|
GNU GENERAL PUBLIC LICENSE
|
||||||
|
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||||
|
|
||||||
|
0. This License applies to any program or other work which contains
|
||||||
|
a notice placed by the copyright holder saying it may be distributed
|
||||||
|
under the terms of this General Public License. The "Program", below,
|
||||||
|
refers to any such program or work, and a "work based on the Program"
|
||||||
|
means either the Program or any derivative work under copyright law:
|
||||||
|
that is to say, a work containing the Program or a portion of it,
|
||||||
|
either verbatim or with modifications and/or translated into another
|
||||||
|
language. (Hereinafter, translation is included without limitation in
|
||||||
|
the term "modification".) Each licensee is addressed as "you".
|
||||||
|
|
||||||
|
Activities other than copying, distribution and modification are not
|
||||||
|
covered by this License; they are outside its scope. The act of
|
||||||
|
running the Program is not restricted, and the output from the Program
|
||||||
|
is covered only if its contents constitute a work based on the
|
||||||
|
Program (independent of having been made by running the Program).
|
||||||
|
Whether that is true depends on what the Program does.
|
||||||
|
|
||||||
|
1. You may copy and distribute verbatim copies of the Program's
|
||||||
|
source code as you receive it, in any medium, provided that you
|
||||||
|
conspicuously and appropriately publish on each copy an appropriate
|
||||||
|
copyright notice and disclaimer of warranty; keep intact all the
|
||||||
|
notices that refer to this License and to the absence of any warranty;
|
||||||
|
and give any other recipients of the Program a copy of this License
|
||||||
|
along with the Program.
|
||||||
|
|
||||||
|
You may charge a fee for the physical act of transferring a copy, and
|
||||||
|
you may at your option offer warranty protection in exchange for a fee.
|
||||||
|
|
||||||
|
2. You may modify your copy or copies of the Program or any portion
|
||||||
|
of it, thus forming a work based on the Program, and copy and
|
||||||
|
distribute such modifications or work under the terms of Section 1
|
||||||
|
above, provided that you also meet all of these conditions:
|
||||||
|
|
||||||
|
a) You must cause the modified files to carry prominent notices
|
||||||
|
stating that you changed the files and the date of any change.
|
||||||
|
|
||||||
|
b) You must cause any work that you distribute or publish, that in
|
||||||
|
whole or in part contains or is derived from the Program or any
|
||||||
|
part thereof, to be licensed as a whole at no charge to all third
|
||||||
|
parties under the terms of this License.
|
||||||
|
|
||||||
|
c) If the modified program normally reads commands interactively
|
||||||
|
when run, you must cause it, when started running for such
|
||||||
|
interactive use in the most ordinary way, to print or display an
|
||||||
|
announcement including an appropriate copyright notice and a
|
||||||
|
notice that there is no warranty (or else, saying that you provide
|
||||||
|
a warranty) and that users may redistribute the program under
|
||||||
|
these conditions, and telling the user how to view a copy of this
|
||||||
|
License. (Exception: if the Program itself is interactive but
|
||||||
|
does not normally print such an announcement, your work based on
|
||||||
|
the Program is not required to print an announcement.)
|
||||||
|
|
||||||
|
These requirements apply to the modified work as a whole. If
|
||||||
|
identifiable sections of that work are not derived from the Program,
|
||||||
|
and can be reasonably considered independent and separate works in
|
||||||
|
themselves, then this License, and its terms, do not apply to those
|
||||||
|
sections when you distribute them as separate works. But when you
|
||||||
|
distribute the same sections as part of a whole which is a work based
|
||||||
|
on the Program, the distribution of the whole must be on the terms of
|
||||||
|
this License, whose permissions for other licensees extend to the
|
||||||
|
entire whole, and thus to each and every part regardless of who wrote it.
|
||||||
|
|
||||||
|
Thus, it is not the intent of this section to claim rights or contest
|
||||||
|
your rights to work written entirely by you; rather, the intent is to
|
||||||
|
exercise the right to control the distribution of derivative or
|
||||||
|
collective works based on the Program.
|
||||||
|
|
||||||
|
In addition, mere aggregation of another work not based on the Program
|
||||||
|
with the Program (or with a work based on the Program) on a volume of
|
||||||
|
a storage or distribution medium does not bring the other work under
|
||||||
|
the scope of this License.
|
||||||
|
|
||||||
|
3. You may copy and distribute the Program (or a work based on it,
|
||||||
|
under Section 2) in object code or executable form under the terms of
|
||||||
|
Sections 1 and 2 above provided that you also do one of the following:
|
||||||
|
|
||||||
|
a) Accompany it with the complete corresponding machine-readable
|
||||||
|
source code, which must be distributed under the terms of Sections
|
||||||
|
1 and 2 above on a medium customarily used for software interchange; or,
|
||||||
|
|
||||||
|
b) Accompany it with a written offer, valid for at least three
|
||||||
|
years, to give any third party, for a charge no more than your
|
||||||
|
cost of physically performing source distribution, a complete
|
||||||
|
machine-readable copy of the corresponding source code, to be
|
||||||
|
distributed under the terms of Sections 1 and 2 above on a medium
|
||||||
|
customarily used for software interchange; or,
|
||||||
|
|
||||||
|
c) Accompany it with the information you received as to the offer
|
||||||
|
to distribute corresponding source code. (This alternative is
|
||||||
|
allowed only for noncommercial distribution and only if you
|
||||||
|
received the program in object code or executable form with such
|
||||||
|
an offer, in accord with Subsection b above.)
|
||||||
|
|
||||||
|
The source code for a work means the preferred form of the work for
|
||||||
|
making modifications to it. For an executable work, complete source
|
||||||
|
code means all the source code for all modules it contains, plus any
|
||||||
|
associated interface definition files, plus the scripts used to
|
||||||
|
control compilation and installation of the executable. However, as a
|
||||||
|
special exception, the source code distributed need not include
|
||||||
|
anything that is normally distributed (in either source or binary
|
||||||
|
form) with the major components (compiler, kernel, and so on) of the
|
||||||
|
operating system on which the executable runs, unless that component
|
||||||
|
itself accompanies the executable.
|
||||||
|
|
||||||
|
If distribution of executable or object code is made by offering
|
||||||
|
access to copy from a designated place, then offering equivalent
|
||||||
|
access to copy the source code from the same place counts as
|
||||||
|
distribution of the source code, even though third parties are not
|
||||||
|
compelled to copy the source along with the object code.
|
||||||
|
|
||||||
|
4. You may not copy, modify, sublicense, or distribute the Program
|
||||||
|
except as expressly provided under this License. Any attempt
|
||||||
|
otherwise to copy, modify, sublicense or distribute the Program is
|
||||||
|
void, and will automatically terminate your rights under this License.
|
||||||
|
However, parties who have received copies, or rights, from you under
|
||||||
|
this License will not have their licenses terminated so long as such
|
||||||
|
parties remain in full compliance.
|
||||||
|
|
||||||
|
5. You are not required to accept this License, since you have not
|
||||||
|
signed it. However, nothing else grants you permission to modify or
|
||||||
|
distribute the Program or its derivative works. These actions are
|
||||||
|
prohibited by law if you do not accept this License. Therefore, by
|
||||||
|
modifying or distributing the Program (or any work based on the
|
||||||
|
Program), you indicate your acceptance of this License to do so, and
|
||||||
|
all its terms and conditions for copying, distributing or modifying
|
||||||
|
the Program or works based on it.
|
||||||
|
|
||||||
|
6. Each time you redistribute the Program (or any work based on the
|
||||||
|
Program), the recipient automatically receives a license from the
|
||||||
|
original licensor to copy, distribute or modify the Program subject to
|
||||||
|
these terms and conditions. You may not impose any further
|
||||||
|
restrictions on the recipients' exercise of the rights granted herein.
|
||||||
|
You are not responsible for enforcing compliance by third parties to
|
||||||
|
this License.
|
||||||
|
|
||||||
|
7. If, as a consequence of a court judgment or allegation of patent
|
||||||
|
infringement or for any other reason (not limited to patent issues),
|
||||||
|
conditions are imposed on you (whether by court order, agreement or
|
||||||
|
otherwise) that contradict the conditions of this License, they do not
|
||||||
|
excuse you from the conditions of this License. If you cannot
|
||||||
|
distribute so as to satisfy simultaneously your obligations under this
|
||||||
|
License and any other pertinent obligations, then as a consequence you
|
||||||
|
may not distribute the Program at all. For example, if a patent
|
||||||
|
license would not permit royalty-free redistribution of the Program by
|
||||||
|
all those who receive copies directly or indirectly through you, then
|
||||||
|
the only way you could satisfy both it and this License would be to
|
||||||
|
refrain entirely from distribution of the Program.
|
||||||
|
|
||||||
|
If any portion of this section is held invalid or unenforceable under
|
||||||
|
any particular circumstance, the balance of the section is intended to
|
||||||
|
apply and the section as a whole is intended to apply in other
|
||||||
|
circumstances.
|
||||||
|
|
||||||
|
It is not the purpose of this section to induce you to infringe any
|
||||||
|
patents or other property right claims or to contest validity of any
|
||||||
|
such claims; this section has the sole purpose of protecting the
|
||||||
|
integrity of the free software distribution system, which is
|
||||||
|
implemented by public license practices. Many people have made
|
||||||
|
generous contributions to the wide range of software distributed
|
||||||
|
through that system in reliance on consistent application of that
|
||||||
|
system; it is up to the author/donor to decide if he or she is willing
|
||||||
|
to distribute software through any other system and a licensee cannot
|
||||||
|
impose that choice.
|
||||||
|
|
||||||
|
This section is intended to make thoroughly clear what is believed to
|
||||||
|
be a consequence of the rest of this License.
|
||||||
|
|
||||||
|
8. If the distribution and/or use of the Program is restricted in
|
||||||
|
certain countries either by patents or by copyrighted interfaces, the
|
||||||
|
original copyright holder who places the Program under this License
|
||||||
|
may add an explicit geographical distribution limitation excluding
|
||||||
|
those countries, so that distribution is permitted only in or among
|
||||||
|
countries not thus excluded. In such case, this License incorporates
|
||||||
|
the limitation as if written in the body of this License.
|
||||||
|
|
||||||
|
9. The Free Software Foundation may publish revised and/or new versions
|
||||||
|
of the General Public License from time to time. Such new versions will
|
||||||
|
be similar in spirit to the present version, but may differ in detail to
|
||||||
|
address new problems or concerns.
|
||||||
|
|
||||||
|
Each version is given a distinguishing version number. If the Program
|
||||||
|
specifies a version number of this License which applies to it and "any
|
||||||
|
later version", you have the option of following the terms and conditions
|
||||||
|
either of that version or of any later version published by the Free
|
||||||
|
Software Foundation. If the Program does not specify a version number of
|
||||||
|
this License, you may choose any version ever published by the Free Software
|
||||||
|
Foundation.
|
||||||
|
|
||||||
|
10. If you wish to incorporate parts of the Program into other free
|
||||||
|
programs whose distribution conditions are different, write to the author
|
||||||
|
to ask for permission. For software which is copyrighted by the Free
|
||||||
|
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||||
|
make exceptions for this. Our decision will be guided by the two goals
|
||||||
|
of preserving the free status of all derivatives of our free software and
|
||||||
|
of promoting the sharing and reuse of software generally.
|
||||||
|
|
||||||
|
NO WARRANTY
|
||||||
|
|
||||||
|
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||||
|
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||||
|
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||||
|
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||||
|
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||||
|
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||||
|
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||||
|
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||||
|
REPAIR OR CORRECTION.
|
||||||
|
|
||||||
|
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||||
|
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||||
|
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||||
|
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||||
|
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||||
|
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||||
|
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||||
|
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||||
|
POSSIBILITY OF SUCH DAMAGES.
|
||||||
|
|
||||||
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
How to Apply These Terms to Your New Programs
|
||||||
|
|
||||||
|
If you develop a new program, and you want it to be of the greatest
|
||||||
|
possible use to the public, the best way to achieve this is to make it
|
||||||
|
free software which everyone can redistribute and change under these terms.
|
||||||
|
|
||||||
|
To do so, attach the following notices to the program. It is safest
|
||||||
|
to attach them to the start of each source file to most effectively
|
||||||
|
convey the exclusion of warranty; and each file should have at least
|
||||||
|
the "copyright" line and a pointer to where the full notice is found.
|
||||||
|
|
||||||
|
<one line to give the program's name and a brief idea of what it does.>
|
||||||
|
Copyright (C) <year> <name of author>
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
|
|
||||||
|
Also add information on how to contact you by electronic and paper mail.
|
||||||
|
|
||||||
|
If the program is interactive, make it output a short notice like this
|
||||||
|
when it starts in an interactive mode:
|
||||||
|
|
||||||
|
Gnomovision version 69, Copyright (C) year name of author
|
||||||
|
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||||
|
This is free software, and you are welcome to redistribute it
|
||||||
|
under certain conditions; type `show c' for details.
|
||||||
|
|
||||||
|
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||||
|
parts of the General Public License. Of course, the commands you use may
|
||||||
|
be called something other than `show w' and `show c'; they could even be
|
||||||
|
mouse-clicks or menu items--whatever suits your program.
|
||||||
|
|
||||||
|
You should also get your employer (if you work as a programmer) or your
|
||||||
|
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||||
|
necessary. Here is a sample; alter the names:
|
||||||
|
|
||||||
|
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||||
|
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||||
|
|
||||||
|
<signature of Ty Coon>, 1 April 1989
|
||||||
|
Ty Coon, President of Vice
|
||||||
|
|
||||||
|
This General Public License does not permit incorporating your program into
|
||||||
|
proprietary programs. If your program is a subroutine library, you may
|
||||||
|
consider it more useful to permit linking proprietary applications with the
|
||||||
|
library. If this is what you want to do, use the GNU Library General
|
||||||
|
Public License instead of this License.
|
||||||
0
frei0r-autoconf/ChangeLog
Normal file
1161
frei0r-autoconf/Doxyfile
Normal file
236
frei0r-autoconf/INSTALL
Normal file
@@ -0,0 +1,236 @@
|
|||||||
|
Installation Instructions
|
||||||
|
*************************
|
||||||
|
|
||||||
|
Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free
|
||||||
|
Software Foundation, Inc.
|
||||||
|
|
||||||
|
This file is free documentation; the Free Software Foundation gives
|
||||||
|
unlimited permission to copy, distribute and modify it.
|
||||||
|
|
||||||
|
Basic Installation
|
||||||
|
==================
|
||||||
|
|
||||||
|
These are generic installation instructions.
|
||||||
|
|
||||||
|
The `configure' shell script attempts to guess correct values for
|
||||||
|
various system-dependent variables used during compilation. It uses
|
||||||
|
those values to create a `Makefile' in each directory of the package.
|
||||||
|
It may also create one or more `.h' files containing system-dependent
|
||||||
|
definitions. Finally, it creates a shell script `config.status' that
|
||||||
|
you can run in the future to recreate the current configuration, and a
|
||||||
|
file `config.log' containing compiler output (useful mainly for
|
||||||
|
debugging `configure').
|
||||||
|
|
||||||
|
It can also use an optional file (typically called `config.cache'
|
||||||
|
and enabled with `--cache-file=config.cache' or simply `-C') that saves
|
||||||
|
the results of its tests to speed up reconfiguring. (Caching is
|
||||||
|
disabled by default to prevent problems with accidental use of stale
|
||||||
|
cache files.)
|
||||||
|
|
||||||
|
If you need to do unusual things to compile the package, please try
|
||||||
|
to figure out how `configure' could check whether to do them, and mail
|
||||||
|
diffs or instructions to the address given in the `README' so they can
|
||||||
|
be considered for the next release. If you are using the cache, and at
|
||||||
|
some point `config.cache' contains results you don't want to keep, you
|
||||||
|
may remove or edit it.
|
||||||
|
|
||||||
|
The file `configure.ac' (or `configure.in') is used to create
|
||||||
|
`configure' by a program called `autoconf'. You only need
|
||||||
|
`configure.ac' if you want to change it or regenerate `configure' using
|
||||||
|
a newer version of `autoconf'.
|
||||||
|
|
||||||
|
The simplest way to compile this package is:
|
||||||
|
|
||||||
|
1. `cd' to the directory containing the package's source code and type
|
||||||
|
`./configure' to configure the package for your system. If you're
|
||||||
|
using `csh' on an old version of System V, you might need to type
|
||||||
|
`sh ./configure' instead to prevent `csh' from trying to execute
|
||||||
|
`configure' itself.
|
||||||
|
|
||||||
|
Running `configure' takes awhile. While running, it prints some
|
||||||
|
messages telling which features it is checking for.
|
||||||
|
|
||||||
|
2. Type `make' to compile the package.
|
||||||
|
|
||||||
|
3. Optionally, type `make check' to run any self-tests that come with
|
||||||
|
the package.
|
||||||
|
|
||||||
|
4. Type `make install' to install the programs and any data files and
|
||||||
|
documentation.
|
||||||
|
|
||||||
|
5. You can remove the program binaries and object files from the
|
||||||
|
source code directory by typing `make clean'. To also remove the
|
||||||
|
files that `configure' created (so you can compile the package for
|
||||||
|
a different kind of computer), type `make distclean'. There is
|
||||||
|
also a `make maintainer-clean' target, but that is intended mainly
|
||||||
|
for the package's developers. If you use it, you may have to get
|
||||||
|
all sorts of other programs in order to regenerate files that came
|
||||||
|
with the distribution.
|
||||||
|
|
||||||
|
Compilers and Options
|
||||||
|
=====================
|
||||||
|
|
||||||
|
Some systems require unusual options for compilation or linking that the
|
||||||
|
`configure' script does not know about. Run `./configure --help' for
|
||||||
|
details on some of the pertinent environment variables.
|
||||||
|
|
||||||
|
You can give `configure' initial values for configuration parameters
|
||||||
|
by setting variables in the command line or in the environment. Here
|
||||||
|
is an example:
|
||||||
|
|
||||||
|
./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
|
||||||
|
|
||||||
|
*Note Defining Variables::, for more details.
|
||||||
|
|
||||||
|
Compiling For Multiple Architectures
|
||||||
|
====================================
|
||||||
|
|
||||||
|
You can compile the package for more than one kind of computer at the
|
||||||
|
same time, by placing the object files for each architecture in their
|
||||||
|
own directory. To do this, you must use a version of `make' that
|
||||||
|
supports the `VPATH' variable, such as GNU `make'. `cd' to the
|
||||||
|
directory where you want the object files and executables to go and run
|
||||||
|
the `configure' script. `configure' automatically checks for the
|
||||||
|
source code in the directory that `configure' is in and in `..'.
|
||||||
|
|
||||||
|
If you have to use a `make' that does not support the `VPATH'
|
||||||
|
variable, you have to compile the package for one architecture at a
|
||||||
|
time in the source code directory. After you have installed the
|
||||||
|
package for one architecture, use `make distclean' before reconfiguring
|
||||||
|
for another architecture.
|
||||||
|
|
||||||
|
Installation Names
|
||||||
|
==================
|
||||||
|
|
||||||
|
By default, `make install' installs the package's commands under
|
||||||
|
`/usr/local/bin', include files under `/usr/local/include', etc. You
|
||||||
|
can specify an installation prefix other than `/usr/local' by giving
|
||||||
|
`configure' the option `--prefix=PREFIX'.
|
||||||
|
|
||||||
|
You can specify separate installation prefixes for
|
||||||
|
architecture-specific files and architecture-independent files. If you
|
||||||
|
pass the option `--exec-prefix=PREFIX' to `configure', the package uses
|
||||||
|
PREFIX as the prefix for installing programs and libraries.
|
||||||
|
Documentation and other data files still use the regular prefix.
|
||||||
|
|
||||||
|
In addition, if you use an unusual directory layout you can give
|
||||||
|
options like `--bindir=DIR' to specify different values for particular
|
||||||
|
kinds of files. Run `configure --help' for a list of the directories
|
||||||
|
you can set and what kinds of files go in them.
|
||||||
|
|
||||||
|
If the package supports it, you can cause programs to be installed
|
||||||
|
with an extra prefix or suffix on their names by giving `configure' the
|
||||||
|
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
|
||||||
|
|
||||||
|
Optional Features
|
||||||
|
=================
|
||||||
|
|
||||||
|
Some packages pay attention to `--enable-FEATURE' options to
|
||||||
|
`configure', where FEATURE indicates an optional part of the package.
|
||||||
|
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
|
||||||
|
is something like `gnu-as' or `x' (for the X Window System). The
|
||||||
|
`README' should mention any `--enable-' and `--with-' options that the
|
||||||
|
package recognizes.
|
||||||
|
|
||||||
|
For packages that use the X Window System, `configure' can usually
|
||||||
|
find the X include and library files automatically, but if it doesn't,
|
||||||
|
you can use the `configure' options `--x-includes=DIR' and
|
||||||
|
`--x-libraries=DIR' to specify their locations.
|
||||||
|
|
||||||
|
Specifying the System Type
|
||||||
|
==========================
|
||||||
|
|
||||||
|
There may be some features `configure' cannot figure out automatically,
|
||||||
|
but needs to determine by the type of machine the package will run on.
|
||||||
|
Usually, assuming the package is built to be run on the _same_
|
||||||
|
architectures, `configure' can figure that out, but if it prints a
|
||||||
|
message saying it cannot guess the machine type, give it the
|
||||||
|
`--build=TYPE' option. TYPE can either be a short name for the system
|
||||||
|
type, such as `sun4', or a canonical name which has the form:
|
||||||
|
|
||||||
|
CPU-COMPANY-SYSTEM
|
||||||
|
|
||||||
|
where SYSTEM can have one of these forms:
|
||||||
|
|
||||||
|
OS KERNEL-OS
|
||||||
|
|
||||||
|
See the file `config.sub' for the possible values of each field. If
|
||||||
|
`config.sub' isn't included in this package, then this package doesn't
|
||||||
|
need to know the machine type.
|
||||||
|
|
||||||
|
If you are _building_ compiler tools for cross-compiling, you should
|
||||||
|
use the option `--target=TYPE' to select the type of system they will
|
||||||
|
produce code for.
|
||||||
|
|
||||||
|
If you want to _use_ a cross compiler, that generates code for a
|
||||||
|
platform different from the build platform, you should specify the
|
||||||
|
"host" platform (i.e., that on which the generated programs will
|
||||||
|
eventually be run) with `--host=TYPE'.
|
||||||
|
|
||||||
|
Sharing Defaults
|
||||||
|
================
|
||||||
|
|
||||||
|
If you want to set default values for `configure' scripts to share, you
|
||||||
|
can create a site shell script called `config.site' that gives default
|
||||||
|
values for variables like `CC', `cache_file', and `prefix'.
|
||||||
|
`configure' looks for `PREFIX/share/config.site' if it exists, then
|
||||||
|
`PREFIX/etc/config.site' if it exists. Or, you can set the
|
||||||
|
`CONFIG_SITE' environment variable to the location of the site script.
|
||||||
|
A warning: not all `configure' scripts look for a site script.
|
||||||
|
|
||||||
|
Defining Variables
|
||||||
|
==================
|
||||||
|
|
||||||
|
Variables not defined in a site shell script can be set in the
|
||||||
|
environment passed to `configure'. However, some packages may run
|
||||||
|
configure again during the build, and the customized values of these
|
||||||
|
variables may be lost. In order to avoid this problem, you should set
|
||||||
|
them in the `configure' command line, using `VAR=value'. For example:
|
||||||
|
|
||||||
|
./configure CC=/usr/local2/bin/gcc
|
||||||
|
|
||||||
|
causes the specified `gcc' to be used as the C compiler (unless it is
|
||||||
|
overridden in the site shell script). Here is a another example:
|
||||||
|
|
||||||
|
/bin/bash ./configure CONFIG_SHELL=/bin/bash
|
||||||
|
|
||||||
|
Here the `CONFIG_SHELL=/bin/bash' operand causes subsequent
|
||||||
|
configuration-related scripts to be executed by `/bin/bash'.
|
||||||
|
|
||||||
|
`configure' Invocation
|
||||||
|
======================
|
||||||
|
|
||||||
|
`configure' recognizes the following options to control how it operates.
|
||||||
|
|
||||||
|
`--help'
|
||||||
|
`-h'
|
||||||
|
Print a summary of the options to `configure', and exit.
|
||||||
|
|
||||||
|
`--version'
|
||||||
|
`-V'
|
||||||
|
Print the version of Autoconf used to generate the `configure'
|
||||||
|
script, and exit.
|
||||||
|
|
||||||
|
`--cache-file=FILE'
|
||||||
|
Enable the cache: use and save the results of the tests in FILE,
|
||||||
|
traditionally `config.cache'. FILE defaults to `/dev/null' to
|
||||||
|
disable caching.
|
||||||
|
|
||||||
|
`--config-cache'
|
||||||
|
`-C'
|
||||||
|
Alias for `--cache-file=config.cache'.
|
||||||
|
|
||||||
|
`--quiet'
|
||||||
|
`--silent'
|
||||||
|
`-q'
|
||||||
|
Do not print messages saying which checks are being made. To
|
||||||
|
suppress all normal output, redirect it to `/dev/null' (any error
|
||||||
|
messages will still be shown).
|
||||||
|
|
||||||
|
`--srcdir=DIR'
|
||||||
|
Look for the package's source code in directory DIR. Usually
|
||||||
|
`configure' can determine that directory automatically.
|
||||||
|
|
||||||
|
`configure' also accepts some other, not widely useful, options. Run
|
||||||
|
`configure --help' for more details.
|
||||||
|
|
||||||
12
frei0r-autoconf/Makefile.am
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
# Copyright (C) 2007 Richard Spindler <richard.spindler AT gmail.com>
|
||||||
|
#
|
||||||
|
# This file is free software; as a special exception the author gives
|
||||||
|
# unlimited permission to copy and/or distribute it, with or without
|
||||||
|
# modifications, as long as this notice is preserved.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful, but
|
||||||
|
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
|
||||||
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
SUBDIRS=src include doc
|
||||||
|
EXTRA_DIST = Doxyfile
|
||||||
0
frei0r-autoconf/NEWS
Normal file
24
frei0r-autoconf/README
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
frei0r - a minimalistic plugin API for video effects
|
||||||
|
|
||||||
|
It is a minimalistic plugin API for video sources and filters. The behaviour of
|
||||||
|
the effects can be controlled from the host by simple parameters. The intent is
|
||||||
|
to solve the recurring reimplementation or adaptation issue of standard effects.
|
||||||
|
|
||||||
|
It is not meant as a generic API for all kinds of video applications.
|
||||||
|
|
||||||
|
There is no support for the requirements of special application areas like non
|
||||||
|
linear editors, hardware accelerated shader effects, and high precision video
|
||||||
|
processing. These advanced issues are not even solved satisfactory for non cross
|
||||||
|
application plugin apis and are still an evolving field.
|
||||||
|
|
||||||
|
The frei0r API is not meant to be a competing standard to more ambitious
|
||||||
|
efforts.
|
||||||
|
|
||||||
|
http://www.piksel.org/frei0r/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Optional Dependencies:
|
||||||
|
gavl, required for scale0tilt and vectorscope plugin, available at http://gmerlin.sourceforge.net/
|
||||||
|
|
||||||
|
OpenCV, required for facedetect plugin, available at http://opencvlibrary.sourceforge.net/
|
||||||
30
frei0r-autoconf/autogen.sh
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
#! /bin/sh
|
||||||
|
|
||||||
|
libtoolize --force --copy
|
||||||
|
|
||||||
|
echo aclocal...
|
||||||
|
(aclocal --version) < /dev/null > /dev/null 2>&1 || {
|
||||||
|
echo aclocal not found
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
aclocal || exit 1
|
||||||
|
|
||||||
|
echo automake...
|
||||||
|
(automake --version) < /dev/null > /dev/null 2>&1 || {
|
||||||
|
echo automake not found
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
automake --add-missing --copy --gnu || exit 1
|
||||||
|
|
||||||
|
echo autoconf...
|
||||||
|
(autoconf --version) < /dev/null > /dev/null 2>&1 || {
|
||||||
|
echo autoconf not found
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
autoconf || exit 1
|
||||||
|
|
||||||
|
exit 0
|
||||||
|
|
||||||
54
frei0r-autoconf/configure.ac
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
# -*- Autoconf -*-
|
||||||
|
# Process this file with autoconf to produce a configure script.
|
||||||
|
|
||||||
|
AC_PREREQ(2.59)
|
||||||
|
AC_INIT(frei0r-plugins, [1.1.21], [richard.spindler@gmail.com])
|
||||||
|
|
||||||
|
AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
|
||||||
|
|
||||||
|
# Checks for programs.
|
||||||
|
AC_PROG_CXX
|
||||||
|
AC_PROG_CC
|
||||||
|
AC_PROG_LIBTOOL
|
||||||
|
|
||||||
|
HAVE_OPENCV=false
|
||||||
|
PKG_CHECK_MODULES(OPENCV, opencv >= 1.0.0, [HAVE_OPENCV=true], [true])
|
||||||
|
if test x$HAVE_OPENCV = xfalse; then
|
||||||
|
AC_MSG_WARN([*** opencv >= 1.0.0 not found - this program enables optional plugin with the Open Source Computer Vision library >= 1.0.0 http://opencvlibrary.sourceforge.net/ ***])
|
||||||
|
else
|
||||||
|
OPENCV_CFLAGS="$OPENCV_CFLAGS -DOPENCV_PREFIX=`pkg-config opencv --variable=prefix`"
|
||||||
|
fi
|
||||||
|
AM_CONDITIONAL([HAVE_OPENCV], [test x$HAVE_OPENCV = xtrue])
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Checks for header files.
|
||||||
|
AC_HEADER_STDC
|
||||||
|
AC_CHECK_HEADERS([float.h inttypes.h limits.h stdlib.h string.h])
|
||||||
|
|
||||||
|
# Checks for typedefs, structures, and compiler characteristics.
|
||||||
|
AC_HEADER_STDBOOL
|
||||||
|
AC_C_CONST
|
||||||
|
AC_C_INLINE
|
||||||
|
|
||||||
|
# Checks for library functions.
|
||||||
|
AC_FUNC_MALLOC
|
||||||
|
AC_CHECK_FUNCS([floor memset pow sqrt])
|
||||||
|
|
||||||
|
HAVE_GAVL=false
|
||||||
|
PKG_CHECK_MODULES(GAVL, gavl >= 0.2.3, [HAVE_GAVL=true], [true])
|
||||||
|
if test x$HAVE_GAVL = xfalse; then
|
||||||
|
AC_MSG_WARN([*** gavl >= 0.2.3 not found - this program enables optional plugin with the gmerlin audio
|
||||||
|
video library >= 0.2.3 http://gmerlin.sourceforge.net/ ***])
|
||||||
|
fi
|
||||||
|
AM_CONDITIONAL([HAVE_GAVL], [test x$HAVE_GAVL = xtrue])
|
||||||
|
|
||||||
|
AC_CONFIG_FILES([
|
||||||
|
Makefile
|
||||||
|
include/Makefile
|
||||||
|
src/Makefile
|
||||||
|
doc/Makefile
|
||||||
|
doc/html/Makefile
|
||||||
|
])
|
||||||
|
|
||||||
|
AC_OUTPUT
|
||||||
11
frei0r-autoconf/doc/Makefile.am
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
# Copyright (C) 2007 Richard Spindler <richard.spindler AT gmail.com>
|
||||||
|
#
|
||||||
|
# This file is free software; as a special exception the author gives
|
||||||
|
# unlimited permission to copy and/or distribute it, with or without
|
||||||
|
# modifications, as long as this notice is preserved.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful, but
|
||||||
|
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
|
||||||
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
SUBDIRS=html
|
||||||
5
frei0r-autoconf/doc/html/Makefile.am
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
EXTRA_DIST = \
|
||||||
|
annotated.html doxygen.png functions.html globals.html group__icons.html hierarchy.html structf0r__param__color.html tab_b.gif\
|
||||||
|
dir_c6a51e201754b7c7dc5a21651891d7e2.html files.html functions_vars.html globals_type.html group__PARAM__TYPE.html index.html structf0r__param__info.html tab_l.gif\
|
||||||
|
dirs.html frei0r_8h.html globals_defs.html group__COLOR__MODEL.html group__PLUGIN__TYPE.html structf0r__param__position.html tab_r.gif\
|
||||||
|
doxygen.css frei0r_8h-source.html globals_func.html group__concurrency.html group__pluglocations.html modules.html structf0r__plugin__info.html tabs.css
|
||||||
32
frei0r-autoconf/doc/html/annotated.html
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||||
|
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
|
||||||
|
<title>frei0r: Data Structures</title>
|
||||||
|
<link href="doxygen.css" rel="stylesheet" type="text/css">
|
||||||
|
<link href="tabs.css" rel="stylesheet" type="text/css">
|
||||||
|
</head><body>
|
||||||
|
<!-- Generated by Doxygen 1.4.6 -->
|
||||||
|
<div class="tabs">
|
||||||
|
<ul>
|
||||||
|
<li><a href="index.html"><span>Main Page</span></a></li>
|
||||||
|
<li><a href="modules.html"><span>Modules</span></a></li>
|
||||||
|
<li id="current"><a href="annotated.html"><span>Data Structures</span></a></li>
|
||||||
|
<li><a href="files.html"><span>Files</span></a></li>
|
||||||
|
<li><a href="dirs.html"><span>Directories</span></a></li>
|
||||||
|
</ul></div>
|
||||||
|
<div class="tabs">
|
||||||
|
<ul>
|
||||||
|
<li id="current"><a href="annotated.html"><span>Data Structures</span></a></li>
|
||||||
|
<li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
|
||||||
|
<li><a href="functions.html"><span>Data Fields</span></a></li>
|
||||||
|
</ul></div>
|
||||||
|
<h1>frei0r Data Structures</h1>Here are the data structures with brief descriptions:<table>
|
||||||
|
<tr><td class="indexkey"><a class="el" href="structf0r__param__color.html">f0r_param_color</a></td><td class="indexvalue"></td></tr>
|
||||||
|
<tr><td class="indexkey"><a class="el" href="structf0r__param__info.html">f0r_param_info</a></td><td class="indexvalue"></td></tr>
|
||||||
|
<tr><td class="indexkey"><a class="el" href="structf0r__param__position.html">f0r_param_position</a></td><td class="indexvalue"></td></tr>
|
||||||
|
<tr><td class="indexkey"><a class="el" href="structf0r__plugin__info.html">f0r_plugin_info</a></td><td class="indexvalue"></td></tr>
|
||||||
|
</table>
|
||||||
|
<hr size="1"><address style="align: right;"><small>Generated on Wed Nov 7 12:07:53 2007 for frei0r by
|
||||||
|
<a href="http://www.doxygen.org/index.html">
|
||||||
|
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.6 </small></address>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||||
|
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
|
||||||
|
<title>frei0r: include/ Directory Reference</title>
|
||||||
|
<link href="doxygen.css" rel="stylesheet" type="text/css">
|
||||||
|
<link href="tabs.css" rel="stylesheet" type="text/css">
|
||||||
|
</head><body>
|
||||||
|
<!-- Generated by Doxygen 1.4.6 -->
|
||||||
|
<div class="tabs">
|
||||||
|
<ul>
|
||||||
|
<li><a href="index.html"><span>Main Page</span></a></li>
|
||||||
|
<li><a href="modules.html"><span>Modules</span></a></li>
|
||||||
|
<li><a href="annotated.html"><span>Data Structures</span></a></li>
|
||||||
|
<li><a href="files.html"><span>Files</span></a></li>
|
||||||
|
<li><a href="dirs.html"><span>Directories</span></a></li>
|
||||||
|
</ul></div>
|
||||||
|
<div class="nav">
|
||||||
|
<a class="el" href="dir_c6a51e201754b7c7dc5a21651891d7e2.html">include</a></div>
|
||||||
|
<h1>include Directory Reference</h1><table border="0" cellpadding="0" cellspacing="0">
|
||||||
|
<tr><td></td></tr>
|
||||||
|
<tr><td colspan="2"><br><h2>Files</h2></td></tr>
|
||||||
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">file </td><td class="memItemRight" valign="bottom"><a class="el" href="frei0r_8h.html">frei0r.h</a> <a href="frei0r_8h-source.html">[code]</a></td></tr>
|
||||||
|
|
||||||
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">This file defines the frei0r api, version 1.1. <br></td></tr>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
</table>
|
||||||
|
<hr size="1"><address style="align: right;"><small>Generated on Wed Nov 7 12:07:53 2007 for frei0r by
|
||||||
|
<a href="http://www.doxygen.org/index.html">
|
||||||
|
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.6 </small></address>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
23
frei0r-autoconf/doc/html/dirs.html
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||||
|
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
|
||||||
|
<title>frei0r: Directory Hierarchy</title>
|
||||||
|
<link href="doxygen.css" rel="stylesheet" type="text/css">
|
||||||
|
<link href="tabs.css" rel="stylesheet" type="text/css">
|
||||||
|
</head><body>
|
||||||
|
<!-- Generated by Doxygen 1.4.6 -->
|
||||||
|
<div class="tabs">
|
||||||
|
<ul>
|
||||||
|
<li><a href="index.html"><span>Main Page</span></a></li>
|
||||||
|
<li><a href="modules.html"><span>Modules</span></a></li>
|
||||||
|
<li><a href="annotated.html"><span>Data Structures</span></a></li>
|
||||||
|
<li><a href="files.html"><span>Files</span></a></li>
|
||||||
|
<li id="current"><a href="dirs.html"><span>Directories</span></a></li>
|
||||||
|
</ul></div>
|
||||||
|
<h1>frei0r Directories</h1>This directory hierarchy is sorted roughly, but not completely, alphabetically:<ul>
|
||||||
|
<li><a class="el" href="dir_c6a51e201754b7c7dc5a21651891d7e2.html">include</a>
|
||||||
|
</ul>
|
||||||
|
<hr size="1"><address style="align: right;"><small>Generated on Wed Nov 7 12:07:53 2007 for frei0r by
|
||||||
|
<a href="http://www.doxygen.org/index.html">
|
||||||
|
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.6 </small></address>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
310
frei0r-autoconf/doc/html/doxygen.css
Normal file
@@ -0,0 +1,310 @@
|
|||||||
|
BODY,H1,H2,H3,H4,H5,H6,P,CENTER,TD,TH,UL,DL,DIV {
|
||||||
|
font-family: Geneva, Arial, Helvetica, sans-serif;
|
||||||
|
}
|
||||||
|
BODY,TD {
|
||||||
|
font-size: 90%;
|
||||||
|
}
|
||||||
|
H1 {
|
||||||
|
text-align: center;
|
||||||
|
font-size: 160%;
|
||||||
|
}
|
||||||
|
H2 {
|
||||||
|
font-size: 120%;
|
||||||
|
}
|
||||||
|
H3 {
|
||||||
|
font-size: 100%;
|
||||||
|
}
|
||||||
|
CAPTION { font-weight: bold }
|
||||||
|
DIV.qindex {
|
||||||
|
width: 100%;
|
||||||
|
background-color: #e8eef2;
|
||||||
|
border: 1px solid #84b0c7;
|
||||||
|
text-align: center;
|
||||||
|
margin: 2px;
|
||||||
|
padding: 2px;
|
||||||
|
line-height: 140%;
|
||||||
|
}
|
||||||
|
DIV.nav {
|
||||||
|
width: 100%;
|
||||||
|
background-color: #e8eef2;
|
||||||
|
border: 1px solid #84b0c7;
|
||||||
|
text-align: center;
|
||||||
|
margin: 2px;
|
||||||
|
padding: 2px;
|
||||||
|
line-height: 140%;
|
||||||
|
}
|
||||||
|
DIV.navtab {
|
||||||
|
background-color: #e8eef2;
|
||||||
|
border: 1px solid #84b0c7;
|
||||||
|
text-align: center;
|
||||||
|
margin: 2px;
|
||||||
|
margin-right: 15px;
|
||||||
|
padding: 2px;
|
||||||
|
}
|
||||||
|
TD.navtab {
|
||||||
|
font-size: 70%;
|
||||||
|
}
|
||||||
|
A.qindex {
|
||||||
|
text-decoration: none;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #1A419D;
|
||||||
|
}
|
||||||
|
A.qindex:visited {
|
||||||
|
text-decoration: none;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #1A419D
|
||||||
|
}
|
||||||
|
A.qindex:hover {
|
||||||
|
text-decoration: none;
|
||||||
|
background-color: #ddddff;
|
||||||
|
}
|
||||||
|
A.qindexHL {
|
||||||
|
text-decoration: none;
|
||||||
|
font-weight: bold;
|
||||||
|
background-color: #6666cc;
|
||||||
|
color: #ffffff;
|
||||||
|
border: 1px double #9295C2;
|
||||||
|
}
|
||||||
|
A.qindexHL:hover {
|
||||||
|
text-decoration: none;
|
||||||
|
background-color: #6666cc;
|
||||||
|
color: #ffffff;
|
||||||
|
}
|
||||||
|
A.qindexHL:visited { text-decoration: none; background-color: #6666cc; color: #ffffff }
|
||||||
|
A.el { text-decoration: none; font-weight: bold }
|
||||||
|
A.elRef { font-weight: bold }
|
||||||
|
A.code:link { text-decoration: none; font-weight: normal; color: #0000FF}
|
||||||
|
A.code:visited { text-decoration: none; font-weight: normal; color: #0000FF}
|
||||||
|
A.codeRef:link { font-weight: normal; color: #0000FF}
|
||||||
|
A.codeRef:visited { font-weight: normal; color: #0000FF}
|
||||||
|
A:hover { text-decoration: none; background-color: #f2f2ff }
|
||||||
|
DL.el { margin-left: -1cm }
|
||||||
|
.fragment {
|
||||||
|
font-family: Fixed, monospace;
|
||||||
|
font-size: 95%;
|
||||||
|
}
|
||||||
|
PRE.fragment {
|
||||||
|
border: 1px solid #CCCCCC;
|
||||||
|
background-color: #f5f5f5;
|
||||||
|
margin-top: 4px;
|
||||||
|
margin-bottom: 4px;
|
||||||
|
margin-left: 2px;
|
||||||
|
margin-right: 8px;
|
||||||
|
padding-left: 6px;
|
||||||
|
padding-right: 6px;
|
||||||
|
padding-top: 4px;
|
||||||
|
padding-bottom: 4px;
|
||||||
|
}
|
||||||
|
DIV.ah { background-color: black; font-weight: bold; color: #ffffff; margin-bottom: 3px; margin-top: 3px }
|
||||||
|
TD.md { background-color: #F4F4FB; font-weight: bold; }
|
||||||
|
TD.mdPrefix {
|
||||||
|
background-color: #F4F4FB;
|
||||||
|
color: #606060;
|
||||||
|
font-size: 80%;
|
||||||
|
}
|
||||||
|
TD.mdname1 { background-color: #F4F4FB; font-weight: bold; color: #602020; }
|
||||||
|
TD.mdname { background-color: #F4F4FB; font-weight: bold; color: #602020; width: 600px; }
|
||||||
|
DIV.groupHeader {
|
||||||
|
margin-left: 16px;
|
||||||
|
margin-top: 12px;
|
||||||
|
margin-bottom: 6px;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
DIV.groupText { margin-left: 16px; font-style: italic; font-size: 90% }
|
||||||
|
BODY {
|
||||||
|
background: white;
|
||||||
|
color: black;
|
||||||
|
margin-right: 20px;
|
||||||
|
margin-left: 20px;
|
||||||
|
}
|
||||||
|
TD.indexkey {
|
||||||
|
background-color: #e8eef2;
|
||||||
|
font-weight: bold;
|
||||||
|
padding-right : 10px;
|
||||||
|
padding-top : 2px;
|
||||||
|
padding-left : 10px;
|
||||||
|
padding-bottom : 2px;
|
||||||
|
margin-left : 0px;
|
||||||
|
margin-right : 0px;
|
||||||
|
margin-top : 2px;
|
||||||
|
margin-bottom : 2px;
|
||||||
|
border: 1px solid #CCCCCC;
|
||||||
|
}
|
||||||
|
TD.indexvalue {
|
||||||
|
background-color: #e8eef2;
|
||||||
|
font-style: italic;
|
||||||
|
padding-right : 10px;
|
||||||
|
padding-top : 2px;
|
||||||
|
padding-left : 10px;
|
||||||
|
padding-bottom : 2px;
|
||||||
|
margin-left : 0px;
|
||||||
|
margin-right : 0px;
|
||||||
|
margin-top : 2px;
|
||||||
|
margin-bottom : 2px;
|
||||||
|
border: 1px solid #CCCCCC;
|
||||||
|
}
|
||||||
|
TR.memlist {
|
||||||
|
background-color: #f0f0f0;
|
||||||
|
}
|
||||||
|
P.formulaDsp { text-align: center; }
|
||||||
|
IMG.formulaDsp { }
|
||||||
|
IMG.formulaInl { vertical-align: middle; }
|
||||||
|
SPAN.keyword { color: #008000 }
|
||||||
|
SPAN.keywordtype { color: #604020 }
|
||||||
|
SPAN.keywordflow { color: #e08000 }
|
||||||
|
SPAN.comment { color: #800000 }
|
||||||
|
SPAN.preprocessor { color: #806020 }
|
||||||
|
SPAN.stringliteral { color: #002080 }
|
||||||
|
SPAN.charliteral { color: #008080 }
|
||||||
|
.mdTable {
|
||||||
|
border: 1px solid #868686;
|
||||||
|
background-color: #F4F4FB;
|
||||||
|
}
|
||||||
|
.mdRow {
|
||||||
|
padding: 8px 10px;
|
||||||
|
}
|
||||||
|
.mdescLeft {
|
||||||
|
padding: 0px 8px 4px 8px;
|
||||||
|
font-size: 80%;
|
||||||
|
font-style: italic;
|
||||||
|
background-color: #FAFAFA;
|
||||||
|
border-top: 1px none #E0E0E0;
|
||||||
|
border-right: 1px none #E0E0E0;
|
||||||
|
border-bottom: 1px none #E0E0E0;
|
||||||
|
border-left: 1px none #E0E0E0;
|
||||||
|
margin: 0px;
|
||||||
|
}
|
||||||
|
.mdescRight {
|
||||||
|
padding: 0px 8px 4px 8px;
|
||||||
|
font-size: 80%;
|
||||||
|
font-style: italic;
|
||||||
|
background-color: #FAFAFA;
|
||||||
|
border-top: 1px none #E0E0E0;
|
||||||
|
border-right: 1px none #E0E0E0;
|
||||||
|
border-bottom: 1px none #E0E0E0;
|
||||||
|
border-left: 1px none #E0E0E0;
|
||||||
|
margin: 0px;
|
||||||
|
}
|
||||||
|
.memItemLeft {
|
||||||
|
padding: 1px 0px 0px 8px;
|
||||||
|
margin: 4px;
|
||||||
|
border-top-width: 1px;
|
||||||
|
border-right-width: 1px;
|
||||||
|
border-bottom-width: 1px;
|
||||||
|
border-left-width: 1px;
|
||||||
|
border-top-color: #E0E0E0;
|
||||||
|
border-right-color: #E0E0E0;
|
||||||
|
border-bottom-color: #E0E0E0;
|
||||||
|
border-left-color: #E0E0E0;
|
||||||
|
border-top-style: solid;
|
||||||
|
border-right-style: none;
|
||||||
|
border-bottom-style: none;
|
||||||
|
border-left-style: none;
|
||||||
|
background-color: #FAFAFA;
|
||||||
|
font-size: 80%;
|
||||||
|
}
|
||||||
|
.memItemRight {
|
||||||
|
padding: 1px 8px 0px 8px;
|
||||||
|
margin: 4px;
|
||||||
|
border-top-width: 1px;
|
||||||
|
border-right-width: 1px;
|
||||||
|
border-bottom-width: 1px;
|
||||||
|
border-left-width: 1px;
|
||||||
|
border-top-color: #E0E0E0;
|
||||||
|
border-right-color: #E0E0E0;
|
||||||
|
border-bottom-color: #E0E0E0;
|
||||||
|
border-left-color: #E0E0E0;
|
||||||
|
border-top-style: solid;
|
||||||
|
border-right-style: none;
|
||||||
|
border-bottom-style: none;
|
||||||
|
border-left-style: none;
|
||||||
|
background-color: #FAFAFA;
|
||||||
|
font-size: 80%;
|
||||||
|
}
|
||||||
|
.memTemplItemLeft {
|
||||||
|
padding: 1px 0px 0px 8px;
|
||||||
|
margin: 4px;
|
||||||
|
border-top-width: 1px;
|
||||||
|
border-right-width: 1px;
|
||||||
|
border-bottom-width: 1px;
|
||||||
|
border-left-width: 1px;
|
||||||
|
border-top-color: #E0E0E0;
|
||||||
|
border-right-color: #E0E0E0;
|
||||||
|
border-bottom-color: #E0E0E0;
|
||||||
|
border-left-color: #E0E0E0;
|
||||||
|
border-top-style: none;
|
||||||
|
border-right-style: none;
|
||||||
|
border-bottom-style: none;
|
||||||
|
border-left-style: none;
|
||||||
|
background-color: #FAFAFA;
|
||||||
|
font-size: 80%;
|
||||||
|
}
|
||||||
|
.memTemplItemRight {
|
||||||
|
padding: 1px 8px 0px 8px;
|
||||||
|
margin: 4px;
|
||||||
|
border-top-width: 1px;
|
||||||
|
border-right-width: 1px;
|
||||||
|
border-bottom-width: 1px;
|
||||||
|
border-left-width: 1px;
|
||||||
|
border-top-color: #E0E0E0;
|
||||||
|
border-right-color: #E0E0E0;
|
||||||
|
border-bottom-color: #E0E0E0;
|
||||||
|
border-left-color: #E0E0E0;
|
||||||
|
border-top-style: none;
|
||||||
|
border-right-style: none;
|
||||||
|
border-bottom-style: none;
|
||||||
|
border-left-style: none;
|
||||||
|
background-color: #FAFAFA;
|
||||||
|
font-size: 80%;
|
||||||
|
}
|
||||||
|
.memTemplParams {
|
||||||
|
padding: 1px 0px 0px 8px;
|
||||||
|
margin: 4px;
|
||||||
|
border-top-width: 1px;
|
||||||
|
border-right-width: 1px;
|
||||||
|
border-bottom-width: 1px;
|
||||||
|
border-left-width: 1px;
|
||||||
|
border-top-color: #E0E0E0;
|
||||||
|
border-right-color: #E0E0E0;
|
||||||
|
border-bottom-color: #E0E0E0;
|
||||||
|
border-left-color: #E0E0E0;
|
||||||
|
border-top-style: solid;
|
||||||
|
border-right-style: none;
|
||||||
|
border-bottom-style: none;
|
||||||
|
border-left-style: none;
|
||||||
|
color: #606060;
|
||||||
|
background-color: #FAFAFA;
|
||||||
|
font-size: 80%;
|
||||||
|
}
|
||||||
|
.search { color: #003399;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
FORM.search {
|
||||||
|
margin-bottom: 0px;
|
||||||
|
margin-top: 0px;
|
||||||
|
}
|
||||||
|
INPUT.search { font-size: 75%;
|
||||||
|
color: #000080;
|
||||||
|
font-weight: normal;
|
||||||
|
background-color: #e8eef2;
|
||||||
|
}
|
||||||
|
TD.tiny { font-size: 75%;
|
||||||
|
}
|
||||||
|
a {
|
||||||
|
color: #1A41A8;
|
||||||
|
}
|
||||||
|
a:visited {
|
||||||
|
color: #2A3798;
|
||||||
|
}
|
||||||
|
.dirtab { padding: 4px;
|
||||||
|
border-collapse: collapse;
|
||||||
|
border: 1px solid #84b0c7;
|
||||||
|
}
|
||||||
|
TH.dirtab { background: #e8eef2;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
HR { height: 1px;
|
||||||
|
border: none;
|
||||||
|
border-top: 1px solid black;
|
||||||
|
}
|
||||||
|
|
||||||
BIN
frei0r-autoconf/doc/html/doxygen.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
28
frei0r-autoconf/doc/html/files.html
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||||
|
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
|
||||||
|
<title>frei0r: File Index</title>
|
||||||
|
<link href="doxygen.css" rel="stylesheet" type="text/css">
|
||||||
|
<link href="tabs.css" rel="stylesheet" type="text/css">
|
||||||
|
</head><body>
|
||||||
|
<!-- Generated by Doxygen 1.4.6 -->
|
||||||
|
<div class="tabs">
|
||||||
|
<ul>
|
||||||
|
<li><a href="index.html"><span>Main Page</span></a></li>
|
||||||
|
<li><a href="modules.html"><span>Modules</span></a></li>
|
||||||
|
<li><a href="annotated.html"><span>Data Structures</span></a></li>
|
||||||
|
<li id="current"><a href="files.html"><span>Files</span></a></li>
|
||||||
|
<li><a href="dirs.html"><span>Directories</span></a></li>
|
||||||
|
</ul></div>
|
||||||
|
<div class="tabs">
|
||||||
|
<ul>
|
||||||
|
<li id="current"><a href="files.html"><span>File List</span></a></li>
|
||||||
|
<li><a href="globals.html"><span>Globals</span></a></li>
|
||||||
|
</ul></div>
|
||||||
|
<h1>frei0r File List</h1>Here is a list of all documented files with brief descriptions:<table>
|
||||||
|
<tr><td class="indexkey">include/<a class="el" href="frei0r_8h.html">frei0r.h</a> <a href="frei0r_8h-source.html">[code]</a></td><td class="indexvalue">This file defines the frei0r api, version 1.1 </td></tr>
|
||||||
|
</table>
|
||||||
|
<hr size="1"><address style="align: right;"><small>Generated on Wed Nov 7 12:07:53 2007 for frei0r by
|
||||||
|
<a href="http://www.doxygen.org/index.html">
|
||||||
|
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.6 </small></address>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
152
frei0r-autoconf/doc/html/frei0r_8h-source.html
Normal file
@@ -0,0 +1,152 @@
|
|||||||
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||||
|
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
|
||||||
|
<title>frei0r: include/frei0r.h Source File</title>
|
||||||
|
<link href="doxygen.css" rel="stylesheet" type="text/css">
|
||||||
|
<link href="tabs.css" rel="stylesheet" type="text/css">
|
||||||
|
</head><body>
|
||||||
|
<!-- Generated by Doxygen 1.4.6 -->
|
||||||
|
<div class="tabs">
|
||||||
|
<ul>
|
||||||
|
<li><a href="index.html"><span>Main Page</span></a></li>
|
||||||
|
<li><a href="modules.html"><span>Modules</span></a></li>
|
||||||
|
<li><a href="annotated.html"><span>Data Structures</span></a></li>
|
||||||
|
<li id="current"><a href="files.html"><span>Files</span></a></li>
|
||||||
|
<li><a href="dirs.html"><span>Directories</span></a></li>
|
||||||
|
</ul></div>
|
||||||
|
<div class="tabs">
|
||||||
|
<ul>
|
||||||
|
<li><a href="files.html"><span>File List</span></a></li>
|
||||||
|
<li><a href="globals.html"><span>Globals</span></a></li>
|
||||||
|
</ul></div>
|
||||||
|
<div class="nav">
|
||||||
|
<a class="el" href="dir_c6a51e201754b7c7dc5a21651891d7e2.html">include</a></div>
|
||||||
|
<h1>frei0r.h</h1><a href="frei0r_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001
|
||||||
|
<a name="l00185"></a>00185 <span class="preprocessor">#ifndef INCLUDED_FREI0R_H</span>
|
||||||
|
<a name="l00186"></a>00186 <span class="preprocessor"></span><span class="preprocessor">#define INCLUDED_FREI0R_H</span>
|
||||||
|
<a name="l00187"></a>00187 <span class="preprocessor"></span>
|
||||||
|
<a name="l00188"></a>00188 <span class="preprocessor">#include <inttypes.h></span>
|
||||||
|
<a name="l00189"></a>00189
|
||||||
|
<a name="l00193"></a><a class="code" href="frei0r_8h.html#fcd0fc5b95d850413af3bdfb1445ce21">00193</a> <span class="preprocessor">#define FREI0R_MAJOR_VERSION 1</span>
|
||||||
|
<a name="l00194"></a>00194 <span class="preprocessor"></span>
|
||||||
|
<a name="l00198"></a><a class="code" href="frei0r_8h.html#1e54a139a7cec212f6c1822793a4ef83">00198</a> <span class="preprocessor">#define FREI0R_MINOR_VERSION 1</span>
|
||||||
|
<a name="l00199"></a>00199 <span class="preprocessor"></span>
|
||||||
|
<a name="l00200"></a>00200 <span class="comment">//---------------------------------------------------------------------------</span>
|
||||||
|
<a name="l00201"></a>00201
|
||||||
|
<a name="l00206"></a>00206 <span class="keywordtype">int</span> <a class="code" href="frei0r_8h.html#78b1e4451bf40bb8f80fdae871f2e750">f0r_init</a>();
|
||||||
|
<a name="l00207"></a>00207
|
||||||
|
<a name="l00212"></a>00212 <span class="keywordtype">void</span> <a class="code" href="frei0r_8h.html#0485f00015a2b09b8733df004f62db69">f0r_deinit</a>();
|
||||||
|
<a name="l00213"></a>00213
|
||||||
|
<a name="l00214"></a>00214 <span class="comment">//---------------------------------------------------------------------------</span>
|
||||||
|
<a name="l00215"></a>00215
|
||||||
|
<a name="l00223"></a><a class="code" href="group__PLUGIN__TYPE.html#g021dbc62936693bbe11851a3742b83cc">00223</a> <span class="preprocessor">#define F0R_PLUGIN_TYPE_FILTER 0</span>
|
||||||
|
<a name="l00224"></a>00224 <span class="preprocessor"></span>
|
||||||
|
<a name="l00225"></a><a class="code" href="group__PLUGIN__TYPE.html#gd190458c6a082108471acf06622a7461">00225</a> <span class="preprocessor">#define F0R_PLUGIN_TYPE_SOURCE 1</span>
|
||||||
|
<a name="l00226"></a>00226 <span class="preprocessor"></span>
|
||||||
|
<a name="l00227"></a><a class="code" href="group__PLUGIN__TYPE.html#ge1896fc1cdaf7a505de359b3d07aba70">00227</a> <span class="preprocessor">#define F0R_PLUGIN_TYPE_MIXER2 2</span>
|
||||||
|
<a name="l00228"></a>00228 <span class="preprocessor"></span>
|
||||||
|
<a name="l00229"></a><a class="code" href="group__PLUGIN__TYPE.html#g4a6629bc9fd08cf104749ad9d0922501">00229</a> <span class="preprocessor">#define F0R_PLUGIN_TYPE_MIXER3 3</span>
|
||||||
|
<a name="l00230"></a>00230 <span class="preprocessor"></span>
|
||||||
|
<a name="l00233"></a>00233 <span class="comment">//---------------------------------------------------------------------------</span>
|
||||||
|
<a name="l00234"></a>00234
|
||||||
|
<a name="l00275"></a><a class="code" href="group__COLOR__MODEL.html#g4ff9ca3b84e5057b0b7aeee176d6d3a3">00275</a> <span class="preprocessor">#define F0R_COLOR_MODEL_BGRA8888 0</span>
|
||||||
|
<a name="l00276"></a>00276 <span class="preprocessor"></span>
|
||||||
|
<a name="l00284"></a><a class="code" href="group__COLOR__MODEL.html#g68d6ca25df33b7759dfb2c2f6b44a229">00284</a> <span class="preprocessor">#define F0R_COLOR_MODEL_RGBA8888 1</span>
|
||||||
|
<a name="l00285"></a>00285 <span class="preprocessor"></span>
|
||||||
|
<a name="l00298"></a><a class="code" href="group__COLOR__MODEL.html#g42c9b2342651a04a3045b980cf31cf97">00298</a> <span class="preprocessor">#define F0R_COLOR_MODEL_PACKED32 2</span>
|
||||||
|
<a name="l00299"></a>00299 <span class="preprocessor"></span>
|
||||||
|
<a name="l00317"></a><a class="code" href="structf0r__plugin__info.html">00317</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structf0r__plugin__info.html">f0r_plugin_info</a>
|
||||||
|
<a name="l00318"></a>00318 {
|
||||||
|
<a name="l00319"></a><a class="code" href="structf0r__plugin__info.html#6e9916e14a3871987c66964a89b18c5d">00319</a> <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="structf0r__plugin__info.html#6e9916e14a3871987c66964a89b18c5d">name</a>;
|
||||||
|
<a name="l00320"></a><a class="code" href="structf0r__plugin__info.html#c6ad807a9ac439e57e7410dd699add6f">00320</a> <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="structf0r__plugin__info.html#c6ad807a9ac439e57e7410dd699add6f">author</a>;
|
||||||
|
<a name="l00324"></a><a class="code" href="structf0r__plugin__info.html#e57fd00690e5f90609120cff276c3ead">00324</a> <span class="keywordtype">int</span> <a class="code" href="structf0r__plugin__info.html#e57fd00690e5f90609120cff276c3ead">plugin_type</a>;
|
||||||
|
<a name="l00325"></a><a class="code" href="structf0r__plugin__info.html#0b1238f47fe6600243e500446568bb4e">00325</a> <span class="keywordtype">int</span> <a class="code" href="structf0r__plugin__info.html#0b1238f47fe6600243e500446568bb4e">color_model</a>;
|
||||||
|
<a name="l00326"></a><a class="code" href="structf0r__plugin__info.html#ac89e4129172023e153c952259373149">00326</a> <span class="keywordtype">int</span> <a class="code" href="structf0r__plugin__info.html#ac89e4129172023e153c952259373149">frei0r_version</a>;
|
||||||
|
<a name="l00327"></a><a class="code" href="structf0r__plugin__info.html#87ea44cd95f93b3c367d3dcec556deb3">00327</a> <span class="keywordtype">int</span> <a class="code" href="structf0r__plugin__info.html#87ea44cd95f93b3c367d3dcec556deb3">major_version</a>;
|
||||||
|
<a name="l00328"></a><a class="code" href="structf0r__plugin__info.html#bfa71a212ece4e0af3d4a8c3f4fa55ca">00328</a> <span class="keywordtype">int</span> <a class="code" href="structf0r__plugin__info.html#bfa71a212ece4e0af3d4a8c3f4fa55ca">minor_version</a>;
|
||||||
|
<a name="l00329"></a><a class="code" href="structf0r__plugin__info.html#92cf99cadc76b90d2ac908e367c2c92f">00329</a> <span class="keywordtype">int</span> <a class="code" href="structf0r__plugin__info.html#92cf99cadc76b90d2ac908e367c2c92f">num_params</a>;
|
||||||
|
<a name="l00330"></a><a class="code" href="structf0r__plugin__info.html#9df1154eb490f9ba53bcbd4800a8cc3e">00330</a> <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="structf0r__plugin__info.html#9df1154eb490f9ba53bcbd4800a8cc3e">explanation</a>;
|
||||||
|
<a name="l00331"></a>00331 } <a class="code" href="structf0r__plugin__info.html">f0r_plugin_info_t</a>;
|
||||||
|
<a name="l00332"></a>00332
|
||||||
|
<a name="l00333"></a>00333
|
||||||
|
<a name="l00339"></a>00339 <span class="keywordtype">void</span> <a class="code" href="frei0r_8h.html#8d451ee1940d8bfeb33311db569321f4">f0r_get_plugin_info</a>(<a class="code" href="structf0r__plugin__info.html">f0r_plugin_info_t</a>* info);
|
||||||
|
<a name="l00340"></a>00340
|
||||||
|
<a name="l00341"></a>00341 <span class="comment">//---------------------------------------------------------------------------</span>
|
||||||
|
<a name="l00342"></a>00342
|
||||||
|
<a name="l00353"></a><a class="code" href="group__PARAM__TYPE.html#g54c75dadceec79650fd657a8169e9e65">00353</a> <span class="preprocessor">#define F0R_PARAM_BOOL 0</span>
|
||||||
|
<a name="l00354"></a>00354 <span class="preprocessor"></span>
|
||||||
|
<a name="l00359"></a><a class="code" href="group__PARAM__TYPE.html#gc82c5dc961327356885a4a0ea513e550">00359</a> <span class="preprocessor">#define F0R_PARAM_DOUBLE 1</span>
|
||||||
|
<a name="l00360"></a>00360 <span class="preprocessor"></span>
|
||||||
|
<a name="l00365"></a><a class="code" href="group__PARAM__TYPE.html#g78782f633dbf887c9496996f47b57091">00365</a> <span class="preprocessor">#define F0R_PARAM_COLOR 2</span>
|
||||||
|
<a name="l00366"></a>00366 <span class="preprocessor"></span>
|
||||||
|
<a name="l00370"></a><a class="code" href="group__PARAM__TYPE.html#g86d6e746595a6358b90b0d73f9b76c59">00370</a> <span class="preprocessor">#define F0R_PARAM_POSITION 3</span>
|
||||||
|
<a name="l00371"></a>00371 <span class="preprocessor"></span>
|
||||||
|
<a name="l00376"></a><a class="code" href="group__PARAM__TYPE.html#gc686a9c6d5a1b3d7c0beb51d7f64f960">00376</a> <span class="preprocessor">#define F0R_PARAM_STRING 4</span>
|
||||||
|
<a name="l00377"></a>00377 <span class="preprocessor"></span>
|
||||||
|
<a name="l00382"></a><a class="code" href="group__PARAM__TYPE.html#g863edbb51211153c1a5bc89128b2eedb">00382</a> <span class="keyword">typedef</span> <span class="keywordtype">double</span> <a class="code" href="group__PARAM__TYPE.html#g863edbb51211153c1a5bc89128b2eedb">f0r_param_bool</a>;
|
||||||
|
<a name="l00383"></a>00383
|
||||||
|
<a name="l00387"></a><a class="code" href="group__PARAM__TYPE.html#g05eba906a358ba2e64a0bd55e8a287c9">00387</a> <span class="keyword">typedef</span> <span class="keywordtype">double</span> <a class="code" href="group__PARAM__TYPE.html#g05eba906a358ba2e64a0bd55e8a287c9">f0r_param_double</a>;
|
||||||
|
<a name="l00388"></a>00388
|
||||||
|
<a name="l00392"></a><a class="code" href="structf0r__param__color.html">00392</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structf0r__param__color.html">f0r_param_color</a>
|
||||||
|
<a name="l00393"></a>00393 {
|
||||||
|
<a name="l00394"></a><a class="code" href="structf0r__param__color.html#a35e508971f4fae55621e61f70a893ed">00394</a> <span class="keywordtype">float</span> <a class="code" href="structf0r__param__color.html#a35e508971f4fae55621e61f70a893ed">r</a>;
|
||||||
|
<a name="l00395"></a><a class="code" href="structf0r__param__color.html#93f2e432efe7db1c8cd39b38241810f9">00395</a> <span class="keywordtype">float</span> <a class="code" href="structf0r__param__color.html#93f2e432efe7db1c8cd39b38241810f9">g</a>;
|
||||||
|
<a name="l00396"></a><a class="code" href="structf0r__param__color.html#44b8f5ddd1fec1973edbff58a63683f9">00396</a> <span class="keywordtype">float</span> <a class="code" href="structf0r__param__color.html#44b8f5ddd1fec1973edbff58a63683f9">b</a>;
|
||||||
|
<a name="l00397"></a>00397 } <a class="code" href="structf0r__param__color.html">f0r_param_color_t</a>;
|
||||||
|
<a name="l00398"></a>00398
|
||||||
|
<a name="l00402"></a><a class="code" href="structf0r__param__position.html">00402</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structf0r__param__position.html">f0r_param_position</a>
|
||||||
|
<a name="l00403"></a>00403 {
|
||||||
|
<a name="l00404"></a><a class="code" href="structf0r__param__position.html#e5a45dcf230da7d9fb5b4cce32a3905d">00404</a> <span class="keywordtype">double</span> <a class="code" href="structf0r__param__position.html#e5a45dcf230da7d9fb5b4cce32a3905d">x</a>;
|
||||||
|
<a name="l00405"></a><a class="code" href="structf0r__param__position.html#6c5092cea095e0d7c42825415d78f432">00405</a> <span class="keywordtype">double</span> <a class="code" href="structf0r__param__position.html#6c5092cea095e0d7c42825415d78f432">y</a>;
|
||||||
|
<a name="l00406"></a>00406 } <a class="code" href="structf0r__param__position.html">f0r_param_position_t</a>;
|
||||||
|
<a name="l00407"></a>00407
|
||||||
|
<a name="l00408"></a>00408
|
||||||
|
<a name="l00413"></a><a class="code" href="group__PARAM__TYPE.html#g2d2b65ed6b99cbf459d24555f0d23997">00413</a> <span class="keyword">typedef</span> <span class="keywordtype">char</span> <a class="code" href="group__PARAM__TYPE.html#g2d2b65ed6b99cbf459d24555f0d23997">f0r_param_string</a>;
|
||||||
|
<a name="l00414"></a>00414
|
||||||
|
<a name="l00424"></a><a class="code" href="structf0r__param__info.html">00424</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structf0r__param__info.html">f0r_param_info</a>
|
||||||
|
<a name="l00425"></a>00425 {
|
||||||
|
<a name="l00426"></a><a class="code" href="structf0r__param__info.html#ff206a2bd55ec0a5f38f134a9bfa9a66">00426</a> <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="structf0r__param__info.html#ff206a2bd55ec0a5f38f134a9bfa9a66">name</a>;
|
||||||
|
<a name="l00427"></a><a class="code" href="structf0r__param__info.html#9cff757f4e45b1235e8977a83bd1f70a">00427</a> <span class="keywordtype">int</span> <a class="code" href="structf0r__param__info.html#9cff757f4e45b1235e8977a83bd1f70a">type</a>;
|
||||||
|
<a name="l00428"></a><a class="code" href="structf0r__param__info.html#234708bd246ba2f8aa94c6e556110cac">00428</a> <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="structf0r__param__info.html#234708bd246ba2f8aa94c6e556110cac">explanation</a>;
|
||||||
|
<a name="l00429"></a>00429 } <a class="code" href="structf0r__param__info.html">f0r_param_info_t</a>;
|
||||||
|
<a name="l00430"></a>00430
|
||||||
|
<a name="l00439"></a>00439 <span class="keywordtype">void</span> <a class="code" href="frei0r_8h.html#503bb60dcd8c29e8a715ab0e1a4033d6">f0r_get_param_info</a>(<a class="code" href="structf0r__param__info.html">f0r_param_info_t</a>* info, <span class="keywordtype">int</span> param_index);
|
||||||
|
<a name="l00440"></a>00440
|
||||||
|
<a name="l00441"></a>00441 <span class="comment">//---------------------------------------------------------------------------</span>
|
||||||
|
<a name="l00442"></a>00442
|
||||||
|
<a name="l00446"></a><a class="code" href="frei0r_8h.html#af4b514489e1a1399f23919d467fa7f2">00446</a> <span class="keyword">typedef</span> <span class="keywordtype">void</span>* <a class="code" href="frei0r_8h.html#af4b514489e1a1399f23919d467fa7f2">f0r_instance_t</a>;
|
||||||
|
<a name="l00447"></a>00447
|
||||||
|
<a name="l00461"></a>00461 <a class="code" href="frei0r_8h.html#af4b514489e1a1399f23919d467fa7f2">f0r_instance_t</a> <a class="code" href="frei0r_8h.html#c7765bbd77add97b318c09e2aba0724b">f0r_construct</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> width, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> height);
|
||||||
|
<a name="l00462"></a>00462
|
||||||
|
<a name="l00470"></a>00470 <span class="keywordtype">void</span> <a class="code" href="frei0r_8h.html#31acce9390816a464c2d24458d9b76c6">f0r_destruct</a>(<a class="code" href="frei0r_8h.html#af4b514489e1a1399f23919d467fa7f2">f0r_instance_t</a> instance);
|
||||||
|
<a name="l00471"></a>00471
|
||||||
|
<a name="l00472"></a>00472 <span class="comment">//---------------------------------------------------------------------------</span>
|
||||||
|
<a name="l00473"></a>00473
|
||||||
|
<a name="l00477"></a><a class="code" href="frei0r_8h.html#2b52f1c6691d7d8796d002df2454f5bb">00477</a> <span class="keyword">typedef</span> <span class="keywordtype">void</span>* <a class="code" href="frei0r_8h.html#2b52f1c6691d7d8796d002df2454f5bb">f0r_param_t</a>;
|
||||||
|
<a name="l00478"></a>00478
|
||||||
|
<a name="l00490"></a>00490 <span class="keywordtype">void</span> <a class="code" href="frei0r_8h.html#b6942176959bf76d97719d844799997d">f0r_set_param_value</a>(<a class="code" href="frei0r_8h.html#af4b514489e1a1399f23919d467fa7f2">f0r_instance_t</a> instance,
|
||||||
|
<a name="l00491"></a>00491 <a class="code" href="frei0r_8h.html#2b52f1c6691d7d8796d002df2454f5bb">f0r_param_t</a> param, <span class="keywordtype">int</span> param_index);
|
||||||
|
<a name="l00492"></a>00492
|
||||||
|
<a name="l00503"></a>00503 <span class="keywordtype">void</span> <a class="code" href="frei0r_8h.html#7f0db6a26747279bf507413ebee2a599">f0r_get_param_value</a>(<a class="code" href="frei0r_8h.html#af4b514489e1a1399f23919d467fa7f2">f0r_instance_t</a> instance,
|
||||||
|
<a name="l00504"></a>00504 <a class="code" href="frei0r_8h.html#2b52f1c6691d7d8796d002df2454f5bb">f0r_param_t</a> param, <span class="keywordtype">int</span> param_index);
|
||||||
|
<a name="l00505"></a>00505
|
||||||
|
<a name="l00506"></a>00506 <span class="comment">//---------------------------------------------------------------------------</span>
|
||||||
|
<a name="l00507"></a>00507
|
||||||
|
<a name="l00533"></a>00533 <span class="keywordtype">void</span> <a class="code" href="frei0r_8h.html#7ddea8bcbfd15affc084f669c0140857">f0r_update</a>(<a class="code" href="frei0r_8h.html#af4b514489e1a1399f23919d467fa7f2">f0r_instance_t</a> instance,
|
||||||
|
<a name="l00534"></a>00534 <span class="keywordtype">double</span> time, <span class="keyword">const</span> uint32_t* inframe, uint32_t* outframe);
|
||||||
|
<a name="l00535"></a>00535
|
||||||
|
<a name="l00536"></a>00536 <span class="comment">//---------------------------------------------------------------------------</span>
|
||||||
|
<a name="l00537"></a>00537
|
||||||
|
<a name="l00559"></a>00559 <span class="keywordtype">void</span> <a class="code" href="frei0r_8h.html#5c0f4d80066aeedc695732c6f929183d">f0r_update2</a>(<a class="code" href="frei0r_8h.html#af4b514489e1a1399f23919d467fa7f2">f0r_instance_t</a> instance,
|
||||||
|
<a name="l00560"></a>00560 <span class="keywordtype">double</span> time,
|
||||||
|
<a name="l00561"></a>00561 <span class="keyword">const</span> uint32_t* inframe1,
|
||||||
|
<a name="l00562"></a>00562 <span class="keyword">const</span> uint32_t* inframe2,
|
||||||
|
<a name="l00563"></a>00563 <span class="keyword">const</span> uint32_t* inframe3,
|
||||||
|
<a name="l00564"></a>00564 uint32_t* outframe);
|
||||||
|
<a name="l00565"></a>00565 <span class="comment">//---------------------------------------------------------------------------</span>
|
||||||
|
<a name="l00566"></a>00566
|
||||||
|
<a name="l00567"></a>00567 <span class="preprocessor">#endif</span>
|
||||||
|
</pre></div><hr size="1"><address style="align: right;"><small>Generated on Wed Nov 7 12:07:53 2007 for frei0r by
|
||||||
|
<a href="http://www.doxygen.org/index.html">
|
||||||
|
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.6 </small></address>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
718
frei0r-autoconf/doc/html/frei0r_8h.html
Normal file
@@ -0,0 +1,718 @@
|
|||||||
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||||
|
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
|
||||||
|
<title>frei0r: include/frei0r.h File Reference</title>
|
||||||
|
<link href="doxygen.css" rel="stylesheet" type="text/css">
|
||||||
|
<link href="tabs.css" rel="stylesheet" type="text/css">
|
||||||
|
</head><body>
|
||||||
|
<!-- Generated by Doxygen 1.4.6 -->
|
||||||
|
<div class="tabs">
|
||||||
|
<ul>
|
||||||
|
<li><a href="index.html"><span>Main Page</span></a></li>
|
||||||
|
<li><a href="modules.html"><span>Modules</span></a></li>
|
||||||
|
<li><a href="annotated.html"><span>Data Structures</span></a></li>
|
||||||
|
<li id="current"><a href="files.html"><span>Files</span></a></li>
|
||||||
|
<li><a href="dirs.html"><span>Directories</span></a></li>
|
||||||
|
</ul></div>
|
||||||
|
<div class="tabs">
|
||||||
|
<ul>
|
||||||
|
<li><a href="files.html"><span>File List</span></a></li>
|
||||||
|
<li><a href="globals.html"><span>Globals</span></a></li>
|
||||||
|
</ul></div>
|
||||||
|
<div class="nav">
|
||||||
|
<a class="el" href="dir_c6a51e201754b7c7dc5a21651891d7e2.html">include</a></div>
|
||||||
|
<h1>frei0r.h File Reference</h1>This file defines the frei0r api, version 1.1. <a href="#_details">More...</a>
|
||||||
|
<p>
|
||||||
|
<code>#include <inttypes.h></code><br>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
<a href="frei0r_8h-source.html">Go to the source code of this file.</a><table border="0" cellpadding="0" cellspacing="0">
|
||||||
|
<tr><td></td></tr>
|
||||||
|
<tr><td colspan="2"><br><h2>Data Structures</h2></td></tr>
|
||||||
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct </td><td class="memItemRight" valign="bottom"><a class="el" href="structf0r__plugin__info.html">f0r_plugin_info</a></td></tr>
|
||||||
|
|
||||||
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct </td><td class="memItemRight" valign="bottom"><a class="el" href="structf0r__param__color.html">f0r_param_color</a></td></tr>
|
||||||
|
|
||||||
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct </td><td class="memItemRight" valign="bottom"><a class="el" href="structf0r__param__position.html">f0r_param_position</a></td></tr>
|
||||||
|
|
||||||
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct </td><td class="memItemRight" valign="bottom"><a class="el" href="structf0r__param__info.html">f0r_param_info</a></td></tr>
|
||||||
|
|
||||||
|
<tr><td colspan="2"><br><h2>Defines</h2></td></tr>
|
||||||
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="frei0r_8h.html#fcd0fc5b95d850413af3bdfb1445ce21">FREI0R_MAJOR_VERSION</a> 1</td></tr>
|
||||||
|
|
||||||
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="frei0r_8h.html#1e54a139a7cec212f6c1822793a4ef83">FREI0R_MINOR_VERSION</a> 1</td></tr>
|
||||||
|
|
||||||
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__PLUGIN__TYPE.html#g021dbc62936693bbe11851a3742b83cc">F0R_PLUGIN_TYPE_FILTER</a> 0</td></tr>
|
||||||
|
|
||||||
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__PLUGIN__TYPE.html#gd190458c6a082108471acf06622a7461">F0R_PLUGIN_TYPE_SOURCE</a> 1</td></tr>
|
||||||
|
|
||||||
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__PLUGIN__TYPE.html#ge1896fc1cdaf7a505de359b3d07aba70">F0R_PLUGIN_TYPE_MIXER2</a> 2</td></tr>
|
||||||
|
|
||||||
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__PLUGIN__TYPE.html#g4a6629bc9fd08cf104749ad9d0922501">F0R_PLUGIN_TYPE_MIXER3</a> 3</td></tr>
|
||||||
|
|
||||||
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__COLOR__MODEL.html#g4ff9ca3b84e5057b0b7aeee176d6d3a3">F0R_COLOR_MODEL_BGRA8888</a> 0</td></tr>
|
||||||
|
|
||||||
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__COLOR__MODEL.html#g68d6ca25df33b7759dfb2c2f6b44a229">F0R_COLOR_MODEL_RGBA8888</a> 1</td></tr>
|
||||||
|
|
||||||
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__COLOR__MODEL.html#g42c9b2342651a04a3045b980cf31cf97">F0R_COLOR_MODEL_PACKED32</a> 2</td></tr>
|
||||||
|
|
||||||
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__PARAM__TYPE.html#g54c75dadceec79650fd657a8169e9e65">F0R_PARAM_BOOL</a> 0</td></tr>
|
||||||
|
|
||||||
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__PARAM__TYPE.html#gc82c5dc961327356885a4a0ea513e550">F0R_PARAM_DOUBLE</a> 1</td></tr>
|
||||||
|
|
||||||
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__PARAM__TYPE.html#g78782f633dbf887c9496996f47b57091">F0R_PARAM_COLOR</a> 2</td></tr>
|
||||||
|
|
||||||
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__PARAM__TYPE.html#g86d6e746595a6358b90b0d73f9b76c59">F0R_PARAM_POSITION</a> 3</td></tr>
|
||||||
|
|
||||||
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__PARAM__TYPE.html#gc686a9c6d5a1b3d7c0beb51d7f64f960">F0R_PARAM_STRING</a> 4</td></tr>
|
||||||
|
|
||||||
|
<tr><td colspan="2"><br><h2>Typedefs</h2></td></tr>
|
||||||
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef <a class="el" href="structf0r__plugin__info.html">f0r_plugin_info</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="frei0r_8h.html#7beb0755906a8a96b3af5285ae11036c">f0r_plugin_info_t</a></td></tr>
|
||||||
|
|
||||||
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef double </td><td class="memItemRight" valign="bottom"><a class="el" href="group__PARAM__TYPE.html#g863edbb51211153c1a5bc89128b2eedb">f0r_param_bool</a></td></tr>
|
||||||
|
|
||||||
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef double </td><td class="memItemRight" valign="bottom"><a class="el" href="group__PARAM__TYPE.html#g05eba906a358ba2e64a0bd55e8a287c9">f0r_param_double</a></td></tr>
|
||||||
|
|
||||||
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef <a class="el" href="structf0r__param__color.html">f0r_param_color</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__PARAM__TYPE.html#g535ba3bc18763f2e82840e2a095dd0a9">f0r_param_color_t</a></td></tr>
|
||||||
|
|
||||||
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef <a class="el" href="structf0r__param__position.html">f0r_param_position</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__PARAM__TYPE.html#gaafb6c83aa00cfce5556e8d8cd14bdf7">f0r_param_position_t</a></td></tr>
|
||||||
|
|
||||||
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef char </td><td class="memItemRight" valign="bottom"><a class="el" href="group__PARAM__TYPE.html#g2d2b65ed6b99cbf459d24555f0d23997">f0r_param_string</a></td></tr>
|
||||||
|
|
||||||
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef <a class="el" href="structf0r__param__info.html">f0r_param_info</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="frei0r_8h.html#73d753d06abe741965ef87e3553c399a">f0r_param_info_t</a></td></tr>
|
||||||
|
|
||||||
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef void * </td><td class="memItemRight" valign="bottom"><a class="el" href="frei0r_8h.html#af4b514489e1a1399f23919d467fa7f2">f0r_instance_t</a></td></tr>
|
||||||
|
|
||||||
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef void * </td><td class="memItemRight" valign="bottom"><a class="el" href="frei0r_8h.html#2b52f1c6691d7d8796d002df2454f5bb">f0r_param_t</a></td></tr>
|
||||||
|
|
||||||
|
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
|
||||||
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="frei0r_8h.html#78b1e4451bf40bb8f80fdae871f2e750">f0r_init</a> ()</td></tr>
|
||||||
|
|
||||||
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="frei0r_8h.html#0485f00015a2b09b8733df004f62db69">f0r_deinit</a> ()</td></tr>
|
||||||
|
|
||||||
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="frei0r_8h.html#8d451ee1940d8bfeb33311db569321f4">f0r_get_plugin_info</a> (<a class="el" href="structf0r__plugin__info.html">f0r_plugin_info_t</a> *info)</td></tr>
|
||||||
|
|
||||||
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="frei0r_8h.html#503bb60dcd8c29e8a715ab0e1a4033d6">f0r_get_param_info</a> (<a class="el" href="structf0r__param__info.html">f0r_param_info_t</a> *info, int param_index)</td></tr>
|
||||||
|
|
||||||
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="frei0r_8h.html#af4b514489e1a1399f23919d467fa7f2">f0r_instance_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="frei0r_8h.html#c7765bbd77add97b318c09e2aba0724b">f0r_construct</a> (unsigned int width, unsigned int height)</td></tr>
|
||||||
|
|
||||||
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="frei0r_8h.html#31acce9390816a464c2d24458d9b76c6">f0r_destruct</a> (<a class="el" href="frei0r_8h.html#af4b514489e1a1399f23919d467fa7f2">f0r_instance_t</a> instance)</td></tr>
|
||||||
|
|
||||||
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="frei0r_8h.html#b6942176959bf76d97719d844799997d">f0r_set_param_value</a> (<a class="el" href="frei0r_8h.html#af4b514489e1a1399f23919d467fa7f2">f0r_instance_t</a> instance, <a class="el" href="frei0r_8h.html#2b52f1c6691d7d8796d002df2454f5bb">f0r_param_t</a> param, int param_index)</td></tr>
|
||||||
|
|
||||||
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="frei0r_8h.html#7f0db6a26747279bf507413ebee2a599">f0r_get_param_value</a> (<a class="el" href="frei0r_8h.html#af4b514489e1a1399f23919d467fa7f2">f0r_instance_t</a> instance, <a class="el" href="frei0r_8h.html#2b52f1c6691d7d8796d002df2454f5bb">f0r_param_t</a> param, int param_index)</td></tr>
|
||||||
|
|
||||||
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="frei0r_8h.html#7ddea8bcbfd15affc084f669c0140857">f0r_update</a> (<a class="el" href="frei0r_8h.html#af4b514489e1a1399f23919d467fa7f2">f0r_instance_t</a> instance, double time, const uint32_t *inframe, uint32_t *outframe)</td></tr>
|
||||||
|
|
||||||
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="frei0r_8h.html#5c0f4d80066aeedc695732c6f929183d">f0r_update2</a> (<a class="el" href="frei0r_8h.html#af4b514489e1a1399f23919d467fa7f2">f0r_instance_t</a> instance, double time, const uint32_t *inframe1, const uint32_t *inframe2, const uint32_t *inframe3, uint32_t *outframe)</td></tr>
|
||||||
|
|
||||||
|
</table>
|
||||||
|
<hr><a name="_details"></a><h2>Detailed Description</h2>
|
||||||
|
This file defines the frei0r api, version 1.1.
|
||||||
|
<p>
|
||||||
|
A conforming plugin must implement and export all functions declared in this header.<p>
|
||||||
|
A conforming application must accept only those plugins which use allowed values for the described fields. <hr><h2>Define Documentation</h2>
|
||||||
|
<a class="anchor" name="fcd0fc5b95d850413af3bdfb1445ce21"></a><!-- doxytag: member="frei0r.h::FREI0R_MAJOR_VERSION" ref="fcd0fc5b95d850413af3bdfb1445ce21" args="" --><p>
|
||||||
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
||||||
|
<tr>
|
||||||
|
<td class="mdRow">
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td class="md" nowrap valign="top">#define FREI0R_MAJOR_VERSION 1 </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<table cellspacing="5" cellpadding="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
The frei0r API major version </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<a class="anchor" name="1e54a139a7cec212f6c1822793a4ef83"></a><!-- doxytag: member="frei0r.h::FREI0R_MINOR_VERSION" ref="1e54a139a7cec212f6c1822793a4ef83" args="" --><p>
|
||||||
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
||||||
|
<tr>
|
||||||
|
<td class="mdRow">
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td class="md" nowrap valign="top">#define FREI0R_MINOR_VERSION 1 </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<table cellspacing="5" cellpadding="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
The frei0r API minor version </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<hr><h2>Typedef Documentation</h2>
|
||||||
|
<a class="anchor" name="af4b514489e1a1399f23919d467fa7f2"></a><!-- doxytag: member="frei0r.h::f0r_instance_t" ref="af4b514489e1a1399f23919d467fa7f2" args="" --><p>
|
||||||
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
||||||
|
<tr>
|
||||||
|
<td class="mdRow">
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td class="md" nowrap valign="top">typedef void* <a class="el" href="frei0r_8h.html#af4b514489e1a1399f23919d467fa7f2">f0r_instance_t</a> </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<table cellspacing="5" cellpadding="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Transparent instance pointer of the frei0r effect. </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<a class="anchor" name="73d753d06abe741965ef87e3553c399a"></a><!-- doxytag: member="frei0r.h::f0r_param_info_t" ref="73d753d06abe741965ef87e3553c399a" args="" --><p>
|
||||||
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
||||||
|
<tr>
|
||||||
|
<td class="mdRow">
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td class="md" nowrap valign="top">typedef struct <a class="el" href="structf0r__param__info.html">f0r_param_info</a> <a class="el" href="structf0r__param__info.html">f0r_param_info_t</a> </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<table cellspacing="5" cellpadding="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Similar to f0r_plugin_info_t, this structure is filled by the plugin for every parameter.<p>
|
||||||
|
All strings are unicode, 0-terminated, and the encoding is utf-8. </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<a class="anchor" name="2b52f1c6691d7d8796d002df2454f5bb"></a><!-- doxytag: member="frei0r.h::f0r_param_t" ref="2b52f1c6691d7d8796d002df2454f5bb" args="" --><p>
|
||||||
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
||||||
|
<tr>
|
||||||
|
<td class="mdRow">
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td class="md" nowrap valign="top">typedef void* <a class="el" href="frei0r_8h.html#2b52f1c6691d7d8796d002df2454f5bb">f0r_param_t</a> </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<table cellspacing="5" cellpadding="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Transparent parameter handle. </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<a class="anchor" name="7beb0755906a8a96b3af5285ae11036c"></a><!-- doxytag: member="frei0r.h::f0r_plugin_info_t" ref="7beb0755906a8a96b3af5285ae11036c" args="" --><p>
|
||||||
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
||||||
|
<tr>
|
||||||
|
<td class="mdRow">
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td class="md" nowrap valign="top">typedef struct <a class="el" href="structf0r__plugin__info.html">f0r_plugin_info</a> <a class="el" href="structf0r__plugin__info.html">f0r_plugin_info_t</a> </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<table cellspacing="5" cellpadding="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
The f0r_plugin_info_t structure is filled in by the plugin to tell the application about its name, type, number of parameters, and version.<p>
|
||||||
|
An application should ignore (i.e. not use) frei0r effects that have unknown values in the plugin_type or color_model field. It should also ignore effects with a too high frei0r_version.<p>
|
||||||
|
This is necessary to be able to extend the frei0r spec (e.g. by adding new color models or plugin types) in a way that does not result in crashes when loading effects that make use of these extensions into an older application.<p>
|
||||||
|
All strings are unicode, 0-terminated, and the encoding is utf-8. </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<hr><h2>Function Documentation</h2>
|
||||||
|
<a class="anchor" name="c7765bbd77add97b318c09e2aba0724b"></a><!-- doxytag: member="frei0r.h::f0r_construct" ref="c7765bbd77add97b318c09e2aba0724b" args="(unsigned int width, unsigned int height)" --><p>
|
||||||
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
||||||
|
<tr>
|
||||||
|
<td class="mdRow">
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td class="md" nowrap valign="top"><a class="el" href="frei0r_8h.html#af4b514489e1a1399f23919d467fa7f2">f0r_instance_t</a> f0r_construct </td>
|
||||||
|
<td class="md" valign="top">( </td>
|
||||||
|
<td class="md" nowrap valign="top">unsigned int </td>
|
||||||
|
<td class="mdname" nowrap> <em>width</em>, </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="md" nowrap align="right"></td>
|
||||||
|
<td class="md"></td>
|
||||||
|
<td class="md" nowrap>unsigned int </td>
|
||||||
|
<td class="mdname" nowrap> <em>height</em></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="md"></td>
|
||||||
|
<td class="md">) </td>
|
||||||
|
<td class="md" colspan="2"></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<table cellspacing="5" cellpadding="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Constructor for effect instances. The plugin returns a pointer to its internal instance structure.<p>
|
||||||
|
The resolution has to be an integer multiple of 8, must be greater than 0 and be at most 2048 in both dimensions.<p>
|
||||||
|
<dl compact><dt><b>Parameters:</b></dt><dd>
|
||||||
|
<table border="0" cellspacing="2" cellpadding="0">
|
||||||
|
<tr><td valign="top"></td><td valign="top"><em>width</em> </td><td>The x-resolution of the processed video frames </td></tr>
|
||||||
|
<tr><td valign="top"></td><td valign="top"><em>height</em> </td><td>The y-resolution of the processed video frames </td></tr>
|
||||||
|
</table>
|
||||||
|
</dl>
|
||||||
|
<dl compact><dt><b>Returns:</b></dt><dd>0 on failure or a pointer != 0 on success</dd></dl>
|
||||||
|
<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="frei0r_8h.html#31acce9390816a464c2d24458d9b76c6">f0r_destruct</a> </dd></dl>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<a class="anchor" name="0485f00015a2b09b8733df004f62db69"></a><!-- doxytag: member="frei0r.h::f0r_deinit" ref="0485f00015a2b09b8733df004f62db69" args="()" --><p>
|
||||||
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
||||||
|
<tr>
|
||||||
|
<td class="mdRow">
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td class="md" nowrap valign="top">void f0r_deinit </td>
|
||||||
|
<td class="md" valign="top">( </td>
|
||||||
|
<td class="mdname1" valign="top" nowrap> </td>
|
||||||
|
<td class="md" valign="top"> ) </td>
|
||||||
|
<td class="md" nowrap></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<table cellspacing="5" cellpadding="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
f0r_deinit is called once when the plugin is unloaded by the application. <dl compact><dt><b>See also:</b></dt><dd><a class="el" href="frei0r_8h.html#78b1e4451bf40bb8f80fdae871f2e750">f0r_init</a> </dd></dl>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<a class="anchor" name="31acce9390816a464c2d24458d9b76c6"></a><!-- doxytag: member="frei0r.h::f0r_destruct" ref="31acce9390816a464c2d24458d9b76c6" args="(f0r_instance_t instance)" --><p>
|
||||||
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
||||||
|
<tr>
|
||||||
|
<td class="mdRow">
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td class="md" nowrap valign="top">void f0r_destruct </td>
|
||||||
|
<td class="md" valign="top">( </td>
|
||||||
|
<td class="md" nowrap valign="top"><a class="el" href="frei0r_8h.html#af4b514489e1a1399f23919d467fa7f2">f0r_instance_t</a> </td>
|
||||||
|
<td class="mdname1" valign="top" nowrap> <em>instance</em> </td>
|
||||||
|
<td class="md" valign="top"> ) </td>
|
||||||
|
<td class="md" nowrap></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<table cellspacing="5" cellpadding="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Destroys an effect instance.<p>
|
||||||
|
<dl compact><dt><b>Parameters:</b></dt><dd>
|
||||||
|
<table border="0" cellspacing="2" cellpadding="0">
|
||||||
|
<tr><td valign="top"></td><td valign="top"><em>instance</em> </td><td>The pointer to the plugins internal instance structure.</td></tr>
|
||||||
|
</table>
|
||||||
|
</dl>
|
||||||
|
<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="frei0r_8h.html#c7765bbd77add97b318c09e2aba0724b">f0r_construct</a> </dd></dl>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<a class="anchor" name="503bb60dcd8c29e8a715ab0e1a4033d6"></a><!-- doxytag: member="frei0r.h::f0r_get_param_info" ref="503bb60dcd8c29e8a715ab0e1a4033d6" args="(f0r_param_info_t *info, int param_index)" --><p>
|
||||||
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
||||||
|
<tr>
|
||||||
|
<td class="mdRow">
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td class="md" nowrap valign="top">void f0r_get_param_info </td>
|
||||||
|
<td class="md" valign="top">( </td>
|
||||||
|
<td class="md" nowrap valign="top"><a class="el" href="structf0r__param__info.html">f0r_param_info_t</a> * </td>
|
||||||
|
<td class="mdname" nowrap> <em>info</em>, </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="md" nowrap align="right"></td>
|
||||||
|
<td class="md"></td>
|
||||||
|
<td class="md" nowrap>int </td>
|
||||||
|
<td class="mdname" nowrap> <em>param_index</em></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="md"></td>
|
||||||
|
<td class="md">) </td>
|
||||||
|
<td class="md" colspan="2"></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<table cellspacing="5" cellpadding="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
f0r_get_param_info is called by the application to query the type of each parameter.<p>
|
||||||
|
<dl compact><dt><b>Parameters:</b></dt><dd>
|
||||||
|
<table border="0" cellspacing="2" cellpadding="0">
|
||||||
|
<tr><td valign="top"></td><td valign="top"><em>info</em> </td><td>is allocated by the application and filled by the plugin </td></tr>
|
||||||
|
<tr><td valign="top"></td><td valign="top"><em>param_index</em> </td><td>the index of the parameter to be queried (from 0 to num_params-1) </td></tr>
|
||||||
|
</table>
|
||||||
|
</dl>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<a class="anchor" name="7f0db6a26747279bf507413ebee2a599"></a><!-- doxytag: member="frei0r.h::f0r_get_param_value" ref="7f0db6a26747279bf507413ebee2a599" args="(f0r_instance_t instance, f0r_param_t param, int param_index)" --><p>
|
||||||
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
||||||
|
<tr>
|
||||||
|
<td class="mdRow">
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td class="md" nowrap valign="top">void f0r_get_param_value </td>
|
||||||
|
<td class="md" valign="top">( </td>
|
||||||
|
<td class="md" nowrap valign="top"><a class="el" href="frei0r_8h.html#af4b514489e1a1399f23919d467fa7f2">f0r_instance_t</a> </td>
|
||||||
|
<td class="mdname" nowrap> <em>instance</em>, </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="md" nowrap align="right"></td>
|
||||||
|
<td class="md"></td>
|
||||||
|
<td class="md" nowrap><a class="el" href="frei0r_8h.html#2b52f1c6691d7d8796d002df2454f5bb">f0r_param_t</a> </td>
|
||||||
|
<td class="mdname" nowrap> <em>param</em>, </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="md" nowrap align="right"></td>
|
||||||
|
<td class="md"></td>
|
||||||
|
<td class="md" nowrap>int </td>
|
||||||
|
<td class="mdname" nowrap> <em>param_index</em></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="md"></td>
|
||||||
|
<td class="md">) </td>
|
||||||
|
<td class="md" colspan="2"></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<table cellspacing="5" cellpadding="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
This function allows the application to query the parameter values of an effect instance.<p>
|
||||||
|
<dl compact><dt><b>Parameters:</b></dt><dd>
|
||||||
|
<table border="0" cellspacing="2" cellpadding="0">
|
||||||
|
<tr><td valign="top"></td><td valign="top"><em>instance</em> </td><td>the effect instance </td></tr>
|
||||||
|
<tr><td valign="top"></td><td valign="top"><em>param</em> </td><td>pointer to the parameter value </td></tr>
|
||||||
|
<tr><td valign="top"></td><td valign="top"><em>param_index</em> </td><td>index of the parameter</td></tr>
|
||||||
|
</table>
|
||||||
|
</dl>
|
||||||
|
<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="frei0r_8h.html#b6942176959bf76d97719d844799997d">f0r_set_param_value</a> </dd></dl>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<a class="anchor" name="8d451ee1940d8bfeb33311db569321f4"></a><!-- doxytag: member="frei0r.h::f0r_get_plugin_info" ref="8d451ee1940d8bfeb33311db569321f4" args="(f0r_plugin_info_t *info)" --><p>
|
||||||
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
||||||
|
<tr>
|
||||||
|
<td class="mdRow">
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td class="md" nowrap valign="top">void f0r_get_plugin_info </td>
|
||||||
|
<td class="md" valign="top">( </td>
|
||||||
|
<td class="md" nowrap valign="top"><a class="el" href="structf0r__plugin__info.html">f0r_plugin_info_t</a> * </td>
|
||||||
|
<td class="mdname1" valign="top" nowrap> <em>info</em> </td>
|
||||||
|
<td class="md" valign="top"> ) </td>
|
||||||
|
<td class="md" nowrap></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<table cellspacing="5" cellpadding="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Is called once after init. The plugin has to fill in the values in info.<p>
|
||||||
|
<dl compact><dt><b>Parameters:</b></dt><dd>
|
||||||
|
<table border="0" cellspacing="2" cellpadding="0">
|
||||||
|
<tr><td valign="top"></td><td valign="top"><em>info</em> </td><td>Pointer to an info struct allocated by the application. </td></tr>
|
||||||
|
</table>
|
||||||
|
</dl>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<a class="anchor" name="78b1e4451bf40bb8f80fdae871f2e750"></a><!-- doxytag: member="frei0r.h::f0r_init" ref="78b1e4451bf40bb8f80fdae871f2e750" args="()" --><p>
|
||||||
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
||||||
|
<tr>
|
||||||
|
<td class="mdRow">
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td class="md" nowrap valign="top">int f0r_init </td>
|
||||||
|
<td class="md" valign="top">( </td>
|
||||||
|
<td class="mdname1" valign="top" nowrap> </td>
|
||||||
|
<td class="md" valign="top"> ) </td>
|
||||||
|
<td class="md" nowrap></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<table cellspacing="5" cellpadding="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
<a class="el" href="frei0r_8h.html#78b1e4451bf40bb8f80fdae871f2e750">f0r_init()</a> is called once when the plugin is loaded by the application. <dl compact><dt><b>See also:</b></dt><dd><a class="el" href="frei0r_8h.html#0485f00015a2b09b8733df004f62db69">f0r_deinit</a> </dd></dl>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<a class="anchor" name="b6942176959bf76d97719d844799997d"></a><!-- doxytag: member="frei0r.h::f0r_set_param_value" ref="b6942176959bf76d97719d844799997d" args="(f0r_instance_t instance, f0r_param_t param, int param_index)" --><p>
|
||||||
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
||||||
|
<tr>
|
||||||
|
<td class="mdRow">
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td class="md" nowrap valign="top">void f0r_set_param_value </td>
|
||||||
|
<td class="md" valign="top">( </td>
|
||||||
|
<td class="md" nowrap valign="top"><a class="el" href="frei0r_8h.html#af4b514489e1a1399f23919d467fa7f2">f0r_instance_t</a> </td>
|
||||||
|
<td class="mdname" nowrap> <em>instance</em>, </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="md" nowrap align="right"></td>
|
||||||
|
<td class="md"></td>
|
||||||
|
<td class="md" nowrap><a class="el" href="frei0r_8h.html#2b52f1c6691d7d8796d002df2454f5bb">f0r_param_t</a> </td>
|
||||||
|
<td class="mdname" nowrap> <em>param</em>, </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="md" nowrap align="right"></td>
|
||||||
|
<td class="md"></td>
|
||||||
|
<td class="md" nowrap>int </td>
|
||||||
|
<td class="mdname" nowrap> <em>param_index</em></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="md"></td>
|
||||||
|
<td class="md">) </td>
|
||||||
|
<td class="md" colspan="2"></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<table cellspacing="5" cellpadding="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
This function allows the application to set the parameter values of an effect instance. Validity of the parameter pointer is handled by the application thus the data must be copied by the effect.<p>
|
||||||
|
<dl compact><dt><b>Parameters:</b></dt><dd>
|
||||||
|
<table border="0" cellspacing="2" cellpadding="0">
|
||||||
|
<tr><td valign="top"></td><td valign="top"><em>instance</em> </td><td>the effect instance </td></tr>
|
||||||
|
<tr><td valign="top"></td><td valign="top"><em>param</em> </td><td>pointer to the parameter value </td></tr>
|
||||||
|
<tr><td valign="top"></td><td valign="top"><em>param_index</em> </td><td>index of the parameter</td></tr>
|
||||||
|
</table>
|
||||||
|
</dl>
|
||||||
|
<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="frei0r_8h.html#7f0db6a26747279bf507413ebee2a599">f0r_get_param_value</a> </dd></dl>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<a class="anchor" name="7ddea8bcbfd15affc084f669c0140857"></a><!-- doxytag: member="frei0r.h::f0r_update" ref="7ddea8bcbfd15affc084f669c0140857" args="(f0r_instance_t instance, double time, const uint32_t *inframe, uint32_t *outframe)" --><p>
|
||||||
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
||||||
|
<tr>
|
||||||
|
<td class="mdRow">
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td class="md" nowrap valign="top">void f0r_update </td>
|
||||||
|
<td class="md" valign="top">( </td>
|
||||||
|
<td class="md" nowrap valign="top"><a class="el" href="frei0r_8h.html#af4b514489e1a1399f23919d467fa7f2">f0r_instance_t</a> </td>
|
||||||
|
<td class="mdname" nowrap> <em>instance</em>, </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="md" nowrap align="right"></td>
|
||||||
|
<td class="md"></td>
|
||||||
|
<td class="md" nowrap>double </td>
|
||||||
|
<td class="mdname" nowrap> <em>time</em>, </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="md" nowrap align="right"></td>
|
||||||
|
<td class="md"></td>
|
||||||
|
<td class="md" nowrap>const uint32_t * </td>
|
||||||
|
<td class="mdname" nowrap> <em>inframe</em>, </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="md" nowrap align="right"></td>
|
||||||
|
<td class="md"></td>
|
||||||
|
<td class="md" nowrap>uint32_t * </td>
|
||||||
|
<td class="mdname" nowrap> <em>outframe</em></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="md"></td>
|
||||||
|
<td class="md">) </td>
|
||||||
|
<td class="md" colspan="2"></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<table cellspacing="5" cellpadding="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
This is where the core effect processing happens. The application calls it after it has set the necessary parameter values. inframe and outframe must be aligned to an integer multiple of 16 bytes in memory.<p>
|
||||||
|
This funcition should not alter the parameters of the effect in any way (<a class="el" href="frei0r_8h.html#7f0db6a26747279bf507413ebee2a599">f0r_get_param_value</a> should return the same values after a call to <a class="el" href="frei0r_8h.html#7ddea8bcbfd15affc084f669c0140857">f0r_update</a> as before the call).<p>
|
||||||
|
The function is responsible to restore the fpu state (e.g. rounding mode) and mmx state if applicable before it returns to the caller.<p>
|
||||||
|
The host mustn't call <a class="el" href="frei0r_8h.html#7ddea8bcbfd15affc084f669c0140857">f0r_update</a> for effects of type <a class="el" href="group__PLUGIN__TYPE.html#ge1896fc1cdaf7a505de359b3d07aba70">F0R_PLUGIN_TYPE_MIXER2</a> and <a class="el" href="group__PLUGIN__TYPE.html#g4a6629bc9fd08cf104749ad9d0922501">F0R_PLUGIN_TYPE_MIXER3</a>.<p>
|
||||||
|
<dl compact><dt><b>Parameters:</b></dt><dd>
|
||||||
|
<table border="0" cellspacing="2" cellpadding="0">
|
||||||
|
<tr><td valign="top"></td><td valign="top"><em>instance</em> </td><td>the effect instance </td></tr>
|
||||||
|
<tr><td valign="top"></td><td valign="top"><em>time</em> </td><td>the application time in seconds but with subsecond resolution (e.g. milli-second resolution). The resolution should be at least the inter-frame period of the application. </td></tr>
|
||||||
|
<tr><td valign="top"></td><td valign="top"><em>inframe</em> </td><td>the incoming video frame (can be zero for sources) </td></tr>
|
||||||
|
<tr><td valign="top"></td><td valign="top"><em>outframe</em> </td><td>the resulting video frame</td></tr>
|
||||||
|
</table>
|
||||||
|
</dl>
|
||||||
|
<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="frei0r_8h.html#5c0f4d80066aeedc695732c6f929183d">f0r_update2</a> </dd></dl>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<a class="anchor" name="5c0f4d80066aeedc695732c6f929183d"></a><!-- doxytag: member="frei0r.h::f0r_update2" ref="5c0f4d80066aeedc695732c6f929183d" args="(f0r_instance_t instance, double time, const uint32_t *inframe1, const uint32_t *inframe2, const uint32_t *inframe3, uint32_t *outframe)" --><p>
|
||||||
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
||||||
|
<tr>
|
||||||
|
<td class="mdRow">
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td class="md" nowrap valign="top">void f0r_update2 </td>
|
||||||
|
<td class="md" valign="top">( </td>
|
||||||
|
<td class="md" nowrap valign="top"><a class="el" href="frei0r_8h.html#af4b514489e1a1399f23919d467fa7f2">f0r_instance_t</a> </td>
|
||||||
|
<td class="mdname" nowrap> <em>instance</em>, </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="md" nowrap align="right"></td>
|
||||||
|
<td class="md"></td>
|
||||||
|
<td class="md" nowrap>double </td>
|
||||||
|
<td class="mdname" nowrap> <em>time</em>, </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="md" nowrap align="right"></td>
|
||||||
|
<td class="md"></td>
|
||||||
|
<td class="md" nowrap>const uint32_t * </td>
|
||||||
|
<td class="mdname" nowrap> <em>inframe1</em>, </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="md" nowrap align="right"></td>
|
||||||
|
<td class="md"></td>
|
||||||
|
<td class="md" nowrap>const uint32_t * </td>
|
||||||
|
<td class="mdname" nowrap> <em>inframe2</em>, </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="md" nowrap align="right"></td>
|
||||||
|
<td class="md"></td>
|
||||||
|
<td class="md" nowrap>const uint32_t * </td>
|
||||||
|
<td class="mdname" nowrap> <em>inframe3</em>, </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="md" nowrap align="right"></td>
|
||||||
|
<td class="md"></td>
|
||||||
|
<td class="md" nowrap>uint32_t * </td>
|
||||||
|
<td class="mdname" nowrap> <em>outframe</em></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="md"></td>
|
||||||
|
<td class="md">) </td>
|
||||||
|
<td class="md" colspan="2"></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<table cellspacing="5" cellpadding="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
For effects of type <a class="el" href="group__PLUGIN__TYPE.html#gd190458c6a082108471acf06622a7461">F0R_PLUGIN_TYPE_SOURCE</a> or <a class="el" href="group__PLUGIN__TYPE.html#g021dbc62936693bbe11851a3742b83cc">F0R_PLUGIN_TYPE_FILTER</a> this method is optional. The <a class="el" href="frei0r_8h.html#7ddea8bcbfd15affc084f669c0140857">f0r_update</a> method must still be exported for these two effect types. If both are provided the behavior of them must be the same.<p>
|
||||||
|
Effects of type <a class="el" href="group__PLUGIN__TYPE.html#ge1896fc1cdaf7a505de359b3d07aba70">F0R_PLUGIN_TYPE_MIXER2</a> or <a class="el" href="group__PLUGIN__TYPE.html#g4a6629bc9fd08cf104749ad9d0922501">F0R_PLUGIN_TYPE_MIXER3</a> must provide the new <a class="el" href="frei0r_8h.html#5c0f4d80066aeedc695732c6f929183d">f0r_update2</a> method.<p>
|
||||||
|
<dl compact><dt><b>Parameters:</b></dt><dd>
|
||||||
|
<table border="0" cellspacing="2" cellpadding="0">
|
||||||
|
<tr><td valign="top"></td><td valign="top"><em>instance</em> </td><td>the effect instance </td></tr>
|
||||||
|
<tr><td valign="top"></td><td valign="top"><em>time</em> </td><td>the application time in seconds but with subsecond resolution (e.g. milli-second resolution). The resolution should be at least the inter-frame period of the application. </td></tr>
|
||||||
|
<tr><td valign="top"></td><td valign="top"><em>inframe1</em> </td><td>the first incoming video frame (can be zero for sources) </td></tr>
|
||||||
|
<tr><td valign="top"></td><td valign="top"><em>inframe2</em> </td><td>the second incoming video frame (can be zero for sources and filters) </td></tr>
|
||||||
|
<tr><td valign="top"></td><td valign="top"><em>inframe3</em> </td><td>the third incoming video frame (can be zero for sources, filters and mixer3) </td></tr>
|
||||||
|
<tr><td valign="top"></td><td valign="top"><em>outframe</em> </td><td>the resulting video frame</td></tr>
|
||||||
|
</table>
|
||||||
|
</dl>
|
||||||
|
<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="frei0r_8h.html#7ddea8bcbfd15affc084f669c0140857">f0r_update</a> </dd></dl>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<hr size="1"><address style="align: right;"><small>Generated on Wed Nov 7 12:07:53 2007 for frei0r by
|
||||||
|
<a href="http://www.doxygen.org/index.html">
|
||||||
|
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.6 </small></address>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
51
frei0r-autoconf/doc/html/functions.html
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||||
|
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
|
||||||
|
<title>frei0r: Data Fields</title>
|
||||||
|
<link href="doxygen.css" rel="stylesheet" type="text/css">
|
||||||
|
<link href="tabs.css" rel="stylesheet" type="text/css">
|
||||||
|
</head><body>
|
||||||
|
<!-- Generated by Doxygen 1.4.6 -->
|
||||||
|
<div class="tabs">
|
||||||
|
<ul>
|
||||||
|
<li><a href="index.html"><span>Main Page</span></a></li>
|
||||||
|
<li><a href="modules.html"><span>Modules</span></a></li>
|
||||||
|
<li id="current"><a href="annotated.html"><span>Data Structures</span></a></li>
|
||||||
|
<li><a href="files.html"><span>Files</span></a></li>
|
||||||
|
<li><a href="dirs.html"><span>Directories</span></a></li>
|
||||||
|
</ul></div>
|
||||||
|
<div class="tabs">
|
||||||
|
<ul>
|
||||||
|
<li><a href="annotated.html"><span>Data Structures</span></a></li>
|
||||||
|
<li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
|
||||||
|
<li id="current"><a href="functions.html"><span>Data Fields</span></a></li>
|
||||||
|
</ul></div>
|
||||||
|
<div class="tabs">
|
||||||
|
<ul>
|
||||||
|
<li id="current"><a href="functions.html"><span>All</span></a></li>
|
||||||
|
<li><a href="functions_vars.html"><span>Variables</span></a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
Here is a list of all documented struct and union fields with links to the struct/union documentation for each field:
|
||||||
|
<p>
|
||||||
|
<ul>
|
||||||
|
<li>author
|
||||||
|
: <a class="el" href="structf0r__plugin__info.html#c6ad807a9ac439e57e7410dd699add6f">f0r_plugin_info</a><li>b
|
||||||
|
: <a class="el" href="structf0r__param__color.html#44b8f5ddd1fec1973edbff58a63683f9">f0r_param_color</a><li>color_model
|
||||||
|
: <a class="el" href="structf0r__plugin__info.html#0b1238f47fe6600243e500446568bb4e">f0r_plugin_info</a><li>explanation
|
||||||
|
: <a class="el" href="structf0r__param__info.html#234708bd246ba2f8aa94c6e556110cac">f0r_param_info</a>, <a class="el" href="structf0r__plugin__info.html#9df1154eb490f9ba53bcbd4800a8cc3e">f0r_plugin_info</a><li>frei0r_version
|
||||||
|
: <a class="el" href="structf0r__plugin__info.html#ac89e4129172023e153c952259373149">f0r_plugin_info</a><li>g
|
||||||
|
: <a class="el" href="structf0r__param__color.html#93f2e432efe7db1c8cd39b38241810f9">f0r_param_color</a><li>major_version
|
||||||
|
: <a class="el" href="structf0r__plugin__info.html#87ea44cd95f93b3c367d3dcec556deb3">f0r_plugin_info</a><li>minor_version
|
||||||
|
: <a class="el" href="structf0r__plugin__info.html#bfa71a212ece4e0af3d4a8c3f4fa55ca">f0r_plugin_info</a><li>name
|
||||||
|
: <a class="el" href="structf0r__param__info.html#ff206a2bd55ec0a5f38f134a9bfa9a66">f0r_param_info</a>, <a class="el" href="structf0r__plugin__info.html#6e9916e14a3871987c66964a89b18c5d">f0r_plugin_info</a><li>num_params
|
||||||
|
: <a class="el" href="structf0r__plugin__info.html#92cf99cadc76b90d2ac908e367c2c92f">f0r_plugin_info</a><li>plugin_type
|
||||||
|
: <a class="el" href="structf0r__plugin__info.html#e57fd00690e5f90609120cff276c3ead">f0r_plugin_info</a><li>r
|
||||||
|
: <a class="el" href="structf0r__param__color.html#a35e508971f4fae55621e61f70a893ed">f0r_param_color</a><li>type
|
||||||
|
: <a class="el" href="structf0r__param__info.html#9cff757f4e45b1235e8977a83bd1f70a">f0r_param_info</a><li>x
|
||||||
|
: <a class="el" href="structf0r__param__position.html#e5a45dcf230da7d9fb5b4cce32a3905d">f0r_param_position</a><li>y
|
||||||
|
: <a class="el" href="structf0r__param__position.html#6c5092cea095e0d7c42825415d78f432">f0r_param_position</a></ul>
|
||||||
|
<hr size="1"><address style="align: right;"><small>Generated on Wed Nov 7 12:07:53 2007 for frei0r by
|
||||||
|
<a href="http://www.doxygen.org/index.html">
|
||||||
|
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.6 </small></address>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
51
frei0r-autoconf/doc/html/functions_vars.html
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||||
|
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
|
||||||
|
<title>frei0r: Data Fields - Variables</title>
|
||||||
|
<link href="doxygen.css" rel="stylesheet" type="text/css">
|
||||||
|
<link href="tabs.css" rel="stylesheet" type="text/css">
|
||||||
|
</head><body>
|
||||||
|
<!-- Generated by Doxygen 1.4.6 -->
|
||||||
|
<div class="tabs">
|
||||||
|
<ul>
|
||||||
|
<li><a href="index.html"><span>Main Page</span></a></li>
|
||||||
|
<li><a href="modules.html"><span>Modules</span></a></li>
|
||||||
|
<li id="current"><a href="annotated.html"><span>Data Structures</span></a></li>
|
||||||
|
<li><a href="files.html"><span>Files</span></a></li>
|
||||||
|
<li><a href="dirs.html"><span>Directories</span></a></li>
|
||||||
|
</ul></div>
|
||||||
|
<div class="tabs">
|
||||||
|
<ul>
|
||||||
|
<li><a href="annotated.html"><span>Data Structures</span></a></li>
|
||||||
|
<li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
|
||||||
|
<li id="current"><a href="functions.html"><span>Data Fields</span></a></li>
|
||||||
|
</ul></div>
|
||||||
|
<div class="tabs">
|
||||||
|
<ul>
|
||||||
|
<li><a href="functions.html"><span>All</span></a></li>
|
||||||
|
<li id="current"><a href="functions_vars.html"><span>Variables</span></a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
<ul>
|
||||||
|
<li>author
|
||||||
|
: <a class="el" href="structf0r__plugin__info.html#c6ad807a9ac439e57e7410dd699add6f">f0r_plugin_info</a><li>b
|
||||||
|
: <a class="el" href="structf0r__param__color.html#44b8f5ddd1fec1973edbff58a63683f9">f0r_param_color</a><li>color_model
|
||||||
|
: <a class="el" href="structf0r__plugin__info.html#0b1238f47fe6600243e500446568bb4e">f0r_plugin_info</a><li>explanation
|
||||||
|
: <a class="el" href="structf0r__param__info.html#234708bd246ba2f8aa94c6e556110cac">f0r_param_info</a>, <a class="el" href="structf0r__plugin__info.html#9df1154eb490f9ba53bcbd4800a8cc3e">f0r_plugin_info</a><li>frei0r_version
|
||||||
|
: <a class="el" href="structf0r__plugin__info.html#ac89e4129172023e153c952259373149">f0r_plugin_info</a><li>g
|
||||||
|
: <a class="el" href="structf0r__param__color.html#93f2e432efe7db1c8cd39b38241810f9">f0r_param_color</a><li>major_version
|
||||||
|
: <a class="el" href="structf0r__plugin__info.html#87ea44cd95f93b3c367d3dcec556deb3">f0r_plugin_info</a><li>minor_version
|
||||||
|
: <a class="el" href="structf0r__plugin__info.html#bfa71a212ece4e0af3d4a8c3f4fa55ca">f0r_plugin_info</a><li>name
|
||||||
|
: <a class="el" href="structf0r__param__info.html#ff206a2bd55ec0a5f38f134a9bfa9a66">f0r_param_info</a>, <a class="el" href="structf0r__plugin__info.html#6e9916e14a3871987c66964a89b18c5d">f0r_plugin_info</a><li>num_params
|
||||||
|
: <a class="el" href="structf0r__plugin__info.html#92cf99cadc76b90d2ac908e367c2c92f">f0r_plugin_info</a><li>plugin_type
|
||||||
|
: <a class="el" href="structf0r__plugin__info.html#e57fd00690e5f90609120cff276c3ead">f0r_plugin_info</a><li>r
|
||||||
|
: <a class="el" href="structf0r__param__color.html#a35e508971f4fae55621e61f70a893ed">f0r_param_color</a><li>type
|
||||||
|
: <a class="el" href="structf0r__param__info.html#9cff757f4e45b1235e8977a83bd1f70a">f0r_param_info</a><li>x
|
||||||
|
: <a class="el" href="structf0r__param__position.html#e5a45dcf230da7d9fb5b4cce32a3905d">f0r_param_position</a><li>y
|
||||||
|
: <a class="el" href="structf0r__param__position.html#6c5092cea095e0d7c42825415d78f432">f0r_param_position</a></ul>
|
||||||
|
<hr size="1"><address style="align: right;"><small>Generated on Wed Nov 7 12:07:53 2007 for frei0r by
|
||||||
|
<a href="http://www.doxygen.org/index.html">
|
||||||
|
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.6 </small></address>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
77
frei0r-autoconf/doc/html/globals.html
Normal file
@@ -0,0 +1,77 @@
|
|||||||
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||||
|
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
|
||||||
|
<title>frei0r: Data Fields</title>
|
||||||
|
<link href="doxygen.css" rel="stylesheet" type="text/css">
|
||||||
|
<link href="tabs.css" rel="stylesheet" type="text/css">
|
||||||
|
</head><body>
|
||||||
|
<!-- Generated by Doxygen 1.4.6 -->
|
||||||
|
<div class="tabs">
|
||||||
|
<ul>
|
||||||
|
<li><a href="index.html"><span>Main Page</span></a></li>
|
||||||
|
<li><a href="modules.html"><span>Modules</span></a></li>
|
||||||
|
<li><a href="annotated.html"><span>Data Structures</span></a></li>
|
||||||
|
<li id="current"><a href="files.html"><span>Files</span></a></li>
|
||||||
|
<li><a href="dirs.html"><span>Directories</span></a></li>
|
||||||
|
</ul></div>
|
||||||
|
<div class="tabs">
|
||||||
|
<ul>
|
||||||
|
<li><a href="files.html"><span>File List</span></a></li>
|
||||||
|
<li id="current"><a href="globals.html"><span>Globals</span></a></li>
|
||||||
|
</ul></div>
|
||||||
|
<div class="tabs">
|
||||||
|
<ul>
|
||||||
|
<li id="current"><a href="globals.html"><span>All</span></a></li>
|
||||||
|
<li><a href="globals_func.html"><span>Functions</span></a></li>
|
||||||
|
<li><a href="globals_type.html"><span>Typedefs</span></a></li>
|
||||||
|
<li><a href="globals_defs.html"><span>Defines</span></a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="tabs">
|
||||||
|
<ul>
|
||||||
|
<li><a href="#index_f"><span>f</span></a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Here is a list of all documented functions, variables, defines, enums, and typedefs with links to the documentation:
|
||||||
|
<p>
|
||||||
|
<h3><a class="anchor" name="index_f">- f -</a></h3><ul>
|
||||||
|
<li>F0R_COLOR_MODEL_BGRA8888
|
||||||
|
: <a class="el" href="group__COLOR__MODEL.html#g4ff9ca3b84e5057b0b7aeee176d6d3a3">frei0r.h</a><li>F0R_COLOR_MODEL_PACKED32
|
||||||
|
: <a class="el" href="group__COLOR__MODEL.html#g42c9b2342651a04a3045b980cf31cf97">frei0r.h</a><li>F0R_COLOR_MODEL_RGBA8888
|
||||||
|
: <a class="el" href="group__COLOR__MODEL.html#g68d6ca25df33b7759dfb2c2f6b44a229">frei0r.h</a><li>f0r_construct()
|
||||||
|
: <a class="el" href="frei0r_8h.html#c7765bbd77add97b318c09e2aba0724b">frei0r.h</a><li>f0r_deinit()
|
||||||
|
: <a class="el" href="frei0r_8h.html#0485f00015a2b09b8733df004f62db69">frei0r.h</a><li>f0r_destruct()
|
||||||
|
: <a class="el" href="frei0r_8h.html#31acce9390816a464c2d24458d9b76c6">frei0r.h</a><li>f0r_get_param_info()
|
||||||
|
: <a class="el" href="frei0r_8h.html#503bb60dcd8c29e8a715ab0e1a4033d6">frei0r.h</a><li>f0r_get_param_value()
|
||||||
|
: <a class="el" href="frei0r_8h.html#7f0db6a26747279bf507413ebee2a599">frei0r.h</a><li>f0r_get_plugin_info()
|
||||||
|
: <a class="el" href="frei0r_8h.html#8d451ee1940d8bfeb33311db569321f4">frei0r.h</a><li>f0r_init()
|
||||||
|
: <a class="el" href="frei0r_8h.html#78b1e4451bf40bb8f80fdae871f2e750">frei0r.h</a><li>f0r_instance_t
|
||||||
|
: <a class="el" href="frei0r_8h.html#af4b514489e1a1399f23919d467fa7f2">frei0r.h</a><li>f0r_param_bool
|
||||||
|
: <a class="el" href="group__PARAM__TYPE.html#g863edbb51211153c1a5bc89128b2eedb">frei0r.h</a><li>F0R_PARAM_BOOL
|
||||||
|
: <a class="el" href="group__PARAM__TYPE.html#g54c75dadceec79650fd657a8169e9e65">frei0r.h</a><li>F0R_PARAM_COLOR
|
||||||
|
: <a class="el" href="group__PARAM__TYPE.html#g78782f633dbf887c9496996f47b57091">frei0r.h</a><li>f0r_param_color_t
|
||||||
|
: <a class="el" href="group__PARAM__TYPE.html#g535ba3bc18763f2e82840e2a095dd0a9">frei0r.h</a><li>f0r_param_double
|
||||||
|
: <a class="el" href="group__PARAM__TYPE.html#g05eba906a358ba2e64a0bd55e8a287c9">frei0r.h</a><li>F0R_PARAM_DOUBLE
|
||||||
|
: <a class="el" href="group__PARAM__TYPE.html#gc82c5dc961327356885a4a0ea513e550">frei0r.h</a><li>f0r_param_info_t
|
||||||
|
: <a class="el" href="frei0r_8h.html#73d753d06abe741965ef87e3553c399a">frei0r.h</a><li>F0R_PARAM_POSITION
|
||||||
|
: <a class="el" href="group__PARAM__TYPE.html#g86d6e746595a6358b90b0d73f9b76c59">frei0r.h</a><li>f0r_param_position_t
|
||||||
|
: <a class="el" href="group__PARAM__TYPE.html#gaafb6c83aa00cfce5556e8d8cd14bdf7">frei0r.h</a><li>f0r_param_string
|
||||||
|
: <a class="el" href="group__PARAM__TYPE.html#g2d2b65ed6b99cbf459d24555f0d23997">frei0r.h</a><li>F0R_PARAM_STRING
|
||||||
|
: <a class="el" href="group__PARAM__TYPE.html#gc686a9c6d5a1b3d7c0beb51d7f64f960">frei0r.h</a><li>f0r_param_t
|
||||||
|
: <a class="el" href="frei0r_8h.html#2b52f1c6691d7d8796d002df2454f5bb">frei0r.h</a><li>f0r_plugin_info_t
|
||||||
|
: <a class="el" href="frei0r_8h.html#7beb0755906a8a96b3af5285ae11036c">frei0r.h</a><li>F0R_PLUGIN_TYPE_FILTER
|
||||||
|
: <a class="el" href="group__PLUGIN__TYPE.html#g021dbc62936693bbe11851a3742b83cc">frei0r.h</a><li>F0R_PLUGIN_TYPE_MIXER2
|
||||||
|
: <a class="el" href="group__PLUGIN__TYPE.html#ge1896fc1cdaf7a505de359b3d07aba70">frei0r.h</a><li>F0R_PLUGIN_TYPE_MIXER3
|
||||||
|
: <a class="el" href="group__PLUGIN__TYPE.html#g4a6629bc9fd08cf104749ad9d0922501">frei0r.h</a><li>F0R_PLUGIN_TYPE_SOURCE
|
||||||
|
: <a class="el" href="group__PLUGIN__TYPE.html#gd190458c6a082108471acf06622a7461">frei0r.h</a><li>f0r_set_param_value()
|
||||||
|
: <a class="el" href="frei0r_8h.html#b6942176959bf76d97719d844799997d">frei0r.h</a><li>f0r_update()
|
||||||
|
: <a class="el" href="frei0r_8h.html#7ddea8bcbfd15affc084f669c0140857">frei0r.h</a><li>f0r_update2()
|
||||||
|
: <a class="el" href="frei0r_8h.html#5c0f4d80066aeedc695732c6f929183d">frei0r.h</a><li>FREI0R_MAJOR_VERSION
|
||||||
|
: <a class="el" href="frei0r_8h.html#fcd0fc5b95d850413af3bdfb1445ce21">frei0r.h</a><li>FREI0R_MINOR_VERSION
|
||||||
|
: <a class="el" href="frei0r_8h.html#1e54a139a7cec212f6c1822793a4ef83">frei0r.h</a></ul>
|
||||||
|
<hr size="1"><address style="align: right;"><small>Generated on Wed Nov 7 12:07:53 2007 for frei0r by
|
||||||
|
<a href="http://www.doxygen.org/index.html">
|
||||||
|
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.6 </small></address>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
51
frei0r-autoconf/doc/html/globals_defs.html
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||||
|
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
|
||||||
|
<title>frei0r: Data Fields</title>
|
||||||
|
<link href="doxygen.css" rel="stylesheet" type="text/css">
|
||||||
|
<link href="tabs.css" rel="stylesheet" type="text/css">
|
||||||
|
</head><body>
|
||||||
|
<!-- Generated by Doxygen 1.4.6 -->
|
||||||
|
<div class="tabs">
|
||||||
|
<ul>
|
||||||
|
<li><a href="index.html"><span>Main Page</span></a></li>
|
||||||
|
<li><a href="modules.html"><span>Modules</span></a></li>
|
||||||
|
<li><a href="annotated.html"><span>Data Structures</span></a></li>
|
||||||
|
<li id="current"><a href="files.html"><span>Files</span></a></li>
|
||||||
|
<li><a href="dirs.html"><span>Directories</span></a></li>
|
||||||
|
</ul></div>
|
||||||
|
<div class="tabs">
|
||||||
|
<ul>
|
||||||
|
<li><a href="files.html"><span>File List</span></a></li>
|
||||||
|
<li id="current"><a href="globals.html"><span>Globals</span></a></li>
|
||||||
|
</ul></div>
|
||||||
|
<div class="tabs">
|
||||||
|
<ul>
|
||||||
|
<li><a href="globals.html"><span>All</span></a></li>
|
||||||
|
<li><a href="globals_func.html"><span>Functions</span></a></li>
|
||||||
|
<li><a href="globals_type.html"><span>Typedefs</span></a></li>
|
||||||
|
<li id="current"><a href="globals_defs.html"><span>Defines</span></a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
<ul>
|
||||||
|
<li>F0R_COLOR_MODEL_BGRA8888
|
||||||
|
: <a class="el" href="group__COLOR__MODEL.html#g4ff9ca3b84e5057b0b7aeee176d6d3a3">frei0r.h</a><li>F0R_COLOR_MODEL_PACKED32
|
||||||
|
: <a class="el" href="group__COLOR__MODEL.html#g42c9b2342651a04a3045b980cf31cf97">frei0r.h</a><li>F0R_COLOR_MODEL_RGBA8888
|
||||||
|
: <a class="el" href="group__COLOR__MODEL.html#g68d6ca25df33b7759dfb2c2f6b44a229">frei0r.h</a><li>F0R_PARAM_BOOL
|
||||||
|
: <a class="el" href="group__PARAM__TYPE.html#g54c75dadceec79650fd657a8169e9e65">frei0r.h</a><li>F0R_PARAM_COLOR
|
||||||
|
: <a class="el" href="group__PARAM__TYPE.html#g78782f633dbf887c9496996f47b57091">frei0r.h</a><li>F0R_PARAM_DOUBLE
|
||||||
|
: <a class="el" href="group__PARAM__TYPE.html#gc82c5dc961327356885a4a0ea513e550">frei0r.h</a><li>F0R_PARAM_POSITION
|
||||||
|
: <a class="el" href="group__PARAM__TYPE.html#g86d6e746595a6358b90b0d73f9b76c59">frei0r.h</a><li>F0R_PARAM_STRING
|
||||||
|
: <a class="el" href="group__PARAM__TYPE.html#gc686a9c6d5a1b3d7c0beb51d7f64f960">frei0r.h</a><li>F0R_PLUGIN_TYPE_FILTER
|
||||||
|
: <a class="el" href="group__PLUGIN__TYPE.html#g021dbc62936693bbe11851a3742b83cc">frei0r.h</a><li>F0R_PLUGIN_TYPE_MIXER2
|
||||||
|
: <a class="el" href="group__PLUGIN__TYPE.html#ge1896fc1cdaf7a505de359b3d07aba70">frei0r.h</a><li>F0R_PLUGIN_TYPE_MIXER3
|
||||||
|
: <a class="el" href="group__PLUGIN__TYPE.html#g4a6629bc9fd08cf104749ad9d0922501">frei0r.h</a><li>F0R_PLUGIN_TYPE_SOURCE
|
||||||
|
: <a class="el" href="group__PLUGIN__TYPE.html#gd190458c6a082108471acf06622a7461">frei0r.h</a><li>FREI0R_MAJOR_VERSION
|
||||||
|
: <a class="el" href="frei0r_8h.html#fcd0fc5b95d850413af3bdfb1445ce21">frei0r.h</a><li>FREI0R_MINOR_VERSION
|
||||||
|
: <a class="el" href="frei0r_8h.html#1e54a139a7cec212f6c1822793a4ef83">frei0r.h</a></ul>
|
||||||
|
<hr size="1"><address style="align: right;"><small>Generated on Wed Nov 7 12:07:53 2007 for frei0r by
|
||||||
|
<a href="http://www.doxygen.org/index.html">
|
||||||
|
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.6 </small></address>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
47
frei0r-autoconf/doc/html/globals_func.html
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||||
|
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
|
||||||
|
<title>frei0r: Data Fields</title>
|
||||||
|
<link href="doxygen.css" rel="stylesheet" type="text/css">
|
||||||
|
<link href="tabs.css" rel="stylesheet" type="text/css">
|
||||||
|
</head><body>
|
||||||
|
<!-- Generated by Doxygen 1.4.6 -->
|
||||||
|
<div class="tabs">
|
||||||
|
<ul>
|
||||||
|
<li><a href="index.html"><span>Main Page</span></a></li>
|
||||||
|
<li><a href="modules.html"><span>Modules</span></a></li>
|
||||||
|
<li><a href="annotated.html"><span>Data Structures</span></a></li>
|
||||||
|
<li id="current"><a href="files.html"><span>Files</span></a></li>
|
||||||
|
<li><a href="dirs.html"><span>Directories</span></a></li>
|
||||||
|
</ul></div>
|
||||||
|
<div class="tabs">
|
||||||
|
<ul>
|
||||||
|
<li><a href="files.html"><span>File List</span></a></li>
|
||||||
|
<li id="current"><a href="globals.html"><span>Globals</span></a></li>
|
||||||
|
</ul></div>
|
||||||
|
<div class="tabs">
|
||||||
|
<ul>
|
||||||
|
<li><a href="globals.html"><span>All</span></a></li>
|
||||||
|
<li id="current"><a href="globals_func.html"><span>Functions</span></a></li>
|
||||||
|
<li><a href="globals_type.html"><span>Typedefs</span></a></li>
|
||||||
|
<li><a href="globals_defs.html"><span>Defines</span></a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
<ul>
|
||||||
|
<li>f0r_construct()
|
||||||
|
: <a class="el" href="frei0r_8h.html#c7765bbd77add97b318c09e2aba0724b">frei0r.h</a><li>f0r_deinit()
|
||||||
|
: <a class="el" href="frei0r_8h.html#0485f00015a2b09b8733df004f62db69">frei0r.h</a><li>f0r_destruct()
|
||||||
|
: <a class="el" href="frei0r_8h.html#31acce9390816a464c2d24458d9b76c6">frei0r.h</a><li>f0r_get_param_info()
|
||||||
|
: <a class="el" href="frei0r_8h.html#503bb60dcd8c29e8a715ab0e1a4033d6">frei0r.h</a><li>f0r_get_param_value()
|
||||||
|
: <a class="el" href="frei0r_8h.html#7f0db6a26747279bf507413ebee2a599">frei0r.h</a><li>f0r_get_plugin_info()
|
||||||
|
: <a class="el" href="frei0r_8h.html#8d451ee1940d8bfeb33311db569321f4">frei0r.h</a><li>f0r_init()
|
||||||
|
: <a class="el" href="frei0r_8h.html#78b1e4451bf40bb8f80fdae871f2e750">frei0r.h</a><li>f0r_set_param_value()
|
||||||
|
: <a class="el" href="frei0r_8h.html#b6942176959bf76d97719d844799997d">frei0r.h</a><li>f0r_update()
|
||||||
|
: <a class="el" href="frei0r_8h.html#7ddea8bcbfd15affc084f669c0140857">frei0r.h</a><li>f0r_update2()
|
||||||
|
: <a class="el" href="frei0r_8h.html#5c0f4d80066aeedc695732c6f929183d">frei0r.h</a></ul>
|
||||||
|
<hr size="1"><address style="align: right;"><small>Generated on Wed Nov 7 12:07:53 2007 for frei0r by
|
||||||
|
<a href="http://www.doxygen.org/index.html">
|
||||||
|
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.6 </small></address>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
46
frei0r-autoconf/doc/html/globals_type.html
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||||
|
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
|
||||||
|
<title>frei0r: Data Fields</title>
|
||||||
|
<link href="doxygen.css" rel="stylesheet" type="text/css">
|
||||||
|
<link href="tabs.css" rel="stylesheet" type="text/css">
|
||||||
|
</head><body>
|
||||||
|
<!-- Generated by Doxygen 1.4.6 -->
|
||||||
|
<div class="tabs">
|
||||||
|
<ul>
|
||||||
|
<li><a href="index.html"><span>Main Page</span></a></li>
|
||||||
|
<li><a href="modules.html"><span>Modules</span></a></li>
|
||||||
|
<li><a href="annotated.html"><span>Data Structures</span></a></li>
|
||||||
|
<li id="current"><a href="files.html"><span>Files</span></a></li>
|
||||||
|
<li><a href="dirs.html"><span>Directories</span></a></li>
|
||||||
|
</ul></div>
|
||||||
|
<div class="tabs">
|
||||||
|
<ul>
|
||||||
|
<li><a href="files.html"><span>File List</span></a></li>
|
||||||
|
<li id="current"><a href="globals.html"><span>Globals</span></a></li>
|
||||||
|
</ul></div>
|
||||||
|
<div class="tabs">
|
||||||
|
<ul>
|
||||||
|
<li><a href="globals.html"><span>All</span></a></li>
|
||||||
|
<li><a href="globals_func.html"><span>Functions</span></a></li>
|
||||||
|
<li id="current"><a href="globals_type.html"><span>Typedefs</span></a></li>
|
||||||
|
<li><a href="globals_defs.html"><span>Defines</span></a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
<ul>
|
||||||
|
<li>f0r_instance_t
|
||||||
|
: <a class="el" href="frei0r_8h.html#af4b514489e1a1399f23919d467fa7f2">frei0r.h</a><li>f0r_param_bool
|
||||||
|
: <a class="el" href="group__PARAM__TYPE.html#g863edbb51211153c1a5bc89128b2eedb">frei0r.h</a><li>f0r_param_color_t
|
||||||
|
: <a class="el" href="group__PARAM__TYPE.html#g535ba3bc18763f2e82840e2a095dd0a9">frei0r.h</a><li>f0r_param_double
|
||||||
|
: <a class="el" href="group__PARAM__TYPE.html#g05eba906a358ba2e64a0bd55e8a287c9">frei0r.h</a><li>f0r_param_info_t
|
||||||
|
: <a class="el" href="frei0r_8h.html#73d753d06abe741965ef87e3553c399a">frei0r.h</a><li>f0r_param_position_t
|
||||||
|
: <a class="el" href="group__PARAM__TYPE.html#gaafb6c83aa00cfce5556e8d8cd14bdf7">frei0r.h</a><li>f0r_param_string
|
||||||
|
: <a class="el" href="group__PARAM__TYPE.html#g2d2b65ed6b99cbf459d24555f0d23997">frei0r.h</a><li>f0r_param_t
|
||||||
|
: <a class="el" href="frei0r_8h.html#2b52f1c6691d7d8796d002df2454f5bb">frei0r.h</a><li>f0r_plugin_info_t
|
||||||
|
: <a class="el" href="frei0r_8h.html#7beb0755906a8a96b3af5285ae11036c">frei0r.h</a></ul>
|
||||||
|
<hr size="1"><address style="align: right;"><small>Generated on Wed Nov 7 12:07:53 2007 for frei0r by
|
||||||
|
<a href="http://www.doxygen.org/index.html">
|
||||||
|
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.6 </small></address>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
111
frei0r-autoconf/doc/html/group__COLOR__MODEL.html
Normal file
@@ -0,0 +1,111 @@
|
|||||||
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||||
|
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
|
||||||
|
<title>frei0r: Color Models</title>
|
||||||
|
<link href="doxygen.css" rel="stylesheet" type="text/css">
|
||||||
|
<link href="tabs.css" rel="stylesheet" type="text/css">
|
||||||
|
</head><body>
|
||||||
|
<!-- Generated by Doxygen 1.4.6 -->
|
||||||
|
<div class="tabs">
|
||||||
|
<ul>
|
||||||
|
<li><a href="index.html"><span>Main Page</span></a></li>
|
||||||
|
<li><a href="modules.html"><span>Modules</span></a></li>
|
||||||
|
<li><a href="annotated.html"><span>Data Structures</span></a></li>
|
||||||
|
<li><a href="files.html"><span>Files</span></a></li>
|
||||||
|
<li><a href="dirs.html"><span>Directories</span></a></li>
|
||||||
|
</ul></div>
|
||||||
|
<h1>Color Models</h1><table border="0" cellpadding="0" cellspacing="0">
|
||||||
|
<tr><td></td></tr>
|
||||||
|
<tr><td colspan="2"><br><h2>Defines</h2></td></tr>
|
||||||
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__COLOR__MODEL.html#g4ff9ca3b84e5057b0b7aeee176d6d3a3">F0R_COLOR_MODEL_BGRA8888</a> 0</td></tr>
|
||||||
|
|
||||||
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__COLOR__MODEL.html#g68d6ca25df33b7759dfb2c2f6b44a229">F0R_COLOR_MODEL_RGBA8888</a> 1</td></tr>
|
||||||
|
|
||||||
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__COLOR__MODEL.html#g42c9b2342651a04a3045b980cf31cf97">F0R_COLOR_MODEL_PACKED32</a> 2</td></tr>
|
||||||
|
|
||||||
|
</table>
|
||||||
|
<hr><a name="_details"></a><h2>Detailed Description</h2>
|
||||||
|
List of supported color models.<p>
|
||||||
|
Note: the color models are endian independent, because the color components are defined by their positon in memory, not by their significance in an uint32_t value.<p>
|
||||||
|
For effects that work on the color components, RGBA8888 is the recommended color model for frei0r-1.1 effects. For effects that only work on pixels, PACKED32 is the recommended color model since it helps the application to avoid unnecessary color conversions.<p>
|
||||||
|
Effects can choose an appropriate color model, applications must support all color models and do conversions if necessary. Source effects must not use the PACKED32 color model because the application must know in which color model the created framebuffers are represented.<p>
|
||||||
|
For each color model, a frame consists of width*height pixels which are stored row-wise and consecutively in memory. The size of a pixel is 4 bytes. There is no extra pitch parameter (i.e. the pitch is simply width*4).<p>
|
||||||
|
The following additional constraints must be honored:<ul>
|
||||||
|
<li>The top-most line of a frame is stored first in memory.</li><li>A frame must be aligned to a 16 byte border in memory.</li><li>The width and height of a frame must be positive</li><li>The width and height of a frame must be integer multiples of 8</li></ul>
|
||||||
|
<p>
|
||||||
|
These constraints make sure that each line is stored at an address aligned to 16 byte. <hr><h2>Define Documentation</h2>
|
||||||
|
<a class="anchor" name="g4ff9ca3b84e5057b0b7aeee176d6d3a3"></a><!-- doxytag: member="frei0r.h::F0R_COLOR_MODEL_BGRA8888" ref="g4ff9ca3b84e5057b0b7aeee176d6d3a3" args="" --><p>
|
||||||
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
||||||
|
<tr>
|
||||||
|
<td class="mdRow">
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td class="md" nowrap valign="top">#define F0R_COLOR_MODEL_BGRA8888 0 </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<table cellspacing="5" cellpadding="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
In BGRA8888, each pixel is represented by 4 consecutive unsigned bytes, where the first byte value represents the blue, the second the green, and the third the red color component of the pixel. The last value represents the alpha value. </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<a class="anchor" name="g42c9b2342651a04a3045b980cf31cf97"></a><!-- doxytag: member="frei0r.h::F0R_COLOR_MODEL_PACKED32" ref="g42c9b2342651a04a3045b980cf31cf97" args="" --><p>
|
||||||
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
||||||
|
<tr>
|
||||||
|
<td class="mdRow">
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td class="md" nowrap valign="top">#define F0R_COLOR_MODEL_PACKED32 2 </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<table cellspacing="5" cellpadding="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
In PACKED32, each pixel is represented by 4 consecutive bytes, but it is not defined how the color componets are stored. The true color format could be RGBA8888, BGRA8888, a packed 32 bit YUV format, or any other color format that stores pixels in 32 bit.<p>
|
||||||
|
This is useful for effects that don't work on color but only on pixels (for example a mirror effect).<p>
|
||||||
|
Note that source effects must not use this color model. </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<a class="anchor" name="g68d6ca25df33b7759dfb2c2f6b44a229"></a><!-- doxytag: member="frei0r.h::F0R_COLOR_MODEL_RGBA8888" ref="g68d6ca25df33b7759dfb2c2f6b44a229" args="" --><p>
|
||||||
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
||||||
|
<tr>
|
||||||
|
<td class="mdRow">
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td class="md" nowrap valign="top">#define F0R_COLOR_MODEL_RGBA8888 1 </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<table cellspacing="5" cellpadding="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
In RGBA8888, each pixel is represented by 4 consecutive unsigned bytes, where the first byte value represents the red, the second the green, and the third the blue color component of the pixel. The last value represents the alpha value. </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<hr size="1"><address style="align: right;"><small>Generated on Wed Nov 7 12:07:53 2007 for frei0r by
|
||||||
|
<a href="http://www.doxygen.org/index.html">
|
||||||
|
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.6 </small></address>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
287
frei0r-autoconf/doc/html/group__PARAM__TYPE.html
Normal file
@@ -0,0 +1,287 @@
|
|||||||
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||||
|
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
|
||||||
|
<title>frei0r: Parameter Types</title>
|
||||||
|
<link href="doxygen.css" rel="stylesheet" type="text/css">
|
||||||
|
<link href="tabs.css" rel="stylesheet" type="text/css">
|
||||||
|
</head><body>
|
||||||
|
<!-- Generated by Doxygen 1.4.6 -->
|
||||||
|
<div class="tabs">
|
||||||
|
<ul>
|
||||||
|
<li><a href="index.html"><span>Main Page</span></a></li>
|
||||||
|
<li><a href="modules.html"><span>Modules</span></a></li>
|
||||||
|
<li><a href="annotated.html"><span>Data Structures</span></a></li>
|
||||||
|
<li><a href="files.html"><span>Files</span></a></li>
|
||||||
|
<li><a href="dirs.html"><span>Directories</span></a></li>
|
||||||
|
</ul></div>
|
||||||
|
<h1>Parameter Types</h1><table border="0" cellpadding="0" cellspacing="0">
|
||||||
|
<tr><td></td></tr>
|
||||||
|
<tr><td colspan="2"><br><h2>Data Structures</h2></td></tr>
|
||||||
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct </td><td class="memItemRight" valign="bottom"><a class="el" href="structf0r__param__color.html">f0r_param_color</a></td></tr>
|
||||||
|
|
||||||
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct </td><td class="memItemRight" valign="bottom"><a class="el" href="structf0r__param__position.html">f0r_param_position</a></td></tr>
|
||||||
|
|
||||||
|
<tr><td colspan="2"><br><h2>Defines</h2></td></tr>
|
||||||
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__PARAM__TYPE.html#g54c75dadceec79650fd657a8169e9e65">F0R_PARAM_BOOL</a> 0</td></tr>
|
||||||
|
|
||||||
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__PARAM__TYPE.html#gc82c5dc961327356885a4a0ea513e550">F0R_PARAM_DOUBLE</a> 1</td></tr>
|
||||||
|
|
||||||
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__PARAM__TYPE.html#g78782f633dbf887c9496996f47b57091">F0R_PARAM_COLOR</a> 2</td></tr>
|
||||||
|
|
||||||
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__PARAM__TYPE.html#g86d6e746595a6358b90b0d73f9b76c59">F0R_PARAM_POSITION</a> 3</td></tr>
|
||||||
|
|
||||||
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__PARAM__TYPE.html#gc686a9c6d5a1b3d7c0beb51d7f64f960">F0R_PARAM_STRING</a> 4</td></tr>
|
||||||
|
|
||||||
|
<tr><td colspan="2"><br><h2>Typedefs</h2></td></tr>
|
||||||
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef double </td><td class="memItemRight" valign="bottom"><a class="el" href="group__PARAM__TYPE.html#g863edbb51211153c1a5bc89128b2eedb">f0r_param_bool</a></td></tr>
|
||||||
|
|
||||||
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef double </td><td class="memItemRight" valign="bottom"><a class="el" href="group__PARAM__TYPE.html#g05eba906a358ba2e64a0bd55e8a287c9">f0r_param_double</a></td></tr>
|
||||||
|
|
||||||
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef <a class="el" href="structf0r__param__color.html">f0r_param_color</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__PARAM__TYPE.html#g535ba3bc18763f2e82840e2a095dd0a9">f0r_param_color_t</a></td></tr>
|
||||||
|
|
||||||
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef <a class="el" href="structf0r__param__position.html">f0r_param_position</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__PARAM__TYPE.html#gaafb6c83aa00cfce5556e8d8cd14bdf7">f0r_param_position_t</a></td></tr>
|
||||||
|
|
||||||
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef char </td><td class="memItemRight" valign="bottom"><a class="el" href="group__PARAM__TYPE.html#g2d2b65ed6b99cbf459d24555f0d23997">f0r_param_string</a></td></tr>
|
||||||
|
|
||||||
|
</table>
|
||||||
|
<hr><h2>Define Documentation</h2>
|
||||||
|
<a class="anchor" name="g54c75dadceec79650fd657a8169e9e65"></a><!-- doxytag: member="frei0r.h::F0R_PARAM_BOOL" ref="g54c75dadceec79650fd657a8169e9e65" args="" --><p>
|
||||||
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
||||||
|
<tr>
|
||||||
|
<td class="mdRow">
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td class="md" nowrap valign="top">#define F0R_PARAM_BOOL 0 </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<table cellspacing="5" cellpadding="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Parameter type for boolean values <dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__PARAM__TYPE.html#g863edbb51211153c1a5bc89128b2eedb">f0r_param_bool</a> </dd></dl>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<a class="anchor" name="g78782f633dbf887c9496996f47b57091"></a><!-- doxytag: member="frei0r.h::F0R_PARAM_COLOR" ref="g78782f633dbf887c9496996f47b57091" args="" --><p>
|
||||||
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
||||||
|
<tr>
|
||||||
|
<td class="mdRow">
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td class="md" nowrap valign="top">#define F0R_PARAM_COLOR 2 </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<table cellspacing="5" cellpadding="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Parameter type for color <dl compact><dt><b>See also:</b></dt><dd><a class="el" href="structf0r__param__color.html">f0r_param_color</a> </dd></dl>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<a class="anchor" name="gc82c5dc961327356885a4a0ea513e550"></a><!-- doxytag: member="frei0r.h::F0R_PARAM_DOUBLE" ref="gc82c5dc961327356885a4a0ea513e550" args="" --><p>
|
||||||
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
||||||
|
<tr>
|
||||||
|
<td class="mdRow">
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td class="md" nowrap valign="top">#define F0R_PARAM_DOUBLE 1 </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<table cellspacing="5" cellpadding="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Parameter type for doubles <dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__PARAM__TYPE.html#g05eba906a358ba2e64a0bd55e8a287c9">f0r_param_double</a> </dd></dl>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<a class="anchor" name="g86d6e746595a6358b90b0d73f9b76c59"></a><!-- doxytag: member="frei0r.h::F0R_PARAM_POSITION" ref="g86d6e746595a6358b90b0d73f9b76c59" args="" --><p>
|
||||||
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
||||||
|
<tr>
|
||||||
|
<td class="mdRow">
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td class="md" nowrap valign="top">#define F0R_PARAM_POSITION 3 </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<table cellspacing="5" cellpadding="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Parameter type for position <dl compact><dt><b>See also:</b></dt><dd><a class="el" href="structf0r__param__position.html">f0r_param_position</a> </dd></dl>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<a class="anchor" name="gc686a9c6d5a1b3d7c0beb51d7f64f960"></a><!-- doxytag: member="frei0r.h::F0R_PARAM_STRING" ref="gc686a9c6d5a1b3d7c0beb51d7f64f960" args="" --><p>
|
||||||
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
||||||
|
<tr>
|
||||||
|
<td class="mdRow">
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td class="md" nowrap valign="top">#define F0R_PARAM_STRING 4 </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<table cellspacing="5" cellpadding="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Parameter type for string <dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__PARAM__TYPE.html#g2d2b65ed6b99cbf459d24555f0d23997">f0r_param_string</a> </dd></dl>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<hr><h2>Typedef Documentation</h2>
|
||||||
|
<a class="anchor" name="g863edbb51211153c1a5bc89128b2eedb"></a><!-- doxytag: member="frei0r.h::f0r_param_bool" ref="g863edbb51211153c1a5bc89128b2eedb" args="" --><p>
|
||||||
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
||||||
|
<tr>
|
||||||
|
<td class="mdRow">
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td class="md" nowrap valign="top">typedef double <a class="el" href="group__PARAM__TYPE.html#g863edbb51211153c1a5bc89128b2eedb">f0r_param_bool</a> </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<table cellspacing="5" cellpadding="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
The boolean type. The allowed range of values is [0, 1]. [0, 0.5[ is mapped to false and [0.5, 1] is mapped to true. </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<a class="anchor" name="g535ba3bc18763f2e82840e2a095dd0a9"></a><!-- doxytag: member="frei0r.h::f0r_param_color_t" ref="g535ba3bc18763f2e82840e2a095dd0a9" args="" --><p>
|
||||||
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
||||||
|
<tr>
|
||||||
|
<td class="mdRow">
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td class="md" nowrap valign="top">typedef struct <a class="el" href="structf0r__param__color.html">f0r_param_color</a> <a class="el" href="structf0r__param__color.html">f0r_param_color_t</a> </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<table cellspacing="5" cellpadding="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
The color type. All three color components are in the range [0, 1]. </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<a class="anchor" name="g05eba906a358ba2e64a0bd55e8a287c9"></a><!-- doxytag: member="frei0r.h::f0r_param_double" ref="g05eba906a358ba2e64a0bd55e8a287c9" args="" --><p>
|
||||||
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
||||||
|
<tr>
|
||||||
|
<td class="mdRow">
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td class="md" nowrap valign="top">typedef double <a class="el" href="group__PARAM__TYPE.html#g05eba906a358ba2e64a0bd55e8a287c9">f0r_param_double</a> </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<table cellspacing="5" cellpadding="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
The double type. The allowed range of values is [0, 1]. </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<a class="anchor" name="gaafb6c83aa00cfce5556e8d8cd14bdf7"></a><!-- doxytag: member="frei0r.h::f0r_param_position_t" ref="gaafb6c83aa00cfce5556e8d8cd14bdf7" args="" --><p>
|
||||||
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
||||||
|
<tr>
|
||||||
|
<td class="mdRow">
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td class="md" nowrap valign="top">typedef struct <a class="el" href="structf0r__param__position.html">f0r_param_position</a> <a class="el" href="structf0r__param__position.html">f0r_param_position_t</a> </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<table cellspacing="5" cellpadding="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
The position type. Both position coordinates are in the range [0, 1]. </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<a class="anchor" name="g2d2b65ed6b99cbf459d24555f0d23997"></a><!-- doxytag: member="frei0r.h::f0r_param_string" ref="g2d2b65ed6b99cbf459d24555f0d23997" args="" --><p>
|
||||||
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
||||||
|
<tr>
|
||||||
|
<td class="mdRow">
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td class="md" nowrap valign="top">typedef char <a class="el" href="group__PARAM__TYPE.html#g2d2b65ed6b99cbf459d24555f0d23997">f0r_param_string</a> </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<table cellspacing="5" cellpadding="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
The string type. Zero terminated array of 8-bit values in utf-8 encoding </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<hr size="1"><address style="align: right;"><small>Generated on Wed Nov 7 12:07:53 2007 for frei0r by
|
||||||
|
<a href="http://www.doxygen.org/index.html">
|
||||||
|
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.6 </small></address>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
126
frei0r-autoconf/doc/html/group__PLUGIN__TYPE.html
Normal file
@@ -0,0 +1,126 @@
|
|||||||
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||||
|
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
|
||||||
|
<title>frei0r: Type of the Plugin</title>
|
||||||
|
<link href="doxygen.css" rel="stylesheet" type="text/css">
|
||||||
|
<link href="tabs.css" rel="stylesheet" type="text/css">
|
||||||
|
</head><body>
|
||||||
|
<!-- Generated by Doxygen 1.4.6 -->
|
||||||
|
<div class="tabs">
|
||||||
|
<ul>
|
||||||
|
<li><a href="index.html"><span>Main Page</span></a></li>
|
||||||
|
<li><a href="modules.html"><span>Modules</span></a></li>
|
||||||
|
<li><a href="annotated.html"><span>Data Structures</span></a></li>
|
||||||
|
<li><a href="files.html"><span>Files</span></a></li>
|
||||||
|
<li><a href="dirs.html"><span>Directories</span></a></li>
|
||||||
|
</ul></div>
|
||||||
|
<h1>Type of the Plugin</h1><table border="0" cellpadding="0" cellspacing="0">
|
||||||
|
<tr><td></td></tr>
|
||||||
|
<tr><td colspan="2"><br><h2>Defines</h2></td></tr>
|
||||||
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__PLUGIN__TYPE.html#g021dbc62936693bbe11851a3742b83cc">F0R_PLUGIN_TYPE_FILTER</a> 0</td></tr>
|
||||||
|
|
||||||
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__PLUGIN__TYPE.html#gd190458c6a082108471acf06622a7461">F0R_PLUGIN_TYPE_SOURCE</a> 1</td></tr>
|
||||||
|
|
||||||
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__PLUGIN__TYPE.html#ge1896fc1cdaf7a505de359b3d07aba70">F0R_PLUGIN_TYPE_MIXER2</a> 2</td></tr>
|
||||||
|
|
||||||
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__PLUGIN__TYPE.html#g4a6629bc9fd08cf104749ad9d0922501">F0R_PLUGIN_TYPE_MIXER3</a> 3</td></tr>
|
||||||
|
|
||||||
|
</table>
|
||||||
|
<hr><a name="_details"></a><h2>Detailed Description</h2>
|
||||||
|
These defines determine whether the plugin is a source, a filter or one of the two mixer types <hr><h2>Define Documentation</h2>
|
||||||
|
<a class="anchor" name="g021dbc62936693bbe11851a3742b83cc"></a><!-- doxytag: member="frei0r.h::F0R_PLUGIN_TYPE_FILTER" ref="g021dbc62936693bbe11851a3742b83cc" args="" --><p>
|
||||||
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
||||||
|
<tr>
|
||||||
|
<td class="mdRow">
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td class="md" nowrap valign="top">#define F0R_PLUGIN_TYPE_FILTER 0 </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<table cellspacing="5" cellpadding="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
one input and one output </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<a class="anchor" name="ge1896fc1cdaf7a505de359b3d07aba70"></a><!-- doxytag: member="frei0r.h::F0R_PLUGIN_TYPE_MIXER2" ref="ge1896fc1cdaf7a505de359b3d07aba70" args="" --><p>
|
||||||
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
||||||
|
<tr>
|
||||||
|
<td class="mdRow">
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td class="md" nowrap valign="top">#define F0R_PLUGIN_TYPE_MIXER2 2 </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<table cellspacing="5" cellpadding="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
two inputs and one output </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<a class="anchor" name="g4a6629bc9fd08cf104749ad9d0922501"></a><!-- doxytag: member="frei0r.h::F0R_PLUGIN_TYPE_MIXER3" ref="g4a6629bc9fd08cf104749ad9d0922501" args="" --><p>
|
||||||
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
||||||
|
<tr>
|
||||||
|
<td class="mdRow">
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td class="md" nowrap valign="top">#define F0R_PLUGIN_TYPE_MIXER3 3 </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<table cellspacing="5" cellpadding="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
three inputs and one output </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<a class="anchor" name="gd190458c6a082108471acf06622a7461"></a><!-- doxytag: member="frei0r.h::F0R_PLUGIN_TYPE_SOURCE" ref="gd190458c6a082108471acf06622a7461" args="" --><p>
|
||||||
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
||||||
|
<tr>
|
||||||
|
<td class="mdRow">
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td class="md" nowrap valign="top">#define F0R_PLUGIN_TYPE_SOURCE 1 </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<table cellspacing="5" cellpadding="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
just one output </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<hr size="1"><address style="align: right;"><small>Generated on Wed Nov 7 12:07:53 2007 for frei0r by
|
||||||
|
<a href="http://www.doxygen.org/index.html">
|
||||||
|
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.6 </small></address>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
36
frei0r-autoconf/doc/html/group__concurrency.html
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||||
|
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
|
||||||
|
<title>frei0r: Concurrency</title>
|
||||||
|
<link href="doxygen.css" rel="stylesheet" type="text/css">
|
||||||
|
<link href="tabs.css" rel="stylesheet" type="text/css">
|
||||||
|
</head><body>
|
||||||
|
<!-- Generated by Doxygen 1.4.6 -->
|
||||||
|
<div class="tabs">
|
||||||
|
<ul>
|
||||||
|
<li><a href="index.html"><span>Main Page</span></a></li>
|
||||||
|
<li><a href="modules.html"><span>Modules</span></a></li>
|
||||||
|
<li><a href="annotated.html"><span>Data Structures</span></a></li>
|
||||||
|
<li><a href="files.html"><span>Files</span></a></li>
|
||||||
|
<li><a href="dirs.html"><span>Directories</span></a></li>
|
||||||
|
</ul></div>
|
||||||
|
<h1>Concurrency</h1><table border="0" cellpadding="0" cellspacing="0">
|
||||||
|
<tr><td></td></tr>
|
||||||
|
</table>
|
||||||
|
<h2><a class="anchor" name="sec_concurrency">
|
||||||
|
Concurrency</a></h2>
|
||||||
|
<ul>
|
||||||
|
<li><a class="el" href="frei0r_8h.html#78b1e4451bf40bb8f80fdae871f2e750">f0r_init</a></li><li><a class="el" href="frei0r_8h.html#0485f00015a2b09b8733df004f62db69">f0r_deinit</a></li></ul>
|
||||||
|
<p>
|
||||||
|
These methods must not be called more than once. It is obvious that no concurrent calls are allowed.<p>
|
||||||
|
<ul>
|
||||||
|
<li><a class="el" href="frei0r_8h.html#8d451ee1940d8bfeb33311db569321f4">f0r_get_plugin_info</a></li><li><a class="el" href="frei0r_8h.html#503bb60dcd8c29e8a715ab0e1a4033d6">f0r_get_param_info</a></li><li><a class="el" href="frei0r_8h.html#c7765bbd77add97b318c09e2aba0724b">f0r_construct</a></li><li><a class="el" href="frei0r_8h.html#31acce9390816a464c2d24458d9b76c6">f0r_destruct</a></li></ul>
|
||||||
|
<p>
|
||||||
|
Concurrent calls of these functions are allowed.<p>
|
||||||
|
<ul>
|
||||||
|
<li><a class="el" href="frei0r_8h.html#b6942176959bf76d97719d844799997d">f0r_set_param_value</a></li><li><a class="el" href="frei0r_8h.html#7f0db6a26747279bf507413ebee2a599">f0r_get_param_value</a></li><li><a class="el" href="frei0r_8h.html#7ddea8bcbfd15affc084f669c0140857">f0r_update</a></li><li><a class="el" href="frei0r_8h.html#5c0f4d80066aeedc695732c6f929183d">f0r_update2</a></li></ul>
|
||||||
|
<p>
|
||||||
|
If a thread is in one of these methods its allowed for another thread to enter one of theses methods for a different effect instance. But for one effect instance only one thread is allowed to execute any of these methods. <hr size="1"><address style="align: right;"><small>Generated on Wed Nov 7 12:07:53 2007 for frei0r by
|
||||||
|
<a href="http://www.doxygen.org/index.html">
|
||||||
|
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.6 </small></address>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
41
frei0r-autoconf/doc/html/group__icons.html
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||||
|
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
|
||||||
|
<title>frei0r: Icons for frei0r effects</title>
|
||||||
|
<link href="doxygen.css" rel="stylesheet" type="text/css">
|
||||||
|
<link href="tabs.css" rel="stylesheet" type="text/css">
|
||||||
|
</head><body>
|
||||||
|
<!-- Generated by Doxygen 1.4.6 -->
|
||||||
|
<div class="tabs">
|
||||||
|
<ul>
|
||||||
|
<li><a href="index.html"><span>Main Page</span></a></li>
|
||||||
|
<li><a href="modules.html"><span>Modules</span></a></li>
|
||||||
|
<li><a href="annotated.html"><span>Data Structures</span></a></li>
|
||||||
|
<li><a href="files.html"><span>Files</span></a></li>
|
||||||
|
<li><a href="dirs.html"><span>Directories</span></a></li>
|
||||||
|
</ul></div>
|
||||||
|
<h1>Icons for frei0r effects</h1><table border="0" cellpadding="0" cellspacing="0">
|
||||||
|
<tr><td></td></tr>
|
||||||
|
</table>
|
||||||
|
<h2><a class="anchor" name="sec_icons">
|
||||||
|
Icons for frei0r effects</a></h2>
|
||||||
|
Each frei0r effect can have an associated icon.<h3><a class="anchor" name="sec_icon_format">
|
||||||
|
Icon Format</a></h3>
|
||||||
|
The format of frei0r icons must be png. Recommended resolution is 64x64. The icon filename of an effect with effect name "frei0r" must be "frei0r.png".<h3><a class="anchor" name="sec_icon_location">
|
||||||
|
Icon location</a></h3>
|
||||||
|
The exact location where the application should look for the plugin is platform dependant.<p>
|
||||||
|
For Windows platforms, the icon should be at the same place as the plugin containing the effect.<p>
|
||||||
|
For Unix platforms, the following mapping from plugin location to icon location must be used:<p>
|
||||||
|
Let <plugin_path>/<plugin> be a frei0r plugin with name <effect_name>. Then the corresponding icon (if any) shall be located in <icon_path>/<effect_name>.png. <icon_path> can be obtained in the following way:<p>
|
||||||
|
<div class="fragment"><pre class="fragment"> <plugin_path> | <icon_path>
|
||||||
|
----------------------------------------------------------------------------
|
||||||
|
$HOME/.frei0r-1/lib/<vendor> | $HOME/.frei0r-1/icons/<vendor>
|
||||||
|
/usr/local/lib/frei0r-1/<vendor> | /usr/local/share/frei0r-1/icons/<vendor>
|
||||||
|
/usr/lib/frei0r-1/<vendor> | /usr/share/frei0r-1/icons/<vendor>
|
||||||
|
* | <plugin_path>
|
||||||
|
</pre></div><p>
|
||||||
|
(The wildcard '*' stands for any other plugin_path)<p>
|
||||||
|
For other platforms, no location is defined. We recommend to use the plugin path where possible. <hr size="1"><address style="align: right;"><small>Generated on Wed Nov 7 12:07:53 2007 for frei0r by
|
||||||
|
<a href="http://www.doxygen.org/index.html">
|
||||||
|
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.6 </small></address>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
38
frei0r-autoconf/doc/html/group__pluglocations.html
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||||
|
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
|
||||||
|
<title>frei0r: Plugin Locations</title>
|
||||||
|
<link href="doxygen.css" rel="stylesheet" type="text/css">
|
||||||
|
<link href="tabs.css" rel="stylesheet" type="text/css">
|
||||||
|
</head><body>
|
||||||
|
<!-- Generated by Doxygen 1.4.6 -->
|
||||||
|
<div class="tabs">
|
||||||
|
<ul>
|
||||||
|
<li><a href="index.html"><span>Main Page</span></a></li>
|
||||||
|
<li><a href="modules.html"><span>Modules</span></a></li>
|
||||||
|
<li><a href="annotated.html"><span>Data Structures</span></a></li>
|
||||||
|
<li><a href="files.html"><span>Files</span></a></li>
|
||||||
|
<li><a href="dirs.html"><span>Directories</span></a></li>
|
||||||
|
</ul></div>
|
||||||
|
<h1>Plugin Locations</h1><table border="0" cellpadding="0" cellspacing="0">
|
||||||
|
<tr><td></td></tr>
|
||||||
|
</table>
|
||||||
|
<h2><a class="anchor" name="sec_pluglocations">
|
||||||
|
Plugin Locations</a></h2>
|
||||||
|
For Unix platforms there are rules for the location of frei0r plugins.<p>
|
||||||
|
frei0r 1.x plugin files should be located in<p>
|
||||||
|
<ul>
|
||||||
|
<li>(1) /usr/lib/frei0r-1/<vendor></li><li>(2) /usr/local/lib/frei0r-1/<vendor></li><li>(3) $HOME/.frei0r-1/lib/<vendor></li></ul>
|
||||||
|
<p>
|
||||||
|
Examples:<p>
|
||||||
|
<ul>
|
||||||
|
<li>/usr/lib/frei0r-1/mob/flippo.so</li><li>/usr/lib/frei0r-1/drone/flippo.so</li><li>/usr/local/lib/frei0r-1/gephex/coma/invert0r.so</li><li>/home/martin/.frei0r-1/lib/martin/test.so</li></ul>
|
||||||
|
<p>
|
||||||
|
Like in these examples plugins should be placed in "vendor" subdirs to reduce name clashes.<h3><a class="anchor" name="sec_order">
|
||||||
|
Plugin Loading Order</a></h3>
|
||||||
|
The application shall load plugins in the following order: 3, 2, 1. If a name clash occurs (two or more frei0r plugins with identical effect name), the plugins in directory 3 have precedence over plugins in directory 2, and those in directory 2 have precedence over plugins in directory 1.<p>
|
||||||
|
This makes it possible for users to "override" effects that are installed in system wide directories by placing plugins in their home directory.<p>
|
||||||
|
The order of loading plugins inside each of the directories 1, 2, and 3 is not defined. <hr size="1"><address style="align: right;"><small>Generated on Wed Nov 7 12:07:53 2007 for frei0r by
|
||||||
|
<a href="http://www.doxygen.org/index.html">
|
||||||
|
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.6 </small></address>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
32
frei0r-autoconf/doc/html/hierarchy.html
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||||
|
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
|
||||||
|
<title>frei0r: Hierarchical Index</title>
|
||||||
|
<link href="doxygen.css" rel="stylesheet" type="text/css">
|
||||||
|
<link href="tabs.css" rel="stylesheet" type="text/css">
|
||||||
|
</head><body>
|
||||||
|
<!-- Generated by Doxygen 1.4.6 -->
|
||||||
|
<div class="tabs">
|
||||||
|
<ul>
|
||||||
|
<li><a href="index.html"><span>Main Page</span></a></li>
|
||||||
|
<li><a href="modules.html"><span>Modules</span></a></li>
|
||||||
|
<li id="current"><a href="annotated.html"><span>Data Structures</span></a></li>
|
||||||
|
<li><a href="files.html"><span>Files</span></a></li>
|
||||||
|
<li><a href="dirs.html"><span>Directories</span></a></li>
|
||||||
|
</ul></div>
|
||||||
|
<div class="tabs">
|
||||||
|
<ul>
|
||||||
|
<li><a href="annotated.html"><span>Data Structures</span></a></li>
|
||||||
|
<li id="current"><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
|
||||||
|
<li><a href="functions.html"><span>Data Fields</span></a></li>
|
||||||
|
</ul></div>
|
||||||
|
<h1>frei0r Class Hierarchy</h1>This inheritance list is sorted roughly, but not completely, alphabetically:<ul>
|
||||||
|
<li><a class="el" href="structf0r__param__color.html">f0r_param_color</a>
|
||||||
|
<li><a class="el" href="structf0r__param__info.html">f0r_param_info</a>
|
||||||
|
<li><a class="el" href="structf0r__param__position.html">f0r_param_position</a>
|
||||||
|
<li><a class="el" href="structf0r__plugin__info.html">f0r_plugin_info</a>
|
||||||
|
</ul>
|
||||||
|
<hr size="1"><address style="align: right;"><small>Generated on Wed Nov 7 12:07:53 2007 for frei0r by
|
||||||
|
<a href="http://www.doxygen.org/index.html">
|
||||||
|
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.6 </small></address>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
40
frei0r-autoconf/doc/html/index.html
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||||
|
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
|
||||||
|
<title>frei0r: frei0r - a minimalistic plugin API for video effects</title>
|
||||||
|
<link href="doxygen.css" rel="stylesheet" type="text/css">
|
||||||
|
<link href="tabs.css" rel="stylesheet" type="text/css">
|
||||||
|
</head><body>
|
||||||
|
<!-- Generated by Doxygen 1.4.6 -->
|
||||||
|
<div class="tabs">
|
||||||
|
<ul>
|
||||||
|
<li id="current"><a href="index.html"><span>Main Page</span></a></li>
|
||||||
|
<li><a href="modules.html"><span>Modules</span></a></li>
|
||||||
|
<li><a href="annotated.html"><span>Data Structures</span></a></li>
|
||||||
|
<li><a href="files.html"><span>Files</span></a></li>
|
||||||
|
<li><a href="dirs.html"><span>Directories</span></a></li>
|
||||||
|
</ul></div>
|
||||||
|
<h1>frei0r - a minimalistic plugin API for video effects</h1>
|
||||||
|
<p>
|
||||||
|
<h2><a class="anchor" name="sec_intro">
|
||||||
|
Introduction</a></h2>
|
||||||
|
This is frei0r - a minimalistic plugin API for video effects.<p>
|
||||||
|
The main emphasis is on simplicity - there are many different applications that use video effects, and they all have different requirements regarding their internal plugin API. And that's why frei0r does not try to be a one-in-all general video plugin API, but instead an API for the most common video effects: simple filters, sources and mixers that can be controlled by parameters.<p>
|
||||||
|
It's our hope that this way these simple effects can be shared between many applications, avoiding their reimplementation by different projects.<p>
|
||||||
|
On the other hand, this is not meant as a competing standard to more ambitious efforts that try to satisfy the needs of many different applications and more complex effects.<h2><a class="anchor" name="sec_overview">
|
||||||
|
Overview</a></h2>
|
||||||
|
If you are new to frei0r, the best thing is probably to have a look at the <a href="frei0r_8h-source.html">frei0r header</a>, which is quite simple.<p>
|
||||||
|
After that, you might want to look at the <a href="frei0r_8h.html">frei0r functions</a> in more detail.<p>
|
||||||
|
When developing a new frei0r effect, you have to choose<ul>
|
||||||
|
<li>which effect type to use (<a class="el" href="group__PLUGIN__TYPE.html">Type of the Plugin</a>),</li><li>which color model to use (<a class="el" href="group__COLOR__MODEL.html">Color Models</a>), and</li><li>which parameter types (<a class="el" href="group__PARAM__TYPE.html">Parameter Types</a>) your effect will support.</li></ul>
|
||||||
|
<p>
|
||||||
|
To round things up, you should decide whether your effect should have an associated icon (<a class="el" href="group__icons.html">Icons for frei0r effects</a>), and where it will be installed (<a class="el" href="group__pluglocations.html">Plugin Locations</a>).<h2><a class="anchor" name="sec_changes">
|
||||||
|
Changes</a></h2>
|
||||||
|
<h3><a class="anchor" name="sec_changes_1_0_1_1">
|
||||||
|
From frei0r 1.0 to frei0r 1.1</a></h3>
|
||||||
|
<ul>
|
||||||
|
<li>added specifications for plugin locations</li><li>added specifications for frei0r icons</li><li>added RGBA8888 color model</li><li>added packed32 color model</li><li>added better specification of color models</li><li>added string type</li><li>added bounds to resolution (8 <= width, height <= 2048)</li><li>width and height must be an integer multiple of 8</li><li>frame data must be 16 byte aligned</li><li>improved update specification (must not change parameters, must restore fpu state)</li><li>added note for applications to ignore effects with unknown fields</li><li>added new plugin types mixer2 and mixer3</li><li>added section about <a class="el" href="group__concurrency.html">Concurrency</a> </li></ul>
|
||||||
|
<hr size="1"><address style="align: right;"><small>Generated on Wed Nov 7 12:07:53 2007 for frei0r by
|
||||||
|
<a href="http://www.doxygen.org/index.html">
|
||||||
|
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.6 </small></address>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
28
frei0r-autoconf/doc/html/modules.html
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||||
|
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
|
||||||
|
<title>frei0r: Module Index</title>
|
||||||
|
<link href="doxygen.css" rel="stylesheet" type="text/css">
|
||||||
|
<link href="tabs.css" rel="stylesheet" type="text/css">
|
||||||
|
</head><body>
|
||||||
|
<!-- Generated by Doxygen 1.4.6 -->
|
||||||
|
<div class="tabs">
|
||||||
|
<ul>
|
||||||
|
<li><a href="index.html"><span>Main Page</span></a></li>
|
||||||
|
<li id="current"><a href="modules.html"><span>Modules</span></a></li>
|
||||||
|
<li><a href="annotated.html"><span>Data Structures</span></a></li>
|
||||||
|
<li><a href="files.html"><span>Files</span></a></li>
|
||||||
|
<li><a href="dirs.html"><span>Directories</span></a></li>
|
||||||
|
</ul></div>
|
||||||
|
<h1>frei0r Modules</h1>Here is a list of all modules:<ul>
|
||||||
|
<li><a class="el" href="group__pluglocations.html">Plugin Locations</a>
|
||||||
|
<li><a class="el" href="group__icons.html">Icons for frei0r effects</a>
|
||||||
|
<li><a class="el" href="group__concurrency.html">Concurrency</a>
|
||||||
|
<li><a class="el" href="group__PLUGIN__TYPE.html">Type of the Plugin</a>
|
||||||
|
<li><a class="el" href="group__COLOR__MODEL.html">Color Models</a>
|
||||||
|
<li><a class="el" href="group__PARAM__TYPE.html">Parameter Types</a>
|
||||||
|
</ul>
|
||||||
|
<hr size="1"><address style="align: right;"><small>Generated on Wed Nov 7 12:07:53 2007 for frei0r by
|
||||||
|
<a href="http://www.doxygen.org/index.html">
|
||||||
|
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.6 </small></address>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
116
frei0r-autoconf/doc/html/structf0r__param__color.html
Normal file
@@ -0,0 +1,116 @@
|
|||||||
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||||
|
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
|
||||||
|
<title>frei0r: f0r_param_color Struct Reference</title>
|
||||||
|
<link href="doxygen.css" rel="stylesheet" type="text/css">
|
||||||
|
<link href="tabs.css" rel="stylesheet" type="text/css">
|
||||||
|
</head><body>
|
||||||
|
<!-- Generated by Doxygen 1.4.6 -->
|
||||||
|
<div class="tabs">
|
||||||
|
<ul>
|
||||||
|
<li><a href="index.html"><span>Main Page</span></a></li>
|
||||||
|
<li><a href="modules.html"><span>Modules</span></a></li>
|
||||||
|
<li id="current"><a href="annotated.html"><span>Data Structures</span></a></li>
|
||||||
|
<li><a href="files.html"><span>Files</span></a></li>
|
||||||
|
<li><a href="dirs.html"><span>Directories</span></a></li>
|
||||||
|
</ul></div>
|
||||||
|
<div class="tabs">
|
||||||
|
<ul>
|
||||||
|
<li><a href="annotated.html"><span>Data Structures</span></a></li>
|
||||||
|
<li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
|
||||||
|
<li><a href="functions.html"><span>Data Fields</span></a></li>
|
||||||
|
</ul></div>
|
||||||
|
<h1>f0r_param_color Struct Reference<br>
|
||||||
|
<small>
|
||||||
|
[<a class="el" href="group__PARAM__TYPE.html">Parameter Types</a>]</small>
|
||||||
|
</h1><!-- doxytag: class="f0r_param_color" --><code>#include <<a class="el" href="frei0r_8h-source.html">frei0r.h</a>></code>
|
||||||
|
<p>
|
||||||
|
<table border="0" cellpadding="0" cellspacing="0">
|
||||||
|
<tr><td></td></tr>
|
||||||
|
<tr><td colspan="2"><br><h2>Data Fields</h2></td></tr>
|
||||||
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">float </td><td class="memItemRight" valign="bottom"><a class="el" href="structf0r__param__color.html#a35e508971f4fae55621e61f70a893ed">r</a></td></tr>
|
||||||
|
|
||||||
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">float </td><td class="memItemRight" valign="bottom"><a class="el" href="structf0r__param__color.html#93f2e432efe7db1c8cd39b38241810f9">g</a></td></tr>
|
||||||
|
|
||||||
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">float </td><td class="memItemRight" valign="bottom"><a class="el" href="structf0r__param__color.html#44b8f5ddd1fec1973edbff58a63683f9">b</a></td></tr>
|
||||||
|
|
||||||
|
</table>
|
||||||
|
<hr><a name="_details"></a><h2>Detailed Description</h2>
|
||||||
|
The color type. All three color components are in the range [0, 1].
|
||||||
|
<p>
|
||||||
|
<hr><h2>Field Documentation</h2>
|
||||||
|
<a class="anchor" name="44b8f5ddd1fec1973edbff58a63683f9"></a><!-- doxytag: member="f0r_param_color::b" ref="44b8f5ddd1fec1973edbff58a63683f9" args="" --><p>
|
||||||
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
||||||
|
<tr>
|
||||||
|
<td class="mdRow">
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td class="md" nowrap valign="top">float <a class="el" href="structf0r__param__color.html#44b8f5ddd1fec1973edbff58a63683f9">f0r_param_color::b</a> </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<table cellspacing="5" cellpadding="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
blue color component </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<a class="anchor" name="93f2e432efe7db1c8cd39b38241810f9"></a><!-- doxytag: member="f0r_param_color::g" ref="93f2e432efe7db1c8cd39b38241810f9" args="" --><p>
|
||||||
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
||||||
|
<tr>
|
||||||
|
<td class="mdRow">
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td class="md" nowrap valign="top">float <a class="el" href="structf0r__param__color.html#93f2e432efe7db1c8cd39b38241810f9">f0r_param_color::g</a> </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<table cellspacing="5" cellpadding="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
green color component </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<a class="anchor" name="a35e508971f4fae55621e61f70a893ed"></a><!-- doxytag: member="f0r_param_color::r" ref="a35e508971f4fae55621e61f70a893ed" args="" --><p>
|
||||||
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
||||||
|
<tr>
|
||||||
|
<td class="mdRow">
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td class="md" nowrap valign="top">float <a class="el" href="structf0r__param__color.html#a35e508971f4fae55621e61f70a893ed">f0r_param_color::r</a> </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<table cellspacing="5" cellpadding="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
red color component </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<hr>The documentation for this struct was generated from the following file:<ul>
|
||||||
|
<li>include/<a class="el" href="frei0r_8h-source.html">frei0r.h</a></ul>
|
||||||
|
<hr size="1"><address style="align: right;"><small>Generated on Wed Nov 7 12:07:53 2007 for frei0r by
|
||||||
|
<a href="http://www.doxygen.org/index.html">
|
||||||
|
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.6 </small></address>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
114
frei0r-autoconf/doc/html/structf0r__param__info.html
Normal file
@@ -0,0 +1,114 @@
|
|||||||
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||||
|
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
|
||||||
|
<title>frei0r: f0r_param_info Struct Reference</title>
|
||||||
|
<link href="doxygen.css" rel="stylesheet" type="text/css">
|
||||||
|
<link href="tabs.css" rel="stylesheet" type="text/css">
|
||||||
|
</head><body>
|
||||||
|
<!-- Generated by Doxygen 1.4.6 -->
|
||||||
|
<div class="tabs">
|
||||||
|
<ul>
|
||||||
|
<li><a href="index.html"><span>Main Page</span></a></li>
|
||||||
|
<li><a href="modules.html"><span>Modules</span></a></li>
|
||||||
|
<li id="current"><a href="annotated.html"><span>Data Structures</span></a></li>
|
||||||
|
<li><a href="files.html"><span>Files</span></a></li>
|
||||||
|
<li><a href="dirs.html"><span>Directories</span></a></li>
|
||||||
|
</ul></div>
|
||||||
|
<div class="tabs">
|
||||||
|
<ul>
|
||||||
|
<li><a href="annotated.html"><span>Data Structures</span></a></li>
|
||||||
|
<li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
|
||||||
|
<li><a href="functions.html"><span>Data Fields</span></a></li>
|
||||||
|
</ul></div>
|
||||||
|
<h1>f0r_param_info Struct Reference</h1><!-- doxytag: class="f0r_param_info" --><code>#include <<a class="el" href="frei0r_8h-source.html">frei0r.h</a>></code>
|
||||||
|
<p>
|
||||||
|
<table border="0" cellpadding="0" cellspacing="0">
|
||||||
|
<tr><td></td></tr>
|
||||||
|
<tr><td colspan="2"><br><h2>Data Fields</h2></td></tr>
|
||||||
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="structf0r__param__info.html#ff206a2bd55ec0a5f38f134a9bfa9a66">name</a></td></tr>
|
||||||
|
|
||||||
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="structf0r__param__info.html#9cff757f4e45b1235e8977a83bd1f70a">type</a></td></tr>
|
||||||
|
|
||||||
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="structf0r__param__info.html#234708bd246ba2f8aa94c6e556110cac">explanation</a></td></tr>
|
||||||
|
|
||||||
|
</table>
|
||||||
|
<hr><a name="_details"></a><h2>Detailed Description</h2>
|
||||||
|
Similar to f0r_plugin_info_t, this structure is filled by the plugin for every parameter.<p>
|
||||||
|
All strings are unicode, 0-terminated, and the encoding is utf-8.
|
||||||
|
<p>
|
||||||
|
<hr><h2>Field Documentation</h2>
|
||||||
|
<a class="anchor" name="234708bd246ba2f8aa94c6e556110cac"></a><!-- doxytag: member="f0r_param_info::explanation" ref="234708bd246ba2f8aa94c6e556110cac" args="" --><p>
|
||||||
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
||||||
|
<tr>
|
||||||
|
<td class="mdRow">
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td class="md" nowrap valign="top">const char* <a class="el" href="structf0r__param__info.html#234708bd246ba2f8aa94c6e556110cac">f0r_param_info::explanation</a> </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<table cellspacing="5" cellpadding="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Optional explanation (can be 0) </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<a class="anchor" name="ff206a2bd55ec0a5f38f134a9bfa9a66"></a><!-- doxytag: member="f0r_param_info::name" ref="ff206a2bd55ec0a5f38f134a9bfa9a66" args="" --><p>
|
||||||
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
||||||
|
<tr>
|
||||||
|
<td class="mdRow">
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td class="md" nowrap valign="top">const char* <a class="el" href="structf0r__param__info.html#ff206a2bd55ec0a5f38f134a9bfa9a66">f0r_param_info::name</a> </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<table cellspacing="5" cellpadding="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
The (short) name of the param </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<a class="anchor" name="9cff757f4e45b1235e8977a83bd1f70a"></a><!-- doxytag: member="f0r_param_info::type" ref="9cff757f4e45b1235e8977a83bd1f70a" args="" --><p>
|
||||||
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
||||||
|
<tr>
|
||||||
|
<td class="mdRow">
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td class="md" nowrap valign="top">int <a class="el" href="structf0r__param__info.html#9cff757f4e45b1235e8977a83bd1f70a">f0r_param_info::type</a> </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<table cellspacing="5" cellpadding="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
The type (see the F0R_PARAM_* defines) </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<hr>The documentation for this struct was generated from the following file:<ul>
|
||||||
|
<li>include/<a class="el" href="frei0r_8h-source.html">frei0r.h</a></ul>
|
||||||
|
<hr size="1"><address style="align: right;"><small>Generated on Wed Nov 7 12:07:53 2007 for frei0r by
|
||||||
|
<a href="http://www.doxygen.org/index.html">
|
||||||
|
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.6 </small></address>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
91
frei0r-autoconf/doc/html/structf0r__param__position.html
Normal file
@@ -0,0 +1,91 @@
|
|||||||
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||||
|
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
|
||||||
|
<title>frei0r: f0r_param_position Struct Reference</title>
|
||||||
|
<link href="doxygen.css" rel="stylesheet" type="text/css">
|
||||||
|
<link href="tabs.css" rel="stylesheet" type="text/css">
|
||||||
|
</head><body>
|
||||||
|
<!-- Generated by Doxygen 1.4.6 -->
|
||||||
|
<div class="tabs">
|
||||||
|
<ul>
|
||||||
|
<li><a href="index.html"><span>Main Page</span></a></li>
|
||||||
|
<li><a href="modules.html"><span>Modules</span></a></li>
|
||||||
|
<li id="current"><a href="annotated.html"><span>Data Structures</span></a></li>
|
||||||
|
<li><a href="files.html"><span>Files</span></a></li>
|
||||||
|
<li><a href="dirs.html"><span>Directories</span></a></li>
|
||||||
|
</ul></div>
|
||||||
|
<div class="tabs">
|
||||||
|
<ul>
|
||||||
|
<li><a href="annotated.html"><span>Data Structures</span></a></li>
|
||||||
|
<li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
|
||||||
|
<li><a href="functions.html"><span>Data Fields</span></a></li>
|
||||||
|
</ul></div>
|
||||||
|
<h1>f0r_param_position Struct Reference<br>
|
||||||
|
<small>
|
||||||
|
[<a class="el" href="group__PARAM__TYPE.html">Parameter Types</a>]</small>
|
||||||
|
</h1><!-- doxytag: class="f0r_param_position" --><code>#include <<a class="el" href="frei0r_8h-source.html">frei0r.h</a>></code>
|
||||||
|
<p>
|
||||||
|
<table border="0" cellpadding="0" cellspacing="0">
|
||||||
|
<tr><td></td></tr>
|
||||||
|
<tr><td colspan="2"><br><h2>Data Fields</h2></td></tr>
|
||||||
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">double </td><td class="memItemRight" valign="bottom"><a class="el" href="structf0r__param__position.html#e5a45dcf230da7d9fb5b4cce32a3905d">x</a></td></tr>
|
||||||
|
|
||||||
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">double </td><td class="memItemRight" valign="bottom"><a class="el" href="structf0r__param__position.html#6c5092cea095e0d7c42825415d78f432">y</a></td></tr>
|
||||||
|
|
||||||
|
</table>
|
||||||
|
<hr><a name="_details"></a><h2>Detailed Description</h2>
|
||||||
|
The position type. Both position coordinates are in the range [0, 1].
|
||||||
|
<p>
|
||||||
|
<hr><h2>Field Documentation</h2>
|
||||||
|
<a class="anchor" name="e5a45dcf230da7d9fb5b4cce32a3905d"></a><!-- doxytag: member="f0r_param_position::x" ref="e5a45dcf230da7d9fb5b4cce32a3905d" args="" --><p>
|
||||||
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
||||||
|
<tr>
|
||||||
|
<td class="mdRow">
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td class="md" nowrap valign="top">double <a class="el" href="structf0r__param__position.html#e5a45dcf230da7d9fb5b4cce32a3905d">f0r_param_position::x</a> </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<table cellspacing="5" cellpadding="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
x coordinate </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<a class="anchor" name="6c5092cea095e0d7c42825415d78f432"></a><!-- doxytag: member="f0r_param_position::y" ref="6c5092cea095e0d7c42825415d78f432" args="" --><p>
|
||||||
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
||||||
|
<tr>
|
||||||
|
<td class="mdRow">
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td class="md" nowrap valign="top">double <a class="el" href="structf0r__param__position.html#6c5092cea095e0d7c42825415d78f432">f0r_param_position::y</a> </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<table cellspacing="5" cellpadding="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
y coordinate </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<hr>The documentation for this struct was generated from the following file:<ul>
|
||||||
|
<li>include/<a class="el" href="frei0r_8h-source.html">frei0r.h</a></ul>
|
||||||
|
<hr size="1"><address style="align: right;"><small>Generated on Wed Nov 7 12:07:53 2007 for frei0r by
|
||||||
|
<a href="http://www.doxygen.org/index.html">
|
||||||
|
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.6 </small></address>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
267
frei0r-autoconf/doc/html/structf0r__plugin__info.html
Normal file
@@ -0,0 +1,267 @@
|
|||||||
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||||
|
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
|
||||||
|
<title>frei0r: f0r_plugin_info Struct Reference</title>
|
||||||
|
<link href="doxygen.css" rel="stylesheet" type="text/css">
|
||||||
|
<link href="tabs.css" rel="stylesheet" type="text/css">
|
||||||
|
</head><body>
|
||||||
|
<!-- Generated by Doxygen 1.4.6 -->
|
||||||
|
<div class="tabs">
|
||||||
|
<ul>
|
||||||
|
<li><a href="index.html"><span>Main Page</span></a></li>
|
||||||
|
<li><a href="modules.html"><span>Modules</span></a></li>
|
||||||
|
<li id="current"><a href="annotated.html"><span>Data Structures</span></a></li>
|
||||||
|
<li><a href="files.html"><span>Files</span></a></li>
|
||||||
|
<li><a href="dirs.html"><span>Directories</span></a></li>
|
||||||
|
</ul></div>
|
||||||
|
<div class="tabs">
|
||||||
|
<ul>
|
||||||
|
<li><a href="annotated.html"><span>Data Structures</span></a></li>
|
||||||
|
<li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
|
||||||
|
<li><a href="functions.html"><span>Data Fields</span></a></li>
|
||||||
|
</ul></div>
|
||||||
|
<h1>f0r_plugin_info Struct Reference</h1><!-- doxytag: class="f0r_plugin_info" --><code>#include <<a class="el" href="frei0r_8h-source.html">frei0r.h</a>></code>
|
||||||
|
<p>
|
||||||
|
<table border="0" cellpadding="0" cellspacing="0">
|
||||||
|
<tr><td></td></tr>
|
||||||
|
<tr><td colspan="2"><br><h2>Data Fields</h2></td></tr>
|
||||||
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="structf0r__plugin__info.html#6e9916e14a3871987c66964a89b18c5d">name</a></td></tr>
|
||||||
|
|
||||||
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="structf0r__plugin__info.html#c6ad807a9ac439e57e7410dd699add6f">author</a></td></tr>
|
||||||
|
|
||||||
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="structf0r__plugin__info.html#e57fd00690e5f90609120cff276c3ead">plugin_type</a></td></tr>
|
||||||
|
|
||||||
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="structf0r__plugin__info.html#0b1238f47fe6600243e500446568bb4e">color_model</a></td></tr>
|
||||||
|
|
||||||
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="structf0r__plugin__info.html#ac89e4129172023e153c952259373149">frei0r_version</a></td></tr>
|
||||||
|
|
||||||
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="structf0r__plugin__info.html#87ea44cd95f93b3c367d3dcec556deb3">major_version</a></td></tr>
|
||||||
|
|
||||||
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="structf0r__plugin__info.html#bfa71a212ece4e0af3d4a8c3f4fa55ca">minor_version</a></td></tr>
|
||||||
|
|
||||||
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="structf0r__plugin__info.html#92cf99cadc76b90d2ac908e367c2c92f">num_params</a></td></tr>
|
||||||
|
|
||||||
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="structf0r__plugin__info.html#9df1154eb490f9ba53bcbd4800a8cc3e">explanation</a></td></tr>
|
||||||
|
|
||||||
|
</table>
|
||||||
|
<hr><a name="_details"></a><h2>Detailed Description</h2>
|
||||||
|
The f0r_plugin_info_t structure is filled in by the plugin to tell the application about its name, type, number of parameters, and version.<p>
|
||||||
|
An application should ignore (i.e. not use) frei0r effects that have unknown values in the plugin_type or color_model field. It should also ignore effects with a too high frei0r_version.<p>
|
||||||
|
This is necessary to be able to extend the frei0r spec (e.g. by adding new color models or plugin types) in a way that does not result in crashes when loading effects that make use of these extensions into an older application.<p>
|
||||||
|
All strings are unicode, 0-terminated, and the encoding is utf-8.
|
||||||
|
<p>
|
||||||
|
<hr><h2>Field Documentation</h2>
|
||||||
|
<a class="anchor" name="c6ad807a9ac439e57e7410dd699add6f"></a><!-- doxytag: member="f0r_plugin_info::author" ref="c6ad807a9ac439e57e7410dd699add6f" args="" --><p>
|
||||||
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
||||||
|
<tr>
|
||||||
|
<td class="mdRow">
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td class="md" nowrap valign="top">const char* <a class="el" href="structf0r__plugin__info.html#c6ad807a9ac439e57e7410dd699add6f">f0r_plugin_info::author</a> </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<table cellspacing="5" cellpadding="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
The plugin author </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<a class="anchor" name="0b1238f47fe6600243e500446568bb4e"></a><!-- doxytag: member="f0r_plugin_info::color_model" ref="0b1238f47fe6600243e500446568bb4e" args="" --><p>
|
||||||
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
||||||
|
<tr>
|
||||||
|
<td class="mdRow">
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td class="md" nowrap valign="top">int <a class="el" href="structf0r__plugin__info.html#0b1238f47fe6600243e500446568bb4e">f0r_plugin_info::color_model</a> </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<table cellspacing="5" cellpadding="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
The color model used </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<a class="anchor" name="9df1154eb490f9ba53bcbd4800a8cc3e"></a><!-- doxytag: member="f0r_plugin_info::explanation" ref="9df1154eb490f9ba53bcbd4800a8cc3e" args="" --><p>
|
||||||
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
||||||
|
<tr>
|
||||||
|
<td class="mdRow">
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td class="md" nowrap valign="top">const char* <a class="el" href="structf0r__plugin__info.html#9df1154eb490f9ba53bcbd4800a8cc3e">f0r_plugin_info::explanation</a> </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<table cellspacing="5" cellpadding="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
An optional explanation string </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<a class="anchor" name="ac89e4129172023e153c952259373149"></a><!-- doxytag: member="f0r_plugin_info::frei0r_version" ref="ac89e4129172023e153c952259373149" args="" --><p>
|
||||||
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
||||||
|
<tr>
|
||||||
|
<td class="mdRow">
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td class="md" nowrap valign="top">int <a class="el" href="structf0r__plugin__info.html#ac89e4129172023e153c952259373149">f0r_plugin_info::frei0r_version</a> </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<table cellspacing="5" cellpadding="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
The frei0r major version this plugin is built for </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<a class="anchor" name="87ea44cd95f93b3c367d3dcec556deb3"></a><!-- doxytag: member="f0r_plugin_info::major_version" ref="87ea44cd95f93b3c367d3dcec556deb3" args="" --><p>
|
||||||
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
||||||
|
<tr>
|
||||||
|
<td class="mdRow">
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td class="md" nowrap valign="top">int <a class="el" href="structf0r__plugin__info.html#87ea44cd95f93b3c367d3dcec556deb3">f0r_plugin_info::major_version</a> </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<table cellspacing="5" cellpadding="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
The major version of the plugin </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<a class="anchor" name="bfa71a212ece4e0af3d4a8c3f4fa55ca"></a><!-- doxytag: member="f0r_plugin_info::minor_version" ref="bfa71a212ece4e0af3d4a8c3f4fa55ca" args="" --><p>
|
||||||
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
||||||
|
<tr>
|
||||||
|
<td class="mdRow">
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td class="md" nowrap valign="top">int <a class="el" href="structf0r__plugin__info.html#bfa71a212ece4e0af3d4a8c3f4fa55ca">f0r_plugin_info::minor_version</a> </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<table cellspacing="5" cellpadding="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
The minor version of the plugin </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<a class="anchor" name="6e9916e14a3871987c66964a89b18c5d"></a><!-- doxytag: member="f0r_plugin_info::name" ref="6e9916e14a3871987c66964a89b18c5d" args="" --><p>
|
||||||
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
||||||
|
<tr>
|
||||||
|
<td class="mdRow">
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td class="md" nowrap valign="top">const char* <a class="el" href="structf0r__plugin__info.html#6e9916e14a3871987c66964a89b18c5d">f0r_plugin_info::name</a> </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<table cellspacing="5" cellpadding="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
The (short) name of the plugin </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<a class="anchor" name="92cf99cadc76b90d2ac908e367c2c92f"></a><!-- doxytag: member="f0r_plugin_info::num_params" ref="92cf99cadc76b90d2ac908e367c2c92f" args="" --><p>
|
||||||
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
||||||
|
<tr>
|
||||||
|
<td class="mdRow">
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td class="md" nowrap valign="top">int <a class="el" href="structf0r__plugin__info.html#92cf99cadc76b90d2ac908e367c2c92f">f0r_plugin_info::num_params</a> </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<table cellspacing="5" cellpadding="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
The number of parameters of the plugin </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<a class="anchor" name="e57fd00690e5f90609120cff276c3ead"></a><!-- doxytag: member="f0r_plugin_info::plugin_type" ref="e57fd00690e5f90609120cff276c3ead" args="" --><p>
|
||||||
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
||||||
|
<tr>
|
||||||
|
<td class="mdRow">
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td class="md" nowrap valign="top">int <a class="el" href="structf0r__plugin__info.html#e57fd00690e5f90609120cff276c3ead">f0r_plugin_info::plugin_type</a> </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<table cellspacing="5" cellpadding="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
The plugin type <dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__PLUGIN__TYPE.html">Type of the Plugin</a> </dd></dl>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<hr>The documentation for this struct was generated from the following file:<ul>
|
||||||
|
<li>include/<a class="el" href="frei0r_8h-source.html">frei0r.h</a></ul>
|
||||||
|
<hr size="1"><address style="align: right;"><small>Generated on Wed Nov 7 12:07:53 2007 for frei0r by
|
||||||
|
<a href="http://www.doxygen.org/index.html">
|
||||||
|
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.6 </small></address>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
BIN
frei0r-autoconf/doc/html/tab_b.gif
Normal file
|
After Width: | Height: | Size: 35 B |
BIN
frei0r-autoconf/doc/html/tab_l.gif
Normal file
|
After Width: | Height: | Size: 706 B |
BIN
frei0r-autoconf/doc/html/tab_r.gif
Normal file
|
After Width: | Height: | Size: 2.5 KiB |
102
frei0r-autoconf/doc/html/tabs.css
Normal file
@@ -0,0 +1,102 @@
|
|||||||
|
/* tabs styles, based on http://www.alistapart.com/articles/slidingdoors */
|
||||||
|
|
||||||
|
DIV.tabs
|
||||||
|
{
|
||||||
|
float : left;
|
||||||
|
width : 100%;
|
||||||
|
background : url("tab_b.gif") repeat-x bottom;
|
||||||
|
margin-bottom : 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
DIV.tabs UL
|
||||||
|
{
|
||||||
|
margin : 0px;
|
||||||
|
padding-left : 10px;
|
||||||
|
list-style : none;
|
||||||
|
}
|
||||||
|
|
||||||
|
DIV.tabs LI, DIV.tabs FORM
|
||||||
|
{
|
||||||
|
display : inline;
|
||||||
|
margin : 0px;
|
||||||
|
padding : 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
DIV.tabs FORM
|
||||||
|
{
|
||||||
|
float : right;
|
||||||
|
}
|
||||||
|
|
||||||
|
DIV.tabs A
|
||||||
|
{
|
||||||
|
float : left;
|
||||||
|
background : url("tab_r.gif") no-repeat right top;
|
||||||
|
border-bottom : 1px solid #84B0C7;
|
||||||
|
font-size : x-small;
|
||||||
|
font-weight : bold;
|
||||||
|
text-decoration : none;
|
||||||
|
}
|
||||||
|
|
||||||
|
DIV.tabs A:hover
|
||||||
|
{
|
||||||
|
background-position: 100% -150px;
|
||||||
|
}
|
||||||
|
|
||||||
|
DIV.tabs A:link, DIV.tabs A:visited,
|
||||||
|
DIV.tabs A:active, DIV.tabs A:hover
|
||||||
|
{
|
||||||
|
color: #1A419D;
|
||||||
|
}
|
||||||
|
|
||||||
|
DIV.tabs SPAN
|
||||||
|
{
|
||||||
|
float : left;
|
||||||
|
display : block;
|
||||||
|
background : url("tab_l.gif") no-repeat left top;
|
||||||
|
padding : 5px 9px;
|
||||||
|
white-space : nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
DIV.tabs INPUT
|
||||||
|
{
|
||||||
|
float : right;
|
||||||
|
display : inline;
|
||||||
|
font-size : 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
DIV.tabs TD
|
||||||
|
{
|
||||||
|
font-size : x-small;
|
||||||
|
font-weight : bold;
|
||||||
|
text-decoration : none;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* Commented Backslash Hack hides rule from IE5-Mac \*/
|
||||||
|
DIV.tabs SPAN {float : none;}
|
||||||
|
/* End IE5-Mac hack */
|
||||||
|
|
||||||
|
DIV.tabs A:hover SPAN
|
||||||
|
{
|
||||||
|
background-position: 0% -150px;
|
||||||
|
}
|
||||||
|
|
||||||
|
DIV.tabs LI#current A
|
||||||
|
{
|
||||||
|
background-position: 100% -150px;
|
||||||
|
border-width : 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
DIV.tabs LI#current SPAN
|
||||||
|
{
|
||||||
|
background-position: 0% -150px;
|
||||||
|
padding-bottom : 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
DIV.nav
|
||||||
|
{
|
||||||
|
background : none;
|
||||||
|
border : none;
|
||||||
|
border-bottom : 1px solid #84B0C7;
|
||||||
|
}
|
||||||
12
frei0r-autoconf/include/Makefile.am
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
# Copyright (C) 2007 Richard Spindler <richard.spindler AT gmail.com>
|
||||||
|
#
|
||||||
|
# This file is free software; as a special exception the author gives
|
||||||
|
# unlimited permission to copy and/or distribute it, with or without
|
||||||
|
# modifications, as long as this notice is preserved.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful, but
|
||||||
|
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
|
||||||
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
include_HEADERS = frei0r.h
|
||||||
|
noinst_HEADERS = frei0r_colorspace.h frei0r.hpp frei0r_math.h
|
||||||
567
frei0r-autoconf/include/frei0r.h
Normal file
@@ -0,0 +1,567 @@
|
|||||||
|
/** @mainpage frei0r - a minimalistic plugin API for video effects
|
||||||
|
*
|
||||||
|
* @section sec_intro Introduction
|
||||||
|
*
|
||||||
|
* This is frei0r - a minimalistic plugin API for video effects.
|
||||||
|
*
|
||||||
|
* The main emphasis is on simplicity - there are many different applications
|
||||||
|
* that use video effects, and they all have different requirements regarding
|
||||||
|
* their internal plugin API. And that's why frei0r does not try to be a
|
||||||
|
* one-in-all general video plugin API, but instead an API for the most
|
||||||
|
* common video effects: simple filters, sources and mixers that can be
|
||||||
|
* controlled by parameters.
|
||||||
|
*
|
||||||
|
* It's our hope that this way these simple effects can be shared between
|
||||||
|
* many applications, avoiding their reimplementation by different
|
||||||
|
* projects.
|
||||||
|
*
|
||||||
|
* On the other hand, this is not meant as a competing standard to
|
||||||
|
* more ambitious efforts that try to satisfy the needs of many different
|
||||||
|
* applications and more complex effects.
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @section sec_overview Overview
|
||||||
|
*
|
||||||
|
* If you are new to frei0r, the best thing is probably to have
|
||||||
|
* a look at the <a href="frei0r_8h-source.html">frei0r header</a>,
|
||||||
|
* which is quite simple.
|
||||||
|
*
|
||||||
|
* After that, you might want to look at the
|
||||||
|
* <a href="frei0r_8h.html">frei0r functions</a> in more detail.
|
||||||
|
*
|
||||||
|
* When developing a new frei0r effect, you have to choose
|
||||||
|
* - which effect type to use (\ref PLUGIN_TYPE),
|
||||||
|
* - which color model to use (\ref COLOR_MODEL), and
|
||||||
|
* - which parameter types (\ref PARAM_TYPE) your effect will support.
|
||||||
|
*
|
||||||
|
* To round things up, you should decide whether your effect should have
|
||||||
|
* an associated icon (\ref icons), and where it will be installed
|
||||||
|
* (\ref pluglocations).
|
||||||
|
*
|
||||||
|
* @section sec_changes Changes
|
||||||
|
*
|
||||||
|
* @subsection sec_changes_1_0_1_1 From frei0r 1.0 to frei0r 1.1
|
||||||
|
*
|
||||||
|
* - added specifications for plugin locations
|
||||||
|
* - added specifications for frei0r icons
|
||||||
|
* - added RGBA8888 color model
|
||||||
|
* - added packed32 color model
|
||||||
|
* - added better specification of color models
|
||||||
|
* - added string type
|
||||||
|
* - added bounds to resolution (8 <= width, height <= 2048)
|
||||||
|
* - width and height must be an integer multiple of 8
|
||||||
|
* - frame data must be 16 byte aligned
|
||||||
|
* - improved update specification (must not change parameters,
|
||||||
|
* must restore fpu state)
|
||||||
|
* - added note for applications to ignore effects with unknown fields
|
||||||
|
* - added new plugin types mixer2 and mixer3
|
||||||
|
* - added section about \ref concurrency
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \addtogroup pluglocations Plugin Locations
|
||||||
|
* @section sec_pluglocations Plugin Locations
|
||||||
|
*
|
||||||
|
* For Unix platforms there are rules for the location of frei0r plugins.
|
||||||
|
*
|
||||||
|
* frei0r 1.x plugin files should be located in
|
||||||
|
*
|
||||||
|
* - (1) /usr/lib/frei0r-1/\<vendor\>
|
||||||
|
* - (2) /usr/local/lib/frei0r-1/\<vendor\>
|
||||||
|
* - (3) $HOME/.frei0r-1/lib/\<vendor\>
|
||||||
|
*
|
||||||
|
* Examples:
|
||||||
|
*
|
||||||
|
* - /usr/lib/frei0r-1/mob/flippo.so
|
||||||
|
* - /usr/lib/frei0r-1/drone/flippo.so
|
||||||
|
* - /usr/local/lib/frei0r-1/gephex/coma/invert0r.so
|
||||||
|
* - /home/martin/.frei0r-1/lib/martin/test.so
|
||||||
|
*
|
||||||
|
* Like in these examples plugins should be placed in "vendor" subdirs
|
||||||
|
* to reduce name clashes.
|
||||||
|
*
|
||||||
|
* @subsection sec_order Plugin Loading Order
|
||||||
|
*
|
||||||
|
* The application shall load plugins in the following order: 3, 2, 1.
|
||||||
|
* If a name clash occurs (two or more frei0r plugins with identical
|
||||||
|
* effect name), the plugins in directory 3 have precedence over plugins
|
||||||
|
* in directory 2, and those in directory 2 have precedence over plugins
|
||||||
|
* in directory 1.
|
||||||
|
*
|
||||||
|
* This makes it possible for users to "override" effects that are
|
||||||
|
* installed in system wide directories by placing plugins in their
|
||||||
|
* home directory.
|
||||||
|
*
|
||||||
|
* The order of loading plugins inside each of the directories
|
||||||
|
* 1, 2, and 3 is not defined.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
*\addtogroup icons Icons for frei0r effects
|
||||||
|
* @section sec_icons Icons for frei0r effects
|
||||||
|
*
|
||||||
|
* Each frei0r effect can have an associated icon.
|
||||||
|
*
|
||||||
|
* @subsection sec_icon_format Icon Format
|
||||||
|
*
|
||||||
|
* The format of frei0r icons must be png.
|
||||||
|
* Recommended resolution is 64x64.
|
||||||
|
* The icon filename of an effect with effect name "frei0r"
|
||||||
|
* must be "frei0r.png".
|
||||||
|
*
|
||||||
|
* @subsection sec_icon_location Icon location
|
||||||
|
*
|
||||||
|
* The exact location where the application should look for the
|
||||||
|
* plugin is platform dependant.
|
||||||
|
*
|
||||||
|
* For Windows platforms, the icon should be at the same place as
|
||||||
|
* the plugin containing the effect.
|
||||||
|
*
|
||||||
|
* For Unix platforms, the following mapping from plugin location
|
||||||
|
* to icon location must be used:
|
||||||
|
*
|
||||||
|
* Let \<plugin_path\>/\<plugin\> be a frei0r plugin with name \<effect_name\>.
|
||||||
|
* Then the corresponding icon (if any) shall be located in
|
||||||
|
* \<icon_path\>/\<effect_name\>.png.
|
||||||
|
* \<icon_path\> can be obtained in the following way:
|
||||||
|
*
|
||||||
|
* @verbatim
|
||||||
|
<plugin_path> | <icon_path>
|
||||||
|
----------------------------------------------------------------------------
|
||||||
|
$HOME/.frei0r-1/lib/<vendor> | $HOME/.frei0r-1/icons/<vendor>
|
||||||
|
/usr/local/lib/frei0r-1/<vendor> | /usr/local/share/frei0r-1/icons/<vendor>
|
||||||
|
/usr/lib/frei0r-1/<vendor> | /usr/share/frei0r-1/icons/<vendor>
|
||||||
|
* | <plugin_path>
|
||||||
|
@endverbatim
|
||||||
|
*
|
||||||
|
* (The wildcard '*' stands for any other plugin_path)
|
||||||
|
*
|
||||||
|
* For other platforms, no location is defined. We recommend to use the
|
||||||
|
* plugin path where possible.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \addtogroup concurrency Concurrency
|
||||||
|
* @section sec_concurrency Concurrency
|
||||||
|
*
|
||||||
|
* - \ref f0r_init
|
||||||
|
* - \ref f0r_deinit
|
||||||
|
*
|
||||||
|
* These methods must not be called more than once. It is obvious that no
|
||||||
|
* concurrent calls are allowed.
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* - \ref f0r_get_plugin_info
|
||||||
|
* - \ref f0r_get_param_info
|
||||||
|
* - \ref f0r_construct
|
||||||
|
* - \ref f0r_destruct
|
||||||
|
*
|
||||||
|
* Concurrent calls of these functions are allowed.
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* - \ref f0r_set_param_value
|
||||||
|
* - \ref f0r_get_param_value
|
||||||
|
* - \ref f0r_update
|
||||||
|
* - \ref f0r_update2
|
||||||
|
*
|
||||||
|
* If a thread is in one of these methods its allowed for another thread to
|
||||||
|
* enter one of theses methods for a different effect instance. But for one
|
||||||
|
* effect instance only one thread is allowed to execute any of these methods.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/** \file
|
||||||
|
* \brief This file defines the frei0r api, version 1.1.
|
||||||
|
*
|
||||||
|
* A conforming plugin must implement and export all functions declared in
|
||||||
|
* this header.
|
||||||
|
*
|
||||||
|
* A conforming application must accept only those plugins which use
|
||||||
|
* allowed values for the described fields.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef INCLUDED_FREI0R_H
|
||||||
|
#define INCLUDED_FREI0R_H
|
||||||
|
|
||||||
|
#include <inttypes.h>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The frei0r API major version
|
||||||
|
*/
|
||||||
|
#define FREI0R_MAJOR_VERSION 1
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The frei0r API minor version
|
||||||
|
*/
|
||||||
|
#define FREI0R_MINOR_VERSION 1
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
/**
|
||||||
|
* f0r_init() is called once when the plugin is loaded by the application.
|
||||||
|
* \see f0r_deinit
|
||||||
|
*/
|
||||||
|
int f0r_init();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* f0r_deinit is called once when the plugin is unloaded by the application.
|
||||||
|
* \see f0r_init
|
||||||
|
*/
|
||||||
|
void f0r_deinit();
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
/** \addtogroup PLUGIN_TYPE Type of the Plugin
|
||||||
|
* These defines determine whether the plugin is a
|
||||||
|
* source, a filter or one of the two mixer types
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** one input and one output */
|
||||||
|
#define F0R_PLUGIN_TYPE_FILTER 0
|
||||||
|
/** just one output */
|
||||||
|
#define F0R_PLUGIN_TYPE_SOURCE 1
|
||||||
|
/** two inputs and one output */
|
||||||
|
#define F0R_PLUGIN_TYPE_MIXER2 2
|
||||||
|
/** three inputs and one output */
|
||||||
|
#define F0R_PLUGIN_TYPE_MIXER3 3
|
||||||
|
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
/** \addtogroup COLOR_MODEL Color Models
|
||||||
|
* List of supported color models.
|
||||||
|
*
|
||||||
|
* Note: the color models are endian independent, because the
|
||||||
|
* color components are defined by their positon in memory, not
|
||||||
|
* by their significance in an uint32_t value.
|
||||||
|
*
|
||||||
|
* For effects that work on the color components,
|
||||||
|
* RGBA8888 is the recommended color model for frei0r-1.1 effects.
|
||||||
|
* For effects that only work on pixels, PACKED32 is the recommended
|
||||||
|
* color model since it helps the application to avoid unnecessary
|
||||||
|
* color conversions.
|
||||||
|
*
|
||||||
|
* Effects can choose an appropriate color model, applications must support
|
||||||
|
* all color models and do conversions if necessary. Source effects
|
||||||
|
* must not use the PACKED32 color model because the application must know
|
||||||
|
* in which color model the created framebuffers are represented.
|
||||||
|
*
|
||||||
|
* For each color model, a frame consists of width*height pixels which
|
||||||
|
* are stored row-wise and consecutively in memory. The size of a pixel is
|
||||||
|
* 4 bytes. There is no extra pitch parameter
|
||||||
|
* (i.e. the pitch is simply width*4).
|
||||||
|
*
|
||||||
|
* The following additional constraints must be honored:
|
||||||
|
* - The top-most line of a frame is stored first in memory.
|
||||||
|
* - A frame must be aligned to a 16 byte border in memory.
|
||||||
|
* - The width and height of a frame must be positive
|
||||||
|
* - The width and height of a frame must be integer multiples of 8
|
||||||
|
*
|
||||||
|
* These constraints make sure that each line is stored at an address aligned
|
||||||
|
* to 16 byte.
|
||||||
|
*/
|
||||||
|
/*@{*/
|
||||||
|
/**
|
||||||
|
* In BGRA8888, each pixel is represented by 4 consecutive
|
||||||
|
* unsigned bytes, where the first byte value represents
|
||||||
|
* the blue, the second the green, and the third the red color
|
||||||
|
* component of the pixel. The last value represents the
|
||||||
|
* alpha value.
|
||||||
|
*/
|
||||||
|
#define F0R_COLOR_MODEL_BGRA8888 0
|
||||||
|
|
||||||
|
/**
|
||||||
|
* In RGBA8888, each pixel is represented by 4 consecutive
|
||||||
|
* unsigned bytes, where the first byte value represents
|
||||||
|
* the red, the second the green, and the third the blue color
|
||||||
|
* component of the pixel. The last value represents the
|
||||||
|
* alpha value.
|
||||||
|
*/
|
||||||
|
#define F0R_COLOR_MODEL_RGBA8888 1
|
||||||
|
|
||||||
|
/**
|
||||||
|
* In PACKED32, each pixel is represented by 4 consecutive
|
||||||
|
* bytes, but it is not defined how the color componets are
|
||||||
|
* stored. The true color format could be RGBA8888,
|
||||||
|
* BGRA8888, a packed 32 bit YUV format, or any other
|
||||||
|
* color format that stores pixels in 32 bit.
|
||||||
|
*
|
||||||
|
* This is useful for effects that don't work on color but
|
||||||
|
* only on pixels (for example a mirror effect).
|
||||||
|
*
|
||||||
|
* Note that source effects must not use this color model.
|
||||||
|
*/
|
||||||
|
#define F0R_COLOR_MODEL_PACKED32 2
|
||||||
|
/*@}*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The f0r_plugin_info_t structure is filled in by the plugin
|
||||||
|
* to tell the application about its name, type, number of parameters,
|
||||||
|
* and version.
|
||||||
|
*
|
||||||
|
* An application should ignore (i.e. not use) frei0r effects that
|
||||||
|
* have unknown values in the plugin_type or color_model field.
|
||||||
|
* It should also ignore effects with a too high frei0r_version.
|
||||||
|
*
|
||||||
|
* This is necessary to be able to extend the frei0r spec (e.g.
|
||||||
|
* by adding new color models or plugin types) in a way that does not
|
||||||
|
* result in crashes when loading effects that make use of these
|
||||||
|
* extensions into an older application.
|
||||||
|
*
|
||||||
|
* All strings are unicode, 0-terminated, and the encoding is utf-8.
|
||||||
|
*/
|
||||||
|
typedef struct f0r_plugin_info
|
||||||
|
{
|
||||||
|
const char* name; /**< The (short) name of the plugin */
|
||||||
|
const char* author; /**< The plugin author */
|
||||||
|
/** The plugin type
|
||||||
|
* \see PLUGIN_TYPE
|
||||||
|
*/
|
||||||
|
int plugin_type;
|
||||||
|
int color_model; /**< The color model used */
|
||||||
|
int frei0r_version; /**< The frei0r major version this plugin is built for*/
|
||||||
|
int major_version; /**< The major version of the plugin */
|
||||||
|
int minor_version; /**< The minor version of the plugin */
|
||||||
|
int num_params; /**< The number of parameters of the plugin */
|
||||||
|
const char* explanation; /**< An optional explanation string */
|
||||||
|
} f0r_plugin_info_t;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Is called once after init. The plugin has to fill in the values in info.
|
||||||
|
*
|
||||||
|
* \param info Pointer to an info struct allocated by the application.
|
||||||
|
*/
|
||||||
|
void f0r_get_plugin_info(f0r_plugin_info_t* info);
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
/** \addtogroup PARAM_TYPE Parameter Types
|
||||||
|
*
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Parameter type for boolean values
|
||||||
|
* \see f0r_param_bool
|
||||||
|
*/
|
||||||
|
#define F0R_PARAM_BOOL 0
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Parameter type for doubles
|
||||||
|
* \see f0r_param_double
|
||||||
|
*/
|
||||||
|
#define F0R_PARAM_DOUBLE 1
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Parameter type for color
|
||||||
|
* \see f0r_param_color
|
||||||
|
*/
|
||||||
|
#define F0R_PARAM_COLOR 2
|
||||||
|
/**
|
||||||
|
* Parameter type for position
|
||||||
|
* \see f0r_param_position
|
||||||
|
*/
|
||||||
|
#define F0R_PARAM_POSITION 3
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Parameter type for string
|
||||||
|
* \see f0r_param_string
|
||||||
|
*/
|
||||||
|
#define F0R_PARAM_STRING 4
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The boolean type. The allowed range of values is [0, 1].
|
||||||
|
* [0, 0.5[ is mapped to false and [0.5, 1] is mapped to true.
|
||||||
|
*/
|
||||||
|
typedef double f0r_param_bool;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The double type. The allowed range of values is [0, 1].
|
||||||
|
*/
|
||||||
|
typedef double f0r_param_double;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The color type. All three color components are in the range [0, 1].
|
||||||
|
*/
|
||||||
|
typedef struct f0r_param_color
|
||||||
|
{
|
||||||
|
float r; /**< red color component */
|
||||||
|
float g; /**< green color component */
|
||||||
|
float b; /**< blue color component */
|
||||||
|
} f0r_param_color_t;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The position type. Both position coordinates are in the range [0, 1].
|
||||||
|
*/
|
||||||
|
typedef struct f0r_param_position
|
||||||
|
{
|
||||||
|
double x; /**< x coordinate */
|
||||||
|
double y; /**< y coordinate */
|
||||||
|
} f0r_param_position_t;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The string type.
|
||||||
|
* Zero terminated array of 8-bit values in utf-8 encoding
|
||||||
|
*/
|
||||||
|
typedef char f0r_param_string;
|
||||||
|
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Similar to f0r_plugin_info_t, this structure is filled by the plugin
|
||||||
|
* for every parameter.
|
||||||
|
*
|
||||||
|
* All strings are unicode, 0-terminated, and the encoding is utf-8.
|
||||||
|
*/
|
||||||
|
typedef struct f0r_param_info
|
||||||
|
{
|
||||||
|
const char* name; /**<The (short) name of the param */
|
||||||
|
int type; /**<The type (see the F0R_PARAM_* defines) */
|
||||||
|
const char* explanation; /**<Optional explanation (can be 0) */
|
||||||
|
} f0r_param_info_t;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* f0r_get_param_info is called by the application to query the type of
|
||||||
|
* each parameter.
|
||||||
|
*
|
||||||
|
* \param info is allocated by the application and filled by the plugin
|
||||||
|
* \param param_index the index of the parameter to be queried (from 0 to
|
||||||
|
* num_params-1)
|
||||||
|
*/
|
||||||
|
void f0r_get_param_info(f0r_param_info_t* info, int param_index);
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Transparent instance pointer of the frei0r effect.
|
||||||
|
*/
|
||||||
|
typedef void* f0r_instance_t;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor for effect instances. The plugin returns a pointer to
|
||||||
|
* its internal instance structure.
|
||||||
|
*
|
||||||
|
* The resolution has to be an integer multiple of 8,
|
||||||
|
* must be greater than 0 and be at most 2048 in both dimensions.
|
||||||
|
*
|
||||||
|
* \param width The x-resolution of the processed video frames
|
||||||
|
* \param height The y-resolution of the processed video frames
|
||||||
|
* \returns 0 on failure or a pointer != 0 on success
|
||||||
|
*
|
||||||
|
* \see f0r_destruct
|
||||||
|
*/
|
||||||
|
f0r_instance_t f0r_construct(unsigned int width, unsigned int height);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Destroys an effect instance.
|
||||||
|
*
|
||||||
|
* \param instance The pointer to the plugins internal instance structure.
|
||||||
|
*
|
||||||
|
* \see f0r_construct
|
||||||
|
*/
|
||||||
|
void f0r_destruct(f0r_instance_t instance);
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Transparent parameter handle.
|
||||||
|
*/
|
||||||
|
typedef void* f0r_param_t;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This function allows the application to set the parameter values of an
|
||||||
|
* effect instance. Validity of the parameter pointer is handled by the
|
||||||
|
* application thus the data must be copied by the effect.
|
||||||
|
*
|
||||||
|
* \param instance the effect instance
|
||||||
|
* \param param pointer to the parameter value
|
||||||
|
* \param param_index index of the parameter
|
||||||
|
*
|
||||||
|
* \see f0r_get_param_value
|
||||||
|
*/
|
||||||
|
void f0r_set_param_value(f0r_instance_t instance,
|
||||||
|
f0r_param_t param, int param_index);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This function allows the application to query the parameter values of an
|
||||||
|
* effect instance.
|
||||||
|
*
|
||||||
|
* \param instance the effect instance
|
||||||
|
* \param param pointer to the parameter value
|
||||||
|
* \param param_index index of the parameter
|
||||||
|
*
|
||||||
|
* \see f0r_set_param_value
|
||||||
|
*/
|
||||||
|
void f0r_get_param_value(f0r_instance_t instance,
|
||||||
|
f0r_param_t param, int param_index);
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is where the core effect processing happens. The application calls it
|
||||||
|
* after it has set the necessary parameter values.
|
||||||
|
* inframe and outframe must be aligned to an integer multiple of 16 bytes
|
||||||
|
* in memory.
|
||||||
|
*
|
||||||
|
* This funcition should not alter the parameters of the effect in any
|
||||||
|
* way (\ref f0r_get_param_value should return the same values after a call
|
||||||
|
* to \ref f0r_update as before the call).
|
||||||
|
*
|
||||||
|
* The function is responsible to restore the fpu state (e.g. rounding mode)
|
||||||
|
* and mmx state if applicable before it returns to the caller.
|
||||||
|
*
|
||||||
|
* The host mustn't call \ref f0r_update for effects of type
|
||||||
|
* \ref F0R_PLUGIN_TYPE_MIXER2 and \ref F0R_PLUGIN_TYPE_MIXER3.
|
||||||
|
*
|
||||||
|
* \param instance the effect instance
|
||||||
|
* \param time the application time in seconds but with subsecond resolution
|
||||||
|
* (e.g. milli-second resolution). The resolution should be at least
|
||||||
|
* the inter-frame period of the application.
|
||||||
|
* \param inframe the incoming video frame (can be zero for sources)
|
||||||
|
* \param outframe the resulting video frame
|
||||||
|
*
|
||||||
|
* \see f0r_update2
|
||||||
|
*/
|
||||||
|
void f0r_update(f0r_instance_t instance,
|
||||||
|
double time, const uint32_t* inframe, uint32_t* outframe);
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
/**
|
||||||
|
* For effects of type \ref F0R_PLUGIN_TYPE_SOURCE or
|
||||||
|
* \ref F0R_PLUGIN_TYPE_FILTER this method is optional. The \ref f0r_update
|
||||||
|
* method must still be exported for these two effect types. If both are
|
||||||
|
* provided the behavior of them must be the same.
|
||||||
|
*
|
||||||
|
* Effects of type \ref F0R_PLUGIN_TYPE_MIXER2 or \ref F0R_PLUGIN_TYPE_MIXER3 must provide the new \ref f0r_update2 method.
|
||||||
|
|
||||||
|
* \param instance the effect instance
|
||||||
|
* \param time the application time in seconds but with subsecond resolution
|
||||||
|
* (e.g. milli-second resolution). The resolution should be at least
|
||||||
|
* the inter-frame period of the application.
|
||||||
|
* \param inframe1 the first incoming video frame (can be zero for sources)
|
||||||
|
* \param inframe2 the second incoming video frame
|
||||||
|
(can be zero for sources and filters)
|
||||||
|
* \param inframe3 the third incoming video frame
|
||||||
|
(can be zero for sources, filters and mixer3)
|
||||||
|
* \param outframe the resulting video frame
|
||||||
|
*
|
||||||
|
* \see f0r_update
|
||||||
|
*/
|
||||||
|
void f0r_update2(f0r_instance_t instance,
|
||||||
|
double time,
|
||||||
|
const uint32_t* inframe1,
|
||||||
|
const uint32_t* inframe2,
|
||||||
|
const uint32_t* inframe3,
|
||||||
|
uint32_t* outframe);
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#endif
|
||||||
359
frei0r-autoconf/include/frei0r.hpp
Normal file
@@ -0,0 +1,359 @@
|
|||||||
|
extern "C"
|
||||||
|
{
|
||||||
|
#include "frei0r.h"
|
||||||
|
}
|
||||||
|
|
||||||
|
#include <list>
|
||||||
|
#include <vector>
|
||||||
|
#include <string>
|
||||||
|
#include <iostream>
|
||||||
|
|
||||||
|
|
||||||
|
namespace frei0r
|
||||||
|
{
|
||||||
|
class fx;
|
||||||
|
|
||||||
|
// remember me
|
||||||
|
static std::string s_name;
|
||||||
|
static std::string s_author;
|
||||||
|
static std::string s_explanation;
|
||||||
|
static std::pair<int,int> s_version;
|
||||||
|
static unsigned int s_effect_type;
|
||||||
|
static unsigned int s_color_model;
|
||||||
|
|
||||||
|
static fx* (*s_build) (unsigned int, unsigned int);
|
||||||
|
|
||||||
|
struct param_info
|
||||||
|
{
|
||||||
|
param_info(const std::string& name, const std::string& desc, int type)
|
||||||
|
: m_name(name), m_desc(desc), m_type(type) {}
|
||||||
|
|
||||||
|
std::string m_name;
|
||||||
|
std::string m_desc;
|
||||||
|
int m_type;
|
||||||
|
};
|
||||||
|
|
||||||
|
static std::vector<param_info> s_params;
|
||||||
|
|
||||||
|
|
||||||
|
class fx
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
double time;
|
||||||
|
unsigned int width;
|
||||||
|
unsigned int height;
|
||||||
|
unsigned int size; // = width * height
|
||||||
|
uint32_t* out;
|
||||||
|
std::vector<void*> param_ptrs;
|
||||||
|
|
||||||
|
fx()
|
||||||
|
{
|
||||||
|
s_params.clear(); // reinit static params
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual unsigned int effect_type()=0;
|
||||||
|
|
||||||
|
void register_param(f0r_param_color& p_loc,
|
||||||
|
const std::string& name,
|
||||||
|
const std::string& desc)
|
||||||
|
{
|
||||||
|
param_ptrs.push_back(&p_loc);
|
||||||
|
s_params.push_back(param_info(name,desc,F0R_PARAM_COLOR));
|
||||||
|
}
|
||||||
|
|
||||||
|
void register_param(f0r_param_double& p_loc,
|
||||||
|
const std::string& name,
|
||||||
|
const std::string& desc)
|
||||||
|
{
|
||||||
|
param_ptrs.push_back(&p_loc);
|
||||||
|
s_params.push_back(param_info(name,desc,F0R_PARAM_DOUBLE));
|
||||||
|
}
|
||||||
|
|
||||||
|
void register_param(bool& p_loc,
|
||||||
|
const std::string& name,
|
||||||
|
const std::string& desc)
|
||||||
|
{
|
||||||
|
param_ptrs.push_back(&p_loc);
|
||||||
|
s_params.push_back(param_info(name,desc,F0R_PARAM_BOOL));
|
||||||
|
}
|
||||||
|
|
||||||
|
void register_param(f0r_param_position& p_loc,
|
||||||
|
const std::string& name,
|
||||||
|
const std::string& desc)
|
||||||
|
{
|
||||||
|
param_ptrs.push_back(&p_loc);
|
||||||
|
s_params.push_back(param_info(name,desc,F0R_PARAM_POSITION));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void get_param_value(f0r_param_t param, int param_index)
|
||||||
|
{
|
||||||
|
void* ptr = param_ptrs[param_index];
|
||||||
|
|
||||||
|
switch (s_params[param_index].m_type)
|
||||||
|
{
|
||||||
|
case F0R_PARAM_BOOL :
|
||||||
|
*static_cast<f0r_param_bool*>(param) = ptr ? 0.0 : 1.0;
|
||||||
|
break;
|
||||||
|
case F0R_PARAM_DOUBLE:
|
||||||
|
*static_cast<f0r_param_double*>(param)
|
||||||
|
= *static_cast<double*>(ptr);
|
||||||
|
break;
|
||||||
|
case F0R_PARAM_COLOR:
|
||||||
|
*static_cast<f0r_param_color*>(param)
|
||||||
|
= *static_cast<f0r_param_color*>(ptr);
|
||||||
|
break;
|
||||||
|
case F0R_PARAM_POSITION:
|
||||||
|
*static_cast<f0r_param_position*>(param)
|
||||||
|
= *static_cast<f0r_param_position*>(ptr);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void set_param_value(f0r_param_t param, int param_index)
|
||||||
|
{
|
||||||
|
void* ptr = param_ptrs[param_index];
|
||||||
|
|
||||||
|
switch (s_params[param_index].m_type)
|
||||||
|
{
|
||||||
|
case F0R_PARAM_BOOL :
|
||||||
|
*static_cast<bool*>(ptr)
|
||||||
|
= (*static_cast<f0r_param_bool*>(param) > 0.5) ;
|
||||||
|
break;
|
||||||
|
case F0R_PARAM_DOUBLE:
|
||||||
|
*static_cast<f0r_param_double*>(ptr)
|
||||||
|
= *static_cast<f0r_param_double*>(param);
|
||||||
|
break;
|
||||||
|
case F0R_PARAM_COLOR:
|
||||||
|
*static_cast<f0r_param_color*>(ptr)
|
||||||
|
= *static_cast<f0r_param_color*>(param);
|
||||||
|
break;
|
||||||
|
case F0R_PARAM_POSITION:
|
||||||
|
*static_cast<f0r_param_position*>(ptr)
|
||||||
|
= *static_cast<f0r_param_position*>(param);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual void update_l(double time,
|
||||||
|
const uint32_t* inframe1,
|
||||||
|
const uint32_t* inframe2,
|
||||||
|
const uint32_t* inframe3,
|
||||||
|
uint32_t* outframe) = 0;
|
||||||
|
|
||||||
|
virtual void update() = 0;
|
||||||
|
|
||||||
|
virtual ~fx(){};
|
||||||
|
};
|
||||||
|
|
||||||
|
class source : public fx
|
||||||
|
{
|
||||||
|
protected:
|
||||||
|
source() {}
|
||||||
|
|
||||||
|
public:
|
||||||
|
virtual unsigned int effect_type(){ return F0R_PLUGIN_TYPE_SOURCE; }
|
||||||
|
|
||||||
|
virtual void update_l(double time_,
|
||||||
|
const uint32_t* inframe1,
|
||||||
|
const uint32_t* inframe2,
|
||||||
|
const uint32_t* inframe3,
|
||||||
|
uint32_t* outframe_)
|
||||||
|
{
|
||||||
|
time = time_;
|
||||||
|
out = outframe_;
|
||||||
|
update();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
class filter : public fx
|
||||||
|
{
|
||||||
|
protected:
|
||||||
|
const uint32_t* in;
|
||||||
|
filter() {}
|
||||||
|
|
||||||
|
public:
|
||||||
|
virtual unsigned int effect_type(){ return F0R_PLUGIN_TYPE_FILTER; }
|
||||||
|
|
||||||
|
virtual void update_l(double time_,
|
||||||
|
const uint32_t* inframe1,
|
||||||
|
const uint32_t* inframe2,
|
||||||
|
const uint32_t* inframe3,
|
||||||
|
uint32_t* outframe)
|
||||||
|
{
|
||||||
|
time = time_;
|
||||||
|
out = outframe;
|
||||||
|
in = inframe1;
|
||||||
|
update();
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
class mixer2 : public fx
|
||||||
|
{
|
||||||
|
protected:
|
||||||
|
const uint32_t* in1;
|
||||||
|
const uint32_t* in2;
|
||||||
|
|
||||||
|
mixer2() {}
|
||||||
|
|
||||||
|
public:
|
||||||
|
virtual unsigned int effect_type(){ return F0R_PLUGIN_TYPE_MIXER2; }
|
||||||
|
|
||||||
|
virtual void update_l(double time_,
|
||||||
|
const uint32_t* inframe1,
|
||||||
|
const uint32_t* inframe2,
|
||||||
|
const uint32_t* inframe3,
|
||||||
|
uint32_t* outframe)
|
||||||
|
{
|
||||||
|
time = time_;
|
||||||
|
out = outframe;
|
||||||
|
in1 = inframe1;
|
||||||
|
in2 = inframe2;
|
||||||
|
update();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
class mixer3 : public fx
|
||||||
|
{
|
||||||
|
protected:
|
||||||
|
const uint32_t* in1;
|
||||||
|
const uint32_t* in2;
|
||||||
|
const uint32_t* in3;
|
||||||
|
|
||||||
|
mixer3() {}
|
||||||
|
|
||||||
|
public:
|
||||||
|
virtual unsigned int effect_type(){ return F0R_PLUGIN_TYPE_MIXER3; }
|
||||||
|
|
||||||
|
virtual void update_l(double time_,
|
||||||
|
const uint32_t* inframe1,
|
||||||
|
const uint32_t* inframe2,
|
||||||
|
const uint32_t* inframe3,
|
||||||
|
uint32_t* outframe)
|
||||||
|
{
|
||||||
|
time = time_;
|
||||||
|
out = outframe;
|
||||||
|
in1 = inframe1;
|
||||||
|
in2 = inframe1;
|
||||||
|
in3 = inframe1;
|
||||||
|
update();
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// register stuff
|
||||||
|
template<class T>
|
||||||
|
class construct
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
construct(const std::string& name,
|
||||||
|
const std::string& explanation,
|
||||||
|
const std::string& author,
|
||||||
|
const int& major_version,
|
||||||
|
const int& minor_version,
|
||||||
|
unsigned int color_model = F0R_COLOR_MODEL_BGRA8888)
|
||||||
|
{
|
||||||
|
T a(0,0);
|
||||||
|
|
||||||
|
s_name=name;
|
||||||
|
s_explanation=explanation;
|
||||||
|
s_author=author;
|
||||||
|
s_version=std::make_pair(major_version,minor_version);
|
||||||
|
s_build=build;
|
||||||
|
|
||||||
|
s_effect_type=a.effect_type();
|
||||||
|
s_color_model=color_model;
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
static fx* build(unsigned int width, unsigned int height)
|
||||||
|
{
|
||||||
|
return new T(width,height);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// the exported frei0r functions
|
||||||
|
|
||||||
|
int f0r_init()
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
void f0r_deinit()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void f0r_get_plugin_info(f0r_plugin_info_t* info)
|
||||||
|
{
|
||||||
|
info->name = frei0r::s_name.c_str();
|
||||||
|
info->author = frei0r::s_author.c_str();
|
||||||
|
info->plugin_type = frei0r::s_effect_type;
|
||||||
|
info->color_model = frei0r::s_color_model;
|
||||||
|
info->frei0r_version = FREI0R_MAJOR_VERSION;
|
||||||
|
info->major_version = frei0r::s_version.first;
|
||||||
|
info->minor_version = frei0r::s_version.second;
|
||||||
|
info->explanation = frei0r::s_explanation.c_str();
|
||||||
|
info->num_params = frei0r::s_params.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
void f0r_get_param_info(f0r_param_info_t* info, int param_index)
|
||||||
|
{
|
||||||
|
info->name=frei0r::s_params[param_index].m_name.c_str();
|
||||||
|
info->type=frei0r::s_params[param_index].m_type;
|
||||||
|
info->explanation=frei0r::s_params[param_index].m_desc.c_str();
|
||||||
|
}
|
||||||
|
|
||||||
|
f0r_instance_t f0r_construct(unsigned int width, unsigned int height)
|
||||||
|
{
|
||||||
|
frei0r::fx* nfx = frei0r::s_build(width, height);
|
||||||
|
nfx->width=width;
|
||||||
|
nfx->height=height;
|
||||||
|
nfx->size=width*height;
|
||||||
|
return nfx;
|
||||||
|
}
|
||||||
|
|
||||||
|
void f0r_destruct(f0r_instance_t instance)
|
||||||
|
{
|
||||||
|
delete static_cast<frei0r::fx*>(instance);
|
||||||
|
}
|
||||||
|
|
||||||
|
void f0r_set_param_value(f0r_instance_t instance,
|
||||||
|
f0r_param_t param, int param_index)
|
||||||
|
{
|
||||||
|
static_cast<frei0r::fx*>(instance)->set_param_value(param, param_index);
|
||||||
|
}
|
||||||
|
|
||||||
|
void f0r_get_param_value(f0r_instance_t instance,
|
||||||
|
f0r_param_t param, int param_index)
|
||||||
|
{
|
||||||
|
static_cast<frei0r::fx*>(instance)->get_param_value(param, param_index);
|
||||||
|
}
|
||||||
|
|
||||||
|
void f0r_update2(f0r_instance_t instance, double time,
|
||||||
|
const uint32_t* inframe1,
|
||||||
|
const uint32_t* inframe2,
|
||||||
|
const uint32_t* inframe3,
|
||||||
|
uint32_t* outframe)
|
||||||
|
{
|
||||||
|
static_cast<frei0r::fx*>(instance)->update_l(time,
|
||||||
|
inframe1,
|
||||||
|
inframe2,
|
||||||
|
inframe3,
|
||||||
|
outframe);
|
||||||
|
}
|
||||||
|
|
||||||
|
// compability for frei0r 1.0
|
||||||
|
void f0r_update(f0r_instance_t instance,
|
||||||
|
double time, const uint32_t* inframe, uint32_t* outframe)
|
||||||
|
{
|
||||||
|
f0r_update2(instance, time, inframe, 0, 0, outframe);
|
||||||
|
}
|
||||||
|
|
||||||
416
frei0r-autoconf/include/frei0r_colorspace.h
Normal file
@@ -0,0 +1,416 @@
|
|||||||
|
/* frei0r_colorspace.h
|
||||||
|
* Copyright (C) 2004 Mathieu Guindon, Julien Keable, Jean-Sebastien Senecal
|
||||||
|
* This file is part of Frei0r.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef INCLUDED_FREI0R_COLORSPACE_H
|
||||||
|
#define INCLUDED_FREI0R_COLORSPACE_H
|
||||||
|
|
||||||
|
#include "frei0r_math.h"
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <math.h>
|
||||||
|
|
||||||
|
// # Basic colorspace convert functions (from the Gimp gimpcolorspace.h) ####
|
||||||
|
|
||||||
|
/* int functions */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* rgb_to_hsv_int
|
||||||
|
* @red: The red channel value, returns the Hue channel
|
||||||
|
* @green: The green channel value, returns the Saturation channel
|
||||||
|
* @blue: The blue channel value, returns the Value channel
|
||||||
|
*
|
||||||
|
* The arguments are pointers to int representing channel values in
|
||||||
|
* the RGB colorspace, and the values pointed to are all in the range
|
||||||
|
* [0, 255].
|
||||||
|
*
|
||||||
|
* The function changes the arguments to point to the HSV value
|
||||||
|
* corresponding, with the returned values in the following
|
||||||
|
* ranges: H [0, 360], S [0, 255], V [0, 255].
|
||||||
|
**/
|
||||||
|
inline void
|
||||||
|
rgb_to_hsv_int (int *red /* returns hue */,
|
||||||
|
int *green /* returns saturation */,
|
||||||
|
int *blue /* returns value */)
|
||||||
|
{
|
||||||
|
double r, g, b;
|
||||||
|
double h, s, v;
|
||||||
|
double min;
|
||||||
|
double delta;
|
||||||
|
|
||||||
|
r = *red;
|
||||||
|
g = *green;
|
||||||
|
b = *blue;
|
||||||
|
|
||||||
|
if (r > g)
|
||||||
|
{
|
||||||
|
v = MAX (r, b);
|
||||||
|
min = MIN (g, b);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
v = MAX (g, b);
|
||||||
|
min = MIN (r, b);
|
||||||
|
}
|
||||||
|
|
||||||
|
delta = v - min;
|
||||||
|
|
||||||
|
if (v == 0.0)
|
||||||
|
s = 0.0;
|
||||||
|
else
|
||||||
|
s = delta / v;
|
||||||
|
|
||||||
|
if (s == 0.0)
|
||||||
|
h = 0.0;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (r == v)
|
||||||
|
h = 60.0 * (g - b) / delta;
|
||||||
|
else if (g == v)
|
||||||
|
h = 120 + 60.0 * (b - r) / delta;
|
||||||
|
else
|
||||||
|
h = 240 + 60.0 * (r - g) / delta;
|
||||||
|
|
||||||
|
if (h < 0.0)
|
||||||
|
h += 360.0;
|
||||||
|
if (h > 360.0)
|
||||||
|
h -= 360.0;
|
||||||
|
}
|
||||||
|
|
||||||
|
*red = ROUND (h);
|
||||||
|
*green = ROUND (s * 255.0);
|
||||||
|
*blue = ROUND (v);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* hsv_to_rgb_int
|
||||||
|
* @hue: The hue channel, returns the red channel
|
||||||
|
* @saturation: The saturation channel, returns the green channel
|
||||||
|
* @value: The value channel, returns the blue channel
|
||||||
|
*
|
||||||
|
* The arguments are pointers to int, with the values pointed to in the
|
||||||
|
* following ranges: H [0, 360], S [0, 255], V [0, 255].
|
||||||
|
*
|
||||||
|
* The function changes the arguments to point to the RGB value
|
||||||
|
* corresponding, with the returned values all in the range [0, 255].
|
||||||
|
**/
|
||||||
|
inline void
|
||||||
|
hsv_to_rgb_int (int *hue /* returns red */,
|
||||||
|
int *saturation /* returns green */,
|
||||||
|
int *value /* returns blue */)
|
||||||
|
{
|
||||||
|
double h, s, v, h_temp;
|
||||||
|
double f, p, q, t;
|
||||||
|
int i;
|
||||||
|
|
||||||
|
if (*saturation == 0)
|
||||||
|
{
|
||||||
|
*hue = *value;
|
||||||
|
*saturation = *value;
|
||||||
|
// *value = *value;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
h = *hue;
|
||||||
|
s = *saturation / 255.0;
|
||||||
|
v = *value / 255.0;
|
||||||
|
|
||||||
|
if (h == 360)
|
||||||
|
h_temp = 0;
|
||||||
|
else
|
||||||
|
h_temp = h;
|
||||||
|
|
||||||
|
h_temp = h_temp / 60.0;
|
||||||
|
i = (int) floor (h_temp);
|
||||||
|
f = h_temp - i;
|
||||||
|
p = v * (1.0 - s);
|
||||||
|
q = v * (1.0 - (s * f));
|
||||||
|
t = v * (1.0 - (s * (1.0 - f)));
|
||||||
|
|
||||||
|
switch (i)
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
*hue = ROUND (v * 255.0);
|
||||||
|
*saturation = ROUND (t * 255.0);
|
||||||
|
*value = ROUND (p * 255.0);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 1:
|
||||||
|
*hue = ROUND (q * 255.0);
|
||||||
|
*saturation = ROUND (v * 255.0);
|
||||||
|
*value = ROUND (p * 255.0);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 2:
|
||||||
|
*hue = ROUND (p * 255.0);
|
||||||
|
*saturation = ROUND (v * 255.0);
|
||||||
|
*value = ROUND (t * 255.0);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 3:
|
||||||
|
*hue = ROUND (p * 255.0);
|
||||||
|
*saturation = ROUND (q * 255.0);
|
||||||
|
*value = ROUND (v * 255.0);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 4:
|
||||||
|
*hue = ROUND (t * 255.0);
|
||||||
|
*saturation = ROUND (p * 255.0);
|
||||||
|
*value = ROUND (v * 255.0);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 5:
|
||||||
|
*hue = ROUND (v * 255.0);
|
||||||
|
*saturation = ROUND (p * 255.0);
|
||||||
|
*value = ROUND (q * 255.0);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* rgb_to_hsl_int
|
||||||
|
* @red: Red channel, returns Hue channel
|
||||||
|
* @green: Green channel, returns Lightness channel
|
||||||
|
* @blue: Blue channel, returns Saturation channel
|
||||||
|
*
|
||||||
|
* The arguments are pointers to int representing channel values in the
|
||||||
|
* RGB colorspace, and the values pointed to are all in the range [0, 255].
|
||||||
|
*
|
||||||
|
* The function changes the arguments to point to the corresponding HLS
|
||||||
|
* value with the values pointed to in the following ranges: H [0, 360],
|
||||||
|
* L [0, 255], S [0, 255].
|
||||||
|
**/
|
||||||
|
inline void
|
||||||
|
rgb_to_hsl_int (unsigned int *red /* returns red */,
|
||||||
|
unsigned int *green /* returns green */,
|
||||||
|
unsigned int *blue /* returns blue */)
|
||||||
|
{
|
||||||
|
unsigned int r, g, b;
|
||||||
|
double h, s, l;
|
||||||
|
unsigned int min, max;
|
||||||
|
unsigned int delta;
|
||||||
|
|
||||||
|
r = *red;
|
||||||
|
g = *green;
|
||||||
|
b = *blue;
|
||||||
|
|
||||||
|
if (r > g)
|
||||||
|
{
|
||||||
|
max = MAX (r, b);
|
||||||
|
min = MIN (g, b);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
max = MAX (g, b);
|
||||||
|
min = MIN (r, b);
|
||||||
|
}
|
||||||
|
|
||||||
|
l = (max + min) / 2.0;
|
||||||
|
|
||||||
|
if (max == min)
|
||||||
|
{
|
||||||
|
s = 0.0;
|
||||||
|
h = 0.0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
delta = (max - min);
|
||||||
|
|
||||||
|
if (l < 128)
|
||||||
|
s = 255 * (double) delta / (double) (max + min);
|
||||||
|
else
|
||||||
|
s = 255 * (double) delta / (double) (511 - max - min);
|
||||||
|
|
||||||
|
if (r == max)
|
||||||
|
h = (g - b) / (double) delta;
|
||||||
|
else if (g == max)
|
||||||
|
h = 2 + (b - r) / (double) delta;
|
||||||
|
else
|
||||||
|
h = 4 + (r - g) / (double) delta;
|
||||||
|
|
||||||
|
h = h * 42.5;
|
||||||
|
|
||||||
|
if (h < 0)
|
||||||
|
h += 255;
|
||||||
|
else if (h > 255)
|
||||||
|
h -= 255;
|
||||||
|
}
|
||||||
|
|
||||||
|
*red = ROUND (h);
|
||||||
|
*green = ROUND (s);
|
||||||
|
*blue = ROUND (l);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline int
|
||||||
|
hsl_value_int (double n1,
|
||||||
|
double n2,
|
||||||
|
double hue)
|
||||||
|
{
|
||||||
|
double value;
|
||||||
|
|
||||||
|
if (hue > 255)
|
||||||
|
hue -= 255;
|
||||||
|
else if (hue < 0)
|
||||||
|
hue += 255;
|
||||||
|
|
||||||
|
if (hue < 42.5)
|
||||||
|
value = n1 + (n2 - n1) * (hue / 42.5);
|
||||||
|
else if (hue < 127.5)
|
||||||
|
value = n2;
|
||||||
|
else if (hue < 170)
|
||||||
|
value = n1 + (n2 - n1) * ((170 - hue) / 42.5);
|
||||||
|
else
|
||||||
|
value = n1;
|
||||||
|
|
||||||
|
return ROUND (value * 255.0);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* hsl_to_rgb_int
|
||||||
|
* @hue: Hue channel, returns Red channel
|
||||||
|
* @saturation: Saturation channel, returns Green channel
|
||||||
|
* @lightness: Lightness channel, returns Blue channel
|
||||||
|
*
|
||||||
|
* The arguments are pointers to int, with the values pointed to in the
|
||||||
|
* following ranges: H [0, 360], L [0, 255], S [0, 255].
|
||||||
|
*
|
||||||
|
* The function changes the arguments to point to the RGB value
|
||||||
|
* corresponding, with the returned values all in the range [0, 255].
|
||||||
|
**/
|
||||||
|
inline void
|
||||||
|
hsl_to_rgb_int (unsigned int *hue /* returns red */,
|
||||||
|
unsigned int *saturation /* returns green */,
|
||||||
|
unsigned int *lightness /* returns blue */)
|
||||||
|
{
|
||||||
|
double h, s, l;
|
||||||
|
|
||||||
|
h = *hue;
|
||||||
|
s = *saturation;
|
||||||
|
l = *lightness;
|
||||||
|
|
||||||
|
if (s == 0)
|
||||||
|
{
|
||||||
|
/* achromatic case */
|
||||||
|
*hue = (int)l;
|
||||||
|
*lightness = (int)l;
|
||||||
|
*saturation = (int)l;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
double m1, m2;
|
||||||
|
|
||||||
|
if (l < 128)
|
||||||
|
m2 = (l * (255 + s)) / 65025.0;
|
||||||
|
else
|
||||||
|
m2 = (l + s - (l * s) / 255.0) / 255.0;
|
||||||
|
|
||||||
|
m1 = (l / 127.5) - m2;
|
||||||
|
|
||||||
|
/* chromatic case */
|
||||||
|
*hue = hsl_value_int (m1, m2, h + 85);
|
||||||
|
*saturation = hsl_value_int (m1, m2, h);
|
||||||
|
*lightness = hsl_value_int (m1, m2, h - 85);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gimp_rgb_to_cmyk_int:
|
||||||
|
* @red: the red channel; returns the cyan value (0-255)
|
||||||
|
* @green: the green channel; returns the magenta value (0-255)
|
||||||
|
* @blue: the blue channel; returns the yellow value (0-255)
|
||||||
|
* @pullout: the percentage of black to pull out (0-100); returns
|
||||||
|
* the black value (0-255)
|
||||||
|
*
|
||||||
|
* Does a naive conversion from RGB to CMYK colorspace. A simple
|
||||||
|
* formula that doesn't take any color-profiles into account is used.
|
||||||
|
* The amount of black pullout how can be controlled via the @pullout
|
||||||
|
* parameter. A @pullout value of 0 makes this a conversion to CMY.
|
||||||
|
* A value of 100 causes the maximum amount of black to be pulled out.
|
||||||
|
**/
|
||||||
|
inline void
|
||||||
|
gimp_rgb_to_cmyk_int (int *red,
|
||||||
|
int *green,
|
||||||
|
int *blue,
|
||||||
|
int *pullout)
|
||||||
|
{
|
||||||
|
int c, m, y;
|
||||||
|
|
||||||
|
c = 255 - *red;
|
||||||
|
m = 255 - *green;
|
||||||
|
y = 255 - *blue;
|
||||||
|
|
||||||
|
if (*pullout == 0)
|
||||||
|
{
|
||||||
|
*red = c;
|
||||||
|
*green = m;
|
||||||
|
*blue = y;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
int k = 255;
|
||||||
|
|
||||||
|
if (c < k) k = c;
|
||||||
|
if (m < k) k = m;
|
||||||
|
if (y < k) k = y;
|
||||||
|
|
||||||
|
k = (k * CLAMP (*pullout, 0, 100)) / 100;
|
||||||
|
|
||||||
|
*red = ((c - k) << 8) / (256 - k);
|
||||||
|
*green = ((m - k) << 8) / (256 - k);
|
||||||
|
*blue = ((y - k) << 8) / (256 - k);
|
||||||
|
*pullout = k;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gimp_cmyk_to_rgb_int:
|
||||||
|
* @cyan: the cyan channel; returns the red value (0-255)
|
||||||
|
* @magenta: the magenta channel; returns the green value (0-255)
|
||||||
|
* @yellow: the yellow channel; returns the blue value (0-255)
|
||||||
|
* @black: the black channel (0-255); doesn't change
|
||||||
|
*
|
||||||
|
* Does a naive conversion from CMYK to RGB colorspace. A simple
|
||||||
|
* formula that doesn't take any color-profiles into account is used.
|
||||||
|
**/
|
||||||
|
inline void
|
||||||
|
cmyk_to_rgb_int (int *cyan,
|
||||||
|
int *magenta,
|
||||||
|
int *yellow,
|
||||||
|
int *black)
|
||||||
|
{
|
||||||
|
int c, m, y, k;
|
||||||
|
|
||||||
|
c = *cyan;
|
||||||
|
m = *magenta;
|
||||||
|
y = *yellow;
|
||||||
|
k = *black;
|
||||||
|
|
||||||
|
if (k)
|
||||||
|
{
|
||||||
|
c = ((c * (256 - k)) >> 8) + k;
|
||||||
|
m = ((m * (256 - k)) >> 8) + k;
|
||||||
|
y = ((y * (256 - k)) >> 8) + k;
|
||||||
|
}
|
||||||
|
|
||||||
|
*cyan = 255 - c;
|
||||||
|
*magenta = 255 - m;
|
||||||
|
*yellow = 255 - y;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
||||||
54
frei0r-autoconf/include/frei0r_math.h
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
#ifndef INCLUDED_FREI0R_MATH_H
|
||||||
|
#define INCLUDED_FREI0R_MATH_H
|
||||||
|
|
||||||
|
/*
|
||||||
|
|
||||||
|
Code stripped from The Gimp:
|
||||||
|
INT_MULT(a,b,t)
|
||||||
|
INT_MULT3(a,b,c,t)
|
||||||
|
INT_BLEND(a,b,alpha,tmp)
|
||||||
|
CLAMP
|
||||||
|
ROUND
|
||||||
|
MAX255
|
||||||
|
|
||||||
|
Code stripped from Drone:
|
||||||
|
CLAMP0255
|
||||||
|
SQR
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Clamps a int32-range int between 0 and 255 inclusive. */
|
||||||
|
unsigned char CLAMP0255(int32_t a)
|
||||||
|
{
|
||||||
|
return (unsigned char)
|
||||||
|
( (((-a) >> 31) & a) // 0 if the number was negative
|
||||||
|
| (255 - a) >> 31); // -1 if the number was greater than 255
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Provided temporary int t, returns a * b / 255 */
|
||||||
|
#define INT_MULT(a,b,t) ((t) = (a) * (b) + 0x80, ((((t) >> 8) + (t)) >> 8))
|
||||||
|
|
||||||
|
/* This version of INT_MULT3 is very fast, but suffers from some
|
||||||
|
slight roundoff errors. It returns the correct result 99.987
|
||||||
|
percent of the time */
|
||||||
|
#define INT_MULT3(a,b,c,t) ((t) = (a) * (b) * (c) + 0x7F5B, \
|
||||||
|
((((t) >> 7) + (t)) >> 16))
|
||||||
|
|
||||||
|
#define INT_BLEND(a,b,alpha,tmp) (INT_MULT((a) - (b), alpha, tmp) + (b))
|
||||||
|
|
||||||
|
//! Clamp x at lower = l and upper = u.
|
||||||
|
#define CLAMP(x,l,u) ( x < l ? l : ( x > u ? u : x ) )
|
||||||
|
|
||||||
|
//! Round.
|
||||||
|
#define ROUND(x) ((int32_t)((x)+0.5))
|
||||||
|
|
||||||
|
//! Square.
|
||||||
|
#define SQR(x) ((x) * (x))
|
||||||
|
|
||||||
|
//! Limit a (0->511) int to 255.
|
||||||
|
uint8_t MAX255(uint32_t a) { return (uint8_t) (a | ((a & 256) - ((a & 256) >> 8))); }
|
||||||
|
|
||||||
|
#define MIN(x, y) ((x) < (y) ? (x) : (y));
|
||||||
|
|
||||||
|
#define MAX(x, y) ((x) > (y) ? (x) : (y));
|
||||||
|
|
||||||
|
#endif
|
||||||
142
frei0r-autoconf/src/Makefile.am
Normal file
@@ -0,0 +1,142 @@
|
|||||||
|
# Copyright (C) 2007 Richard Spindler <richard.spindler AT gmail.com>
|
||||||
|
#
|
||||||
|
# This file is free software; as a special exception the author gives
|
||||||
|
# unlimited permission to copy and/or distribute it, with or without
|
||||||
|
# modifications, as long as this notice is preserved.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful, but
|
||||||
|
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
|
||||||
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
plugin_LTLIBRARIES = \
|
||||||
|
3dflippo.la brightness.la distort0r.la grain_merge.la mask0mate.la saturation.la tehroxx0r.la\
|
||||||
|
addition.la burn.la divide.la hardlight.la multiply.la threshold0r.la\
|
||||||
|
alphaatop.la bw0r.la dodge.la hueshift0r.la nois0r.la scanline0r.la twolay0r.la\
|
||||||
|
alphain.la equaliz0r.la hue.la nosync0r.la screen.la value.la\
|
||||||
|
alphaout.la color_only.la flippo.la invert0r.la onecol0r.la sobel.la \
|
||||||
|
alphaover.la darken.la gamma.la ising0r.la overlay.la softlight.la xfade0r.la\
|
||||||
|
alphaxor.la delay0r.la lighten.la pixeliz0r.la squareblur.la contrast0r.la\
|
||||||
|
blend.la difference.la grain_extract.la lissajous0r.la saturat0r.la\
|
||||||
|
subtract.la letterb0xed.la R.la G.la B.la RGB.la composition.la alphainjection.la\
|
||||||
|
water.la cartoon.la glow.la lenscorrection.la transparency.la \
|
||||||
|
colordistance.la perspective.la uvmap.la luminance.la edgeglow.la \
|
||||||
|
cluster.la
|
||||||
|
|
||||||
|
if HAVE_GAVL
|
||||||
|
plugin_LTLIBRARIES += scale0tilt.la
|
||||||
|
scale0tilt_la_SOURCES = filter/scale0tilt/scale0tilt.c
|
||||||
|
scale0tilt_la_CFLAGS = @GAVL_CFLAGS@ @CFLAGS@
|
||||||
|
scale0tilt_la_LIBADD = @GAVL_LIBS@
|
||||||
|
|
||||||
|
plugin_LTLIBRARIES += vectorscope.la
|
||||||
|
vectorscope_la_SOURCES = filter/vectorscope/vectorscope.c filter/vectorscope/vectorscope_image.h
|
||||||
|
vectorscope_la_CFLAGS = @GAVL_CFLAGS@ @CFLAGS@
|
||||||
|
vectorscope_la_LIBADD = @GAVL_LIBS@
|
||||||
|
|
||||||
|
plugin_LTLIBRARIES += rgbparade.la
|
||||||
|
rgbparade_la_SOURCES = filter/rgbparade/rgbparade.c filter/rgbparade/rgbparade_image.h
|
||||||
|
rgbparade_la_CFLAGS = @GAVL_CFLAGS@ @CFLAGS@
|
||||||
|
rgbparade_la_LIBADD = @GAVL_LIBS@
|
||||||
|
endif
|
||||||
|
|
||||||
|
if HAVE_OPENCV
|
||||||
|
plugin_LTLIBRARIES += facedetect.la
|
||||||
|
facedetect_la_SOURCES = filter/facedetect/facedetect.c
|
||||||
|
facedetect_la_CFLAGS = @OPENCV_CFLAGS@ @CFLAGS@
|
||||||
|
facedetect_la_LIBADD = @OPENCV_LIBS@
|
||||||
|
endif
|
||||||
|
|
||||||
|
cluster_la_SOURCES = filter/cluster/cluster.c
|
||||||
|
edgeglow_la_SOURCES = filter/edgeglow/edgeglow.cpp
|
||||||
|
luminance_la_SOURCES = filter/luminance/luminance.c
|
||||||
|
perspective_la_SOURCES = filter/perspective/perspective.c
|
||||||
|
colordistance_la_SOURCES = filter/colordistance/colordistance.c
|
||||||
|
transparency_la_SOURCES = filter/transparency/transparency.c
|
||||||
|
lenscorrection_la_SOURCES = filter/lenscorrection/lenscorrection.c
|
||||||
|
glow_la_SOURCES = filter/glow/glow.c filter/glow/blur.h
|
||||||
|
cartoon_la_SOURCES = filter/cartoon/cartoon.cpp
|
||||||
|
water_la_SOURCES = filter/water/water.cpp
|
||||||
|
R_la_SOURCES = filter/RGB/R.c
|
||||||
|
G_la_SOURCES = filter/RGB/G.c
|
||||||
|
B_la_SOURCES = filter/RGB/B.c
|
||||||
|
letterb0xed_la_SOURCES = filter/letterb0xed/letterb0xed.c
|
||||||
|
contrast0r_la_SOURCES = filter/contrast0r/contrast0r.c
|
||||||
|
3dflippo_la_SOURCES = filter/3dflippo/3dflippo.c
|
||||||
|
equaliz0r_la_SOURCES = filter/equaliz0r/equaliz0r.cpp
|
||||||
|
gamma_la_SOURCES = filter/gamma/gamma.c
|
||||||
|
mask0mate_la_SOURCES = filter/mask0mate/mask0mate.c filter/mask0mate/blur.h
|
||||||
|
saturat0r_la_SOURCES = filter/saturat0r/saturat0r.c
|
||||||
|
sobel_la_SOURCES = filter/sobel/sobel.cpp
|
||||||
|
threshold0r_la_SOURCES = filter/threshold0r/threshold0r.c
|
||||||
|
brightness_la_SOURCES = filter/brightness/brightness.c
|
||||||
|
delay0r_la_SOURCES = filter/delay0r/delay0r.cpp
|
||||||
|
hueshift0r_la_SOURCES = filter/hueshift0r/hueshift0r.c filter/hueshift0r/matrix.h
|
||||||
|
nosync0r_la_SOURCES = filter/nosync0r/nosync0r.cpp
|
||||||
|
squareblur_la_SOURCES = filter/squareblur/squareblur.c
|
||||||
|
twolay0r_la_SOURCES = filter/twolay0r/twolay0r.cpp
|
||||||
|
bw0r_la_SOURCES = filter/bw0r/bw0r.c
|
||||||
|
distort0r_la_SOURCES = filter/distort0r/distort0r.c
|
||||||
|
flippo_la_SOURCES = filter/flippo/flippo.c
|
||||||
|
invert0r_la_SOURCES = filter/invert0r/invert0r.c
|
||||||
|
pixeliz0r_la_SOURCES = filter/pixeliz0r/pixeliz0r.c
|
||||||
|
scanline0r_la_SOURCES = filter/scanline0r/scanline0r.cpp
|
||||||
|
tehroxx0r_la_SOURCES = filter/tehroxx0r/tehRoxx0r.c
|
||||||
|
ising0r_la_SOURCES = generator/ising0r/ising0r.c
|
||||||
|
lissajous0r_la_SOURCES = generator/lissajous0r/lissajous0r.cpp
|
||||||
|
nois0r_la_SOURCES = generator/nois0r/nois0r.cpp
|
||||||
|
onecol0r_la_SOURCES = generator/onecol0r/onecol0r.cpp
|
||||||
|
uvmap_la_SOURCES = mixer2/uvmap/uvmap.c
|
||||||
|
composition_la_SOURCES = mixer2/composition/composition.c
|
||||||
|
alphainjection_la_SOURCES = mixer2/alphainjection/alphainjection.c
|
||||||
|
addition_la_SOURCES = mixer2/addition/addition.cpp
|
||||||
|
alphaout_la_SOURCES = mixer2/alphaout/alphaout.cpp
|
||||||
|
blend_la_SOURCES = mixer2/blend/blend.cpp
|
||||||
|
darken_la_SOURCES = mixer2/darken/darken.cpp
|
||||||
|
dodge_la_SOURCES = mixer2/dodge/dodge.cpp
|
||||||
|
hardlight_la_SOURCES = mixer2/hardlight/hardlight.cpp
|
||||||
|
multiply_la_SOURCES = mixer2/multiply/multiply.cpp
|
||||||
|
screen_la_SOURCES = mixer2/screen/screen.cpp
|
||||||
|
value_la_SOURCES = mixer2/value/value.cpp
|
||||||
|
alphaatop_la_SOURCES = mixer2/alphaatop/alphaatop.cpp
|
||||||
|
alphaover_la_SOURCES = mixer2/alphaover/alphaover.cpp
|
||||||
|
burn_la_SOURCES = mixer2/burn/burn.cpp
|
||||||
|
difference_la_SOURCES = mixer2/difference/difference.cpp
|
||||||
|
grain_extract_la_SOURCES = mixer2/grain_extract/grain_extract.cpp
|
||||||
|
hue_la_SOURCES = mixer2/hue/hue.cpp
|
||||||
|
overlay_la_SOURCES = mixer2/overlay/overlay.cpp
|
||||||
|
softlight_la_SOURCES = mixer2/softlight/softlight.cpp
|
||||||
|
xfade0r_la_SOURCES = mixer2/xfade0r/xfade0r.cpp
|
||||||
|
alphain_la_SOURCES = mixer2/alphain/alphain.cpp
|
||||||
|
alphaxor_la_SOURCES = mixer2/alphaxor/alphaxor.cpp
|
||||||
|
color_only_la_SOURCES = mixer2/color_only/color_only.cpp
|
||||||
|
divide_la_SOURCES = mixer2/divide/divide.cpp
|
||||||
|
grain_merge_la_SOURCES = mixer2/grain_merge/grain_merge.cpp
|
||||||
|
lighten_la_SOURCES = mixer2/lighten/lighten.cpp
|
||||||
|
saturation_la_SOURCES = mixer2/saturation/saturation.cpp
|
||||||
|
subtract_la_SOURCES = mixer2/subtract/subtract.cpp
|
||||||
|
RGB_la_SOURCES = mixer3/RGB/RGB.c
|
||||||
|
|
||||||
|
|
||||||
|
AM_CPPFLAGS = -I@top_srcdir@/include
|
||||||
|
AM_CFLAGS = -I@top_srcdir@/include
|
||||||
|
AM_LDFLAGS = -module -avoid-version -Wc,-nostartfiles
|
||||||
|
|
||||||
|
plugindir = @prefix@/lib/frei0r-1
|
||||||
|
|
||||||
|
|
||||||
|
install-pluginLTLIBRARIES: $(plugin_LTLIBRARIES)
|
||||||
|
mkdir -p $(DESTDIR)/$(plugindir)
|
||||||
|
list='$(plugin_LTLIBRARIES)'; \
|
||||||
|
for file in $$list; do \
|
||||||
|
sofile=`basename $$file .la`.so; \
|
||||||
|
$(INSTALL_PROGRAM) .libs/$$sofile $(DESTDIR)/$(plugindir); \
|
||||||
|
done
|
||||||
|
|
||||||
|
uninstall-pluginLTLIBRARIES:
|
||||||
|
list='$(plugin_LTLIBRARIES)'; \
|
||||||
|
for file in $$list; do \
|
||||||
|
sofile=`basename $$file .la`.so; \
|
||||||
|
rm -f $(DESTDIR)/$(plugindir)/$$sofile; \
|
||||||
|
done
|
||||||
|
|
||||||
|
|
||||||
446
frei0r-autoconf/src/filter/3dflippo/3dflippo.c
Normal file
@@ -0,0 +1,446 @@
|
|||||||
|
/* 3dflippo.c */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 25/01/2006 c.e. prelz
|
||||||
|
*
|
||||||
|
* My second frei0r effect - more complex flipping
|
||||||
|
*
|
||||||
|
* Copyright (C) 2006 BEK - Bergen Senter for Elektronisk Kunst <bek@bek.no>
|
||||||
|
* This file is a Frei0r plugin.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "frei0r.h"
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <math.h>
|
||||||
|
|
||||||
|
#define MSIZE 4
|
||||||
|
#define TWO_PI (M_PI*2.0)
|
||||||
|
|
||||||
|
enum axis
|
||||||
|
{
|
||||||
|
AXIS_X,
|
||||||
|
AXIS_Y,
|
||||||
|
AXIS_Z
|
||||||
|
};
|
||||||
|
|
||||||
|
#include <assert.h>
|
||||||
|
|
||||||
|
typedef struct tdflippo_instance
|
||||||
|
{
|
||||||
|
unsigned int width,height,fsize;
|
||||||
|
int *mask;
|
||||||
|
float flip[3],rate[3],center[2];
|
||||||
|
unsigned char invertrot,dontblank,fillblack,mustrecompute;
|
||||||
|
} tdflippo_instance_t;
|
||||||
|
|
||||||
|
static float **newmat(unsigned char unit_flg);
|
||||||
|
static void matfree(float **mat);
|
||||||
|
static float **mat_translate(float tx,float ty,float tz);
|
||||||
|
static float **mat_rotate(enum axis ax,float angle);
|
||||||
|
static float **matmult(float **mat1,float **mat2);
|
||||||
|
static void vetmat(float **mat,float *x,float *y,float *z);
|
||||||
|
static void recompute_mask(tdflippo_instance_t* inst);
|
||||||
|
|
||||||
|
int f0r_init()
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
void f0r_deinit()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void f0r_get_plugin_info(f0r_plugin_info_t* flippoInfo)
|
||||||
|
{
|
||||||
|
flippoInfo->name="3dflippo";
|
||||||
|
flippoInfo->author="c.e. prelz AS FLUIDO <fluido@fluido.as>";
|
||||||
|
flippoInfo->plugin_type=F0R_PLUGIN_TYPE_FILTER;
|
||||||
|
flippoInfo->color_model=F0R_COLOR_MODEL_PACKED32;
|
||||||
|
flippoInfo->frei0r_version=FREI0R_MAJOR_VERSION;
|
||||||
|
flippoInfo->major_version=0;
|
||||||
|
flippoInfo->minor_version=0;
|
||||||
|
flippoInfo->num_params=11;
|
||||||
|
flippoInfo->explanation="Frame rotation in 3d-space";
|
||||||
|
}
|
||||||
|
|
||||||
|
void f0r_get_param_info(f0r_param_info_t* info, int param_index)
|
||||||
|
{
|
||||||
|
switch(param_index)
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
info->name="X axis rotation";
|
||||||
|
info->type=F0R_PARAM_DOUBLE;
|
||||||
|
info->explanation="Rotation on the X axis";
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
info->name="Y axis rotation";
|
||||||
|
info->type=F0R_PARAM_DOUBLE;
|
||||||
|
info->explanation="Rotation on the Y axis";
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
info->name="Z axis rotation";
|
||||||
|
info->type=F0R_PARAM_DOUBLE;
|
||||||
|
info->explanation="Rotation on the Z axis";
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
info->name="X axis rotation rate";
|
||||||
|
info->type=F0R_PARAM_DOUBLE;
|
||||||
|
info->explanation="Rotation rate on the X axis";
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
info->name="Y axis rotation rate";
|
||||||
|
info->type=F0R_PARAM_DOUBLE;
|
||||||
|
info->explanation="Rotation rate on the Y axis";
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
info->name="Z axis rotation rate";
|
||||||
|
info->type=F0R_PARAM_DOUBLE;
|
||||||
|
info->explanation="Rotation rate on the Z axis";
|
||||||
|
break;
|
||||||
|
case 6:
|
||||||
|
info->name="Center position (X)";
|
||||||
|
info->type=F0R_PARAM_DOUBLE;
|
||||||
|
info->explanation="Position of the center of rotation on the X axis";
|
||||||
|
break;
|
||||||
|
case 7:
|
||||||
|
info->name="Center position (Y)";
|
||||||
|
info->type=F0R_PARAM_DOUBLE;
|
||||||
|
info->explanation="Position of the center of rotation on the Y axis";
|
||||||
|
break;
|
||||||
|
case 8:
|
||||||
|
info->name="Invert rotation assignment";
|
||||||
|
info->type=F0R_PARAM_BOOL;
|
||||||
|
info->explanation="If true, when mapping rotation, make inverted (wrong) assignment";
|
||||||
|
break;
|
||||||
|
case 9:
|
||||||
|
info->name="Don't blank mask";
|
||||||
|
info->type=F0R_PARAM_BOOL;
|
||||||
|
info->explanation="Mask for frame transposition is not blanked, so a trace of old transpositions is maintained";
|
||||||
|
break;
|
||||||
|
case 10:
|
||||||
|
info->name="Fill with image or black";
|
||||||
|
info->type=F0R_PARAM_BOOL;
|
||||||
|
info->explanation="If true, pixels that are not transposed are black, otherwise, they are copied with the original";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
f0r_instance_t f0r_construct(unsigned int width,unsigned int height)
|
||||||
|
{
|
||||||
|
tdflippo_instance_t *inst=
|
||||||
|
(tdflippo_instance_t*)malloc(sizeof(tdflippo_instance_t));
|
||||||
|
|
||||||
|
inst->width=width;
|
||||||
|
inst->height=height;
|
||||||
|
inst->fsize=width*height;
|
||||||
|
|
||||||
|
inst->flip[0]=inst->flip[1]=inst->flip[2]=inst->rate[0]=inst->rate[1]=inst->rate[2]=0.5;
|
||||||
|
|
||||||
|
inst->mask=malloc(sizeof(int)*inst->fsize);
|
||||||
|
|
||||||
|
inst->invertrot=inst->dontblank=inst->fillblack=inst->mustrecompute=0;
|
||||||
|
|
||||||
|
return (f0r_instance_t)inst;
|
||||||
|
}
|
||||||
|
|
||||||
|
void f0r_destruct(f0r_instance_t instance)
|
||||||
|
{
|
||||||
|
tdflippo_instance_t* inst=(tdflippo_instance_t*)instance;
|
||||||
|
|
||||||
|
free(inst->mask);
|
||||||
|
free(inst);
|
||||||
|
}
|
||||||
|
|
||||||
|
void f0r_set_param_value(f0r_instance_t instance,
|
||||||
|
f0r_param_t param,int param_index)
|
||||||
|
{
|
||||||
|
assert(instance);
|
||||||
|
|
||||||
|
tdflippo_instance_t *inst=(tdflippo_instance_t*)instance;
|
||||||
|
|
||||||
|
switch(param_index)
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
inst->flip[0]=(float)(*((double*)param));
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
inst->flip[1]=(float)(*((double*)param));
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
inst->flip[2]=(float)(*((double*)param));
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
inst->rate[0]=(float)(*((double*)param));
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
inst->rate[1]=(float)(*((double*)param));
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
inst->rate[2]=(float)(*((double*)param));
|
||||||
|
break;
|
||||||
|
case 6:
|
||||||
|
inst->center[0]=(float)(*((double*)param));
|
||||||
|
break;
|
||||||
|
case 7:
|
||||||
|
inst->center[1]=(float)(*((double*)param));
|
||||||
|
break;
|
||||||
|
case 8:
|
||||||
|
inst->invertrot=(*((double*)param)>=0.5);
|
||||||
|
break;
|
||||||
|
case 9:
|
||||||
|
inst->dontblank=(*((double*)param)>=0.5);
|
||||||
|
break;
|
||||||
|
case 10:
|
||||||
|
inst->fillblack=(*((double*)param)>=0.5);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if((param_index>=0 && param_index<=2) || (param_index>=6 && param_index<=9))
|
||||||
|
inst->mustrecompute=1;
|
||||||
|
}
|
||||||
|
|
||||||
|
void f0r_get_param_value(f0r_instance_t instance,
|
||||||
|
f0r_param_t param,int param_index)
|
||||||
|
{
|
||||||
|
assert(instance);
|
||||||
|
|
||||||
|
tdflippo_instance_t *inst=(tdflippo_instance_t*)instance;
|
||||||
|
|
||||||
|
switch(param_index)
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
*((double*)param)=inst->flip[0];
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
*((double*)param)=inst->flip[1];
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
*((double*)param)=inst->flip[2];
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
*((double*)param)=inst->rate[0];
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
*((double*)param)=inst->rate[1];
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
*((double*)param)=inst->rate[2];
|
||||||
|
break;
|
||||||
|
case 6:
|
||||||
|
*((double*)param)=inst->center[0];
|
||||||
|
break;
|
||||||
|
case 7:
|
||||||
|
*((double*)param)=inst->center[1];
|
||||||
|
break;
|
||||||
|
case 8:
|
||||||
|
*((double*)param)=(inst->invertrot ? 1.0 : 0.0);
|
||||||
|
break;
|
||||||
|
case 9:
|
||||||
|
*((double*)param)=(inst->dontblank ? 1.0 : 0.0);
|
||||||
|
break;
|
||||||
|
case 10:
|
||||||
|
*((double*)param)=(inst->fillblack ? 1.0 : 0.0);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void f0r_update(f0r_instance_t instance,double time,
|
||||||
|
const uint32_t *inframe, uint32_t *outframe)
|
||||||
|
{
|
||||||
|
assert(instance);
|
||||||
|
|
||||||
|
tdflippo_instance_t* inst=(tdflippo_instance_t*)instance;
|
||||||
|
int i;
|
||||||
|
|
||||||
|
if(inst->rate[0]!=0.5 || inst->rate[1]!=0.5 || inst->rate[2]!=0.5 || inst->mustrecompute)
|
||||||
|
{
|
||||||
|
inst->mustrecompute=0;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* We are changing: apply change and recompute mask
|
||||||
|
*/
|
||||||
|
|
||||||
|
for(i=0;i<3;i++)
|
||||||
|
{
|
||||||
|
inst->flip[i]+=inst->rate[i]-0.5;
|
||||||
|
if(inst->flip[i]<0.0)
|
||||||
|
inst->flip[i]+=1.0;
|
||||||
|
else if(inst->flip[i]>=1.0)
|
||||||
|
inst->flip[i]-=1.0;
|
||||||
|
}
|
||||||
|
recompute_mask(inst);
|
||||||
|
}
|
||||||
|
|
||||||
|
for(i=0;i<inst->fsize;i++)
|
||||||
|
{
|
||||||
|
if(inst->mask[i]>=0)
|
||||||
|
outframe[i]=inframe[inst->mask[i]];
|
||||||
|
else if(!inst->fillblack)
|
||||||
|
outframe[i]=inframe[i];
|
||||||
|
else
|
||||||
|
outframe[i]=0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static float **newmat(unsigned char unit_flg)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
float **to_ret=malloc(sizeof(float *)*MSIZE);
|
||||||
|
|
||||||
|
for(i=0;i<MSIZE;i++)
|
||||||
|
{
|
||||||
|
to_ret[i]=calloc(MSIZE,sizeof(float));
|
||||||
|
if(unit_flg)
|
||||||
|
to_ret[i][i]=1.0;
|
||||||
|
}
|
||||||
|
|
||||||
|
return to_ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void matfree(float **mat)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
|
for(i=0;i<MSIZE;i++)
|
||||||
|
free(mat[i]);
|
||||||
|
|
||||||
|
free(mat);
|
||||||
|
}
|
||||||
|
|
||||||
|
static float **mat_translate(float tx,float ty,float tz)
|
||||||
|
{
|
||||||
|
float **mat=newmat(1);
|
||||||
|
|
||||||
|
mat[0][3]=tx;
|
||||||
|
mat[1][3]=ty;
|
||||||
|
mat[2][3]=tz;
|
||||||
|
|
||||||
|
return mat;
|
||||||
|
}
|
||||||
|
|
||||||
|
static float **mat_rotate(enum axis ax,float angle)
|
||||||
|
{
|
||||||
|
float **mat=newmat(1);
|
||||||
|
float sf=sinf(angle);
|
||||||
|
float cf=cosf(angle);
|
||||||
|
|
||||||
|
switch(ax)
|
||||||
|
{
|
||||||
|
case AXIS_X:
|
||||||
|
mat[1][1]=cf;
|
||||||
|
mat[1][2]=-sf;
|
||||||
|
mat[2][1]=sf;
|
||||||
|
mat[2][2]=cf;
|
||||||
|
break;
|
||||||
|
case AXIS_Y:
|
||||||
|
mat[0][0]=cf;
|
||||||
|
mat[0][2]=sf;
|
||||||
|
mat[2][0]=-sf;
|
||||||
|
mat[2][2]=cf;
|
||||||
|
break;
|
||||||
|
case AXIS_Z:
|
||||||
|
mat[0][0]=cf;
|
||||||
|
mat[0][1]=-sf;
|
||||||
|
mat[1][0]=sf;
|
||||||
|
mat[1][1]=cf;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return mat;
|
||||||
|
}
|
||||||
|
|
||||||
|
static float **matmult(float **mat1,float **mat2)
|
||||||
|
{
|
||||||
|
float **mat=newmat(0);
|
||||||
|
int i,j,k;
|
||||||
|
|
||||||
|
for(i=0;i<MSIZE;i++)
|
||||||
|
for(j=0;j<MSIZE;j++)
|
||||||
|
for(k=0;k<MSIZE;k++)
|
||||||
|
mat[i][j]+=mat1[i][k]*mat2[k][j];
|
||||||
|
|
||||||
|
matfree(mat1);
|
||||||
|
matfree(mat2);
|
||||||
|
|
||||||
|
return mat;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void vetmat(float **mat,float *x,float *y,float *z)
|
||||||
|
{
|
||||||
|
float v;
|
||||||
|
float vet[]={*x,*y,*z,1.0};
|
||||||
|
float *vetp[]={x,y,z,&v};
|
||||||
|
int i,j;
|
||||||
|
|
||||||
|
for(i=0;i<MSIZE;i++)
|
||||||
|
{
|
||||||
|
*(vetp[i])=0.0;
|
||||||
|
|
||||||
|
for(j=0;j<MSIZE;j++)
|
||||||
|
*(vetp[i])+=mat[i][j]*vet[j];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void recompute_mask(tdflippo_instance_t* inst)
|
||||||
|
{
|
||||||
|
float xpos=(float)inst->width*inst->center[0];
|
||||||
|
float ypos=(float)inst->height*inst->center[1];
|
||||||
|
float **mat=mat_translate(xpos,ypos,0.0);
|
||||||
|
|
||||||
|
if(inst->flip[0]!=0.5)
|
||||||
|
mat=matmult(mat,mat_rotate(AXIS_X,(inst->flip[0]-0.5)*TWO_PI));
|
||||||
|
if(inst->flip[1]!=0.5)
|
||||||
|
mat=matmult(mat,mat_rotate(AXIS_Y,(inst->flip[1]-0.5)*TWO_PI));
|
||||||
|
if(inst->flip[2]!=0.5)
|
||||||
|
mat=matmult(mat,mat_rotate(AXIS_Z,(inst->flip[2]-0.5)*TWO_PI));
|
||||||
|
|
||||||
|
mat=matmult(mat,mat_translate(-xpos,-ypos,0.0));
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
fprintf(stderr,"Resarra %.2f %.2f %.2f %.2f | %.2f %.2f %.2f %.2f | %.2f %.2f %.2f %.2f | %.2f %.2f %.2f %.2f\n",
|
||||||
|
mat[0][0],mat[0][1],mat[0][2],mat[0][3],
|
||||||
|
mat[1][0],mat[1][1],mat[1][2],mat[1][3],
|
||||||
|
mat[2][0],mat[2][1],mat[2][2],mat[2][3],
|
||||||
|
mat[3][0],mat[3][1],mat[3][2],mat[3][3]);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
int x,y,nx,ny,pos;
|
||||||
|
float xf,yf,zf;
|
||||||
|
|
||||||
|
if(!inst->dontblank)
|
||||||
|
memset(inst->mask,0xff,sizeof(int)*inst->fsize);
|
||||||
|
|
||||||
|
for(y=0,pos=0;y<inst->height;y++)
|
||||||
|
for(x=0;x<inst->width;x++,pos++)
|
||||||
|
{
|
||||||
|
xf=x;
|
||||||
|
yf=y;
|
||||||
|
zf=0.0;
|
||||||
|
vetmat(mat,&xf,&yf,&zf);
|
||||||
|
nx=(int)(xf+0.5);
|
||||||
|
ny=(int)(yf+0.5);
|
||||||
|
|
||||||
|
if(nx>=0 && nx<inst->width && ny>=0 && ny<inst->height)
|
||||||
|
{
|
||||||
|
if(!inst->invertrot)
|
||||||
|
inst->mask[ny*inst->width+nx]=pos;
|
||||||
|
else
|
||||||
|
inst->mask[pos]=ny*inst->width+nx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
94
frei0r-autoconf/src/filter/RGB/B.c
Normal file
@@ -0,0 +1,94 @@
|
|||||||
|
/* B.c
|
||||||
|
* Copyright (C) 2007 Richard Spindler (richard.spindler@gmail.com)
|
||||||
|
* This file is a Frei0r plugin.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <assert.h>
|
||||||
|
|
||||||
|
#include "frei0r.h"
|
||||||
|
|
||||||
|
typedef struct rgb_instance
|
||||||
|
{
|
||||||
|
unsigned int width;
|
||||||
|
unsigned int height;
|
||||||
|
} rgb_instance_t;
|
||||||
|
|
||||||
|
int f0r_init()
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
void f0r_deinit()
|
||||||
|
{ /* no initialization required */ }
|
||||||
|
|
||||||
|
void f0r_get_plugin_info(f0r_plugin_info_t* rgbInfo)
|
||||||
|
{
|
||||||
|
rgbInfo->name = "B";
|
||||||
|
rgbInfo->author = "Richard Spindler";
|
||||||
|
rgbInfo->plugin_type = F0R_PLUGIN_TYPE_FILTER;
|
||||||
|
rgbInfo->color_model = F0R_COLOR_MODEL_RGBA8888;
|
||||||
|
rgbInfo->frei0r_version = FREI0R_MAJOR_VERSION;
|
||||||
|
rgbInfo->major_version = 0;
|
||||||
|
rgbInfo->minor_version = 9;
|
||||||
|
rgbInfo->num_params = 0;
|
||||||
|
rgbInfo->explanation = "Extracts Blue from Image";
|
||||||
|
}
|
||||||
|
|
||||||
|
void f0r_get_param_info(f0r_param_info_t* info, int param_index)
|
||||||
|
{
|
||||||
|
/* no params */
|
||||||
|
}
|
||||||
|
|
||||||
|
f0r_instance_t f0r_construct(unsigned int width, unsigned int height)
|
||||||
|
{
|
||||||
|
rgb_instance_t* inst =
|
||||||
|
(rgb_instance_t*)malloc(sizeof(rgb_instance_t));
|
||||||
|
inst->width = width; inst->height = height;
|
||||||
|
return (f0r_instance_t)inst;
|
||||||
|
}
|
||||||
|
|
||||||
|
void f0r_destruct(f0r_instance_t instance)
|
||||||
|
{
|
||||||
|
free(instance);
|
||||||
|
}
|
||||||
|
|
||||||
|
void f0r_set_param_value(f0r_instance_t instance,
|
||||||
|
f0r_param_t param, int param_index)
|
||||||
|
{ /* no params */ }
|
||||||
|
|
||||||
|
void f0r_get_param_value(f0r_instance_t instance,
|
||||||
|
f0r_param_t param, int param_index)
|
||||||
|
{ /* no params */ }
|
||||||
|
|
||||||
|
void f0r_update(f0r_instance_t instance, double time,
|
||||||
|
const uint32_t* inframe, uint32_t* outframe)
|
||||||
|
{
|
||||||
|
assert(instance);
|
||||||
|
rgb_instance_t* inst = (rgb_instance_t*)instance;
|
||||||
|
unsigned int w = inst->width;
|
||||||
|
unsigned int h = inst->height;
|
||||||
|
unsigned int x,y;
|
||||||
|
|
||||||
|
uint32_t* dst = outframe;
|
||||||
|
const uint32_t* src = inframe;
|
||||||
|
for(y=0;y<h;++y)
|
||||||
|
for(x=0;x<w;++x,++src) {
|
||||||
|
*dst++ = ( 0xffff0000 & (*src) ) | ( (0x00ff0000 & (*src)) >> 8 ) | ((0x00ff0000 & (*src)) >> 16 ) ;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
94
frei0r-autoconf/src/filter/RGB/G.c
Normal file
@@ -0,0 +1,94 @@
|
|||||||
|
/* G.c
|
||||||
|
* Copyright (C) 2007 Richard Spindler (richard.spindler@gmail.com)
|
||||||
|
* This file is a Frei0r plugin.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <assert.h>
|
||||||
|
|
||||||
|
#include "frei0r.h"
|
||||||
|
|
||||||
|
typedef struct rgb_instance
|
||||||
|
{
|
||||||
|
unsigned int width;
|
||||||
|
unsigned int height;
|
||||||
|
} rgb_instance_t;
|
||||||
|
|
||||||
|
int f0r_init()
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
void f0r_deinit()
|
||||||
|
{ /* no initialization required */ }
|
||||||
|
|
||||||
|
void f0r_get_plugin_info(f0r_plugin_info_t* rgbInfo)
|
||||||
|
{
|
||||||
|
rgbInfo->name = "G";
|
||||||
|
rgbInfo->author = "Richard Spindler";
|
||||||
|
rgbInfo->plugin_type = F0R_PLUGIN_TYPE_FILTER;
|
||||||
|
rgbInfo->color_model = F0R_COLOR_MODEL_RGBA8888;
|
||||||
|
rgbInfo->frei0r_version = FREI0R_MAJOR_VERSION;
|
||||||
|
rgbInfo->major_version = 0;
|
||||||
|
rgbInfo->minor_version = 9;
|
||||||
|
rgbInfo->num_params = 0;
|
||||||
|
rgbInfo->explanation = "Extracts Green from Image";
|
||||||
|
}
|
||||||
|
|
||||||
|
void f0r_get_param_info(f0r_param_info_t* info, int param_index)
|
||||||
|
{
|
||||||
|
/* no params */
|
||||||
|
}
|
||||||
|
|
||||||
|
f0r_instance_t f0r_construct(unsigned int width, unsigned int height)
|
||||||
|
{
|
||||||
|
rgb_instance_t* inst =
|
||||||
|
(rgb_instance_t*)malloc(sizeof(rgb_instance_t));
|
||||||
|
inst->width = width; inst->height = height;
|
||||||
|
return (f0r_instance_t)inst;
|
||||||
|
}
|
||||||
|
|
||||||
|
void f0r_destruct(f0r_instance_t instance)
|
||||||
|
{
|
||||||
|
free(instance);
|
||||||
|
}
|
||||||
|
|
||||||
|
void f0r_set_param_value(f0r_instance_t instance,
|
||||||
|
f0r_param_t param, int param_index)
|
||||||
|
{ /* no params */ }
|
||||||
|
|
||||||
|
void f0r_get_param_value(f0r_instance_t instance,
|
||||||
|
f0r_param_t param, int param_index)
|
||||||
|
{ /* no params */ }
|
||||||
|
|
||||||
|
void f0r_update(f0r_instance_t instance, double time,
|
||||||
|
const uint32_t* inframe, uint32_t* outframe)
|
||||||
|
{
|
||||||
|
assert(instance);
|
||||||
|
rgb_instance_t* inst = (rgb_instance_t*)instance;
|
||||||
|
unsigned int w = inst->width;
|
||||||
|
unsigned int h = inst->height;
|
||||||
|
unsigned int x,y;
|
||||||
|
|
||||||
|
uint32_t* dst = outframe;
|
||||||
|
const uint32_t* src = inframe;
|
||||||
|
for(y=0;y<h;++y)
|
||||||
|
for(x=0;x<w;++x,++src) {
|
||||||
|
*dst++ = ( 0xff00ff00 & (*src) ) | ( (0x0000ff00 & (*src)) << 8 ) | ( (0x0000ff00 & (*src)) >> 8 ) ;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
94
frei0r-autoconf/src/filter/RGB/R.c
Normal file
@@ -0,0 +1,94 @@
|
|||||||
|
/* R.c
|
||||||
|
* Copyright (C) 2007 Richard Spindler (richard.spindler@gmail.com)
|
||||||
|
* This file is a Frei0r plugin.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <assert.h>
|
||||||
|
|
||||||
|
#include "frei0r.h"
|
||||||
|
|
||||||
|
typedef struct rgb_instance
|
||||||
|
{
|
||||||
|
unsigned int width;
|
||||||
|
unsigned int height;
|
||||||
|
} rgb_instance_t;
|
||||||
|
|
||||||
|
int f0r_init()
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
void f0r_deinit()
|
||||||
|
{ /* no initialization required */ }
|
||||||
|
|
||||||
|
void f0r_get_plugin_info(f0r_plugin_info_t* rgbInfo)
|
||||||
|
{
|
||||||
|
rgbInfo->name = "R";
|
||||||
|
rgbInfo->author = "Richard Spindler";
|
||||||
|
rgbInfo->plugin_type = F0R_PLUGIN_TYPE_FILTER;
|
||||||
|
rgbInfo->color_model = F0R_COLOR_MODEL_RGBA8888;
|
||||||
|
rgbInfo->frei0r_version = FREI0R_MAJOR_VERSION;
|
||||||
|
rgbInfo->major_version = 0;
|
||||||
|
rgbInfo->minor_version = 9;
|
||||||
|
rgbInfo->num_params = 0;
|
||||||
|
rgbInfo->explanation = "Extracts Red from Image";
|
||||||
|
}
|
||||||
|
|
||||||
|
void f0r_get_param_info(f0r_param_info_t* info, int param_index)
|
||||||
|
{
|
||||||
|
/* no params */
|
||||||
|
}
|
||||||
|
|
||||||
|
f0r_instance_t f0r_construct(unsigned int width, unsigned int height)
|
||||||
|
{
|
||||||
|
rgb_instance_t* inst =
|
||||||
|
(rgb_instance_t*)malloc(sizeof(rgb_instance_t));
|
||||||
|
inst->width = width; inst->height = height;
|
||||||
|
return (f0r_instance_t)inst;
|
||||||
|
}
|
||||||
|
|
||||||
|
void f0r_destruct(f0r_instance_t instance)
|
||||||
|
{
|
||||||
|
free(instance);
|
||||||
|
}
|
||||||
|
|
||||||
|
void f0r_set_param_value(f0r_instance_t instance,
|
||||||
|
f0r_param_t param, int param_index)
|
||||||
|
{ /* no params */ }
|
||||||
|
|
||||||
|
void f0r_get_param_value(f0r_instance_t instance,
|
||||||
|
f0r_param_t param, int param_index)
|
||||||
|
{ /* no params */ }
|
||||||
|
|
||||||
|
void f0r_update(f0r_instance_t instance, double time,
|
||||||
|
const uint32_t* inframe, uint32_t* outframe)
|
||||||
|
{
|
||||||
|
assert(instance);
|
||||||
|
rgb_instance_t* inst = (rgb_instance_t*)instance;
|
||||||
|
unsigned int w = inst->width;
|
||||||
|
unsigned int h = inst->height;
|
||||||
|
unsigned int x,y;
|
||||||
|
|
||||||
|
uint32_t* dst = outframe;
|
||||||
|
const uint32_t* src = inframe;
|
||||||
|
for(y=0;y<h;++y)
|
||||||
|
for(x=0;x<w;++x,++src) {
|
||||||
|
*dst++ = ( 0xff0000ff & (*src) ) | ( (0x000000ff & (*src)) << 8 ) | ( (0x000000ff & (*src)) << 16 ) ;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
155
frei0r-autoconf/src/filter/brightness/brightness.c
Normal file
@@ -0,0 +1,155 @@
|
|||||||
|
/* brightness.c
|
||||||
|
* Copyright (C) 2004 Jean-Sebastien Senecal (js@drone.ws)
|
||||||
|
* This file is a Frei0r plugin.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <assert.h>
|
||||||
|
|
||||||
|
#include "frei0r.h"
|
||||||
|
#include "frei0r_math.h"
|
||||||
|
|
||||||
|
typedef struct brightness_instance
|
||||||
|
{
|
||||||
|
unsigned int width;
|
||||||
|
unsigned int height;
|
||||||
|
int brightness; /* the brightness [-256, 256] */
|
||||||
|
unsigned char lut[256]; /* look-up table */
|
||||||
|
} brightness_instance_t;
|
||||||
|
|
||||||
|
/* Updates the look-up-table. */
|
||||||
|
void update_lut(brightness_instance_t *inst)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
unsigned char *lut = inst->lut;
|
||||||
|
int brightness = inst->brightness;
|
||||||
|
|
||||||
|
if (brightness < 0)
|
||||||
|
{
|
||||||
|
for (i=0; i<256; ++i)
|
||||||
|
lut[i] = CLAMP0255((i * (256 + brightness))>>8);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
for (i=0; i<256; ++i)
|
||||||
|
lut[i] = CLAMP0255(i + (((256 - i) * brightness)>>8));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
int f0r_init()
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
void f0r_deinit()
|
||||||
|
{ /* no initialization required */ }
|
||||||
|
|
||||||
|
void f0r_get_plugin_info(f0r_plugin_info_t* brightness_info)
|
||||||
|
{
|
||||||
|
brightness_info->name = "Brightness";
|
||||||
|
brightness_info->author = "Jean-Sebastien Senecal";
|
||||||
|
brightness_info->plugin_type = F0R_PLUGIN_TYPE_FILTER;
|
||||||
|
brightness_info->color_model = F0R_COLOR_MODEL_RGBA8888;
|
||||||
|
brightness_info->frei0r_version = FREI0R_MAJOR_VERSION;
|
||||||
|
brightness_info->major_version = 0;
|
||||||
|
brightness_info->minor_version = 2;
|
||||||
|
brightness_info->num_params = 1;
|
||||||
|
brightness_info->explanation = "Adjusts the brightness of a source image";
|
||||||
|
}
|
||||||
|
|
||||||
|
void f0r_get_param_info(f0r_param_info_t* info, int param_index)
|
||||||
|
{
|
||||||
|
switch(param_index)
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
info->name = "Brightness";
|
||||||
|
info->type = F0R_PARAM_DOUBLE;
|
||||||
|
info->explanation = "The brightness value";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
f0r_instance_t f0r_construct(unsigned int width, unsigned int height)
|
||||||
|
{
|
||||||
|
brightness_instance_t* inst =
|
||||||
|
(brightness_instance_t*)malloc(sizeof(brightness_instance_t));
|
||||||
|
inst->width = width; inst->height = height;
|
||||||
|
/* init look-up-table */
|
||||||
|
inst->brightness = 0;
|
||||||
|
update_lut(inst);
|
||||||
|
return (f0r_instance_t)inst;
|
||||||
|
}
|
||||||
|
|
||||||
|
void f0r_destruct(f0r_instance_t instance)
|
||||||
|
{
|
||||||
|
free(instance);
|
||||||
|
}
|
||||||
|
|
||||||
|
void f0r_set_param_value(f0r_instance_t instance,
|
||||||
|
f0r_param_t param, int param_index)
|
||||||
|
{
|
||||||
|
assert(instance);
|
||||||
|
brightness_instance_t* inst = (brightness_instance_t*)instance;
|
||||||
|
|
||||||
|
switch(param_index)
|
||||||
|
{
|
||||||
|
int val;
|
||||||
|
case 0:
|
||||||
|
/* constrast */
|
||||||
|
val = (int) ((*((double*)param) - 0.5) * 512.0); /* remap to [-256, 256] */
|
||||||
|
if (val != inst->brightness)
|
||||||
|
{
|
||||||
|
inst->brightness = val;
|
||||||
|
update_lut(inst);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void f0r_get_param_value(f0r_instance_t instance,
|
||||||
|
f0r_param_t param, int param_index)
|
||||||
|
{
|
||||||
|
assert(instance);
|
||||||
|
brightness_instance_t* inst = (brightness_instance_t*)instance;
|
||||||
|
|
||||||
|
switch(param_index)
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
*((double*)param) = (double) ( (inst->brightness + 256.0) / 512.0 );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void f0r_update(f0r_instance_t instance, double time,
|
||||||
|
const uint32_t* inframe, uint32_t* outframe)
|
||||||
|
{
|
||||||
|
assert(instance);
|
||||||
|
brightness_instance_t* inst = (brightness_instance_t*)instance;
|
||||||
|
unsigned int len = inst->width * inst->height;
|
||||||
|
|
||||||
|
unsigned char* lut = inst->lut;
|
||||||
|
unsigned char* dst = (unsigned char*)outframe;
|
||||||
|
const unsigned char* src = (unsigned char*)inframe;
|
||||||
|
while (len--)
|
||||||
|
{
|
||||||
|
*dst++ = lut[*src++];
|
||||||
|
*dst++ = lut[*src++];
|
||||||
|
*dst++ = lut[*src++];
|
||||||
|
*dst++ = *src++;// copy alpha
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
78
frei0r-autoconf/src/filter/bw0r/bw0r.c
Normal file
@@ -0,0 +1,78 @@
|
|||||||
|
#include "frei0r.h"
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <assert.h>
|
||||||
|
|
||||||
|
typedef struct blackwhite_instance
|
||||||
|
{
|
||||||
|
unsigned int width;
|
||||||
|
unsigned int height;
|
||||||
|
} blackwhite_instance_t;
|
||||||
|
|
||||||
|
int f0r_init()
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
void f0r_deinit()
|
||||||
|
{ /* no initialization required */ }
|
||||||
|
|
||||||
|
void f0r_get_plugin_info(f0r_plugin_info_t* blackwhiteInfo)
|
||||||
|
{
|
||||||
|
blackwhiteInfo->name = "bw0r";
|
||||||
|
blackwhiteInfo->author = "coma@gephex.org";
|
||||||
|
blackwhiteInfo->plugin_type = F0R_PLUGIN_TYPE_FILTER;
|
||||||
|
blackwhiteInfo->color_model = F0R_COLOR_MODEL_RGBA8888;
|
||||||
|
blackwhiteInfo->frei0r_version = FREI0R_MAJOR_VERSION;
|
||||||
|
blackwhiteInfo->major_version = 0;
|
||||||
|
blackwhiteInfo->minor_version = 9;
|
||||||
|
blackwhiteInfo->num_params = 0;
|
||||||
|
blackwhiteInfo->explanation = "Turns image black/white.";
|
||||||
|
}
|
||||||
|
|
||||||
|
void f0r_get_param_info(f0r_param_info_t* info, int param_index)
|
||||||
|
{
|
||||||
|
/* no params */
|
||||||
|
}
|
||||||
|
|
||||||
|
f0r_instance_t f0r_construct(unsigned int width, unsigned int height)
|
||||||
|
{
|
||||||
|
blackwhite_instance_t* inst =
|
||||||
|
(blackwhite_instance_t*)malloc(sizeof(blackwhite_instance_t));
|
||||||
|
inst->width = width; inst->height = height;
|
||||||
|
return (f0r_instance_t)inst;
|
||||||
|
}
|
||||||
|
|
||||||
|
void f0r_destruct(f0r_instance_t instance)
|
||||||
|
{
|
||||||
|
free(instance);
|
||||||
|
}
|
||||||
|
|
||||||
|
void f0r_set_param_value(f0r_instance_t instance,
|
||||||
|
f0r_param_t param, int param_index)
|
||||||
|
{ /* no params */ }
|
||||||
|
|
||||||
|
void f0r_get_param_value(f0r_instance_t instance,
|
||||||
|
f0r_param_t param, int param_index)
|
||||||
|
{ /* no params */ }
|
||||||
|
|
||||||
|
void f0r_update(f0r_instance_t instance, double time,
|
||||||
|
const uint32_t* inframe, uint32_t* outframe)
|
||||||
|
{
|
||||||
|
assert(instance);
|
||||||
|
blackwhite_instance_t* inst = (blackwhite_instance_t*)instance;
|
||||||
|
unsigned int w = inst->width;
|
||||||
|
unsigned int h = inst->height;
|
||||||
|
unsigned int x,y;
|
||||||
|
|
||||||
|
uint32_t* dst = outframe;
|
||||||
|
const uint32_t* src = inframe;
|
||||||
|
for(y=h;y>0;--y)
|
||||||
|
for(x=w;x>0;--x,++src,++dst)
|
||||||
|
{
|
||||||
|
int tmpbw;
|
||||||
|
unsigned char* tmpc = (unsigned char*)src;
|
||||||
|
tmpbw = (tmpc[0] + tmpc[1] + tmpc[2]) / 3;
|
||||||
|
*dst = (tmpc[3] << 24) | (tmpbw << 16) | (tmpbw << 8) | tmpbw;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
BIN
frei0r-autoconf/src/filter/bw0r/bw0r_post.jpg
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
frei0r-autoconf/src/filter/bw0r/bw0r_pre.jpg
Normal file
|
After Width: | Height: | Size: 16 KiB |
193
frei0r-autoconf/src/filter/cartoon/cartoon.cpp
Normal file
@@ -0,0 +1,193 @@
|
|||||||
|
/* Cartoon filter
|
||||||
|
* main algorithm: (c) Copyright 2003 Dries Pruimboom <dries@irssystems.nl>
|
||||||
|
* further optimizations and frei0r port by Denis Rojo <jaromil@dyne.org>
|
||||||
|
*
|
||||||
|
* This source code is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Public License as published
|
||||||
|
* by the Free Software Foundation; either version 2 of the License,
|
||||||
|
* or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This source code is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
* Please refer to the GNU Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Public License along with
|
||||||
|
* this source code; if not, write to:
|
||||||
|
* Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
*
|
||||||
|
* "$Id: cartoon.c 193 2004-06-01 11:00:25Z jaromil $"
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <math.h>
|
||||||
|
|
||||||
|
#include <frei0r.hpp>
|
||||||
|
|
||||||
|
#define RED(n) ((n>>16) & 0x000000FF)
|
||||||
|
#define GREEN(n) ((n>>8) & 0x000000FF)
|
||||||
|
#define BLUE(n) (n & 0x000000FF)
|
||||||
|
#define RGB(r,g,b) ((r<<16) + (g <<8) + (b))
|
||||||
|
|
||||||
|
#define BOOST(n) { \
|
||||||
|
if((*p = *p<<4)<0)>>n; \
|
||||||
|
*(p+1) = (*(p+1)<<4)>>n; \
|
||||||
|
*(p+2) = (*(p+2)<<4)>>n; }
|
||||||
|
|
||||||
|
/* setup some data to identify the plugin */
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
int16_t w;
|
||||||
|
int16_t h;
|
||||||
|
uint8_t bpp;
|
||||||
|
uint32_t size;
|
||||||
|
} ScreenGeometry;
|
||||||
|
|
||||||
|
#define PIXELAT(x1,y1,s) ((s)+(x1)+ yprecal[y1])// (y1)*(geo->w)))
|
||||||
|
#define GMERROR(cc1,cc2) ((((RED(cc1)-RED(cc2))*(RED(cc1)-RED(cc2))) + \
|
||||||
|
((GREEN(cc1)-GREEN(cc2)) *(GREEN(cc1)-GREEN(cc2))) + \
|
||||||
|
((BLUE(cc1)-BLUE(cc2))*(BLUE(cc1)-BLUE(cc2)))))
|
||||||
|
|
||||||
|
class Cartoon: public frei0r::filter {
|
||||||
|
public:
|
||||||
|
|
||||||
|
f0r_param_double triplevel;
|
||||||
|
f0r_param_double diffspace;
|
||||||
|
|
||||||
|
Cartoon(unsigned int width, unsigned int height) {
|
||||||
|
int c;
|
||||||
|
register_param(triplevel, "triplevel", "level of trip: use high numbers, incremented by 100");
|
||||||
|
register_param(diffspace, "diffspace", "difference space: a value from 0 to 256");
|
||||||
|
|
||||||
|
geo = new ScreenGeometry();
|
||||||
|
geo->w = width;
|
||||||
|
geo->h = height;
|
||||||
|
geo->size = width*height*sizeof(uint32_t);
|
||||||
|
|
||||||
|
if ( geo->size > 0 ) {
|
||||||
|
prePixBuffer = (int32_t*)malloc(geo->size);
|
||||||
|
conBuffer = (int32_t*)malloc(geo->size);
|
||||||
|
|
||||||
|
yprecal = (int*)malloc(geo->h*2*sizeof(int));
|
||||||
|
}
|
||||||
|
for(c=0;c<geo->h*2;c++)
|
||||||
|
yprecal[c] = geo->w*c;
|
||||||
|
for(c=0;c<256;c++)
|
||||||
|
powprecal[c] = c*c;
|
||||||
|
black = 0xFF000000;
|
||||||
|
|
||||||
|
triplevel = 1000;
|
||||||
|
diffspace = 1;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
~Cartoon() {
|
||||||
|
if ( geo->size > 0 ) {
|
||||||
|
free(prePixBuffer);
|
||||||
|
free(conBuffer);
|
||||||
|
free(yprecal);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual void update() {
|
||||||
|
// Cartoonify picture, do a form of edge detect
|
||||||
|
int x, y, t;
|
||||||
|
|
||||||
|
|
||||||
|
for (x=(int)diffspace;x<geo->w-(1+(int)diffspace);x++) {
|
||||||
|
|
||||||
|
for (y=(int)diffspace;y<geo->h-(1+(int)diffspace);y++) {
|
||||||
|
|
||||||
|
t = GetMaxContrast((int32_t*)in,x,y);
|
||||||
|
if (t > triplevel) {
|
||||||
|
|
||||||
|
// Make a border pixel
|
||||||
|
*(out+x+yprecal[y]) = black;
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
// Copy original color
|
||||||
|
*(out+x+yprecal[y]) = *(in+x+yprecal[y]);
|
||||||
|
FlattenColor((int32_t*)out+x+yprecal[y]);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
ScreenGeometry *geo;
|
||||||
|
/* buffer where to copy the screen
|
||||||
|
a pointer to it is being given back by process() */
|
||||||
|
|
||||||
|
int32_t *prePixBuffer;
|
||||||
|
int32_t *conBuffer;
|
||||||
|
int *yprecal;
|
||||||
|
uint16_t powprecal[256];
|
||||||
|
int32_t black;
|
||||||
|
|
||||||
|
void FlattenColor(int32_t *c);
|
||||||
|
long GetMaxContrast(int32_t *src,int x,int y);
|
||||||
|
|
||||||
|
inline uint16_t gmerror(int32_t a, int32_t b);
|
||||||
|
};
|
||||||
|
|
||||||
|
/* the following should be faster on older CPUs
|
||||||
|
but runs slower than the GMERROR define on SSE units*/
|
||||||
|
inline uint16_t Cartoon::gmerror(int32_t a, int32_t b) {
|
||||||
|
register int dr, dg, db;
|
||||||
|
if((dr = RED(a) - RED(b)) < 0) dr = -dr;
|
||||||
|
if((dg = GREEN(a) - GREEN(b)) < 0) dg = -dg;
|
||||||
|
if((db = BLUE(a) - BLUE(b)) < 0) db = -db;
|
||||||
|
return(powprecal[dr]+powprecal[dg]+powprecal[db]);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Cartoon::FlattenColor(int32_t *c) {
|
||||||
|
// (*c) = RGB(40*(RED(*c)/40),40*(GREEN(*c)/40),40*(BLUE(*c)/40)); */
|
||||||
|
uint8_t *p;
|
||||||
|
p = (uint8_t*)c;
|
||||||
|
(*p) = ((*p)>>5)<<5; p++;
|
||||||
|
(*p) = ((*p)>>5)<<5; p++;
|
||||||
|
(*p) = ((*p)>>5)<<5;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
long Cartoon::GetMaxContrast(int32_t *src,int x,int y) {
|
||||||
|
int32_t c1,c2;
|
||||||
|
long error,max=0;
|
||||||
|
|
||||||
|
/* Assumes PrePixelModify has been run */
|
||||||
|
c1 = *PIXELAT(x-(int)diffspace,y,src);
|
||||||
|
c2 = *PIXELAT(x+(int)diffspace,y,src);
|
||||||
|
error = GMERROR(c1,c2);
|
||||||
|
if (error>max) max = error;
|
||||||
|
|
||||||
|
c1 = *PIXELAT(x,y-(int)diffspace,src);
|
||||||
|
c2 = *PIXELAT(x,y+(int)diffspace,src);
|
||||||
|
error = GMERROR(c1,c2);
|
||||||
|
if (error>max) max = error;
|
||||||
|
|
||||||
|
c1 = *PIXELAT(x-(int)diffspace,y-(int)diffspace,src);
|
||||||
|
c2 = *PIXELAT(x+(int)diffspace,y+(int)diffspace,src);
|
||||||
|
error = GMERROR(c1,c2);
|
||||||
|
if (error>max) max = error;
|
||||||
|
|
||||||
|
c1 = *PIXELAT(x+(int)diffspace,y-(int)diffspace,src);
|
||||||
|
c2 = *PIXELAT(x-(int)diffspace,y+(int)diffspace,src);
|
||||||
|
error = GMERROR(c1,c2);
|
||||||
|
if (error>max) max = error;
|
||||||
|
|
||||||
|
return(max);
|
||||||
|
}
|
||||||
|
|
||||||
|
frei0r::construct<Cartoon> plugin("Cartoon",
|
||||||
|
"Cartoonify video, do a form of edge detect",
|
||||||
|
"Dries Pruimboom, Jaromil",
|
||||||
|
2,0);
|
||||||
|
|
||||||
|
|
||||||
148
frei0r-autoconf/src/filter/colordistance/colordistance.c
Normal file
@@ -0,0 +1,148 @@
|
|||||||
|
/* colordistance.c
|
||||||
|
* Copyright (C) 2007 Richard Spindler (richard.spindler@gmail.com)
|
||||||
|
* This file is a Frei0r plugin.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <assert.h>
|
||||||
|
#include <math.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
#include "frei0r.h"
|
||||||
|
#include "frei0r_math.h"
|
||||||
|
|
||||||
|
typedef struct colordistance_instance
|
||||||
|
{
|
||||||
|
unsigned int width;
|
||||||
|
unsigned int height;
|
||||||
|
f0r_param_color_t color;
|
||||||
|
} colordistance_instance_t;
|
||||||
|
|
||||||
|
int f0r_init()
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
void f0r_deinit()
|
||||||
|
{ /* no initialization required */ }
|
||||||
|
|
||||||
|
void f0r_get_plugin_info(f0r_plugin_info_t* colordistance_info)
|
||||||
|
{
|
||||||
|
colordistance_info->name = "Color Distance";
|
||||||
|
colordistance_info->author = "Richard Spindler";
|
||||||
|
colordistance_info->plugin_type = F0R_PLUGIN_TYPE_FILTER;
|
||||||
|
colordistance_info->color_model = F0R_COLOR_MODEL_RGBA8888;
|
||||||
|
colordistance_info->frei0r_version = FREI0R_MAJOR_VERSION;
|
||||||
|
colordistance_info->major_version = 0;
|
||||||
|
colordistance_info->minor_version = 2;
|
||||||
|
colordistance_info->num_params = 1;
|
||||||
|
colordistance_info->explanation = "";//"Calculates the distance between the selected color and the current pixel and uses that value as new pixel value";
|
||||||
|
}
|
||||||
|
|
||||||
|
void f0r_get_param_info(f0r_param_info_t* info, int param_index)
|
||||||
|
{
|
||||||
|
switch(param_index)
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
info->name = "Color";
|
||||||
|
info->type = F0R_PARAM_COLOR;
|
||||||
|
info->explanation = "The Source Color";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
f0r_instance_t f0r_construct(unsigned int width, unsigned int height)
|
||||||
|
{
|
||||||
|
colordistance_instance_t* inst =
|
||||||
|
(colordistance_instance_t*)malloc(sizeof(colordistance_instance_t));
|
||||||
|
inst->width = width; inst->height = height;
|
||||||
|
inst->color.r = 0.5;
|
||||||
|
inst->color.g = 0.5;
|
||||||
|
inst->color.b = 0.5;
|
||||||
|
return (f0r_instance_t)inst;
|
||||||
|
}
|
||||||
|
|
||||||
|
void f0r_destruct(f0r_instance_t instance)
|
||||||
|
{
|
||||||
|
free(instance);
|
||||||
|
}
|
||||||
|
|
||||||
|
void f0r_set_param_value(f0r_instance_t instance,
|
||||||
|
f0r_param_t param, int param_index)
|
||||||
|
{
|
||||||
|
assert(instance);
|
||||||
|
colordistance_instance_t* inst = (colordistance_instance_t*)instance;
|
||||||
|
|
||||||
|
switch(param_index) {
|
||||||
|
case 0:
|
||||||
|
inst->color = *((f0r_param_color_t*)param);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void f0r_get_param_value(f0r_instance_t instance,
|
||||||
|
f0r_param_t param, int param_index)
|
||||||
|
{
|
||||||
|
assert(instance);
|
||||||
|
colordistance_instance_t* inst = (colordistance_instance_t*)instance;
|
||||||
|
|
||||||
|
switch(param_index) {
|
||||||
|
case 0:
|
||||||
|
*((f0r_param_color_t*)param) = inst->color;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void f0r_update(f0r_instance_t instance, double time,
|
||||||
|
const uint32_t* inframe, uint32_t* outframe)
|
||||||
|
{
|
||||||
|
assert(instance);
|
||||||
|
colordistance_instance_t* inst = (colordistance_instance_t*)instance;
|
||||||
|
unsigned int len = inst->width * inst->height;
|
||||||
|
|
||||||
|
|
||||||
|
unsigned char* dst = (unsigned char*)outframe;
|
||||||
|
const unsigned char* src = (unsigned char*)inframe;
|
||||||
|
|
||||||
|
float r1 = inst->color.r * 255.0;
|
||||||
|
float g1 = inst->color.g * 255.0;
|
||||||
|
float b1 = inst->color.b * 255.0;
|
||||||
|
float r2, g2, b2;
|
||||||
|
int l;
|
||||||
|
while (len--) {
|
||||||
|
r2 = *src++;
|
||||||
|
g2 = *src++;
|
||||||
|
b2 = *src++;
|
||||||
|
l = (int)rint( sqrtf( powf( r1 - r2, 2 ) + powf( g1 - g2, 2 ) + powf( b1 - b2, 2 ) ) * 0.705724361914764 );
|
||||||
|
/* Hint 0.35320727852735 == 255.0 / sqrt( (255)**2 + (255)**2 + (255)*2 )*/
|
||||||
|
if ( r1 < 0 || r1 > 255 || g1 < 0 || g1 > 255 || b1 < 0 || b1 > 255 || r2 < 0 || r2 > 255 || g2 < 0 || g2 > 255 || b2 < 0 || b2 > 255 ) {
|
||||||
|
printf ("%f %f %f\n", r2, g2, b2 );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
*dst++ = (unsigned char) (l);
|
||||||
|
*dst++ = (unsigned char) (l);
|
||||||
|
*dst++ = (unsigned char) (l);
|
||||||
|
|
||||||
|
*dst++ = *src++; // copy alpha
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
148
frei0r-autoconf/src/filter/contrast0r/contrast0r.c
Normal file
@@ -0,0 +1,148 @@
|
|||||||
|
/* contrast0r.c
|
||||||
|
* Copyright (C) 2004 Jean-Sebastien Senecal (js@drone.ws)
|
||||||
|
* This file is a Frei0r plugin.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <assert.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
#include "frei0r.h"
|
||||||
|
#include "frei0r_math.h"
|
||||||
|
|
||||||
|
typedef struct contrast0r_instance
|
||||||
|
{
|
||||||
|
unsigned int width;
|
||||||
|
unsigned int height;
|
||||||
|
int contrast; /* the contrast [-256, 256] */
|
||||||
|
unsigned char lut[256]; /* look-up table */
|
||||||
|
} contrast0r_instance_t;
|
||||||
|
|
||||||
|
/* Updates the look-up-table. */
|
||||||
|
void update_lut(contrast0r_instance_t *inst)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
unsigned char *lut = inst->lut;
|
||||||
|
int contrast = inst->contrast;
|
||||||
|
for (i=0; i<128; ++i)
|
||||||
|
lut[i] = CLAMP0255(i - (((128 - i)*contrast)>>8));
|
||||||
|
for (i=128; i<256; ++i)
|
||||||
|
lut[i] = CLAMP0255(i + (((i - 128)*contrast)>>8));
|
||||||
|
}
|
||||||
|
|
||||||
|
int f0r_init()
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
void f0r_deinit()
|
||||||
|
{ /* no initialization required */ }
|
||||||
|
|
||||||
|
void f0r_get_plugin_info(f0r_plugin_info_t* contrast0r_info)
|
||||||
|
{
|
||||||
|
contrast0r_info->name = "Contrast0r";
|
||||||
|
contrast0r_info->author = "Jean-Sebastien Senecal";
|
||||||
|
contrast0r_info->plugin_type = F0R_PLUGIN_TYPE_FILTER;
|
||||||
|
contrast0r_info->color_model = F0R_COLOR_MODEL_RGBA8888;
|
||||||
|
contrast0r_info->frei0r_version = FREI0R_MAJOR_VERSION;
|
||||||
|
contrast0r_info->major_version = 0;
|
||||||
|
contrast0r_info->minor_version = 2;
|
||||||
|
contrast0r_info->num_params = 1;
|
||||||
|
contrast0r_info->explanation = "Adjusts the contrast of a source image";
|
||||||
|
}
|
||||||
|
|
||||||
|
void f0r_get_param_info(f0r_param_info_t* info, int param_index)
|
||||||
|
{
|
||||||
|
switch(param_index)
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
info->name = "Contrast";
|
||||||
|
info->type = F0R_PARAM_DOUBLE;
|
||||||
|
info->explanation = "The contrast value";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
f0r_instance_t f0r_construct(unsigned int width, unsigned int height)
|
||||||
|
{
|
||||||
|
contrast0r_instance_t* inst =
|
||||||
|
(contrast0r_instance_t*)malloc(sizeof(contrast0r_instance_t));
|
||||||
|
inst->width = width; inst->height = height;
|
||||||
|
/* init look-up-table */
|
||||||
|
inst->contrast = 0;
|
||||||
|
update_lut(inst);
|
||||||
|
return (f0r_instance_t)inst;
|
||||||
|
}
|
||||||
|
|
||||||
|
void f0r_destruct(f0r_instance_t instance)
|
||||||
|
{
|
||||||
|
free(instance);
|
||||||
|
}
|
||||||
|
|
||||||
|
void f0r_set_param_value(f0r_instance_t instance,
|
||||||
|
f0r_param_t param, int param_index)
|
||||||
|
{
|
||||||
|
assert(instance);
|
||||||
|
contrast0r_instance_t* inst = (contrast0r_instance_t*)instance;
|
||||||
|
switch(param_index)
|
||||||
|
{
|
||||||
|
int val;
|
||||||
|
case 0:
|
||||||
|
/* constrast */
|
||||||
|
val = (int) ((*((double*)param) - 0.5) * 512.0); /* remap to [-256, 256] */
|
||||||
|
if (val != inst->contrast)
|
||||||
|
{
|
||||||
|
inst->contrast = val;
|
||||||
|
update_lut(inst);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void f0r_get_param_value(f0r_instance_t instance,
|
||||||
|
f0r_param_t param, int param_index)
|
||||||
|
{
|
||||||
|
assert(instance);
|
||||||
|
contrast0r_instance_t* inst = (contrast0r_instance_t*)instance;
|
||||||
|
|
||||||
|
switch(param_index)
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
*((double*)param) = (double) ( (inst->contrast + 256.0) / 512.0 );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void f0r_update(f0r_instance_t instance, double time,
|
||||||
|
const uint32_t* inframe, uint32_t* outframe)
|
||||||
|
{
|
||||||
|
assert(instance);
|
||||||
|
contrast0r_instance_t* inst = (contrast0r_instance_t*)instance;
|
||||||
|
unsigned int len = inst->width * inst->height;
|
||||||
|
|
||||||
|
unsigned char* lut = inst->lut;
|
||||||
|
unsigned char* dst = (unsigned char*)outframe;
|
||||||
|
const unsigned char* src = (unsigned char*)inframe;
|
||||||
|
while (len--)
|
||||||
|
{
|
||||||
|
*dst++ = lut[*src++];
|
||||||
|
*dst++ = lut[*src++];
|
||||||
|
*dst++ = lut[*src++];
|
||||||
|
*dst++ = *src++; // copy alpha
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
69
frei0r-autoconf/src/filter/delay0r/delay0r.cpp
Normal file
@@ -0,0 +1,69 @@
|
|||||||
|
#include "frei0r.hpp"
|
||||||
|
|
||||||
|
#include <algorithm>
|
||||||
|
#include <vector>
|
||||||
|
#include <utility>
|
||||||
|
#include <cassert>
|
||||||
|
|
||||||
|
class delay0r : public frei0r::filter
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
delay0r(unsigned int width, unsigned int height)
|
||||||
|
{
|
||||||
|
register_param(delay,"DelayTime","the delay time");
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual void update()
|
||||||
|
{
|
||||||
|
unsigned int* reusable = 0;
|
||||||
|
// remove old frames
|
||||||
|
for (std::list< std::pair< double, unsigned int* > >::iterator i=buffer.begin(); i != buffer.end(); ++i)
|
||||||
|
{
|
||||||
|
if (i->first < (time - delay))
|
||||||
|
{
|
||||||
|
// remove me
|
||||||
|
if (reusable != 0)
|
||||||
|
delete[] i->second;
|
||||||
|
else
|
||||||
|
reusable = i->second;
|
||||||
|
|
||||||
|
i=buffer.erase(i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// add new frame
|
||||||
|
if (reusable == 0)
|
||||||
|
reusable = new unsigned int[width*height];
|
||||||
|
|
||||||
|
std::copy(in, in+width*height,reusable);
|
||||||
|
buffer.push_back(std::make_pair(time,reusable));
|
||||||
|
|
||||||
|
// copy best
|
||||||
|
unsigned int* best_data=0;
|
||||||
|
double best_time=0;
|
||||||
|
|
||||||
|
assert (buffer.size() >0);
|
||||||
|
for (std::list< std::pair< double, unsigned int* > >::iterator i=buffer.begin(); i != buffer.end(); ++i)
|
||||||
|
{
|
||||||
|
if (best_data==0 || (i->first < best_time))
|
||||||
|
{
|
||||||
|
best_time=i->first;
|
||||||
|
best_data=i->second;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
assert(best_data != 0);
|
||||||
|
std::copy(best_data,best_data+width*height,out);
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
f0r_param_double delay;
|
||||||
|
std::list< std::pair< double, unsigned int* > > buffer;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
frei0r::construct<delay0r> plugin("delay0r",
|
||||||
|
"video delay",
|
||||||
|
"Martin Bayer",
|
||||||
|
0,1);
|
||||||
|
|
||||||
242
frei0r-autoconf/src/filter/distort0r/distort0r.c
Normal file
@@ -0,0 +1,242 @@
|
|||||||
|
#include <stdlib.h>
|
||||||
|
#include <assert.h>
|
||||||
|
#include <math.h>
|
||||||
|
|
||||||
|
#include "frei0r.h"
|
||||||
|
|
||||||
|
|
||||||
|
#define GRID_SIZE_LOG 3
|
||||||
|
#define GRID_SIZE (1<<GRID_SIZE_LOG)
|
||||||
|
|
||||||
|
typedef struct grid_point
|
||||||
|
{
|
||||||
|
int32_t u;
|
||||||
|
int32_t v;
|
||||||
|
} grid_point_t;
|
||||||
|
|
||||||
|
|
||||||
|
typedef struct distorter_instance
|
||||||
|
{
|
||||||
|
unsigned int width, height;
|
||||||
|
double amplitude, frequency;
|
||||||
|
grid_point_t* grid;
|
||||||
|
} distorter_instance_t;
|
||||||
|
|
||||||
|
//const double AMPLTUDE_SCALE = 10.0;
|
||||||
|
const double FREQUENCY_SCALE = 200.0;
|
||||||
|
|
||||||
|
void interpolateGrid(grid_point_t* grid, unsigned int w, unsigned int h,
|
||||||
|
const uint32_t* src, uint32_t* dst);
|
||||||
|
|
||||||
|
int f0r_init()
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
void f0r_deinit()
|
||||||
|
{}
|
||||||
|
|
||||||
|
void f0r_get_plugin_info(f0r_plugin_info_t* distorterInfo)
|
||||||
|
{
|
||||||
|
distorterInfo->name = "Distort0r";
|
||||||
|
distorterInfo->author = "Gephex crew";
|
||||||
|
distorterInfo->plugin_type = F0R_PLUGIN_TYPE_FILTER;
|
||||||
|
distorterInfo->color_model = F0R_COLOR_MODEL_BGRA8888;
|
||||||
|
distorterInfo->frei0r_version = FREI0R_MAJOR_VERSION;
|
||||||
|
distorterInfo->major_version = 0;
|
||||||
|
distorterInfo->minor_version = 9;
|
||||||
|
distorterInfo->num_params = 2;
|
||||||
|
distorterInfo->explanation = "Plasma";
|
||||||
|
}
|
||||||
|
|
||||||
|
void f0r_get_param_info(f0r_param_info_t* info, int param_index)
|
||||||
|
{
|
||||||
|
switch(param_index)
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
info->name = "Amplitude";
|
||||||
|
info->type = F0R_PARAM_DOUBLE;
|
||||||
|
info->explanation = "The amplitude of the plasma signal";
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
info->name = "Frequency";
|
||||||
|
info->type = F0R_PARAM_DOUBLE;
|
||||||
|
info->explanation = "The frequency of the plasma signal";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
f0r_instance_t f0r_construct(unsigned int width, unsigned int height)
|
||||||
|
{
|
||||||
|
distorter_instance_t* inst =
|
||||||
|
(distorter_instance_t*)malloc(sizeof(distorter_instance_t));
|
||||||
|
inst->width = width; inst->height = height;
|
||||||
|
inst->grid =
|
||||||
|
(grid_point_t*)malloc(sizeof(grid_point_t)*
|
||||||
|
((width/GRID_SIZE)+1)*((height/GRID_SIZE)+1));
|
||||||
|
inst->amplitude = 1.0;
|
||||||
|
inst->frequency = 1.0;
|
||||||
|
return (f0r_instance_t)inst;
|
||||||
|
}
|
||||||
|
|
||||||
|
void f0r_destruct(f0r_instance_t instance)
|
||||||
|
{
|
||||||
|
distorter_instance_t* inst = (distorter_instance_t*)instance;
|
||||||
|
free(inst->grid);
|
||||||
|
free(inst);
|
||||||
|
}
|
||||||
|
|
||||||
|
void f0r_set_param_value(f0r_instance_t instance,
|
||||||
|
f0r_param_t param, int param_index)
|
||||||
|
{
|
||||||
|
assert(instance);
|
||||||
|
distorter_instance_t* inst = (distorter_instance_t*)instance;
|
||||||
|
|
||||||
|
switch(param_index)
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
// scale
|
||||||
|
inst->amplitude = *((double*)param);
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
// scale
|
||||||
|
inst->frequency = *((double*)param) * FREQUENCY_SCALE;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void f0r_get_param_value(f0r_instance_t instance,
|
||||||
|
f0r_param_t param, int param_index)
|
||||||
|
{
|
||||||
|
double scaled;
|
||||||
|
|
||||||
|
assert(instance);
|
||||||
|
distorter_instance_t* inst = (distorter_instance_t*)instance;
|
||||||
|
|
||||||
|
|
||||||
|
switch(param_index)
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
// don't scale
|
||||||
|
*((double*)param) = inst->amplitude;
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
// scale to [0..1]
|
||||||
|
scaled = inst->frequency / FREQUENCY_SCALE;
|
||||||
|
*((double*)param) = scaled;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/* this will compute a displacement value such that
|
||||||
|
0<=x_retval<xsize and 0<=y_retval<ysize. */
|
||||||
|
static __inline void plasmaFunction
|
||||||
|
(int32_t* x_retval, int32_t* y_retval,
|
||||||
|
unsigned int x, unsigned int y,
|
||||||
|
unsigned int w, unsigned int h,
|
||||||
|
double amp, double freq, double t)
|
||||||
|
{
|
||||||
|
double time = fmod(t, 2*M_PI);
|
||||||
|
double h_ = (double)h -1; double w_ = (double)w-1;
|
||||||
|
double dx = (-4./(w_*w_)*x + 4./w_)*x;
|
||||||
|
double dy = (-4./(h_*h_)*y + 4./h_)*y;
|
||||||
|
*x_retval = (int32_t)(65536.0*((double)x+amp*(w/4)*dx*sin(freq*y/h + time)));
|
||||||
|
*y_retval = (int32_t)(65536.0*((double)y+amp*(h/4)*dy*sin(freq*x/w + time)));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void f0r_update(f0r_instance_t instance, double time,
|
||||||
|
const uint32_t* inframe, uint32_t* outframe)
|
||||||
|
{
|
||||||
|
assert(instance);
|
||||||
|
distorter_instance_t* inst = (distorter_instance_t*)instance;
|
||||||
|
unsigned int w = inst->width;
|
||||||
|
unsigned int h = inst->height;
|
||||||
|
unsigned int x,y;
|
||||||
|
|
||||||
|
grid_point_t* pt = inst->grid;
|
||||||
|
for(y=0;y<=h;y+= GRID_SIZE)
|
||||||
|
for(x=0;x<=w;x+=GRID_SIZE,++pt)
|
||||||
|
{
|
||||||
|
plasmaFunction(&pt->u, &pt->v, x, y, w, h,
|
||||||
|
inst->amplitude, inst->frequency, time);
|
||||||
|
}
|
||||||
|
|
||||||
|
interpolateGrid(inst->grid, w, h, inframe, outframe);
|
||||||
|
}
|
||||||
|
|
||||||
|
void interpolateGrid(grid_point_t* grid, unsigned int w, unsigned int h,
|
||||||
|
const uint32_t* src, uint32_t* dst)
|
||||||
|
{
|
||||||
|
unsigned int x, y, block_x, block_y;
|
||||||
|
unsigned int tex_x = 0, tex_y = 0;
|
||||||
|
unsigned int grid_x = (w / GRID_SIZE);
|
||||||
|
unsigned int grid_y = (h / GRID_SIZE);
|
||||||
|
for(y=0, tex_y=0; y < grid_y; y++)
|
||||||
|
{
|
||||||
|
for(x=0, tex_x=0; x < grid_x; x++)
|
||||||
|
{
|
||||||
|
unsigned int offset = x + y*(grid_x+1);
|
||||||
|
|
||||||
|
grid_point_t* upper_left = grid + offset;
|
||||||
|
grid_point_t* lower_left = grid + offset + grid_x + 1;
|
||||||
|
grid_point_t* upper_right = grid + offset + 1;
|
||||||
|
grid_point_t* lower_right = grid + offset + grid_x + 2;
|
||||||
|
|
||||||
|
int32_t u_left, u_right, v_left, v_right;
|
||||||
|
|
||||||
|
int32_t start_col_uu = upper_left->u;
|
||||||
|
int32_t start_col_vv = upper_left->v;
|
||||||
|
int32_t end_col_uu = upper_right->u;
|
||||||
|
int32_t end_col_vv = upper_right->v;
|
||||||
|
|
||||||
|
int32_t step_start_col_u = (lower_left->u - upper_left->u)
|
||||||
|
>> GRID_SIZE_LOG;
|
||||||
|
int32_t step_start_col_v = (lower_left->v - upper_left->v)
|
||||||
|
>> GRID_SIZE_LOG;
|
||||||
|
int32_t step_end_col_u = (lower_right->u - upper_right->u)
|
||||||
|
>> GRID_SIZE_LOG;
|
||||||
|
int32_t step_end_col_v = (lower_right->v - upper_right->v)
|
||||||
|
>> GRID_SIZE_LOG;
|
||||||
|
|
||||||
|
int32_t u_line_index, v_line_index;
|
||||||
|
int32_t step_line_u, step_line_v;
|
||||||
|
|
||||||
|
|
||||||
|
uint32_t* pos = dst+ (y<<GRID_SIZE_LOG)*w + (x<<GRID_SIZE_LOG);
|
||||||
|
|
||||||
|
for(block_y = 0; block_y < GRID_SIZE; ++block_y)
|
||||||
|
{
|
||||||
|
u_left = start_col_uu;
|
||||||
|
u_right = end_col_uu;
|
||||||
|
v_left = start_col_vv;
|
||||||
|
v_right = end_col_vv;
|
||||||
|
|
||||||
|
u_line_index = start_col_uu;
|
||||||
|
v_line_index = start_col_vv;
|
||||||
|
|
||||||
|
step_line_u = (int32_t) ((u_right-u_left) >> GRID_SIZE_LOG);
|
||||||
|
step_line_v = (int32_t) ((v_right-v_left) >> GRID_SIZE_LOG);
|
||||||
|
|
||||||
|
for(block_x=0; block_x < GRID_SIZE; ++block_x)
|
||||||
|
{
|
||||||
|
int uu = u_line_index >> 16;
|
||||||
|
int vv = v_line_index >> 16;
|
||||||
|
|
||||||
|
u_line_index += step_line_u;
|
||||||
|
v_line_index += step_line_v;
|
||||||
|
|
||||||
|
*pos++ = src[uu + vv * w];
|
||||||
|
}
|
||||||
|
|
||||||
|
start_col_uu += step_start_col_u;
|
||||||
|
end_col_uu += step_end_col_u;
|
||||||
|
start_col_vv += step_start_col_v;
|
||||||
|
end_col_vv += step_end_col_v;
|
||||||
|
|
||||||
|
pos += (w - GRID_SIZE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
frei0r-autoconf/src/filter/distort0r/distort0r_post.jpg
Normal file
|
After Width: | Height: | Size: 73 KiB |
BIN
frei0r-autoconf/src/filter/distort0r/distort0r_pre.jpg
Normal file
|
After Width: | Height: | Size: 72 KiB |
190
frei0r-autoconf/src/filter/edgeglow/edgeglow.cpp
Normal file
@@ -0,0 +1,190 @@
|
|||||||
|
/* edgeglow.cpp
|
||||||
|
* Copyright (C) 2008 Salsaman (salsaman@gmail.com)
|
||||||
|
* This file is a Frei0r plugin.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "frei0r.hpp"
|
||||||
|
|
||||||
|
/* Clamps a int32-range int between 0 and 255 inclusive. */
|
||||||
|
unsigned char CLAMP0255(int32_t a)
|
||||||
|
{
|
||||||
|
return (unsigned char)
|
||||||
|
( (((-a) >> 31) & a) // 0 if the number was negative
|
||||||
|
| (255 - a) >> 31); // -1 if the number was greater than 255
|
||||||
|
}
|
||||||
|
|
||||||
|
class edgeglow : public frei0r::filter
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
f0r_param_double lthresh;
|
||||||
|
f0r_param_double lupscale;
|
||||||
|
f0r_param_double lredscale;
|
||||||
|
|
||||||
|
|
||||||
|
edgeglow(unsigned int width, unsigned int height)
|
||||||
|
{
|
||||||
|
register_param(lthresh, "lthresh", "threshold for edge lightening");
|
||||||
|
register_param(lupscale, "lupscale", "multiplier for upscaling edge brightness");
|
||||||
|
register_param(lredscale, "lredscale", "multiplier for downscaling non-edge brightness");
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual void update()
|
||||||
|
{
|
||||||
|
std::copy(in, in + width*height, out);
|
||||||
|
for (unsigned int y=1; y<height-1; ++y)
|
||||||
|
{
|
||||||
|
for (unsigned int x=1; x<width-1; ++x)
|
||||||
|
{
|
||||||
|
// XXX faut eviter le * width en y allant par rangee
|
||||||
|
unsigned char *p1 = (unsigned char *)&in[(y-1)*width+(x-1)];
|
||||||
|
unsigned char *p2 = (unsigned char *)&in[(y-1)*width+x];
|
||||||
|
unsigned char *p3 = (unsigned char *)&in[(y-1)*width+(x+1)];
|
||||||
|
unsigned char *p4 = (unsigned char *)&in[y*width+(x-1)];
|
||||||
|
unsigned char *p6 = (unsigned char *)&in[y*width+(x+1)];
|
||||||
|
unsigned char *p7 = (unsigned char *)&in[(y+1)*width+(x-1)];
|
||||||
|
unsigned char *p8 = (unsigned char *)&in[(y+1)*width+x];
|
||||||
|
unsigned char *p9 = (unsigned char *)&in[(y+1)*width+(x+1)];
|
||||||
|
|
||||||
|
unsigned char *g = (unsigned char *)&out[y*width+x];
|
||||||
|
|
||||||
|
for (int i=0; i<3; ++i)
|
||||||
|
g[i] = CLAMP0255(
|
||||||
|
abs(p1[i] + p2[i]*2 + p3[i] - p7[i] - p8[i]*2 - p9[i]) +
|
||||||
|
abs(p3[i] + p6[i]*2 + p9[i] - p1[i] - p4[i]*2 - p7[i]) );
|
||||||
|
|
||||||
|
|
||||||
|
unsigned char *p5 = (unsigned char *)&in[y*width+x];
|
||||||
|
|
||||||
|
g[3] = p5[3]; // copy alpha
|
||||||
|
|
||||||
|
float lt;
|
||||||
|
|
||||||
|
// calculate "lightness"
|
||||||
|
unsigned char R=g[0];
|
||||||
|
unsigned char G=g[1];
|
||||||
|
unsigned char B=g[2];
|
||||||
|
|
||||||
|
unsigned char max=R;
|
||||||
|
if (G>max) max=G;
|
||||||
|
if (B>max) max=B;
|
||||||
|
|
||||||
|
unsigned char min=R;
|
||||||
|
if (G<min) min=G;
|
||||||
|
if (B<min) min=B;
|
||||||
|
|
||||||
|
unsigned char l=(unsigned char) (((float)max+(float)min)/2.);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// convert in and out to HSL, add L value of out
|
||||||
|
|
||||||
|
unsigned int h;
|
||||||
|
float s;
|
||||||
|
|
||||||
|
R=p5[0];
|
||||||
|
G=p5[1];
|
||||||
|
B=p5[2];
|
||||||
|
|
||||||
|
max=R;
|
||||||
|
if (G>max) max=G;
|
||||||
|
if (B>max) max=B;
|
||||||
|
|
||||||
|
min=R;
|
||||||
|
if (G<min) min=G;
|
||||||
|
if (B<min) min=B;
|
||||||
|
|
||||||
|
|
||||||
|
if (l>(lt=lthresh*255.)) {
|
||||||
|
// if lightness > threshold, we add it to the lightness of the original
|
||||||
|
l=CLAMP0255((int32_t)((float)l*lupscale+((float)max+(float)min)/2.));
|
||||||
|
}
|
||||||
|
// otherwise reduce
|
||||||
|
else if (lredscale>0.) {
|
||||||
|
l=((float)max+(float)min)/2.*(1.-lredscale);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (lredscale>0.||l>lt) {
|
||||||
|
if (max==min) {
|
||||||
|
h=0;
|
||||||
|
s=0.;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if (max==R) {
|
||||||
|
h=(unsigned int)(60.*((float)G-(float)B)/((float)max-(float)min));
|
||||||
|
if (G<B) h+=360;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if (max==G) h=(unsigned int)(60.*((float)B-(float)R)/((float)max-(float)min)+120.);
|
||||||
|
else h=(unsigned int)(60.*(float)(R-G)/float(max-min)+240.);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (l<=0.5) s=((float)max-(float)min)/((float)max+(float)min);
|
||||||
|
else s=((float)max-(float)min)/(2.-((float)max+(float)min));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// convert back to RGB
|
||||||
|
|
||||||
|
float q;
|
||||||
|
|
||||||
|
if (l<0.5) q=l*(1.+s);
|
||||||
|
else q=l+s-(l*s);
|
||||||
|
|
||||||
|
float p=2.*l-q;
|
||||||
|
|
||||||
|
float hk=(float)h/360.;
|
||||||
|
|
||||||
|
float tr=hk+1./3.;
|
||||||
|
float tg=hk;
|
||||||
|
float tb=hk-1./3.;
|
||||||
|
|
||||||
|
if (tr>1.) tr-=1.;
|
||||||
|
if (tb<0.) tb+=1.;
|
||||||
|
|
||||||
|
if (tr<1./6.) g[0]=CLAMP0255(p+((q-p)*6.*tr));
|
||||||
|
else if (tr<0.5) g[0]=CLAMP0255((int32_t)q);
|
||||||
|
else if (tr<1./6.) g[0]=CLAMP0255(p+((q-p)*6.*(2./3.-tr)));
|
||||||
|
else g[0]=CLAMP0255((int32_t)p);
|
||||||
|
|
||||||
|
if (tg<1./6.) g[1]=CLAMP0255(p+((q-p)*6.*tg));
|
||||||
|
else if (tg<0.5) g[1]=CLAMP0255((int32_t)q);
|
||||||
|
else if (tg<1./6.) g[1]=CLAMP0255(p+((q-p)*6.*(2./3.-tg)));
|
||||||
|
else g[1]=CLAMP0255((int32_t)p);
|
||||||
|
|
||||||
|
if (tb<1./6.) g[2]=CLAMP0255(p+((q-p)*6.*tb));
|
||||||
|
else if (tb<0.5) g[2]=CLAMP0255((int32_t)q);
|
||||||
|
else if (tb<1./6.) g[2]=CLAMP0255(p+((q-p)*6.*(2./3.-tb)));
|
||||||
|
else g[2]=CLAMP0255((int32_t)p);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
g[0]=p5[0];
|
||||||
|
g[1]=p5[1];
|
||||||
|
g[2]=p5[2];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
frei0r::construct<edgeglow> plugin("Edgeglow",
|
||||||
|
"Edgeglow filter",
|
||||||
|
"Salsaman",
|
||||||
|
0,1,
|
||||||
|
F0R_COLOR_MODEL_RGBA8888);
|
||||||
|
|
||||||
120
frei0r-autoconf/src/filter/equaliz0r/equaliz0r.cpp
Normal file
@@ -0,0 +1,120 @@
|
|||||||
|
/* equaliz0r.cpp
|
||||||
|
* Copyright (C) 2005 Jean-Sebastien Senecal (js@drone.ws)
|
||||||
|
* This file is a Frei0r plugin.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "frei0r.hpp"
|
||||||
|
|
||||||
|
#include <cstring>
|
||||||
|
|
||||||
|
/* Clamps a int32-range int between 0 and 255 inclusive. */
|
||||||
|
unsigned char CLAMP0255(int32_t a)
|
||||||
|
{
|
||||||
|
return (unsigned char)
|
||||||
|
( (((-a) >> 31) & a) // 0 if the number was negative
|
||||||
|
| (255 - a) >> 31); // -1 if the number was greater than 255
|
||||||
|
}
|
||||||
|
|
||||||
|
class equaliz0r : public frei0r::filter
|
||||||
|
{
|
||||||
|
// Look-up tables for equaliz0r values.
|
||||||
|
unsigned char rlut[256];
|
||||||
|
unsigned char glut[256];
|
||||||
|
unsigned char blut[256];
|
||||||
|
|
||||||
|
// Intensity histograms.
|
||||||
|
unsigned int rhist[256];
|
||||||
|
unsigned int ghist[256];
|
||||||
|
unsigned int bhist[256];
|
||||||
|
|
||||||
|
void updateLookUpTables()
|
||||||
|
{
|
||||||
|
unsigned int size = width*height;
|
||||||
|
|
||||||
|
// First pass : build histograms.
|
||||||
|
|
||||||
|
// Reset histograms.
|
||||||
|
memset(rhist, 0, 256*sizeof(unsigned int));
|
||||||
|
memset(ghist, 0, 256*sizeof(unsigned int));
|
||||||
|
memset(bhist, 0, 256*sizeof(unsigned int));
|
||||||
|
|
||||||
|
// Update histograms.
|
||||||
|
const unsigned char *in_ptr = (const unsigned char*) in;
|
||||||
|
for (unsigned int i=0; i<size; ++i)
|
||||||
|
{
|
||||||
|
// update 'em
|
||||||
|
rhist[*in_ptr++]++;
|
||||||
|
ghist[*in_ptr++]++;
|
||||||
|
bhist[*in_ptr++]++;
|
||||||
|
in_ptr++; // skip alpha
|
||||||
|
}
|
||||||
|
|
||||||
|
// Second pass : update look-up tables.
|
||||||
|
in_ptr = (const unsigned char*) in;
|
||||||
|
|
||||||
|
// Cumulative intensities of histograms.
|
||||||
|
unsigned int
|
||||||
|
rcum = 0,
|
||||||
|
gcum = 0,
|
||||||
|
bcum = 0;
|
||||||
|
|
||||||
|
for (int i=0; i<256; ++i)
|
||||||
|
{
|
||||||
|
// update cumulatives
|
||||||
|
rcum += rhist[i];
|
||||||
|
gcum += ghist[i];
|
||||||
|
bcum += bhist[i];
|
||||||
|
|
||||||
|
// update 'em
|
||||||
|
rlut[i] = CLAMP0255( (rcum << 8) / size ); // = 256 * rcum / size
|
||||||
|
glut[i] = CLAMP0255( (gcum << 8) / size ); // = 256 * gcum / size
|
||||||
|
blut[i] = CLAMP0255( (bcum << 8) / size ); // = 256 * bcum / size
|
||||||
|
|
||||||
|
in_ptr++; // skip alpha
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public:
|
||||||
|
equaliz0r(unsigned int width, unsigned int height)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual void update()
|
||||||
|
{
|
||||||
|
std::copy(in, in + width*height, out);
|
||||||
|
updateLookUpTables();
|
||||||
|
unsigned int size = width*height;
|
||||||
|
const unsigned char *in_ptr = (const unsigned char*) in;
|
||||||
|
unsigned char *out_ptr = (unsigned char*) out;
|
||||||
|
for (unsigned int i=0; i<size; ++i)
|
||||||
|
{
|
||||||
|
*out_ptr++ = rlut[*in_ptr++];
|
||||||
|
*out_ptr++ = glut[*in_ptr++];
|
||||||
|
*out_ptr++ = blut[*in_ptr++];
|
||||||
|
*out_ptr++ = *in_ptr++; // copy alpha
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
frei0r::construct<equaliz0r> plugin("Equaliz0r",
|
||||||
|
"Equalizes the intensity histograms",
|
||||||
|
"Jean-Sebastien Senecal (Drone)",
|
||||||
|
0,1,
|
||||||
|
F0R_COLOR_MODEL_RGBA8888);
|
||||||
|
|
||||||
18
frei0r-autoconf/src/filter/facedetect/Makefile
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
# Adapt this to the installation prefix of opencv
|
||||||
|
OPENCV_PREFIX = /usr/local
|
||||||
|
|
||||||
|
CC=g++
|
||||||
|
#CCFLAGS=-g -Wall -fPIC
|
||||||
|
CCFLAGS = -I../../../spec -I$(OPENCV_PREFIX)/include/opencv
|
||||||
|
CCFLAGS += -DOPENCV_PREFIX=$(OPENCV_PREFIX) -c
|
||||||
|
|
||||||
|
LDFLAGS = -Wl -shared -L$(OPENCV_PREFIX)/lib/ -lcv -lhighgui
|
||||||
|
|
||||||
|
all: objects
|
||||||
|
$(CC) -o facedetect.so facedetect.o $(LDFLAGS)
|
||||||
|
|
||||||
|
objects: facedetect.c
|
||||||
|
$(CC) $(CCFLAGS) -o facedetect.o facedetect.c
|
||||||
|
|
||||||
|
clean:
|
||||||
|
- rm -f facedetect.o facedetect.dll *~
|
||||||
266
frei0r-autoconf/src/filter/facedetect/facedetect.c
Normal file
@@ -0,0 +1,266 @@
|
|||||||
|
/**
|
||||||
|
* binarymillenium 2007
|
||||||
|
*
|
||||||
|
* This code is released under the GPL
|
||||||
|
*
|
||||||
|
* *
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <assert.h>
|
||||||
|
#include <math.h>
|
||||||
|
#include <float.h>
|
||||||
|
#include <limits.h>
|
||||||
|
#include <time.h>
|
||||||
|
#include <ctype.h>
|
||||||
|
|
||||||
|
|
||||||
|
#include "cv.h"
|
||||||
|
//#include "highgui.h"
|
||||||
|
|
||||||
|
#include "frei0r.h"
|
||||||
|
|
||||||
|
#ifdef _EiC
|
||||||
|
#define WIN32
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
CvSeq* detect_and_draw( IplImage* img, CvMemStorage* storage,
|
||||||
|
CvHaarClassifierCascade* cascade);
|
||||||
|
|
||||||
|
#ifndef OPENCV_PREFIX
|
||||||
|
#error OPENCV_PREFIX must contain the installation prefix of OpenCV
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define STR(x) #x
|
||||||
|
#define TOSTR(x) STR(x)
|
||||||
|
|
||||||
|
static const char* const cascade_name =
|
||||||
|
TOSTR(OPENCV_PREFIX)"/share/opencv/haarcascades/haarcascade_frontalface_alt2.xml";
|
||||||
|
/* "haarcascade_frontalface_alt.xml";*/
|
||||||
|
/* "haarcascade_profileface.xml";*/
|
||||||
|
|
||||||
|
|
||||||
|
typedef struct facedetect_instance{
|
||||||
|
|
||||||
|
IplImage *frame, *frame_copy;
|
||||||
|
|
||||||
|
int width;
|
||||||
|
int height;
|
||||||
|
|
||||||
|
CvMemStorage* storage;
|
||||||
|
CvHaarClassifierCascade* cascade;
|
||||||
|
|
||||||
|
} facedetect_instance_t;
|
||||||
|
|
||||||
|
int f0r_init()
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
f0r_instance_t f0r_construct(unsigned int width, unsigned int height)
|
||||||
|
{
|
||||||
|
facedetect_instance_t* inst =
|
||||||
|
(facedetect_instance_t*)malloc(sizeof(facedetect_instance_t));
|
||||||
|
|
||||||
|
inst->width = width;
|
||||||
|
inst->height = height;
|
||||||
|
|
||||||
|
/// tbd - put this in init instead?
|
||||||
|
inst->storage = 0;
|
||||||
|
inst->cascade = 0;
|
||||||
|
|
||||||
|
inst->frame = 0;
|
||||||
|
inst->frame_copy = 0;
|
||||||
|
|
||||||
|
inst->cascade = (CvHaarClassifierCascade*)cvLoad( cascade_name, 0, 0, 0 );
|
||||||
|
|
||||||
|
if( !inst->cascade )
|
||||||
|
{
|
||||||
|
fprintf(stderr, "ERROR: Could not load classifier cascade %s\n",
|
||||||
|
cascade_name);
|
||||||
|
free(inst);
|
||||||
|
return (f0r_instance_t)0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
inst->storage = cvCreateMemStorage(0);
|
||||||
|
|
||||||
|
//cvNamedWindow( "result", 1 );
|
||||||
|
|
||||||
|
return (f0r_instance_t)inst;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void f0r_deinit()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void f0r_destruct(f0r_instance_t instance)
|
||||||
|
{
|
||||||
|
free(instance);
|
||||||
|
//cvDestroyWindow("result");
|
||||||
|
}
|
||||||
|
|
||||||
|
void f0r_set_param_value(f0r_instance_t instance,
|
||||||
|
f0r_param_t param, int param_index)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void f0r_get_param_value(f0r_instance_t instance,
|
||||||
|
f0r_param_t param, int param_index)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void f0r_get_plugin_info(f0r_plugin_info_t* facedetectInfo)
|
||||||
|
{
|
||||||
|
facedetectInfo->name = "opencvfacedetect";
|
||||||
|
facedetectInfo->author = "binarymillenium";
|
||||||
|
facedetectInfo->plugin_type = F0R_PLUGIN_TYPE_FILTER;
|
||||||
|
facedetectInfo->color_model = F0R_COLOR_MODEL_BGRA8888;
|
||||||
|
facedetectInfo->frei0r_version = FREI0R_MAJOR_VERSION;
|
||||||
|
facedetectInfo->major_version = 0;
|
||||||
|
facedetectInfo->minor_version = 1;
|
||||||
|
facedetectInfo->num_params = 1;
|
||||||
|
facedetectInfo->explanation = "detect faces";
|
||||||
|
}
|
||||||
|
|
||||||
|
void f0r_get_param_info(f0r_param_info_t* info, int param_index)
|
||||||
|
{
|
||||||
|
switch(param_index)
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
info->name = "test";
|
||||||
|
info->type = F0R_PARAM_DOUBLE;
|
||||||
|
info->explanation = "test";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void f0r_update(f0r_instance_t instance, double time,
|
||||||
|
const uint32_t* inframe, uint32_t* outframe)
|
||||||
|
{
|
||||||
|
assert(instance);
|
||||||
|
|
||||||
|
facedetect_instance_t* inst = (facedetect_instance_t*)instance;
|
||||||
|
|
||||||
|
unsigned char* dst = (unsigned char*)outframe;
|
||||||
|
const unsigned char* src = (unsigned char*)inframe;
|
||||||
|
|
||||||
|
|
||||||
|
if( !inst->frame_copy )
|
||||||
|
inst->frame_copy = cvCreateImage( cvSize(inst->width,inst->height),
|
||||||
|
IPL_DEPTH_8U, 4 );
|
||||||
|
|
||||||
|
unsigned char* ipli = (unsigned char*)inst->frame_copy->imageData;
|
||||||
|
int step = inst->frame_copy->widthStep;
|
||||||
|
unsigned i, j;
|
||||||
|
for (i = 0; (i < inst->height); i++) {
|
||||||
|
for (j = 0; (j < inst->width); j++) {
|
||||||
|
ipli[i*step+j*4+2] = src[2];
|
||||||
|
ipli[i*step+j*4+1] = src[1];
|
||||||
|
ipli[i*step+j*4+0] = src[0];
|
||||||
|
|
||||||
|
//ipli += 4;
|
||||||
|
src += 4;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/*CvSeq* faces =*/ detect_and_draw( inst->frame_copy,
|
||||||
|
inst->storage,
|
||||||
|
inst->cascade );
|
||||||
|
|
||||||
|
ipli = (unsigned char*)inst->frame_copy->imageData;
|
||||||
|
|
||||||
|
for (i = 0; (i < inst->height); i++) {
|
||||||
|
for (j = 0; (j < inst->width); j++) {
|
||||||
|
dst[2] = ipli[2];
|
||||||
|
dst[1] = ipli[1];
|
||||||
|
dst[0] = ipli[0];
|
||||||
|
|
||||||
|
ipli += 4;
|
||||||
|
dst += 4;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
cvReleaseImage( &(inst->frame_copy) );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
CvSeq* detect_and_draw( IplImage* img, CvMemStorage* storage,
|
||||||
|
CvHaarClassifierCascade* cascade)
|
||||||
|
{
|
||||||
|
static CvScalar colors[] =
|
||||||
|
{
|
||||||
|
{{255,255,255}},
|
||||||
|
{{0,128,255}},
|
||||||
|
{{0,255,255}},
|
||||||
|
{{0,255,0}},
|
||||||
|
{{255,128,0}},
|
||||||
|
{{255,255,0}},
|
||||||
|
{{255,0,0}},
|
||||||
|
{{255,0,255}},
|
||||||
|
{{0,0,0}}
|
||||||
|
};
|
||||||
|
|
||||||
|
double scale = 1.3;
|
||||||
|
IplImage* gray = cvCreateImage( cvSize(img->width,img->height), 8, 1 );
|
||||||
|
IplImage* small_img = cvCreateImage( cvSize( cvRound (img->width/scale),
|
||||||
|
cvRound (img->height/scale)),
|
||||||
|
8, 1 );
|
||||||
|
int i;
|
||||||
|
|
||||||
|
cvCvtColor( img, gray, CV_BGR2GRAY );
|
||||||
|
cvResize( gray, small_img, CV_INTER_LINEAR );
|
||||||
|
cvEqualizeHist( small_img, small_img );
|
||||||
|
//cvClearMemStorage( storage );
|
||||||
|
|
||||||
|
CvSeq* faces = 0;
|
||||||
|
|
||||||
|
if( cascade )
|
||||||
|
{
|
||||||
|
double t = (double)cvGetTickCount();
|
||||||
|
faces = cvHaarDetectObjects( small_img, cascade, storage,
|
||||||
|
1.1, 2, 0/*CV_HAAR_DO_CANNY_PRUNING*/,
|
||||||
|
cvSize(30, 30) );
|
||||||
|
t = (double)cvGetTickCount() - t;
|
||||||
|
//printf( "detection time = %gms\n", t/((double)cvGetTickFrequency()*1000.) );
|
||||||
|
|
||||||
|
CvPoint pt1, pt2;
|
||||||
|
pt1.x = 0;
|
||||||
|
pt1.y = 0;
|
||||||
|
pt2.x = img->width;
|
||||||
|
pt2.y = img->height;
|
||||||
|
cvRectangle( img, pt1, pt2, colors[8],CV_FILLED, 8, 0 );
|
||||||
|
|
||||||
|
for( i = 0; i < (faces ? faces->total : 0); i++ )
|
||||||
|
{
|
||||||
|
CvRect* r = (CvRect*)cvGetSeqElem( faces, i );
|
||||||
|
CvPoint center;
|
||||||
|
int radius;
|
||||||
|
center.x = cvRound((r->x + r->width*0.5)*scale);
|
||||||
|
center.y = cvRound((r->y + r->height*0.5)*scale);
|
||||||
|
radius = cvRound((r->width + r->height)*0.25*scale);
|
||||||
|
|
||||||
|
pt1.x = r->x;// - r->width*0.5;
|
||||||
|
pt1.y = r->y;// - r->height*0.5;
|
||||||
|
pt2.x = r->x + r->width;
|
||||||
|
pt2.y = r->y + r->height;
|
||||||
|
//printf( " faces %d %d \n", center.x, center.y);
|
||||||
|
cvCircle( img, center, radius, colors[i%8],CV_FILLED, 8, 0); // 3, 8, 0 );
|
||||||
|
//cvRectangle( img, pt1, pt2, colors[i%8], CV_FILLED );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//cvShowImage( "result", img );
|
||||||
|
cvReleaseImage( &gray );
|
||||||
|
cvReleaseImage( &small_img );
|
||||||
|
|
||||||
|
return faces;
|
||||||
|
}
|
||||||
170
frei0r-autoconf/src/filter/flippo/flippo.c
Normal file
@@ -0,0 +1,170 @@
|
|||||||
|
/* flippo.c */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 02/03/2004 j.s.s. optimized the whole process
|
||||||
|
* 07/11/2004 c.e. prelz
|
||||||
|
*
|
||||||
|
* My first frei0r effect - simple flipping
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "frei0r.h"
|
||||||
|
|
||||||
|
#include <assert.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
typedef struct flippo_instance
|
||||||
|
{
|
||||||
|
unsigned int width, height;
|
||||||
|
char flippox, flippoy;
|
||||||
|
} flippo_instance_t;
|
||||||
|
|
||||||
|
int f0r_init()
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
void f0r_deinit()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void f0r_get_plugin_info(f0r_plugin_info_t* flippoInfo)
|
||||||
|
{
|
||||||
|
flippoInfo->name = "Flippo";
|
||||||
|
flippoInfo->author = "Carlo Emilio, Jean-Sebastien Senecal";
|
||||||
|
flippoInfo->plugin_type = F0R_PLUGIN_TYPE_FILTER;
|
||||||
|
flippoInfo->color_model = F0R_COLOR_MODEL_PACKED32;
|
||||||
|
flippoInfo->frei0r_version = FREI0R_MAJOR_VERSION;
|
||||||
|
flippoInfo->major_version = 0;
|
||||||
|
flippoInfo->minor_version = 1;
|
||||||
|
flippoInfo->num_params = 2;
|
||||||
|
flippoInfo->explanation = "Flipping in x and y axis";
|
||||||
|
}
|
||||||
|
|
||||||
|
void f0r_get_param_info(f0r_param_info_t* info, int param_index)
|
||||||
|
{
|
||||||
|
switch(param_index)
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
info->name="X axis";
|
||||||
|
info->type=F0R_PARAM_BOOL;
|
||||||
|
info->explanation="Flipping on the horizontal axis";
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
info->name="Y axis";
|
||||||
|
info->type=F0R_PARAM_BOOL;
|
||||||
|
info->explanation = "Flipping on the vertical axis";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
f0r_instance_t f0r_construct(unsigned int width,unsigned int height)
|
||||||
|
{
|
||||||
|
flippo_instance_t *inst=
|
||||||
|
(flippo_instance_t*)malloc(sizeof(flippo_instance_t));
|
||||||
|
|
||||||
|
inst->width=width;
|
||||||
|
inst->height=height;
|
||||||
|
|
||||||
|
return (f0r_instance_t)inst;
|
||||||
|
}
|
||||||
|
|
||||||
|
void f0r_destruct(f0r_instance_t instance)
|
||||||
|
{
|
||||||
|
flippo_instance_t* inst = (flippo_instance_t*)instance;
|
||||||
|
|
||||||
|
free(inst);
|
||||||
|
}
|
||||||
|
|
||||||
|
void f0r_set_param_value(f0r_instance_t instance,
|
||||||
|
f0r_param_t param,int param_index)
|
||||||
|
{
|
||||||
|
assert(instance);
|
||||||
|
flippo_instance_t *inst=(flippo_instance_t*)instance;
|
||||||
|
|
||||||
|
switch(param_index)
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
inst->flippox=( *((double*)param) >= 0.5 );
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
inst->flippoy=( *((double*)param) >= 0.5 );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void f0r_get_param_value(f0r_instance_t instance,
|
||||||
|
f0r_param_t param,int param_index)
|
||||||
|
{
|
||||||
|
assert(instance);
|
||||||
|
|
||||||
|
flippo_instance_t *inst=(flippo_instance_t*)instance;
|
||||||
|
|
||||||
|
switch(param_index)
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
*((double*)param)=(inst->flippox ? 1.0 : 0.0);
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
*((double*)param)=(inst->flippoy ? 1.0 : 0.0);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void f0r_update(f0r_instance_t instance,double time,
|
||||||
|
const uint32_t *inframe, uint32_t *outframe)
|
||||||
|
{
|
||||||
|
assert(instance);
|
||||||
|
|
||||||
|
flippo_instance_t* inst=(flippo_instance_t*)instance;
|
||||||
|
unsigned int w=inst->width;
|
||||||
|
unsigned int h=inst->height;
|
||||||
|
unsigned int len=w*h;
|
||||||
|
unsigned int twice_w = 2*w;
|
||||||
|
unsigned int rowsize = w*sizeof(uint32_t);
|
||||||
|
unsigned int i;
|
||||||
|
|
||||||
|
if (inst->flippox)
|
||||||
|
{
|
||||||
|
if (inst->flippoy)
|
||||||
|
{
|
||||||
|
// flip and flop
|
||||||
|
inframe += len-1; // point to the end
|
||||||
|
while (len--)
|
||||||
|
*outframe++ = *inframe--;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// flip only
|
||||||
|
inframe += w-1; // point to the end of current row
|
||||||
|
while (h--)
|
||||||
|
{
|
||||||
|
i=w;
|
||||||
|
while (i--)
|
||||||
|
*outframe++ = *inframe--;
|
||||||
|
inframe += twice_w;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (inst->flippoy)
|
||||||
|
{
|
||||||
|
// flop only
|
||||||
|
inframe += len - w - 1; // point to start of last row
|
||||||
|
while (h--)
|
||||||
|
{
|
||||||
|
memcpy(outframe, inframe, rowsize);
|
||||||
|
outframe += w;
|
||||||
|
inframe -= w;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// no flip, no flop
|
||||||
|
memcpy(outframe, inframe, len*sizeof(uint32_t));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
151
frei0r-autoconf/src/filter/gamma/gamma.c
Normal file
@@ -0,0 +1,151 @@
|
|||||||
|
/* gamma.c
|
||||||
|
* Copyright (C) 2004 Jean-Sebastien Senecal
|
||||||
|
* This file is a Frei0r plugin.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <math.h>
|
||||||
|
#include <assert.h>
|
||||||
|
|
||||||
|
#include "frei0r.h"
|
||||||
|
#include "frei0r_math.h"
|
||||||
|
|
||||||
|
#define MAX_GAMMA 4.0
|
||||||
|
|
||||||
|
typedef struct gamma_instance
|
||||||
|
{
|
||||||
|
unsigned int width;
|
||||||
|
unsigned int height;
|
||||||
|
double gamma; /* the gamma value [0, 1] */
|
||||||
|
unsigned char lut[256]; /* look-up table */
|
||||||
|
} gamma_instance_t;
|
||||||
|
|
||||||
|
/* Updates the look-up-table. */
|
||||||
|
void update_lut(gamma_instance_t *inst)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
unsigned char *lut = inst->lut;
|
||||||
|
double inv_gamma = 1.0 / (inst->gamma * MAX_GAMMA); /* set gamma in the range [0,MAX_GAMMA] and take its inverse */
|
||||||
|
|
||||||
|
lut[0] = 0;
|
||||||
|
for (i=1; i<256; ++i)
|
||||||
|
lut[i] = CLAMP0255( ROUND(255.0 * pow( (double)i / 255.0, inv_gamma ) ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
int f0r_init()
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
void f0r_deinit()
|
||||||
|
{ /* no initialization required */ }
|
||||||
|
|
||||||
|
void f0r_get_plugin_info(f0r_plugin_info_t* gamma_info)
|
||||||
|
{
|
||||||
|
gamma_info->name = "Gamma";
|
||||||
|
gamma_info->author = "Jean-Sebastien Senecal";
|
||||||
|
gamma_info->plugin_type = F0R_PLUGIN_TYPE_FILTER;
|
||||||
|
gamma_info->color_model = F0R_COLOR_MODEL_RGBA8888;
|
||||||
|
gamma_info->frei0r_version = FREI0R_MAJOR_VERSION;
|
||||||
|
gamma_info->major_version = 0;
|
||||||
|
gamma_info->minor_version = 2;
|
||||||
|
gamma_info->num_params = 1;
|
||||||
|
gamma_info->explanation = "Adjusts the gamma value of a source image";
|
||||||
|
}
|
||||||
|
|
||||||
|
void f0r_get_param_info(f0r_param_info_t* info, int param_index)
|
||||||
|
{
|
||||||
|
switch(param_index)
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
info->name = "Gamma";
|
||||||
|
info->type = F0R_PARAM_DOUBLE;
|
||||||
|
info->explanation = "The gamma value";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
f0r_instance_t f0r_construct(unsigned int width, unsigned int height)
|
||||||
|
{
|
||||||
|
gamma_instance_t* inst =
|
||||||
|
(gamma_instance_t*)malloc(sizeof(gamma_instance_t));
|
||||||
|
inst->width = width; inst->height = height;
|
||||||
|
/* init look-up-table */
|
||||||
|
inst->gamma = 1.0;
|
||||||
|
update_lut(inst);
|
||||||
|
return (f0r_instance_t)inst;
|
||||||
|
}
|
||||||
|
|
||||||
|
void f0r_destruct(f0r_instance_t instance)
|
||||||
|
{
|
||||||
|
free(instance);
|
||||||
|
}
|
||||||
|
|
||||||
|
void f0r_set_param_value(f0r_instance_t instance,
|
||||||
|
f0r_param_t param, int param_index)
|
||||||
|
{
|
||||||
|
assert(instance);
|
||||||
|
gamma_instance_t* inst = (gamma_instance_t*)instance;
|
||||||
|
|
||||||
|
switch(param_index)
|
||||||
|
{
|
||||||
|
double val;
|
||||||
|
case 0:
|
||||||
|
/* gamma */
|
||||||
|
val = *((double*)param);
|
||||||
|
if (val != inst->gamma)
|
||||||
|
{
|
||||||
|
inst->gamma = val;
|
||||||
|
update_lut(inst);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void f0r_get_param_value(f0r_instance_t instance,
|
||||||
|
f0r_param_t param, int param_index)
|
||||||
|
{
|
||||||
|
assert(instance);
|
||||||
|
gamma_instance_t* inst = (gamma_instance_t*)instance;
|
||||||
|
|
||||||
|
switch(param_index)
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
*((double*)param) = inst->gamma;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void f0r_update(f0r_instance_t instance, double time,
|
||||||
|
const uint32_t* inframe, uint32_t* outframe)
|
||||||
|
{
|
||||||
|
assert(instance);
|
||||||
|
gamma_instance_t* inst = (gamma_instance_t*)instance;
|
||||||
|
unsigned int len = inst->width * inst->height;
|
||||||
|
|
||||||
|
unsigned char* lut = inst->lut;
|
||||||
|
unsigned char* dst = (unsigned char*)outframe;
|
||||||
|
const unsigned char* src = (unsigned char*)inframe;
|
||||||
|
while (len--)
|
||||||
|
{
|
||||||
|
*dst++ = lut[*src++];
|
||||||
|
*dst++ = lut[*src++];
|
||||||
|
*dst++ = lut[*src++];
|
||||||
|
*dst++ = *src++;// copy alpha
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
292
frei0r-autoconf/src/filter/glow/blur.h
Normal file
@@ -0,0 +1,292 @@
|
|||||||
|
/* squareblur.c
|
||||||
|
* Copyright (C) 2004--2005 Mathieu Guindon
|
||||||
|
* Julien Keable
|
||||||
|
* Jean-Sebastien Senecal (js@drone.ws)
|
||||||
|
* This file is a Frei0r plugin.
|
||||||
|
*
|
||||||
|
* Modified by Richard Spindler (richard.spindler AT gmail.com) for blurring in
|
||||||
|
* the mask0mate Frei0r plugin.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <assert.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
#include "frei0r.h"
|
||||||
|
|
||||||
|
#define SIZE_RGBA 4
|
||||||
|
|
||||||
|
__inline int MAX(int a, int b)
|
||||||
|
{
|
||||||
|
return (a > b ? a : b);
|
||||||
|
}
|
||||||
|
|
||||||
|
__inline int MIN(int a, int b)
|
||||||
|
{
|
||||||
|
return (a < b ? a : b);
|
||||||
|
}
|
||||||
|
|
||||||
|
__inline void subtract_acc(uint32_t *dst, const uint32_t *src)
|
||||||
|
{
|
||||||
|
int n=SIZE_RGBA;
|
||||||
|
while (n--)
|
||||||
|
*dst++ -= *src++;
|
||||||
|
}
|
||||||
|
|
||||||
|
__inline void add_acc(uint32_t *dst, const uint32_t *src)
|
||||||
|
{
|
||||||
|
int n=SIZE_RGBA;
|
||||||
|
while (n--)
|
||||||
|
*dst++ += *src++;
|
||||||
|
}
|
||||||
|
|
||||||
|
__inline void divide(unsigned char *dst, const uint32_t *src, const unsigned int val)
|
||||||
|
{
|
||||||
|
int n=SIZE_RGBA;
|
||||||
|
while (n--)
|
||||||
|
*dst++ = *src++ / val;
|
||||||
|
}
|
||||||
|
|
||||||
|
typedef struct squareblur_instance
|
||||||
|
{
|
||||||
|
unsigned int width;
|
||||||
|
unsigned int height;
|
||||||
|
double kernel; /* the kernel size, as a percentage of the biggest of width and height */
|
||||||
|
uint32_t *mem; /* memory accumulation matrix of uint32_t (size = acc_width*acc_height*SIZE_RGBA) */
|
||||||
|
uint32_t **acc; /* accumulation matrix of pointers to SIZE_RGBA consecutive uint32_t in mem (size = acc_width*acc_height) */
|
||||||
|
} squareblur_instance_t;
|
||||||
|
|
||||||
|
/* Updates the summed area table. */
|
||||||
|
void update_summed_area_table(squareblur_instance_t *inst, const uint32_t *src)
|
||||||
|
{
|
||||||
|
register unsigned char *iter_data;
|
||||||
|
register uint32_t *iter_mem;
|
||||||
|
register unsigned int i, x, y;
|
||||||
|
|
||||||
|
uint32_t acc_buffer[SIZE_RGBA]; /* accumulation buffer */
|
||||||
|
|
||||||
|
unsigned int row_width;
|
||||||
|
unsigned int width, height;
|
||||||
|
unsigned int cell_size;
|
||||||
|
|
||||||
|
/* Compute basic params. */
|
||||||
|
width = inst->width+1;
|
||||||
|
height = inst->height+1;
|
||||||
|
row_width = SIZE_RGBA * width;
|
||||||
|
cell_size = SIZE_RGBA * sizeof(uint32_t);
|
||||||
|
|
||||||
|
/* Init iterators. */
|
||||||
|
iter_data = (unsigned char*) src;
|
||||||
|
iter_mem = inst->mem;
|
||||||
|
|
||||||
|
/* Process first row (all zeros). */
|
||||||
|
memset(iter_mem, 0, row_width * cell_size);
|
||||||
|
iter_mem += row_width;
|
||||||
|
|
||||||
|
if (height >= 1)
|
||||||
|
{
|
||||||
|
/* Process second row. */
|
||||||
|
memset(acc_buffer, 0, cell_size);
|
||||||
|
memset(iter_mem, 0, cell_size); /* first column is void */
|
||||||
|
iter_mem += SIZE_RGBA;
|
||||||
|
for (x=1; x<width; ++x)
|
||||||
|
{
|
||||||
|
for (i=0; i<SIZE_RGBA; ++i)
|
||||||
|
*iter_mem++ = (acc_buffer[i] += *iter_data++);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Process other rows. */
|
||||||
|
for (y=2; y<height; ++y)
|
||||||
|
{
|
||||||
|
/* Copy upper line. */
|
||||||
|
memcpy(iter_mem, iter_mem - row_width, row_width * sizeof(uint32_t));
|
||||||
|
|
||||||
|
/* Process row. */
|
||||||
|
memset(acc_buffer, 0, cell_size);
|
||||||
|
memset(iter_mem, 0, cell_size); /* first column is void */
|
||||||
|
iter_mem += SIZE_RGBA;
|
||||||
|
for (x=1; x<width; ++x)
|
||||||
|
{
|
||||||
|
for (i=0; i<SIZE_RGBA; ++i)
|
||||||
|
*iter_mem++ += (acc_buffer[i] += *iter_data++);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
int blur_init()
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
void blur_deinit()
|
||||||
|
{ /* no initialization required */ }
|
||||||
|
|
||||||
|
void blur_get_plugin_info(f0r_plugin_info_t* squareblur_info)
|
||||||
|
{
|
||||||
|
squareblur_info->name = "Squareblur";
|
||||||
|
squareblur_info->author = "Drone";
|
||||||
|
squareblur_info->plugin_type = F0R_PLUGIN_TYPE_FILTER;
|
||||||
|
squareblur_info->color_model = F0R_COLOR_MODEL_RGBA8888;
|
||||||
|
squareblur_info->frei0r_version = FREI0R_MAJOR_VERSION;
|
||||||
|
squareblur_info->major_version = 0;
|
||||||
|
squareblur_info->minor_version = 1;
|
||||||
|
squareblur_info->num_params = 1;
|
||||||
|
squareblur_info->explanation = "Variable-size square blur";
|
||||||
|
}
|
||||||
|
|
||||||
|
void blur_get_param_info(f0r_param_info_t* info, int param_index)
|
||||||
|
{
|
||||||
|
switch(param_index)
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
info->name = "Kernel size";
|
||||||
|
info->type = F0R_PARAM_DOUBLE;
|
||||||
|
info->explanation = "The size of the kernel, as a proportion to its coverage of the image";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
f0r_instance_t blur_construct(unsigned int width, unsigned int height)
|
||||||
|
{
|
||||||
|
squareblur_instance_t* inst =
|
||||||
|
(squareblur_instance_t*)malloc(sizeof(squareblur_instance_t));
|
||||||
|
unsigned int i;
|
||||||
|
unsigned int acc_width, acc_height = height+1;
|
||||||
|
uint32_t* iter_mem;
|
||||||
|
uint32_t** iter_acc;
|
||||||
|
/* set params */
|
||||||
|
inst->width = width; inst->height = height;
|
||||||
|
acc_width = width+1; acc_height = height+1;
|
||||||
|
inst->kernel = 0.0;
|
||||||
|
/* allocate memory for the summed-area-table */
|
||||||
|
inst->mem = (uint32_t*) malloc(acc_width*acc_height*SIZE_RGBA*sizeof(uint32_t));
|
||||||
|
inst->acc = (uint32_t**) malloc(acc_width*acc_height*sizeof(uint32_t*));
|
||||||
|
/* point at the right place */
|
||||||
|
iter_mem = inst->mem;
|
||||||
|
iter_acc = inst->acc;
|
||||||
|
for (i=0; i<acc_width*acc_height; ++i)
|
||||||
|
{
|
||||||
|
*iter_acc++ = iter_mem;
|
||||||
|
iter_mem += SIZE_RGBA;
|
||||||
|
}
|
||||||
|
return (f0r_instance_t)inst;
|
||||||
|
}
|
||||||
|
|
||||||
|
void blur_destruct(f0r_instance_t instance)
|
||||||
|
{
|
||||||
|
squareblur_instance_t* inst =
|
||||||
|
(squareblur_instance_t*)instance;
|
||||||
|
free(inst->acc);
|
||||||
|
free(inst->mem);
|
||||||
|
free(instance);
|
||||||
|
}
|
||||||
|
|
||||||
|
void blur_set_param_value(f0r_instance_t instance,
|
||||||
|
f0r_param_t param, int param_index)
|
||||||
|
{
|
||||||
|
assert(instance);
|
||||||
|
squareblur_instance_t* inst = (squareblur_instance_t*)instance;
|
||||||
|
|
||||||
|
switch(param_index)
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
/* kernel size */
|
||||||
|
inst->kernel = *((double*)param);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void blur_get_param_value(f0r_instance_t instance,
|
||||||
|
f0r_param_t param, int param_index)
|
||||||
|
{
|
||||||
|
assert(instance);
|
||||||
|
squareblur_instance_t* inst = (squareblur_instance_t*)instance;
|
||||||
|
|
||||||
|
switch(param_index)
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
*((double*)param) = inst->kernel;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void blur_update(f0r_instance_t instance, double time,
|
||||||
|
const uint32_t* inframe, uint32_t* outframe)
|
||||||
|
{
|
||||||
|
assert(instance);
|
||||||
|
squareblur_instance_t* inst = (squareblur_instance_t*)instance;
|
||||||
|
|
||||||
|
unsigned int width = inst->width;
|
||||||
|
unsigned int height = inst->height;
|
||||||
|
unsigned int acc_width = width+1; /* width of the summed area table */
|
||||||
|
|
||||||
|
unsigned int kernel_size = (unsigned int) (inst->kernel * (MAX(width, height) / 2.0));
|
||||||
|
|
||||||
|
unsigned int x, y;
|
||||||
|
unsigned int x0, x1, y0, y1;
|
||||||
|
unsigned int area;
|
||||||
|
|
||||||
|
if (kernel_size <= 0)
|
||||||
|
{
|
||||||
|
/* No blur, just copy image. */
|
||||||
|
memcpy(outframe, inframe, width*height*sizeof(uint32_t));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
assert(inst->acc);
|
||||||
|
unsigned char* dst = (unsigned char*)outframe;
|
||||||
|
uint32_t** acc = inst->acc;
|
||||||
|
uint32_t sum[SIZE_RGBA];
|
||||||
|
unsigned int y0_offset, y1_offset;
|
||||||
|
|
||||||
|
/* Compute the summed area table. */
|
||||||
|
update_summed_area_table(inst, inframe);
|
||||||
|
|
||||||
|
/* Loop through the image's pixels. */
|
||||||
|
for (y=0;y<height;y++)
|
||||||
|
{
|
||||||
|
for (x=0;x<width;x++)
|
||||||
|
{
|
||||||
|
/* The kernel's coordinates. */
|
||||||
|
x0 = MAX(x - kernel_size, 0);
|
||||||
|
x1 = MIN(x + kernel_size + 1, width);
|
||||||
|
y0 = MAX(y - kernel_size, 0);
|
||||||
|
y1 = MIN(y + kernel_size + 1, height);
|
||||||
|
|
||||||
|
/* Get the sum in the current kernel. */
|
||||||
|
area = (x1-x0)*(y1-y0);
|
||||||
|
|
||||||
|
y0_offset = y0*acc_width;
|
||||||
|
y1_offset = y1*acc_width;
|
||||||
|
|
||||||
|
/* it is assumed that (x0,y0) <= (x1,y1) */
|
||||||
|
memcpy(sum, acc[y1_offset + x1], SIZE_RGBA*sizeof(uint32_t));
|
||||||
|
subtract_acc(sum, acc[y1_offset + x0]);
|
||||||
|
subtract_acc(sum, acc[y0_offset + x1]);
|
||||||
|
add_acc(sum, acc[y0_offset + x0]);
|
||||||
|
|
||||||
|
/* Take the mean and copy it to output. */
|
||||||
|
divide(dst, sum, area);
|
||||||
|
|
||||||
|
/* Increment iterator. */
|
||||||
|
dst += SIZE_RGBA;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
125
frei0r-autoconf/src/filter/glow/glow.c
Normal file
@@ -0,0 +1,125 @@
|
|||||||
|
/* glow.c
|
||||||
|
* Copyright (C) 2007 Richard Spindler (richard.spindler@gmail.com)
|
||||||
|
* This file is a Frei0r plugin.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <math.h>
|
||||||
|
#include "frei0r.h"
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include "blur.h"
|
||||||
|
|
||||||
|
typedef struct glow_instance {
|
||||||
|
double blur;
|
||||||
|
int w, h;
|
||||||
|
uint32_t* blurred;
|
||||||
|
f0r_instance_t* blur_instance;
|
||||||
|
} glow_instance_t;
|
||||||
|
|
||||||
|
int f0r_init()
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
void f0r_deinit()
|
||||||
|
{ /* empty */ }
|
||||||
|
|
||||||
|
void f0r_get_plugin_info( f0r_plugin_info_t* info )
|
||||||
|
{
|
||||||
|
info->name = "Glow";
|
||||||
|
info->author = "Richard Spindler";
|
||||||
|
info->plugin_type = F0R_PLUGIN_TYPE_FILTER;
|
||||||
|
info->color_model = F0R_COLOR_MODEL_RGBA8888;
|
||||||
|
info->frei0r_version = FREI0R_MAJOR_VERSION;
|
||||||
|
info->major_version = 0;
|
||||||
|
info->minor_version = 1;
|
||||||
|
info->num_params = 1;
|
||||||
|
info->explanation = "Creates a Glamorous Glow";
|
||||||
|
|
||||||
|
}
|
||||||
|
void f0r_get_param_info( f0r_param_info_t* info, int param_index )
|
||||||
|
{
|
||||||
|
switch ( param_index ) {
|
||||||
|
case 0:
|
||||||
|
info->name = "Blur";
|
||||||
|
info->type = F0R_PARAM_DOUBLE;
|
||||||
|
info->explanation = "Blur of the glow";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
f0r_instance_t f0r_construct(unsigned int width, unsigned int height)
|
||||||
|
{
|
||||||
|
glow_instance_t* inst = (glow_instance_t*)malloc(sizeof(glow_instance_t));
|
||||||
|
inst->w = width;
|
||||||
|
inst->h = height;
|
||||||
|
inst->blur = 0.0;
|
||||||
|
inst->blurred = (uint32_t*)malloc( width * height * sizeof(uint32_t) );
|
||||||
|
inst->blur_instance = blur_construct( width, height );
|
||||||
|
blur_set_param_value(inst->blur_instance, &inst->blur, 0 );
|
||||||
|
return (f0r_instance_t)inst;
|
||||||
|
}
|
||||||
|
void f0r_destruct(f0r_instance_t instance)
|
||||||
|
{
|
||||||
|
glow_instance_t* inst = (glow_instance_t*)instance;
|
||||||
|
blur_destruct(inst->blur_instance);
|
||||||
|
free(inst->blurred);
|
||||||
|
free(instance);
|
||||||
|
}
|
||||||
|
void f0r_set_param_value(f0r_instance_t instance,
|
||||||
|
f0r_param_t param, int param_index)
|
||||||
|
{
|
||||||
|
glow_instance_t* inst = (glow_instance_t*)instance;
|
||||||
|
switch ( param_index ) {
|
||||||
|
case 0:
|
||||||
|
inst->blur = (*((double*)param)) / 20.0;
|
||||||
|
blur_set_param_value(inst->blur_instance, &inst->blur, 0 );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
void f0r_get_param_value(f0r_instance_t instance,
|
||||||
|
f0r_param_t param, int param_index)
|
||||||
|
{
|
||||||
|
glow_instance_t* inst = (glow_instance_t*)instance;
|
||||||
|
switch ( param_index ) {
|
||||||
|
case 0:
|
||||||
|
*((double*)param) = inst->blur * 20.0;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
void f0r_update(f0r_instance_t instance, double time,
|
||||||
|
const uint32_t* inframe, uint32_t* outframe)
|
||||||
|
{
|
||||||
|
glow_instance_t* inst = (glow_instance_t*)instance;
|
||||||
|
|
||||||
|
uint8_t* dst = (uint8_t*)outframe;
|
||||||
|
const uint8_t* src = (uint8_t*)inframe;
|
||||||
|
const uint8_t* blur = (uint8_t*)inst->blurred;
|
||||||
|
|
||||||
|
int len = inst->w * inst->h * 4;
|
||||||
|
|
||||||
|
blur_update(inst->blur_instance, 0.0, inframe, inst->blurred );
|
||||||
|
|
||||||
|
int i;
|
||||||
|
for ( i = 0; i < len; i++ ) {
|
||||||
|
*dst = 255 - ( ( 255 - *src ) * ( 255 - *blur ) ) / 255;
|
||||||
|
// 1 - ( ( 1 - A ) * ( 1 - B ) )
|
||||||
|
dst++;
|
||||||
|
src++;
|
||||||
|
blur++;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
179
frei0r-autoconf/src/filter/host_param_test/host_param_test.c
Normal file
@@ -0,0 +1,179 @@
|
|||||||
|
/* host_param_test.c
|
||||||
|
* Copyright (C) 2007 Richard Spindler (richard.spindler@gmail.com)
|
||||||
|
* This file is a Frei0r plugin.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <math.h>
|
||||||
|
#include "frei0r.h"
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
typedef int bool;
|
||||||
|
static const int false = 0;
|
||||||
|
static const int true = 1;
|
||||||
|
|
||||||
|
typedef struct host_param_test_instance {
|
||||||
|
double dvalue;
|
||||||
|
bool bvalue;
|
||||||
|
f0r_param_color_t cvalue;
|
||||||
|
f0r_param_position_t pvalue;
|
||||||
|
char* svalue;
|
||||||
|
int w, h;
|
||||||
|
} host_param_test_instance_t;
|
||||||
|
|
||||||
|
int f0r_init()
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
void f0r_deinit()
|
||||||
|
{ /* empty */ }
|
||||||
|
|
||||||
|
void f0r_get_plugin_info( f0r_plugin_info_t* info )
|
||||||
|
{
|
||||||
|
info->name = "Host Parameter Test";
|
||||||
|
info->author = "Richard Spindler";
|
||||||
|
info->plugin_type = F0R_PLUGIN_TYPE_FILTER;
|
||||||
|
info->color_model = F0R_COLOR_MODEL_RGBA8888;
|
||||||
|
info->frei0r_version = FREI0R_MAJOR_VERSION;
|
||||||
|
info->major_version = 0;
|
||||||
|
info->minor_version = 1;
|
||||||
|
info->num_params = 5;
|
||||||
|
info->explanation = "This Plugin is only for testing the completeness of the frei0r parameter spec implementation.";
|
||||||
|
|
||||||
|
}
|
||||||
|
void f0r_get_param_info( f0r_param_info_t* info, int param_index )
|
||||||
|
{
|
||||||
|
switch ( param_index ) {
|
||||||
|
case 0:
|
||||||
|
info->name = "Double";
|
||||||
|
info->type = F0R_PARAM_DOUBLE;
|
||||||
|
info->explanation = "Explanation for Double";
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
info->name = "Boolean";
|
||||||
|
info->type = F0R_PARAM_BOOL;
|
||||||
|
info->explanation = "Explanation for Boolean";
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
info->name = "Color";
|
||||||
|
info->type = F0R_PARAM_COLOR;
|
||||||
|
info->explanation = "Explanation for Color";
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
info->name = "Position";
|
||||||
|
info->type = F0R_PARAM_POSITION;
|
||||||
|
info->explanation = "Explanation for Position";
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
info->name = "String";
|
||||||
|
info->type = F0R_PARAM_STRING;
|
||||||
|
info->explanation = "Explanation for String";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
f0r_instance_t f0r_construct(unsigned int width, unsigned int height)
|
||||||
|
{
|
||||||
|
host_param_test_instance_t* inst = (host_param_test_instance_t*)malloc(sizeof(host_param_test_instance_t));
|
||||||
|
inst->w = width;
|
||||||
|
inst->h = height;
|
||||||
|
|
||||||
|
inst->dvalue = 0.5;
|
||||||
|
inst->bvalue = false;
|
||||||
|
inst->cvalue.r = 0.5;
|
||||||
|
inst->cvalue.g = 0.5;
|
||||||
|
inst->cvalue.b = 0.5;
|
||||||
|
inst->pvalue.x = 0.0;
|
||||||
|
inst->pvalue.y = 0.0;
|
||||||
|
const char* sval = "Hello";
|
||||||
|
inst->svalue = malloc( strlen(sval) + 1 );
|
||||||
|
strcpy( inst->svalue, sval );
|
||||||
|
return (f0r_instance_t)inst;
|
||||||
|
}
|
||||||
|
void f0r_destruct(f0r_instance_t instance)
|
||||||
|
{
|
||||||
|
host_param_test_instance_t* inst = (host_param_test_instance_t*)instance;
|
||||||
|
free(inst->svalue);
|
||||||
|
free(instance);
|
||||||
|
}
|
||||||
|
void f0r_set_param_value(f0r_instance_t instance,
|
||||||
|
f0r_param_t param, int param_index)
|
||||||
|
{
|
||||||
|
host_param_test_instance_t* inst = (host_param_test_instance_t*)instance;
|
||||||
|
switch ( param_index ) {
|
||||||
|
case 0:
|
||||||
|
inst->dvalue = *((double*)param);
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
inst->bvalue = (*((double*)param)) >= 0.5;
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
inst->cvalue = *((f0r_param_color_t*)param);
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
inst->pvalue = *((f0r_param_position_t*)param);
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
{
|
||||||
|
char* sval = ((char*)param);
|
||||||
|
inst->svalue = realloc( inst->svalue, strlen(sval) + 1 );
|
||||||
|
strcpy( inst->svalue, sval );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
void f0r_get_param_value(f0r_instance_t instance,
|
||||||
|
f0r_param_t param, int param_index)
|
||||||
|
{
|
||||||
|
host_param_test_instance_t* inst = (host_param_test_instance_t*)instance;
|
||||||
|
switch ( param_index ) {
|
||||||
|
case 0:
|
||||||
|
*((double*)param) = inst->dvalue;
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
*((double*)param) = (double)inst->bvalue;
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
*((f0r_param_color_t*)param) = inst->cvalue;
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
*((f0r_param_position_t*)param) = inst->pvalue;
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
*((char**)param) = inst->svalue;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
void f0r_update(f0r_instance_t instance, double time,
|
||||||
|
const uint32_t* inframe, uint32_t* outframe)
|
||||||
|
{
|
||||||
|
host_param_test_instance_t* inst = (host_param_test_instance_t*)instance;
|
||||||
|
|
||||||
|
uint32_t* dst = outframe;
|
||||||
|
const uint32_t* src = inframe;
|
||||||
|
|
||||||
|
int len = inst->w * inst->h;
|
||||||
|
|
||||||
|
int i;
|
||||||
|
for ( i = 0; i < len; i++ ) {
|
||||||
|
*dst = *src;
|
||||||
|
dst++;
|
||||||
|
src++;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
138
frei0r-autoconf/src/filter/hueshift0r/hueshift0r.c
Normal file
@@ -0,0 +1,138 @@
|
|||||||
|
/* hueshift0r.c
|
||||||
|
* Copyright (C) 2005 Jean-Sebastien Senecal (Drone)
|
||||||
|
* This file is a Frei0r plugin.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <math.h>
|
||||||
|
#include <assert.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
#include "frei0r.h"
|
||||||
|
#include "matrix.h"
|
||||||
|
|
||||||
|
typedef struct hueshift0r_instance
|
||||||
|
{
|
||||||
|
unsigned int width;
|
||||||
|
unsigned int height;
|
||||||
|
int hueshift; /* the shift [0, 360] */
|
||||||
|
float mat[4][4];
|
||||||
|
} hueshift0r_instance_t;
|
||||||
|
|
||||||
|
/* Updates the shift matrix. */
|
||||||
|
void update_mat(hueshift0r_instance_t *inst)
|
||||||
|
{
|
||||||
|
identmat(inst->mat);
|
||||||
|
huerotatemat(inst->mat, (float)inst->hueshift);
|
||||||
|
}
|
||||||
|
|
||||||
|
int f0r_init()
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
void f0r_deinit()
|
||||||
|
{ /* no initialization required */ }
|
||||||
|
|
||||||
|
void f0r_get_plugin_info(f0r_plugin_info_t* info)
|
||||||
|
{
|
||||||
|
info->name = "Hueshift0r";
|
||||||
|
info->author = "Jean-Sebastien Senecal";
|
||||||
|
info->plugin_type = F0R_PLUGIN_TYPE_FILTER;
|
||||||
|
info->color_model = F0R_COLOR_MODEL_BGRA8888;
|
||||||
|
info->frei0r_version = FREI0R_MAJOR_VERSION;
|
||||||
|
info->major_version = 0;
|
||||||
|
info->minor_version = 2;
|
||||||
|
info->num_params = 1;
|
||||||
|
info->explanation = "Shifts the hue of a source image";
|
||||||
|
}
|
||||||
|
|
||||||
|
void f0r_get_param_info(f0r_param_info_t* info, int param_index)
|
||||||
|
{
|
||||||
|
switch(param_index)
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
info->name = "Hue";
|
||||||
|
info->type = F0R_PARAM_DOUBLE;
|
||||||
|
info->explanation = "The shift value";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
f0r_instance_t f0r_construct(unsigned int width, unsigned int height)
|
||||||
|
{
|
||||||
|
hueshift0r_instance_t* inst =
|
||||||
|
(hueshift0r_instance_t*)malloc(sizeof(hueshift0r_instance_t));
|
||||||
|
inst->width = width; inst->height = height;
|
||||||
|
/* init transformation matrix */
|
||||||
|
inst->hueshift = 0;
|
||||||
|
update_mat(inst);
|
||||||
|
return (f0r_instance_t)inst;
|
||||||
|
}
|
||||||
|
|
||||||
|
void f0r_destruct(f0r_instance_t instance)
|
||||||
|
{
|
||||||
|
free(instance);
|
||||||
|
}
|
||||||
|
|
||||||
|
void f0r_set_param_value(f0r_instance_t instance,
|
||||||
|
f0r_param_t param, int param_index)
|
||||||
|
{
|
||||||
|
assert(instance);
|
||||||
|
hueshift0r_instance_t* inst = (hueshift0r_instance_t*)instance;
|
||||||
|
|
||||||
|
switch(param_index)
|
||||||
|
{
|
||||||
|
int val;
|
||||||
|
case 0:
|
||||||
|
/* constrast */
|
||||||
|
val = (int) (*((double*)param) * 360.0); /* remap to [0, 360] */
|
||||||
|
if (val != inst->hueshift)
|
||||||
|
{
|
||||||
|
inst->hueshift = val;
|
||||||
|
update_mat(inst);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void f0r_get_param_value(f0r_instance_t instance,
|
||||||
|
f0r_param_t param, int param_index)
|
||||||
|
{
|
||||||
|
assert(instance);
|
||||||
|
hueshift0r_instance_t* inst = (hueshift0r_instance_t*)instance;
|
||||||
|
|
||||||
|
switch(param_index)
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
*((double*)param) = (double) (inst->hueshift / 360.0);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void f0r_update(f0r_instance_t instance, double time,
|
||||||
|
const uint32_t* inframe, uint32_t* outframe)
|
||||||
|
{
|
||||||
|
assert(instance);
|
||||||
|
hueshift0r_instance_t* inst = (hueshift0r_instance_t*)instance;
|
||||||
|
unsigned int len = inst->width * inst->height;
|
||||||
|
|
||||||
|
memcpy(outframe, inframe, len*sizeof(uint32_t));
|
||||||
|
applymatrix((unsigned long*)outframe, inst->mat, len);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
506
frei0r-autoconf/src/filter/hueshift0r/matrix.h
Normal file
@@ -0,0 +1,506 @@
|
|||||||
|
/*
|
||||||
|
* matrix -
|
||||||
|
* Use 4x4 matricies to process color images.
|
||||||
|
*
|
||||||
|
* To compile:
|
||||||
|
cc matrix.c -o matrix -lgutil -limage -lgl -lm
|
||||||
|
*
|
||||||
|
* Paul Haeberli - 1993
|
||||||
|
*/
|
||||||
|
#include <math.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
#define RLUM (0.3086)
|
||||||
|
#define GLUM (0.6094)
|
||||||
|
#define BLUM (0.0820)
|
||||||
|
|
||||||
|
#define OFFSET_R 0
|
||||||
|
#define OFFSET_G 1
|
||||||
|
#define OFFSET_B 2
|
||||||
|
#define OFFSET_A 3
|
||||||
|
|
||||||
|
unsigned char CLAMP0255(int32_t a)
|
||||||
|
{
|
||||||
|
return (unsigned char)
|
||||||
|
( (((-a) >> 31) & a) // 0 if the number was negative
|
||||||
|
| (255 - a) >> 31); // -1 if the number was greater than 255
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* printmat -
|
||||||
|
* print a 4 by 4 matrix
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
printmat(mat)
|
||||||
|
float mat[4][4];
|
||||||
|
{
|
||||||
|
int x, y;
|
||||||
|
|
||||||
|
fprintf(stderr,"\n");
|
||||||
|
for(y=0; y<4; y++) {
|
||||||
|
for(x=0; x<4; x++)
|
||||||
|
fprintf(stderr,"%f ",mat[y][x]);
|
||||||
|
fprintf(stderr,"\n");
|
||||||
|
}
|
||||||
|
fprintf(stderr,"\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* applymatrix -
|
||||||
|
* use a matrix to transform colors.
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
applymatrix(lptr,mat,n)
|
||||||
|
unsigned long *lptr;
|
||||||
|
float mat[4][4];
|
||||||
|
int n;
|
||||||
|
{
|
||||||
|
int ir, ig, ib, r, g, b;
|
||||||
|
unsigned char *cptr;
|
||||||
|
|
||||||
|
cptr = (unsigned char *)lptr;
|
||||||
|
while(n--) {
|
||||||
|
ir = cptr[OFFSET_R];
|
||||||
|
ig = cptr[OFFSET_G];
|
||||||
|
ib = cptr[OFFSET_B];
|
||||||
|
r = ir*mat[0][0] + ig*mat[1][0] + ib*mat[2][0] + mat[3][0];
|
||||||
|
g = ir*mat[0][1] + ig*mat[1][1] + ib*mat[2][1] + mat[3][1];
|
||||||
|
b = ir*mat[0][2] + ig*mat[1][2] + ib*mat[2][2] + mat[3][2];
|
||||||
|
cptr[OFFSET_R] = CLAMP0255(r);
|
||||||
|
cptr[OFFSET_G] = CLAMP0255(g);
|
||||||
|
cptr[OFFSET_B] = CLAMP0255(b);
|
||||||
|
cptr += 4;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* matrixmult -
|
||||||
|
* multiply two matricies
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
matrixmult(a,b,c)
|
||||||
|
float a[4][4], b[4][4], c[4][4];
|
||||||
|
{
|
||||||
|
int x, y;
|
||||||
|
float temp[4][4];
|
||||||
|
|
||||||
|
for(y=0; y<4 ; y++)
|
||||||
|
for(x=0 ; x<4 ; x++) {
|
||||||
|
temp[y][x] = b[y][0] * a[0][x]
|
||||||
|
+ b[y][1] * a[1][x]
|
||||||
|
+ b[y][2] * a[2][x]
|
||||||
|
+ b[y][3] * a[3][x];
|
||||||
|
}
|
||||||
|
for(y=0; y<4; y++)
|
||||||
|
for(x=0; x<4; x++)
|
||||||
|
c[y][x] = temp[y][x];
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* identmat -
|
||||||
|
* make an identity matrix
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
identmat(matrix)
|
||||||
|
float *matrix;
|
||||||
|
{
|
||||||
|
*matrix++ = 1.0; /* row 1 */
|
||||||
|
*matrix++ = 0.0;
|
||||||
|
*matrix++ = 0.0;
|
||||||
|
*matrix++ = 0.0;
|
||||||
|
*matrix++ = 0.0; /* row 2 */
|
||||||
|
*matrix++ = 1.0;
|
||||||
|
*matrix++ = 0.0;
|
||||||
|
*matrix++ = 0.0;
|
||||||
|
*matrix++ = 0.0; /* row 3 */
|
||||||
|
*matrix++ = 0.0;
|
||||||
|
*matrix++ = 1.0;
|
||||||
|
*matrix++ = 0.0;
|
||||||
|
*matrix++ = 0.0; /* row 4 */
|
||||||
|
*matrix++ = 0.0;
|
||||||
|
*matrix++ = 0.0;
|
||||||
|
*matrix++ = 1.0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* xformpnt -
|
||||||
|
* transform a 3D point using a matrix
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
xformpnt(matrix,x,y,z,tx,ty,tz)
|
||||||
|
float matrix[4][4];
|
||||||
|
float x,y,z;
|
||||||
|
float *tx,*ty,*tz;
|
||||||
|
{
|
||||||
|
*tx = x*matrix[0][0] + y*matrix[1][0] + z*matrix[2][0] + matrix[3][0];
|
||||||
|
*ty = x*matrix[0][1] + y*matrix[1][1] + z*matrix[2][1] + matrix[3][1];
|
||||||
|
*tz = x*matrix[0][2] + y*matrix[1][2] + z*matrix[2][2] + matrix[3][2];
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* cscalemat -
|
||||||
|
* make a color scale marix
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
cscalemat(mat,rscale,gscale,bscale)
|
||||||
|
float mat[4][4];
|
||||||
|
float rscale, gscale, bscale;
|
||||||
|
{
|
||||||
|
float mmat[4][4];
|
||||||
|
|
||||||
|
mmat[0][0] = rscale;
|
||||||
|
mmat[0][1] = 0.0;
|
||||||
|
mmat[0][2] = 0.0;
|
||||||
|
mmat[0][3] = 0.0;
|
||||||
|
|
||||||
|
mmat[1][0] = 0.0;
|
||||||
|
mmat[1][1] = gscale;
|
||||||
|
mmat[1][2] = 0.0;
|
||||||
|
mmat[1][3] = 0.0;
|
||||||
|
|
||||||
|
|
||||||
|
mmat[2][0] = 0.0;
|
||||||
|
mmat[2][1] = 0.0;
|
||||||
|
mmat[2][2] = bscale;
|
||||||
|
mmat[2][3] = 0.0;
|
||||||
|
|
||||||
|
mmat[3][0] = 0.0;
|
||||||
|
mmat[3][1] = 0.0;
|
||||||
|
mmat[3][2] = 0.0;
|
||||||
|
mmat[3][3] = 1.0;
|
||||||
|
matrixmult(mmat,mat,mat);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* lummat -
|
||||||
|
* make a luminance marix
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
lummat(mat)
|
||||||
|
float mat[4][4];
|
||||||
|
{
|
||||||
|
float mmat[4][4];
|
||||||
|
float rwgt, gwgt, bwgt;
|
||||||
|
|
||||||
|
rwgt = RLUM;
|
||||||
|
gwgt = GLUM;
|
||||||
|
bwgt = BLUM;
|
||||||
|
mmat[0][0] = rwgt;
|
||||||
|
mmat[0][1] = rwgt;
|
||||||
|
mmat[0][2] = rwgt;
|
||||||
|
mmat[0][3] = 0.0;
|
||||||
|
|
||||||
|
mmat[1][0] = gwgt;
|
||||||
|
mmat[1][1] = gwgt;
|
||||||
|
mmat[1][2] = gwgt;
|
||||||
|
mmat[1][3] = 0.0;
|
||||||
|
|
||||||
|
mmat[2][0] = bwgt;
|
||||||
|
mmat[2][1] = bwgt;
|
||||||
|
mmat[2][2] = bwgt;
|
||||||
|
mmat[2][3] = 0.0;
|
||||||
|
|
||||||
|
mmat[3][0] = 0.0;
|
||||||
|
mmat[3][1] = 0.0;
|
||||||
|
mmat[3][2] = 0.0;
|
||||||
|
mmat[3][3] = 1.0;
|
||||||
|
matrixmult(mmat,mat,mat);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* saturatemat -
|
||||||
|
* make a saturation marix
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
saturatemat(mat,sat)
|
||||||
|
float mat[4][4];
|
||||||
|
float sat;
|
||||||
|
{
|
||||||
|
float mmat[4][4];
|
||||||
|
float a, b, c, d, e, f, g, h, i;
|
||||||
|
float rwgt, gwgt, bwgt;
|
||||||
|
|
||||||
|
rwgt = RLUM;
|
||||||
|
gwgt = GLUM;
|
||||||
|
bwgt = BLUM;
|
||||||
|
|
||||||
|
a = (1.0-sat)*rwgt + sat;
|
||||||
|
b = (1.0-sat)*rwgt;
|
||||||
|
c = (1.0-sat)*rwgt;
|
||||||
|
d = (1.0-sat)*gwgt;
|
||||||
|
e = (1.0-sat)*gwgt + sat;
|
||||||
|
f = (1.0-sat)*gwgt;
|
||||||
|
g = (1.0-sat)*bwgt;
|
||||||
|
h = (1.0-sat)*bwgt;
|
||||||
|
i = (1.0-sat)*bwgt + sat;
|
||||||
|
mmat[0][0] = a;
|
||||||
|
mmat[0][1] = b;
|
||||||
|
mmat[0][2] = c;
|
||||||
|
mmat[0][3] = 0.0;
|
||||||
|
|
||||||
|
mmat[1][0] = d;
|
||||||
|
mmat[1][1] = e;
|
||||||
|
mmat[1][2] = f;
|
||||||
|
mmat[1][3] = 0.0;
|
||||||
|
|
||||||
|
mmat[2][0] = g;
|
||||||
|
mmat[2][1] = h;
|
||||||
|
mmat[2][2] = i;
|
||||||
|
mmat[2][3] = 0.0;
|
||||||
|
|
||||||
|
mmat[3][0] = 0.0;
|
||||||
|
mmat[3][1] = 0.0;
|
||||||
|
mmat[3][2] = 0.0;
|
||||||
|
mmat[3][3] = 1.0;
|
||||||
|
matrixmult(mmat,mat,mat);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* offsetmat -
|
||||||
|
* offset r, g, and b
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
offsetmat(mat,roffset,goffset,boffset)
|
||||||
|
float mat[4][4];
|
||||||
|
float roffset, goffset, boffset;
|
||||||
|
{
|
||||||
|
float mmat[4][4];
|
||||||
|
|
||||||
|
mmat[0][0] = 1.0;
|
||||||
|
mmat[0][1] = 0.0;
|
||||||
|
mmat[0][2] = 0.0;
|
||||||
|
mmat[0][3] = 0.0;
|
||||||
|
|
||||||
|
mmat[1][0] = 0.0;
|
||||||
|
mmat[1][1] = 1.0;
|
||||||
|
mmat[1][2] = 0.0;
|
||||||
|
mmat[1][3] = 0.0;
|
||||||
|
|
||||||
|
mmat[2][0] = 0.0;
|
||||||
|
mmat[2][1] = 0.0;
|
||||||
|
mmat[2][2] = 1.0;
|
||||||
|
mmat[2][3] = 0.0;
|
||||||
|
|
||||||
|
mmat[3][0] = roffset;
|
||||||
|
mmat[3][1] = goffset;
|
||||||
|
mmat[3][2] = boffset;
|
||||||
|
mmat[3][3] = 1.0;
|
||||||
|
matrixmult(mmat,mat,mat);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* xrotate -
|
||||||
|
* rotate about the x (red) axis
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
xrotatemat(mat,rs,rc)
|
||||||
|
float mat[4][4];
|
||||||
|
float rs, rc;
|
||||||
|
{
|
||||||
|
float mmat[4][4];
|
||||||
|
|
||||||
|
mmat[0][0] = 1.0;
|
||||||
|
mmat[0][1] = 0.0;
|
||||||
|
mmat[0][2] = 0.0;
|
||||||
|
mmat[0][3] = 0.0;
|
||||||
|
|
||||||
|
mmat[1][0] = 0.0;
|
||||||
|
mmat[1][1] = rc;
|
||||||
|
mmat[1][2] = rs;
|
||||||
|
mmat[1][3] = 0.0;
|
||||||
|
|
||||||
|
mmat[2][0] = 0.0;
|
||||||
|
mmat[2][1] = -rs;
|
||||||
|
mmat[2][2] = rc;
|
||||||
|
mmat[2][3] = 0.0;
|
||||||
|
|
||||||
|
mmat[3][0] = 0.0;
|
||||||
|
mmat[3][1] = 0.0;
|
||||||
|
mmat[3][2] = 0.0;
|
||||||
|
mmat[3][3] = 1.0;
|
||||||
|
matrixmult(mmat,mat,mat);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* yrotate -
|
||||||
|
* rotate about the y (green) axis
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
yrotatemat(mat,rs,rc)
|
||||||
|
float mat[4][4];
|
||||||
|
float rs, rc;
|
||||||
|
{
|
||||||
|
float mmat[4][4];
|
||||||
|
|
||||||
|
mmat[0][0] = rc;
|
||||||
|
mmat[0][1] = 0.0;
|
||||||
|
mmat[0][2] = -rs;
|
||||||
|
mmat[0][3] = 0.0;
|
||||||
|
|
||||||
|
mmat[1][0] = 0.0;
|
||||||
|
mmat[1][1] = 1.0;
|
||||||
|
mmat[1][2] = 0.0;
|
||||||
|
mmat[1][3] = 0.0;
|
||||||
|
|
||||||
|
mmat[2][0] = rs;
|
||||||
|
mmat[2][1] = 0.0;
|
||||||
|
mmat[2][2] = rc;
|
||||||
|
mmat[2][3] = 0.0;
|
||||||
|
|
||||||
|
mmat[3][0] = 0.0;
|
||||||
|
mmat[3][1] = 0.0;
|
||||||
|
mmat[3][2] = 0.0;
|
||||||
|
mmat[3][3] = 1.0;
|
||||||
|
matrixmult(mmat,mat,mat);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* zrotate -
|
||||||
|
* rotate about the z (blue) axis
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
zrotatemat(mat,rs,rc)
|
||||||
|
float mat[4][4];
|
||||||
|
float rs, rc;
|
||||||
|
{
|
||||||
|
float mmat[4][4];
|
||||||
|
|
||||||
|
mmat[0][0] = rc;
|
||||||
|
mmat[0][1] = rs;
|
||||||
|
mmat[0][2] = 0.0;
|
||||||
|
mmat[0][3] = 0.0;
|
||||||
|
|
||||||
|
mmat[1][0] = -rs;
|
||||||
|
mmat[1][1] = rc;
|
||||||
|
mmat[1][2] = 0.0;
|
||||||
|
mmat[1][3] = 0.0;
|
||||||
|
|
||||||
|
mmat[2][0] = 0.0;
|
||||||
|
mmat[2][1] = 0.0;
|
||||||
|
mmat[2][2] = 1.0;
|
||||||
|
mmat[2][3] = 0.0;
|
||||||
|
|
||||||
|
mmat[3][0] = 0.0;
|
||||||
|
mmat[3][1] = 0.0;
|
||||||
|
mmat[3][2] = 0.0;
|
||||||
|
mmat[3][3] = 1.0;
|
||||||
|
matrixmult(mmat,mat,mat);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* zshear -
|
||||||
|
* shear z using x and y.
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
zshearmat(mat,dx,dy)
|
||||||
|
float mat[4][4];
|
||||||
|
float dx, dy;
|
||||||
|
{
|
||||||
|
float mmat[4][4];
|
||||||
|
|
||||||
|
mmat[0][0] = 1.0;
|
||||||
|
mmat[0][1] = 0.0;
|
||||||
|
mmat[0][2] = dx;
|
||||||
|
mmat[0][3] = 0.0;
|
||||||
|
|
||||||
|
mmat[1][0] = 0.0;
|
||||||
|
mmat[1][1] = 1.0;
|
||||||
|
mmat[1][2] = dy;
|
||||||
|
mmat[1][3] = 0.0;
|
||||||
|
|
||||||
|
mmat[2][0] = 0.0;
|
||||||
|
mmat[2][1] = 0.0;
|
||||||
|
mmat[2][2] = 1.0;
|
||||||
|
mmat[2][3] = 0.0;
|
||||||
|
|
||||||
|
mmat[3][0] = 0.0;
|
||||||
|
mmat[3][1] = 0.0;
|
||||||
|
mmat[3][2] = 0.0;
|
||||||
|
mmat[3][3] = 1.0;
|
||||||
|
matrixmult(mmat,mat,mat);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* simplehuerotatemat -
|
||||||
|
* simple hue rotation. This changes luminance
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
simplehuerotatemat(mat,rot)
|
||||||
|
float mat[4][4];
|
||||||
|
float rot;
|
||||||
|
{
|
||||||
|
float mag;
|
||||||
|
float xrs, xrc;
|
||||||
|
float yrs, yrc;
|
||||||
|
float zrs, zrc;
|
||||||
|
|
||||||
|
/* rotate the grey vector into positive Z */
|
||||||
|
mag = sqrt(2.0);
|
||||||
|
xrs = 1.0/mag;
|
||||||
|
xrc = 1.0/mag;
|
||||||
|
xrotatemat(mat,xrs,xrc);
|
||||||
|
|
||||||
|
mag = sqrt(3.0);
|
||||||
|
yrs = -1.0/mag;
|
||||||
|
yrc = sqrt(2.0)/mag;
|
||||||
|
yrotatemat(mat,yrs,yrc);
|
||||||
|
|
||||||
|
/* rotate the hue */
|
||||||
|
zrs = sin(rot*M_PI/180.0);
|
||||||
|
zrc = cos(rot*M_PI/180.0);
|
||||||
|
zrotatemat(mat,zrs,zrc);
|
||||||
|
|
||||||
|
/* rotate the grey vector back into place */
|
||||||
|
yrotatemat(mat,-yrs,yrc);
|
||||||
|
xrotatemat(mat,-xrs,xrc);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* huerotatemat -
|
||||||
|
* rotate the hue, while maintaining luminance.
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
huerotatemat(mat,rot)
|
||||||
|
float mat[4][4];
|
||||||
|
float rot;
|
||||||
|
{
|
||||||
|
float mmat[4][4];
|
||||||
|
float mag;
|
||||||
|
float lx, ly, lz;
|
||||||
|
float xrs, xrc;
|
||||||
|
float yrs, yrc;
|
||||||
|
float zrs, zrc;
|
||||||
|
float zsx, zsy;
|
||||||
|
|
||||||
|
identmat(mmat);
|
||||||
|
|
||||||
|
/* rotate the grey vector into positive Z */
|
||||||
|
mag = sqrt(2.0);
|
||||||
|
xrs = 1.0/mag;
|
||||||
|
xrc = 1.0/mag;
|
||||||
|
xrotatemat(mmat,xrs,xrc);
|
||||||
|
mag = sqrt(3.0);
|
||||||
|
yrs = -1.0/mag;
|
||||||
|
yrc = sqrt(2.0)/mag;
|
||||||
|
yrotatemat(mmat,yrs,yrc);
|
||||||
|
|
||||||
|
/* shear the space to make the luminance plane horizontal */
|
||||||
|
xformpnt(mmat,RLUM,GLUM,BLUM,&lx,&ly,&lz);
|
||||||
|
zsx = lx/lz;
|
||||||
|
zsy = ly/lz;
|
||||||
|
zshearmat(mmat,zsx,zsy);
|
||||||
|
|
||||||
|
/* rotate the hue */
|
||||||
|
zrs = sin(rot*M_PI/180.0);
|
||||||
|
zrc = cos(rot*M_PI/180.0);
|
||||||
|
zrotatemat(mmat,zrs,zrc);
|
||||||
|
|
||||||
|
/* unshear the space to put the luminance plane back */
|
||||||
|
zshearmat(mmat,-zsx,-zsy);
|
||||||
|
|
||||||
|
/* rotate the grey vector back into place */
|
||||||
|
yrotatemat(mmat,-yrs,yrc);
|
||||||
|
xrotatemat(mmat,-xrs,xrc);
|
||||||
|
|
||||||
|
matrixmult(mmat,mat,mat);
|
||||||
|
}
|
||||||
74
frei0r-autoconf/src/filter/invert0r/invert0r.c
Normal file
@@ -0,0 +1,74 @@
|
|||||||
|
#include <stdlib.h>
|
||||||
|
#include <assert.h>
|
||||||
|
|
||||||
|
#include "frei0r.h"
|
||||||
|
|
||||||
|
typedef struct inverter_instance
|
||||||
|
{
|
||||||
|
unsigned int width;
|
||||||
|
unsigned int height;
|
||||||
|
} inverter_instance_t;
|
||||||
|
|
||||||
|
int f0r_init()
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
void f0r_deinit()
|
||||||
|
{ /* no initialization required */ }
|
||||||
|
|
||||||
|
void f0r_get_plugin_info(f0r_plugin_info_t* inverterInfo)
|
||||||
|
{
|
||||||
|
inverterInfo->name = "Invert0r";
|
||||||
|
inverterInfo->author = "Gephex crew";
|
||||||
|
inverterInfo->plugin_type = F0R_PLUGIN_TYPE_FILTER;
|
||||||
|
inverterInfo->color_model = F0R_COLOR_MODEL_RGBA8888;
|
||||||
|
inverterInfo->frei0r_version = FREI0R_MAJOR_VERSION;
|
||||||
|
inverterInfo->major_version = 0;
|
||||||
|
inverterInfo->minor_version = 9;
|
||||||
|
inverterInfo->num_params = 0;
|
||||||
|
inverterInfo->explanation = "Inverts all colors of a source image";
|
||||||
|
}
|
||||||
|
|
||||||
|
void f0r_get_param_info(f0r_param_info_t* info, int param_index)
|
||||||
|
{
|
||||||
|
/* no params */
|
||||||
|
}
|
||||||
|
|
||||||
|
f0r_instance_t f0r_construct(unsigned int width, unsigned int height)
|
||||||
|
{
|
||||||
|
inverter_instance_t* inst =
|
||||||
|
(inverter_instance_t*)malloc(sizeof(inverter_instance_t));
|
||||||
|
inst->width = width; inst->height = height;
|
||||||
|
return (f0r_instance_t)inst;
|
||||||
|
}
|
||||||
|
|
||||||
|
void f0r_destruct(f0r_instance_t instance)
|
||||||
|
{
|
||||||
|
free(instance);
|
||||||
|
}
|
||||||
|
|
||||||
|
void f0r_set_param_value(f0r_instance_t instance,
|
||||||
|
f0r_param_t param, int param_index)
|
||||||
|
{ /* no params */ }
|
||||||
|
|
||||||
|
void f0r_get_param_value(f0r_instance_t instance,
|
||||||
|
f0r_param_t param, int param_index)
|
||||||
|
{ /* no params */ }
|
||||||
|
|
||||||
|
void f0r_update(f0r_instance_t instance, double time,
|
||||||
|
const uint32_t* inframe, uint32_t* outframe)
|
||||||
|
{
|
||||||
|
assert(instance);
|
||||||
|
inverter_instance_t* inst = (inverter_instance_t*)instance;
|
||||||
|
unsigned int w = inst->width;
|
||||||
|
unsigned int h = inst->height;
|
||||||
|
unsigned int x,y;
|
||||||
|
|
||||||
|
uint32_t* dst = outframe;
|
||||||
|
const uint32_t* src = inframe;
|
||||||
|
for(y=0;y<h;++y)
|
||||||
|
for(x=0;x<w;++x,++src)
|
||||||
|
*dst++ = 0x00ffffff^(*src);
|
||||||
|
}
|
||||||
|
|
||||||
BIN
frei0r-autoconf/src/filter/invert0r/invert0r_post.jpg
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
frei0r-autoconf/src/filter/invert0r/invert0r_pre.jpg
Normal file
|
After Width: | Height: | Size: 12 KiB |
250
frei0r-autoconf/src/filter/lenscorrection/lenscorrection.c
Normal file
@@ -0,0 +1,250 @@
|
|||||||
|
/* lenscorrection.c
|
||||||
|
* Copyright (C) 2007 Richard Spindler
|
||||||
|
* This file is a Frei0r plugin.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <math.h>
|
||||||
|
#include <assert.h>
|
||||||
|
|
||||||
|
#include "frei0r.h"
|
||||||
|
#include "frei0r_math.h"
|
||||||
|
|
||||||
|
typedef struct lenscorrection_instance
|
||||||
|
{
|
||||||
|
unsigned int width;
|
||||||
|
unsigned int height;
|
||||||
|
double xcenter;
|
||||||
|
double ycenter;
|
||||||
|
double correctionnearcenter;
|
||||||
|
double correctionnearedges;
|
||||||
|
double brightness;
|
||||||
|
} lenscorrection_instance_t;
|
||||||
|
|
||||||
|
|
||||||
|
int f0r_init()
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
void f0r_deinit()
|
||||||
|
{ /* no initialization required */ }
|
||||||
|
|
||||||
|
void f0r_get_plugin_info(f0r_plugin_info_t* lenscorrection_info)
|
||||||
|
{
|
||||||
|
lenscorrection_info->name = "Lens Correction";
|
||||||
|
lenscorrection_info->author = "Richard Spindler";
|
||||||
|
lenscorrection_info->plugin_type = F0R_PLUGIN_TYPE_FILTER;
|
||||||
|
lenscorrection_info->color_model = F0R_COLOR_MODEL_RGBA8888;
|
||||||
|
lenscorrection_info->frei0r_version = FREI0R_MAJOR_VERSION;
|
||||||
|
lenscorrection_info->major_version = 0;
|
||||||
|
lenscorrection_info->minor_version = 2;
|
||||||
|
lenscorrection_info->num_params = 5;
|
||||||
|
lenscorrection_info->explanation = "Allows compensation of lens distortion";
|
||||||
|
}
|
||||||
|
|
||||||
|
void f0r_get_param_info(f0r_param_info_t* info, int param_index)
|
||||||
|
{
|
||||||
|
switch(param_index)
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
info->name = "xcenter";
|
||||||
|
info->type = F0R_PARAM_DOUBLE;
|
||||||
|
info->explanation = "";
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
info->name = "ycenter";
|
||||||
|
info->type = F0R_PARAM_DOUBLE;
|
||||||
|
info->explanation = "";
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
info->name = "correctionnearcenter";
|
||||||
|
info->type = F0R_PARAM_DOUBLE;
|
||||||
|
info->explanation = "";
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
info->name = "correctionnearedges";
|
||||||
|
info->type = F0R_PARAM_DOUBLE;
|
||||||
|
info->explanation = "";
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
info->name = "brightness";
|
||||||
|
info->type = F0R_PARAM_DOUBLE;
|
||||||
|
info->explanation = "";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
f0r_instance_t f0r_construct(unsigned int width, unsigned int height)
|
||||||
|
{
|
||||||
|
lenscorrection_instance_t* inst =
|
||||||
|
(lenscorrection_instance_t*)malloc(sizeof(lenscorrection_instance_t));
|
||||||
|
inst->width = width; inst->height = height;
|
||||||
|
|
||||||
|
inst->xcenter = 0.5;
|
||||||
|
inst->ycenter = 0.5;
|
||||||
|
inst->correctionnearcenter = 0.5;
|
||||||
|
inst->correctionnearedges = 0.5;
|
||||||
|
inst->brightness = 0.5;
|
||||||
|
return (f0r_instance_t)inst;
|
||||||
|
}
|
||||||
|
|
||||||
|
void f0r_destruct(f0r_instance_t instance)
|
||||||
|
{
|
||||||
|
free(instance);
|
||||||
|
}
|
||||||
|
|
||||||
|
void f0r_set_param_value(f0r_instance_t instance,
|
||||||
|
f0r_param_t param, int param_index)
|
||||||
|
{
|
||||||
|
assert(instance);
|
||||||
|
lenscorrection_instance_t* inst = (lenscorrection_instance_t*)instance;
|
||||||
|
|
||||||
|
switch(param_index)
|
||||||
|
{
|
||||||
|
double val;
|
||||||
|
case 0:
|
||||||
|
val = *((double*)param);
|
||||||
|
inst->xcenter = val;
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
val = *((double*)param);
|
||||||
|
inst->ycenter = val;
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
val = *((double*)param);
|
||||||
|
inst->correctionnearcenter = val;
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
val = *((double*)param);
|
||||||
|
inst->correctionnearedges = val;
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
val = *((double*)param);
|
||||||
|
inst->brightness = val;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void f0r_get_param_value(f0r_instance_t instance,
|
||||||
|
f0r_param_t param, int param_index)
|
||||||
|
{
|
||||||
|
assert(instance);
|
||||||
|
lenscorrection_instance_t* inst = (lenscorrection_instance_t*)instance;
|
||||||
|
|
||||||
|
switch(param_index)
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
*((double*)param) = inst->xcenter;
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
*((double*)param) = inst->ycenter;
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
*((double*)param) = inst->correctionnearcenter;
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
*((double*)param) = inst->correctionnearedges;
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
*((double*)param) = inst->brightness;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void f0r_update(f0r_instance_t instance, double time,
|
||||||
|
const uint32_t* inframe, uint32_t* outframe)
|
||||||
|
{
|
||||||
|
//Algorithm fetched from Krita
|
||||||
|
int x, y;
|
||||||
|
assert(instance);
|
||||||
|
lenscorrection_instance_t* inst = (lenscorrection_instance_t*)instance;
|
||||||
|
|
||||||
|
double xcenter = inst->xcenter;
|
||||||
|
double ycenter = inst->ycenter;
|
||||||
|
double correctionnearcenter = inst->correctionnearcenter;
|
||||||
|
double correctionnearedges = inst->correctionnearedges;
|
||||||
|
/* double brightness = inst->brightness; */
|
||||||
|
|
||||||
|
double normallise_radius_sq = 4.0 / (inst->width * inst->width + inst->height * inst->height );
|
||||||
|
xcenter = inst->width * xcenter;
|
||||||
|
ycenter = inst->height * ycenter;
|
||||||
|
double mult_sq = ( correctionnearcenter - 0.5 );
|
||||||
|
double mult_qd = ( correctionnearedges - 0.5);
|
||||||
|
|
||||||
|
for ( y = 0; y < inst->height; y++ ) {
|
||||||
|
for ( x = 0; x < inst->width; x++ ) {
|
||||||
|
double off_x = x - xcenter;
|
||||||
|
double off_y = y - ycenter;
|
||||||
|
double radius_sq = ( (off_x * off_x) + (off_y * off_y) ) * normallise_radius_sq;
|
||||||
|
|
||||||
|
double radius_mult = radius_sq * mult_sq + radius_sq * radius_sq * mult_qd;
|
||||||
|
/* double mag = radius_mult; */
|
||||||
|
radius_mult += 1.0;
|
||||||
|
double srcX = xcenter + radius_mult * off_x;
|
||||||
|
double srcY = ycenter + radius_mult * off_y;
|
||||||
|
|
||||||
|
/* double brighten = 1.0 + mag * brightness; */
|
||||||
|
// Disabled to avoid compiler warnings
|
||||||
|
|
||||||
|
int sx;
|
||||||
|
int sy;
|
||||||
|
sx = srcX;
|
||||||
|
sy = srcY;
|
||||||
|
if ( sx < 0 || sy < 0 || sx >= inst->width || sy >= inst->height ) {
|
||||||
|
outframe[x + y * inst->width] = 0x00000000;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
//FIXME: interpolate pixel!!
|
||||||
|
outframe[x + y * inst->width] = inframe[sx + sy * inst->width];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32_t interpolate_pixel( uint8_t* frame, int w, int h, double x, double y ) {
|
||||||
|
/*
|
||||||
|
+--+--+
|
||||||
|
| | |
|
||||||
|
+--+--+
|
||||||
|
| | |
|
||||||
|
+--+--+
|
||||||
|
|
||||||
|
|
||||||
|
0.5 is full pixel value
|
||||||
|
|
||||||
|
0.25 interpolate to left pixel
|
||||||
|
0.75 interpolate to right pixel
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* //Disabled to avoid warnings when compiling
|
||||||
|
double xoff = x - floor(x);
|
||||||
|
|
||||||
|
int xc = (int)floor(x);
|
||||||
|
int yc = (int)floor(y);
|
||||||
|
|
||||||
|
int i = (xc+yc*w)*4;
|
||||||
|
uint8_t color1_r = (uint8_t)( xoff * frame[i] + ( 1.0 - xoff ) * frame[i] );
|
||||||
|
uint8_t color1_g = (uint8_t)( xoff * frame[i+1] + ( 1.0 - xoff ) * frame[i+1] );
|
||||||
|
uint8_t color1_b = (uint8_t)( xoff * frame[i+2] + ( 1.0 - xoff ) * frame[i+2] );
|
||||||
|
uint8_t color1_a = (uint8_t)( xoff * frame[i+3] + ( 1.0 - xoff ) * frame[i+3] );
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
142
frei0r-autoconf/src/filter/letterb0xed/letterb0xed.c
Normal file
@@ -0,0 +1,142 @@
|
|||||||
|
/* letterb0xed.c
|
||||||
|
* Copyright (C) 2007 Richard Spindler (richard.spindler@gmail.com)
|
||||||
|
* This file is a Frei0r plugin.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <math.h>
|
||||||
|
#include "frei0r.h"
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
typedef struct letterb0xed_instance {
|
||||||
|
double value;
|
||||||
|
double bg_transparent;
|
||||||
|
int w, h;
|
||||||
|
int top, bottom;
|
||||||
|
int len;
|
||||||
|
uint32_t background;
|
||||||
|
} letterb0xed_instance_t;
|
||||||
|
|
||||||
|
int f0r_init()
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
void f0r_deinit()
|
||||||
|
{ /* empty */ }
|
||||||
|
|
||||||
|
void f0r_get_plugin_info( f0r_plugin_info_t* info )
|
||||||
|
{
|
||||||
|
info->name = "LetterB0xed";
|
||||||
|
info->author = "Richard Spindler";
|
||||||
|
info->plugin_type = F0R_PLUGIN_TYPE_FILTER;
|
||||||
|
info->color_model = F0R_COLOR_MODEL_RGBA8888;
|
||||||
|
info->frei0r_version = FREI0R_MAJOR_VERSION;
|
||||||
|
info->major_version = 0;
|
||||||
|
info->minor_version = 1;
|
||||||
|
info->num_params = 2;
|
||||||
|
info->explanation = "Adds Black Borders at top and bottom for Cinema Look";
|
||||||
|
|
||||||
|
}
|
||||||
|
void f0r_get_param_info( f0r_param_info_t* info, int param_index )
|
||||||
|
{
|
||||||
|
switch ( param_index ) {
|
||||||
|
case 0:
|
||||||
|
info->name = "Border Width";
|
||||||
|
info->type = F0R_PARAM_DOUBLE;
|
||||||
|
info->explanation = "";
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
info->name = "Transparency";
|
||||||
|
info->type = F0R_PARAM_BOOL;
|
||||||
|
info->explanation = "";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
f0r_instance_t f0r_construct(unsigned int width, unsigned int height)
|
||||||
|
{
|
||||||
|
letterb0xed_instance_t* inst = (letterb0xed_instance_t*)malloc(sizeof(letterb0xed_instance_t));
|
||||||
|
inst->w = width;
|
||||||
|
inst->h = height;
|
||||||
|
inst->len = width * height;
|
||||||
|
inst->value = 0.4;
|
||||||
|
inst->bg_transparent = 0.0;
|
||||||
|
inst->top = (int)( ( inst->h / 2 ) * inst->value );
|
||||||
|
inst->bottom = inst->h - inst->top;
|
||||||
|
inst->top *= inst->w;
|
||||||
|
inst->bottom *= inst->w;
|
||||||
|
inst->background = 0xFF000000;
|
||||||
|
|
||||||
|
|
||||||
|
return (f0r_instance_t)inst;
|
||||||
|
}
|
||||||
|
void f0r_destruct(f0r_instance_t instance)
|
||||||
|
{
|
||||||
|
letterb0xed_instance_t* inst = (letterb0xed_instance_t*)instance;
|
||||||
|
free(inst);
|
||||||
|
}
|
||||||
|
void f0r_set_param_value(f0r_instance_t instance,
|
||||||
|
f0r_param_t param, int param_index)
|
||||||
|
{
|
||||||
|
letterb0xed_instance_t* inst = (letterb0xed_instance_t*)instance;
|
||||||
|
switch ( param_index ) {
|
||||||
|
case 0:
|
||||||
|
inst->value = *((double*)param);
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
inst->bg_transparent = *((double*)param);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
inst->top = (int)( ( inst->h / 2 ) * inst->value );
|
||||||
|
inst->bottom = inst->h - inst->top;
|
||||||
|
inst->top *= inst->w;
|
||||||
|
inst->bottom *= inst->w;
|
||||||
|
inst->background = 0x00000000;
|
||||||
|
if ( inst->bg_transparent < 0.5 ) {
|
||||||
|
((uint8_t*)(&inst->background))[3] = 0xFF;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
void f0r_get_param_value(f0r_instance_t instance,
|
||||||
|
f0r_param_t param, int param_index)
|
||||||
|
{
|
||||||
|
letterb0xed_instance_t* inst = (letterb0xed_instance_t*)instance;
|
||||||
|
switch ( param_index ) {
|
||||||
|
case 0:
|
||||||
|
*((double*)param) = inst->value;
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
*((double*)param) = inst->bg_transparent;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
void f0r_update(f0r_instance_t instance, double time,
|
||||||
|
const uint32_t* inframe, uint32_t* outframe)
|
||||||
|
{
|
||||||
|
letterb0xed_instance_t* inst = (letterb0xed_instance_t*)instance;
|
||||||
|
int i;
|
||||||
|
for ( i = 0; i < inst->top; i++ ) {
|
||||||
|
outframe[i] = inst->background;
|
||||||
|
}
|
||||||
|
for ( i = inst->top; i < inst->bottom; i++ ) {
|
||||||
|
outframe[i] = inframe[i];
|
||||||
|
}
|
||||||
|
for ( i = inst->bottom; i < inst->len; i++ ) {
|
||||||
|
outframe[i] = inst->background;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
110
frei0r-autoconf/src/filter/luminance/luminance.c
Normal file
@@ -0,0 +1,110 @@
|
|||||||
|
/* luminance.c
|
||||||
|
* Copyright (C) 2004 Jean-Sebastien Senecal (js@drone.ws)
|
||||||
|
* Copyright (C) 2007 Richard Spindler (richard.spindler@gmail.com)
|
||||||
|
* This file is a Frei0r plugin.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <assert.h>
|
||||||
|
|
||||||
|
#include "frei0r.h"
|
||||||
|
#include "frei0r_math.h"
|
||||||
|
|
||||||
|
#define MAX_SATURATION 8.0
|
||||||
|
|
||||||
|
typedef struct luminance_instance
|
||||||
|
{
|
||||||
|
unsigned int width;
|
||||||
|
unsigned int height;
|
||||||
|
} luminance_instance_t;
|
||||||
|
|
||||||
|
int f0r_init()
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
void f0r_deinit()
|
||||||
|
{ /* no initialization required */ }
|
||||||
|
|
||||||
|
void f0r_get_plugin_info(f0r_plugin_info_t* luminance_info)
|
||||||
|
{
|
||||||
|
luminance_info->name = "Luminance";
|
||||||
|
luminance_info->author = "Richard Spindler";
|
||||||
|
luminance_info->plugin_type = F0R_PLUGIN_TYPE_FILTER;
|
||||||
|
luminance_info->color_model = F0R_COLOR_MODEL_RGBA8888;
|
||||||
|
luminance_info->frei0r_version = FREI0R_MAJOR_VERSION;
|
||||||
|
luminance_info->major_version = 0;
|
||||||
|
luminance_info->minor_version = 2;
|
||||||
|
luminance_info->num_params = 0;
|
||||||
|
luminance_info->explanation = "Creates a luminance map of the image";
|
||||||
|
}
|
||||||
|
|
||||||
|
void f0r_get_param_info(f0r_param_info_t* info, int param_index)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
f0r_instance_t f0r_construct(unsigned int width, unsigned int height)
|
||||||
|
{
|
||||||
|
luminance_instance_t* inst =
|
||||||
|
(luminance_instance_t*)malloc(sizeof(luminance_instance_t));
|
||||||
|
inst->width = width; inst->height = height;
|
||||||
|
return (f0r_instance_t)inst;
|
||||||
|
}
|
||||||
|
|
||||||
|
void f0r_destruct(f0r_instance_t instance)
|
||||||
|
{
|
||||||
|
free(instance);
|
||||||
|
}
|
||||||
|
|
||||||
|
void f0r_set_param_value(f0r_instance_t instance,
|
||||||
|
f0r_param_t param, int param_index)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void f0r_get_param_value(f0r_instance_t instance,
|
||||||
|
f0r_param_t param, int param_index)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void f0r_update(f0r_instance_t instance, double time,
|
||||||
|
const uint32_t* inframe, uint32_t* outframe)
|
||||||
|
{
|
||||||
|
assert(instance);
|
||||||
|
luminance_instance_t* inst = (luminance_instance_t*)instance;
|
||||||
|
unsigned int len = inst->width * inst->height;
|
||||||
|
|
||||||
|
|
||||||
|
unsigned char* dst = (unsigned char*)outframe;
|
||||||
|
const unsigned char* src = (unsigned char*)inframe;
|
||||||
|
|
||||||
|
int b, g, r, l;
|
||||||
|
while (len--)
|
||||||
|
{
|
||||||
|
r = *src++;
|
||||||
|
g = *src++;
|
||||||
|
b = *src++;
|
||||||
|
l = ( 30 * r + 59 * g + 11 * b ) / 100;
|
||||||
|
|
||||||
|
|
||||||
|
*dst++ = (unsigned char) (l);
|
||||||
|
*dst++ = (unsigned char) (l);
|
||||||
|
*dst++ = (unsigned char) (l);
|
||||||
|
|
||||||
|
*dst++ = *src++; // copy alpha
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
292
frei0r-autoconf/src/filter/mask0mate/blur.h
Normal file
@@ -0,0 +1,292 @@
|
|||||||
|
/* squareblur.c
|
||||||
|
* Copyright (C) 2004--2005 Mathieu Guindon
|
||||||
|
* Julien Keable
|
||||||
|
* Jean-Sebastien Senecal (js@drone.ws)
|
||||||
|
* This file is a Frei0r plugin.
|
||||||
|
*
|
||||||
|
* Modified by Richard Spindler (richard.spindler AT gmail.com) for blurring in
|
||||||
|
* the mask0mate Frei0r plugin.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <assert.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
#include "frei0r.h"
|
||||||
|
|
||||||
|
#define SIZE_RGBA 4
|
||||||
|
|
||||||
|
__inline int MAX(int a, int b)
|
||||||
|
{
|
||||||
|
return (a > b ? a : b);
|
||||||
|
}
|
||||||
|
|
||||||
|
__inline int MIN(int a, int b)
|
||||||
|
{
|
||||||
|
return (a < b ? a : b);
|
||||||
|
}
|
||||||
|
|
||||||
|
__inline void subtract_acc(uint32_t *dst, const uint32_t *src)
|
||||||
|
{
|
||||||
|
int n=SIZE_RGBA;
|
||||||
|
while (n--)
|
||||||
|
*dst++ -= *src++;
|
||||||
|
}
|
||||||
|
|
||||||
|
__inline void add_acc(uint32_t *dst, const uint32_t *src)
|
||||||
|
{
|
||||||
|
int n=SIZE_RGBA;
|
||||||
|
while (n--)
|
||||||
|
*dst++ += *src++;
|
||||||
|
}
|
||||||
|
|
||||||
|
__inline void divide(unsigned char *dst, const uint32_t *src, const unsigned int val)
|
||||||
|
{
|
||||||
|
int n=SIZE_RGBA;
|
||||||
|
while (n--)
|
||||||
|
*dst++ = *src++ / val;
|
||||||
|
}
|
||||||
|
|
||||||
|
typedef struct squareblur_instance
|
||||||
|
{
|
||||||
|
unsigned int width;
|
||||||
|
unsigned int height;
|
||||||
|
double kernel; /* the kernel size, as a percentage of the biggest of width and height */
|
||||||
|
uint32_t *mem; /* memory accumulation matrix of uint32_t (size = acc_width*acc_height*SIZE_RGBA) */
|
||||||
|
uint32_t **acc; /* accumulation matrix of pointers to SIZE_RGBA consecutive uint32_t in mem (size = acc_width*acc_height) */
|
||||||
|
} squareblur_instance_t;
|
||||||
|
|
||||||
|
/* Updates the summed area table. */
|
||||||
|
void update_summed_area_table(squareblur_instance_t *inst, const uint32_t *src)
|
||||||
|
{
|
||||||
|
register unsigned char *iter_data;
|
||||||
|
register uint32_t *iter_mem;
|
||||||
|
register unsigned int i, x, y;
|
||||||
|
|
||||||
|
uint32_t acc_buffer[SIZE_RGBA]; /* accumulation buffer */
|
||||||
|
|
||||||
|
unsigned int row_width;
|
||||||
|
unsigned int width, height;
|
||||||
|
unsigned int cell_size;
|
||||||
|
|
||||||
|
/* Compute basic params. */
|
||||||
|
width = inst->width+1;
|
||||||
|
height = inst->height+1;
|
||||||
|
row_width = SIZE_RGBA * width;
|
||||||
|
cell_size = SIZE_RGBA * sizeof(uint32_t);
|
||||||
|
|
||||||
|
/* Init iterators. */
|
||||||
|
iter_data = (unsigned char*) src;
|
||||||
|
iter_mem = inst->mem;
|
||||||
|
|
||||||
|
/* Process first row (all zeros). */
|
||||||
|
memset(iter_mem, 0, row_width * cell_size);
|
||||||
|
iter_mem += row_width;
|
||||||
|
|
||||||
|
if (height >= 1)
|
||||||
|
{
|
||||||
|
/* Process second row. */
|
||||||
|
memset(acc_buffer, 0, cell_size);
|
||||||
|
memset(iter_mem, 0, cell_size); /* first column is void */
|
||||||
|
iter_mem += SIZE_RGBA;
|
||||||
|
for (x=1; x<width; ++x)
|
||||||
|
{
|
||||||
|
for (i=0; i<SIZE_RGBA; ++i)
|
||||||
|
*iter_mem++ = (acc_buffer[i] += *iter_data++);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Process other rows. */
|
||||||
|
for (y=2; y<height; ++y)
|
||||||
|
{
|
||||||
|
/* Copy upper line. */
|
||||||
|
memcpy(iter_mem, iter_mem - row_width, row_width * sizeof(uint32_t));
|
||||||
|
|
||||||
|
/* Process row. */
|
||||||
|
memset(acc_buffer, 0, cell_size);
|
||||||
|
memset(iter_mem, 0, cell_size); /* first column is void */
|
||||||
|
iter_mem += SIZE_RGBA;
|
||||||
|
for (x=1; x<width; ++x)
|
||||||
|
{
|
||||||
|
for (i=0; i<SIZE_RGBA; ++i)
|
||||||
|
*iter_mem++ += (acc_buffer[i] += *iter_data++);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
int blur_init()
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
void blur_deinit()
|
||||||
|
{ /* no initialization required */ }
|
||||||
|
|
||||||
|
void blur_get_plugin_info(f0r_plugin_info_t* squareblur_info)
|
||||||
|
{
|
||||||
|
squareblur_info->name = "Squareblur";
|
||||||
|
squareblur_info->author = "Drone";
|
||||||
|
squareblur_info->plugin_type = F0R_PLUGIN_TYPE_FILTER;
|
||||||
|
squareblur_info->color_model = F0R_COLOR_MODEL_RGBA8888;
|
||||||
|
squareblur_info->frei0r_version = FREI0R_MAJOR_VERSION;
|
||||||
|
squareblur_info->major_version = 0;
|
||||||
|
squareblur_info->minor_version = 1;
|
||||||
|
squareblur_info->num_params = 1;
|
||||||
|
squareblur_info->explanation = "Variable-size square blur";
|
||||||
|
}
|
||||||
|
|
||||||
|
void blur_get_param_info(f0r_param_info_t* info, int param_index)
|
||||||
|
{
|
||||||
|
switch(param_index)
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
info->name = "Kernel size";
|
||||||
|
info->type = F0R_PARAM_DOUBLE;
|
||||||
|
info->explanation = "The size of the kernel, as a proportion to its coverage of the image";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
f0r_instance_t blur_construct(unsigned int width, unsigned int height)
|
||||||
|
{
|
||||||
|
squareblur_instance_t* inst =
|
||||||
|
(squareblur_instance_t*)malloc(sizeof(squareblur_instance_t));
|
||||||
|
unsigned int i;
|
||||||
|
unsigned int acc_width, acc_height = height+1;
|
||||||
|
uint32_t* iter_mem;
|
||||||
|
uint32_t** iter_acc;
|
||||||
|
/* set params */
|
||||||
|
inst->width = width; inst->height = height;
|
||||||
|
acc_width = width+1; acc_height = height+1;
|
||||||
|
inst->kernel = 0.0;
|
||||||
|
/* allocate memory for the summed-area-table */
|
||||||
|
inst->mem = (uint32_t*) malloc(acc_width*acc_height*SIZE_RGBA*sizeof(uint32_t));
|
||||||
|
inst->acc = (uint32_t**) malloc(acc_width*acc_height*sizeof(uint32_t*));
|
||||||
|
/* point at the right place */
|
||||||
|
iter_mem = inst->mem;
|
||||||
|
iter_acc = inst->acc;
|
||||||
|
for (i=0; i<acc_width*acc_height; ++i)
|
||||||
|
{
|
||||||
|
*iter_acc++ = iter_mem;
|
||||||
|
iter_mem += SIZE_RGBA;
|
||||||
|
}
|
||||||
|
return (f0r_instance_t)inst;
|
||||||
|
}
|
||||||
|
|
||||||
|
void blur_destruct(f0r_instance_t instance)
|
||||||
|
{
|
||||||
|
squareblur_instance_t* inst =
|
||||||
|
(squareblur_instance_t*)instance;
|
||||||
|
free(inst->acc);
|
||||||
|
free(inst->mem);
|
||||||
|
free(instance);
|
||||||
|
}
|
||||||
|
|
||||||
|
void blur_set_param_value(f0r_instance_t instance,
|
||||||
|
f0r_param_t param, int param_index)
|
||||||
|
{
|
||||||
|
assert(instance);
|
||||||
|
squareblur_instance_t* inst = (squareblur_instance_t*)instance;
|
||||||
|
|
||||||
|
switch(param_index)
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
/* kernel size */
|
||||||
|
inst->kernel = *((double*)param);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void blur_get_param_value(f0r_instance_t instance,
|
||||||
|
f0r_param_t param, int param_index)
|
||||||
|
{
|
||||||
|
assert(instance);
|
||||||
|
squareblur_instance_t* inst = (squareblur_instance_t*)instance;
|
||||||
|
|
||||||
|
switch(param_index)
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
*((double*)param) = inst->kernel;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void blur_update(f0r_instance_t instance, double time,
|
||||||
|
const uint32_t* inframe, uint32_t* outframe)
|
||||||
|
{
|
||||||
|
assert(instance);
|
||||||
|
squareblur_instance_t* inst = (squareblur_instance_t*)instance;
|
||||||
|
|
||||||
|
unsigned int width = inst->width;
|
||||||
|
unsigned int height = inst->height;
|
||||||
|
unsigned int acc_width = width+1; /* width of the summed area table */
|
||||||
|
|
||||||
|
unsigned int kernel_size = (unsigned int) (inst->kernel * (MAX(width, height) / 2.0));
|
||||||
|
|
||||||
|
unsigned int x, y;
|
||||||
|
unsigned int x0, x1, y0, y1;
|
||||||
|
unsigned int area;
|
||||||
|
|
||||||
|
if (kernel_size <= 0)
|
||||||
|
{
|
||||||
|
/* No blur, just copy image. */
|
||||||
|
memcpy(outframe, inframe, width*height*sizeof(uint32_t));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
assert(inst->acc);
|
||||||
|
unsigned char* dst = (unsigned char*)outframe;
|
||||||
|
uint32_t** acc = inst->acc;
|
||||||
|
uint32_t sum[SIZE_RGBA];
|
||||||
|
unsigned int y0_offset, y1_offset;
|
||||||
|
|
||||||
|
/* Compute the summed area table. */
|
||||||
|
update_summed_area_table(inst, inframe);
|
||||||
|
|
||||||
|
/* Loop through the image's pixels. */
|
||||||
|
for (y=0;y<height;y++)
|
||||||
|
{
|
||||||
|
for (x=0;x<width;x++)
|
||||||
|
{
|
||||||
|
/* The kernel's coordinates. */
|
||||||
|
x0 = MAX(x - kernel_size, 0);
|
||||||
|
x1 = MIN(x + kernel_size + 1, width);
|
||||||
|
y0 = MAX(y - kernel_size, 0);
|
||||||
|
y1 = MIN(y + kernel_size + 1, height);
|
||||||
|
|
||||||
|
/* Get the sum in the current kernel. */
|
||||||
|
area = (x1-x0)*(y1-y0);
|
||||||
|
|
||||||
|
y0_offset = y0*acc_width;
|
||||||
|
y1_offset = y1*acc_width;
|
||||||
|
|
||||||
|
/* it is assumed that (x0,y0) <= (x1,y1) */
|
||||||
|
memcpy(sum, acc[y1_offset + x1], SIZE_RGBA*sizeof(uint32_t));
|
||||||
|
subtract_acc(sum, acc[y1_offset + x0]);
|
||||||
|
subtract_acc(sum, acc[y0_offset + x1]);
|
||||||
|
add_acc(sum, acc[y0_offset + x0]);
|
||||||
|
|
||||||
|
/* Take the mean and copy it to output. */
|
||||||
|
divide(dst, sum, area);
|
||||||
|
|
||||||
|
/* Increment iterator. */
|
||||||
|
dst += SIZE_RGBA;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
237
frei0r-autoconf/src/filter/mask0mate/mask0mate.c
Normal file
@@ -0,0 +1,237 @@
|
|||||||
|
/* mask0mate.c
|
||||||
|
* Copyright (C) 2007 Richard Spindler (richard.spindler@gmail.com)
|
||||||
|
* This file is a Frei0r plugin.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <math.h>
|
||||||
|
#include "frei0r.h"
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include "blur.h"
|
||||||
|
|
||||||
|
typedef struct mask0mate_instance {
|
||||||
|
double left, top, right, bottom;
|
||||||
|
double blur;
|
||||||
|
int invert;
|
||||||
|
int w, h;
|
||||||
|
uint32_t* mask;
|
||||||
|
uint32_t* mask_blurred;
|
||||||
|
f0r_instance_t* blur_instance;
|
||||||
|
} mask0mate_instance_t;
|
||||||
|
|
||||||
|
void update_mask( mask0mate_instance_t* i ){
|
||||||
|
int l, r, t, b;
|
||||||
|
l = (int)( i->left * i->w );
|
||||||
|
r = (int)( i->w - ( i->right * i->w ) );
|
||||||
|
t = (int)( i->top * i->h );
|
||||||
|
b = (int)( i->h - ( i->bottom * i->h ) );
|
||||||
|
|
||||||
|
if ( l < 0 ) { l = 0; }
|
||||||
|
if ( r < 0 ) { r = 0; }
|
||||||
|
if ( t < 0 ) { t = 0; }
|
||||||
|
if ( b < 0 ) { b = 0; }
|
||||||
|
|
||||||
|
if ( l > i->w ) { l = i->w; }
|
||||||
|
if ( r > i->w ) { r = i->w; }
|
||||||
|
if ( t > i->h ) { t = i->h; }
|
||||||
|
if ( b > i->h ) { b = i->h; }
|
||||||
|
|
||||||
|
if ( l > r ) { int c = l; l = r; r = c; }
|
||||||
|
if ( t > b ) { int c = t; t = b; b = c; }
|
||||||
|
|
||||||
|
int len = i->w * i->h;
|
||||||
|
int j;
|
||||||
|
uint32_t v;
|
||||||
|
if ( i->invert ) {
|
||||||
|
v = 0x00ffffff;
|
||||||
|
} else {
|
||||||
|
v = 0xffffffff;
|
||||||
|
}
|
||||||
|
for ( j = 0; j < len; j++ ) {
|
||||||
|
i->mask[j] = v;
|
||||||
|
}
|
||||||
|
if ( !i->invert ) {
|
||||||
|
v = 0x00ffffff;
|
||||||
|
} else {
|
||||||
|
v = 0xffffffff;
|
||||||
|
}
|
||||||
|
int y, x;
|
||||||
|
for ( y = t; y < b; y++ ) {
|
||||||
|
for ( x = l; x < r; x++ ) {
|
||||||
|
i->mask[y*i->w + x] = v;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
blur_set_param_value(i->blur_instance, &i->blur, 0 );
|
||||||
|
blur_update(i->blur_instance, 0.0, i->mask, i->mask_blurred);
|
||||||
|
}
|
||||||
|
int f0r_init()
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
void f0r_deinit()
|
||||||
|
{ /* empty */ }
|
||||||
|
|
||||||
|
void f0r_get_plugin_info( f0r_plugin_info_t* info )
|
||||||
|
{
|
||||||
|
info->name = "Mask0Mate";
|
||||||
|
info->author = "Richard Spindler";
|
||||||
|
info->plugin_type = F0R_PLUGIN_TYPE_FILTER;
|
||||||
|
info->color_model = F0R_COLOR_MODEL_RGBA8888;
|
||||||
|
info->frei0r_version = FREI0R_MAJOR_VERSION;
|
||||||
|
info->major_version = 0;
|
||||||
|
info->minor_version = 1;
|
||||||
|
info->num_params = 6;
|
||||||
|
info->explanation = "Creates an square alpha-channel mask";
|
||||||
|
|
||||||
|
}
|
||||||
|
void f0r_get_param_info( f0r_param_info_t* info, int param_index )
|
||||||
|
{
|
||||||
|
switch ( param_index ) {
|
||||||
|
case 0:
|
||||||
|
info->name = "Left";
|
||||||
|
info->type = F0R_PARAM_DOUBLE;
|
||||||
|
info->explanation = "";
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
info->name = "Right";
|
||||||
|
info->type = F0R_PARAM_DOUBLE;
|
||||||
|
info->explanation = "";
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
info->name = "Top";
|
||||||
|
info->type = F0R_PARAM_DOUBLE;
|
||||||
|
info->explanation = "";
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
info->name = "Bottom";
|
||||||
|
info->type = F0R_PARAM_DOUBLE;
|
||||||
|
info->explanation = "";
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
info->name = "Invert";
|
||||||
|
info->type = F0R_PARAM_BOOL;
|
||||||
|
info->explanation = "Invert the mask, creates a hole in the frame.";
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
info->name = "Blur";
|
||||||
|
info->type = F0R_PARAM_DOUBLE;
|
||||||
|
info->explanation = "Blur the outline of the mask";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
f0r_instance_t f0r_construct(unsigned int width, unsigned int height)
|
||||||
|
{
|
||||||
|
mask0mate_instance_t* inst = (mask0mate_instance_t*)malloc(sizeof(mask0mate_instance_t));
|
||||||
|
inst->w = width;
|
||||||
|
inst->h = height;
|
||||||
|
inst->left = 0.2;
|
||||||
|
inst->right = 0.2;
|
||||||
|
inst->top = 0.2;
|
||||||
|
inst->bottom = 0.2;
|
||||||
|
inst->invert = 0;
|
||||||
|
inst->blur = 0.0;
|
||||||
|
inst->mask = (uint32_t*)malloc( width * height * sizeof(uint32_t) );
|
||||||
|
inst->mask_blurred = (uint32_t*)malloc( width * height * sizeof(uint32_t) );
|
||||||
|
inst->blur_instance = blur_construct( width, height );
|
||||||
|
update_mask( inst );
|
||||||
|
return (f0r_instance_t)inst;
|
||||||
|
}
|
||||||
|
void f0r_destruct(f0r_instance_t instance)
|
||||||
|
{
|
||||||
|
mask0mate_instance_t* inst = (mask0mate_instance_t*)instance;
|
||||||
|
blur_destruct(inst->blur_instance);
|
||||||
|
free(inst->mask);
|
||||||
|
free(inst->mask_blurred);
|
||||||
|
free(instance);
|
||||||
|
}
|
||||||
|
void f0r_set_param_value(f0r_instance_t instance,
|
||||||
|
f0r_param_t param, int param_index)
|
||||||
|
{
|
||||||
|
mask0mate_instance_t* inst = (mask0mate_instance_t*)instance;
|
||||||
|
switch ( param_index ) {
|
||||||
|
case 0:
|
||||||
|
inst->left = *((double*)param);
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
inst->right = *((double*)param);
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
inst->top = *((double*)param);
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
inst->bottom = *((double*)param);
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
if ( *((double*)param) < 0.5 ) {
|
||||||
|
inst->invert = 0;
|
||||||
|
} else {
|
||||||
|
inst->invert = 1;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
inst->blur = *((double*)param);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
update_mask( inst );
|
||||||
|
}
|
||||||
|
void f0r_get_param_value(f0r_instance_t instance,
|
||||||
|
f0r_param_t param, int param_index)
|
||||||
|
{
|
||||||
|
mask0mate_instance_t* inst = (mask0mate_instance_t*)instance;
|
||||||
|
switch ( param_index ) {
|
||||||
|
case 0:
|
||||||
|
*((double*)param) = inst->left;
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
*((double*)param) = inst->right;
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
*((double*)param) = inst->top;
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
*((double*)param) = inst->bottom;
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
*((double*)param) = (double)inst->invert;
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
*((double*)param) = inst->blur;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
void f0r_update(f0r_instance_t instance, double time,
|
||||||
|
const uint32_t* inframe, uint32_t* outframe)
|
||||||
|
{
|
||||||
|
mask0mate_instance_t* inst = (mask0mate_instance_t*)instance;
|
||||||
|
|
||||||
|
uint32_t* dst = outframe;
|
||||||
|
const uint32_t* src = inframe;
|
||||||
|
const uint32_t* alpha = inst->mask_blurred;
|
||||||
|
|
||||||
|
int len = inst->w * inst->h;
|
||||||
|
|
||||||
|
int i;
|
||||||
|
for ( i = 0; i < len; i++ ) {
|
||||||
|
*dst = *src & (*alpha | 0x00ffffff);
|
||||||
|
dst++;
|
||||||
|
src++;
|
||||||
|
alpha++;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
32
frei0r-autoconf/src/filter/nosync0r/nosync0r.cpp
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
#include "frei0r.hpp"
|
||||||
|
|
||||||
|
#include <algorithm>
|
||||||
|
#include <cmath>
|
||||||
|
|
||||||
|
class nosync0r : public frei0r::filter
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
nosync0r(unsigned int width, unsigned int height)
|
||||||
|
{
|
||||||
|
register_param(hsync,"HSync","the hsync offset");
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual void update()
|
||||||
|
{
|
||||||
|
unsigned int
|
||||||
|
first_line=static_cast<unsigned int>(height*std::fmod(hsync,1.0));
|
||||||
|
|
||||||
|
std::copy(in+width*first_line, in+width*height, out);
|
||||||
|
std::copy(in, in+width*first_line, out+width*(height-first_line));
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
f0r_param_double hsync;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
frei0r::construct<nosync0r> plugin("nosync0r",
|
||||||
|
"broken tv",
|
||||||
|
"Martin Bayer",
|
||||||
|
0,1);
|
||||||
|
|
||||||
222
frei0r-autoconf/src/filter/perspective/perspective.c
Normal file
@@ -0,0 +1,222 @@
|
|||||||
|
/* perspective.c
|
||||||
|
* Copyright (C) 2008 Richard Spindler (richard.spindler@gmail.com)
|
||||||
|
* This file is a Frei0r plugin.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#include "frei0r.h"
|
||||||
|
|
||||||
|
|
||||||
|
void sub_vec2( f0r_param_position_t* r, f0r_param_position_t* a, f0r_param_position_t* b )
|
||||||
|
{
|
||||||
|
r->x = a->x - b->x;
|
||||||
|
r->y = a->y - b->y;
|
||||||
|
}
|
||||||
|
void add_vec2( f0r_param_position_t* r, f0r_param_position_t* a, f0r_param_position_t* b )
|
||||||
|
{
|
||||||
|
r->x = a->x + b->x;
|
||||||
|
r->y = a->y + b->y;
|
||||||
|
}
|
||||||
|
|
||||||
|
void mul_vec2( f0r_param_position_t* r, f0r_param_position_t* a, double scalar )
|
||||||
|
{
|
||||||
|
r->x = a->x * scalar;
|
||||||
|
r->y = a->y * scalar;
|
||||||
|
}
|
||||||
|
|
||||||
|
void get_pixel_position( f0r_param_position_t* r, f0r_param_position_t* t, f0r_param_position_t* b, f0r_param_position_t* tl, f0r_param_position_t* bl,f0r_param_position_t* in )
|
||||||
|
{
|
||||||
|
f0r_param_position_t t_x;
|
||||||
|
f0r_param_position_t b_x;
|
||||||
|
f0r_param_position_t k;
|
||||||
|
mul_vec2( &t_x, t, in->x );
|
||||||
|
mul_vec2( &b_x, b, in->x );
|
||||||
|
|
||||||
|
add_vec2( &t_x, &t_x, tl );
|
||||||
|
add_vec2( &b_x, &b_x, bl );
|
||||||
|
|
||||||
|
sub_vec2( &k, &b_x, &t_x );
|
||||||
|
mul_vec2( &k, &k, in->y );
|
||||||
|
|
||||||
|
add_vec2( r, &k, &t_x );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#include <math.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
typedef struct perspective_instance {
|
||||||
|
int w, h;
|
||||||
|
f0r_param_position_t tl;
|
||||||
|
f0r_param_position_t tr;
|
||||||
|
f0r_param_position_t bl;
|
||||||
|
f0r_param_position_t br;
|
||||||
|
} perspective_instance_t;
|
||||||
|
|
||||||
|
|
||||||
|
int f0r_init()
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
void f0r_deinit()
|
||||||
|
{ /* empty */ }
|
||||||
|
|
||||||
|
void f0r_get_plugin_info( f0r_plugin_info_t* info )
|
||||||
|
{
|
||||||
|
info->name = "Perspective";
|
||||||
|
info->author = "Richard Spindler";
|
||||||
|
info->plugin_type = F0R_PLUGIN_TYPE_FILTER;
|
||||||
|
info->color_model = F0R_COLOR_MODEL_RGBA8888;
|
||||||
|
info->frei0r_version = FREI0R_MAJOR_VERSION;
|
||||||
|
info->major_version = 0;
|
||||||
|
info->minor_version = 1;
|
||||||
|
info->num_params = 4;
|
||||||
|
info->explanation = "Distorts the image for a pseudo perspective";
|
||||||
|
|
||||||
|
}
|
||||||
|
void f0r_get_param_info( f0r_param_info_t* info, int param_index )
|
||||||
|
{
|
||||||
|
switch ( param_index ) {
|
||||||
|
case 0:
|
||||||
|
info->name = "Top Left";
|
||||||
|
info->type = F0R_PARAM_POSITION;
|
||||||
|
info->explanation = "";
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
info->name = "Top Right";
|
||||||
|
info->type = F0R_PARAM_POSITION;
|
||||||
|
info->explanation = "";
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
info->name = "Bottom Left";
|
||||||
|
info->type = F0R_PARAM_POSITION;
|
||||||
|
info->explanation = "";
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
info->name = "Bottom Right";
|
||||||
|
info->type = F0R_PARAM_POSITION;
|
||||||
|
info->explanation = "";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
f0r_instance_t f0r_construct(unsigned int width, unsigned int height)
|
||||||
|
{
|
||||||
|
perspective_instance_t* inst = (perspective_instance_t*)malloc(sizeof(perspective_instance_t));
|
||||||
|
inst->w = width;
|
||||||
|
inst->h = height;
|
||||||
|
inst->tl.x = 0.0;
|
||||||
|
inst->tl.y = 0.0;
|
||||||
|
inst->tr.x = 1.0;
|
||||||
|
inst->tr.y = 0.0;
|
||||||
|
inst->bl.x = 0.0;
|
||||||
|
inst->bl.y = 1.0;
|
||||||
|
inst->br.x = 1.0;
|
||||||
|
inst->br.y = 1.0;
|
||||||
|
return (f0r_instance_t)inst;
|
||||||
|
}
|
||||||
|
void f0r_destruct(f0r_instance_t instance)
|
||||||
|
{
|
||||||
|
perspective_instance_t* inst = (perspective_instance_t*)instance;
|
||||||
|
free(inst);
|
||||||
|
}
|
||||||
|
void f0r_set_param_value(f0r_instance_t instance,
|
||||||
|
f0r_param_t param, int param_index)
|
||||||
|
{
|
||||||
|
perspective_instance_t* inst = (perspective_instance_t*)instance;
|
||||||
|
switch ( param_index ) {
|
||||||
|
case 0:
|
||||||
|
inst->tl = *((f0r_param_position_t*)param);
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
inst->tr = *((f0r_param_position_t*)param);
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
inst->bl = *((f0r_param_position_t*)param);
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
inst->br = *((f0r_param_position_t*)param);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
void f0r_get_param_value(f0r_instance_t instance,
|
||||||
|
f0r_param_t param, int param_index)
|
||||||
|
{
|
||||||
|
perspective_instance_t* inst = (perspective_instance_t*)instance;
|
||||||
|
switch ( param_index ) {
|
||||||
|
case 0:
|
||||||
|
*((f0r_param_position_t*)param) = inst->tl;
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
*((f0r_param_position_t*)param) = inst->tr;
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
*((f0r_param_position_t*)param) = inst->bl;
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
*((f0r_param_position_t*)param) = inst->br;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
void f0r_update(f0r_instance_t instance, double time,
|
||||||
|
const uint32_t* inframe, uint32_t* outframe)
|
||||||
|
{
|
||||||
|
perspective_instance_t* inst = (perspective_instance_t*)instance;
|
||||||
|
|
||||||
|
uint32_t* dst = outframe;
|
||||||
|
const uint32_t* src = inframe;
|
||||||
|
int len = inst->w * inst->h;
|
||||||
|
|
||||||
|
int i;
|
||||||
|
for ( i = 0; i < len; i++ ) {
|
||||||
|
*dst = 0x00000000;
|
||||||
|
dst++;
|
||||||
|
}
|
||||||
|
dst = outframe;
|
||||||
|
|
||||||
|
int w = inst->w;
|
||||||
|
int h = inst->h;
|
||||||
|
|
||||||
|
int rx;
|
||||||
|
int ry;
|
||||||
|
int x;
|
||||||
|
int y;
|
||||||
|
f0r_param_position_t top;
|
||||||
|
f0r_param_position_t bot;
|
||||||
|
f0r_param_position_t r;
|
||||||
|
f0r_param_position_t in;
|
||||||
|
sub_vec2( &top, &inst->tr, &inst->tl );
|
||||||
|
sub_vec2( &bot, &inst->br, &inst->bl );
|
||||||
|
for( y = 0; y < h; y++ ) {
|
||||||
|
for ( x = 0; x < w; x++ ) {
|
||||||
|
in.x = (double)x / (double)w;
|
||||||
|
in.y = (double)y / (double)h;
|
||||||
|
get_pixel_position( &r, &top, &bot, &inst->tl, &inst->bl, &in );
|
||||||
|
rx = lrint(r.x * (float)w);
|
||||||
|
ry = lrint(r.y * (float)h);
|
||||||
|
if ( rx < 0 || rx >= w || ry < 0 || ry >= h ) {
|
||||||
|
src++;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
dst[rx + w * ry] = *src;
|
||||||
|
src++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
227
frei0r-autoconf/src/filter/pixeliz0r/pixeliz0r.c
Normal file
@@ -0,0 +1,227 @@
|
|||||||
|
#include "frei0r.h"
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <assert.h>
|
||||||
|
|
||||||
|
static uint32_t average(const uint32_t* start,
|
||||||
|
int bxsize,
|
||||||
|
int bysize, int xsize);
|
||||||
|
|
||||||
|
static void fill_block(uint32_t* start,
|
||||||
|
int bxsize,
|
||||||
|
int bysize,
|
||||||
|
int xsize, uint32_t col);
|
||||||
|
|
||||||
|
|
||||||
|
typedef struct pixelizer_instance
|
||||||
|
{
|
||||||
|
unsigned int width;
|
||||||
|
unsigned int height;
|
||||||
|
unsigned int block_size_x;
|
||||||
|
unsigned int block_size_y;
|
||||||
|
} pixelizer_instance_t;
|
||||||
|
|
||||||
|
int f0r_init()
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
void f0r_deinit()
|
||||||
|
{ /* no initialization required */ }
|
||||||
|
|
||||||
|
void f0r_get_plugin_info(f0r_plugin_info_t* pixelizerInfo)
|
||||||
|
{
|
||||||
|
pixelizerInfo->name = "pixeliz0r";
|
||||||
|
pixelizerInfo->author = "Gephex crew";
|
||||||
|
pixelizerInfo->plugin_type = F0R_PLUGIN_TYPE_FILTER;
|
||||||
|
pixelizerInfo->color_model = F0R_COLOR_MODEL_BGRA8888;
|
||||||
|
pixelizerInfo->frei0r_version = FREI0R_MAJOR_VERSION;
|
||||||
|
pixelizerInfo->major_version = 1;
|
||||||
|
pixelizerInfo->minor_version = 0;
|
||||||
|
pixelizerInfo->num_params = 2;
|
||||||
|
pixelizerInfo->explanation = "Pixelize input image.";
|
||||||
|
}
|
||||||
|
|
||||||
|
void f0r_get_param_info(f0r_param_info_t* info, int param_index)
|
||||||
|
{
|
||||||
|
switch(param_index)
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
info->name = "BlockSizeX";
|
||||||
|
info->type = F0R_PARAM_DOUBLE;
|
||||||
|
info->explanation = "Horizontal size of one \"pixel\"";
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
info->name = "BlockSizeY";
|
||||||
|
info->type = F0R_PARAM_DOUBLE;
|
||||||
|
info->explanation = "Vertical size of one \"pixel\"";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
f0r_instance_t f0r_construct(unsigned int width, unsigned int height)
|
||||||
|
{
|
||||||
|
pixelizer_instance_t* inst =
|
||||||
|
(pixelizer_instance_t*)malloc(sizeof(pixelizer_instance_t));
|
||||||
|
inst->width = width; inst->height = height;
|
||||||
|
inst->block_size_x = 8; inst->block_size_y = 8;
|
||||||
|
return (f0r_instance_t)inst;
|
||||||
|
}
|
||||||
|
|
||||||
|
void f0r_destruct(f0r_instance_t instance)
|
||||||
|
{
|
||||||
|
free(instance);
|
||||||
|
}
|
||||||
|
|
||||||
|
void f0r_set_param_value(f0r_instance_t instance,
|
||||||
|
f0r_param_t param, int param_index)
|
||||||
|
{
|
||||||
|
assert(instance);
|
||||||
|
pixelizer_instance_t* inst = (pixelizer_instance_t*)instance;
|
||||||
|
|
||||||
|
switch(param_index)
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
// scale to [1..width]
|
||||||
|
inst->block_size_x = 1 + ( *((double*)param) * (inst->width/2)) ;
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
// scale to [1..height]
|
||||||
|
inst->block_size_y = 1 + ( *((double*)param) * (inst->height/2)) ;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void f0r_get_param_value(f0r_instance_t instance,
|
||||||
|
f0r_param_t param, int param_index)
|
||||||
|
{
|
||||||
|
assert(instance);
|
||||||
|
pixelizer_instance_t* inst = (pixelizer_instance_t*)instance;
|
||||||
|
|
||||||
|
switch(param_index)
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
// scale back to [0..1]
|
||||||
|
*((double*)param) = (double)(inst->block_size_x-1)/(inst->width/2);
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
// scale back to [0..1]
|
||||||
|
*((double*)param) = (double)(inst->block_size_y-1)/(inst->height/2);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void f0r_update(f0r_instance_t instance, double time,
|
||||||
|
const uint32_t* inframe, uint32_t* outframe)
|
||||||
|
{
|
||||||
|
assert(instance);
|
||||||
|
pixelizer_instance_t* inst = (pixelizer_instance_t*)instance;
|
||||||
|
unsigned int xsize = inst->width;
|
||||||
|
unsigned int ysize = inst->height;
|
||||||
|
unsigned int bsizex = inst->block_size_x;
|
||||||
|
unsigned int bsizey = inst->block_size_y;
|
||||||
|
unsigned int offset = 0;
|
||||||
|
unsigned int blocks_x, blocks_y, xrest, yrest, xi, yi;
|
||||||
|
|
||||||
|
|
||||||
|
blocks_x = xsize / bsizex;
|
||||||
|
blocks_y = ysize / bsizey;
|
||||||
|
xrest = xsize - blocks_x*bsizex;
|
||||||
|
yrest = ysize - blocks_y*bsizey;
|
||||||
|
|
||||||
|
uint32_t* dst = outframe;
|
||||||
|
const uint32_t* src = inframe;
|
||||||
|
|
||||||
|
|
||||||
|
if (bsizex == 1 && bsizey == 1)
|
||||||
|
{
|
||||||
|
memcpy(dst, src, xsize*ysize*sizeof(uint32_t));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// now get average for every block and write the average color to the output
|
||||||
|
for (yi = 0; yi < blocks_y; ++yi)
|
||||||
|
{
|
||||||
|
offset = yi*bsizey*xsize;
|
||||||
|
for (xi = 0; xi < blocks_x; ++xi)
|
||||||
|
{
|
||||||
|
uint32_t col = average(src + offset, bsizex, bsizey, xsize);
|
||||||
|
fill_block(dst + offset, bsizex, bsizey, xsize, col);
|
||||||
|
offset += bsizex;
|
||||||
|
}
|
||||||
|
if (xrest > 0)
|
||||||
|
{
|
||||||
|
uint32_t col = average(src + offset, xrest, bsizey, xsize);
|
||||||
|
fill_block(dst + offset, xrest, bsizey, xsize, col);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// check for last line
|
||||||
|
if (yrest > 0)
|
||||||
|
{
|
||||||
|
offset = blocks_y*bsizey*xsize;
|
||||||
|
for (xi = 0; xi < blocks_x; ++xi)
|
||||||
|
{
|
||||||
|
uint32_t col = average(src + offset, bsizex, yrest, xsize);
|
||||||
|
fill_block(dst + offset, bsizex, yrest, xsize, col);
|
||||||
|
offset += bsizex;
|
||||||
|
}
|
||||||
|
if (xrest > 0)
|
||||||
|
{
|
||||||
|
uint32_t col = average(src + offset, xrest, yrest, xsize);
|
||||||
|
fill_block(dst + offset, xrest, yrest, xsize, col);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static uint32_t average(const uint32_t* start,
|
||||||
|
int bxsize, int bysize, int xsize)
|
||||||
|
{
|
||||||
|
const uint32_t* p = start;
|
||||||
|
uint32_t alpha = 0, red = 0, green = 0, blue = 0;
|
||||||
|
uint32_t avg_alpha, avg_red, avg_green, avg_blue;
|
||||||
|
int x, y;
|
||||||
|
const uint32_t* pp;
|
||||||
|
uint32_t c;
|
||||||
|
|
||||||
|
for (y = 0; y < bysize; ++y)
|
||||||
|
{
|
||||||
|
pp = p;
|
||||||
|
for (x = 0; x < bxsize; ++x)
|
||||||
|
{
|
||||||
|
c = *(pp++);
|
||||||
|
alpha += (c & 0xff000000) >> 24;
|
||||||
|
red += (c & 0x00ff0000) >> 16;
|
||||||
|
green += (c & 0x0000ff00) >> 8;
|
||||||
|
blue += (c & 0x000000ff);
|
||||||
|
}
|
||||||
|
p += xsize;
|
||||||
|
}
|
||||||
|
|
||||||
|
avg_alpha = (alpha / (bxsize*bysize)) & 0xff;
|
||||||
|
avg_red = (red / (bxsize*bysize)) & 0xff;
|
||||||
|
avg_green = (green / (bxsize*bysize)) & 0xff;
|
||||||
|
avg_blue = (blue / (bxsize*bysize)) & 0xff;
|
||||||
|
|
||||||
|
return (avg_alpha << 24) + (avg_red << 16) + (avg_green << 8) + avg_blue;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void fill_block(uint32_t* start, int bxsize, int bysize,
|
||||||
|
int xsize, uint32_t col)
|
||||||
|
{
|
||||||
|
uint32_t* p = start;
|
||||||
|
int x, y;
|
||||||
|
uint32_t* pp;
|
||||||
|
|
||||||
|
for (y = 0; y < bysize; ++y)
|
||||||
|
{
|
||||||
|
pp = p;
|
||||||
|
for (x = 0; x < bxsize; ++x)
|
||||||
|
{
|
||||||
|
*(pp++) = col;
|
||||||
|
}
|
||||||
|
p += xsize;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
BIN
frei0r-autoconf/src/filter/pixeliz0r/pixeliz0r_post.jpg
Normal file
|
After Width: | Height: | Size: 4.4 KiB |
BIN
frei0r-autoconf/src/filter/pixeliz0r/pixeliz0r_pre.jpg
Normal file
|
After Width: | Height: | Size: 16 KiB |
297
frei0r-autoconf/src/filter/rgbparade/rgbparade.c
Normal file
@@ -0,0 +1,297 @@
|
|||||||
|
/* rgbparade.c
|
||||||
|
* Copyright (C) 2008 Albert Frisch (albert.frisch@gmail.com)
|
||||||
|
* This file is a Frei0r plugin.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <math.h>
|
||||||
|
#include <assert.h>
|
||||||
|
#include "frei0r.h"
|
||||||
|
|
||||||
|
#include <gavl/gavl.h>
|
||||||
|
|
||||||
|
#include "rgbparade_image.h"
|
||||||
|
|
||||||
|
#define OFFSET_R 0
|
||||||
|
#define OFFSET_G 8
|
||||||
|
#define OFFSET_B 16
|
||||||
|
#define OFFSET_A 24
|
||||||
|
|
||||||
|
#define PARADE_HEIGHT 256
|
||||||
|
#define PARADE_STEP 5
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
double red, green, blue;
|
||||||
|
} rgb_t;
|
||||||
|
|
||||||
|
typedef struct rgbparade {
|
||||||
|
int w, h;
|
||||||
|
unsigned char* scala;
|
||||||
|
gavl_video_scaler_t* parade_scaler;
|
||||||
|
gavl_video_frame_t* parade_frame_src;
|
||||||
|
gavl_video_frame_t* parade_frame_dst;
|
||||||
|
} rgbparade_t;
|
||||||
|
|
||||||
|
int f0r_init()
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
void f0r_deinit()
|
||||||
|
{ /* empty */ }
|
||||||
|
|
||||||
|
void f0r_get_plugin_info( f0r_plugin_info_t* info )
|
||||||
|
{
|
||||||
|
info->name = "RGB-Parade";
|
||||||
|
info->author = "Albert Frisch";
|
||||||
|
info->plugin_type = F0R_PLUGIN_TYPE_FILTER;
|
||||||
|
info->color_model = F0R_COLOR_MODEL_RGBA8888;
|
||||||
|
info->frei0r_version = FREI0R_MAJOR_VERSION;
|
||||||
|
info->major_version = 0;
|
||||||
|
info->minor_version = 1;
|
||||||
|
info->num_params = 0;
|
||||||
|
info->explanation = "Displays a histogram of R, G and B of the video-data";
|
||||||
|
}
|
||||||
|
|
||||||
|
void f0r_get_param_info( f0r_param_info_t* info, int param_index )
|
||||||
|
{ /* empty */ }
|
||||||
|
|
||||||
|
f0r_instance_t f0r_construct(unsigned int width, unsigned int height)
|
||||||
|
{
|
||||||
|
rgbparade_t* inst = (rgbparade_t*)malloc(sizeof(rgbparade_t));
|
||||||
|
inst->w = width;
|
||||||
|
inst->h = height;
|
||||||
|
|
||||||
|
inst->scala = (unsigned char*)malloc( width * height * 4 );
|
||||||
|
|
||||||
|
gavl_video_scaler_t* video_scaler;
|
||||||
|
gavl_video_frame_t* frame_src;
|
||||||
|
gavl_video_frame_t* frame_dst;
|
||||||
|
|
||||||
|
video_scaler = gavl_video_scaler_create();
|
||||||
|
frame_src = gavl_video_frame_create( 0 );
|
||||||
|
frame_dst = gavl_video_frame_create( 0 );
|
||||||
|
frame_dst->strides[0] = width * 4;
|
||||||
|
frame_src->strides[0] = rgbparade_image.width * 4;
|
||||||
|
|
||||||
|
gavl_video_options_t* options = gavl_video_scaler_get_options( video_scaler );
|
||||||
|
gavl_video_format_t format_src;
|
||||||
|
gavl_video_format_t format_dst;
|
||||||
|
|
||||||
|
format_dst.frame_width = inst->w;
|
||||||
|
format_dst.frame_height = inst->h;
|
||||||
|
format_dst.image_width = inst->w;
|
||||||
|
format_dst.image_height = inst->h;
|
||||||
|
format_dst.pixel_width = 1;
|
||||||
|
format_dst.pixel_height = 1;
|
||||||
|
format_dst.pixelformat = GAVL_RGBA_32;
|
||||||
|
format_dst.interlace_mode = GAVL_INTERLACE_NONE;
|
||||||
|
|
||||||
|
format_src.frame_width = rgbparade_image.width;
|
||||||
|
format_src.frame_height = rgbparade_image.height;
|
||||||
|
format_src.image_width = rgbparade_image.width;
|
||||||
|
format_src.image_height = rgbparade_image.height;
|
||||||
|
format_src.pixel_width = 1;
|
||||||
|
format_src.pixel_height = 1;
|
||||||
|
format_src.pixelformat = GAVL_RGBA_32;
|
||||||
|
format_src.interlace_mode = GAVL_INTERLACE_NONE;
|
||||||
|
|
||||||
|
gavl_rectangle_f_t src_rect;
|
||||||
|
gavl_rectangle_i_t dst_rect;
|
||||||
|
|
||||||
|
src_rect.x = 0;
|
||||||
|
src_rect.y = 0;
|
||||||
|
src_rect.w = rgbparade_image.width;
|
||||||
|
src_rect.h = rgbparade_image.height;
|
||||||
|
dst_rect.x = 0;
|
||||||
|
dst_rect.y = 0;
|
||||||
|
dst_rect.w = width;
|
||||||
|
dst_rect.h = height * 0.995;
|
||||||
|
|
||||||
|
gavl_video_options_set_rectangles( options, &src_rect, &dst_rect );
|
||||||
|
gavl_video_scaler_init( video_scaler, &format_src, &format_dst );
|
||||||
|
|
||||||
|
frame_src->planes[0] = (uint8_t *)rgbparade_image.pixel_data;
|
||||||
|
frame_dst->planes[0] = (uint8_t *)inst->scala;
|
||||||
|
|
||||||
|
float transparent[4] = { 0.0, 0.0, 0.0, 0.0 };
|
||||||
|
gavl_video_frame_fill( frame_dst, &format_dst, transparent );
|
||||||
|
|
||||||
|
gavl_video_scaler_scale( video_scaler, frame_src, frame_dst );
|
||||||
|
|
||||||
|
gavl_video_scaler_destroy(video_scaler);
|
||||||
|
gavl_video_frame_null( frame_src );
|
||||||
|
gavl_video_frame_destroy( frame_src );
|
||||||
|
gavl_video_frame_null( frame_dst );
|
||||||
|
gavl_video_frame_destroy( frame_dst );
|
||||||
|
|
||||||
|
options = gavl_video_scaler_get_options( inst->parade_scaler );
|
||||||
|
|
||||||
|
inst->parade_scaler = gavl_video_scaler_create();
|
||||||
|
inst->parade_frame_src = gavl_video_frame_create(0);
|
||||||
|
inst->parade_frame_dst = gavl_video_frame_create(0);
|
||||||
|
inst->parade_frame_src->strides[0] = width * 4;
|
||||||
|
inst->parade_frame_dst->strides[0] = width * 4;
|
||||||
|
options = gavl_video_scaler_get_options( inst->parade_scaler );
|
||||||
|
|
||||||
|
format_src.frame_width = width;
|
||||||
|
format_src.frame_height = PARADE_HEIGHT;
|
||||||
|
format_src.image_width = width;
|
||||||
|
format_src.image_height = PARADE_HEIGHT;
|
||||||
|
format_src.pixel_width = 1;
|
||||||
|
format_src.pixel_height = 1;
|
||||||
|
format_src.pixelformat = GAVL_RGBA_32;
|
||||||
|
format_dst.frame_width = width;
|
||||||
|
format_dst.frame_height = height;
|
||||||
|
format_dst.image_width = width;
|
||||||
|
format_dst.image_height = height;
|
||||||
|
format_dst.pixel_width = 1;
|
||||||
|
format_dst.pixel_height = 1;
|
||||||
|
format_dst.pixelformat = GAVL_RGBA_32;
|
||||||
|
|
||||||
|
gavl_rectangle_f_set_all( &src_rect, &format_src );
|
||||||
|
dst_rect.x = width * 0.05;
|
||||||
|
dst_rect.y = height * 0.011;
|
||||||
|
dst_rect.w = width * 0.9;
|
||||||
|
dst_rect.h = height * 0.978;
|
||||||
|
|
||||||
|
gavl_video_options_set_rectangles( options, &src_rect, &dst_rect );
|
||||||
|
gavl_video_scaler_init( inst->parade_scaler, &format_src, &format_dst );
|
||||||
|
|
||||||
|
return (f0r_instance_t)inst;
|
||||||
|
}
|
||||||
|
|
||||||
|
void f0r_destruct(f0r_instance_t instance)
|
||||||
|
{
|
||||||
|
rgbparade_t* inst = (rgbparade_t*)instance;
|
||||||
|
gavl_video_scaler_destroy( inst->parade_scaler );
|
||||||
|
gavl_video_frame_null( inst->parade_frame_src );
|
||||||
|
gavl_video_frame_destroy( inst->parade_frame_src );
|
||||||
|
gavl_video_frame_null( inst->parade_frame_dst );
|
||||||
|
gavl_video_frame_destroy( inst->parade_frame_dst );
|
||||||
|
free(inst);
|
||||||
|
}
|
||||||
|
|
||||||
|
void f0r_get_param_value(f0r_instance_t instance, f0r_param_t param, int param_index)
|
||||||
|
{ /* empty */ }
|
||||||
|
|
||||||
|
void f0r_set_param_value(f0r_instance_t instance, f0r_param_t param, int param_index)
|
||||||
|
{ /* empty */ }
|
||||||
|
|
||||||
|
void draw_grid(unsigned char* scope, double width, double height)
|
||||||
|
{
|
||||||
|
double i, j;
|
||||||
|
long offset;
|
||||||
|
|
||||||
|
for(j=0;j<6;j++)
|
||||||
|
{
|
||||||
|
for(i=0;i<width;++i)
|
||||||
|
{
|
||||||
|
offset = j*(height-1)*width/5+i;
|
||||||
|
scope[offset] = 255;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for(j=0;j<2;j++)
|
||||||
|
{
|
||||||
|
for(i=0;i<height;i++)
|
||||||
|
{
|
||||||
|
offset = i*width+j*(width-1);
|
||||||
|
scope[offset] = 255;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void f0r_update(f0r_instance_t instance, double time, const uint32_t* inframe, uint32_t* outframe)
|
||||||
|
{
|
||||||
|
assert(instance);
|
||||||
|
rgbparade_t* inst = (rgbparade_t*)instance;
|
||||||
|
|
||||||
|
int width = inst->w;
|
||||||
|
int height = inst->h;
|
||||||
|
int len = inst->w * inst->h;
|
||||||
|
int parade_len = width * PARADE_HEIGHT;
|
||||||
|
|
||||||
|
uint32_t* dst = outframe;
|
||||||
|
uint32_t* dst_end;
|
||||||
|
const uint32_t* src = inframe;
|
||||||
|
const uint32_t* src_end;
|
||||||
|
uint32_t* parade = (uint32_t*)malloc( parade_len * 4 );
|
||||||
|
uint32_t* parade_end;
|
||||||
|
|
||||||
|
long src_x, src_y;
|
||||||
|
long x, y;
|
||||||
|
rgb_t rgb;
|
||||||
|
uint8_t* pixel;
|
||||||
|
|
||||||
|
dst_end = dst + len;
|
||||||
|
src_end = src + len;
|
||||||
|
parade_end = parade + parade_len;
|
||||||
|
|
||||||
|
while ( dst < dst_end ) {
|
||||||
|
*(dst++) = 0xFF000000;
|
||||||
|
}
|
||||||
|
dst = outframe;
|
||||||
|
while ( parade < parade_end ) {
|
||||||
|
*(parade++) = 0xFF000000;
|
||||||
|
}
|
||||||
|
parade -= parade_len;
|
||||||
|
|
||||||
|
for ( src_y = 0; src_y < height; src_y++ ) {
|
||||||
|
for ( src_x = 0; src_x < width; src_x++ ) {
|
||||||
|
rgb.red = (((*src) & 0x000000FF) >> OFFSET_R);
|
||||||
|
rgb.green = (((*src) & 0x0000FF00) >> OFFSET_G);
|
||||||
|
rgb.blue = (((*src) & 0x00FF0000) >> OFFSET_B);
|
||||||
|
src++;
|
||||||
|
x = src_x / 3;
|
||||||
|
y = PARADE_HEIGHT - rgb.red - 1;
|
||||||
|
if ( x >= 0 && x < width && y >= 0 && y < PARADE_HEIGHT ) {
|
||||||
|
pixel = (uint8_t*)¶de[x+width*y];
|
||||||
|
if ( pixel[0] < (255-PARADE_STEP) ) pixel[0] += PARADE_STEP;
|
||||||
|
}
|
||||||
|
x += width / 3;
|
||||||
|
y = PARADE_HEIGHT - rgb.green - 1;
|
||||||
|
if ( x >= 0 && x < width && y >= 0 && y < PARADE_HEIGHT ) {
|
||||||
|
pixel = (uint8_t*)¶de[x+width*y];
|
||||||
|
if ( pixel[1] < (255-PARADE_STEP) ) pixel[1] += PARADE_STEP;
|
||||||
|
}
|
||||||
|
x += width / 3;
|
||||||
|
y = PARADE_HEIGHT - rgb.blue - 1;
|
||||||
|
if ( x >= 0 && x < width && y >= 0 && y < PARADE_HEIGHT ) {
|
||||||
|
pixel = (uint8_t*)¶de[x+width*y];
|
||||||
|
if ( pixel[2] < (255-PARADE_STEP) ) pixel[2] += PARADE_STEP;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
inst->parade_frame_src->planes[0] = (uint8_t *)parade;
|
||||||
|
inst->parade_frame_dst->planes[0] = (uint8_t *)dst;
|
||||||
|
|
||||||
|
gavl_video_scaler_scale( inst->parade_scaler, inst->parade_frame_src, inst->parade_frame_dst );
|
||||||
|
|
||||||
|
unsigned char *scala8, *dst8, *dst8_end;
|
||||||
|
|
||||||
|
scala8 = inst->scala;
|
||||||
|
dst8 = (unsigned char*)outframe;
|
||||||
|
dst8_end = dst8 + ( len * 4 );
|
||||||
|
while ( dst8 < dst8_end ) {
|
||||||
|
dst8[0] = ( ( ( scala8[0] - dst8[0] ) * 255 * scala8[3] ) >> 16 ) + dst8[0];
|
||||||
|
dst8[1] = ( ( ( scala8[1] - dst8[1] ) * 255 * scala8[3] ) >> 16 ) + dst8[1];
|
||||||
|
dst8[2] = ( ( ( scala8[2] - dst8[2] ) * 255 * scala8[3] ) >> 16 ) + dst8[2];
|
||||||
|
scala8 += 4;
|
||||||
|
dst8 += 4;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||