diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..85a0953 --- /dev/null +++ b/.gitignore @@ -0,0 +1,26 @@ +autom4te.cache +config.h +config.log +config.status +config.guess +config.sub +cscope.out +stamp-h1 +tags +*.[oa] +*.so +*.la +*.lo +cmake_install.cmake +CMakeFiles +CMakeCache.txt +*~ +Makefile.in +Makefile +.deps +.obj +.libs +TAGS +ylwrap +frei0r.pc +doc/html diff --git a/AUTHORS b/AUTHORS index 97c05a4..dcda872 100644 --- a/AUTHORS +++ b/AUTHORS @@ -1,8 +1,28 @@ -BEK - Bergen Senter for Elektronisk Kunst -Jean-Sebastien Senecal (js@drone.ws) + +Project initiated at the Piksel Festival in 2004 +hosted by BEK - Bergen Senter for Elektronisk Kunst + +Developers who contributed, in alphabetic order: + +Albert Frisch +Burkhard Plaum +Carlo E. Prelz +Dan Dennedy +Denis Jaromil Roio +Filippo Giunchedi +Gabriel Finch +Georg Seidel +Hedde Bosman +Jean-Sebastien Senecal +Joshua M. Doe +Luca Bigliardi +Maksim Golovkin (Максим Головкин) +Marko Cebokli +Martin Bayer Mathieu Guindon -Georg Seidel -Martin Bayer -Richard Spindler -Albert Frisch +Phillip Promesberger +Richard Spindler +Simon Eugster +Stefano Sabatini +Till Teato diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..cc7bd52 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,32 @@ +cmake_minimum_required (VERSION 2.8) + +list (APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules) + +project (frei0r) + +find_package (OpenCV) +include(FindPkgConfig) +if (PKG_CONFIG_FOUND) + pkg_check_modules(GAVL gavl) +endif (PKG_CONFIG_FOUND) + +include_directories (AFTER include) + +if (MSVC) + include_directories (include/msvc) +endif (MSVC) + +set(CMAKE_C_FLAGS ${CMAKE_C_FLAGS_DEBUG}) + +set (LIBDIR lib/frei0r-1) +set (FREI0R_DEF ${CMAKE_SOURCE_DIR}/msvc/frei0r_1_0.def) +set (FREI0R_1_1_DEF ${CMAKE_SOURCE_DIR}/msvc/frei0r_1_1.def) + +# --- custom targets: --- +INCLUDE( cmake/modules/TargetDistclean.cmake OPTIONAL) + +# See this thread for a ridiculous discussion about the simple question how to install a header file with CMake: http://www.cmake.org/pipermail/cmake/2009-October/032874.html +install (DIRECTORY include DESTINATION . FILES_MATCHING PATTERN "frei0r.h" PATTERN "msvc" EXCLUDE) + + +add_subdirectory (src) diff --git a/ChangeLog b/ChangeLog index e69de29..07b7385 100644 --- a/ChangeLog +++ b/ChangeLog @@ -0,0 +1,41 @@ + +*** See also the Changes @section in include/frei0r.h or git log + +1.3.0 - 8 March 2011 + + This release adds more plugins, better documentation and better + examples for writing code that makes use of thed opencv library. + New filters (4): tutorial, sharpness, denoise, lightgraffiti + New generator: test_pat (broadcast test patterns) + New mixer: addition_alpha + +1.2.1 - 4 October 2010 + + This is a bugfix release which avoids a crash on load of the + Vertigo plugin and corrects the install path according do + distribution needs. + +1.2.0 - 13 September 2010 + + This release adds many new filters, cross-platform compatibility + to build Win32 plugins, some fixes to the specification, a new Web + page, and more documentation. + +1.1.22 - 28 October 2008 + + Three new plugins were added: UV Map, Edge Glow, and K-Means + Clustering. Various bugfixes were done. + +1.1.21 - 1 April 2008 + + This release adds six new plugins: Lenscorrection, Transparency, + Color Distance, Perspective, RGB Parade, and Vector Scope. + +1.1.20 - 7 November 2007 + + This is the first release as a standard autoconf tarball. It + contains various bugfixes and some new plugins. + + +*** At last, see also git --log from repository + diff --git a/Doxyfile b/Doxyfile deleted file mode 100644 index eb80d58..0000000 --- a/Doxyfile +++ /dev/null @@ -1,1161 +0,0 @@ -# Doxyfile 1.3.9.1 - -# This file describes the settings to be used by the documentation system -# doxygen (www.doxygen.org) for a project -# -# All text after a hash (#) is considered a comment and will be ignored -# The format is: -# TAG = value [value, ...] -# For lists items can also be appended using: -# TAG += value [value, ...] -# Values that contain spaces should be placed between quotes (" ") - -#--------------------------------------------------------------------------- -# Project related configuration options -#--------------------------------------------------------------------------- - -# The PROJECT_NAME tag is a single word (or a sequence of words surrounded -# by quotes) that should identify the project. - -PROJECT_NAME = frei0r - -# The PROJECT_NUMBER tag can be used to enter a project or revision number. -# This could be handy for archiving the generated documentation or -# if some version control system is used. - -PROJECT_NUMBER = - -# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) -# base path where the generated documentation will be put. -# If a relative path is entered, it will be relative to the location -# where doxygen was started. If left blank the current directory will be used. - -OUTPUT_DIRECTORY = doc - -# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create -# 4096 sub-directories (in 2 levels) under the output directory of each output -# format and will distribute the generated files over these directories. -# Enabling this option can be useful when feeding doxygen a huge amount of source -# files, where putting all generated files in the same directory would otherwise -# cause performance problems for the file system. - -CREATE_SUBDIRS = NO - -# The OUTPUT_LANGUAGE tag is used to specify the language in which all -# documentation generated by doxygen is written. Doxygen will use this -# information to generate all constant output in the proper language. -# The default language is English, other supported languages are: -# Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, -# Dutch, Finnish, French, German, Greek, Hungarian, Italian, Japanese, -# Japanese-en (Japanese with English messages), Korean, Korean-en, Norwegian, -# Polish, Portuguese, Romanian, Russian, Serbian, Slovak, Slovene, Spanish, -# Swedish, and Ukrainian. - -OUTPUT_LANGUAGE = English - -# This tag can be used to specify the encoding used in the generated output. -# The encoding is not always determined by the language that is chosen, -# but also whether or not the output is meant for Windows or non-Windows users. -# In case there is a difference, setting the USE_WINDOWS_ENCODING tag to YES -# forces the Windows encoding (this is the default for the Windows binary), -# whereas setting the tag to NO uses a Unix-style encoding (the default for -# all platforms other than Windows). - -USE_WINDOWS_ENCODING = NO - -# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will -# include brief member descriptions after the members that are listed in -# the file and class documentation (similar to JavaDoc). -# Set to NO to disable this. - -BRIEF_MEMBER_DESC = YES - -# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend -# the brief description of a member or function before the detailed description. -# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the -# brief descriptions will be completely suppressed. - -REPEAT_BRIEF = YES - -# This tag implements a quasi-intelligent brief description abbreviator -# that is used to form the text in various listings. Each string -# in this list, if found as the leading text of the brief description, will be -# stripped from the text and the result after processing the whole list, is used -# as the annotated text. Otherwise, the brief description is used as-is. If left -# blank, the following values are used ("$name" is automatically replaced with the -# name of the entity): "The $name class" "The $name widget" "The $name file" -# "is" "provides" "specifies" "contains" "represents" "a" "an" "the" - -ABBREVIATE_BRIEF = - -# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then -# Doxygen will generate a detailed section even if there is only a brief -# description. - -ALWAYS_DETAILED_SEC = NO - -# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all inherited -# members of a class in the documentation of that class as if those members were -# ordinary class members. Constructors, destructors and assignment operators of -# the base classes will not be shown. - -INLINE_INHERITED_MEMB = NO - -# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full -# path before files name in the file list and in the header files. If set -# to NO the shortest path that makes the file name unique will be used. - -FULL_PATH_NAMES = YES - -# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag -# can be used to strip a user-defined part of the path. Stripping is -# only done if one of the specified strings matches the left-hand part of -# the path. The tag can be used to show relative paths in the file list. -# If left blank the directory from which doxygen is run is used as the -# path to strip. - -STRIP_FROM_PATH = - -# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of -# the path mentioned in the documentation of a class, which tells -# the reader which header file to include in order to use a class. -# If left blank only the name of the header file containing the class -# definition is used. Otherwise one should specify the include paths that -# are normally passed to the compiler using the -I flag. - -STRIP_FROM_INC_PATH = - -# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter -# (but less readable) file names. This can be useful is your file systems -# doesn't support long names like on DOS, Mac, or CD-ROM. - -SHORT_NAMES = NO - -# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen -# will interpret the first line (until the first dot) of a JavaDoc-style -# comment as the brief description. If set to NO, the JavaDoc -# comments will behave just like the Qt-style comments (thus requiring an -# explicit @brief command for a brief description. - -JAVADOC_AUTOBRIEF = NO - -# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen -# treat a multi-line C++ special comment block (i.e. a block of //! or /// -# comments) as a brief description. This used to be the default behaviour. -# The new default is to treat a multi-line C++ comment block as a detailed -# description. Set this tag to YES if you prefer the old behaviour instead. - -MULTILINE_CPP_IS_BRIEF = NO - -# If the DETAILS_AT_TOP tag is set to YES then Doxygen -# will output the detailed description near the top, like JavaDoc. -# If set to NO, the detailed description appears after the member -# documentation. - -DETAILS_AT_TOP = NO - -# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented -# member inherits the documentation from any documented member that it -# re-implements. - -INHERIT_DOCS = YES - -# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC -# tag is set to YES, then doxygen will reuse the documentation of the first -# member in the group (if any) for the other members of the group. By default -# all members of a group must be documented explicitly. - -DISTRIBUTE_GROUP_DOC = YES - -# The TAB_SIZE tag can be used to set the number of spaces in a tab. -# Doxygen uses this value to replace tabs by spaces in code fragments. - -TAB_SIZE = 8 - -# This tag can be used to specify a number of aliases that acts -# as commands in the documentation. An alias has the form "name=value". -# For example adding "sideeffect=\par Side Effects:\n" will allow you to -# put the command \sideeffect (or @sideeffect) in the documentation, which -# will result in a user-defined paragraph with heading "Side Effects:". -# You can put \n's in the value part of an alias to insert newlines. - -ALIASES = - -# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources -# only. Doxygen will then generate output that is more tailored for C. -# For instance, some of the names that are used will be different. The list -# of all members will be omitted, etc. - -OPTIMIZE_OUTPUT_FOR_C = YES - -# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java sources -# only. Doxygen will then generate output that is more tailored for Java. -# For instance, namespaces will be presented as packages, qualified scopes -# will look different, etc. - -OPTIMIZE_OUTPUT_JAVA = NO - -# Set the SUBGROUPING tag to YES (the default) to allow class member groups of -# the same type (for instance a group of public functions) to be put as a -# subgroup of that type (e.g. under the Public Functions section). Set it to -# NO to prevent subgrouping. Alternatively, this can be done per class using -# the \nosubgrouping command. - -SUBGROUPING = YES - -#--------------------------------------------------------------------------- -# Build related configuration options -#--------------------------------------------------------------------------- - -# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in -# documentation are documented, even if no documentation was available. -# Private class members and static file members will be hidden unless -# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES - -EXTRACT_ALL = NO - -# If the EXTRACT_PRIVATE tag is set to YES all private members of a class -# will be included in the documentation. - -EXTRACT_PRIVATE = NO - -# If the EXTRACT_STATIC tag is set to YES all static members of a file -# will be included in the documentation. - -EXTRACT_STATIC = NO - -# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) -# defined locally in source files will be included in the documentation. -# If set to NO only classes defined in header files are included. - -EXTRACT_LOCAL_CLASSES = YES - -# This flag is only useful for Objective-C code. When set to YES local -# methods, which are defined in the implementation section but not in -# the interface are included in the documentation. -# If set to NO (the default) only methods in the interface are included. - -EXTRACT_LOCAL_METHODS = NO - -# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all -# undocumented members of documented classes, files or namespaces. -# If set to NO (the default) these members will be included in the -# various overviews, but no documentation section is generated. -# This option has no effect if EXTRACT_ALL is enabled. - -HIDE_UNDOC_MEMBERS = NO - -# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all -# undocumented classes that are normally visible in the class hierarchy. -# If set to NO (the default) these classes will be included in the various -# overviews. This option has no effect if EXTRACT_ALL is enabled. - -HIDE_UNDOC_CLASSES = NO - -# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all -# friend (class|struct|union) declarations. -# If set to NO (the default) these declarations will be included in the -# documentation. - -HIDE_FRIEND_COMPOUNDS = NO - -# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any -# documentation blocks found inside the body of a function. -# If set to NO (the default) these blocks will be appended to the -# function's detailed documentation block. - -HIDE_IN_BODY_DOCS = NO - -# The INTERNAL_DOCS tag determines if documentation -# that is typed after a \internal command is included. If the tag is set -# to NO (the default) then the documentation will be excluded. -# Set it to YES to include the internal documentation. - -INTERNAL_DOCS = NO - -# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate -# file names in lower-case letters. If set to YES upper-case letters are also -# allowed. This is useful if you have classes or files whose names only differ -# in case and if your file system supports case sensitive file names. Windows -# and Mac users are advised to set this option to NO. - -CASE_SENSE_NAMES = YES - -# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen -# will show members with their full class and namespace scopes in the -# documentation. If set to YES the scope will be hidden. - -HIDE_SCOPE_NAMES = NO - -# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen -# will put a list of the files that are included by a file in the documentation -# of that file. - -SHOW_INCLUDE_FILES = YES - -# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] -# is inserted in the documentation for inline members. - -INLINE_INFO = YES - -# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen -# will sort the (detailed) documentation of file and class members -# alphabetically by member name. If set to NO the members will appear in -# declaration order. - -SORT_MEMBER_DOCS = YES - -# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the -# brief documentation of file, namespace and class members alphabetically -# by member name. If set to NO (the default) the members will appear in -# declaration order. - -SORT_BRIEF_DOCS = NO - -# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be -# sorted by fully-qualified names, including namespaces. If set to -# NO (the default), the class list will be sorted only by class name, -# not including the namespace part. -# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. -# Note: This option applies only to the class list, not to the -# alphabetical list. - -SORT_BY_SCOPE_NAME = NO - -# The GENERATE_TODOLIST tag can be used to enable (YES) or -# disable (NO) the todo list. This list is created by putting \todo -# commands in the documentation. - -GENERATE_TODOLIST = YES - -# The GENERATE_TESTLIST tag can be used to enable (YES) or -# disable (NO) the test list. This list is created by putting \test -# commands in the documentation. - -GENERATE_TESTLIST = YES - -# The GENERATE_BUGLIST tag can be used to enable (YES) or -# disable (NO) the bug list. This list is created by putting \bug -# commands in the documentation. - -GENERATE_BUGLIST = YES - -# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or -# disable (NO) the deprecated list. This list is created by putting -# \deprecated commands in the documentation. - -GENERATE_DEPRECATEDLIST= YES - -# The ENABLED_SECTIONS tag can be used to enable conditional -# documentation sections, marked by \if sectionname ... \endif. - -ENABLED_SECTIONS = - -# The MAX_INITIALIZER_LINES tag determines the maximum number of lines -# the initial value of a variable or define consists of for it to appear in -# the documentation. If the initializer consists of more lines than specified -# here it will be hidden. Use a value of 0 to hide initializers completely. -# The appearance of the initializer of individual variables and defines in the -# documentation can be controlled using \showinitializer or \hideinitializer -# command in the documentation regardless of this setting. - -MAX_INITIALIZER_LINES = 30 - -# Set the SHOW_USED_FILES tag to NO to disable the list of files generated -# at the bottom of the documentation of classes and structs. If set to YES the -# list will mention the files that were used to generate the documentation. - -SHOW_USED_FILES = YES - -# If the sources in your project are distributed over multiple directories -# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy -# in the documentation. - -SHOW_DIRECTORIES = YES - -#--------------------------------------------------------------------------- -# configuration options related to warning and progress messages -#--------------------------------------------------------------------------- - -# The QUIET tag can be used to turn on/off the messages that are generated -# by doxygen. Possible values are YES and NO. If left blank NO is used. - -QUIET = NO - -# The WARNINGS tag can be used to turn on/off the warning messages that are -# generated by doxygen. Possible values are YES and NO. If left blank -# NO is used. - -WARNINGS = YES - -# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings -# for undocumented members. If EXTRACT_ALL is set to YES then this flag will -# automatically be disabled. - -WARN_IF_UNDOCUMENTED = YES - -# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for -# potential errors in the documentation, such as not documenting some -# parameters in a documented function, or documenting parameters that -# don't exist or using markup commands wrongly. - -WARN_IF_DOC_ERROR = YES - -# The WARN_FORMAT tag determines the format of the warning messages that -# doxygen can produce. The string should contain the $file, $line, and $text -# tags, which will be replaced by the file and line number from which the -# warning originated and the warning text. - -WARN_FORMAT = "$file:$line: $text" - -# The WARN_LOGFILE tag can be used to specify a file to which warning -# and error messages should be written. If left blank the output is written -# to stderr. - -WARN_LOGFILE = - -#--------------------------------------------------------------------------- -# configuration options related to the input files -#--------------------------------------------------------------------------- - -# The INPUT tag can be used to specify the files and/or directories that contain -# documented source files. You may enter file names like "myfile.cpp" or -# directories like "/usr/src/myproject". Separate the files or directories -# with spaces. - -INPUT = "include/frei0r.h" - -# If the value of the INPUT tag contains directories, you can use the -# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank the following patterns are tested: -# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx *.hpp -# *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm - -FILE_PATTERNS = - -# The RECURSIVE tag can be used to turn specify whether or not subdirectories -# should be searched for input files as well. Possible values are YES and NO. -# If left blank NO is used. - -RECURSIVE = NO - -# The EXCLUDE tag can be used to specify files and/or directories that should -# excluded from the INPUT source files. This way you can easily exclude a -# subdirectory from a directory tree whose root is specified with the INPUT tag. - -EXCLUDE = - -# The EXCLUDE_SYMLINKS tag can be used select whether or not files or directories -# that are symbolic links (a Unix filesystem feature) are excluded from the input. - -EXCLUDE_SYMLINKS = NO - -# If the value of the INPUT tag contains directories, you can use the -# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude -# certain files from those directories. - -EXCLUDE_PATTERNS = - -# The EXAMPLE_PATH tag can be used to specify one or more files or -# directories that contain example code fragments that are included (see -# the \include command). - -EXAMPLE_PATH = - -# If the value of the EXAMPLE_PATH tag contains directories, you can use the -# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank all files are included. - -EXAMPLE_PATTERNS = - -# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be -# searched for input files to be used with the \include or \dontinclude -# commands irrespective of the value of the RECURSIVE tag. -# Possible values are YES and NO. If left blank NO is used. - -EXAMPLE_RECURSIVE = NO - -# The IMAGE_PATH tag can be used to specify one or more files or -# directories that contain image that are included in the documentation (see -# the \image command). - -IMAGE_PATH = - -# The INPUT_FILTER tag can be used to specify a program that doxygen should -# invoke to filter for each input file. Doxygen will invoke the filter program -# by executing (via popen()) the command , where -# is the value of the INPUT_FILTER tag, and is the name of an -# input file. Doxygen will then use the output that the filter program writes -# to standard output. If FILTER_PATTERNS is specified, this tag will be -# ignored. - -INPUT_FILTER = - -# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern -# basis. Doxygen will compare the file name with each pattern and apply the -# filter if there is a match. The filters are a list of the form: -# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further -# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER -# is applied to all files. - -FILTER_PATTERNS = - -# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using -# INPUT_FILTER) will be used to filter the input files when producing source -# files to browse (i.e. when SOURCE_BROWSER is set to YES). - -FILTER_SOURCE_FILES = NO - -#--------------------------------------------------------------------------- -# configuration options related to source browsing -#--------------------------------------------------------------------------- - -# If the SOURCE_BROWSER tag is set to YES then a list of source files will -# be generated. Documented entities will be cross-referenced with these sources. -# Note: To get rid of all source code in the generated output, make sure also -# VERBATIM_HEADERS is set to NO. - -SOURCE_BROWSER = NO - -# Setting the INLINE_SOURCES tag to YES will include the body -# of functions and classes directly in the documentation. - -INLINE_SOURCES = NO - -# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct -# doxygen to hide any special comment blocks from generated source code -# fragments. Normal C and C++ comments will always remain visible. - -STRIP_CODE_COMMENTS = YES - -# If the REFERENCED_BY_RELATION tag is set to YES (the default) -# then for each documented function all documented -# functions referencing it will be listed. - -REFERENCED_BY_RELATION = YES - -# If the REFERENCES_RELATION tag is set to YES (the default) -# then for each documented function all documented entities -# called/used by that function will be listed. - -REFERENCES_RELATION = YES - -# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen -# will generate a verbatim copy of the header file for each class for -# which an include is specified. Set to NO to disable this. - -VERBATIM_HEADERS = YES - -#--------------------------------------------------------------------------- -# configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- - -# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index -# of all compounds will be generated. Enable this if the project -# contains a lot of classes, structs, unions or interfaces. - -ALPHABETICAL_INDEX = NO - -# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then -# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns -# in which this list will be split (can be a number in the range [1..20]) - -COLS_IN_ALPHA_INDEX = 5 - -# In case all classes in a project start with a common prefix, all -# classes will be put under the same header in the alphabetical index. -# The IGNORE_PREFIX tag can be used to specify one or more prefixes that -# should be ignored while generating the index headers. - -IGNORE_PREFIX = - -#--------------------------------------------------------------------------- -# configuration options related to the HTML output -#--------------------------------------------------------------------------- - -# If the GENERATE_HTML tag is set to YES (the default) Doxygen will -# generate HTML output. - -GENERATE_HTML = YES - -# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `html' will be used as the default path. - -HTML_OUTPUT = html - -# The HTML_FILE_EXTENSION tag can be used to specify the file extension for -# each generated HTML page (for example: .htm,.php,.asp). If it is left blank -# doxygen will generate files with .html extension. - -HTML_FILE_EXTENSION = .html - -# The HTML_HEADER tag can be used to specify a personal HTML header for -# each generated HTML page. If it is left blank doxygen will generate a -# standard header. - -HTML_HEADER = - -# The HTML_FOOTER tag can be used to specify a personal HTML footer for -# each generated HTML page. If it is left blank doxygen will generate a -# standard footer. - -HTML_FOOTER = - -# The HTML_STYLESHEET tag can be used to specify a user-defined cascading -# style sheet that is used by each HTML page. It can be used to -# fine-tune the look of the HTML output. If the tag is left blank doxygen -# will generate a default style sheet. Note that doxygen will try to copy -# the style sheet file to the HTML output directory, so don't put your own -# stylesheet in the HTML output directory as well, or it will be erased! - -HTML_STYLESHEET = - -# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, -# files or namespaces will be aligned in HTML using tables. If set to -# NO a bullet list will be used. - -HTML_ALIGN_MEMBERS = YES - -# If the GENERATE_HTMLHELP tag is set to YES, additional index files -# will be generated that can be used as input for tools like the -# Microsoft HTML help workshop to generate a compressed HTML help file (.chm) -# of the generated HTML documentation. - -GENERATE_HTMLHELP = NO - -# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can -# be used to specify the file name of the resulting .chm file. You -# can add a path in front of the file if the result should not be -# written to the html output directory. - -CHM_FILE = - -# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can -# be used to specify the location (absolute path including file name) of -# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run -# the HTML help compiler on the generated index.hhp. - -HHC_LOCATION = - -# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag -# controls if a separate .chi index file is generated (YES) or that -# it should be included in the master .chm file (NO). - -GENERATE_CHI = NO - -# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag -# controls whether a binary table of contents is generated (YES) or a -# normal table of contents (NO) in the .chm file. - -BINARY_TOC = NO - -# The TOC_EXPAND flag can be set to YES to add extra items for group members -# to the contents of the HTML help documentation and to the tree view. - -TOC_EXPAND = NO - -# The DISABLE_INDEX tag can be used to turn on/off the condensed index at -# top of each HTML page. The value NO (the default) enables the index and -# the value YES disables it. - -DISABLE_INDEX = NO - -# This tag can be used to set the number of enum values (range [1..20]) -# that doxygen will group on one line in the generated HTML documentation. - -ENUM_VALUES_PER_LINE = 4 - -# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be -# generated containing a tree-like index structure (just like the one that -# is generated for HTML Help). For this to work a browser that supports -# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, -# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are -# probably better off using the HTML help feature. - -GENERATE_TREEVIEW = NO - -# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be -# used to set the initial width (in pixels) of the frame in which the tree -# is shown. - -TREEVIEW_WIDTH = 250 - -#--------------------------------------------------------------------------- -# configuration options related to the LaTeX output -#--------------------------------------------------------------------------- - -# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will -# generate Latex output. - -GENERATE_LATEX = YES - -# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `latex' will be used as the default path. - -LATEX_OUTPUT = latex - -# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be -# invoked. If left blank `latex' will be used as the default command name. - -LATEX_CMD_NAME = latex - -# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to -# generate index for LaTeX. If left blank `makeindex' will be used as the -# default command name. - -MAKEINDEX_CMD_NAME = makeindex - -# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact -# LaTeX documents. This may be useful for small projects and may help to -# save some trees in general. - -COMPACT_LATEX = NO - -# The PAPER_TYPE tag can be used to set the paper type that is used -# by the printer. Possible values are: a4, a4wide, letter, legal and -# executive. If left blank a4wide will be used. - -PAPER_TYPE = a4wide - -# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX -# packages that should be included in the LaTeX output. - -EXTRA_PACKAGES = - -# The LATEX_HEADER tag can be used to specify a personal LaTeX header for -# the generated latex document. The header should contain everything until -# the first chapter. If it is left blank doxygen will generate a -# standard header. Notice: only use this tag if you know what you are doing! - -LATEX_HEADER = - -# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated -# is prepared for conversion to pdf (using ps2pdf). The pdf file will -# contain links (just like the HTML output) instead of page references -# This makes the output suitable for online browsing using a pdf viewer. - -PDF_HYPERLINKS = NO - -# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of -# plain latex in the generated Makefile. Set this option to YES to get a -# higher quality PDF documentation. - -USE_PDFLATEX = NO - -# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. -# command to the generated LaTeX files. This will instruct LaTeX to keep -# running if errors occur, instead of asking the user for help. -# This option is also used when generating formulas in HTML. - -LATEX_BATCHMODE = NO - -# If LATEX_HIDE_INDICES is set to YES then doxygen will not -# include the index chapters (such as File Index, Compound Index, etc.) -# in the output. - -LATEX_HIDE_INDICES = NO - -#--------------------------------------------------------------------------- -# configuration options related to the RTF output -#--------------------------------------------------------------------------- - -# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output -# The RTF output is optimized for Word 97 and may not look very pretty with -# other RTF readers or editors. - -GENERATE_RTF = NO - -# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `rtf' will be used as the default path. - -RTF_OUTPUT = rtf - -# If the COMPACT_RTF tag is set to YES Doxygen generates more compact -# RTF documents. This may be useful for small projects and may help to -# save some trees in general. - -COMPACT_RTF = NO - -# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated -# will contain hyperlink fields. The RTF file will -# contain links (just like the HTML output) instead of page references. -# This makes the output suitable for online browsing using WORD or other -# programs which support those fields. -# Note: wordpad (write) and others do not support links. - -RTF_HYPERLINKS = NO - -# Load stylesheet definitions from file. Syntax is similar to doxygen's -# config file, i.e. a series of assignments. You only have to provide -# replacements, missing definitions are set to their default value. - -RTF_STYLESHEET_FILE = - -# Set optional variables used in the generation of an rtf document. -# Syntax is similar to doxygen's config file. - -RTF_EXTENSIONS_FILE = - -#--------------------------------------------------------------------------- -# configuration options related to the man page output -#--------------------------------------------------------------------------- - -# If the GENERATE_MAN tag is set to YES (the default) Doxygen will -# generate man pages - -GENERATE_MAN = NO - -# The MAN_OUTPUT tag is used to specify where the man pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `man' will be used as the default path. - -MAN_OUTPUT = man - -# The MAN_EXTENSION tag determines the extension that is added to -# the generated man pages (default is the subroutine's section .3) - -MAN_EXTENSION = .3 - -# If the MAN_LINKS tag is set to YES and Doxygen generates man output, -# then it will generate one additional man file for each entity -# documented in the real man page(s). These additional files -# only source the real man page, but without them the man command -# would be unable to find the correct page. The default is NO. - -MAN_LINKS = NO - -#--------------------------------------------------------------------------- -# configuration options related to the XML output -#--------------------------------------------------------------------------- - -# If the GENERATE_XML tag is set to YES Doxygen will -# generate an XML file that captures the structure of -# the code including all documentation. - -GENERATE_XML = NO - -# The XML_OUTPUT tag is used to specify where the XML pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `xml' will be used as the default path. - -XML_OUTPUT = xml - -# The XML_SCHEMA tag can be used to specify an XML schema, -# which can be used by a validating XML parser to check the -# syntax of the XML files. - -XML_SCHEMA = - -# The XML_DTD tag can be used to specify an XML DTD, -# which can be used by a validating XML parser to check the -# syntax of the XML files. - -XML_DTD = - -# If the XML_PROGRAMLISTING tag is set to YES Doxygen will -# dump the program listings (including syntax highlighting -# and cross-referencing information) to the XML output. Note that -# enabling this will significantly increase the size of the XML output. - -XML_PROGRAMLISTING = YES - -#--------------------------------------------------------------------------- -# configuration options for the AutoGen Definitions output -#--------------------------------------------------------------------------- - -# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will -# generate an AutoGen Definitions (see autogen.sf.net) file -# that captures the structure of the code including all -# documentation. Note that this feature is still experimental -# and incomplete at the moment. - -GENERATE_AUTOGEN_DEF = NO - -#--------------------------------------------------------------------------- -# configuration options related to the Perl module output -#--------------------------------------------------------------------------- - -# If the GENERATE_PERLMOD tag is set to YES Doxygen will -# generate a Perl module file that captures the structure of -# the code including all documentation. Note that this -# feature is still experimental and incomplete at the -# moment. - -GENERATE_PERLMOD = NO - -# If the PERLMOD_LATEX tag is set to YES Doxygen will generate -# the necessary Makefile rules, Perl scripts and LaTeX code to be able -# to generate PDF and DVI output from the Perl module output. - -PERLMOD_LATEX = NO - -# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be -# nicely formatted so it can be parsed by a human reader. This is useful -# if you want to understand what is going on. On the other hand, if this -# tag is set to NO the size of the Perl module output will be much smaller -# and Perl will parse it just the same. - -PERLMOD_PRETTY = YES - -# The names of the make variables in the generated doxyrules.make file -# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. -# This is useful so different doxyrules.make files included by the same -# Makefile don't overwrite each other's variables. - -PERLMOD_MAKEVAR_PREFIX = - -#--------------------------------------------------------------------------- -# Configuration options related to the preprocessor -#--------------------------------------------------------------------------- - -# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will -# evaluate all C-preprocessor directives found in the sources and include -# files. - -ENABLE_PREPROCESSING = YES - -# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro -# names in the source code. If set to NO (the default) only conditional -# compilation will be performed. Macro expansion can be done in a controlled -# way by setting EXPAND_ONLY_PREDEF to YES. - -MACRO_EXPANSION = NO - -# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES -# then the macro expansion is limited to the macros specified with the -# PREDEFINED and EXPAND_AS_PREDEFINED tags. - -EXPAND_ONLY_PREDEF = NO - -# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files -# in the INCLUDE_PATH (see below) will be search if a #include is found. - -SEARCH_INCLUDES = YES - -# The INCLUDE_PATH tag can be used to specify one or more directories that -# contain include files that are not input files but should be processed by -# the preprocessor. - -INCLUDE_PATH = - -# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard -# patterns (like *.h and *.hpp) to filter out the header-files in the -# directories. If left blank, the patterns specified with FILE_PATTERNS will -# be used. - -INCLUDE_FILE_PATTERNS = - -# The PREDEFINED tag can be used to specify one or more macro names that -# are defined before the preprocessor is started (similar to the -D option of -# gcc). The argument of the tag is a list of macros of the form: name -# or name=definition (no spaces). If the definition and the = are -# omitted =1 is assumed. To prevent a macro definition from being -# undefined via #undef or recursively expanded use the := operator -# instead of the = operator. - -PREDEFINED = - -# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then -# this tag can be used to specify a list of macro names that should be expanded. -# The macro definition that is found in the sources will be used. -# Use the PREDEFINED tag if you want to use a different macro definition. - -EXPAND_AS_DEFINED = - -# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then -# doxygen's preprocessor will remove all function-like macros that are alone -# on a line, have an all uppercase name, and do not end with a semicolon. Such -# function macros are typically used for boiler-plate code, and will confuse the -# parser if not removed. - -SKIP_FUNCTION_MACROS = YES - -#--------------------------------------------------------------------------- -# Configuration::additions related to external references -#--------------------------------------------------------------------------- - -# The TAGFILES option can be used to specify one or more tagfiles. -# Optionally an initial location of the external documentation -# can be added for each tagfile. The format of a tag file without -# this location is as follows: -# TAGFILES = file1 file2 ... -# Adding location for the tag files is done as follows: -# TAGFILES = file1=loc1 "file2 = loc2" ... -# where "loc1" and "loc2" can be relative or absolute paths or -# URLs. If a location is present for each tag, the installdox tool -# does not have to be run to correct the links. -# Note that each tag file must have a unique name -# (where the name does NOT include the path) -# If a tag file is not located in the directory in which doxygen -# is run, you must also specify the path to the tagfile here. - -TAGFILES = - -# When a file name is specified after GENERATE_TAGFILE, doxygen will create -# a tag file that is based on the input files it reads. - -GENERATE_TAGFILE = - -# If the ALLEXTERNALS tag is set to YES all external classes will be listed -# in the class index. If set to NO only the inherited external classes -# will be listed. - -ALLEXTERNALS = NO - -# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed -# in the modules index. If set to NO, only the current project's groups will -# be listed. - -EXTERNAL_GROUPS = YES - -# The PERL_PATH should be the absolute path and name of the perl script -# interpreter (i.e. the result of `which perl'). - -PERL_PATH = /usr/bin/perl - -#--------------------------------------------------------------------------- -# Configuration options related to the dot tool -#--------------------------------------------------------------------------- - -# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will -# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base or -# super classes. Setting the tag to NO turns the diagrams off. Note that this -# option is superseded by the HAVE_DOT option below. This is only a fallback. It is -# recommended to install and use dot, since it yields more powerful graphs. - -CLASS_DIAGRAMS = YES - -# If set to YES, the inheritance and collaboration graphs will hide -# inheritance and usage relations if the target is undocumented -# or is not a class. - -HIDE_UNDOC_RELATIONS = YES - -# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is -# available from the path. This tool is part of Graphviz, a graph visualization -# toolkit from AT&T and Lucent Bell Labs. The other options in this section -# have no effect if this option is set to NO (the default) - -HAVE_DOT = NO - -# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect inheritance relations. Setting this tag to YES will force the -# the CLASS_DIAGRAMS tag to NO. - -CLASS_GRAPH = YES - -# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect implementation dependencies (inheritance, containment, and -# class references variables) of the class with other documented classes. - -COLLABORATION_GRAPH = YES - -# If the UML_LOOK tag is set to YES doxygen will generate inheritance and -# collaboration diagrams in a style similar to the OMG's Unified Modeling -# Language. - -UML_LOOK = NO - -# If set to YES, the inheritance and collaboration graphs will show the -# relations between templates and their instances. - -TEMPLATE_RELATIONS = NO - -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT -# tags are set to YES then doxygen will generate a graph for each documented -# file showing the direct and indirect include dependencies of the file with -# other documented files. - -INCLUDE_GRAPH = YES - -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and -# HAVE_DOT tags are set to YES then doxygen will generate a graph for each -# documented header file showing the documented files that directly or -# indirectly include this file. - -INCLUDED_BY_GRAPH = YES - -# If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will -# generate a call dependency graph for every global function or class method. -# Note that enabling this option will significantly increase the time of a run. -# So in most cases it will be better to enable call graphs for selected -# functions only using the \callgraph command. - -CALL_GRAPH = NO - -# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen -# will graphical hierarchy of all classes instead of a textual one. - -GRAPHICAL_HIERARCHY = YES - -# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images -# generated by dot. Possible values are png, jpg, or gif -# If left blank png will be used. - -DOT_IMAGE_FORMAT = png - -# The tag DOT_PATH can be used to specify the path where the dot tool can be -# found. If left blank, it is assumed the dot tool can be found on the path. - -DOT_PATH = - -# The DOTFILE_DIRS tag can be used to specify one or more directories that -# contain dot files that are included in the documentation (see the -# \dotfile command). - -DOTFILE_DIRS = - -# The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width -# (in pixels) of the graphs generated by dot. If a graph becomes larger than -# this value, doxygen will try to truncate the graph, so that it fits within -# the specified constraint. Beware that most browsers cannot cope with very -# large images. - -MAX_DOT_GRAPH_WIDTH = 1024 - -# The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height -# (in pixels) of the graphs generated by dot. If a graph becomes larger than -# this value, doxygen will try to truncate the graph, so that it fits within -# the specified constraint. Beware that most browsers cannot cope with very -# large images. - -MAX_DOT_GRAPH_HEIGHT = 1024 - -# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the -# graphs generated by dot. A depth value of 3 means that only nodes reachable -# from the root by following a path via at most 3 edges will be shown. Nodes that -# lay further from the root node will be omitted. Note that setting this option to -# 1 or 2 may greatly reduce the computation time needed for large code bases. Also -# note that a graph may be further truncated if the graph's image dimensions are -# not sufficient to fit the graph (see MAX_DOT_GRAPH_WIDTH and MAX_DOT_GRAPH_HEIGHT). -# If 0 is used for the depth value (the default), the graph is not depth-constrained. - -MAX_DOT_GRAPH_DEPTH = 0 - -# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will -# generate a legend page explaining the meaning of the various boxes and -# arrows in the dot generated graphs. - -GENERATE_LEGEND = YES - -# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will -# remove the intermediate dot files that are used to generate -# the various graphs. - -DOT_CLEANUP = YES - -#--------------------------------------------------------------------------- -# Configuration::additions related to the search engine -#--------------------------------------------------------------------------- - -# The SEARCHENGINE tag specifies whether or not a search engine should be -# used. If set to NO the values of all tags below this one will be ignored. - -SEARCHENGINE = NO diff --git a/INSTALL b/INSTALL index 23e5f25..2550dab 100644 --- a/INSTALL +++ b/INSTALL @@ -1,16 +1,19 @@ 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 +Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, +2006, 2007, 2008, 2009 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. + Briefly, the shell commands `./configure; make; make install' should +configure, build, and install this package. The following +more-detailed instructions are generic; see the `README' file for +instructions specific to this package. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses @@ -23,9 +26,9 @@ 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 +the results of its tests to speed up reconfiguring. Caching is disabled by default to prevent problems with accidental use of stale -cache files.) +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 @@ -35,20 +38,17 @@ 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'. +`configure' by a program called `autoconf'. You 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. + `./configure' to configure the package for your system. + + Running `configure' might take a while. While running, it prints + some messages telling which features it is checking for. 2. Type `make' to compile the package. @@ -67,42 +67,57 @@ all sorts of other programs in order to regenerate files that came with the distribution. + 6. Often, you can also type `make uninstall' to remove the installed + files again. + 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. + 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 + ./configure CC=c99 CFLAGS=-g 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 + 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 +own directory. To do this, you can use 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. + With a non-GNU `make', it is safer 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. + + On MacOS X 10.5 and later systems, you can create libraries and +executables that work on multiple system types--known as "fat" or +"universal" binaries--by specifying multiple `-arch' options to the +compiler but only a single `-arch' option to the preprocessor. Like +this: + + ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ + CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ + CPP="gcc -E" CXXCPP="g++ -E" + + This is not guaranteed to produce working output in all cases, you +may have to build one architecture at a time and combine the results +using the `lipo' tool if you have problems. Installation Names ================== -By default, `make install' installs the package's commands under + 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'. @@ -125,7 +140,7 @@ Optional Features ================= -Some packages pay attention to `--enable-FEATURE' options to + 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 @@ -137,14 +152,46 @@ you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. +Particular systems +================== + + On HP-UX, the default C compiler is not ANSI C compatible. If GNU +CC is not installed, it is recommended to use the following options in +order to use an ANSI C compiler: + + ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" + +and if that doesn't work, install pre-built binaries of GCC for HP-UX. + + On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot +parse its `' header file. The option `-nodtk' can be used as +a workaround. If GNU CC is not installed, it is therefore recommended +to try + + ./configure CC="cc" + +and if that doesn't work, try + + ./configure CC="cc -nodtk" + + On Solaris, don't put `/usr/ucb' early in your `PATH'. This +directory contains several dysfunctional programs; working variants of +these programs are available in `/usr/bin'. So, if you need `/usr/ucb' +in your `PATH', put it _after_ `/usr/bin'. + + On Haiku, software installed for all users goes in `/boot/common', +not `/usr/local'. It is recommended to use the following options: + + ./configure --prefix=/boot/common + 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 + 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: @@ -152,7 +199,8 @@ where SYSTEM can have one of these forms: - OS KERNEL-OS + 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 @@ -170,9 +218,9 @@ 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'. + 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. @@ -181,7 +229,7 @@ Defining Variables ================== -Variables not defined in a site shell script can be set in the + 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 @@ -190,21 +238,29 @@ ./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'. +overridden in the site shell script). + +Unfortunately, this technique does not work for `CONFIG_SHELL' due to +an Autoconf bug. Until the bug is fixed you can use this workaround: + + CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash `configure' Invocation ====================== -`configure' recognizes the following options to control how it operates. + `configure' recognizes the following options to control how it +operates. `--help' `-h' - Print a summary of the options to `configure', and exit. + Print a summary of all of the options to `configure', and exit. + +`--help=short' +`--help=recursive' + Print a summary of the options unique to this package's + `configure', and exit. The `short' variant lists options used + only in the top level, while the `recursive' variant lists options + also present in any nested packages. `--version' `-V' @@ -231,6 +287,16 @@ Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. +`--prefix=DIR' + Use DIR as the installation prefix. *Note Installation Names:: + for more details, including other options available for fine-tuning + the installation locations. + +`--no-create' +`-n' + Run the configure checks, but stop before creating any output + files. + `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. diff --git a/Makefile.am b/Makefile.am index 44d1405..169497a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -10,9 +10,10 @@ ACLOCAL_AMFLAGS= -I m4 -SUBDIRS=src include doc -EXTRA_DIST = Doxyfile +SUBDIRS=src include pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = frei0r.pc +docsdir = ${prefix}/share/doc/${PACKAGE} +docs_DATA = README ChangeLog TODO AUTHORS diff --git a/Makefile.in b/Makefile.in index 0714598..f3d70c1 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -48,9 +48,13 @@ DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/frei0r.pc.in \ $(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \ - config.guess config.sub depcomp install-sh ltmain.sh missing + TODO config.guess config.sub depcomp install-sh ltmain.sh \ + missing ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ @@ -89,8 +93,8 @@ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -am__installdirs = "$(DESTDIR)$(pkgconfigdir)" -DATA = $(pkgconfig_DATA) +am__installdirs = "$(DESTDIR)$(docsdir)" "$(DESTDIR)$(pkgconfigdir)" +DATA = $(docs_DATA) $(pkgconfig_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ @@ -154,6 +158,7 @@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DOXYGEN = @DOXYGEN@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -165,6 +170,7 @@ GAVL_CFLAGS = @GAVL_CFLAGS@ GAVL_LIBS = @GAVL_LIBS@ GREP = @GREP@ +HAVE_OPENCV = @HAVE_OPENCV@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -190,6 +196,8 @@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_DATA_DIR = @PACKAGE_DATA_DIR@ +PACKAGE_LIB_DIR = @PACKAGE_LIB_DIR@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ @@ -197,6 +205,8 @@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ @@ -257,10 +267,11 @@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ ACLOCAL_AMFLAGS = -I m4 -SUBDIRS = src include doc -EXTRA_DIST = Doxyfile +SUBDIRS = src include pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = frei0r.pc +docsdir = ${prefix}/share/doc/${PACKAGE} +docs_DATA = README ChangeLog TODO AUTHORS all: all-recursive .SUFFIXES: @@ -309,6 +320,26 @@ distclean-libtool: -rm -f libtool config.lt +install-docsDATA: $(docs_DATA) + @$(NORMAL_INSTALL) + test -z "$(docsdir)" || $(MKDIR_P) "$(DESTDIR)$(docsdir)" + @list='$(docs_DATA)'; test -n "$(docsdir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(docsdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(docsdir)" || exit $$?; \ + done + +uninstall-docsDATA: + @$(NORMAL_UNINSTALL) + @list='$(docs_DATA)'; test -n "$(docsdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(docsdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(docsdir)" && rm -f $$files install-pkgconfigDATA: $(pkgconfig_DATA) @$(NORMAL_INSTALL) test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" @@ -337,7 +368,7 @@ # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): - @failcom='exit 1'; \ + @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ @@ -362,7 +393,7 @@ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): - @failcom='exit 1'; \ + @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ @@ -526,7 +557,8 @@ fi; \ done -test -n "$(am__skip_mode_fix)" \ - || find "$(distdir)" -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ + || find "$(distdir)" -type d ! -perm -755 \ + -exec chmod u+rwx,go+rx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ @@ -570,17 +602,17 @@ distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ - GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ + GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ - bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ + bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lzma*) \ - unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\ + lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ - GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ + GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac @@ -644,7 +676,7 @@ all-am: Makefile $(DATA) installdirs: installdirs-recursive installdirs-am: - for dir in "$(DESTDIR)$(pkgconfigdir)"; do \ + for dir in "$(DESTDIR)$(docsdir)" "$(DESTDIR)$(pkgconfigdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive @@ -694,7 +726,7 @@ info-am: -install-data-am: install-pkgconfigDATA +install-data-am: install-docsDATA install-pkgconfigDATA install-dvi: install-dvi-recursive @@ -740,7 +772,7 @@ ps-am: -uninstall-am: uninstall-pkgconfigDATA +uninstall-am: uninstall-docsDATA uninstall-pkgconfigDATA .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-strip tags-recursive @@ -752,14 +784,15 @@ distcheck distclean distclean-generic distclean-libtool \ distclean-tags distcleancheck distdir distuninstallcheck dvi \ dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ - install-info install-info-am install-man install-pdf \ - install-pdf-am install-pkgconfigDATA install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - installdirs-am maintainer-clean maintainer-clean-generic \ - mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ - ps ps-am tags tags-recursive uninstall uninstall-am \ + install-data install-data-am install-docsDATA install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-pkgconfigDATA install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ + uninstall uninstall-am uninstall-docsDATA \ uninstall-pkgconfigDATA diff --git a/README b/README index 9baec9f..6b54902 100644 --- a/README +++ b/README @@ -1,24 +1,303 @@ -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/ + + ___________ ._________ + \_ _____/______ ____ |__\ _ \_______ + | __) \_ __ \_/ __ \| / /_\ \_ __ \ + | \ | | \/\ ___/| \ \_/ \ | \/ + \___ / |__| \___ >__|\_____ /__| + \/ \/ \/ + + Minimalistic plugin API for video effects v.1.3 + +http://frei0r.dyne.org by the Piksel Developers Union + + +Table of Contents +================= +Introduction + What Frei0r is + What Frei0r is not + Current status + Code gallery + History +Download + Source code + Build dependencies + Debian / Ubuntu + Apple / OSX +Documentation + API explanation + C++ Filter example +Communication +Acknowledgments + + +Introduction +~~~~~~~~~~~~~ + + +What Frei0r is +=============== + +Frei0r is a minimalistic plugin API for video effects. + +The main emphasis is on simplicity for an API that will round up the +most common video effects into 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. + +What Frei0r is not +=================== + +Frei0r 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. + +It is not meant as a generic API for all kinds of video applications, +as it doesn't provides things like an extensive parameter mechanism or +event handling. + +Eventually the frei0r API can be wrapped by higher level APIs +expanding its functionalities (for instance as GStreamer, MLT, FFmpeg +and others do). + +Current status +=============== + + +If you like to peek in what's boiling in the pot, have a look at our +TODO + +Developers are sporadically contributing and we are happy if more +people like to get involved, so let us know about your creations! Code +and patches are well accepted, get in touch with us on the +mailinglist. + + +Code gallery +============= + +You might want to look at the code in frei0r more in detail, then +browse the existing effects by visiting the Frei0r plugin gallery +online. + + +History +======== + +Frei0r has been around since 2004, born from yearly brainstormings +held at the Piksel conference with the participation of various free +and open source video software developers. + +It is mostly adopted on GNU/Linux and OSX platforms, counts more than +80 effects implemented and is used by free video applications as +PureData, Open Movie Editor, DVEdit, Gephex, LiVES, FreeJ, MøB, +VeeJay, MLT and KDEnLive among the others. + +Wikipedia page about Frei0r: http://en.wikipedia.org/wiki/Frei0r + + +[Piksel]: http://www.piksel.no +[PureData]: http://www.artefacte.org/pd/ +[Open Movie Editor]: http://openmovieeditor.sourceforge.net/ +[DVEdit]: http://www.freenet.org.nz/dvedit +[Gephex]: http://www.gephex.org/ +[LiVES]: http://lives.sf.net +[FreeJ]: http://freej.dyne.org +[MøB]: http://mob.bek.no/ +[VeeJay]: http://veejayhq.net +[MLT]: http://www.mltframework.org/ +[KDEnLive]: http://www.kdenlive.org/ + + +Download +~~~~~~~~~ + +Source code +============ + +Stable frei0r releases are packaged periodically and distributed on + + ftp://ftp.dyne.org/frei0r + +We encourage the unauthorized mirroring of this source repository by +all those interested, using the command + + rsync -Pr rsync.dyne.org::frei0r . + +Frei0r sourcecode is released under the terms of the GNU General +Public License and, eventually other compatible Free Software +licenses. + +The latest source for frei0r plugins can be attained using our +revisioning system *GIT* + + git clone git://code.dyne.org/frei0r.git + +Some clones made by developers are also found on github, but basically +we coalesce around this repository online to pack releases. Make sure +to get in touch with our mailinglist if you like to see your code in +there. + +Build dependencies +------------------- + + + GNU autotools ( ./configure && make ) + or + + CMake ( cmake . && make ) + +Frei0r can be built on GNU/Linux, M$/Windows and Apple/OSX platforms, +possibly in even more environments like embedded devices/ + +* Optional Dependencies + + + [Gavl] ( required for scale0tilt and vectorscope filters ) + [Gavl]: http://gmerlin.sourceforge.net + + + [OpenCV] (required for facebl0r filter ) + [OpenCV]: http://opencvlibrary.sourceforge.net + +Debian / Ubuntu +================ + +Binary packages are mantained for Debian ([QA]) and Ubuntu ([pkg]), to +install the stable version distributed use *apt-get* or *synaptic*: + + sudo apt-get install frei0r-plugins + + + [QA]: http://packages.qa.debian.org/f/frei0r.html + [pkg]: http://packages.ubuntu.com/search?searchon=names&keywords=frei0r + +Apple / OSX +============ + +[MacPorts] provide ready to install packages for OSX: in case you have +this packaging system installed, you just need to open a terminal and +give the following command: + +sudo port install frei0r-plugins + +[MacPorts]: http://www.macports.org + + +Documentation +~~~~~~~~~~~~~~ +If you are new to frei0r (but not to programming) the best thing is +probably to have a look at the [frei0r header], which is quite simple +and well documented, or the doxygen code documentation in doc/ + + +API explanation +================ + +While the main source of documentation for the Frei0r API is the +header, the sourcecode is well commented so you can study its full +[doxyfied documentation] online. + +[doxyfied documentation]: http://frei0r.dyne.org/codedoc/html + + +C++ Filter example +=================== + +A simple skeleton for a frei0r video filter looks like this: + + + #include + + typedef struct { + int16_t w, h; + uint8_t bpp; + uint32_t size; + } ScreenGeometry; + + class MyExample: public frei0r::filter { + public: + MyExample(int wdt, int hgt); + ~MyExample(); + virtual void update(); + private: + ScreenGeometry geo; + void _init(int wdt, int hgt); + } + + MyExample::MyExample() { /* constructor */ } + MyExample::~MyExample() { /* destructor */ } + + void MyExample::_init(int wdt, int hgt) { + geo.w = wdt; + geo.h = hgt; + geo.bpp = 32; // this filter works only in RGBA 32bit + geo.size = geo.w*geo.h*(geo.bpp/8); // calculate the size in bytes + } + + void MyExample::update() { + // we get video input via buffer pointer (void*)in + uint32_t *src = (uint32_t*)in; + // and we give video output via buffer pointer (void*)out + uint32_t *dst = (uint32_t*)out; + // this example here does just a copy of input to output + memcpy(dst, src, geo.size); + } + + frei0r::construct + plugin("MyExample", "short and simple description for my example", + "Who did it", 1, 0); + + + +Communication +~~~~~~~~~~~~~~ + +You can get in touch with our developer community, send your new +effects and share your intentions with us. + +We have a free mailinglist open to subscription on [frei0r-devel] with +[public archives] that are also [searchable and indexed] online. + +For effective and indexed bug reporting regarding plugin +implementations and platform builds, here is a publicly available +[issue tracker]. + + +[frei0r-devel]: https://piksel.no/mailman/listinfo/frei0r-devel +[public archives]: http://piksel.no/pipermail/frei0r-devel/ +[searchable and indexed]: http://blog.gmane.org/gmane.comp.video.frei0r.devel +[issue tracker]: http://www.piksel.no/projects/frei0r/report + +Acknowledgments +~~~~~~~~~~~~~~~~ + + +Frei0r is the result of a collective effort in coordination with +several software developers meeting at [Piksel] between 2003 and 2005 +to find a common standard for video effect plugins to be used among +their applications: Andraz Tori (Cinelerra/CVS), Daniel Fischer +(Pakt/GStreamet), Denis Jaromil Rojo (FreeJ/Dyne), Gabriel "Salsaman" +Finch (LiVES), Kentaro Fukuchi (EffecTV), Niels Elburg (VeeJay), +Øyvind Kolås (Gegl/Babl/Gimp), Tom Schouten (PDP/PureData), Georg +Seidel, Martin Bayer and Phillip Promesberger (Gephex). + + +We first aimed at the realisation of a comprehensive specification for +dynamically loaded plugins named LiViDO, which then spawned two +implementations: one being Frei0r, a minimalistic implementation +contributed by the Gephex team and the other one being the WEED +implementation by LiVES developer Salsaman, sporting more features for +GUI integration and scriptability. + + +Within the span of a few years, the minimalistic approach of *frei0r* +has been widely adopted among more applications and became a *de-facto +standard*. Maintenance and further refinements were contributed by +Carlo Prelz (MøB/BEK), Richard Spindler (Open Movie Editor) and Dan +Dennedy (MLT/KDEnLive), while Debian/Ubuntu packaging and build system +standardization were taken care of by dyne.org developers Filippo +Giunchedi and Luca Bigliardi. + +--------------------------------------------------------------------- + + diff --git a/TODO b/TODO new file mode 100644 index 0000000..480b9cf --- /dev/null +++ b/TODO @@ -0,0 +1,112 @@ + +Frei0r TODO +~~~~~~~~~~~ + +Table of Contents +================= +Welcome hackers! +Port existing code +Bugfixes + Test suite + Null parameters +Spec Update +Documentation + Screenshots + Trac spam + + +Welcome hackers! +~~~~~~~~~~~~~~~~~ + +The Frei0r mailinglist is the first step to get in touch with us: the +one we use is [frei0r-devel] and it has [public archives] that are also +[searchable and indexed] online. + +The bugtracker we are currently using is [the Piksel trac], have a look +there and, if you know how to report a bug, please open a new issue +and give it as many details as you can. + +Here below are outlined some open issues in the development flow, they +range from /bugfixing/ tasks to /specification updates/ and +/documentation/. + + +[frei0r-devel]: https://piksel.no/mailman/listinfo/frei0r-devel +[public archives]: http://piksel.no/pipermail/frei0r-devel/ +[searchable and indexed]: http://blog.gmane.org/gmane.comp.video.frei0r.devel +[the Piksel trac]: http://www.piksel.no/projects/frei0r/report + +Port existing code +~~~~~~~~~~~~~~~~~~~ + +Porting new Effects from existing collections should be easy, for +instance there is a lot of code to be ported from [EffecTV], the [Demo Effects Collection], [Pete's plugins] and the XScreensavers… let us if +you engage the task, it can be fun and not so difficult if you are +just learning how to program in C or C++. + + +[EffecTV]: http://effectv.sf.net/ +[Demo Effects Collection]: http://demo-effects.sourceforge.net/ +[Pete's plugins]: ftp://ftp.dyne.org/freej/plugins/petespluginslinux_070114.tar.gz + +Bugfixes +~~~~~~~~~ + +We should remove from installation any plugins which casuse a crash or +data loss - and if we want them back we'd better fix them, in any case +we can't allow distribution of plugins that can potentially crash the +host. + +This is an old issue with dynamically loaded objects: if they crash, +they'll crash the host application loading them! one reason why JWZ +made XScreensavers share an X11 /back-display/... + +TODO Test suite +================ + +Develop a test suite for frei0r plugins (/scaffolding/ technique) +which can be run to generate reports on reliability. + +TODO Null parameters +===================== + +Fix plugins which do not set parameters to a default value inside +*f0r_init()* - this crashes some applications as often reported in +bugreports. + +Spec Update +~~~~~~~~~~~~ + +We sometimes need to review the Frei0r specification and confront it +with new issues coming up. It might be also useful to confront it with +the specification drafted in [LiViDO], which provides a broader +case-study, and other standards adopted in [GStreamer]. + + +[LiViDO]: http://livido.dyne.org/codedoc/ +[GStreamer]: http://gstreamer.freedesktop.org/documentation/ + +Documentation +~~~~~~~~~~~~~~ + +Screenshots +============ + +A Gallery of filters is already being generated, but not yet complete +with screenshots. Right now [FreeJ] is being used with scripts to parse +plugin contents and render them into a webpage, still what are missing +are screenshots or maybe short video renderings of plugins in action. + + +[FreeJ]: http://freej.dyne.org + +TODO Trac spam +=============== + +We should fix the trac on piksel.org, install a new bugtracker like +[flyspray] or use the mantis already up at [bugs.dyne.org]. + + +[flyspray]: http://flyspray.org +[bugs.dyne.org]: http://bugs.dyne.org + diff --git a/aclocal.m4 b/aclocal.m4 index 58b075a..b0418fa 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1,4 +1,4 @@ -# generated automatically by aclocal 1.11 -*- Autoconf -*- +# generated automatically by aclocal 1.11.1 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. @@ -13,7979 +13,14 @@ m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.64],, -[m4_warning([this file was generated for autoconf 2.64. +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.67],, +[m4_warning([this file was generated for autoconf 2.67. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically `autoreconf'.])]) -# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- -# -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008 Free Software Foundation, Inc. -# Written by Gordon Matzigkeit, 1996 -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -m4_define([_LT_COPYING], [dnl -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008 Free Software Foundation, Inc. -# Written by Gordon Matzigkeit, 1996 -# -# This file is part of GNU Libtool. -# -# GNU Libtool 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. -# -# As a special exception to the GNU General Public License, -# if you distribute this file as part of a program or library that -# is built using GNU Libtool, you may include this file under the -# same distribution terms that you use for the rest of that program. -# -# GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy -# can be downloaded from http://www.gnu.org/licenses/gpl.html, or -# obtained by writing to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -]) - -# serial 56 LT_INIT - - -# LT_PREREQ(VERSION) -# ------------------ -# Complain and exit if this libtool version is less that VERSION. -m4_defun([LT_PREREQ], -[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, - [m4_default([$3], - [m4_fatal([Libtool version $1 or higher is required], - 63)])], - [$2])]) - - -# _LT_CHECK_BUILDDIR -# ------------------ -# Complain if the absolute build directory name contains unusual characters -m4_defun([_LT_CHECK_BUILDDIR], -[case `pwd` in - *\ * | *\ *) - AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; -esac -]) - - -# LT_INIT([OPTIONS]) -# ------------------ -AC_DEFUN([LT_INIT], -[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT -AC_BEFORE([$0], [LT_LANG])dnl -AC_BEFORE([$0], [LT_OUTPUT])dnl -AC_BEFORE([$0], [LTDL_INIT])dnl -m4_require([_LT_CHECK_BUILDDIR])dnl - -dnl Autoconf doesn't catch unexpanded LT_ macros by default: -m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl -m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl -dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 -dnl unless we require an AC_DEFUNed macro: -AC_REQUIRE([LTOPTIONS_VERSION])dnl -AC_REQUIRE([LTSUGAR_VERSION])dnl -AC_REQUIRE([LTVERSION_VERSION])dnl -AC_REQUIRE([LTOBSOLETE_VERSION])dnl -m4_require([_LT_PROG_LTMAIN])dnl - -dnl Parse OPTIONS -_LT_SET_OPTIONS([$0], [$1]) - -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ltmain" - -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' -AC_SUBST(LIBTOOL)dnl - -_LT_SETUP - -# Only expand once: -m4_define([LT_INIT]) -])# LT_INIT - -# Old names: -AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) -AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_PROG_LIBTOOL], []) -dnl AC_DEFUN([AM_PROG_LIBTOOL], []) - - -# _LT_CC_BASENAME(CC) -# ------------------- -# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. -m4_defun([_LT_CC_BASENAME], -[for cc_temp in $1""; do - case $cc_temp in - compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; - distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` -]) - - -# _LT_FILEUTILS_DEFAULTS -# ---------------------- -# It is okay to use these file commands and assume they have been set -# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. -m4_defun([_LT_FILEUTILS_DEFAULTS], -[: ${CP="cp -f"} -: ${MV="mv -f"} -: ${RM="rm -f"} -])# _LT_FILEUTILS_DEFAULTS - - -# _LT_SETUP -# --------- -m4_defun([_LT_SETUP], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -_LT_DECL([], [host_alias], [0], [The host system])dnl -_LT_DECL([], [host], [0])dnl -_LT_DECL([], [host_os], [0])dnl -dnl -_LT_DECL([], [build_alias], [0], [The build system])dnl -_LT_DECL([], [build], [0])dnl -_LT_DECL([], [build_os], [0])dnl -dnl -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([LT_PATH_LD])dnl -AC_REQUIRE([LT_PATH_NM])dnl -dnl -AC_REQUIRE([AC_PROG_LN_S])dnl -test -z "$LN_S" && LN_S="ln -s" -_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl -dnl -AC_REQUIRE([LT_CMD_MAX_LEN])dnl -_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl -_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl -dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_CHECK_SHELL_FEATURES])dnl -m4_require([_LT_CMD_RELOAD])dnl -m4_require([_LT_CHECK_MAGIC_METHOD])dnl -m4_require([_LT_CMD_OLD_ARCHIVE])dnl -m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl - -_LT_CONFIG_LIBTOOL_INIT([ -# See if we are running on zsh, and set the options which allow our -# commands through without removal of \ escapes INIT. -if test -n "\${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST -fi -]) -if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST -fi - -_LT_CHECK_OBJDIR - -m4_require([_LT_TAG_COMPILER])dnl -_LT_PROG_ECHO_BACKSLASH - -case $host_os in -aix3*) - # AIX sometimes has problems with the GCC collect2 program. For some - # reason, if we set the COLLECT_NAMES environment variable, the problems - # vanish in a puff of smoke. - if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES - fi - ;; -esac - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\([["`\\]]\)/\\\1/g' - -# Sed substitution to delay expansion of an escaped shell variable in a -# double_quote_subst'ed string. -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' - -# Sed substitution to delay expansion of an escaped single quote. -delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' - -# Sed substitution to avoid accidental globbing in evaled expressions -no_glob_subst='s/\*/\\\*/g' - -# Global variables: -ofile=libtool -can_build_shared=yes - -# All known linkers require a `.a' archive for static linking (except MSVC, -# which needs '.lib'). -libext=a - -with_gnu_ld="$lt_cv_prog_gnu_ld" - -old_CC="$CC" -old_CFLAGS="$CFLAGS" - -# Set sane defaults for various variables -test -z "$CC" && CC=cc -test -z "$LTCC" && LTCC=$CC -test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS -test -z "$LD" && LD=ld -test -z "$ac_objext" && ac_objext=o - -_LT_CC_BASENAME([$compiler]) - -# Only perform the check for file, if the check method requires it -test -z "$MAGIC_CMD" && MAGIC_CMD=file -case $deplibs_check_method in -file_magic*) - if test "$file_magic_cmd" = '$MAGIC_CMD'; then - _LT_PATH_MAGIC - fi - ;; -esac - -# Use C for the default configuration in the libtool script -LT_SUPPORTED_TAG([CC]) -_LT_LANG_C_CONFIG -_LT_LANG_DEFAULT_CONFIG -_LT_CONFIG_COMMANDS -])# _LT_SETUP - - -# _LT_PROG_LTMAIN -# --------------- -# Note that this code is called both from `configure', and `config.status' -# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, -# `config.status' has no value for ac_aux_dir unless we are using Automake, -# so we pass a copy along to make sure it has a sensible value anyway. -m4_defun([_LT_PROG_LTMAIN], -[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl -_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) -ltmain="$ac_aux_dir/ltmain.sh" -])# _LT_PROG_LTMAIN - - - -# So that we can recreate a full libtool script including additional -# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS -# in macros and then make a single call at the end using the `libtool' -# label. - - -# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) -# ---------------------------------------- -# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. -m4_define([_LT_CONFIG_LIBTOOL_INIT], -[m4_ifval([$1], - [m4_append([_LT_OUTPUT_LIBTOOL_INIT], - [$1 -])])]) - -# Initialize. -m4_define([_LT_OUTPUT_LIBTOOL_INIT]) - - -# _LT_CONFIG_LIBTOOL([COMMANDS]) -# ------------------------------ -# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. -m4_define([_LT_CONFIG_LIBTOOL], -[m4_ifval([$1], - [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], - [$1 -])])]) - -# Initialize. -m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) - - -# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) -# ----------------------------------------------------- -m4_defun([_LT_CONFIG_SAVE_COMMANDS], -[_LT_CONFIG_LIBTOOL([$1]) -_LT_CONFIG_LIBTOOL_INIT([$2]) -]) - - -# _LT_FORMAT_COMMENT([COMMENT]) -# ----------------------------- -# Add leading comment marks to the start of each line, and a trailing -# full-stop to the whole comment if one is not present already. -m4_define([_LT_FORMAT_COMMENT], -[m4_ifval([$1], [ -m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], - [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) -)]) - - - - - -# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) -# ------------------------------------------------------------------- -# CONFIGNAME is the name given to the value in the libtool script. -# VARNAME is the (base) name used in the configure script. -# VALUE may be 0, 1 or 2 for a computed quote escaped value based on -# VARNAME. Any other value will be used directly. -m4_define([_LT_DECL], -[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], - [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], - [m4_ifval([$1], [$1], [$2])]) - lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) - m4_ifval([$4], - [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) - lt_dict_add_subkey([lt_decl_dict], [$2], - [tagged?], [m4_ifval([$5], [yes], [no])])]) -]) - - -# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) -# -------------------------------------------------------- -m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) - - -# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) -# ------------------------------------------------ -m4_define([lt_decl_tag_varnames], -[_lt_decl_filter([tagged?], [yes], $@)]) - - -# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) -# --------------------------------------------------------- -m4_define([_lt_decl_filter], -[m4_case([$#], - [0], [m4_fatal([$0: too few arguments: $#])], - [1], [m4_fatal([$0: too few arguments: $#: $1])], - [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], - [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], - [lt_dict_filter([lt_decl_dict], $@)])[]dnl -]) - - -# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) -# -------------------------------------------------- -m4_define([lt_decl_quote_varnames], -[_lt_decl_filter([value], [1], $@)]) - - -# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) -# --------------------------------------------------- -m4_define([lt_decl_dquote_varnames], -[_lt_decl_filter([value], [2], $@)]) - - -# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) -# --------------------------------------------------- -m4_define([lt_decl_varnames_tagged], -[m4_assert([$# <= 2])dnl -_$0(m4_quote(m4_default([$1], [[, ]])), - m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), - m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) -m4_define([_lt_decl_varnames_tagged], -[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) - - -# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) -# ------------------------------------------------ -m4_define([lt_decl_all_varnames], -[_$0(m4_quote(m4_default([$1], [[, ]])), - m4_if([$2], [], - m4_quote(lt_decl_varnames), - m4_quote(m4_shift($@))))[]dnl -]) -m4_define([_lt_decl_all_varnames], -[lt_join($@, lt_decl_varnames_tagged([$1], - lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl -]) - - -# _LT_CONFIG_STATUS_DECLARE([VARNAME]) -# ------------------------------------ -# Quote a variable value, and forward it to `config.status' so that its -# declaration there will have the same value as in `configure'. VARNAME -# must have a single quote delimited value for this to work. -m4_define([_LT_CONFIG_STATUS_DECLARE], -[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`']) - - -# _LT_CONFIG_STATUS_DECLARATIONS -# ------------------------------ -# We delimit libtool config variables with single quotes, so when -# we write them to config.status, we have to be sure to quote all -# embedded single quotes properly. In configure, this macro expands -# each variable declared with _LT_DECL (and _LT_TAGDECL) into: -# -# ='`$ECHO "X$" | $Xsed -e "$delay_single_quote_subst"`' -m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], -[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), - [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) - - -# _LT_LIBTOOL_TAGS -# ---------------- -# Output comment and list of tags supported by the script -m4_defun([_LT_LIBTOOL_TAGS], -[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl -available_tags="_LT_TAGS"dnl -]) - - -# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) -# ----------------------------------- -# Extract the dictionary values for VARNAME (optionally with TAG) and -# expand to a commented shell variable setting: -# -# # Some comment about what VAR is for. -# visible_name=$lt_internal_name -m4_define([_LT_LIBTOOL_DECLARE], -[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], - [description])))[]dnl -m4_pushdef([_libtool_name], - m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl -m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), - [0], [_libtool_name=[$]$1], - [1], [_libtool_name=$lt_[]$1], - [2], [_libtool_name=$lt_[]$1], - [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl -m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl -]) - - -# _LT_LIBTOOL_CONFIG_VARS -# ----------------------- -# Produce commented declarations of non-tagged libtool config variables -# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' -# script. Tagged libtool config variables (even for the LIBTOOL CONFIG -# section) are produced by _LT_LIBTOOL_TAG_VARS. -m4_defun([_LT_LIBTOOL_CONFIG_VARS], -[m4_foreach([_lt_var], - m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), - [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) - - -# _LT_LIBTOOL_TAG_VARS(TAG) -# ------------------------- -m4_define([_LT_LIBTOOL_TAG_VARS], -[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), - [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) - - -# _LT_TAGVAR(VARNAME, [TAGNAME]) -# ------------------------------ -m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) - - -# _LT_CONFIG_COMMANDS -# ------------------- -# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of -# variables for single and double quote escaping we saved from calls -# to _LT_DECL, we can put quote escaped variables declarations -# into `config.status', and then the shell code to quote escape them in -# for loops in `config.status'. Finally, any additional code accumulated -# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. -m4_defun([_LT_CONFIG_COMMANDS], -[AC_PROVIDE_IFELSE([LT_OUTPUT], - dnl If the libtool generation code has been placed in $CONFIG_LT, - dnl instead of duplicating it all over again into config.status, - dnl then we will have config.status run $CONFIG_LT later, so it - dnl needs to know what name is stored there: - [AC_CONFIG_COMMANDS([libtool], - [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], - dnl If the libtool generation code is destined for config.status, - dnl expand the accumulated commands and init code now: - [AC_CONFIG_COMMANDS([libtool], - [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) -])#_LT_CONFIG_COMMANDS - - -# Initialize. -m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], -[ - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -sed_quote_subst='$sed_quote_subst' -double_quote_subst='$double_quote_subst' -delay_variable_subst='$delay_variable_subst' -_LT_CONFIG_STATUS_DECLARATIONS -LTCC='$LTCC' -LTCFLAGS='$LTCFLAGS' -compiler='$compiler_DEFAULT' - -# Quote evaled strings. -for var in lt_decl_all_varnames([[ \ -]], lt_decl_quote_varnames); do - case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in - *[[\\\\\\\`\\"\\\$]]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -# Double-quote double-evaled strings. -for var in lt_decl_all_varnames([[ \ -]], lt_decl_dquote_varnames); do - case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in - *[[\\\\\\\`\\"\\\$]]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -# Fix-up fallback echo if it was mangled by the above quoting rules. -case \$lt_ECHO in -*'\\\[$]0 --fallback-echo"')dnl " - lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\` - ;; -esac - -_LT_OUTPUT_LIBTOOL_INIT -]) - - -# LT_OUTPUT -# --------- -# This macro allows early generation of the libtool script (before -# AC_OUTPUT is called), incase it is used in configure for compilation -# tests. -AC_DEFUN([LT_OUTPUT], -[: ${CONFIG_LT=./config.lt} -AC_MSG_NOTICE([creating $CONFIG_LT]) -cat >"$CONFIG_LT" <<_LTEOF -#! $SHELL -# Generated by $as_me. -# Run this file to recreate a libtool stub with the current configuration. - -lt_cl_silent=false -SHELL=\${CONFIG_SHELL-$SHELL} -_LTEOF - -cat >>"$CONFIG_LT" <<\_LTEOF -AS_SHELL_SANITIZE -_AS_PREPARE - -exec AS_MESSAGE_FD>&1 -exec AS_MESSAGE_LOG_FD>>config.log -{ - echo - AS_BOX([Running $as_me.]) -} >&AS_MESSAGE_LOG_FD - -lt_cl_help="\ -\`$as_me' creates a local libtool stub from the current configuration, -for use in further configure time tests before the real libtool is -generated. - -Usage: $[0] [[OPTIONS]] - - -h, --help print this help, then exit - -V, --version print version number, then exit - -q, --quiet do not print progress messages - -d, --debug don't remove temporary files - -Report bugs to ." - -lt_cl_version="\ -m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl -m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) -configured by $[0], generated by m4_PACKAGE_STRING. - -Copyright (C) 2008 Free Software Foundation, Inc. -This config.lt script is free software; the Free Software Foundation -gives unlimited permision to copy, distribute and modify it." - -while test $[#] != 0 -do - case $[1] in - --version | --v* | -V ) - echo "$lt_cl_version"; exit 0 ;; - --help | --h* | -h ) - echo "$lt_cl_help"; exit 0 ;; - --debug | --d* | -d ) - debug=: ;; - --quiet | --q* | --silent | --s* | -q ) - lt_cl_silent=: ;; - - -*) AC_MSG_ERROR([unrecognized option: $[1] -Try \`$[0] --help' for more information.]) ;; - - *) AC_MSG_ERROR([unrecognized argument: $[1] -Try \`$[0] --help' for more information.]) ;; - esac - shift -done - -if $lt_cl_silent; then - exec AS_MESSAGE_FD>/dev/null -fi -_LTEOF - -cat >>"$CONFIG_LT" <<_LTEOF -_LT_OUTPUT_LIBTOOL_COMMANDS_INIT -_LTEOF - -cat >>"$CONFIG_LT" <<\_LTEOF -AC_MSG_NOTICE([creating $ofile]) -_LT_OUTPUT_LIBTOOL_COMMANDS -AS_EXIT(0) -_LTEOF -chmod +x "$CONFIG_LT" - -# configure is writing to config.log, but config.lt does its own redirection, -# appending to config.log, which fails on DOS, as config.log is still kept -# open by configure. Here we exec the FD to /dev/null, effectively closing -# config.log, so it can be properly (re)opened and appended to by config.lt. -if test "$no_create" != yes; then - lt_cl_success=: - test "$silent" = yes && - lt_config_lt_args="$lt_config_lt_args --quiet" - exec AS_MESSAGE_LOG_FD>/dev/null - $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false - exec AS_MESSAGE_LOG_FD>>config.log - $lt_cl_success || AS_EXIT(1) -fi -])# LT_OUTPUT - - -# _LT_CONFIG(TAG) -# --------------- -# If TAG is the built-in tag, create an initial libtool script with a -# default configuration from the untagged config vars. Otherwise add code -# to config.status for appending the configuration named by TAG from the -# matching tagged config vars. -m4_defun([_LT_CONFIG], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -_LT_CONFIG_SAVE_COMMANDS([ - m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl - m4_if(_LT_TAG, [C], [ - # See if we are running on zsh, and set the options which allow our - # commands through without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST - fi - - cfgfile="${ofile}T" - trap "$RM \"$cfgfile\"; exit 1" 1 2 15 - $RM "$cfgfile" - - cat <<_LT_EOF >> "$cfgfile" -#! $SHELL - -# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. -# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -# NOTE: Changes made to this file will be lost: look at ltmain.sh. -# -_LT_COPYING -_LT_LIBTOOL_TAGS - -# ### BEGIN LIBTOOL CONFIG -_LT_LIBTOOL_CONFIG_VARS -_LT_LIBTOOL_TAG_VARS -# ### END LIBTOOL CONFIG - -_LT_EOF - - case $host_os in - aix3*) - cat <<\_LT_EOF >> "$cfgfile" -# AIX sometimes has problems with the GCC collect2 program. For some -# reason, if we set the COLLECT_NAMES environment variable, the problems -# vanish in a puff of smoke. -if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES -fi -_LT_EOF - ;; - esac - - _LT_PROG_LTMAIN - - # We use sed instead of cat because bash on DJGPP gets confused if - # if finds mixed CR/LF and LF-only lines. Since sed operates in - # text mode, it properly converts lines to CR/LF. This bash problem - # is reportedly fixed, but why not run on old versions too? - sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - _LT_PROG_XSI_SHELLFNS - - sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - mv -f "$cfgfile" "$ofile" || - (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") - chmod +x "$ofile" -], -[cat <<_LT_EOF >> "$ofile" - -dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded -dnl in a comment (ie after a #). -# ### BEGIN LIBTOOL TAG CONFIG: $1 -_LT_LIBTOOL_TAG_VARS(_LT_TAG) -# ### END LIBTOOL TAG CONFIG: $1 -_LT_EOF -])dnl /m4_if -], -[m4_if([$1], [], [ - PACKAGE='$PACKAGE' - VERSION='$VERSION' - TIMESTAMP='$TIMESTAMP' - RM='$RM' - ofile='$ofile'], []) -])dnl /_LT_CONFIG_SAVE_COMMANDS -])# _LT_CONFIG - - -# LT_SUPPORTED_TAG(TAG) -# --------------------- -# Trace this macro to discover what tags are supported by the libtool -# --tag option, using: -# autoconf --trace 'LT_SUPPORTED_TAG:$1' -AC_DEFUN([LT_SUPPORTED_TAG], []) - - -# C support is built-in for now -m4_define([_LT_LANG_C_enabled], []) -m4_define([_LT_TAGS], []) - - -# LT_LANG(LANG) -# ------------- -# Enable libtool support for the given language if not already enabled. -AC_DEFUN([LT_LANG], -[AC_BEFORE([$0], [LT_OUTPUT])dnl -m4_case([$1], - [C], [_LT_LANG(C)], - [C++], [_LT_LANG(CXX)], - [Java], [_LT_LANG(GCJ)], - [Fortran 77], [_LT_LANG(F77)], - [Fortran], [_LT_LANG(FC)], - [Windows Resource], [_LT_LANG(RC)], - [m4_ifdef([_LT_LANG_]$1[_CONFIG], - [_LT_LANG($1)], - [m4_fatal([$0: unsupported language: "$1"])])])dnl -])# LT_LANG - - -# _LT_LANG(LANGNAME) -# ------------------ -m4_defun([_LT_LANG], -[m4_ifdef([_LT_LANG_]$1[_enabled], [], - [LT_SUPPORTED_TAG([$1])dnl - m4_append([_LT_TAGS], [$1 ])dnl - m4_define([_LT_LANG_]$1[_enabled], [])dnl - _LT_LANG_$1_CONFIG($1)])dnl -])# _LT_LANG - - -# _LT_LANG_DEFAULT_CONFIG -# ----------------------- -m4_defun([_LT_LANG_DEFAULT_CONFIG], -[AC_PROVIDE_IFELSE([AC_PROG_CXX], - [LT_LANG(CXX)], - [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) - -AC_PROVIDE_IFELSE([AC_PROG_F77], - [LT_LANG(F77)], - [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) - -AC_PROVIDE_IFELSE([AC_PROG_FC], - [LT_LANG(FC)], - [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) - -dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal -dnl pulling things in needlessly. -AC_PROVIDE_IFELSE([AC_PROG_GCJ], - [LT_LANG(GCJ)], - [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], - [LT_LANG(GCJ)], - [AC_PROVIDE_IFELSE([LT_PROG_GCJ], - [LT_LANG(GCJ)], - [m4_ifdef([AC_PROG_GCJ], - [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) - m4_ifdef([A][M_PROG_GCJ], - [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) - m4_ifdef([LT_PROG_GCJ], - [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) - -AC_PROVIDE_IFELSE([LT_PROG_RC], - [LT_LANG(RC)], - [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) -])# _LT_LANG_DEFAULT_CONFIG - -# Obsolete macros: -AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) -AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) -AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) -AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_CXX], []) -dnl AC_DEFUN([AC_LIBTOOL_F77], []) -dnl AC_DEFUN([AC_LIBTOOL_FC], []) -dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) - - -# _LT_TAG_COMPILER -# ---------------- -m4_defun([_LT_TAG_COMPILER], -[AC_REQUIRE([AC_PROG_CC])dnl - -_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl -_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl -_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl -_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC -])# _LT_TAG_COMPILER - - -# _LT_COMPILER_BOILERPLATE -# ------------------------ -# Check for compiler boilerplate output or warnings with -# the simple compiler test code. -m4_defun([_LT_COMPILER_BOILERPLATE], -[m4_require([_LT_DECL_SED])dnl -ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$RM conftest* -])# _LT_COMPILER_BOILERPLATE - - -# _LT_LINKER_BOILERPLATE -# ---------------------- -# Check for linker boilerplate output or warnings with -# the simple link test code. -m4_defun([_LT_LINKER_BOILERPLATE], -[m4_require([_LT_DECL_SED])dnl -ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$RM -r conftest* -])# _LT_LINKER_BOILERPLATE - -# _LT_REQUIRED_DARWIN_CHECKS -# ------------------------- -m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ - case $host_os in - rhapsody* | darwin*) - AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) - AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) - AC_CHECK_TOOL([LIPO], [lipo], [:]) - AC_CHECK_TOOL([OTOOL], [otool], [:]) - AC_CHECK_TOOL([OTOOL64], [otool64], [:]) - _LT_DECL([], [DSYMUTIL], [1], - [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) - _LT_DECL([], [NMEDIT], [1], - [Tool to change global to local symbols on Mac OS X]) - _LT_DECL([], [LIPO], [1], - [Tool to manipulate fat objects and archives on Mac OS X]) - _LT_DECL([], [OTOOL], [1], - [ldd/readelf like tool for Mach-O binaries on Mac OS X]) - _LT_DECL([], [OTOOL64], [1], - [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) - - AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], - [lt_cv_apple_cc_single_mod=no - if test -z "${LT_MULTI_MODULE}"; then - # By default we will add the -single_module flag. You can override - # by either setting the environment variable LT_MULTI_MODULE - # non-empty at configure time, or by adding -multi_module to the - # link flags. - rm -rf libconftest.dylib* - echo "int foo(void){return 1;}" > conftest.c - echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ --dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD - $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ - -dynamiclib -Wl,-single_module conftest.c 2>conftest.err - _lt_result=$? - if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then - lt_cv_apple_cc_single_mod=yes - else - cat conftest.err >&AS_MESSAGE_LOG_FD - fi - rm -rf libconftest.dylib* - rm -f conftest.* - fi]) - AC_CACHE_CHECK([for -exported_symbols_list linker flag], - [lt_cv_ld_exported_symbols_list], - [lt_cv_ld_exported_symbols_list=no - save_LDFLAGS=$LDFLAGS - echo "_main" > conftest.sym - LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" - AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], - [lt_cv_ld_exported_symbols_list=yes], - [lt_cv_ld_exported_symbols_list=no]) - LDFLAGS="$save_LDFLAGS" - ]) - case $host_os in - rhapsody* | darwin1.[[012]]) - _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; - darwin1.*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - darwin*) # darwin 5.x on - # if running on 10.5 or later, the deployment target defaults - # to the OS version, if on x86, and 10.4, the deployment - # target defaults to 10.4. Don't you love it? - case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in - 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - 10.[[012]]*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - 10.*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - esac - ;; - esac - if test "$lt_cv_apple_cc_single_mod" = "yes"; then - _lt_dar_single_mod='$single_module' - fi - if test "$lt_cv_ld_exported_symbols_list" = "yes"; then - _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' - else - _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' - fi - if test "$DSYMUTIL" != ":"; then - _lt_dsymutil='~$DSYMUTIL $lib || :' - else - _lt_dsymutil= - fi - ;; - esac -]) - - -# _LT_DARWIN_LINKER_FEATURES -# -------------------------- -# Checks for linker and compiler features on darwin -m4_defun([_LT_DARWIN_LINKER_FEATURES], -[ - m4_require([_LT_REQUIRED_DARWIN_CHECKS]) - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_automatic, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - _LT_TAGVAR(whole_archive_flag_spec, $1)='' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" - case $cc_basename in - ifort*) _lt_dar_can_shared=yes ;; - *) _lt_dar_can_shared=$GCC ;; - esac - if test "$_lt_dar_can_shared" = "yes"; then - output_verbose_link_cmd=echo - _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" - _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" - _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" - _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" - m4_if([$1], [CXX], -[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then - _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" - _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" - fi -],[]) - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi -]) - -# _LT_SYS_MODULE_PATH_AIX -# ----------------------- -# Links a minimal program and checks the executable -# for the system default hardcoded library path. In most cases, -# this is /usr/lib:/lib, but when the MPI compilers are used -# the location of the communication and MPI libs are included too. -# If we don't find anything, use the default library path according -# to the aix ld manual. -m4_defun([_LT_SYS_MODULE_PATH_AIX], -[m4_require([_LT_DECL_SED])dnl -AC_LINK_IFELSE(AC_LANG_PROGRAM,[ -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi],[]) -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi -])# _LT_SYS_MODULE_PATH_AIX - - -# _LT_SHELL_INIT(ARG) -# ------------------- -m4_define([_LT_SHELL_INIT], -[ifdef([AC_DIVERSION_NOTICE], - [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], - [AC_DIVERT_PUSH(NOTICE)]) -$1 -AC_DIVERT_POP -])# _LT_SHELL_INIT - - -# _LT_PROG_ECHO_BACKSLASH -# ----------------------- -# Add some code to the start of the generated configure script which -# will find an echo command which doesn't interpret backslashes. -m4_defun([_LT_PROG_ECHO_BACKSLASH], -[_LT_SHELL_INIT([ -# Check that we are running under the correct shell. -SHELL=${CONFIG_SHELL-/bin/sh} - -case X$lt_ECHO in -X*--fallback-echo) - # Remove one level of quotation (which was required for Make). - ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` - ;; -esac - -ECHO=${lt_ECHO-echo} -if test "X[$]1" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift -elif test "X[$]1" = X--fallback-echo; then - # Avoid inline document here, it may be left over - : -elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then - # Yippee, $ECHO works! - : -else - # Restart under the correct shell. - exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} -fi - -if test "X[$]1" = X--fallback-echo; then - # used as fallback echo - shift - cat <<_LT_EOF -[$]* -_LT_EOF - exit 0 -fi - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -if test -z "$lt_ECHO"; then - if test "X${echo_test_string+set}" != Xset; then - # find a string as large as possible, as long as the shell can cope with it - for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do - # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... - if { echo_test_string=`eval $cmd`; } 2>/dev/null && - { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null - then - break - fi - done - fi - - if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - : - else - # The Solaris, AIX, and Digital Unix default echo programs unquote - # backslashes. This makes it impossible to quote backslashes using - # echo "$something" | sed 's/\\/\\\\/g' - # - # So, first we look for a working echo in the user's PATH. - - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for dir in $PATH /usr/ucb; do - IFS="$lt_save_ifs" - if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && - test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - ECHO="$dir/echo" - break - fi - done - IFS="$lt_save_ifs" - - if test "X$ECHO" = Xecho; then - # We didn't find a better echo, so look for alternatives. - if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - # This shell has a builtin print -r that does the trick. - ECHO='print -r' - elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } && - test "X$CONFIG_SHELL" != X/bin/ksh; then - # If we have ksh, try running configure again with it. - ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} - export ORIGINAL_CONFIG_SHELL - CONFIG_SHELL=/bin/ksh - export CONFIG_SHELL - exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} - else - # Try using printf. - ECHO='printf %s\n' - if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - # Cool, printf works - : - elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL - export CONFIG_SHELL - SHELL="$CONFIG_SHELL" - export SHELL - ECHO="$CONFIG_SHELL [$]0 --fallback-echo" - elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - ECHO="$CONFIG_SHELL [$]0 --fallback-echo" - else - # maybe with a smaller string... - prev=: - - for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do - if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null - then - break - fi - prev="$cmd" - done - - if test "$prev" != 'sed 50q "[$]0"'; then - echo_test_string=`eval $prev` - export echo_test_string - exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} - else - # Oops. We lost completely, so just stick with echo. - ECHO=echo - fi - fi - fi - fi - fi -fi - -# Copy echo and quote the copy suitably for passing to libtool from -# the Makefile, instead of quoting the original, which is used later. -lt_ECHO=$ECHO -if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then - lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" -fi - -AC_SUBST(lt_ECHO) -]) -_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) -_LT_DECL([], [ECHO], [1], - [An echo program that does not interpret backslashes]) -])# _LT_PROG_ECHO_BACKSLASH - - -# _LT_ENABLE_LOCK -# --------------- -m4_defun([_LT_ENABLE_LOCK], -[AC_ARG_ENABLE([libtool-lock], - [AS_HELP_STRING([--disable-libtool-lock], - [avoid locking (might break parallel builds)])]) -test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes - -# Some flags need to be propagated to the compiler or linker for good -# libtool support. -case $host in -ia64-*-hpux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.$ac_objext` in - *ELF-32*) - HPUX_IA64_MODE="32" - ;; - *ELF-64*) - HPUX_IA64_MODE="64" - ;; - esac - fi - rm -rf conftest* - ;; -*-*-irix6*) - # Find out which ABI we are using. - echo '[#]line __oline__ "configure"' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - if test "$lt_cv_prog_gnu_ld" = yes; then - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -melf32bsmip" - ;; - *N32*) - LD="${LD-ld} -melf32bmipn32" - ;; - *64-bit*) - LD="${LD-ld} -melf64bmip" - ;; - esac - else - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -32" - ;; - *N32*) - LD="${LD-ld} -n32" - ;; - *64-bit*) - LD="${LD-ld} -64" - ;; - esac - fi - fi - rm -rf conftest* - ;; - -x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ -s390*-*linux*|s390*-*tpf*|sparc*-*linux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.o` in - *32-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_i386_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_i386" - ;; - ppc64-*linux*|powerpc64-*linux*) - LD="${LD-ld} -m elf32ppclinux" - ;; - s390x-*linux*) - LD="${LD-ld} -m elf_s390" - ;; - sparc64-*linux*) - LD="${LD-ld} -m elf32_sparc" - ;; - esac - ;; - *64-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_x86_64_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_x86_64" - ;; - ppc*-*linux*|powerpc*-*linux*) - LD="${LD-ld} -m elf64ppc" - ;; - s390*-*linux*|s390*-*tpf*) - LD="${LD-ld} -m elf64_s390" - ;; - sparc*-*linux*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; - -*-*-sco3.2v5*) - # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -belf" - AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, - [AC_LANG_PUSH(C) - AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) - AC_LANG_POP]) - if test x"$lt_cv_cc_needs_belf" != x"yes"; then - # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS="$SAVE_CFLAGS" - fi - ;; -sparc*-*solaris*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.o` in - *64-bit*) - case $lt_cv_prog_gnu_ld in - yes*) LD="${LD-ld} -m elf64_sparc" ;; - *) - if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then - LD="${LD-ld} -64" - fi - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; -esac - -need_locks="$enable_libtool_lock" -])# _LT_ENABLE_LOCK - - -# _LT_CMD_OLD_ARCHIVE -# ------------------- -m4_defun([_LT_CMD_OLD_ARCHIVE], -[AC_CHECK_TOOL(AR, ar, false) -test -z "$AR" && AR=ar -test -z "$AR_FLAGS" && AR_FLAGS=cru -_LT_DECL([], [AR], [1], [The archiver]) -_LT_DECL([], [AR_FLAGS], [1]) - -AC_CHECK_TOOL(STRIP, strip, :) -test -z "$STRIP" && STRIP=: -_LT_DECL([], [STRIP], [1], [A symbol stripping program]) - -AC_CHECK_TOOL(RANLIB, ranlib, :) -test -z "$RANLIB" && RANLIB=: -_LT_DECL([], [RANLIB], [1], - [Commands used to install an old-style archive]) - -# Determine commands to create old-style static archives. -old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' -old_postinstall_cmds='chmod 644 $oldlib' -old_postuninstall_cmds= - -if test -n "$RANLIB"; then - case $host_os in - openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" - ;; - *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" - ;; - esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" -fi -_LT_DECL([], [old_postinstall_cmds], [2]) -_LT_DECL([], [old_postuninstall_cmds], [2]) -_LT_TAGDECL([], [old_archive_cmds], [2], - [Commands used to build an old-style archive]) -])# _LT_CMD_OLD_ARCHIVE - - -# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, -# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) -# ---------------------------------------------------------------- -# Check whether the given compiler option works -AC_DEFUN([_LT_COMPILER_OPTION], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_SED])dnl -AC_CACHE_CHECK([$1], [$2], - [$2=no - m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$3" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&AS_MESSAGE_LOG_FD - echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - $2=yes - fi - fi - $RM conftest* -]) - -if test x"[$]$2" = xyes; then - m4_if([$5], , :, [$5]) -else - m4_if([$6], , :, [$6]) -fi -])# _LT_COMPILER_OPTION - -# Old name: -AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) - - -# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, -# [ACTION-SUCCESS], [ACTION-FAILURE]) -# ---------------------------------------------------- -# Check whether the given linker option works -AC_DEFUN([_LT_LINKER_OPTION], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_SED])dnl -AC_CACHE_CHECK([$1], [$2], - [$2=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $3" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&AS_MESSAGE_LOG_FD - $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - $2=yes - fi - else - $2=yes - fi - fi - $RM -r conftest* - LDFLAGS="$save_LDFLAGS" -]) - -if test x"[$]$2" = xyes; then - m4_if([$4], , :, [$4]) -else - m4_if([$5], , :, [$5]) -fi -])# _LT_LINKER_OPTION - -# Old name: -AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) - - -# LT_CMD_MAX_LEN -#--------------- -AC_DEFUN([LT_CMD_MAX_LEN], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -# find the maximum length of command line arguments -AC_MSG_CHECKING([the maximum length of command line arguments]) -AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl - i=0 - teststring="ABCD" - - case $build_os in - msdosdjgpp*) - # On DJGPP, this test can blow up pretty badly due to problems in libc - # (any single argument exceeding 2000 bytes causes a buffer overrun - # during glob expansion). Even if it were fixed, the result of this - # check would be larger than it should be. - lt_cv_sys_max_cmd_len=12288; # 12K is about right - ;; - - gnu*) - # Under GNU Hurd, this test is not required because there is - # no limit to the length of command line arguments. - # Libtool will interpret -1 as no limit whatsoever - lt_cv_sys_max_cmd_len=-1; - ;; - - cygwin* | mingw* | cegcc*) - # On Win9x/ME, this test blows up -- it succeeds, but takes - # about 5 minutes as the teststring grows exponentially. - # Worse, since 9x/ME are not pre-emptively multitasking, - # you end up with a "frozen" computer, even though with patience - # the test eventually succeeds (with a max line length of 256k). - # Instead, let's just punt: use the minimum linelength reported by - # all of the supported platforms: 8192 (on NT/2K/XP). - lt_cv_sys_max_cmd_len=8192; - ;; - - amigaos*) - # On AmigaOS with pdksh, this test takes hours, literally. - # So we just punt and use a minimum line length of 8192. - lt_cv_sys_max_cmd_len=8192; - ;; - - netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) - # This has been around since 386BSD, at least. Likely further. - if test -x /sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` - elif test -x /usr/sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` - else - lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs - fi - # And add a safety zone - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - ;; - - interix*) - # We know the value 262144 and hardcode it with a safety zone (like BSD) - lt_cv_sys_max_cmd_len=196608 - ;; - - osf*) - # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure - # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not - # nice to cause kernel panics so lets avoid the loop below. - # First set a reasonable default. - lt_cv_sys_max_cmd_len=16384 - # - if test -x /sbin/sysconfig; then - case `/sbin/sysconfig -q proc exec_disable_arg_limit` in - *1*) lt_cv_sys_max_cmd_len=-1 ;; - esac - fi - ;; - sco3.2v5*) - lt_cv_sys_max_cmd_len=102400 - ;; - sysv5* | sco5v6* | sysv4.2uw2*) - kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` - if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` - else - lt_cv_sys_max_cmd_len=32768 - fi - ;; - *) - lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` - if test -n "$lt_cv_sys_max_cmd_len"; then - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - else - # Make teststring a little bigger before we do anything with it. - # a 1K string should be a reasonable start. - for i in 1 2 3 4 5 6 7 8 ; do - teststring=$teststring$teststring - done - SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} - # If test is not a shell built-in, we'll probably end up computing a - # maximum length that is only half of the actual maximum length, but - # we can't tell. - while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ - = "XX$teststring$teststring"; } >/dev/null 2>&1 && - test $i != 17 # 1/2 MB should be enough - do - i=`expr $i + 1` - teststring=$teststring$teststring - done - # Only check the string length outside the loop. - lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` - teststring= - # Add a significant safety factor because C++ compilers can tack on - # massive amounts of additional arguments before passing them to the - # linker. It appears as though 1/2 is a usable value. - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` - fi - ;; - esac -]) -if test -n $lt_cv_sys_max_cmd_len ; then - AC_MSG_RESULT($lt_cv_sys_max_cmd_len) -else - AC_MSG_RESULT(none) -fi -max_cmd_len=$lt_cv_sys_max_cmd_len -_LT_DECL([], [max_cmd_len], [0], - [What is the maximum length of a command?]) -])# LT_CMD_MAX_LEN - -# Old name: -AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) - - -# _LT_HEADER_DLFCN -# ---------------- -m4_defun([_LT_HEADER_DLFCN], -[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl -])# _LT_HEADER_DLFCN - - -# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, -# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) -# ---------------------------------------------------------------- -m4_defun([_LT_TRY_DLOPEN_SELF], -[m4_require([_LT_HEADER_DLFCN])dnl -if test "$cross_compiling" = yes; then : - [$4] -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF -[#line __oline__ "configure" -#include "confdefs.h" - -#if HAVE_DLFCN_H -#include -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -void fnord() { int i=42;} -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - /* dlclose (self); */ - } - else - puts (dlerror ()); - - return status; -}] -_LT_EOF - if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) $1 ;; - x$lt_dlneed_uscore) $2 ;; - x$lt_dlunknown|x*) $3 ;; - esac - else : - # compilation failed - $3 - fi -fi -rm -fr conftest* -])# _LT_TRY_DLOPEN_SELF - - -# LT_SYS_DLOPEN_SELF -# ------------------ -AC_DEFUN([LT_SYS_DLOPEN_SELF], -[m4_require([_LT_HEADER_DLFCN])dnl -if test "x$enable_dlopen" != xyes; then - enable_dlopen=unknown - enable_dlopen_self=unknown - enable_dlopen_self_static=unknown -else - lt_cv_dlopen=no - lt_cv_dlopen_libs= - - case $host_os in - beos*) - lt_cv_dlopen="load_add_on" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ;; - - mingw* | pw32* | cegcc*) - lt_cv_dlopen="LoadLibrary" - lt_cv_dlopen_libs= - ;; - - cygwin*) - lt_cv_dlopen="dlopen" - lt_cv_dlopen_libs= - ;; - - darwin*) - # if libdl is installed we need to link against it - AC_CHECK_LIB([dl], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ - lt_cv_dlopen="dyld" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ]) - ;; - - *) - AC_CHECK_FUNC([shl_load], - [lt_cv_dlopen="shl_load"], - [AC_CHECK_LIB([dld], [shl_load], - [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], - [AC_CHECK_FUNC([dlopen], - [lt_cv_dlopen="dlopen"], - [AC_CHECK_LIB([dl], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], - [AC_CHECK_LIB([svld], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], - [AC_CHECK_LIB([dld], [dld_link], - [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) - ]) - ]) - ]) - ]) - ]) - ;; - esac - - if test "x$lt_cv_dlopen" != xno; then - enable_dlopen=yes - else - enable_dlopen=no - fi - - case $lt_cv_dlopen in - dlopen) - save_CPPFLAGS="$CPPFLAGS" - test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - - save_LDFLAGS="$LDFLAGS" - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - - save_LIBS="$LIBS" - LIBS="$lt_cv_dlopen_libs $LIBS" - - AC_CACHE_CHECK([whether a program can dlopen itself], - lt_cv_dlopen_self, [dnl - _LT_TRY_DLOPEN_SELF( - lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, - lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) - ]) - - if test "x$lt_cv_dlopen_self" = xyes; then - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" - AC_CACHE_CHECK([whether a statically linked program can dlopen itself], - lt_cv_dlopen_self_static, [dnl - _LT_TRY_DLOPEN_SELF( - lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, - lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) - ]) - fi - - CPPFLAGS="$save_CPPFLAGS" - LDFLAGS="$save_LDFLAGS" - LIBS="$save_LIBS" - ;; - esac - - case $lt_cv_dlopen_self in - yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; - *) enable_dlopen_self=unknown ;; - esac - - case $lt_cv_dlopen_self_static in - yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; - *) enable_dlopen_self_static=unknown ;; - esac -fi -_LT_DECL([dlopen_support], [enable_dlopen], [0], - [Whether dlopen is supported]) -_LT_DECL([dlopen_self], [enable_dlopen_self], [0], - [Whether dlopen of programs is supported]) -_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], - [Whether dlopen of statically linked programs is supported]) -])# LT_SYS_DLOPEN_SELF - -# Old name: -AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) - - -# _LT_COMPILER_C_O([TAGNAME]) -# --------------------------- -# Check to see if options -c and -o are simultaneously supported by compiler. -# This macro does not hard code the compiler like AC_PROG_CC_C_O. -m4_defun([_LT_COMPILER_C_O], -[m4_require([_LT_DECL_SED])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_TAG_COMPILER])dnl -AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], - [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], - [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&AS_MESSAGE_LOG_FD - echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes - fi - fi - chmod u+w . 2>&AS_MESSAGE_LOG_FD - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* -]) -_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], - [Does compiler simultaneously support -c and -o options?]) -])# _LT_COMPILER_C_O - - -# _LT_COMPILER_FILE_LOCKS([TAGNAME]) -# ---------------------------------- -# Check to see if we can do hard links to lock some files if needed -m4_defun([_LT_COMPILER_FILE_LOCKS], -[m4_require([_LT_ENABLE_LOCK])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -_LT_COMPILER_C_O([$1]) - -hard_links="nottested" -if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - AC_MSG_CHECKING([if we can lock with hard links]) - hard_links=yes - $RM conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - AC_MSG_RESULT([$hard_links]) - if test "$hard_links" = no; then - AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) - need_locks=warn - fi -else - need_locks=no -fi -_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) -])# _LT_COMPILER_FILE_LOCKS - - -# _LT_CHECK_OBJDIR -# ---------------- -m4_defun([_LT_CHECK_OBJDIR], -[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], -[rm -f .libs 2>/dev/null -mkdir .libs 2>/dev/null -if test -d .libs; then - lt_cv_objdir=.libs -else - # MS-DOS does not allow filenames that begin with a dot. - lt_cv_objdir=_libs -fi -rmdir .libs 2>/dev/null]) -objdir=$lt_cv_objdir -_LT_DECL([], [objdir], [0], - [The name of the directory that contains temporary libtool files])dnl -m4_pattern_allow([LT_OBJDIR])dnl -AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", - [Define to the sub-directory in which libtool stores uninstalled libraries.]) -])# _LT_CHECK_OBJDIR - - -# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) -# -------------------------------------- -# Check hardcoding attributes. -m4_defun([_LT_LINKER_HARDCODE_LIBPATH], -[AC_MSG_CHECKING([how to hardcode library paths into programs]) -_LT_TAGVAR(hardcode_action, $1)= -if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || - test -n "$_LT_TAGVAR(runpath_var, $1)" || - test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then - - # We can hardcode non-existent directories. - if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && - test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then - # Linking always hardcodes the temporary library directory. - _LT_TAGVAR(hardcode_action, $1)=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - _LT_TAGVAR(hardcode_action, $1)=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - _LT_TAGVAR(hardcode_action, $1)=unsupported -fi -AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) - -if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || - test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless -fi -_LT_TAGDECL([], [hardcode_action], [0], - [How to hardcode a shared library path into an executable]) -])# _LT_LINKER_HARDCODE_LIBPATH - - -# _LT_CMD_STRIPLIB -# ---------------- -m4_defun([_LT_CMD_STRIPLIB], -[m4_require([_LT_DECL_EGREP]) -striplib= -old_striplib= -AC_MSG_CHECKING([whether stripping libraries is possible]) -if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - AC_MSG_RESULT([yes]) -else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP" ; then - striplib="$STRIP -x" - old_striplib="$STRIP -S" - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - fi - ;; - *) - AC_MSG_RESULT([no]) - ;; - esac -fi -_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) -_LT_DECL([], [striplib], [1]) -])# _LT_CMD_STRIPLIB - - -# _LT_SYS_DYNAMIC_LINKER([TAG]) -# ----------------------------- -# PORTME Fill in your ld.so characteristics -m4_defun([_LT_SYS_DYNAMIC_LINKER], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_OBJDUMP])dnl -m4_require([_LT_DECL_SED])dnl -AC_MSG_CHECKING([dynamic linker characteristics]) -m4_if([$1], - [], [ -if test "$GCC" = yes; then - case $host_os in - darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; - *) lt_awk_arg="/^libraries:/" ;; - esac - lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then - # if the path contains ";" then we assume it to be the separator - # otherwise default to the standard path separator (i.e. ":") - it is - # assumed that no part of a normal pathname contains ";" but that should - # okay in the real world where ";" in dirpaths is itself problematic. - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'` - else - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - # Ok, now we have the path, separated by spaces, we can step through it - # and add multilib dir if necessary. - lt_tmp_lt_search_path_spec= - lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` - for lt_sys_path in $lt_search_path_spec; do - if test -d "$lt_sys_path/$lt_multi_os_dir"; then - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" - else - test -d "$lt_sys_path" && \ - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" - fi - done - lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk ' -BEGIN {RS=" "; FS="/|\n";} { - lt_foo=""; - lt_count=0; - for (lt_i = NF; lt_i > 0; lt_i--) { - if ($lt_i != "" && $lt_i != ".") { - if ($lt_i == "..") { - lt_count++; - } else { - if (lt_count == 0) { - lt_foo="/" $lt_i lt_foo; - } else { - lt_count--; - } - } - } - } - if (lt_foo != "") { lt_freq[[lt_foo]]++; } - if (lt_freq[[lt_foo]] == 1) { print lt_foo; } -}'` - sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` -else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -fi]) -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=".so" -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown - -case $host_os in -aix3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' - ;; - -aix[[4-9]]*) - version_type=linux - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test "$host_cpu" = ia64; then - # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[[01]] | aix4.[[01]].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - case $host_cpu in - powerpc) - # Since July 2007 AmigaOS4 officially supports .so libraries. - # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - ;; - m68k) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; - esac - ;; - -beos*) - library_names_spec='${libname}${shared_ext}' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[[45]]*) - version_type=linux - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32* | cegcc*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no - - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" - ;; - mingw* | cegcc*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then - # It is most probably a Windows format PATH printed by - # mingw gcc, but we are running on Cygwin. Gcc prints its search - # path with ; separators, and with drive letters. We can handle the - # drive letters (cygwin fileutils understands them), so leave them, - # especially as we might pass files found there to a mingw objdump, - # which wouldn't understand a cygwinified path. Ahh. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - ;; - esac - ;; - - *) - library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' - ;; - esac - dynamic_linker='Win32 ld.exe' - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' -m4_if([$1], [],[ - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -freebsd1*) - dynamic_linker=no - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[[123]]*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[[01]]* | freebsdelf3.[[01]]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ - freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -gnu*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555. - postinstall_cmds='chmod 555 $lib' - ;; - -interix[[3-9]]*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -# This must be Linux ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - # Some binutils ld are patched to set DT_RUNPATH - save_LDFLAGS=$LDFLAGS - save_libdir=$libdir - eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ - LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" - AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], - [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], - [shlibpath_overrides_runpath=yes])]) - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir - - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -netbsdelf*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='NetBSD ld.elf_so' - ;; - -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -*nto* | *qnx*) - version_type=qnx - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='ldqnx.so' - ;; - -openbsd*) - version_type=sunos - sys_lib_dlsearch_path_spec="/usr/lib" - need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[[89]] | openbsd2.[[89]].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac - else - shlibpath_overrides_runpath=yes - fi - ;; - -os2*) - libname_spec='$name' - shrext_cmds=".dll" - need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" - ;; - -rdos*) - dynamic_linker=no - ;; - -solaris*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - if test -d /usr/nec ;then - version_type=linux - library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' - soname_spec='$libname${shared_ext}.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -tpf*) - # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -uts4*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -*) - dynamic_linker=no - ;; -esac -AC_MSG_RESULT([$dynamic_linker]) -test "$dynamic_linker" = no && can_build_shared=no - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - -if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then - sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" -fi -if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then - sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" -fi - -_LT_DECL([], [variables_saved_for_relink], [1], - [Variables whose values should be saved in libtool wrapper scripts and - restored at link time]) -_LT_DECL([], [need_lib_prefix], [0], - [Do we need the "lib" prefix for modules?]) -_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) -_LT_DECL([], [version_type], [0], [Library versioning type]) -_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) -_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) -_LT_DECL([], [shlibpath_overrides_runpath], [0], - [Is shlibpath searched before the hard-coded library search path?]) -_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) -_LT_DECL([], [library_names_spec], [1], - [[List of archive names. First name is the real one, the rest are links. - The last name is the one that the linker finds with -lNAME]]) -_LT_DECL([], [soname_spec], [1], - [[The coded name of the library, if different from the real name]]) -_LT_DECL([], [postinstall_cmds], [2], - [Command to use after installation of a shared archive]) -_LT_DECL([], [postuninstall_cmds], [2], - [Command to use after uninstallation of a shared archive]) -_LT_DECL([], [finish_cmds], [2], - [Commands used to finish a libtool library installation in a directory]) -_LT_DECL([], [finish_eval], [1], - [[As "finish_cmds", except a single script fragment to be evaled but - not shown]]) -_LT_DECL([], [hardcode_into_libs], [0], - [Whether we should hardcode library paths into libraries]) -_LT_DECL([], [sys_lib_search_path_spec], [2], - [Compile-time system search path for libraries]) -_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], - [Run-time system search path for libraries]) -])# _LT_SYS_DYNAMIC_LINKER - - -# _LT_PATH_TOOL_PREFIX(TOOL) -# -------------------------- -# find a file program which can recognize shared library -AC_DEFUN([_LT_PATH_TOOL_PREFIX], -[m4_require([_LT_DECL_EGREP])dnl -AC_MSG_CHECKING([for $1]) -AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, -[case $MAGIC_CMD in -[[\\/*] | ?:[\\/]*]) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD="$MAGIC_CMD" - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR -dnl $ac_dummy forces splitting on constant user-supplied paths. -dnl POSIX.2 word splitting is done only on the output of word expansions, -dnl not every word. This closes a longstanding sh security hole. - ac_dummy="m4_if([$2], , $PATH, [$2])" - for ac_dir in $ac_dummy; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$1; then - lt_cv_path_MAGIC_CMD="$ac_dir/$1" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD="$lt_cv_path_MAGIC_CMD" - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <<_LT_EOF 1>&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -_LT_EOF - fi ;; - esac - fi - break - fi - done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" - ;; -esac]) -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -if test -n "$MAGIC_CMD"; then - AC_MSG_RESULT($MAGIC_CMD) -else - AC_MSG_RESULT(no) -fi -_LT_DECL([], [MAGIC_CMD], [0], - [Used to examine libraries when file_magic_cmd begins with "file"])dnl -])# _LT_PATH_TOOL_PREFIX - -# Old name: -AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) - - -# _LT_PATH_MAGIC -# -------------- -# find a file program which can recognize a shared library -m4_defun([_LT_PATH_MAGIC], -[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) -if test -z "$lt_cv_path_MAGIC_CMD"; then - if test -n "$ac_tool_prefix"; then - _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) - else - MAGIC_CMD=: - fi -fi -])# _LT_PATH_MAGIC - - -# LT_PATH_LD -# ---------- -# find the pathname to the GNU or non-GNU linker -AC_DEFUN([LT_PATH_LD], -[AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_DECL_EGREP])dnl - -AC_ARG_WITH([gnu-ld], - [AS_HELP_STRING([--with-gnu-ld], - [assume the C compiler uses GNU ld @<:@default=no@:>@])], - [test "$withval" = no || with_gnu_ld=yes], - [with_gnu_ld=no])dnl - -ac_prog=ld -if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - AC_MSG_CHECKING([for ld used by $CC]) - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [[\\/]]* | ?:[[\\/]]*) - re_direlt='/[[^/]][[^/]]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` - while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do - ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test "$with_gnu_ld" = yes; then - AC_MSG_CHECKING([for GNU ld]) -else - AC_MSG_CHECKING([for non-GNU ld]) -fi -AC_CACHE_VAL(lt_cv_path_LD, -[if test -z "$LD"; then - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null 2>&1; then - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - else - lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' - fi - ;; - -cegcc) - # use the weaker test based on 'objdump'. See mingw*. - lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' - ;; - -darwin* | rhapsody*) - lt_cv_deplibs_check_method=pass_all - ;; - -freebsd* | dragonfly*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - case $host_cpu in - i*86 ) - # Not sure whether the presence of OpenBSD here was a mistake. - # Let's accept both of them until this is cleared up. - lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` - ;; - esac - else - lt_cv_deplibs_check_method=pass_all - fi - ;; - -gnu*) - lt_cv_deplibs_check_method=pass_all - ;; - -hpux10.20* | hpux11*) - lt_cv_file_magic_cmd=/usr/bin/file - case $host_cpu in - ia64*) - lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' - lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so - ;; - hppa*64*) - [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'] - lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl - ;; - *) - lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' - lt_cv_file_magic_test_file=/usr/lib/libc.sl - ;; - esac - ;; - -interix[[3-9]]*) - # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' - ;; - -irix5* | irix6* | nonstopux*) - case $LD in - *-32|*"-32 ") libmagic=32-bit;; - *-n32|*"-n32 ") libmagic=N32;; - *-64|*"-64 ") libmagic=64-bit;; - *) libmagic=never-match;; - esac - lt_cv_deplibs_check_method=pass_all - ;; - -# This must be Linux ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) - lt_cv_deplibs_check_method=pass_all - ;; - -netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' - fi - ;; - -newos6*) - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=/usr/lib/libnls.so - ;; - -*nto* | *qnx*) - lt_cv_deplibs_check_method=pass_all - ;; - -openbsd*) - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' - fi - ;; - -osf3* | osf4* | osf5*) - lt_cv_deplibs_check_method=pass_all - ;; - -rdos*) - lt_cv_deplibs_check_method=pass_all - ;; - -solaris*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv4 | sysv4.3*) - case $host_vendor in - motorola) - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` - ;; - ncr) - lt_cv_deplibs_check_method=pass_all - ;; - sequent) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' - ;; - sni) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" - lt_cv_file_magic_test_file=/lib/libc.so - ;; - siemens) - lt_cv_deplibs_check_method=pass_all - ;; - pc) - lt_cv_deplibs_check_method=pass_all - ;; - esac - ;; - -tpf*) - lt_cv_deplibs_check_method=pass_all - ;; -esac -]) -file_magic_cmd=$lt_cv_file_magic_cmd -deplibs_check_method=$lt_cv_deplibs_check_method -test -z "$deplibs_check_method" && deplibs_check_method=unknown - -_LT_DECL([], [deplibs_check_method], [1], - [Method to check whether dependent libraries are shared objects]) -_LT_DECL([], [file_magic_cmd], [1], - [Command to use when deplibs_check_method == "file_magic"]) -])# _LT_CHECK_MAGIC_METHOD - - -# LT_PATH_NM -# ---------- -# find the pathname to a BSD- or MS-compatible name lister -AC_DEFUN([LT_PATH_NM], -[AC_REQUIRE([AC_PROG_CC])dnl -AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, -[if test -n "$NM"; then - # Let the user override the test. - lt_cv_path_NM="$NM" -else - lt_nm_to_check="${ac_tool_prefix}nm" - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then - lt_nm_to_check="$lt_nm_to_check nm" - fi - for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - tmp_nm="$ac_dir/$lt_tmp_nm" - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file - case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in - */dev/null* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" - break - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" - break - ;; - *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - ;; - esac - ;; - esac - fi - done - IFS="$lt_save_ifs" - done - : ${lt_cv_path_NM=no} -fi]) -if test "$lt_cv_path_NM" != "no"; then - NM="$lt_cv_path_NM" -else - # Didn't find any BSD compatible name lister, look for dumpbin. - AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :) - AC_SUBST([DUMPBIN]) - if test "$DUMPBIN" != ":"; then - NM="$DUMPBIN" - fi -fi -test -z "$NM" && NM=nm -AC_SUBST([NM]) -_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl - -AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], - [lt_cv_nm_interface="BSD nm" - echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$ac_compile" 2>conftest.err) - cat conftest.err >&AS_MESSAGE_LOG_FD - (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) - (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) - cat conftest.err >&AS_MESSAGE_LOG_FD - (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD) - cat conftest.out >&AS_MESSAGE_LOG_FD - if $GREP 'External.*some_variable' conftest.out > /dev/null; then - lt_cv_nm_interface="MS dumpbin" - fi - rm -f conftest*]) -])# LT_PATH_NM - -# Old names: -AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) -AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AM_PROG_NM], []) -dnl AC_DEFUN([AC_PROG_NM], []) - - -# LT_LIB_M -# -------- -# check for math library -AC_DEFUN([LT_LIB_M], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -LIBM= -case $host in -*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) - # These system don't have libm, or don't need it - ;; -*-ncr-sysv4.3*) - AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") - AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") - ;; -*) - AC_CHECK_LIB(m, cos, LIBM="-lm") - ;; -esac -AC_SUBST([LIBM]) -])# LT_LIB_M - -# Old name: -AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_CHECK_LIBM], []) - - -# _LT_COMPILER_NO_RTTI([TAGNAME]) -# ------------------------------- -m4_defun([_LT_COMPILER_NO_RTTI], -[m4_require([_LT_TAG_COMPILER])dnl - -_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= - -if test "$GCC" = yes; then - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' - - _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], - lt_cv_prog_compiler_rtti_exceptions, - [-fno-rtti -fno-exceptions], [], - [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) -fi -_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], - [Compiler flag to turn off builtin functions]) -])# _LT_COMPILER_NO_RTTI - - -# _LT_CMD_GLOBAL_SYMBOLS -# ---------------------- -m4_defun([_LT_CMD_GLOBAL_SYMBOLS], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([LT_PATH_NM])dnl -AC_REQUIRE([LT_PATH_LD])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_TAG_COMPILER])dnl - -# Check for command to grab the raw symbol name followed by C symbol from nm. -AC_MSG_CHECKING([command to parse $NM output from $compiler object]) -AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], -[ -# These are sane defaults that work on at least a few old systems. -# [They come from Ultrix. What could be older than Ultrix?!! ;)] - -# Character class describing NM global symbol codes. -symcode='[[BCDEGRST]]' - -# Regexp to match symbols that can be accessed directly from C. -sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' - -# Define system-specific variables. -case $host_os in -aix*) - symcode='[[BCDT]]' - ;; -cygwin* | mingw* | pw32* | cegcc*) - symcode='[[ABCDGISTW]]' - ;; -hpux*) - if test "$host_cpu" = ia64; then - symcode='[[ABCDEGRST]]' - fi - ;; -irix* | nonstopux*) - symcode='[[BCDEGRST]]' - ;; -osf*) - symcode='[[BCDEGQRST]]' - ;; -solaris*) - symcode='[[BDRT]]' - ;; -sco3.2v5*) - symcode='[[DT]]' - ;; -sysv4.2uw2*) - symcode='[[DT]]' - ;; -sysv5* | sco5v6* | unixware* | OpenUNIX*) - symcode='[[ABDT]]' - ;; -sysv4) - symcode='[[DFNSTU]]' - ;; -esac - -# If we're using GNU nm, then use its standard symbol codes. -case `$NM -V 2>&1` in -*GNU* | *'with BFD'*) - symcode='[[ABCDGIRSTW]]' ;; -esac - -# Transform an extracted symbol line into a proper C declaration. -# Some systems (esp. on ia64) link data and code symbols differently, -# so use this general approach. -lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" - -# Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" - -# Handle CRLF in mingw tool chain -opt_cr= -case $build_os in -mingw*) - opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp - ;; -esac - -# Try without a prefix underscore, then with it. -for ac_symprfx in "" "_"; do - - # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. - symxfrm="\\1 $ac_symprfx\\2 \\2" - - # Write the raw and C identifiers. - if test "$lt_cv_nm_interface" = "MS dumpbin"; then - # Fake it for dumpbin and say T for any non-static function - # and D for any global variable. - # Also find C++ and __fastcall symbols from MSVC++, - # which start with @ or ?. - lt_cv_sys_global_symbol_pipe="$AWK ['"\ -" {last_section=section; section=\$ 3};"\ -" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ -" \$ 0!~/External *\|/{next};"\ -" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ -" {if(hide[section]) next};"\ -" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ -" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ -" s[1]~/^[@?]/{print s[1], s[1]; next};"\ -" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ -" ' prfx=^$ac_symprfx]" - else - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" - fi - - # Check to see that the pipe works correctly. - pipe_works=no - - rm -f conftest* - cat > conftest.$ac_ext <<_LT_EOF -#ifdef __cplusplus -extern "C" { -#endif -char nm_test_var; -void nm_test_func(void); -void nm_test_func(void){} -#ifdef __cplusplus -} -#endif -int main(){nm_test_var='a';nm_test_func();return(0);} -_LT_EOF - - if AC_TRY_EVAL(ac_compile); then - # Now try to grab the symbols. - nlist=conftest.nm - if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then - # Try sorting and uniquifying the output. - if sort "$nlist" | uniq > "$nlist"T; then - mv -f "$nlist"T "$nlist" - else - rm -f "$nlist"T - fi - - # Make sure that we snagged all the symbols we need. - if $GREP ' nm_test_var$' "$nlist" >/dev/null; then - if $GREP ' nm_test_func$' "$nlist" >/dev/null; then - cat <<_LT_EOF > conftest.$ac_ext -#ifdef __cplusplus -extern "C" { -#endif - -_LT_EOF - # Now generate the symbol file. - eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' - - cat <<_LT_EOF >> conftest.$ac_ext - -/* The mapping between symbol names and symbols. */ -const struct { - const char *name; - void *address; -} -lt__PROGRAM__LTX_preloaded_symbols[[]] = -{ - { "@PROGRAM@", (void *) 0 }, -_LT_EOF - $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext - cat <<\_LT_EOF >> conftest.$ac_ext - {0, (void *) 0} -}; - -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt__PROGRAM__LTX_preloaded_symbols; -} -#endif - -#ifdef __cplusplus -} -#endif -_LT_EOF - # Now try linking the two files. - mv conftest.$ac_objext conftstm.$ac_objext - lt_save_LIBS="$LIBS" - lt_save_CFLAGS="$CFLAGS" - LIBS="conftstm.$ac_objext" - CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" - if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then - pipe_works=yes - fi - LIBS="$lt_save_LIBS" - CFLAGS="$lt_save_CFLAGS" - else - echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD - fi - else - echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD - fi - else - echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD - fi - else - echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD - cat conftest.$ac_ext >&5 - fi - rm -rf conftest* conftst* - - # Do not use the global_symbol_pipe unless it works. - if test "$pipe_works" = yes; then - break - else - lt_cv_sys_global_symbol_pipe= - fi -done -]) -if test -z "$lt_cv_sys_global_symbol_pipe"; then - lt_cv_sys_global_symbol_to_cdecl= -fi -if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then - AC_MSG_RESULT(failed) -else - AC_MSG_RESULT(ok) -fi - -_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], - [Take the output of nm and produce a listing of raw symbols and C names]) -_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], - [Transform the output of nm in a proper C declaration]) -_LT_DECL([global_symbol_to_c_name_address], - [lt_cv_sys_global_symbol_to_c_name_address], [1], - [Transform the output of nm in a C name address pair]) -_LT_DECL([global_symbol_to_c_name_address_lib_prefix], - [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], - [Transform the output of nm in a C name address pair when lib prefix is needed]) -]) # _LT_CMD_GLOBAL_SYMBOLS - - -# _LT_COMPILER_PIC([TAGNAME]) -# --------------------------- -m4_defun([_LT_COMPILER_PIC], -[m4_require([_LT_TAG_COMPILER])dnl -_LT_TAGVAR(lt_prog_compiler_wl, $1)= -_LT_TAGVAR(lt_prog_compiler_pic, $1)= -_LT_TAGVAR(lt_prog_compiler_static, $1)= - -AC_MSG_CHECKING([for $compiler option to produce PIC]) -m4_if([$1], [CXX], [ - # C++ specific cases for pic, static, wl, etc. - if test "$GXX" = yes; then - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' - ;; - esac - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - mingw* | cygwin* | os2* | pw32* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - m4_if([$1], [GCJ], [], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - ;; - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' - ;; - *djgpp*) - # DJGPP does not support shared libraries at all - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - ;; - interix[[3-9]]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - sysv4*MP*) - if test -d /usr/nec; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic - fi - ;; - hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - ;; - *qnx* | *nto*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - else - case $host_os in - aix[[4-9]]*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - else - _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' - fi - ;; - chorus*) - case $cc_basename in - cxch68*) - # Green Hills C++ Compiler - # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" - ;; - esac - ;; - dgux*) - case $cc_basename in - ec++*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - ;; - ghcx*) - # Green Hills C++ Compiler - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - *) - ;; - esac - ;; - freebsd* | dragonfly*) - # FreeBSD uses GNU C++ - ;; - hpux9* | hpux10* | hpux11*) - case $cc_basename in - CC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - if test "$host_cpu" != ia64; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - fi - ;; - aCC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - ;; - esac - ;; - *) - ;; - esac - ;; - interix*) - # This is c89, which is MS Visual C++ (no shared libs) - # Anyone wants to do a port? - ;; - irix5* | irix6* | nonstopux*) - case $cc_basename in - CC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - # CC pic flag -KPIC is the default. - ;; - *) - ;; - esac - ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu) - case $cc_basename in - KCC*) - # KAI C++ Compiler - _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - ecpc* ) - # old Intel C++ for x86_64 which still supported -KPIC. - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - icpc* ) - # Intel C++, used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - pgCC* | pgcpp*) - # Portland Group C++ compiler - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - cxx*) - # Compaq C++ - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - xlc* | xlC*) - # IBM XL 8.0 on PPC - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - ;; - esac - ;; - esac - ;; - lynxos*) - ;; - m88k*) - ;; - mvs*) - case $cc_basename in - cxx*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' - ;; - *) - ;; - esac - ;; - netbsd* | netbsdelf*-gnu) - ;; - *qnx* | *nto*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' - ;; - RCC*) - # Rational C++ 2.4.1 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - cxx*) - # Digital/Compaq C++ - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - *) - ;; - esac - ;; - psos*) - ;; - solaris*) - case $cc_basename in - CC*) - # Sun C++ 4.2, 5.x and Centerline C++ - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - ;; - gcx*) - # Green Hills C++ Compiler - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' - ;; - *) - ;; - esac - ;; - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - lcc*) - # Lucid - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - *) - ;; - esac - ;; - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - case $cc_basename in - CC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - esac - ;; - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - ;; - *) - ;; - esac - ;; - vxworks*) - ;; - *) - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - esac - fi -], -[ - if test "$GCC" = yes; then - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' - ;; - esac - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - m4_if([$1], [GCJ], [], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' - ;; - - hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - # +Z the default - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - ;; - - interix[[3-9]]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - enable_shared=no - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic - fi - ;; - - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - else - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - else - _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' - fi - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - m4_if([$1], [GCJ], [], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - ;; - - hpux9* | hpux10* | hpux11*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - ;; - - irix5* | irix6* | nonstopux*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # PIC (with -KPIC) is the default. - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - linux* | k*bsd*-gnu | kopensolaris*-gnu) - case $cc_basename in - # old Intel for x86_64 which still supported -KPIC. - ecc*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - # icc used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - icc* | ifort*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - # Lahey Fortran 8.1. - lf95*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' - _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' - ;; - pgcc* | pgf77* | pgf90* | pgf95*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - ccc*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # All Alpha code is PIC. - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - xl*) - # IBM XL C 8.0/Fortran 10.1 on PPC - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C 5.9 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - ;; - *Sun\ F*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='' - ;; - esac - ;; - esac - ;; - - newsos6) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - - osf3* | osf4* | osf5*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # All OSF/1 code is PIC. - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - rdos*) - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - solaris*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - case $cc_basename in - f77* | f90* | f95*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; - *) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; - esac - ;; - - sunos4*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - sysv4*MP*) - if test -d /usr/nec ;then - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - unicos*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - - uts4*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - *) - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - esac - fi -]) -case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" - ;; -esac -AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) -_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], - [How to pass a linker flag through the compiler]) - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then - _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], - [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], - [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], - [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in - "" | " "*) ;; - *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; - esac], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) -fi -_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], - [Additional compiler flags for building library objects]) - -# -# Check to make sure the static flag actually works. -# -wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" -_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], - _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), - $lt_tmp_static_flag, - [], - [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) -_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], - [Compiler flag to prevent dynamic linking]) -])# _LT_COMPILER_PIC - - -# _LT_LINKER_SHLIBS([TAGNAME]) -# ---------------------------- -# See if the linker supports building shared libraries. -m4_defun([_LT_LINKER_SHLIBS], -[AC_REQUIRE([LT_PATH_LD])dnl -AC_REQUIRE([LT_PATH_NM])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl -m4_require([_LT_TAG_COMPILER])dnl -AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) -m4_if([$1], [CXX], [ - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - case $host_os in - aix[[4-9]]*) - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - else - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - fi - ;; - pw32*) - _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" - ;; - cygwin* | mingw* | cegcc*) - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' - ;; - linux* | k*bsd*-gnu) - _LT_TAGVAR(link_all_deplibs, $1)=no - ;; - *) - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - ;; - esac - _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] -], [ - runpath_var= - _LT_TAGVAR(allow_undefined_flag, $1)= - _LT_TAGVAR(always_export_symbols, $1)=no - _LT_TAGVAR(archive_cmds, $1)= - _LT_TAGVAR(archive_expsym_cmds, $1)= - _LT_TAGVAR(compiler_needs_object, $1)=no - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - _LT_TAGVAR(export_dynamic_flag_spec, $1)= - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - _LT_TAGVAR(hardcode_automatic, $1)=no - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_direct_absolute, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= - _LT_TAGVAR(hardcode_libdir_separator, $1)= - _LT_TAGVAR(hardcode_minus_L, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - _LT_TAGVAR(inherit_rpath, $1)=no - _LT_TAGVAR(link_all_deplibs, $1)=unknown - _LT_TAGVAR(module_cmds, $1)= - _LT_TAGVAR(module_expsym_cmds, $1)= - _LT_TAGVAR(old_archive_from_new_cmds, $1)= - _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= - _LT_TAGVAR(thread_safe_flag_spec, $1)= - _LT_TAGVAR(whole_archive_flag_spec, $1)= - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - _LT_TAGVAR(include_expsyms, $1)= - # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ` (' and `)$', so one must not match beginning or - # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', - # as well as any symbol that contains `d'. - _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] - # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out - # platforms (ab)use it in PIC code, but their linkers get confused if - # the symbol is explicitly referenced. Since portable code cannot - # rely on this symbol name, it's probably fine to never include it in - # preloaded symbol tables. - # Exclude shared library initialization/finalization symbols. -dnl Note also adjust exclude_expsyms for C++ above. - extract_expsyms_cmds= - - case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test "$GCC" != yes; then - with_gnu_ld=no - fi - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - openbsd*) - with_gnu_ld=no - ;; - linux* | k*bsd*-gnu) - _LT_TAGVAR(link_all_deplibs, $1)=no - ;; - esac - - _LT_TAGVAR(ld_shlibs, $1)=yes - if test "$with_gnu_ld" = yes; then - # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='${wl}' - - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - runpath_var=LD_RUN_PATH - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then - _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - _LT_TAGVAR(whole_archive_flag_spec, $1)= - fi - supports_anon_versioning=no - case `$LD -v 2>&1` in - *GNU\ gold*) supports_anon_versioning=yes ;; - *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac - - # See if GNU ld supports shared libraries. - case $host_os in - aix[[3-9]]*) - # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then - _LT_TAGVAR(ld_shlibs, $1)=no - cat <<_LT_EOF 1>&2 - -*** Warning: the GNU linker, at least up to release 2.9.1, is reported -*** to be unable to reliably create shared libraries on AIX. -*** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to modify your PATH -*** so that a non-GNU linker is found, and then restart. - -_LT_EOF - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='' - ;; - m68k) - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_minus_L, $1)=yes - ;; - esac - ;; - - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, - # as there is no search path for DLLs. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=no - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - interix[[3-9]]*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - - gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) - tmp_diet=no - if test "$host_os" = linux-dietlibc; then - case $cc_basename in - diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) - esac - fi - if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ - && test "$tmp_diet" = no - then - tmp_addflag= - tmp_sharedflag='-shared' - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag' - ;; - pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - lf95*) # Lahey Fortran 8.1 - _LT_TAGVAR(whole_archive_flag_spec, $1)= - tmp_sharedflag='--shared' ;; - xl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) - tmp_sharedflag='-qmkshrobj' - tmp_addflag= ;; - esac - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) # Sun C 5.9 - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - _LT_TAGVAR(compiler_needs_object, $1)=yes - tmp_sharedflag='-G' ;; - *Sun\ F*) # Sun Fortran 8.3 - tmp_sharedflag='-G' ;; - esac - _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - - if test "x$supports_anon_versioning" = xyes; then - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - - case $cc_basename in - xlf*) - # IBM XL Fortran 10.1 on PPC cannot create shared libs itself - _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' - _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' - fi - ;; - esac - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - - solaris*) - if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then - _LT_TAGVAR(ld_shlibs, $1)=no - cat <<_LT_EOF 1>&2 - -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) - _LT_TAGVAR(ld_shlibs, $1)=no - cat <<_LT_EOF 1>&2 - -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not -*** reliably create shared libraries on SCO systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.16.91.0.3 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - ;; - *) - # For security reasons, it is highly recommended that you always - # use absolute paths for naming shared libraries, and exclude the - # DT_RUNPATH tag from executables and libraries. But doing so - # requires that you compile everything twice, which is a pain. - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - sunos4*) - _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - - if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then - runpath_var= - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(export_dynamic_flag_spec, $1)= - _LT_TAGVAR(whole_archive_flag_spec, $1)= - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=yes - _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - _LT_TAGVAR(hardcode_direct, $1)=unsupported - fi - ;; - - aix[[4-9]]*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - else - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - fi - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) - for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then - aix_use_runtimelinking=yes - break - fi - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - _LT_TAGVAR(archive_cmds, $1)='' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' - - if test "$GCC" = yes; then - case $host_os in aix4.[[012]]|aix4.[[012]].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - _LT_TAGVAR(hardcode_direct, $1)=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)= - fi - ;; - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - _LT_TAGVAR(link_all_deplibs, $1)=no - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - _LT_TAGVAR(always_export_symbols, $1)=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(allow_undefined_flag, $1)='-berok' - # Determine the default libpath from the value encoded in an - # empty executable. - _LT_SYS_MODULE_PATH_AIX - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' - _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - _LT_SYS_MODULE_PATH_AIX - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - # This is similar to how AIX traditionally builds its shared libraries. - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='' - ;; - m68k) - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_minus_L, $1)=yes - ;; - esac - ;; - - bsdi[[45]]*) - _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' - # FIXME: Should let the user specify the lib program. - _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' - _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - ;; - - darwin* | rhapsody*) - _LT_DARWIN_LINKER_FEATURES($1) - ;; - - dgux*) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - freebsd1*) - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor - # support. Future versions do this automatically, but an explicit c++rt0.o - # does not break anything, and helps significantly (at the cost of a little - # extra space). - freebsd2.2*) - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - hpux9*) - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(hardcode_direct, $1)=yes - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - ;; - - hpux10*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi - if test "$with_gnu_ld" = no; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - fi - ;; - - hpux11*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - fi - if test "$with_gnu_ld" = no; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - case $host_cpu in - hppa*64*|ia64*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - *) - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - ;; - esac - fi - ;; - - irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - # Try to use the -exported_symbol ld option, if it does not - # work, assume that -exports_file does not work either and - # implicitly export all symbols. - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" - AC_LINK_IFELSE(int foo(void) {}, - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' - ) - LDFLAGS="$save_LDFLAGS" - else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)='no' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(inherit_rpath, $1)=yes - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - - netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - newsos6) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *nto* | *qnx*) - ;; - - openbsd*) - if test -f /usr/libexec/ld.so; then - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - else - case $host_os in - openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - ;; - esac - fi - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - os2*) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' - _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' - ;; - - osf3*) - if test "$GCC" = yes; then - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)='no' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - ;; - - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - else - _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ - $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' - - # Both c and cxx compiler support -rpath directly - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)='no' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - ;; - - solaris*) - _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' - if test "$GCC" = yes; then - wlarc='${wl}' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - else - case `$CC -V 2>&1` in - *"Compilers 5.0"*) - wlarc='' - _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' - ;; - *) - wlarc='${wl}' - _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - ;; - esac - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. GCC discards it without `$wl', - # but is careful enough not to reorder. - # Supported since Solaris 2.6 (maybe 2.5.1?) - if test "$GCC" = yes; then - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - else - _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' - fi - ;; - esac - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - - sunos4*) - if test "x$host_vendor" = xsequent; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - sysv4) - case $host_vendor in - sni) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' - _LT_TAGVAR(hardcode_direct, $1)=no - ;; - motorola) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - sysv4.3*) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - _LT_TAGVAR(ld_shlibs, $1)=yes - fi - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - uts4*) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *) - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - - if test x$host_vendor = xsni; then - case $host in - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' - ;; - esac - fi - fi -]) -AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) -test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no - -_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld - -_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl -_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl -_LT_DECL([], [extract_expsyms_cmds], [2], - [The commands to extract the exported symbol list from a shared archive]) - -# -# Do we need to explicitly link libc? -# -case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in -x|xyes) - # Assume -lc should be added - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $_LT_TAGVAR(archive_cmds, $1) in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - AC_MSG_CHECKING([whether -lc should be explicitly linked in]) - $RM conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - if AC_TRY_EVAL(ac_compile) 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) - pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) - _LT_TAGVAR(allow_undefined_flag, $1)= - if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) - then - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - else - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - fi - _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $RM conftest* - AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)]) - ;; - esac - fi - ;; -esac - -_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], - [Whether or not to add -lc for building shared libraries]) -_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], - [enable_shared_with_static_runtimes], [0], - [Whether or not to disallow shared libs when runtime libs are static]) -_LT_TAGDECL([], [export_dynamic_flag_spec], [1], - [Compiler flag to allow reflexive dlopens]) -_LT_TAGDECL([], [whole_archive_flag_spec], [1], - [Compiler flag to generate shared objects directly from archives]) -_LT_TAGDECL([], [compiler_needs_object], [1], - [Whether the compiler copes with passing no objects directly]) -_LT_TAGDECL([], [old_archive_from_new_cmds], [2], - [Create an old-style archive from a shared archive]) -_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], - [Create a temporary old-style archive to link instead of a shared archive]) -_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) -_LT_TAGDECL([], [archive_expsym_cmds], [2]) -_LT_TAGDECL([], [module_cmds], [2], - [Commands used to build a loadable module if different from building - a shared archive.]) -_LT_TAGDECL([], [module_expsym_cmds], [2]) -_LT_TAGDECL([], [with_gnu_ld], [1], - [Whether we are building with GNU ld or not]) -_LT_TAGDECL([], [allow_undefined_flag], [1], - [Flag that allows shared libraries with undefined symbols to be built]) -_LT_TAGDECL([], [no_undefined_flag], [1], - [Flag that enforces no undefined symbols]) -_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], - [Flag to hardcode $libdir into a binary during linking. - This must work even if $libdir does not exist]) -_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1], - [[If ld is used when linking, flag to hardcode $libdir into a binary - during linking. This must work even if $libdir does not exist]]) -_LT_TAGDECL([], [hardcode_libdir_separator], [1], - [Whether we need a single "-rpath" flag with a separated argument]) -_LT_TAGDECL([], [hardcode_direct], [0], - [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes - DIR into the resulting binary]) -_LT_TAGDECL([], [hardcode_direct_absolute], [0], - [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes - DIR into the resulting binary and the resulting library dependency is - "absolute", i.e impossible to change by setting ${shlibpath_var} if the - library is relocated]) -_LT_TAGDECL([], [hardcode_minus_L], [0], - [Set to "yes" if using the -LDIR flag during linking hardcodes DIR - into the resulting binary]) -_LT_TAGDECL([], [hardcode_shlibpath_var], [0], - [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR - into the resulting binary]) -_LT_TAGDECL([], [hardcode_automatic], [0], - [Set to "yes" if building a shared library automatically hardcodes DIR - into the library and all subsequent libraries and executables linked - against it]) -_LT_TAGDECL([], [inherit_rpath], [0], - [Set to yes if linker adds runtime paths of dependent libraries - to runtime path list]) -_LT_TAGDECL([], [link_all_deplibs], [0], - [Whether libtool must link a program against all its dependency libraries]) -_LT_TAGDECL([], [fix_srcfile_path], [1], - [Fix the shell variable $srcfile for the compiler]) -_LT_TAGDECL([], [always_export_symbols], [0], - [Set to "yes" if exported symbols are required]) -_LT_TAGDECL([], [export_symbols_cmds], [2], - [The commands to list exported symbols]) -_LT_TAGDECL([], [exclude_expsyms], [1], - [Symbols that should not be listed in the preloaded symbols]) -_LT_TAGDECL([], [include_expsyms], [1], - [Symbols that must always be exported]) -_LT_TAGDECL([], [prelink_cmds], [2], - [Commands necessary for linking programs (against libraries) with templates]) -_LT_TAGDECL([], [file_list_spec], [1], - [Specify filename containing input files]) -dnl FIXME: Not yet implemented -dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], -dnl [Compiler flag to generate thread safe objects]) -])# _LT_LINKER_SHLIBS - - -# _LT_LANG_C_CONFIG([TAG]) -# ------------------------ -# Ensure that the configuration variables for a C compiler are suitably -# defined. These variables are subsequently used by _LT_CONFIG to write -# the compiler configuration to `libtool'. -m4_defun([_LT_LANG_C_CONFIG], -[m4_require([_LT_DECL_EGREP])dnl -lt_save_CC="$CC" -AC_LANG_PUSH(C) - -# Source file extension for C test sources. -ac_ext=c - -# Object file extension for compiled C test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;" - -# Code to be used in simple link tests -lt_simple_link_test_code='int main(){return(0);}' - -_LT_TAG_COMPILER -# Save the default compiler, since it gets overwritten when the other -# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. -compiler_DEFAULT=$CC - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -if test -n "$compiler"; then - _LT_COMPILER_NO_RTTI($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - LT_SYS_DLOPEN_SELF - _LT_CMD_STRIPLIB - - # Report which library types will actually be built - AC_MSG_CHECKING([if libtool supports shared libraries]) - AC_MSG_RESULT([$can_build_shared]) - - AC_MSG_CHECKING([whether to build shared libraries]) - test "$can_build_shared" = "no" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - - aix[[4-9]]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; - esac - AC_MSG_RESULT([$enable_shared]) - - AC_MSG_CHECKING([whether to build static libraries]) - # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes - AC_MSG_RESULT([$enable_static]) - - _LT_CONFIG($1) -fi -AC_LANG_POP -CC="$lt_save_CC" -])# _LT_LANG_C_CONFIG - - -# _LT_PROG_CXX -# ------------ -# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++ -# compiler, we have our own version here. -m4_defun([_LT_PROG_CXX], -[ -pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes]) -AC_PROG_CXX -if test -n "$CXX" && ( test "X$CXX" != "Xno" && - ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || - (test "X$CXX" != "Xg++"))) ; then - AC_PROG_CXXCPP -else - _lt_caught_CXX_error=yes -fi -popdef([AC_MSG_ERROR]) -])# _LT_PROG_CXX - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([_LT_PROG_CXX], []) - - -# _LT_LANG_CXX_CONFIG([TAG]) -# -------------------------- -# Ensure that the configuration variables for a C++ compiler are suitably -# defined. These variables are subsequently used by _LT_CONFIG to write -# the compiler configuration to `libtool'. -m4_defun([_LT_LANG_CXX_CONFIG], -[AC_REQUIRE([_LT_PROG_CXX])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_EGREP])dnl - -AC_LANG_PUSH(C++) -_LT_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_TAGVAR(allow_undefined_flag, $1)= -_LT_TAGVAR(always_export_symbols, $1)=no -_LT_TAGVAR(archive_expsym_cmds, $1)= -_LT_TAGVAR(compiler_needs_object, $1)=no -_LT_TAGVAR(export_dynamic_flag_spec, $1)= -_LT_TAGVAR(hardcode_direct, $1)=no -_LT_TAGVAR(hardcode_direct_absolute, $1)=no -_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= -_LT_TAGVAR(hardcode_libdir_separator, $1)= -_LT_TAGVAR(hardcode_minus_L, $1)=no -_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported -_LT_TAGVAR(hardcode_automatic, $1)=no -_LT_TAGVAR(inherit_rpath, $1)=no -_LT_TAGVAR(module_cmds, $1)= -_LT_TAGVAR(module_expsym_cmds, $1)= -_LT_TAGVAR(link_all_deplibs, $1)=unknown -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(no_undefined_flag, $1)= -_LT_TAGVAR(whole_archive_flag_spec, $1)= -_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Source file extension for C++ test sources. -ac_ext=cpp - -# Object file extension for compiled C++ test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# No sense in running all these tests if we already determined that -# the CXX compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test "$_lt_caught_CXX_error" != yes; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="int some_variable = 0;" - - # Code to be used in simple link tests - lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' - - # ltmain only uses $CC for tagged configurations so make sure $CC is set. - _LT_TAG_COMPILER - - # save warnings/boilerplate of simple test code - _LT_COMPILER_BOILERPLATE - _LT_LINKER_BOILERPLATE - - # Allow CC to be a program name with arguments. - lt_save_CC=$CC - lt_save_LD=$LD - lt_save_GCC=$GCC - GCC=$GXX - lt_save_with_gnu_ld=$with_gnu_ld - lt_save_path_LD=$lt_cv_path_LD - if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then - lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx - else - $as_unset lt_cv_prog_gnu_ld - fi - if test -n "${lt_cv_path_LDCXX+set}"; then - lt_cv_path_LD=$lt_cv_path_LDCXX - else - $as_unset lt_cv_path_LD - fi - test -z "${LDCXX+set}" || LD=$LDCXX - CC=${CXX-"c++"} - compiler=$CC - _LT_TAGVAR(compiler, $1)=$CC - _LT_CC_BASENAME([$compiler]) - - if test -n "$compiler"; then - # We don't want -fno-exception when compiling C++ code, so set the - # no_builtin_flag separately - if test "$GXX" = yes; then - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' - else - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= - fi - - if test "$GXX" = yes; then - # Set up default GNU C++ configuration - - LT_PATH_LD - - # Check if GNU C++ uses GNU ld as the underlying linker, since the - # archiving commands below assume that GNU ld is being used. - if test "$with_gnu_ld" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - - # If archive_cmds runs LD, not CC, wlarc should be empty - # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to - # investigate it a little bit more. (MM) - wlarc='${wl}' - - # ancient GNU ld didn't support --whole-archive et. al. - if eval "`$CC -print-prog-name=ld` --help 2>&1" | - $GREP 'no-whole-archive' > /dev/null; then - _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - _LT_TAGVAR(whole_archive_flag_spec, $1)= - fi - else - with_gnu_ld=no - wlarc= - - # A generic and very simple default shared library creation - # command for GNU C++ for the case where it uses the native - # linker, instead of GNU ld. If possible, this setting should - # overridden to take advantage of the native linker features on - # the platform it is being used on. - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - fi - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' - - else - GXX=no - with_gnu_ld=no - wlarc= - fi - - # PORTME: fill in a description of your system's C++ link characteristics - AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) - _LT_TAGVAR(ld_shlibs, $1)=yes - case $host_os in - aix3*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - aix[[4-9]]*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) - for ld_flag in $LDFLAGS; do - case $ld_flag in - *-brtl*) - aix_use_runtimelinking=yes - break - ;; - esac - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - _LT_TAGVAR(archive_cmds, $1)='' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' - - if test "$GXX" = yes; then - case $host_os in aix4.[[012]]|aix4.[[012]].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - _LT_TAGVAR(hardcode_direct, $1)=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)= - fi - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to - # export. - _LT_TAGVAR(always_export_symbols, $1)=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(allow_undefined_flag, $1)='-berok' - # Determine the default libpath from the value encoded in an empty - # executable. - _LT_SYS_MODULE_PATH_AIX - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' - _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - _LT_SYS_MODULE_PATH_AIX - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - # This is similar to how AIX traditionally builds its shared - # libraries. - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - chorus*) - case $cc_basename in - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, - # as there is no search path for DLLs. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=no - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - darwin* | rhapsody*) - _LT_DARWIN_LINKER_FEATURES($1) - ;; - - dgux*) - case $cc_basename in - ec++*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - ghcx*) - # Green Hills C++ Compiler - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - freebsd[[12]]*) - # C++ shared libraries reported to be fairly broken before - # switch to ELF - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - freebsd-elf*) - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - ;; - - freebsd* | dragonfly*) - # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF - # conventions - _LT_TAGVAR(ld_shlibs, $1)=yes - ;; - - gnu*) - ;; - - hpux9*) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, - # but as the default - # location of the library. - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - aCC*) - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' - ;; - *) - if test "$GXX" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - hpux10*|hpux11*) - if test $with_gnu_ld = no; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - case $host_cpu in - hppa*64*|ia64*) - ;; - *) - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - ;; - esac - fi - case $host_cpu in - hppa*64*|ia64*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - *) - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, - # but as the default - # location of the library. - ;; - esac - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - aCC*) - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' - ;; - *) - if test "$GXX" = yes; then - if test $with_gnu_ld = no; then - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - fi - else - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - interix[[3-9]]*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - irix5* | irix6*) - case $cc_basename in - CC*) - # SGI C++ - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - - # Archives containing C++ object files must be created using - # "CC -ar", where "CC" is the IRIX C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' - ;; - *) - if test "$GXX" = yes; then - if test "$with_gnu_ld" = no; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib' - fi - fi - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - esac - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(inherit_rpath, $1)=yes - ;; - - linux* | k*bsd*-gnu | kopensolaris*-gnu) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - - # Archives containing C++ object files must be created using - # "CC -Bstatic", where "CC" is the KAI C++ compiler. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' - ;; - icpc* | ecpc* ) - # Intel C++ - with_gnu_ld=yes - # version 8.0 and above of icpc choke on multiply defined symbols - # if we add $predep_objects and $postdep_objects, however 7.1 and - # earlier do not add the objects themselves. - case `$CC -V 2>&1` in - *"Version 7."*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - ;; - *) # Version 8.0 or newer - tmp_idyn= - case $host_cpu in - ia64*) tmp_idyn=' -i_dynamic';; - esac - _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - ;; - esac - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' - ;; - pgCC* | pgcpp*) - # Portland Group C++ compiler - case `$CC -V` in - *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*) - _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ - compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"' - _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ - $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~ - $RANLIB $oldlib' - _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' - ;; - *) # Version 6 will use weak symbols - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' - ;; - esac - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - ;; - cxx*) - # Compaq C++ - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' - - runpath_var=LD_RUN_PATH - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' - ;; - xl*) - # IBM XL 8.0 on PPC, with GNU ld - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' - _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - _LT_TAGVAR(compiler_needs_object, $1)=yes - - # Not sure whether something based on - # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 - # would be better. - output_verbose_link_cmd='echo' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' - ;; - esac - ;; - esac - ;; - - lynxos*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - m88k*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - mvs*) - case $cc_basename in - cxx*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' - wlarc= - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - fi - # Workaround some broken pre-1.5 toolchains - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' - ;; - - *nto* | *qnx*) - _LT_TAGVAR(ld_shlibs, $1)=yes - ;; - - openbsd2*) - # C++ shared libraries are fairly broken - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - openbsd*) - if test -f /usr/libexec/ld.so; then - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - fi - output_verbose_link_cmd=echo - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Archives containing C++ object files must be created using - # the KAI C++ compiler. - case $host in - osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; - *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; - esac - ;; - RCC*) - # Rational C++ 2.4.1 - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - cxx*) - case $host in - osf3*) - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - ;; - *) - _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ - echo "-hidden">> $lib.exp~ - $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~ - $RM $lib.exp' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - ;; - esac - - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' - ;; - *) - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - case $host in - osf3*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - ;; - esac - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' - - else - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - psos*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - lcc*) - # Lucid - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - solaris*) - case $cc_basename in - CC*) - # Sun C++ 4.2, 5.x and Centerline C++ - _LT_TAGVAR(archive_cmds_need_lc,$1)=yes - _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' - _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. - # Supported since Solaris 2.6 (maybe 2.5.1?) - _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' - ;; - esac - _LT_TAGVAR(link_all_deplibs, $1)=yes - - output_verbose_link_cmd='echo' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' - ;; - gcx*) - # Green Hills C++ Compiler - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - - # The C++ compiler must be used to create the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' - ;; - *) - # GNU C++ compiler with Solaris linker - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' - if $CC --version | $GREP -v '^2\.7' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' - else - # g++ 2.7 appears to require `-G' NOT `-shared' on this - # platform. - _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' - fi - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - ;; - esac - fi - ;; - esac - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - vxworks*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - - AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) - test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no - - _LT_TAGVAR(GCC, $1)="$GXX" - _LT_TAGVAR(LD, $1)="$LD" - - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - _LT_SYS_HIDDEN_LIBDEPS($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) - fi # test -n "$compiler" - - CC=$lt_save_CC - LDCXX=$LD - LD=$lt_save_LD - GCC=$lt_save_GCC - with_gnu_ld=$lt_save_with_gnu_ld - lt_cv_path_LDCXX=$lt_cv_path_LD - lt_cv_path_LD=$lt_save_path_LD - lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld - lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld -fi # test "$_lt_caught_CXX_error" != yes - -AC_LANG_POP -])# _LT_LANG_CXX_CONFIG - - -# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) -# --------------------------------- -# Figure out "hidden" library dependencies from verbose -# compiler output when linking a shared library. -# Parse the compiler output and extract the necessary -# objects, libraries and library flags. -m4_defun([_LT_SYS_HIDDEN_LIBDEPS], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -# Dependencies to place before and after the object being linked: -_LT_TAGVAR(predep_objects, $1)= -_LT_TAGVAR(postdep_objects, $1)= -_LT_TAGVAR(predeps, $1)= -_LT_TAGVAR(postdeps, $1)= -_LT_TAGVAR(compiler_lib_search_path, $1)= - -dnl we can't use the lt_simple_compile_test_code here, -dnl because it contains code intended for an executable, -dnl not a library. It's possible we should let each -dnl tag define a new lt_????_link_test_code variable, -dnl but it's only used here... -m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF -int a; -void foo (void) { a = 0; } -_LT_EOF -], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF -class Foo -{ -public: - Foo (void) { a = 0; } -private: - int a; -}; -_LT_EOF -], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF - subroutine foo - implicit none - integer*4 a - a=0 - return - end -_LT_EOF -], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF - subroutine foo - implicit none - integer a - a=0 - return - end -_LT_EOF -], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF -public class foo { - private int a; - public void bar (void) { - a = 0; - } -}; -_LT_EOF -]) -dnl Parse the compiler output and extract the necessary -dnl objects, libraries and library flags. -if AC_TRY_EVAL(ac_compile); then - # Parse the compiler output and extract the necessary - # objects, libraries and library flags. - - # Sentinel used to keep track of whether or not we are before - # the conftest object file. - pre_test_object_deps_done=no - - for p in `eval "$output_verbose_link_cmd"`; do - case $p in - - -L* | -R* | -l*) - # Some compilers place space between "-{L,R}" and the path. - # Remove the space. - if test $p = "-L" || - test $p = "-R"; then - prev=$p - continue - else - prev= - fi - - if test "$pre_test_object_deps_done" = no; then - case $p in - -L* | -R*) - # Internal compiler library paths should come after those - # provided the user. The postdeps already come after the - # user supplied libs so there is no need to process them. - if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then - _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" - else - _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" - fi - ;; - # The "-l" case would never come before the object being - # linked, so don't bother handling this case. - esac - else - if test -z "$_LT_TAGVAR(postdeps, $1)"; then - _LT_TAGVAR(postdeps, $1)="${prev}${p}" - else - _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" - fi - fi - ;; - - *.$objext) - # This assumes that the test object file only shows up - # once in the compiler output. - if test "$p" = "conftest.$objext"; then - pre_test_object_deps_done=yes - continue - fi - - if test "$pre_test_object_deps_done" = no; then - if test -z "$_LT_TAGVAR(predep_objects, $1)"; then - _LT_TAGVAR(predep_objects, $1)="$p" - else - _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" - fi - else - if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then - _LT_TAGVAR(postdep_objects, $1)="$p" - else - _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" - fi - fi - ;; - - *) ;; # Ignore the rest. - - esac - done - - # Clean up. - rm -f a.out a.exe -else - echo "libtool.m4: error: problem compiling $1 test program" -fi - -$RM -f confest.$objext - -# PORTME: override above test on systems where it is broken -m4_if([$1], [CXX], -[case $host_os in -interix[[3-9]]*) - # Interix 3.5 installs completely hosed .la files for C++, so rather than - # hack all around it, let's just trust "g++" to DTRT. - _LT_TAGVAR(predep_objects,$1)= - _LT_TAGVAR(postdep_objects,$1)= - _LT_TAGVAR(postdeps,$1)= - ;; - -linux*) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as - # -library=stlport4 depends on it. - case " $CXX $CXXFLAGS " in - *" -library=stlport4 "*) - solaris_use_stlport4=yes - ;; - esac - - if test "$solaris_use_stlport4" != yes; then - _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' - fi - ;; - esac - ;; - -solaris*) - case $cc_basename in - CC*) - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as - # -library=stlport4 depends on it. - case " $CXX $CXXFLAGS " in - *" -library=stlport4 "*) - solaris_use_stlport4=yes - ;; - esac - - # Adding this requires a known-good setup of shared libraries for - # Sun compiler versions before 5.6, else PIC objects from an old - # archive will be linked into the output, leading to subtle bugs. - if test "$solaris_use_stlport4" != yes; then - _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' - fi - ;; - esac - ;; -esac -]) - -case " $_LT_TAGVAR(postdeps, $1) " in -*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; -esac - _LT_TAGVAR(compiler_lib_search_dirs, $1)= -if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then - _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` -fi -_LT_TAGDECL([], [compiler_lib_search_dirs], [1], - [The directories searched by this compiler when creating a shared library]) -_LT_TAGDECL([], [predep_objects], [1], - [Dependencies to place before and after the objects being linked to - create a shared library]) -_LT_TAGDECL([], [postdep_objects], [1]) -_LT_TAGDECL([], [predeps], [1]) -_LT_TAGDECL([], [postdeps], [1]) -_LT_TAGDECL([], [compiler_lib_search_path], [1], - [The library search path used internally by the compiler when linking - a shared library]) -])# _LT_SYS_HIDDEN_LIBDEPS - - -# _LT_PROG_F77 -# ------------ -# Since AC_PROG_F77 is broken, in that it returns the empty string -# if there is no fortran compiler, we have our own version here. -m4_defun([_LT_PROG_F77], -[ -pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes]) -AC_PROG_F77 -if test -z "$F77" || test "X$F77" = "Xno"; then - _lt_disable_F77=yes -fi -popdef([AC_MSG_ERROR]) -])# _LT_PROG_F77 - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([_LT_PROG_F77], []) - - -# _LT_LANG_F77_CONFIG([TAG]) -# -------------------------- -# Ensure that the configuration variables for a Fortran 77 compiler are -# suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. -m4_defun([_LT_LANG_F77_CONFIG], -[AC_REQUIRE([_LT_PROG_F77])dnl -AC_LANG_PUSH(Fortran 77) - -_LT_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_TAGVAR(allow_undefined_flag, $1)= -_LT_TAGVAR(always_export_symbols, $1)=no -_LT_TAGVAR(archive_expsym_cmds, $1)= -_LT_TAGVAR(export_dynamic_flag_spec, $1)= -_LT_TAGVAR(hardcode_direct, $1)=no -_LT_TAGVAR(hardcode_direct_absolute, $1)=no -_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= -_LT_TAGVAR(hardcode_libdir_separator, $1)= -_LT_TAGVAR(hardcode_minus_L, $1)=no -_LT_TAGVAR(hardcode_automatic, $1)=no -_LT_TAGVAR(inherit_rpath, $1)=no -_LT_TAGVAR(module_cmds, $1)= -_LT_TAGVAR(module_expsym_cmds, $1)= -_LT_TAGVAR(link_all_deplibs, $1)=unknown -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(no_undefined_flag, $1)= -_LT_TAGVAR(whole_archive_flag_spec, $1)= -_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Source file extension for f77 test sources. -ac_ext=f - -# Object file extension for compiled f77 test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# No sense in running all these tests if we already determined that -# the F77 compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test "$_lt_disable_F77" != yes; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="\ - subroutine t - return - end -" - - # Code to be used in simple link tests - lt_simple_link_test_code="\ - program t - end -" - - # ltmain only uses $CC for tagged configurations so make sure $CC is set. - _LT_TAG_COMPILER - - # save warnings/boilerplate of simple test code - _LT_COMPILER_BOILERPLATE - _LT_LINKER_BOILERPLATE - - # Allow CC to be a program name with arguments. - lt_save_CC="$CC" - lt_save_GCC=$GCC - CC=${F77-"f77"} - compiler=$CC - _LT_TAGVAR(compiler, $1)=$CC - _LT_CC_BASENAME([$compiler]) - GCC=$G77 - if test -n "$compiler"; then - AC_MSG_CHECKING([if libtool supports shared libraries]) - AC_MSG_RESULT([$can_build_shared]) - - AC_MSG_CHECKING([whether to build shared libraries]) - test "$can_build_shared" = "no" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - aix[[4-9]]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; - esac - AC_MSG_RESULT([$enable_shared]) - - AC_MSG_CHECKING([whether to build static libraries]) - # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes - AC_MSG_RESULT([$enable_static]) - - _LT_TAGVAR(GCC, $1)="$G77" - _LT_TAGVAR(LD, $1)="$LD" - - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) - fi # test -n "$compiler" - - GCC=$lt_save_GCC - CC="$lt_save_CC" -fi # test "$_lt_disable_F77" != yes - -AC_LANG_POP -])# _LT_LANG_F77_CONFIG - - -# _LT_PROG_FC -# ----------- -# Since AC_PROG_FC is broken, in that it returns the empty string -# if there is no fortran compiler, we have our own version here. -m4_defun([_LT_PROG_FC], -[ -pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes]) -AC_PROG_FC -if test -z "$FC" || test "X$FC" = "Xno"; then - _lt_disable_FC=yes -fi -popdef([AC_MSG_ERROR]) -])# _LT_PROG_FC - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([_LT_PROG_FC], []) - - -# _LT_LANG_FC_CONFIG([TAG]) -# ------------------------- -# Ensure that the configuration variables for a Fortran compiler are -# suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. -m4_defun([_LT_LANG_FC_CONFIG], -[AC_REQUIRE([_LT_PROG_FC])dnl -AC_LANG_PUSH(Fortran) - -_LT_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_TAGVAR(allow_undefined_flag, $1)= -_LT_TAGVAR(always_export_symbols, $1)=no -_LT_TAGVAR(archive_expsym_cmds, $1)= -_LT_TAGVAR(export_dynamic_flag_spec, $1)= -_LT_TAGVAR(hardcode_direct, $1)=no -_LT_TAGVAR(hardcode_direct_absolute, $1)=no -_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= -_LT_TAGVAR(hardcode_libdir_separator, $1)= -_LT_TAGVAR(hardcode_minus_L, $1)=no -_LT_TAGVAR(hardcode_automatic, $1)=no -_LT_TAGVAR(inherit_rpath, $1)=no -_LT_TAGVAR(module_cmds, $1)= -_LT_TAGVAR(module_expsym_cmds, $1)= -_LT_TAGVAR(link_all_deplibs, $1)=unknown -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(no_undefined_flag, $1)= -_LT_TAGVAR(whole_archive_flag_spec, $1)= -_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Source file extension for fc test sources. -ac_ext=${ac_fc_srcext-f} - -# Object file extension for compiled fc test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# No sense in running all these tests if we already determined that -# the FC compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test "$_lt_disable_FC" != yes; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="\ - subroutine t - return - end -" - - # Code to be used in simple link tests - lt_simple_link_test_code="\ - program t - end -" - - # ltmain only uses $CC for tagged configurations so make sure $CC is set. - _LT_TAG_COMPILER - - # save warnings/boilerplate of simple test code - _LT_COMPILER_BOILERPLATE - _LT_LINKER_BOILERPLATE - - # Allow CC to be a program name with arguments. - lt_save_CC="$CC" - lt_save_GCC=$GCC - CC=${FC-"f95"} - compiler=$CC - GCC=$ac_cv_fc_compiler_gnu - - _LT_TAGVAR(compiler, $1)=$CC - _LT_CC_BASENAME([$compiler]) - - if test -n "$compiler"; then - AC_MSG_CHECKING([if libtool supports shared libraries]) - AC_MSG_RESULT([$can_build_shared]) - - AC_MSG_CHECKING([whether to build shared libraries]) - test "$can_build_shared" = "no" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - aix[[4-9]]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; - esac - AC_MSG_RESULT([$enable_shared]) - - AC_MSG_CHECKING([whether to build static libraries]) - # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes - AC_MSG_RESULT([$enable_static]) - - _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" - _LT_TAGVAR(LD, $1)="$LD" - - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - _LT_SYS_HIDDEN_LIBDEPS($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) - fi # test -n "$compiler" - - GCC=$lt_save_GCC - CC="$lt_save_CC" -fi # test "$_lt_disable_FC" != yes - -AC_LANG_POP -])# _LT_LANG_FC_CONFIG - - -# _LT_LANG_GCJ_CONFIG([TAG]) -# -------------------------- -# Ensure that the configuration variables for the GNU Java Compiler compiler -# are suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. -m4_defun([_LT_LANG_GCJ_CONFIG], -[AC_REQUIRE([LT_PROG_GCJ])dnl -AC_LANG_SAVE - -# Source file extension for Java test sources. -ac_ext=java - -# Object file extension for compiled Java test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="class foo {}" - -# Code to be used in simple link tests -lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -_LT_TAG_COMPILER - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -# Allow CC to be a program name with arguments. -lt_save_CC="$CC" -lt_save_GCC=$GCC -GCC=yes -CC=${GCJ-"gcj"} -compiler=$CC -_LT_TAGVAR(compiler, $1)=$CC -_LT_TAGVAR(LD, $1)="$LD" -_LT_CC_BASENAME([$compiler]) - -# GCJ did not exist at the time GCC didn't implicitly link libc in. -_LT_TAGVAR(archive_cmds_need_lc, $1)=no - -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds - -if test -n "$compiler"; then - _LT_COMPILER_NO_RTTI($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) -fi - -AC_LANG_RESTORE - -GCC=$lt_save_GCC -CC="$lt_save_CC" -])# _LT_LANG_GCJ_CONFIG - - -# _LT_LANG_RC_CONFIG([TAG]) -# ------------------------- -# Ensure that the configuration variables for the Windows resource compiler -# are suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. -m4_defun([_LT_LANG_RC_CONFIG], -[AC_REQUIRE([LT_PROG_RC])dnl -AC_LANG_SAVE - -# Source file extension for RC test sources. -ac_ext=rc - -# Object file extension for compiled RC test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' - -# Code to be used in simple link tests -lt_simple_link_test_code="$lt_simple_compile_test_code" - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -_LT_TAG_COMPILER - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -# Allow CC to be a program name with arguments. -lt_save_CC="$CC" -lt_save_GCC=$GCC -GCC= -CC=${RC-"windres"} -compiler=$CC -_LT_TAGVAR(compiler, $1)=$CC -_LT_CC_BASENAME([$compiler]) -_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes - -if test -n "$compiler"; then - : - _LT_CONFIG($1) -fi - -GCC=$lt_save_GCC -AC_LANG_RESTORE -CC="$lt_save_CC" -])# _LT_LANG_RC_CONFIG - - -# LT_PROG_GCJ -# ----------- -AC_DEFUN([LT_PROG_GCJ], -[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], - [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], - [AC_CHECK_TOOL(GCJ, gcj,) - test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" - AC_SUBST(GCJFLAGS)])])[]dnl -]) - -# Old name: -AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([LT_AC_PROG_GCJ], []) - - -# LT_PROG_RC -# ---------- -AC_DEFUN([LT_PROG_RC], -[AC_CHECK_TOOL(RC, windres,) -]) - -# Old name: -AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([LT_AC_PROG_RC], []) - - -# _LT_DECL_EGREP -# -------------- -# If we don't have a new enough Autoconf to choose the best grep -# available, choose the one first in the user's PATH. -m4_defun([_LT_DECL_EGREP], -[AC_REQUIRE([AC_PROG_EGREP])dnl -AC_REQUIRE([AC_PROG_FGREP])dnl -test -z "$GREP" && GREP=grep -_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) -_LT_DECL([], [EGREP], [1], [An ERE matcher]) -_LT_DECL([], [FGREP], [1], [A literal string matcher]) -dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too -AC_SUBST([GREP]) -]) - - -# _LT_DECL_OBJDUMP -# -------------- -# If we don't have a new enough Autoconf to choose the best objdump -# available, choose the one first in the user's PATH. -m4_defun([_LT_DECL_OBJDUMP], -[AC_CHECK_TOOL(OBJDUMP, objdump, false) -test -z "$OBJDUMP" && OBJDUMP=objdump -_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) -AC_SUBST([OBJDUMP]) -]) - - -# _LT_DECL_SED -# ------------ -# Check for a fully-functional sed program, that truncates -# as few characters as possible. Prefer GNU sed if found. -m4_defun([_LT_DECL_SED], -[AC_PROG_SED -test -z "$SED" && SED=sed -Xsed="$SED -e 1s/^X//" -_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) -_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], - [Sed that helps us avoid accidentally triggering echo(1) options like -n]) -])# _LT_DECL_SED - -m4_ifndef([AC_PROG_SED], [ -# NOTE: This macro has been submitted for inclusion into # -# GNU Autoconf as AC_PROG_SED. When it is available in # -# a released version of Autoconf we should remove this # -# macro and use it instead. # - -m4_defun([AC_PROG_SED], -[AC_MSG_CHECKING([for a sed that does not truncate output]) -AC_CACHE_VAL(lt_cv_path_SED, -[# Loop through the user's path and test for sed and gsed. -# Then use that list of sed's as ones to test for truncation. -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for lt_ac_prog in sed gsed; do - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then - lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" - fi - done - done -done -IFS=$as_save_IFS -lt_ac_max=0 -lt_ac_count=0 -# Add /usr/xpg4/bin/sed as it is typically found on Solaris -# along with /bin/sed that truncates output. -for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do - test ! -f $lt_ac_sed && continue - cat /dev/null > conftest.in - lt_ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >conftest.in - # Check for GNU sed and select it if it is found. - if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then - lt_cv_path_SED=$lt_ac_sed - break - fi - while true; do - cat conftest.in conftest.in >conftest.tmp - mv conftest.tmp conftest.in - cp conftest.in conftest.nl - echo >>conftest.nl - $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break - cmp -s conftest.out conftest.nl || break - # 10000 chars as input seems more than enough - test $lt_ac_count -gt 10 && break - lt_ac_count=`expr $lt_ac_count + 1` - if test $lt_ac_count -gt $lt_ac_max; then - lt_ac_max=$lt_ac_count - lt_cv_path_SED=$lt_ac_sed - fi - done -done -]) -SED=$lt_cv_path_SED -AC_SUBST([SED]) -AC_MSG_RESULT([$SED]) -])#AC_PROG_SED -])#m4_ifndef - -# Old name: -AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([LT_AC_PROG_SED], []) - - -# _LT_CHECK_SHELL_FEATURES -# ------------------------ -# Find out whether the shell is Bourne or XSI compatible, -# or has some other useful features. -m4_defun([_LT_CHECK_SHELL_FEATURES], -[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) -# Try some XSI features -xsi_shell=no -( _lt_dummy="a/b/c" - test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ - = c,a/b,, \ - && eval 'test $(( 1 + 1 )) -eq 2 \ - && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ - && xsi_shell=yes -AC_MSG_RESULT([$xsi_shell]) -_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) - -AC_MSG_CHECKING([whether the shell understands "+="]) -lt_shell_append=no -( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ - >/dev/null 2>&1 \ - && lt_shell_append=yes -AC_MSG_RESULT([$lt_shell_append]) -_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) - -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - lt_unset=unset -else - lt_unset=false -fi -_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl - -# test EBCDIC or ASCII -case `echo X|tr X '\101'` in - A) # ASCII based system - # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr - lt_SP2NL='tr \040 \012' - lt_NL2SP='tr \015\012 \040\040' - ;; - *) # EBCDIC based system - lt_SP2NL='tr \100 \n' - lt_NL2SP='tr \r\n \100\100' - ;; -esac -_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl -_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl -])# _LT_CHECK_SHELL_FEATURES - - -# _LT_PROG_XSI_SHELLFNS -# --------------------- -# Bourne and XSI compatible variants of some useful shell functions. -m4_defun([_LT_PROG_XSI_SHELLFNS], -[case $xsi_shell in - yes) - cat << \_LT_EOF >> "$cfgfile" - -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac -} - -# func_basename file -func_basename () -{ - func_basename_result="${1##*/}" -} - -# func_dirname_and_basename file append nondir_replacement -# perform func_basename and func_dirname in a single function -# call: -# dirname: Compute the dirname of FILE. If nonempty, -# add APPEND to the result, otherwise set result -# to NONDIR_REPLACEMENT. -# value returned in "$func_dirname_result" -# basename: Compute filename of FILE. -# value retuned in "$func_basename_result" -# Implementation must be kept synchronized with func_dirname -# and func_basename. For efficiency, we do not delegate to -# those functions but instead duplicate the functionality here. -func_dirname_and_basename () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac - func_basename_result="${1##*/}" -} - -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -func_stripname () -{ - # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are - # positional parameters, so assign one to ordinary parameter first. - func_stripname_result=${3} - func_stripname_result=${func_stripname_result#"${1}"} - func_stripname_result=${func_stripname_result%"${2}"} -} - -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=${1%%=*} - func_opt_split_arg=${1#*=} -} - -# func_lo2o object -func_lo2o () -{ - case ${1} in - *.lo) func_lo2o_result=${1%.lo}.${objext} ;; - *) func_lo2o_result=${1} ;; - esac -} - -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=${1%.*}.lo -} - -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=$(( $[*] )) -} - -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=${#1} -} - -_LT_EOF - ;; - *) # Bourne compatible functions. - cat << \_LT_EOF >> "$cfgfile" - -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - # Extract subdirectory from the argument. - func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` - if test "X$func_dirname_result" = "X${1}"; then - func_dirname_result="${3}" - else - func_dirname_result="$func_dirname_result${2}" - fi -} - -# func_basename file -func_basename () -{ - func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` -} - -dnl func_dirname_and_basename -dnl A portable version of this function is already defined in general.m4sh -dnl so there is no need for it here. - -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -# func_strip_suffix prefix name -func_stripname () -{ - case ${2} in - .*) func_stripname_result=`$ECHO "X${3}" \ - | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; - *) func_stripname_result=`$ECHO "X${3}" \ - | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; - esac -} - -# sed scripts: -my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q' -my_sed_long_arg='1s/^-[[^=]]*=//' - -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` - func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` -} - -# func_lo2o object -func_lo2o () -{ - func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` -} - -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'` -} - -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=`expr "$[@]"` -} - -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len` -} - -_LT_EOF -esac - -case $lt_shell_append in - yes) - cat << \_LT_EOF >> "$cfgfile" - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$[1]+=\$[2]" -} -_LT_EOF - ;; - *) - cat << \_LT_EOF >> "$cfgfile" - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$[1]=\$$[1]\$[2]" -} - -_LT_EOF - ;; - esac -]) - -# Helper functions for option handling. -*- Autoconf -*- -# -# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. -# Written by Gary V. Vaughan, 2004 -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -# serial 6 ltoptions.m4 - -# This is to help aclocal find these macros, as it can't see m4_define. -AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) - - -# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) -# ------------------------------------------ -m4_define([_LT_MANGLE_OPTION], -[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) - - -# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) -# --------------------------------------- -# Set option OPTION-NAME for macro MACRO-NAME, and if there is a -# matching handler defined, dispatch to it. Other OPTION-NAMEs are -# saved as a flag. -m4_define([_LT_SET_OPTION], -[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl -m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), - _LT_MANGLE_DEFUN([$1], [$2]), - [m4_warning([Unknown $1 option `$2'])])[]dnl -]) - - -# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) -# ------------------------------------------------------------ -# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. -m4_define([_LT_IF_OPTION], -[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) - - -# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) -# ------------------------------------------------------- -# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME -# are set. -m4_define([_LT_UNLESS_OPTIONS], -[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), - [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), - [m4_define([$0_found])])])[]dnl -m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 -])[]dnl -]) - - -# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) -# ---------------------------------------- -# OPTION-LIST is a space-separated list of Libtool options associated -# with MACRO-NAME. If any OPTION has a matching handler declared with -# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about -# the unknown option and exit. -m4_defun([_LT_SET_OPTIONS], -[# Set options -m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), - [_LT_SET_OPTION([$1], _LT_Option)]) - -m4_if([$1],[LT_INIT],[ - dnl - dnl Simply set some default values (i.e off) if boolean options were not - dnl specified: - _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no - ]) - _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no - ]) - dnl - dnl If no reference was made to various pairs of opposing options, then - dnl we run the default mode handler for the pair. For example, if neither - dnl `shared' nor `disable-shared' was passed, we enable building of shared - dnl archives by default: - _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) - _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) - _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) - _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], - [_LT_ENABLE_FAST_INSTALL]) - ]) -])# _LT_SET_OPTIONS - - - -# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) -# ----------------------------------------- -m4_define([_LT_MANGLE_DEFUN], -[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) - - -# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) -# ----------------------------------------------- -m4_define([LT_OPTION_DEFINE], -[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl -])# LT_OPTION_DEFINE - - -# dlopen -# ------ -LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes -]) - -AU_DEFUN([AC_LIBTOOL_DLOPEN], -[_LT_SET_OPTION([LT_INIT], [dlopen]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you -put the `dlopen' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) - - -# win32-dll -# --------- -# Declare package support for building win32 dll's. -LT_OPTION_DEFINE([LT_INIT], [win32-dll], -[enable_win32_dll=yes - -case $host in -*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*) - AC_CHECK_TOOL(AS, as, false) - AC_CHECK_TOOL(DLLTOOL, dlltool, false) - AC_CHECK_TOOL(OBJDUMP, objdump, false) - ;; -esac - -test -z "$AS" && AS=as -_LT_DECL([], [AS], [0], [Assembler program])dnl - -test -z "$DLLTOOL" && DLLTOOL=dlltool -_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl - -test -z "$OBJDUMP" && OBJDUMP=objdump -_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl -])# win32-dll - -AU_DEFUN([AC_LIBTOOL_WIN32_DLL], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -_LT_SET_OPTION([LT_INIT], [win32-dll]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you -put the `win32-dll' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) - - -# _LT_ENABLE_SHARED([DEFAULT]) -# ---------------------------- -# implement the --enable-shared flag, and supports the `shared' and -# `disable-shared' LT_INIT options. -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -m4_define([_LT_ENABLE_SHARED], -[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl -AC_ARG_ENABLE([shared], - [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], - [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_shared=yes ;; - no) enable_shared=no ;; - *) - enable_shared=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_shared=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac], - [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) - - _LT_DECL([build_libtool_libs], [enable_shared], [0], - [Whether or not to build shared libraries]) -])# _LT_ENABLE_SHARED - -LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) -LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) - -# Old names: -AC_DEFUN([AC_ENABLE_SHARED], -[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) -]) - -AC_DEFUN([AC_DISABLE_SHARED], -[_LT_SET_OPTION([LT_INIT], [disable-shared]) -]) - -AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) -AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AM_ENABLE_SHARED], []) -dnl AC_DEFUN([AM_DISABLE_SHARED], []) - - - -# _LT_ENABLE_STATIC([DEFAULT]) -# ---------------------------- -# implement the --enable-static flag, and support the `static' and -# `disable-static' LT_INIT options. -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -m4_define([_LT_ENABLE_STATIC], -[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl -AC_ARG_ENABLE([static], - [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], - [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_static=yes ;; - no) enable_static=no ;; - *) - enable_static=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_static=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac], - [enable_static=]_LT_ENABLE_STATIC_DEFAULT) - - _LT_DECL([build_old_libs], [enable_static], [0], - [Whether or not to build static libraries]) -])# _LT_ENABLE_STATIC - -LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) -LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) - -# Old names: -AC_DEFUN([AC_ENABLE_STATIC], -[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) -]) - -AC_DEFUN([AC_DISABLE_STATIC], -[_LT_SET_OPTION([LT_INIT], [disable-static]) -]) - -AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) -AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AM_ENABLE_STATIC], []) -dnl AC_DEFUN([AM_DISABLE_STATIC], []) - - - -# _LT_ENABLE_FAST_INSTALL([DEFAULT]) -# ---------------------------------- -# implement the --enable-fast-install flag, and support the `fast-install' -# and `disable-fast-install' LT_INIT options. -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -m4_define([_LT_ENABLE_FAST_INSTALL], -[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl -AC_ARG_ENABLE([fast-install], - [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], - [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_fast_install=yes ;; - no) enable_fast_install=no ;; - *) - enable_fast_install=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_fast_install=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac], - [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) - -_LT_DECL([fast_install], [enable_fast_install], [0], - [Whether or not to optimize for fast installation])dnl -])# _LT_ENABLE_FAST_INSTALL - -LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) -LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) - -# Old names: -AU_DEFUN([AC_ENABLE_FAST_INSTALL], -[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you put -the `fast-install' option into LT_INIT's first parameter.]) -]) - -AU_DEFUN([AC_DISABLE_FAST_INSTALL], -[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you put -the `disable-fast-install' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) -dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) - - -# _LT_WITH_PIC([MODE]) -# -------------------- -# implement the --with-pic flag, and support the `pic-only' and `no-pic' -# LT_INIT options. -# MODE is either `yes' or `no'. If omitted, it defaults to `both'. -m4_define([_LT_WITH_PIC], -[AC_ARG_WITH([pic], - [AS_HELP_STRING([--with-pic], - [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], - [pic_mode="$withval"], - [pic_mode=default]) - -test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) - -_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl -])# _LT_WITH_PIC - -LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) -LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) - -# Old name: -AU_DEFUN([AC_LIBTOOL_PICMODE], -[_LT_SET_OPTION([LT_INIT], [pic-only]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you -put the `pic-only' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) - - -m4_define([_LTDL_MODE], []) -LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], - [m4_define([_LTDL_MODE], [nonrecursive])]) -LT_OPTION_DEFINE([LTDL_INIT], [recursive], - [m4_define([_LTDL_MODE], [recursive])]) -LT_OPTION_DEFINE([LTDL_INIT], [subproject], - [m4_define([_LTDL_MODE], [subproject])]) - -m4_define([_LTDL_TYPE], []) -LT_OPTION_DEFINE([LTDL_INIT], [installable], - [m4_define([_LTDL_TYPE], [installable])]) -LT_OPTION_DEFINE([LTDL_INIT], [convenience], - [m4_define([_LTDL_TYPE], [convenience])]) - -# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- -# -# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. -# Written by Gary V. Vaughan, 2004 -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -# serial 6 ltsugar.m4 - -# This is to help aclocal find these macros, as it can't see m4_define. -AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) - - -# lt_join(SEP, ARG1, [ARG2...]) -# ----------------------------- -# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their -# associated separator. -# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier -# versions in m4sugar had bugs. -m4_define([lt_join], -[m4_if([$#], [1], [], - [$#], [2], [[$2]], - [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) -m4_define([_lt_join], -[m4_if([$#$2], [2], [], - [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) - - -# lt_car(LIST) -# lt_cdr(LIST) -# ------------ -# Manipulate m4 lists. -# These macros are necessary as long as will still need to support -# Autoconf-2.59 which quotes differently. -m4_define([lt_car], [[$1]]) -m4_define([lt_cdr], -[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], - [$#], 1, [], - [m4_dquote(m4_shift($@))])]) -m4_define([lt_unquote], $1) - - -# lt_append(MACRO-NAME, STRING, [SEPARATOR]) -# ------------------------------------------ -# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. -# Note that neither SEPARATOR nor STRING are expanded; they are appended -# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). -# No SEPARATOR is output if MACRO-NAME was previously undefined (different -# than defined and empty). -# -# This macro is needed until we can rely on Autoconf 2.62, since earlier -# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. -m4_define([lt_append], -[m4_define([$1], - m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) - - - -# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) -# ---------------------------------------------------------- -# Produce a SEP delimited list of all paired combinations of elements of -# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list -# has the form PREFIXmINFIXSUFFIXn. -# Needed until we can rely on m4_combine added in Autoconf 2.62. -m4_define([lt_combine], -[m4_if(m4_eval([$# > 3]), [1], - [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl -[[m4_foreach([_Lt_prefix], [$2], - [m4_foreach([_Lt_suffix], - ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, - [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) - - -# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) -# ----------------------------------------------------------------------- -# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited -# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. -m4_define([lt_if_append_uniq], -[m4_ifdef([$1], - [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], - [lt_append([$1], [$2], [$3])$4], - [$5])], - [lt_append([$1], [$2], [$3])$4])]) - - -# lt_dict_add(DICT, KEY, VALUE) -# ----------------------------- -m4_define([lt_dict_add], -[m4_define([$1($2)], [$3])]) - - -# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) -# -------------------------------------------- -m4_define([lt_dict_add_subkey], -[m4_define([$1($2:$3)], [$4])]) - - -# lt_dict_fetch(DICT, KEY, [SUBKEY]) -# ---------------------------------- -m4_define([lt_dict_fetch], -[m4_ifval([$3], - m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), - m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) - - -# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) -# ----------------------------------------------------------------- -m4_define([lt_if_dict_fetch], -[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], - [$5], - [$6])]) - - -# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) -# -------------------------------------------------------------- -m4_define([lt_dict_filter], -[m4_if([$5], [], [], - [lt_join(m4_quote(m4_default([$4], [[, ]])), - lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), - [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl -]) - -# ltversion.m4 -- version numbers -*- Autoconf -*- -# -# Copyright (C) 2004 Free Software Foundation, Inc. -# Written by Scott James Remnant, 2004 -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -# Generated from ltversion.in. - -# serial 3017 ltversion.m4 -# This file is part of GNU Libtool - -m4_define([LT_PACKAGE_VERSION], [2.2.6b]) -m4_define([LT_PACKAGE_REVISION], [1.3017]) - -AC_DEFUN([LTVERSION_VERSION], -[macro_version='2.2.6b' -macro_revision='1.3017' -_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) -_LT_DECL(, macro_revision, 0) -]) - -# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- -# -# Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc. -# Written by Scott James Remnant, 2004. -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -# serial 4 lt~obsolete.m4 - -# These exist entirely to fool aclocal when bootstrapping libtool. -# -# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) -# which have later been changed to m4_define as they aren't part of the -# exported API, or moved to Autoconf or Automake where they belong. -# -# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN -# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us -# using a macro with the same name in our local m4/libtool.m4 it'll -# pull the old libtool.m4 in (it doesn't see our shiny new m4_define -# and doesn't know about Autoconf macros at all.) -# -# So we provide this file, which has a silly filename so it's always -# included after everything else. This provides aclocal with the -# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything -# because those macros already exist, or will be overwritten later. -# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. -# -# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. -# Yes, that means every name once taken will need to remain here until -# we give up compatibility with versions before 1.7, at which point -# we need to keep only those names which we still refer to. - -# This is to help aclocal find these macros, as it can't see m4_define. -AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) - -m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) -m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) -m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) -m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) -m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) -m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) -m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) -m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) -m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) -m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) -m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) -m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) -m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) -m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) -m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) -m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) -m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) -m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) -m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) -m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) -m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) -m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) -m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) -m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) -m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) -m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) -m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) -m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) -m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) -m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) -m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) -m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) -m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) -m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) -m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) -m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) -m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) -m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) -m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) -m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) -m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) -m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) -m4_ifndef([AC_LIBTOOL_RC], [AC_DEFUN([AC_LIBTOOL_RC])]) -m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) -m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) -m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) -m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) -m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) -m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) -m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) -m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) - # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- +# serial 1 (pkg-config-0.24) # # Copyright © 2004 Scott James Remnant . # @@ -8013,7 +48,10 @@ AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) -AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl +AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) +AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) +AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) + if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) fi @@ -8026,7 +64,6 @@ AC_MSG_RESULT([no]) PKG_CONFIG="" fi - fi[]dnl ])# PKG_PROG_PKG_CONFIG @@ -8035,34 +72,31 @@ # Check to see whether a particular set of modules exists. Similar # to PKG_CHECK_MODULES(), but does not set variables or print errors. # -# -# Similar to PKG_CHECK_MODULES, make sure that the first instance of -# this or PKG_CHECK_MODULES is called, or make sure to call -# PKG_CHECK_EXISTS manually +# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) +# only at the first occurence in configure.ac, so if the first place +# it's called might be skipped (such as if it is within an "if", you +# have to call PKG_CHECK_EXISTS manually # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_EXISTS], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl if test -n "$PKG_CONFIG" && \ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then - m4_ifval([$2], [$2], [:]) + m4_default([$2], [:]) m4_ifvaln([$3], [else $3])dnl fi]) - # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) # --------------------------------------------- m4_define([_PKG_CONFIG], -[if test -n "$PKG_CONFIG"; then - if test -n "$$1"; then - pkg_cv_[]$1="$$1" - else - PKG_CHECK_EXISTS([$3], - [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], - [pkg_failed=yes]) - fi -else - pkg_failed=untried +[if test -n "$$1"; then + pkg_cv_[]$1="$$1" + elif test -n "$PKG_CONFIG"; then + PKG_CHECK_EXISTS([$3], + [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], + [pkg_failed=yes]) + else + pkg_failed=untried fi[]dnl ])# _PKG_CONFIG @@ -8104,16 +138,17 @@ See the pkg-config man page for more details.]) if test $pkg_failed = yes; then + AC_MSG_RESULT([no]) _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then - $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"` + $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` else - $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` + $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD - ifelse([$4], , [AC_MSG_ERROR(dnl + m4_default([$4], [AC_MSG_ERROR( [Package requirements ($2) were not met: $$1_PKG_ERRORS @@ -8121,25 +156,24 @@ Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -_PKG_TEXT -])], - [AC_MSG_RESULT([no]) - $4]) +_PKG_TEXT])[]dnl + ]) elif test $pkg_failed = untried; then - ifelse([$4], , [AC_MSG_FAILURE(dnl + AC_MSG_RESULT([no]) + m4_default([$4], [AC_MSG_FAILURE( [The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. _PKG_TEXT -To get pkg-config, see .])], - [$4]) +To get pkg-config, see .])[]dnl + ]) else $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS $1[]_LIBS=$pkg_cv_[]$1[]_LIBS AC_MSG_RESULT([yes]) - ifelse([$3], , :, [$3]) + $3 fi[]dnl ])# PKG_CHECK_MODULES @@ -8158,7 +192,7 @@ [am__api_version='1.11' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.11], [], +m4_if([$1], [1.11.1], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -8174,7 +208,7 @@ # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.11])dnl +[AM_AUTOMAKE_VERSION([1.11.1])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) @@ -9073,3 +1107,8 @@ AC_SUBST([am__untar]) ]) # _AM_PROG_TAR +m4_include([m4/libtool.m4]) +m4_include([m4/ltoptions.m4]) +m4_include([m4/ltsugar.m4]) +m4_include([m4/ltversion.m4]) +m4_include([m4/lt~obsolete.m4]) diff --git a/cmake/modules/FindOpenCV.cmake b/cmake/modules/FindOpenCV.cmake new file mode 100644 index 0000000..7cffb27 --- /dev/null +++ b/cmake/modules/FindOpenCV.cmake @@ -0,0 +1,187 @@ +########################################################### +# Find OpenCV Library +# See http://sourceforge.net/projects/opencvlibrary/ +#---------------------------------------------------------- +# +## 1: Setup: +# The following variables are optionally searched for defaults +# OpenCV_DIR: Base directory of OpenCv tree to use. +# +## 2: Variable +# The following are set after configuration is done: +# +# OpenCV_FOUND +# OpenCV_LIBS +# OpenCV_INCLUDE_DIR +# OpenCV_VERSION (OpenCV_VERSION_MAJOR, OpenCV_VERSION_MINOR, OpenCV_VERSION_PATCH) +# +# +# Deprecated variable are used to maintain backward compatibility with +# the script of Jan Woetzel (2006/09): www.mip.informatik.uni-kiel.de/~jw +# OpenCV_INCLUDE_DIRS +# OpenCV_LIBRARIES +# OpenCV_LINK_DIRECTORIES +# +## 3: Version +# +# 2010/04/07 Benoit Rat, Correct a bug when OpenCVConfig.cmake is not found. +# 2010/03/24 Benoit Rat, Add compatibility for when OpenCVConfig.cmake is not found. +# 2010/03/22 Benoit Rat, Creation of the script. +# +# +# tested with: +# - OpenCV 2.1: MinGW, MSVC2008 +# - OpenCV 2.0: MinGW, MSVC2008, GCC4 +# +# +## 4: Licence: +# +# LGPL 2.1 : GNU Lesser General Public License Usage +# Alternatively, this file may be used under the terms of the GNU Lesser + +# General Public License version 2.1 as published by the Free Software +# Foundation and appearing in the file LICENSE.LGPL included in the +# packaging of this file. Please review the following information to +# ensure the GNU Lesser General Public License version 2.1 requirements +# will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +# +#---------------------------------------------------------- + + +find_path(OpenCV_DIR "OpenCVConfig.cmake" DOC "Root directory of OpenCV") + +##==================================================== +## Find OpenCV libraries +##---------------------------------------------------- +if(EXISTS "${OpenCV_DIR}") + + #When its possible to use the Config script use it. + if(EXISTS "${OpenCV_DIR}/OpenCVConfig.cmake") + + ## Include the standard CMake script + include("${OpenCV_DIR}/OpenCVConfig.cmake") + + ## Search for a specific version + set(CVLIB_SUFFIX "${OpenCV_VERSION_MAJOR}${OpenCV_VERSION_MINOR}${OpenCV_VERSION_PATCH}") + + #Otherwise it try to guess it. + else(EXISTS "${OpenCV_DIR}/OpenCVConfig.cmake") + + set(OPENCV_LIB_COMPONENTS cxcore cv ml highgui cvaux) + find_path(OpenCV_INCLUDE_DIR "cv.h" PATHS "${OpenCV_DIR}" PATH_SUFFIXES "include" "include/opencv" DOC "") + if(EXISTS ${OpenCV_INCLUDE_DIR}) + include_directories(${OpenCV_INCLUDE_DIR}) + endif(EXISTS ${OpenCV_INCLUDE_DIR}) + + #Find OpenCV version by looking at cvver.h + file(STRINGS ${OpenCV_INCLUDE_DIR}/cvver.h OpenCV_VERSIONS_TMP REGEX "^#define CV_[A-Z]+_VERSION[ \t]+[0-9]+$") + string(REGEX REPLACE ".*#define CV_MAJOR_VERSION[ \t]+([0-9]+).*" "\\1" OpenCV_VERSION_MAJOR ${OpenCV_VERSIONS_TMP}) + string(REGEX REPLACE ".*#define CV_MINOR_VERSION[ \t]+([0-9]+).*" "\\1" OpenCV_VERSION_MINOR ${OpenCV_VERSIONS_TMP}) + string(REGEX REPLACE ".*#define CV_SUBMINOR_VERSION[ \t]+([0-9]+).*" "\\1" OpenCV_VERSION_PATCH ${OpenCV_VERSIONS_TMP}) + set(OpenCV_VERSION ${OpenCV_VERSION_MAJOR}.${OpenCV_VERSION_MINOR}.${OpenCV_VERSION_PATCH} CACHE STRING "" FORCE) + set(CVLIB_SUFFIX "${OpenCV_VERSION_MAJOR}${OpenCV_VERSION_MINOR}${OpenCV_VERSION_PATCH}") + + endif(EXISTS "${OpenCV_DIR}/OpenCVConfig.cmake") + + + + + ## Initiate the variable before the loop + set(OpenCV_LIBS "") + set(OpenCV_FOUND_TMP TRUE) + + ## Loop over each components + foreach(__CVLIB ${OPENCV_LIB_COMPONENTS}) + + find_library(OpenCV_${__CVLIB}_LIBRARY_DEBUG NAMES "${__CVLIB}${CVLIB_SUFFIX}d" "lib${__CVLIB}${CVLIB_SUFFIX}d" PATHS "${OpenCV_DIR}/lib" NO_DEFAULT_PATH) + find_library(OpenCV_${__CVLIB}_LIBRARY_RELEASE NAMES "${__CVLIB}${CVLIB_SUFFIX}" "lib${__CVLIB}${CVLIB_SUFFIX}" PATHS "${OpenCV_DIR}/lib" NO_DEFAULT_PATH) + + #Remove the cache value + set(OpenCV_${__CVLIB}_LIBRARY "" CACHE STRING "" FORCE) + + #both debug/release + if(OpenCV_${__CVLIB}_LIBRARY_DEBUG AND OpenCV_${__CVLIB}_LIBRARY_RELEASE) + set(OpenCV_${__CVLIB}_LIBRARY debug ${OpenCV_${__CVLIB}_LIBRARY_DEBUG} optimized ${OpenCV_${__CVLIB}_LIBRARY_RELEASE} CACHE STRING "" FORCE) + #only debug + elseif(OpenCV_${__CVLIB}_LIBRARY_DEBUG) + set(OpenCV_${__CVLIB}_LIBRARY ${OpenCV_${__CVLIB}_LIBRARY_DEBUG} CACHE STRING "" FORCE) + #only release + elseif(OpenCV_${__CVLIB}_LIBRARY_RELEASE) + set(OpenCV_${__CVLIB}_LIBRARY ${OpenCV_${__CVLIB}_LIBRARY_RELEASE} CACHE STRING "" FORCE) + #no library found + else() + set(OpenCV_FOUND_TMP FALSE) + endif() + + #Add to the general list + if(OpenCV_${__CVLIB}_LIBRARY) + set(OpenCV_LIBS ${OpenCV_LIBS} ${OpenCV_${__CVLIB}_LIBRARY}) + endif(OpenCV_${__CVLIB}_LIBRARY) + + endforeach(__CVLIB) + + + set(OpenCV_FOUND ${OpenCV_FOUND_TMP} CACHE BOOL "" FORCE) + + +else(EXISTS "${OpenCV_DIR}") + set(ERR_MSG "Please specify OpenCV directory using OpenCV_DIR env. variable") +endif(EXISTS "${OpenCV_DIR}") +##==================================================== + +if(NOT OpenCV_FOUND) + include(FindPkgConfig) + if (PKG_CONFIG_FOUND) + pkg_check_modules(OpenCV opencv) + endif (PKG_CONFIG_FOUND) + set(OpenCV_DIR "${OpenCV_PREFIX}") + + find_path(OpenCV_INCLUDE_DIR + NAMES cv.h + PATHS ${OpenCV_INCLUDEDIR} ${OpenCV_PREFIX}/include/opencv /usr/local/include/opencv /usr/include/opencv + NO_DEFAULT_PATH + ) + + find_library(OpenCV_LIBS + NAMES cv + PATHS ${OpenCV_LIBDIR} ${OpenCV_PREFIX}/lib /usr/lib /usr/local/lib + NO_DEFAULT_PATH + ) + + if(OpenCV_INCLUDE_DIR AND OpenCV_LIBS) + set(OpenCV_FOUND TRUE) + message(STATUS "OpenCV found in: ${OpenCV_PREFIX}") + endif(OpenCV_INCLUDE_DIR AND OpenCV_LIBS) + + +endif(NOT OpenCV_FOUND) + + +##==================================================== +## Print message +##---------------------------------------------------- +if(NOT OpenCV_FOUND) + # make FIND_PACKAGE friendly + if(NOT OpenCV_FIND_QUIETLY) + if(OpenCV_FIND_REQUIRED) + message(FATAL_ERROR "OpenCV required but some headers or libs not found. ${ERR_MSG}") + else(OpenCV_FIND_REQUIRED) + message(STATUS "WARNING: OpenCV was not found. ${ERR_MSG}") + endif(OpenCV_FIND_REQUIRED) + endif(NOT OpenCV_FIND_QUIETLY) +endif(NOT OpenCV_FOUND) +##==================================================== + + +##==================================================== +## Backward compatibility +##---------------------------------------------------- +if(OpenCV_FOUND) +option(OpenCV_BACKWARD_COMPA "Add some variable to make this script compatible with the other version of FindOpenCV.cmake" false) +if(OpenCV_BACKWARD_COMPA) + find_path(OpenCV_INCLUDE_DIRS "cv.h" PATHS "${OpenCV_DIR}" PATH_SUFFIXES "include" "include/opencv" DOC "Include directory") + find_path(OpenCV_INCLUDE_DIR "cv.h" PATHS "${OpenCV_DIR}" PATH_SUFFIXES "include" "include/opencv" DOC "Include directory") + set(OpenCV_LIBRARIES "${OpenCV_LIBS}" CACHE STRING "" FORCE) +endif(OpenCV_BACKWARD_COMPA) +endif(OpenCV_FOUND) +##==================================================== diff --git a/cmake/modules/TargetDistclean.cmake b/cmake/modules/TargetDistclean.cmake new file mode 100644 index 0000000..5abbb35 --- /dev/null +++ b/cmake/modules/TargetDistclean.cmake @@ -0,0 +1,28 @@ +# add custom target distclean +# cleans and removes cmake generated files etc. +# Jan Woetzel 04/2003 +# + +IF (UNIX) + ADD_CUSTOM_TARGET (distclean @echo cleaning for source distribution) + SET(DISTCLEANED + cmake.depends + cmake.check_depends + CMakeCache.txt + cmake.check_cache + *.cmake + Makefile + core core.* + gmon.out + *~ + ) + + ADD_CUSTOM_COMMAND( + DEPENDS clean + COMMENT "distribution clean" + COMMAND rm + ARGS -Rf CMakeTmp ${DISTCLEANED} + TARGET distclean + ) +ENDIF(UNIX) + diff --git a/configure b/configure index ce23d7c..6018c80 100755 --- a/configure +++ b/configure @@ -1,12 +1,14 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.64 for frei0r-plugins 1.1.22. +# Generated by GNU Autoconf 2.67 for frei0r-plugins 1.3.0. # -# Report bugs to . +# Report bugs to . +# # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software +# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software # Foundation, Inc. +# # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. @@ -229,10 +231,10 @@ $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org and -$0: richard.spindler@gmail.com about your system, including -$0: any error possibly output before this message. Then -$0: install a modern shell, or manually run the script -$0: under such a shell if you do have one." +$0: frei0r-devel@piksel.no about your system, including any +$0: error possibly output before this message. Then install +$0: a modern shell, or manually run the script under such a +$0: shell if you do have one." fi exit 1 fi @@ -317,7 +319,7 @@ test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p @@ -357,19 +359,19 @@ fi # as_fn_arith -# as_fn_error ERROR [LINENO LOG_FD] -# --------------------------------- +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with status $?, using 1 if that was 0. +# script with STATUS, using 1 if that was 0. as_fn_error () { - as_status=$?; test $as_status -eq 0 && as_status=1 - if test "$3"; then - as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - $as_echo "$as_me: error: $1" >&2 + $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error @@ -676,10 +678,11 @@ -exec 7<&0 &1 +test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. -# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, +# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` @@ -698,9 +701,9 @@ # Identity of this package. PACKAGE_NAME='frei0r-plugins' PACKAGE_TARNAME='frei0r-plugins' -PACKAGE_VERSION='1.1.22' -PACKAGE_STRING='frei0r-plugins 1.1.22' -PACKAGE_BUGREPORT='richard.spindler@gmail.com' +PACKAGE_VERSION='1.3.0' +PACKAGE_STRING='frei0r-plugins 1.3.0' +PACKAGE_BUGREPORT='frei0r-devel@piksel.no' PACKAGE_URL='' # Factoring default headers for most tests. @@ -742,16 +745,22 @@ ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS +DOXYGEN HAVE_GAVL_FALSE HAVE_GAVL_TRUE GAVL_LIBS GAVL_CFLAGS +HAVE_OPENCV HAVE_OPENCV_FALSE HAVE_OPENCV_TRUE OPENCV_LIBS OPENCV_CFLAGS +PKG_CONFIG_LIBDIR +PKG_CONFIG_PATH PKG_CONFIG LIBOBJS +PACKAGE_DATA_DIR +PACKAGE_LIB_DIR CXXCPP CPP OTOOL64 @@ -868,8 +877,8 @@ ac_user_opts=' enable_option_checking enable_dependency_tracking +enable_static enable_shared -enable_static with_pic enable_fast_install with_gnu_ld @@ -890,6 +899,8 @@ CPP CXXCPP PKG_CONFIG +PKG_CONFIG_PATH +PKG_CONFIG_LIBDIR OPENCV_CFLAGS OPENCV_LIBS GAVL_CFLAGS @@ -956,8 +967,9 @@ fi case $ac_option in - *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *) ac_optarg=yes ;; + *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *=) ac_optarg= ;; + *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. @@ -1002,7 +1014,7 @@ ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid feature name: $ac_useropt" + as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1028,7 +1040,7 @@ ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid feature name: $ac_useropt" + as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1232,7 +1244,7 @@ ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid package name: $ac_useropt" + as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1248,7 +1260,7 @@ ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid package name: $ac_useropt" + as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1278,8 +1290,8 @@ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; - -*) as_fn_error "unrecognized option: \`$ac_option' -Try \`$0 --help' for more information." + -*) as_fn_error $? "unrecognized option: \`$ac_option' +Try \`$0 --help' for more information" ;; *=*) @@ -1287,7 +1299,7 @@ # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) - as_fn_error "invalid variable name: \`$ac_envvar'" ;; + as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; @@ -1305,13 +1317,13 @@ if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` - as_fn_error "missing argument to $ac_option" + as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; - fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;; + fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi @@ -1334,7 +1346,7 @@ [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac - as_fn_error "expected an absolute directory name for --$ac_var: $ac_val" + as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' @@ -1348,8 +1360,8 @@ if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used." >&2 + $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used" >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi @@ -1364,9 +1376,9 @@ ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - as_fn_error "working directory cannot be determined" + as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - as_fn_error "pwd does not report name of working directory" + as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. @@ -1405,11 +1417,11 @@ fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - as_fn_error "cannot find sources ($ac_unique_file) in $srcdir" + as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg" + cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then @@ -1435,7 +1447,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures frei0r-plugins 1.1.22 to adapt to many kinds of systems. +\`configure' configures frei0r-plugins 1.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1449,7 +1461,7 @@ --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking...' messages + -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files @@ -1505,7 +1517,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of frei0r-plugins 1.1.22:";; + short | recursive ) echo "Configuration of frei0r-plugins 1.3.0:";; esac cat <<\_ACEOF @@ -1515,8 +1527,8 @@ --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors + --enable-static[=PKGS] build static libraries [default=no] --enable-shared[=PKGS] build shared libraries [default=yes] - --enable-static[=PKGS] build static libraries [default=yes] --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) @@ -1535,13 +1547,17 @@ LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l - CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if + CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CC C compiler command CFLAGS C compiler flags CPP C preprocessor CXXCPP C++ preprocessor PKG_CONFIG path to pkg-config utility + PKG_CONFIG_PATH + directories to add to pkg-config's search path + PKG_CONFIG_LIBDIR + path overriding pkg-config's built-in search path OPENCV_CFLAGS C compiler flags for OPENCV, overriding pkg-config OPENCV_LIBS linker flags for OPENCV, overriding pkg-config @@ -1551,7 +1567,7 @@ Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. -Report bugs to . +Report bugs to . _ACEOF ac_status=$? fi @@ -1614,10 +1630,10 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -frei0r-plugins configure 1.1.22 -generated by GNU Autoconf 2.64 - -Copyright (C) 2009 Free Software Foundation, Inc. +frei0r-plugins configure 1.3.0 +generated by GNU Autoconf 2.67 + +Copyright (C) 2010 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1662,7 +1678,7 @@ ac_retval=1 fi eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - return $ac_retval + as_fn_set_status $ac_retval } # ac_fn_cxx_try_compile @@ -1700,7 +1716,7 @@ ac_retval=1 fi eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - return $ac_retval + as_fn_set_status $ac_retval } # ac_fn_c_try_compile @@ -1746,7 +1762,7 @@ # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - return $ac_retval + as_fn_set_status $ac_retval } # ac_fn_c_try_link @@ -1759,7 +1775,7 @@ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval "test \"\${$3+set}\"" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -1802,7 +1818,7 @@ mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } >/dev/null && { + test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : @@ -1814,7 +1830,7 @@ ac_retval=1 fi eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - return $ac_retval + as_fn_set_status $ac_retval } # ac_fn_c_try_cpp @@ -1856,7 +1872,7 @@ fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - return $ac_retval + as_fn_set_status $ac_retval } # ac_fn_c_try_run @@ -1868,7 +1884,7 @@ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval "test \"\${$3+set}\"" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -1948,7 +1964,7 @@ mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } >/dev/null && { + test $ac_status = 0; } > conftest.i && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then : @@ -1960,7 +1976,7 @@ ac_retval=1 fi eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - return $ac_retval + as_fn_set_status $ac_retval } # ac_fn_cxx_try_cpp @@ -2006,7 +2022,7 @@ # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - return $ac_retval + as_fn_set_status $ac_retval } # ac_fn_cxx_try_link @@ -2018,10 +2034,10 @@ ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + if eval "test \"\${$3+set}\"" = set; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval "test \"\${$3+set}\"" = set; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 @@ -2057,7 +2073,7 @@ else ac_header_preproc=no fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } @@ -2080,17 +2096,15 @@ $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} -( cat <<\_ASBOX -## ----------------------------------------- ## -## Report this to richard.spindler@gmail.com ## -## ----------------------------------------- ## -_ASBOX +( $as_echo "## ------------------------------------- ## +## Report this to frei0r-devel@piksel.no ## +## ------------------------------------- ##" ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval "test \"\${$3+set}\"" = set; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" @@ -2112,7 +2126,7 @@ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval "test \"\${$3+set}\"" = set; then : $as_echo_n "(cached) " >&6 else eval "$3=no" @@ -2160,8 +2174,8 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by frei0r-plugins $as_me 1.1.22, which was -generated by GNU Autoconf 2.64. Invocation command line was +It was created by frei0r-plugins $as_me 1.3.0, which was +generated by GNU Autoconf 2.67. Invocation command line was $ $0 $@ @@ -2271,11 +2285,9 @@ { echo - cat <<\_ASBOX -## ---------------- ## + $as_echo "## ---------------- ## ## Cache variables. ## -## ---------------- ## -_ASBOX +## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( @@ -2309,11 +2321,9 @@ ) echo - cat <<\_ASBOX -## ----------------- ## + $as_echo "## ----------------- ## ## Output variables. ## -## ----------------- ## -_ASBOX +## ----------------- ##" echo for ac_var in $ac_subst_vars do @@ -2326,11 +2336,9 @@ echo if test -n "$ac_subst_files"; then - cat <<\_ASBOX -## ------------------- ## + $as_echo "## ------------------- ## ## File substitutions. ## -## ------------------- ## -_ASBOX +## ------------------- ##" echo for ac_var in $ac_subst_files do @@ -2344,11 +2352,9 @@ fi if test -s confdefs.h; then - cat <<\_ASBOX -## ----------- ## + $as_echo "## ----------- ## ## confdefs.h. ## -## ----------- ## -_ASBOX +## ----------- ##" echo cat confdefs.h echo @@ -2403,7 +2409,12 @@ ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then - ac_site_file1=$CONFIG_SITE + # We do not want a PATH search for config.site. + case $CONFIG_SITE in #(( + -*) ac_site_file1=./$CONFIG_SITE;; + */*) ac_site_file1=$CONFIG_SITE;; + *) ac_site_file1=./$CONFIG_SITE;; + esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site @@ -2414,18 +2425,22 @@ for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue - if test -r "$ac_site_file"; then + if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" + . "$ac_site_file" \ + || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "failed to load site script $ac_site_file +See \`config.log' for more details" "$LINENO" 5 ; } fi done if test -r "$cache_file"; then - # Some versions of bash will fail to source /dev/null (special - # files actually), so we avoid doing that. - if test -f "$cache_file"; then + # Some versions of bash will fail to source /dev/null (special files + # actually), so we avoid doing that. DJGPP emulates it as a regular file. + if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in @@ -2494,7 +2509,7 @@ $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 + as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## @@ -2513,16 +2528,22 @@ ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do - for ac_t in install-sh install.sh shtool; do - if test -f "$ac_dir/$ac_t"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/$ac_t -c" - break 2 - fi - done + if test -f "$ac_dir/install-sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f "$ac_dir/install.sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f "$ac_dir/shtool"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi done if test -z "$ac_aux_dir"; then - as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 + as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 fi # These three variables are undocumented and unsupported, @@ -2638,11 +2659,11 @@ ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) - as_fn_error "unsafe absolute working directory name" "$LINENO" 5;; + as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5 ;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) - as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; + as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5 ;; esac # Do `set' in a subshell so we don't clobber the current shell's @@ -2664,7 +2685,7 @@ # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". - as_fn_error "ls -t appears to fail. Make sure there is not a broken + as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi @@ -2674,7 +2695,7 @@ # Ok. : else - as_fn_error "newly created file is older than distributed files! + as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 @@ -2846,6 +2867,7 @@ fi + test -d ./--version && rmdir ./--version if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else @@ -2853,7 +2875,6 @@ # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. - test -d ./--version && rmdir ./--version MKDIR_P="$ac_install_sh -d" fi fi @@ -2912,7 +2933,7 @@ $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF @@ -2920,7 +2941,7 @@ all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF -# GNU make sometimes prints "make[1]: Entering...", which would confuse us. +# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; @@ -2954,7 +2975,7 @@ am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then - as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 + as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi @@ -2970,7 +2991,7 @@ # Define the identity of the package. PACKAGE=frei0r-plugins - VERSION=1.1.22 + VERSION=1.3.0 cat >>confdefs.h <<_ACEOF @@ -3142,32 +3163,30 @@ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 - rm -f conftest.er1 conftest.err fi + rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include + int main () { -FILE *f = fopen ("conftest.out", "w"); - return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out" +ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler default output file name" >&5 -$as_echo_n "checking for C++ compiler default output file name... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C++ compiler works" >&5 +$as_echo_n "checking whether the C++ compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: @@ -3229,62 +3248,28 @@ else ac_file='' fi +if test -z "$ac_file"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "C++ compiler cannot create executables +See \`config.log' for more details" "$LINENO" 5 ; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler default output file name" >&5 +$as_echo_n "checking for C++ compiler default output file name... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } -if test -z "$ac_file"; then : - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ as_fn_set_status 77 -as_fn_error "C++ compiler cannot create executables -See \`config.log' for more details." "$LINENO" 5; }; } -fi ac_exeext=$ac_cv_exeext -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C++ compiler works" >&5 -$as_echo_n "checking whether the C++ compiler works... " >&6; } -# If not cross compiling, check that we can run a simple program. -if test "$cross_compiling" != yes; then - if { ac_try='./$ac_file' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then - cross_compiling=no - else - if test "$cross_compiling" = maybe; then - cross_compiling=yes - else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot run C++ compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details." "$LINENO" 5; } - fi - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out +rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 -$as_echo_n "checking whether we are cross compiling... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 -$as_echo "$cross_compiling" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" @@ -3314,16 +3299,75 @@ else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." "$LINENO" 5; } -fi -rm -f conftest$ac_cv_exeext +as_fn_error $? "cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details" "$LINENO" 5 ; } +fi +rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +FILE *f = fopen ("conftest.out", "w"); + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +ac_clean_files="$ac_clean_files conftest.out" +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 +$as_echo_n "checking whether we are cross compiling... " >&6; } +if test "$cross_compiling" != yes; then + { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if { ac_try='./conftest$ac_cv_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run C++ compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details" "$LINENO" 5 ; } + fi + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 +$as_echo "$cross_compiling" >&6; } + +rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out +ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if test "${ac_cv_objext+set}" = set; then : @@ -3366,8 +3410,8 @@ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot compute suffix of object files: cannot compile -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "cannot compute suffix of object files: cannot compile +See \`config.log' for more details" "$LINENO" 5 ; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi @@ -3985,8 +4029,8 @@ test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "no acceptable C compiler found in \$PATH -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "no acceptable C compiler found in \$PATH +See \`config.log' for more details" "$LINENO" 5 ; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 @@ -4007,8 +4051,8 @@ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 - rm -f conftest.er1 conftest.err fi + rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done @@ -4556,7 +4600,7 @@ # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 + as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } @@ -4567,16 +4611,16 @@ test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && - as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5 + as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; -*) as_fn_error "invalid value of canonical build" "$LINENO" 5;; +*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' @@ -4601,7 +4645,7 @@ ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi @@ -4609,7 +4653,7 @@ $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; -*) as_fn_error "invalid value of canonical host" "$LINENO" 5;; +*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' @@ -4682,7 +4726,7 @@ done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then - as_fn_error "no acceptable sed could be found in \$PATH" "$LINENO" 5 + as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi else ac_cv_path_SED=$SED @@ -4758,7 +4802,7 @@ done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then - as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP @@ -4824,7 +4868,7 @@ done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then - as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP @@ -4891,7 +4935,7 @@ done IFS=$as_save_IFS if test -z "$ac_cv_path_FGREP"; then - as_fn_error "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_FGREP=$FGREP @@ -5007,7 +5051,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi -test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5 +test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if test "${lt_cv_prog_gnu_ld+set}" = set; then : @@ -5209,13 +5253,13 @@ else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:5212: $ac_compile\"" >&5) + (eval echo "\"\$as_me:5256: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 - (eval echo "\"\$as_me:5215: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval echo "\"\$as_me:5259: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 - (eval echo "\"\$as_me:5218: output\"" >&5) + (eval echo "\"\$as_me:5262: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" @@ -5681,7 +5725,7 @@ ;; # This must be Linux ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) +linux* | k*bsd*-gnu) lt_cv_deplibs_check_method=pass_all ;; @@ -6421,7 +6465,7 @@ ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 6424 "configure"' > conftest.$ac_ext + echo '#line 6468 "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -7210,7 +7254,7 @@ # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -7226,11 +7270,11 @@ ac_preproc_ok=: break fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext +rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi @@ -7269,7 +7313,7 @@ # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -7285,18 +7329,18 @@ ac_preproc_ok=: break fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext +rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5 ; } fi ac_ext=c @@ -7425,8 +7469,7 @@ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -7581,8 +7624,8 @@ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 - rm -f conftest.er1 conftest.err fi + rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done @@ -7876,7 +7919,7 @@ # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -7892,11 +7935,11 @@ ac_preproc_ok=: break fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext +rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi @@ -7935,7 +7978,7 @@ # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -7951,11 +7994,11 @@ ac_preproc_ok=: break fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext +rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else @@ -7979,6 +8022,35 @@ # Set options +# Check whether --enable-static was given. +if test "${enable_static+set}" = set; then : + enableval=$enable_static; p=${PACKAGE-default} + case $enableval in + yes) enable_static=yes ;; + no) enable_static=no ;; + *) + enable_static=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_static=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + enable_static=no +fi + + + + + + + @@ -8011,36 +8083,6 @@ enable_shared=yes fi - - - - - - - - - # Check whether --enable-static was given. -if test "${enable_static+set}" = set; then : - enableval=$enable_static; p=${PACKAGE-default} - case $enableval in - yes) enable_static=yes ;; - no) enable_static=no ;; - *) - enable_static=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_static=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac -else - enable_static=yes -fi @@ -8449,6 +8491,10 @@ $RM -r conftest* +## CAVEAT EMPTOR: +## There is no encapsulation within the following macros, do not change +## the running order or otherwise move them around unless you know exactly +## what you are doing... if test -n "$compiler"; then lt_prog_compiler_no_builtin_flag= @@ -8474,11 +8520,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8477: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8523: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:8481: \$? = $ac_status" >&5 + echo "$as_me:8527: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -8643,7 +8689,7 @@ lt_prog_compiler_static='-non_shared' ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu) + linux* | k*bsd*-gnu) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) @@ -8813,11 +8859,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8816: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8862: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:8820: \$? = $ac_status" >&5 + echo "$as_me:8866: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -8918,11 +8964,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8921: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8967: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:8925: \$? = $ac_status" >&5 + echo "$as_me:8971: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -8973,11 +9019,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8976: $lt_compile\"" >&5) + (eval echo "\"\$as_me:9022: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:8980: \$? = $ac_status" >&5 + echo "$as_me:9026: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -9116,7 +9162,6 @@ fi supports_anon_versioning=no case `$LD -v 2>&1` in - *GNU\ gold*) supports_anon_versioning=yes ;; *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... @@ -9208,7 +9253,7 @@ archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; - gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) + gnu* | linux* | tpf* | k*bsd*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in @@ -10670,7 +10715,7 @@ ;; # This must be Linux ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) +linux* | k*bsd*-gnu) version_type=linux need_lib_prefix=no need_version=no @@ -11357,7 +11402,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11360 "configure" +#line 11405 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11453,7 +11498,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11456 "configure" +#line 11501 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11868,7 +11913,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi -test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5 +test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if test "${lt_cv_prog_gnu_ld+set}" = set; then : @@ -12393,7 +12438,7 @@ inherit_rpath_CXX=yes ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu) + linux* | k*bsd*-gnu) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler @@ -13221,7 +13266,7 @@ ;; esac ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu) + linux* | k*bsd*-gnu) case $cc_basename in KCC*) # KAI C++ Compiler @@ -13409,11 +13454,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:13412: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13457: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:13416: \$? = $ac_status" >&5 + echo "$as_me:13461: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -13508,11 +13553,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:13511: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13556: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:13515: \$? = $ac_status" >&5 + echo "$as_me:13560: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -13560,11 +13605,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:13563: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13608: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:13567: \$? = $ac_status" >&5 + echo "$as_me:13612: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -14138,7 +14183,7 @@ ;; # This must be Linux ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) +linux* | k*bsd*-gnu) version_type=linux need_lib_prefix=no need_version=no @@ -14528,7 +14573,16 @@ + ac_config_headers="$ac_config_headers include/config.h" + + +if test "x${prefix}" = "xNONE"; then + prefix=${ac_default_prefix} +fi +PACKAGE_LIB_DIR="${prefix}/lib/frei0r-1" + +PACKAGE_DATA_DIR="${prefix}/share/frei0r-1" { $as_echo "$as_me:${as_lineno-$LINENO}: checking host platform" >&5 @@ -14723,8 +14777,7 @@ do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -15040,8 +15093,7 @@ do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -eval as_val=\$$as_ac_var - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF @@ -15051,6 +15103,10 @@ HAVE_OPENCV=false + + + + if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then @@ -15165,18 +15221,16 @@ $as_echo "no" >&6; } PKG_CONFIG="" fi - fi pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OPENCV" >&5 $as_echo_n "checking for OPENCV... " >&6; } -if test -n "$PKG_CONFIG"; then - if test -n "$OPENCV_CFLAGS"; then - pkg_cv_OPENCV_CFLAGS="$OPENCV_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ +if test -n "$OPENCV_CFLAGS"; then + pkg_cv_OPENCV_CFLAGS="$OPENCV_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"opencv >= 1.0.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "opencv >= 1.0.0") 2>&5 ac_status=$? @@ -15186,15 +15240,13 @@ else pkg_failed=yes fi - fi -else - pkg_failed=untried -fi -if test -n "$PKG_CONFIG"; then - if test -n "$OPENCV_LIBS"; then - pkg_cv_OPENCV_LIBS="$OPENCV_LIBS" - else - if test -n "$PKG_CONFIG" && \ + else + pkg_failed=untried +fi +if test -n "$OPENCV_LIBS"; then + pkg_cv_OPENCV_LIBS="$OPENCV_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"opencv >= 1.0.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "opencv >= 1.0.0") 2>&5 ac_status=$? @@ -15204,14 +15256,15 @@ else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -15219,17 +15272,17 @@ _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - OPENCV_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "opencv >= 1.0.0"` + OPENCV_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "opencv >= 1.0.0" 2>&1` else - OPENCV_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "opencv >= 1.0.0"` + OPENCV_PKG_ERRORS=`$PKG_CONFIG --print-errors "opencv >= 1.0.0" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$OPENCV_PKG_ERRORS" >&5 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + true +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } - true -elif test $pkg_failed = untried; then true else OPENCV_CFLAGS=$pkg_cv_OPENCV_CFLAGS @@ -15247,8 +15300,15 @@ fi if test x$HAVE_OPENCV = xtrue; then - OPENCV_CFLAGS="$OPENCV_CFLAGS -DOPENCV_PREFIX=`pkg-config opencv --variable=prefix`" -fi +# OPENCV_CFLAGS="$OPENCV_CFLAGS -DOPENCV_PREFIX=`pkg-config opencv --variable=prefix`" + +$as_echo "#define HAVE_OPENCV 1" >>confdefs.h + + +$as_echo "#define OPENCV_DATA_DIR \${prefix}/share/opencv" >>confdefs.h + +fi + HAVE_GAVL=false @@ -15256,11 +15316,10 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GAVL" >&5 $as_echo_n "checking for GAVL... " >&6; } -if test -n "$PKG_CONFIG"; then - if test -n "$GAVL_CFLAGS"; then - pkg_cv_GAVL_CFLAGS="$GAVL_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ +if test -n "$GAVL_CFLAGS"; then + pkg_cv_GAVL_CFLAGS="$GAVL_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gavl >= 0.2.3\""; } >&5 ($PKG_CONFIG --exists --print-errors "gavl >= 0.2.3") 2>&5 ac_status=$? @@ -15270,15 +15329,13 @@ else pkg_failed=yes fi - fi -else - pkg_failed=untried -fi -if test -n "$PKG_CONFIG"; then - if test -n "$GAVL_LIBS"; then - pkg_cv_GAVL_LIBS="$GAVL_LIBS" - else - if test -n "$PKG_CONFIG" && \ + else + pkg_failed=untried +fi +if test -n "$GAVL_LIBS"; then + pkg_cv_GAVL_LIBS="$GAVL_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gavl >= 0.2.3\""; } >&5 ($PKG_CONFIG --exists --print-errors "gavl >= 0.2.3") 2>&5 ac_status=$? @@ -15288,14 +15345,15 @@ else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -15303,17 +15361,17 @@ _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - GAVL_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "gavl >= 0.2.3"` + GAVL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "gavl >= 0.2.3" 2>&1` else - GAVL_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gavl >= 0.2.3"` + GAVL_PKG_ERRORS=`$PKG_CONFIG --print-errors "gavl >= 0.2.3" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$GAVL_PKG_ERRORS" >&5 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + true +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } - true -elif test $pkg_failed = untried; then true else GAVL_CFLAGS=$pkg_cv_GAVL_CFLAGS @@ -15331,7 +15389,46 @@ fi -ac_config_files="$ac_config_files frei0r.pc Makefile include/Makefile src/Makefile doc/Makefile doc/html/Makefile" +# Extract the first word of "doxygen", so it can be a program name with args. +set dummy doxygen; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_DOXYGEN+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$DOXYGEN"; then + ac_cv_prog_DOXYGEN="$DOXYGEN" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_DOXYGEN="doxygen" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +DOXYGEN=$ac_cv_prog_DOXYGEN +if test -n "$DOXYGEN"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOXYGEN" >&5 +$as_echo "$DOXYGEN" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + + +ac_config_files="$ac_config_files frei0r.pc Makefile include/Makefile src/Makefile doc/Makefile" cat >confcache <<\_ACEOF @@ -15417,6 +15514,7 @@ ac_libobjs= ac_ltlibobjs= +U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' @@ -15440,27 +15538,27 @@ fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then - as_fn_error "conditional \"AMDEP\" was never defined. + as_fn_error $? "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then - as_fn_error "conditional \"am__fastdepCXX\" was never defined. + as_fn_error $? "conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then - as_fn_error "conditional \"am__fastdepCC\" was never defined. + as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then - as_fn_error "conditional \"am__fastdepCXX\" was never defined. + as_fn_error $? "conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_OPENCV_TRUE}" && test -z "${HAVE_OPENCV_FALSE}"; then - as_fn_error "conditional \"HAVE_OPENCV\" was never defined. + as_fn_error $? "conditional \"HAVE_OPENCV\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_GAVL_TRUE}" && test -z "${HAVE_GAVL_FALSE}"; then - as_fn_error "conditional \"HAVE_GAVL\" was never defined. + as_fn_error $? "conditional \"HAVE_GAVL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi @@ -15610,19 +15708,19 @@ (unset CDPATH) >/dev/null 2>&1 && unset CDPATH -# as_fn_error ERROR [LINENO LOG_FD] -# --------------------------------- +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with status $?, using 1 if that was 0. +# script with STATUS, using 1 if that was 0. as_fn_error () { - as_status=$?; test $as_status -eq 0 && as_status=1 - if test "$3"; then - as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - $as_echo "$as_me: error: $1" >&2 + $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error @@ -15818,7 +15916,7 @@ test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p @@ -15871,8 +15969,8 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by frei0r-plugins $as_me 1.1.22, which was -generated by GNU Autoconf 2.64. Invocation command line was +This file was extended by frei0r-plugins $as_me 1.3.0, which was +generated by GNU Autoconf 2.67. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -15912,6 +16010,7 @@ -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit + --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files @@ -15930,16 +16029,17 @@ Configuration commands: $config_commands -Report bugs to ." +Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -frei0r-plugins config.status 1.1.22 -configured by $0, generated by GNU Autoconf 2.64, - with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" - -Copyright (C) 2009 Free Software Foundation, Inc. +frei0r-plugins config.status 1.3.0 +configured by $0, generated by GNU Autoconf 2.67, + with options \\"\$ac_cs_config\\" + +Copyright (C) 2010 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -15957,9 +16057,14 @@ while test $# != 0 do case $1 in - --*=*) + --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` + ac_shift=: + ;; + --*=) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg= ac_shift=: ;; *) @@ -15975,12 +16080,15 @@ ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; + --config | --confi | --conf | --con | --co | --c ) + $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; @@ -15993,7 +16101,7 @@ ac_need_defaults=false;; --he | --h) # Conflict between --help and --header - as_fn_error "ambiguous option: \`$1' + as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; @@ -16002,7 +16110,7 @@ ac_cs_silent=: ;; # This is an error. - -*) as_fn_error "unrecognized option: \`$1' + -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" @@ -16058,8 +16166,8 @@ delay_variable_subst='$delay_variable_subst' macro_version='`$ECHO "X$macro_version" | $Xsed -e "$delay_single_quote_subst"`' macro_revision='`$ECHO "X$macro_revision" | $Xsed -e "$delay_single_quote_subst"`' +enable_static='`$ECHO "X$enable_static" | $Xsed -e "$delay_single_quote_subst"`' enable_shared='`$ECHO "X$enable_shared" | $Xsed -e "$delay_single_quote_subst"`' -enable_static='`$ECHO "X$enable_static" | $Xsed -e "$delay_single_quote_subst"`' pic_mode='`$ECHO "X$pic_mode" | $Xsed -e "$delay_single_quote_subst"`' enable_fast_install='`$ECHO "X$enable_fast_install" | $Xsed -e "$delay_single_quote_subst"`' host_alias='`$ECHO "X$host_alias" | $Xsed -e "$delay_single_quote_subst"`' @@ -16415,9 +16523,8 @@ "include/Makefile") CONFIG_FILES="$CONFIG_FILES include/Makefile" ;; "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; - "doc/html/Makefile") CONFIG_FILES="$CONFIG_FILES doc/html/Makefile" ;; - - *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;; esac done @@ -16455,7 +16562,7 @@ { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") -} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 +} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. @@ -16472,7 +16579,7 @@ fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then - ac_cs_awk_cr='\r' + ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi @@ -16486,18 +16593,18 @@ echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 -ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 +ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi @@ -16519,7 +16626,7 @@ t delim :nl h -s/\(.\{148\}\).*/\1/ +s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p @@ -16533,7 +16640,7 @@ t nl :delim h -s/\(.\{148\}\).*/\1/ +s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p @@ -16586,20 +16693,28 @@ else cat fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ - || as_fn_error "could not setup config files machinery" "$LINENO" 5 + || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# VPATH may cause trouble with some makes, so we remove sole $(srcdir), +# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/ -s/:*\${srcdir}:*/:/ -s/:*@srcdir@:*/:/ -s/^\([^=]*=[ ]*\):*/\1/ + ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ +h +s/// +s/^/:/ +s/[ ]*$/:/ +s/:\$(srcdir):/:/g +s/:\${srcdir}:/:/g +s/:@srcdir@:/:/g +s/^:*// s/:*$// +x +s/\(=[ ]*\).*/\1/ +G +s/\n// s/^[^=]*=[ ]*$// }' fi @@ -16627,7 +16742,7 @@ if test -z "$ac_t"; then break elif $ac_last_try; then - as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5 + as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi @@ -16712,7 +16827,7 @@ _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - as_fn_error "could not setup config headers machinery" "$LINENO" 5 + as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" @@ -16725,7 +16840,7 @@ esac case $ac_mode$ac_tag in :[FHL]*:*);; - :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; + :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac @@ -16753,7 +16868,7 @@ [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || - as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; + as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" @@ -16780,7 +16895,7 @@ case $ac_tag in *:-:* | *:-) cat >"$tmp/stdin" \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac @@ -16917,22 +17032,22 @@ $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&5 +which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&2;} +which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$tmp/stdin" case $ac_file in -) cat "$tmp/out" && rm -f "$tmp/out";; *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; esac \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # @@ -16943,19 +17058,19 @@ $as_echo "/* $configure_input */" \ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" } >"$tmp/config.h" \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$tmp/config.h" "$ac_file" \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ - || as_fn_error "could not create -" "$LINENO" 5 + || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" @@ -17152,11 +17267,11 @@ macro_version=$macro_version macro_revision=$macro_revision +# Whether or not to build static libraries. +build_old_libs=$enable_static + # Whether or not to build shared libraries. build_libtool_libs=$enable_shared - -# Whether or not to build static libraries. -build_old_libs=$enable_static # What type of objects to build. pic_mode=$pic_mode @@ -17907,7 +18022,7 @@ ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || - as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5 + as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. @@ -17928,7 +18043,7 @@ exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. - $ac_cs_success || as_fn_exit $? + $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 @@ -17950,6 +18065,7 @@ if test x$HAVE_OPENCV = xtrue; then echo " - opencv: YES" +echo " data dir: $OPENCV_DATA_DIR" else echo " - opencv: NO" echo " opencv >= 1.0.0 not found - this program enables optional" diff --git a/configure.ac b/configure.ac index 44ce0ee..4313f88 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ(2.59c) -AC_INIT(frei0r-plugins, [1.1.22], [richard.spindler@gmail.com]) +AC_INIT(frei0r-plugins, [1.3.0], [frei0r-devel@piksel.no]) AC_CONFIG_MACRO_DIR([m4]) AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION) @@ -11,9 +11,18 @@ AC_PROG_CXX AC_PROG_CC AC_PROG_CC_C99 -AC_PROG_LIBTOOL +LT_INIT([disable-static]) + AC_CONFIG_HEADERS([include/config.h]) + +if test "x${prefix}" = "xNONE"; then + prefix=${ac_default_prefix} +fi +PACKAGE_LIB_DIR="${prefix}/lib/frei0r-1" +AC_SUBST(PACKAGE_LIB_DIR) +PACKAGE_DATA_DIR="${prefix}/share/frei0r-1" +AC_SUBST(PACKAGE_DATA_DIR) AC_MSG_CHECKING([host platform]) case $host_os in @@ -88,12 +97,18 @@ PKG_CHECK_MODULES(OPENCV, opencv >= 1.0.0, [HAVE_OPENCV=true], [true]) AM_CONDITIONAL([HAVE_OPENCV], [test x$HAVE_OPENCV = xtrue]) if test x$HAVE_OPENCV = xtrue; then - OPENCV_CFLAGS="$OPENCV_CFLAGS -DOPENCV_PREFIX=`pkg-config opencv --variable=prefix`" +# OPENCV_CFLAGS="$OPENCV_CFLAGS -DOPENCV_PREFIX=`pkg-config opencv --variable=prefix`" + AC_DEFINE(HAVE_OPENCV,1,[compiled including opencv]) + AC_DEFINE(OPENCV_DATA_DIR,[${prefix}/share/opencv],opencv data prefix) fi +AC_SUBST(HAVE_OPENCV) HAVE_GAVL=false PKG_CHECK_MODULES(GAVL, gavl >= 0.2.3, [HAVE_GAVL=true], [true]) AM_CONDITIONAL([HAVE_GAVL], [test x$HAVE_GAVL = xtrue]) + +AC_CHECK_PROG([DOXYGEN], [doxygen], [doxygen]) + AC_CONFIG_FILES([ frei0r.pc @@ -101,7 +116,6 @@ include/Makefile src/Makefile doc/Makefile - doc/html/Makefile ]) AC_OUTPUT @@ -120,6 +134,7 @@ if test x$HAVE_OPENCV = xtrue; then echo " - opencv: YES" +echo " data dir: $OPENCV_DATA_DIR" else echo " - opencv: NO" echo " opencv >= 1.0.0 not found - this program enables optional" diff --git a/doc/Doxyfile b/doc/Doxyfile new file mode 100644 index 0000000..ac4ef58 --- /dev/null +++ b/doc/Doxyfile @@ -0,0 +1,1517 @@ +# Doxyfile 1.6.1 + +# This file describes the settings to be used by the documentation system +# doxygen (www.doxygen.org) for a project +# +# All text after a hash (#) is considered a comment and will be ignored +# The format is: +# TAG = value [value, ...] +# For lists items can also be appended using: +# TAG += value [value, ...] +# Values that contain spaces should be placed between quotes (" ") + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- + +# This tag specifies the encoding used for all characters in the config file +# that follow. The default is UTF-8 which is also the encoding used for all +# text before the first occurrence of this tag. Doxygen uses libiconv (or the +# iconv built into libc) for the transcoding. See +# http://www.gnu.org/software/libiconv for the list of possible encodings. + +DOXYFILE_ENCODING = UTF-8 + +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded +# by quotes) that should identify the project. + +PROJECT_NAME = frei0r + +# The PROJECT_NUMBER tag can be used to enter a project or revision number. +# This could be handy for archiving the generated documentation or +# if some version control system is used. + +PROJECT_NUMBER = + +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) +# base path where the generated documentation will be put. +# If a relative path is entered, it will be relative to the location +# where doxygen was started. If left blank the current directory will be used. + +OUTPUT_DIRECTORY = . + +# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create +# 4096 sub-directories (in 2 levels) under the output directory of each output +# format and will distribute the generated files over these directories. +# Enabling this option can be useful when feeding doxygen a huge amount of +# source files, where putting all generated files in the same directory would +# otherwise cause performance problems for the file system. + +CREATE_SUBDIRS = NO + +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# The default language is English, other supported languages are: +# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, +# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German, +# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English +# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, +# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak, +# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese. + +OUTPUT_LANGUAGE = English + +# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will +# include brief member descriptions after the members that are listed in +# the file and class documentation (similar to JavaDoc). +# Set to NO to disable this. + +BRIEF_MEMBER_DESC = YES + +# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend +# the brief description of a member or function before the detailed description. +# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# brief descriptions will be completely suppressed. + +REPEAT_BRIEF = YES + +# This tag implements a quasi-intelligent brief description abbreviator +# that is used to form the text in various listings. Each string +# in this list, if found as the leading text of the brief description, will be +# stripped from the text and the result after processing the whole list, is +# used as the annotated text. Otherwise, the brief description is used as-is. +# If left blank, the following values are used ("$name" is automatically +# replaced with the name of the entity): "The $name class" "The $name widget" +# "The $name file" "is" "provides" "specifies" "contains" +# "represents" "a" "an" "the" + +ABBREVIATE_BRIEF = + +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# Doxygen will generate a detailed section even if there is only a brief +# description. + +ALWAYS_DETAILED_SEC = NO + +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all +# inherited members of a class in the documentation of that class as if those +# members were ordinary class members. Constructors, destructors and assignment +# operators of the base classes will not be shown. + +INLINE_INHERITED_MEMB = NO + +# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full +# path before files name in the file list and in the header files. If set +# to NO the shortest path that makes the file name unique will be used. + +FULL_PATH_NAMES = YES + +# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag +# can be used to strip a user-defined part of the path. Stripping is +# only done if one of the specified strings matches the left-hand part of +# the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the +# path to strip. + +STRIP_FROM_PATH = + +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of +# the path mentioned in the documentation of a class, which tells +# the reader which header file to include in order to use a class. +# If left blank only the name of the header file containing the class +# definition is used. Otherwise one should specify the include paths that +# are normally passed to the compiler using the -I flag. + +STRIP_FROM_INC_PATH = + +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter +# (but less readable) file names. This can be useful is your file systems +# doesn't support long names like on DOS, Mac, or CD-ROM. + +SHORT_NAMES = NO + +# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen +# will interpret the first line (until the first dot) of a JavaDoc-style +# comment as the brief description. If set to NO, the JavaDoc +# comments will behave just like regular Qt-style comments +# (thus requiring an explicit @brief command for a brief description.) + +JAVADOC_AUTOBRIEF = NO + +# If the QT_AUTOBRIEF tag is set to YES then Doxygen will +# interpret the first line (until the first dot) of a Qt-style +# comment as the brief description. If set to NO, the comments +# will behave just like regular Qt-style comments (thus requiring +# an explicit \brief command for a brief description.) + +QT_AUTOBRIEF = NO + +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen +# treat a multi-line C++ special comment block (i.e. a block of //! or /// +# comments) as a brief description. This used to be the default behaviour. +# The new default is to treat a multi-line C++ comment block as a detailed +# description. Set this tag to YES if you prefer the old behaviour instead. + +MULTILINE_CPP_IS_BRIEF = NO + +# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented +# member inherits the documentation from any documented member that it +# re-implements. + +INHERIT_DOCS = YES + +# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce +# a new page for each member. If set to NO, the documentation of a member will +# be part of the file/class/namespace that contains it. + +SEPARATE_MEMBER_PAGES = NO + +# The TAB_SIZE tag can be used to set the number of spaces in a tab. +# Doxygen uses this value to replace tabs by spaces in code fragments. + +TAB_SIZE = 8 + +# This tag can be used to specify a number of aliases that acts +# as commands in the documentation. An alias has the form "name=value". +# For example adding "sideeffect=\par Side Effects:\n" will allow you to +# put the command \sideeffect (or @sideeffect) in the documentation, which +# will result in a user-defined paragraph with heading "Side Effects:". +# You can put \n's in the value part of an alias to insert newlines. + +ALIASES = + +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C +# sources only. Doxygen will then generate output that is more tailored for C. +# For instance, some of the names that are used will be different. The list +# of all members will be omitted, etc. + +OPTIMIZE_OUTPUT_FOR_C = YES + +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java +# sources only. Doxygen will then generate output that is more tailored for +# Java. For instance, namespaces will be presented as packages, qualified +# scopes will look different, etc. + +OPTIMIZE_OUTPUT_JAVA = NO + +# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran +# sources only. Doxygen will then generate output that is more tailored for +# Fortran. + +OPTIMIZE_FOR_FORTRAN = NO + +# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL +# sources. Doxygen will then generate output that is tailored for +# VHDL. + +OPTIMIZE_OUTPUT_VHDL = NO + +# Doxygen selects the parser to use depending on the extension of the files it parses. +# With this tag you can assign which parser to use for a given extension. +# Doxygen has a built-in mapping, but you can override or extend it using this tag. +# The format is ext=language, where ext is a file extension, and language is one of +# the parsers supported by doxygen: IDL, Java, Javascript, C#, C, C++, D, PHP, +# Objective-C, Python, Fortran, VHDL, C, C++. For instance to make doxygen treat +# .inc files as Fortran files (default is PHP), and .f files as C (default is Fortran), +# use: inc=Fortran f=C. Note that for custom extensions you also need to set FILE_PATTERNS otherwise the files are not read by doxygen. + +EXTENSION_MAPPING = + +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want +# to include (a tag file for) the STL sources as input, then you should +# set this tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. +# func(std::string) {}). This also make the inheritance and collaboration +# diagrams that involve STL classes more complete and accurate. + +BUILTIN_STL_SUPPORT = NO + +# If you use Microsoft's C++/CLI language, you should set this option to YES to +# enable parsing support. + +CPP_CLI_SUPPORT = NO + +# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. +# Doxygen will parse them like normal C++ but will assume all classes use public +# instead of private inheritance when no explicit protection keyword is present. + +SIP_SUPPORT = NO + +# For Microsoft's IDL there are propget and propput attributes to indicate getter +# and setter methods for a property. Setting this option to YES (the default) +# will make doxygen to replace the get and set methods by a property in the +# documentation. This will only work if the methods are indeed getting or +# setting a simple type. If this is not the case, or you want to show the +# methods anyway, you should set this option to NO. + +IDL_PROPERTY_SUPPORT = YES + +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES, then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default +# all members of a group must be documented explicitly. + +DISTRIBUTE_GROUP_DOC = YES + +# Set the SUBGROUPING tag to YES (the default) to allow class member groups of +# the same type (for instance a group of public functions) to be put as a +# subgroup of that type (e.g. under the Public Functions section). Set it to +# NO to prevent subgrouping. Alternatively, this can be done per class using +# the \nosubgrouping command. + +SUBGROUPING = YES + +# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum +# is documented as struct, union, or enum with the name of the typedef. So +# typedef struct TypeS {} TypeT, will appear in the documentation as a struct +# with name TypeT. When disabled the typedef will appear as a member of a file, +# namespace, or class. And the struct will be named TypeS. This can typically +# be useful for C code in case the coding convention dictates that all compound +# types are typedef'ed and only the typedef is referenced, never the tag name. + +TYPEDEF_HIDES_STRUCT = NO + +# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to +# determine which symbols to keep in memory and which to flush to disk. +# When the cache is full, less often used symbols will be written to disk. +# For small to medium size projects (<1000 input files) the default value is +# probably good enough. For larger projects a too small cache size can cause +# doxygen to be busy swapping symbols to and from disk most of the time +# causing a significant performance penality. +# If the system has enough physical memory increasing the cache will improve the +# performance by keeping more symbols in memory. Note that the value works on +# a logarithmic scale so increasing the size by one will rougly double the +# memory usage. The cache size is given by this formula: +# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, +# corresponding to a cache size of 2^16 = 65536 symbols + +SYMBOL_CACHE_SIZE = 0 + +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- + +# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in +# documentation are documented, even if no documentation was available. +# Private class members and static file members will be hidden unless +# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES + +EXTRACT_ALL = NO + +# If the EXTRACT_PRIVATE tag is set to YES all private members of a class +# will be included in the documentation. + +EXTRACT_PRIVATE = NO + +# If the EXTRACT_STATIC tag is set to YES all static members of a file +# will be included in the documentation. + +EXTRACT_STATIC = NO + +# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) +# defined locally in source files will be included in the documentation. +# If set to NO only classes defined in header files are included. + +EXTRACT_LOCAL_CLASSES = YES + +# This flag is only useful for Objective-C code. When set to YES local +# methods, which are defined in the implementation section but not in +# the interface are included in the documentation. +# If set to NO (the default) only methods in the interface are included. + +EXTRACT_LOCAL_METHODS = NO + +# If this flag is set to YES, the members of anonymous namespaces will be +# extracted and appear in the documentation as a namespace called +# 'anonymous_namespace{file}', where file will be replaced with the base +# name of the file that contains the anonymous namespace. By default +# anonymous namespace are hidden. + +EXTRACT_ANON_NSPACES = NO + +# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all +# undocumented members of documented classes, files or namespaces. +# If set to NO (the default) these members will be included in the +# various overviews, but no documentation section is generated. +# This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_MEMBERS = NO + +# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. +# If set to NO (the default) these classes will be included in the various +# overviews. This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_CLASSES = NO + +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all +# friend (class|struct|union) declarations. +# If set to NO (the default) these declarations will be included in the +# documentation. + +HIDE_FRIEND_COMPOUNDS = NO + +# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any +# documentation blocks found inside the body of a function. +# If set to NO (the default) these blocks will be appended to the +# function's detailed documentation block. + +HIDE_IN_BODY_DOCS = NO + +# The INTERNAL_DOCS tag determines if documentation +# that is typed after a \internal command is included. If the tag is set +# to NO (the default) then the documentation will be excluded. +# Set it to YES to include the internal documentation. + +INTERNAL_DOCS = NO + +# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate +# file names in lower-case letters. If set to YES upper-case letters are also +# allowed. This is useful if you have classes or files whose names only differ +# in case and if your file system supports case sensitive file names. Windows +# and Mac users are advised to set this option to NO. + +CASE_SENSE_NAMES = NO + +# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen +# will show members with their full class and namespace scopes in the +# documentation. If set to YES the scope will be hidden. + +HIDE_SCOPE_NAMES = NO + +# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen +# will put a list of the files that are included by a file in the documentation +# of that file. + +SHOW_INCLUDE_FILES = YES + +# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] +# is inserted in the documentation for inline members. + +INLINE_INFO = YES + +# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen +# will sort the (detailed) documentation of file and class members +# alphabetically by member name. If set to NO the members will appear in +# declaration order. + +SORT_MEMBER_DOCS = YES + +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the +# brief documentation of file, namespace and class members alphabetically +# by member name. If set to NO (the default) the members will appear in +# declaration order. + +SORT_BRIEF_DOCS = NO + +# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the (brief and detailed) documentation of class members so that constructors and destructors are listed first. If set to NO (the default) the constructors will appear in the respective orders defined by SORT_MEMBER_DOCS and SORT_BRIEF_DOCS. This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO. + +SORT_MEMBERS_CTORS_1ST = NO + +# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the +# hierarchy of group names into alphabetical order. If set to NO (the default) +# the group names will appear in their defined order. + +SORT_GROUP_NAMES = NO + +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be +# sorted by fully-qualified names, including namespaces. If set to +# NO (the default), the class list will be sorted only by class name, +# not including the namespace part. +# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. +# Note: This option applies only to the class list, not to the +# alphabetical list. + +SORT_BY_SCOPE_NAME = NO + +# The GENERATE_TODOLIST tag can be used to enable (YES) or +# disable (NO) the todo list. This list is created by putting \todo +# commands in the documentation. + +GENERATE_TODOLIST = YES + +# The GENERATE_TESTLIST tag can be used to enable (YES) or +# disable (NO) the test list. This list is created by putting \test +# commands in the documentation. + +GENERATE_TESTLIST = YES + +# The GENERATE_BUGLIST tag can be used to enable (YES) or +# disable (NO) the bug list. This list is created by putting \bug +# commands in the documentation. + +GENERATE_BUGLIST = YES + +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or +# disable (NO) the deprecated list. This list is created by putting +# \deprecated commands in the documentation. + +GENERATE_DEPRECATEDLIST= YES + +# The ENABLED_SECTIONS tag can be used to enable conditional +# documentation sections, marked by \if sectionname ... \endif. + +ENABLED_SECTIONS = + +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines +# the initial value of a variable or define consists of for it to appear in +# the documentation. If the initializer consists of more lines than specified +# here it will be hidden. Use a value of 0 to hide initializers completely. +# The appearance of the initializer of individual variables and defines in the +# documentation can be controlled using \showinitializer or \hideinitializer +# command in the documentation regardless of this setting. + +MAX_INITIALIZER_LINES = 30 + +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated +# at the bottom of the documentation of classes and structs. If set to YES the +# list will mention the files that were used to generate the documentation. + +SHOW_USED_FILES = YES + +# If the sources in your project are distributed over multiple directories +# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy +# in the documentation. The default is NO. + +SHOW_DIRECTORIES = YES + +# Set the SHOW_FILES tag to NO to disable the generation of the Files page. +# This will remove the Files entry from the Quick Index and from the +# Folder Tree View (if specified). The default is YES. + +SHOW_FILES = YES + +# Set the SHOW_NAMESPACES tag to NO to disable the generation of the +# Namespaces page. +# This will remove the Namespaces entry from the Quick Index +# and from the Folder Tree View (if specified). The default is YES. + +SHOW_NAMESPACES = YES + +# The FILE_VERSION_FILTER tag can be used to specify a program or script that +# doxygen should invoke to get the current version for each file (typically from +# the version control system). Doxygen will invoke the program by executing (via +# popen()) the command , where is the value of +# the FILE_VERSION_FILTER tag, and is the name of an input file +# provided by doxygen. Whatever the program writes to standard output +# is used as the file version. See the manual for examples. + +FILE_VERSION_FILTER = + +# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed by +# doxygen. The layout file controls the global structure of the generated output files +# in an output format independent way. The create the layout file that represents +# doxygen's defaults, run doxygen with the -l option. You can optionally specify a +# file name after the option, if omitted DoxygenLayout.xml will be used as the name +# of the layout file. + +LAYOUT_FILE = + +#--------------------------------------------------------------------------- +# configuration options related to warning and progress messages +#--------------------------------------------------------------------------- + +# The QUIET tag can be used to turn on/off the messages that are generated +# by doxygen. Possible values are YES and NO. If left blank NO is used. + +QUIET = NO + +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated by doxygen. Possible values are YES and NO. If left blank +# NO is used. + +WARNINGS = YES + +# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings +# for undocumented members. If EXTRACT_ALL is set to YES then this flag will +# automatically be disabled. + +WARN_IF_UNDOCUMENTED = YES + +# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some +# parameters in a documented function, or documenting parameters that +# don't exist or using markup commands wrongly. + +WARN_IF_DOC_ERROR = YES + +# This WARN_NO_PARAMDOC option can be abled to get warnings for +# functions that are documented, but have no documentation for their parameters +# or return value. If set to NO (the default) doxygen will only warn about +# wrong or incomplete parameter documentation, but not about the absence of +# documentation. + +WARN_NO_PARAMDOC = NO + +# The WARN_FORMAT tag determines the format of the warning messages that +# doxygen can produce. The string should contain the $file, $line, and $text +# tags, which will be replaced by the file and line number from which the +# warning originated and the warning text. Optionally the format may contain +# $version, which will be replaced by the version of the file (if it could +# be obtained via FILE_VERSION_FILTER) + +WARN_FORMAT = "$file:$line: $text" + +# The WARN_LOGFILE tag can be used to specify a file to which warning +# and error messages should be written. If left blank the output is written +# to stderr. + +WARN_LOGFILE = + +#--------------------------------------------------------------------------- +# configuration options related to the input files +#--------------------------------------------------------------------------- + +# The INPUT tag can be used to specify the files and/or directories that contain +# documented source files. You may enter file names like "myfile.cpp" or +# directories like "/usr/src/myproject". Separate the files or directories +# with spaces. + +INPUT = "../include/frei0r.h" + +# This tag can be used to specify the character encoding of the source files +# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is +# also the default input encoding. Doxygen uses libiconv (or the iconv built +# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for +# the list of possible encodings. + +INPUT_ENCODING = UTF-8 + +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank the following patterns are tested: +# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx +# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90 + +FILE_PATTERNS = + +# The RECURSIVE tag can be used to turn specify whether or not subdirectories +# should be searched for input files as well. Possible values are YES and NO. +# If left blank NO is used. + +RECURSIVE = NO + +# The EXCLUDE tag can be used to specify files and/or directories that should +# excluded from the INPUT source files. This way you can easily exclude a +# subdirectory from a directory tree whose root is specified with the INPUT tag. + +EXCLUDE = + +# The EXCLUDE_SYMLINKS tag can be used select whether or not files or +# directories that are symbolic links (a Unix filesystem feature) are excluded +# from the input. + +EXCLUDE_SYMLINKS = NO + +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. Note that the wildcards are matched +# against the file with absolute path, so to exclude all test directories +# for example use the pattern */test/* + +EXCLUDE_PATTERNS = + +# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names +# (namespaces, classes, functions, etc.) that should be excluded from the +# output. The symbol name can be a fully qualified name, a word, or if the +# wildcard * is used, a substring. Examples: ANamespace, AClass, +# AClass::ANamespace, ANamespace::*Test + +EXCLUDE_SYMBOLS = + +# The EXAMPLE_PATH tag can be used to specify one or more files or +# directories that contain example code fragments that are included (see +# the \include command). + +EXAMPLE_PATH = + +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank all files are included. + +EXAMPLE_PATTERNS = + +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude +# commands irrespective of the value of the RECURSIVE tag. +# Possible values are YES and NO. If left blank NO is used. + +EXAMPLE_RECURSIVE = NO + +# The IMAGE_PATH tag can be used to specify one or more files or +# directories that contain image that are included in the documentation (see +# the \image command). + +IMAGE_PATH = + +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command , where +# is the value of the INPUT_FILTER tag, and is the name of an +# input file. Doxygen will then use the output that the filter program writes +# to standard output. +# If FILTER_PATTERNS is specified, this tag will be +# ignored. + +INPUT_FILTER = + +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern +# basis. +# Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. +# The filters are a list of the form: +# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further +# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER +# is applied to all files. + +FILTER_PATTERNS = + +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER) will be used to filter the input files when producing source +# files to browse (i.e. when SOURCE_BROWSER is set to YES). + +FILTER_SOURCE_FILES = NO + +#--------------------------------------------------------------------------- +# configuration options related to source browsing +#--------------------------------------------------------------------------- + +# If the SOURCE_BROWSER tag is set to YES then a list of source files will +# be generated. Documented entities will be cross-referenced with these sources. +# Note: To get rid of all source code in the generated output, make sure also +# VERBATIM_HEADERS is set to NO. + +SOURCE_BROWSER = YES + +# Setting the INLINE_SOURCES tag to YES will include the body +# of functions and classes directly in the documentation. + +INLINE_SOURCES = NO + +# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct +# doxygen to hide any special comment blocks from generated source code +# fragments. Normal C and C++ comments will always remain visible. + +STRIP_CODE_COMMENTS = YES + +# If the REFERENCED_BY_RELATION tag is set to YES +# then for each documented function all documented +# functions referencing it will be listed. + +REFERENCED_BY_RELATION = YES + +# If the REFERENCES_RELATION tag is set to YES +# then for each documented function all documented entities +# called/used by that function will be listed. + +REFERENCES_RELATION = YES + +# If the REFERENCES_LINK_SOURCE tag is set to YES (the default) +# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from +# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will +# link to the source code. +# Otherwise they will link to the documentation. + +REFERENCES_LINK_SOURCE = YES + +# If the USE_HTAGS tag is set to YES then the references to source code +# will point to the HTML generated by the htags(1) tool instead of doxygen +# built-in source browser. The htags tool is part of GNU's global source +# tagging system (see http://www.gnu.org/software/global/global.html). You +# will need version 4.8.6 or higher. + +USE_HTAGS = NO + +# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen +# will generate a verbatim copy of the header file for each class for +# which an include is specified. Set to NO to disable this. + +VERBATIM_HEADERS = YES + +#--------------------------------------------------------------------------- +# configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- + +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index +# of all compounds will be generated. Enable this if the project +# contains a lot of classes, structs, unions or interfaces. + +ALPHABETICAL_INDEX = YES + +# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then +# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns +# in which this list will be split (can be a number in the range [1..20]) + +COLS_IN_ALPHA_INDEX = 5 + +# In case all classes in a project start with a common prefix, all +# classes will be put under the same header in the alphabetical index. +# The IGNORE_PREFIX tag can be used to specify one or more prefixes that +# should be ignored while generating the index headers. + +IGNORE_PREFIX = + +#--------------------------------------------------------------------------- +# configuration options related to the HTML output +#--------------------------------------------------------------------------- + +# If the GENERATE_HTML tag is set to YES (the default) Doxygen will +# generate HTML output. + +GENERATE_HTML = YES + +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `html' will be used as the default path. + +HTML_OUTPUT = html + +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for +# each generated HTML page (for example: .htm,.php,.asp). If it is left blank +# doxygen will generate files with .html extension. + +HTML_FILE_EXTENSION = .html + +# The HTML_HEADER tag can be used to specify a personal HTML header for +# each generated HTML page. If it is left blank doxygen will generate a +# standard header. + +HTML_HEADER = +# HTML_HEADER = web/header.php + +# The HTML_FOOTER tag can be used to specify a personal HTML footer for +# each generated HTML page. If it is left blank doxygen will generate a +# standard footer. + +HTML_FOOTER = +# HTML_FOOTER = web/footer.php + +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading +# style sheet that is used by each HTML page. It can be used to +# fine-tune the look of the HTML output. If the tag is left blank doxygen +# will generate a default style sheet. Note that doxygen will try to copy +# the style sheet file to the HTML output directory, so don't put your own +# stylesheet in the HTML output directory as well, or it will be erased! + +HTML_STYLESHEET = +# HTML_STYLESHEET = web/style.css + +# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, +# files or namespaces will be aligned in HTML using tables. If set to +# NO a bullet list will be used. + +HTML_ALIGN_MEMBERS = YES + +# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML +# documentation will contain sections that can be hidden and shown after the +# page has loaded. For this to work a browser that supports +# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox +# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari). + +HTML_DYNAMIC_SECTIONS = YES + +# If the GENERATE_DOCSET tag is set to YES, additional index files +# will be generated that can be used as input for Apple's Xcode 3 +# integrated development environment, introduced with OSX 10.5 (Leopard). +# To create a documentation set, doxygen will generate a Makefile in the +# HTML output directory. Running make will produce the docset in that +# directory and running "make install" will install the docset in +# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find +# it at startup. +# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html for more information. + +GENERATE_DOCSET = NO + +# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the +# feed. A documentation feed provides an umbrella under which multiple +# documentation sets from a single provider (such as a company or product suite) +# can be grouped. + +DOCSET_FEEDNAME = "Doxygen generated docs" + +# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that +# should uniquely identify the documentation set bundle. This should be a +# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen +# will append .docset to the name. + +DOCSET_BUNDLE_ID = org.dyne.piksel.frei0r + +# If the GENERATE_HTMLHELP tag is set to YES, additional index files +# will be generated that can be used as input for tools like the +# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) +# of the generated HTML documentation. + +GENERATE_HTMLHELP = NO + +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can +# be used to specify the file name of the resulting .chm file. You +# can add a path in front of the file if the result should not be +# written to the html output directory. + +CHM_FILE = + +# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can +# be used to specify the location (absolute path including file name) of +# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run +# the HTML help compiler on the generated index.hhp. + +HHC_LOCATION = + +# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag +# controls if a separate .chi index file is generated (YES) or that +# it should be included in the master .chm file (NO). + +GENERATE_CHI = NO + +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING +# is used to encode HtmlHelp index (hhk), content (hhc) and project file +# content. + +CHM_INDEX_ENCODING = + +# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag +# controls whether a binary table of contents is generated (YES) or a +# normal table of contents (NO) in the .chm file. + +BINARY_TOC = NO + +# The TOC_EXPAND flag can be set to YES to add extra items for group members +# to the contents of the HTML help documentation and to the tree view. + +TOC_EXPAND = NO + +# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and QHP_VIRTUAL_FOLDER +# are set, an additional index file will be generated that can be used as input for +# Qt's qhelpgenerator to generate a Qt Compressed Help (.qch) of the generated +# HTML documentation. + +GENERATE_QHP = NO + +# If the QHG_LOCATION tag is specified, the QCH_FILE tag can +# be used to specify the file name of the resulting .qch file. +# The path specified is relative to the HTML output folder. + +QCH_FILE = + +# The QHP_NAMESPACE tag specifies the namespace to use when generating +# Qt Help Project output. For more information please see +# http://doc.trolltech.com/qthelpproject.html#namespace + +QHP_NAMESPACE = + +# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating +# Qt Help Project output. For more information please see +# http://doc.trolltech.com/qthelpproject.html#virtual-folders + +QHP_VIRTUAL_FOLDER = doc + +# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to add. +# For more information please see +# http://doc.trolltech.com/qthelpproject.html#custom-filters + +QHP_CUST_FILTER_NAME = + +# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the custom filter to add.For more information please see +# Qt Help Project / Custom Filters. + +QHP_CUST_FILTER_ATTRS = + +# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this project's +# filter section matches. +# Qt Help Project / Filter Attributes. + +QHP_SECT_FILTER_ATTRS = + +# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can +# be used to specify the location of Qt's qhelpgenerator. +# If non-empty doxygen will try to run qhelpgenerator on the generated +# .qhp file. + +QHG_LOCATION = + +# The DISABLE_INDEX tag can be used to turn on/off the condensed index at +# top of each HTML page. The value NO (the default) enables the index and +# the value YES disables it. + +DISABLE_INDEX = NO + +# This tag can be used to set the number of enum values (range [1..20]) +# that doxygen will group on one line in the generated HTML documentation. + +ENUM_VALUES_PER_LINE = 4 + +# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index +# structure should be generated to display hierarchical information. +# If the tag value is set to YES, a side panel will be generated +# containing a tree-like index structure (just like the one that +# is generated for HTML Help). For this to work a browser that supports +# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser). +# Windows users are probably better off using the HTML help feature. + +GENERATE_TREEVIEW = YES + +# By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories, +# and Class Hierarchy pages using a tree view instead of an ordered list. + +USE_INLINE_TREES = YES + +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be +# used to set the initial width (in pixels) of the frame in which the tree +# is shown. + +TREEVIEW_WIDTH = 250 + +# Use this tag to change the font size of Latex formulas included +# as images in the HTML documentation. The default is 10. Note that +# when you change the font size after a successful doxygen run you need +# to manually remove any form_*.png images from the HTML output directory +# to force them to be regenerated. + +FORMULA_FONTSIZE = 10 + +# When the SEARCHENGINE tag is enable doxygen will generate a search box for the HTML output. The underlying search engine uses javascript +# and DHTML and should work on any modern browser. Note that when using HTML help (GENERATE_HTMLHELP) or Qt help (GENERATE_QHP) +# there is already a search function so this one should typically +# be disabled. + +SEARCHENGINE = NO + +#--------------------------------------------------------------------------- +# configuration options related to the LaTeX output +#--------------------------------------------------------------------------- + +# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will +# generate Latex output. + +GENERATE_LATEX = NO + +# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `latex' will be used as the default path. + +LATEX_OUTPUT = latex + +# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be +# invoked. If left blank `latex' will be used as the default command name. + +LATEX_CMD_NAME = latex + +# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to +# generate index for LaTeX. If left blank `makeindex' will be used as the +# default command name. + +MAKEINDEX_CMD_NAME = makeindex + +# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact +# LaTeX documents. This may be useful for small projects and may help to +# save some trees in general. + +COMPACT_LATEX = NO + +# The PAPER_TYPE tag can be used to set the paper type that is used +# by the printer. Possible values are: a4, a4wide, letter, legal and +# executive. If left blank a4wide will be used. + +PAPER_TYPE = a4wide + +# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX +# packages that should be included in the LaTeX output. + +EXTRA_PACKAGES = + +# The LATEX_HEADER tag can be used to specify a personal LaTeX header for +# the generated latex document. The header should contain everything until +# the first chapter. If it is left blank doxygen will generate a +# standard header. Notice: only use this tag if you know what you are doing! + +LATEX_HEADER = + +# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated +# is prepared for conversion to pdf (using ps2pdf). The pdf file will +# contain links (just like the HTML output) instead of page references +# This makes the output suitable for online browsing using a pdf viewer. + +PDF_HYPERLINKS = YES + +# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of +# plain latex in the generated Makefile. Set this option to YES to get a +# higher quality PDF documentation. + +USE_PDFLATEX = YES + +# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. +# command to the generated LaTeX files. This will instruct LaTeX to keep +# running if errors occur, instead of asking the user for help. +# This option is also used when generating formulas in HTML. + +LATEX_BATCHMODE = NO + +# If LATEX_HIDE_INDICES is set to YES then doxygen will not +# include the index chapters (such as File Index, Compound Index, etc.) +# in the output. + +LATEX_HIDE_INDICES = NO + +# If LATEX_SOURCE_CODE is set to YES then doxygen will include source code with syntax highlighting in the LaTeX output. Note that which sources are shown also depends on other settings such as SOURCE_BROWSER. + +LATEX_SOURCE_CODE = YES + +#--------------------------------------------------------------------------- +# configuration options related to the RTF output +#--------------------------------------------------------------------------- + +# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output +# The RTF output is optimized for Word 97 and may not look very pretty with +# other RTF readers or editors. + +GENERATE_RTF = NO + +# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `rtf' will be used as the default path. + +RTF_OUTPUT = rtf + +# If the COMPACT_RTF tag is set to YES Doxygen generates more compact +# RTF documents. This may be useful for small projects and may help to +# save some trees in general. + +COMPACT_RTF = YES + +# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated +# will contain hyperlink fields. The RTF file will +# contain links (just like the HTML output) instead of page references. +# This makes the output suitable for online browsing using WORD or other +# programs which support those fields. +# Note: wordpad (write) and others do not support links. + +RTF_HYPERLINKS = NO + +# Load stylesheet definitions from file. Syntax is similar to doxygen's +# config file, i.e. a series of assignments. You only have to provide +# replacements, missing definitions are set to their default value. + +RTF_STYLESHEET_FILE = + +# Set optional variables used in the generation of an rtf document. +# Syntax is similar to doxygen's config file. + +RTF_EXTENSIONS_FILE = + +#--------------------------------------------------------------------------- +# configuration options related to the man page output +#--------------------------------------------------------------------------- + +# If the GENERATE_MAN tag is set to YES (the default) Doxygen will +# generate man pages + +GENERATE_MAN = NO + +# The MAN_OUTPUT tag is used to specify where the man pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `man' will be used as the default path. + +MAN_OUTPUT = man + +# The MAN_EXTENSION tag determines the extension that is added to +# the generated man pages (default is the subroutine's section .3) + +MAN_EXTENSION = .3 + +# If the MAN_LINKS tag is set to YES and Doxygen generates man output, +# then it will generate one additional man file for each entity +# documented in the real man page(s). These additional files +# only source the real man page, but without them the man command +# would be unable to find the correct page. The default is NO. + +MAN_LINKS = NO + +#--------------------------------------------------------------------------- +# configuration options related to the XML output +#--------------------------------------------------------------------------- + +# If the GENERATE_XML tag is set to YES Doxygen will +# generate an XML file that captures the structure of +# the code including all documentation. + +GENERATE_XML = NO + +# The XML_OUTPUT tag is used to specify where the XML pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `xml' will be used as the default path. + +XML_OUTPUT = xml + +# The XML_SCHEMA tag can be used to specify an XML schema, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_SCHEMA = + +# The XML_DTD tag can be used to specify an XML DTD, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_DTD = + +# If the XML_PROGRAMLISTING tag is set to YES Doxygen will +# dump the program listings (including syntax highlighting +# and cross-referencing information) to the XML output. Note that +# enabling this will significantly increase the size of the XML output. + +XML_PROGRAMLISTING = YES + +#--------------------------------------------------------------------------- +# configuration options for the AutoGen Definitions output +#--------------------------------------------------------------------------- + +# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will +# generate an AutoGen Definitions (see autogen.sf.net) file +# that captures the structure of the code including all +# documentation. Note that this feature is still experimental +# and incomplete at the moment. + +GENERATE_AUTOGEN_DEF = NO + +#--------------------------------------------------------------------------- +# configuration options related to the Perl module output +#--------------------------------------------------------------------------- + +# If the GENERATE_PERLMOD tag is set to YES Doxygen will +# generate a Perl module file that captures the structure of +# the code including all documentation. Note that this +# feature is still experimental and incomplete at the +# moment. + +GENERATE_PERLMOD = NO + +# If the PERLMOD_LATEX tag is set to YES Doxygen will generate +# the necessary Makefile rules, Perl scripts and LaTeX code to be able +# to generate PDF and DVI output from the Perl module output. + +PERLMOD_LATEX = NO + +# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be +# nicely formatted so it can be parsed by a human reader. +# This is useful +# if you want to understand what is going on. +# On the other hand, if this +# tag is set to NO the size of the Perl module output will be much smaller +# and Perl will parse it just the same. + +PERLMOD_PRETTY = YES + +# The names of the make variables in the generated doxyrules.make file +# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. +# This is useful so different doxyrules.make files included by the same +# Makefile don't overwrite each other's variables. + +PERLMOD_MAKEVAR_PREFIX = + +#--------------------------------------------------------------------------- +# Configuration options related to the preprocessor +#--------------------------------------------------------------------------- + +# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will +# evaluate all C-preprocessor directives found in the sources and include +# files. + +ENABLE_PREPROCESSING = YES + +# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro +# names in the source code. If set to NO (the default) only conditional +# compilation will be performed. Macro expansion can be done in a controlled +# way by setting EXPAND_ONLY_PREDEF to YES. + +MACRO_EXPANSION = NO + +# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES +# then the macro expansion is limited to the macros specified with the +# PREDEFINED and EXPAND_AS_DEFINED tags. + +EXPAND_ONLY_PREDEF = NO + +# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files +# in the INCLUDE_PATH (see below) will be search if a #include is found. + +SEARCH_INCLUDES = YES + +# The INCLUDE_PATH tag can be used to specify one or more directories that +# contain include files that are not input files but should be processed by +# the preprocessor. + +INCLUDE_PATH = + +# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard +# patterns (like *.h and *.hpp) to filter out the header-files in the +# directories. If left blank, the patterns specified with FILE_PATTERNS will +# be used. + +INCLUDE_FILE_PATTERNS = + +# The PREDEFINED tag can be used to specify one or more macro names that +# are defined before the preprocessor is started (similar to the -D option of +# gcc). The argument of the tag is a list of macros of the form: name +# or name=definition (no spaces). If the definition and the = are +# omitted =1 is assumed. To prevent a macro definition from being +# undefined via #undef or recursively expanded use the := operator +# instead of the = operator. + +PREDEFINED = + +# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then +# this tag can be used to specify a list of macro names that should be expanded. +# The macro definition that is found in the sources will be used. +# Use the PREDEFINED tag if you want to use a different macro definition. + +EXPAND_AS_DEFINED = + +# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then +# doxygen's preprocessor will remove all function-like macros that are alone +# on a line, have an all uppercase name, and do not end with a semicolon. Such +# function macros are typically used for boiler-plate code, and will confuse +# the parser if not removed. + +SKIP_FUNCTION_MACROS = YES + +#--------------------------------------------------------------------------- +# Configuration::additions related to external references +#--------------------------------------------------------------------------- + +# The TAGFILES option can be used to specify one or more tagfiles. +# Optionally an initial location of the external documentation +# can be added for each tagfile. The format of a tag file without +# this location is as follows: +# +# TAGFILES = file1 file2 ... +# Adding location for the tag files is done as follows: +# +# TAGFILES = file1=loc1 "file2 = loc2" ... +# where "loc1" and "loc2" can be relative or absolute paths or +# URLs. If a location is present for each tag, the installdox tool +# does not have to be run to correct the links. +# Note that each tag file must have a unique name +# (where the name does NOT include the path) +# If a tag file is not located in the directory in which doxygen +# is run, you must also specify the path to the tagfile here. + +TAGFILES = + +# When a file name is specified after GENERATE_TAGFILE, doxygen will create +# a tag file that is based on the input files it reads. + +GENERATE_TAGFILE = + +# If the ALLEXTERNALS tag is set to YES all external classes will be listed +# in the class index. If set to NO only the inherited external classes +# will be listed. + +ALLEXTERNALS = NO + +# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed +# in the modules index. If set to NO, only the current project's groups will +# be listed. + +EXTERNAL_GROUPS = YES + +# The PERL_PATH should be the absolute path and name of the perl script +# interpreter (i.e. the result of `which perl'). + +PERL_PATH = /usr/bin/perl + +#--------------------------------------------------------------------------- +# Configuration options related to the dot tool +#--------------------------------------------------------------------------- + +# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will +# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base +# or super classes. Setting the tag to NO turns the diagrams off. Note that +# this option is superseded by the HAVE_DOT option below. This is only a +# fallback. It is recommended to install and use dot, since it yields more +# powerful graphs. + +CLASS_DIAGRAMS = YES + +# You can define message sequence charts within doxygen comments using the \msc +# command. Doxygen will then run the mscgen tool (see +# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the +# documentation. The MSCGEN_PATH tag allows you to specify the directory where +# the mscgen tool resides. If left empty the tool is assumed to be found in the +# default search path. + +MSCGEN_PATH = + +# If set to YES, the inheritance and collaboration graphs will hide +# inheritance and usage relations if the target is undocumented +# or is not a class. + +HIDE_UNDOC_RELATIONS = YES + +# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is +# available from the path. This tool is part of Graphviz, a graph visualization +# toolkit from AT&T and Lucent Bell Labs. The other options in this section +# have no effect if this option is set to NO (the default) + +HAVE_DOT = YES + +# By default doxygen will write a font called FreeSans.ttf to the output +# directory and reference it in all dot files that doxygen generates. This +# font does not include all possible unicode characters however, so when you need +# these (or just want a differently looking font) you can specify the font name +# using DOT_FONTNAME. You need need to make sure dot is able to find the font, +# which can be done by putting it in a standard location or by setting the +# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory +# containing the font. + +DOT_FONTNAME = FreeSans + +# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. +# The default size is 10pt. + +DOT_FONTSIZE = 10 + +# By default doxygen will tell dot to use the output directory to look for the +# FreeSans.ttf font (which doxygen will put there itself). If you specify a +# different font using DOT_FONTNAME you can set the path where dot +# can find it using this tag. + +DOT_FONTPATH = + +# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect inheritance relations. Setting this tag to YES will force the +# the CLASS_DIAGRAMS tag to NO. + +CLASS_GRAPH = YES + +# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect implementation dependencies (inheritance, containment, and +# class references variables) of the class with other documented classes. + +COLLABORATION_GRAPH = YES + +# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for groups, showing the direct groups dependencies + +GROUP_GRAPHS = YES + +# If the UML_LOOK tag is set to YES doxygen will generate inheritance and +# collaboration diagrams in a style similar to the OMG's Unified Modeling +# Language. + +UML_LOOK = NO + +# If set to YES, the inheritance and collaboration graphs will show the +# relations between templates and their instances. + +TEMPLATE_RELATIONS = NO + +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT +# tags are set to YES then doxygen will generate a graph for each documented +# file showing the direct and indirect include dependencies of the file with +# other documented files. + +INCLUDE_GRAPH = YES + +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and +# HAVE_DOT tags are set to YES then doxygen will generate a graph for each +# documented header file showing the documented files that directly or +# indirectly include this file. + +INCLUDED_BY_GRAPH = YES + +# If the CALL_GRAPH and HAVE_DOT options are set to YES then +# doxygen will generate a call dependency graph for every global function +# or class method. Note that enabling this option will significantly increase +# the time of a run. So in most cases it will be better to enable call graphs +# for selected functions only using the \callgraph command. + +CALL_GRAPH = NO + +# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then +# doxygen will generate a caller dependency graph for every global function +# or class method. Note that enabling this option will significantly increase +# the time of a run. So in most cases it will be better to enable caller +# graphs for selected functions only using the \callergraph command. + +CALLER_GRAPH = NO + +# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen +# will graphical hierarchy of all classes instead of a textual one. + +GRAPHICAL_HIERARCHY = YES + +# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES +# then doxygen will show the dependencies a directory has on other directories +# in a graphical way. The dependency relations are determined by the #include +# relations between the files in the directories. + +DIRECTORY_GRAPH = YES + +# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images +# generated by dot. Possible values are png, jpg, or gif +# If left blank png will be used. + +DOT_IMAGE_FORMAT = png + +# The tag DOT_PATH can be used to specify the path where the dot tool can be +# found. If left blank, it is assumed the dot tool can be found in the path. + +DOT_PATH = + +# The DOTFILE_DIRS tag can be used to specify one or more directories that +# contain dot files that are included in the documentation (see the +# \dotfile command). + +DOTFILE_DIRS = + +# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of +# nodes that will be shown in the graph. If the number of nodes in a graph +# becomes larger than this value, doxygen will truncate the graph, which is +# visualized by representing a node as a red box. Note that doxygen if the +# number of direct children of the root node in a graph is already larger than +# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note +# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. + +DOT_GRAPH_MAX_NODES = 50 + +# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the +# graphs generated by dot. A depth value of 3 means that only nodes reachable +# from the root by following a path via at most 3 edges will be shown. Nodes +# that lay further from the root node will be omitted. Note that setting this +# option to 1 or 2 may greatly reduce the computation time needed for large +# code bases. Also note that the size of a graph can be further restricted by +# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. + +MAX_DOT_GRAPH_DEPTH = 0 + +# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent +# background. This is disabled by default, because dot on Windows does not +# seem to support this out of the box. Warning: Depending on the platform used, +# enabling this option may lead to badly anti-aliased labels on the edges of +# a graph (i.e. they become hard to read). + +DOT_TRANSPARENT = NO + +# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output +# files in one run (i.e. multiple -o and -T options on the command line). This +# makes dot run faster, but since only newer versions of dot (>1.8.10) +# support this, this feature is disabled by default. + +DOT_MULTI_TARGETS = YES + +# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will +# generate a legend page explaining the meaning of the various boxes and +# arrows in the dot generated graphs. + +GENERATE_LEGEND = YES + +# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will +# remove the intermediate dot files that are used to generate +# the various graphs. + +DOT_CLEANUP = YES diff --git a/doc/Makefile.am b/doc/Makefile.am index 6af9f1e..04d9f7c 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -8,4 +8,24 @@ # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -SUBDIRS=html +html: + $(DOXYGEN) Doxyfile + +htmldocs_DATA = html + +htmldocsdir=${prefix}/share/doc/${PACKAGE} + +clean: + rm -rf html + +dist-hook: + -cp -ra html $(distdir)/doc/ + +install-data: + install -c -m 644 -d $(htmldocs_DATA) $(htmldocsdir) + +# Modify the install hook, so we can install directories +install-htmldocsDATA: + mkdir -p $(htmldocsdir) + cp -r ./html $(htmldocsdir)/ + diff --git a/doc/Makefile.in b/doc/Makefile.in index dd39318..bad6d70 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -24,6 +24,7 @@ # 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. + VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ @@ -46,7 +47,10 @@ subdir = doc DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -55,47 +59,30 @@ CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-dvi-recursive install-exec-recursive \ - install-html-recursive install-info-recursive \ - install-pdf-recursive install-ps-recursive install-recursive \ - installcheck-recursive installdirs-recursive pdf-recursive \ - ps-recursive uninstall-recursive -RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ - distclean-recursive maintainer-clean-recursive -AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ - $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ - distdir -ETAGS = etags -CTAGS = ctags -DIST_SUBDIRS = $(SUBDIRS) +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(htmldocsdir)" +DATA = $(htmldocs_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -am__relativize = \ - dir0=`pwd`; \ - sed_first='s,^\([^/]*\)/.*$$,\1,'; \ - sed_rest='s,^[^/]*/*,,'; \ - sed_last='s,^.*/\([^/]*\)$$,\1,'; \ - sed_butlast='s,/*[^/]*$$,,'; \ - while test -n "$$dir1"; do \ - first=`echo "$$dir1" | sed -e "$$sed_first"`; \ - if test "$$first" != "."; then \ - if test "$$first" = ".."; then \ - dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ - dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ - else \ - first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ - if test "$$first2" = "$$first"; then \ - dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ - else \ - dir2="../$$dir2"; \ - fi; \ - dir0="$$dir0"/"$$first"; \ - fi; \ - fi; \ - dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ - done; \ - reldir="$$dir2" ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ @@ -115,6 +102,7 @@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DOXYGEN = @DOXYGEN@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -126,6 +114,7 @@ GAVL_CFLAGS = @GAVL_CFLAGS@ GAVL_LIBS = @GAVL_LIBS@ GREP = @GREP@ +HAVE_OPENCV = @HAVE_OPENCV@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -151,6 +140,8 @@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_DATA_DIR = @PACKAGE_DATA_DIR@ +PACKAGE_LIB_DIR = @PACKAGE_LIB_DIR@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ @@ -158,6 +149,8 @@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ @@ -217,8 +210,9 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -SUBDIRS = html -all: all-recursive +htmldocs_DATA = html +htmldocsdir = ${prefix}/share/doc/${PACKAGE} +all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @@ -258,140 +252,19 @@ clean-libtool: -rm -rf .libs _libs -# This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): - @failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - dot_seen=yes; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ - fi; test -z "$$fail" - -$(RECURSIVE_CLEAN_TARGETS): - @failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique +uninstall-htmldocsDATA: + @$(NORMAL_UNINSTALL) + @list='$(htmldocs_DATA)'; test -n "$(htmldocsdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(htmldocsdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(htmldocsdir)" && rm -f $$files tags: TAGS - -TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ - include_option=--etags-include; \ - empty_fix=.; \ - else \ - include_option=--include; \ - empty_fix=; \ - fi; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test ! -f $$subdir/TAGS || \ - set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ - fi; \ - done; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi +TAGS: + ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags +CTAGS: + distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ @@ -423,48 +296,24 @@ || exit 1; \ fi; \ done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - fi; \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$(top_distdir)" distdir="$(distdir)" \ + dist-hook +check-am: all-am +check: check-am +all-am: Makefile $(DATA) +installdirs: + for dir in "$(DESTDIR)$(htmldocsdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ - $(am__relativize); \ - new_distdir=$$reldir; \ - dir1=$$subdir; dir2="$(top_distdir)"; \ - $(am__relativize); \ - new_top_distdir=$$reldir; \ - echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ - echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ - ($(am__cd) $$subdir && \ - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$new_top_distdir" \ - distdir="$$new_distdir" \ - am__remove_distdir=: \ - am__skip_length_check=: \ - am__skip_mode_fix=: \ - distdir) \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-recursive -all-am: Makefile -installdirs: installdirs-recursive -installdirs-am: -install: install-recursive -install-exec: install-exec-recursive -install-data: install-data-recursive -uninstall: uninstall-recursive +install: install-am +install-exec: install-exec-am +uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am -installcheck: installcheck-recursive +installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ @@ -481,89 +330,100 @@ maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -clean: clean-recursive - clean-am: clean-generic clean-libtool mostlyclean-am -distclean: distclean-recursive +distclean: distclean-am -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-tags - -dvi: dvi-recursive +distclean-am: clean-am distclean-generic + +dvi: dvi-am dvi-am: -html: html-recursive - html-am: -info: info-recursive +info: info-am info-am: -install-data-am: - -install-dvi: install-dvi-recursive +install-data-am: install-htmldocsDATA + +install-dvi: install-dvi-am install-dvi-am: install-exec-am: -install-html: install-html-recursive +install-html: install-html-am install-html-am: -install-info: install-info-recursive +install-info: install-info-am install-info-am: install-man: -install-pdf: install-pdf-recursive +install-pdf: install-pdf-am install-pdf-am: -install-ps: install-ps-recursive +install-ps: install-ps-am install-ps-am: installcheck-am: -maintainer-clean: maintainer-clean-recursive +maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic -mostlyclean: mostlyclean-recursive +mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool -pdf: pdf-recursive +pdf: pdf-am pdf-am: -ps: ps-recursive +ps: ps-am ps-am: -uninstall-am: - -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ - install-am install-strip tags-recursive - -.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am check check-am clean clean-generic clean-libtool \ - ctags ctags-recursive distclean distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-dvi install-dvi-am install-exec \ - install-exec-am install-html install-html-am install-info \ +uninstall-am: uninstall-htmldocsDATA + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + dist-hook distclean distclean-generic distclean-libtool \ + distdir dvi dvi-am html html-am info info-am install \ + install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-htmldocsDATA install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs installdirs-am maintainer-clean \ + installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ - uninstall uninstall-am - + mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ + uninstall-htmldocsDATA + + +html: + $(DOXYGEN) Doxyfile + +clean: + rm -rf html + +dist-hook: + -cp -ra html $(distdir)/doc/ + +install-data: + install -c -m 644 -d $(htmldocs_DATA) $(htmldocsdir) + +# Modify the install hook, so we can install directories +install-htmldocsDATA: + mkdir -p $(htmldocsdir) + cp -r ./html $(htmldocsdir)/ # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/doc/html/Makefile.am b/doc/html/Makefile.am deleted file mode 100644 index adbcca4..0000000 --- a/doc/html/Makefile.am +++ /dev/null @@ -1,35 +0,0 @@ -htmldocs_DATA = \ - 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 - -htmldocsdir=${prefix}/share/doc/${PACKAGE}-1.1/html - diff --git a/doc/html/annotated.html b/doc/html/annotated.html deleted file mode 100644 index b35a614..0000000 --- a/doc/html/annotated.html +++ /dev/null @@ -1,32 +0,0 @@ - - -frei0r: Data Structures - - - - - - -

frei0r Data Structures

Here are the data structures with brief descriptions: - - - - -
f0r_param_color
f0r_param_info
f0r_param_position
f0r_plugin_info
-
Generated on Wed Nov 7 12:07:53 2007 for frei0r by  - -doxygen 1.4.6
- - diff --git a/doc/html/dir_c6a51e201754b7c7dc5a21651891d7e2.html b/doc/html/dir_c6a51e201754b7c7dc5a21651891d7e2.html deleted file mode 100644 index feb9ae6..0000000 --- a/doc/html/dir_c6a51e201754b7c7dc5a21651891d7e2.html +++ /dev/null @@ -1,31 +0,0 @@ - - -frei0r: include/ Directory Reference - - - - - - -

include Directory Reference

- - - - - - -

-


Files

file  frei0r.h [code]
 This file defines the frei0r api, version 1.1.
-
Generated on Wed Nov 7 12:07:53 2007 for frei0r by  - -doxygen 1.4.6
- - diff --git a/doc/html/dirs.html b/doc/html/dirs.html deleted file mode 100644 index 5e1e856..0000000 --- a/doc/html/dirs.html +++ /dev/null @@ -1,23 +0,0 @@ - - -frei0r: Directory Hierarchy - - - - - -

frei0r Directories

This directory hierarchy is sorted roughly, but not completely, alphabetically: -
Generated on Wed Nov 7 12:07:53 2007 for frei0r by  - -doxygen 1.4.6
- - diff --git a/doc/html/doxygen.css b/doc/html/doxygen.css deleted file mode 100644 index 05615b2..0000000 --- a/doc/html/doxygen.css +++ /dev/null @@ -1,310 +0,0 @@ -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; -} - diff --git a/doc/html/doxygen.png b/doc/html/doxygen.png deleted file mode 100644 index f0a274b..0000000 Binary files a/doc/html/doxygen.png and /dev/null differ diff --git a/doc/html/files.html b/doc/html/files.html deleted file mode 100644 index 5553cc0..0000000 --- a/doc/html/files.html +++ /dev/null @@ -1,28 +0,0 @@ - - -frei0r: File Index - - - - - - -

frei0r File List

Here is a list of all documented files with brief descriptions: - -
include/frei0r.h [code]This file defines the frei0r api, version 1.1
-
Generated on Wed Nov 7 12:07:53 2007 for frei0r by  - -doxygen 1.4.6
- - diff --git a/doc/html/frei0r_8h-source.html b/doc/html/frei0r_8h-source.html deleted file mode 100644 index b8bf0d9..0000000 --- a/doc/html/frei0r_8h-source.html +++ /dev/null @@ -1,152 +0,0 @@ - - -frei0r: include/frei0r.h Source File - - - - - - - -

frei0r.h

Go to the documentation of this file.
00001 
-00185 #ifndef INCLUDED_FREI0R_H
-00186 #define INCLUDED_FREI0R_H
-00187 
-00188 #include <inttypes.h>
-00189 
-00193 #define FREI0R_MAJOR_VERSION 1
-00194 
-00198 #define FREI0R_MINOR_VERSION 1
-00199 
-00200 //---------------------------------------------------------------------------
-00201 
-00206 int f0r_init();
-00207 
-00212 void f0r_deinit();
-00213 
-00214 //---------------------------------------------------------------------------
-00215 
-00223 #define F0R_PLUGIN_TYPE_FILTER 0
-00224 
-00225 #define F0R_PLUGIN_TYPE_SOURCE 1
-00226 
-00227 #define F0R_PLUGIN_TYPE_MIXER2 2
-00228 
-00229 #define F0R_PLUGIN_TYPE_MIXER3 3
-00230 
-00233 //---------------------------------------------------------------------------
-00234 
-00275 #define F0R_COLOR_MODEL_BGRA8888 0
-00276 
-00284 #define F0R_COLOR_MODEL_RGBA8888 1
-00285 
-00298 #define F0R_COLOR_MODEL_PACKED32 2
-00299 
-00317 typedef struct f0r_plugin_info
-00318 {
-00319   const char* name;    
-00320   const char* author;  
-00324   int plugin_type;    
-00325   int color_model;     
-00326   int frei0r_version;  
-00327   int major_version;   
-00328   int minor_version;   
-00329   int num_params;      
-00330   const char* explanation; 
-00331 } f0r_plugin_info_t;
-00332 
-00333 
-00339 void f0r_get_plugin_info(f0r_plugin_info_t* info);
-00340 
-00341 //---------------------------------------------------------------------------
-00342 
-00353 #define F0R_PARAM_BOOL      0
-00354 
-00359 #define F0R_PARAM_DOUBLE    1
-00360 
-00365 #define F0R_PARAM_COLOR     2
-00366 
-00370 #define F0R_PARAM_POSITION  3
-00371 
-00376 #define F0R_PARAM_STRING  4
-00377 
-00382 typedef double f0r_param_bool;
-00383 
-00387 typedef double f0r_param_double;
-00388 
-00392 typedef struct f0r_param_color
-00393 {
-00394   float r; 
-00395   float g; 
-00396   float b; 
-00397 } f0r_param_color_t;
-00398 
-00402 typedef struct f0r_param_position
-00403 {
-00404   double x; 
-00405   double y; 
-00406 } f0r_param_position_t;
-00407 
-00408 
-00413 typedef char f0r_param_string;
-00414 
-00424 typedef struct f0r_param_info
-00425 {
-00426   const char* name;         
-00427   int type;                 
-00428   const char* explanation;  
-00429 } f0r_param_info_t;
-00430 
-00439 void f0r_get_param_info(f0r_param_info_t* info, int param_index);
-00440 
-00441 //---------------------------------------------------------------------------
-00442 
-00446 typedef void* f0r_instance_t;
-00447 
-00461 f0r_instance_t f0r_construct(unsigned int width, unsigned int height);
-00462 
-00470 void f0r_destruct(f0r_instance_t instance);
-00471 
-00472 //---------------------------------------------------------------------------
-00473 
-00477 typedef void* f0r_param_t;
-00478 
-00490 void f0r_set_param_value(f0r_instance_t instance, 
-00491                          f0r_param_t param, int param_index);
-00492 
-00503 void f0r_get_param_value(f0r_instance_t instance,
-00504                          f0r_param_t param, int param_index);
-00505 
-00506 //---------------------------------------------------------------------------
-00507 
-00533 void f0r_update(f0r_instance_t instance, 
-00534                 double time, const uint32_t* inframe, uint32_t* outframe);
-00535 
-00536 //---------------------------------------------------------------------------
-00537 
-00559 void f0r_update2(f0r_instance_t instance,
-00560                  double time,
-00561                  const uint32_t* inframe1,
-00562                  const uint32_t* inframe2,
-00563                  const uint32_t* inframe3,
-00564                  uint32_t* outframe);
-00565 //---------------------------------------------------------------------------
-00566 
-00567 #endif
-

Generated on Wed Nov 7 12:07:53 2007 for frei0r by  - -doxygen 1.4.6
- - diff --git a/doc/html/frei0r_8h.html b/doc/html/frei0r_8h.html deleted file mode 100644 index b09c5f7..0000000 --- a/doc/html/frei0r_8h.html +++ /dev/null @@ -1,718 +0,0 @@ - - -frei0r: include/frei0r.h File Reference - - - - - - - -

frei0r.h File Reference

This file defines the frei0r api, version 1.1. More... -

-#include <inttypes.h>
- -

-Go to the source code of this file. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Data Structures

struct  f0r_plugin_info
struct  f0r_param_color
struct  f0r_param_position
struct  f0r_param_info

Defines

#define FREI0R_MAJOR_VERSION   1
#define FREI0R_MINOR_VERSION   1
#define F0R_PLUGIN_TYPE_FILTER   0
#define F0R_PLUGIN_TYPE_SOURCE   1
#define F0R_PLUGIN_TYPE_MIXER2   2
#define F0R_PLUGIN_TYPE_MIXER3   3
#define F0R_COLOR_MODEL_BGRA8888   0
#define F0R_COLOR_MODEL_RGBA8888   1
#define F0R_COLOR_MODEL_PACKED32   2
#define F0R_PARAM_BOOL   0
#define F0R_PARAM_DOUBLE   1
#define F0R_PARAM_COLOR   2
#define F0R_PARAM_POSITION   3
#define F0R_PARAM_STRING   4

Typedefs

typedef f0r_plugin_info f0r_plugin_info_t
typedef double f0r_param_bool
typedef double f0r_param_double
typedef f0r_param_color f0r_param_color_t
typedef f0r_param_position f0r_param_position_t
typedef char f0r_param_string
typedef f0r_param_info f0r_param_info_t
typedef void * f0r_instance_t
typedef void * f0r_param_t

Functions

int f0r_init ()
void f0r_deinit ()
void f0r_get_plugin_info (f0r_plugin_info_t *info)
void f0r_get_param_info (f0r_param_info_t *info, int param_index)
f0r_instance_t f0r_construct (unsigned int width, unsigned int height)
void f0r_destruct (f0r_instance_t 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)
void f0r_update2 (f0r_instance_t instance, double time, const uint32_t *inframe1, const uint32_t *inframe2, const uint32_t *inframe3, uint32_t *outframe)
-


Detailed Description

-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.


Define Documentation

-

- - - - -
- - - - -
#define FREI0R_MAJOR_VERSION   1
-
- - - - - -
-   - - -

-The frei0r API major version

-

- - - - -
- - - - -
#define FREI0R_MINOR_VERSION   1
-
- - - - - -
-   - - -

-The frei0r API minor version

-


Typedef Documentation

-

- - - - -
- - - - -
typedef void* f0r_instance_t
-
- - - - - -
-   - - -

-Transparent instance pointer of the frei0r effect.

-

- - - - -
- - - - -
typedef struct f0r_param_info f0r_param_info_t
-
- - - - - -
-   - - -

-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 void* f0r_param_t
-
- - - - - -
-   - - -

-Transparent parameter handle.

-

- - - - -
- - - - -
typedef struct f0r_plugin_info f0r_plugin_info_t
-
- - - - - -
-   - - -

-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.

-


Function Documentation

-

- - - - -
- - - - - - - - - - - - - - - - - - -
f0r_instance_t f0r_construct unsigned int  width,
unsigned int  height
-
- - - - - -
-   - - -

-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.

-

Parameters:
- - - -
width The x-resolution of the processed video frames
height The y-resolution of the processed video frames
-
-
Returns:
0 on failure or a pointer != 0 on success
-
See also:
f0r_destruct
-
-

- - - - -
- - - - - - - - -
void f0r_deinit  ) 
-
- - - - - -
-   - - -

-f0r_deinit is called once when the plugin is unloaded by the application.

See also:
f0r_init
-
-

- - - - -
- - - - - - - - - -
void f0r_destruct f0r_instance_t  instance  ) 
-
- - - - - -
-   - - -

-Destroys an effect instance.

-

Parameters:
- - -
instance The pointer to the plugins internal instance structure.
-
-
See also:
f0r_construct
-
-

- - - - -
- - - - - - - - - - - - - - - - - - -
void f0r_get_param_info f0r_param_info_t info,
int  param_index
-
- - - - - -
-   - - -

-f0r_get_param_info is called by the application to query the type of each parameter.

-

Parameters:
- - - -
info is allocated by the application and filled by the plugin
param_index the index of the parameter to be queried (from 0 to num_params-1)
-
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
void f0r_get_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.

-

Parameters:
- - - - -
instance the effect instance
param pointer to the parameter value
param_index index of the parameter
-
-
See also:
f0r_set_param_value
-
-

- - - - -
- - - - - - - - - -
void f0r_get_plugin_info f0r_plugin_info_t info  ) 
-
- - - - - -
-   - - -

-Is called once after init. The plugin has to fill in the values in info.

-

Parameters:
- - -
info Pointer to an info struct allocated by the application.
-
-
-

- - - - -
- - - - - - - - -
int f0r_init  ) 
-
- - - - - -
-   - - -

-f0r_init() is called once when the plugin is loaded by the application.

See also:
f0r_deinit
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
void f0r_set_param_value f0r_instance_t  instance,
f0r_param_t  param,
int  param_index
-
- - - - - -
-   - - -

-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.

-

Parameters:
- - - - -
instance the effect instance
param pointer to the parameter value
param_index index of the parameter
-
-
See also:
f0r_get_param_value
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void f0r_update f0r_instance_t  instance,
double  time,
const uint32_t *  inframe,
uint32_t *  outframe
-
- - - - - -
-   - - -

-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 (f0r_get_param_value should return the same values after a call to 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 f0r_update for effects of type F0R_PLUGIN_TYPE_MIXER2 and F0R_PLUGIN_TYPE_MIXER3.

-

Parameters:
- - - - - -
instance the effect instance
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.
inframe the incoming video frame (can be zero for sources)
outframe the resulting video frame
-
-
See also:
f0r_update2
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void f0r_update2 f0r_instance_t  instance,
double  time,
const uint32_t *  inframe1,
const uint32_t *  inframe2,
const uint32_t *  inframe3,
uint32_t *  outframe
-
- - - - - -
-   - - -

-For effects of type F0R_PLUGIN_TYPE_SOURCE or F0R_PLUGIN_TYPE_FILTER this method is optional. The 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 F0R_PLUGIN_TYPE_MIXER2 or F0R_PLUGIN_TYPE_MIXER3 must provide the new f0r_update2 method.

-

Parameters:
- - - - - - - -
instance the effect instance
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.
inframe1 the first incoming video frame (can be zero for sources)
inframe2 the second incoming video frame (can be zero for sources and filters)
inframe3 the third incoming video frame (can be zero for sources, filters and mixer3)
outframe the resulting video frame
-
-
See also:
f0r_update
-
-


Generated on Wed Nov 7 12:07:53 2007 for frei0r by  - -doxygen 1.4.6
- - diff --git a/doc/html/functions.html b/doc/html/functions.html deleted file mode 100644 index 33ad180..0000000 --- a/doc/html/functions.html +++ /dev/null @@ -1,51 +0,0 @@ - - -frei0r: Data Fields - - - - - - -
- -
-Here is a list of all documented struct and union fields with links to the struct/union documentation for each field: -

-

-
Generated on Wed Nov 7 12:07:53 2007 for frei0r by  - -doxygen 1.4.6
- - diff --git a/doc/html/functions_vars.html b/doc/html/functions_vars.html deleted file mode 100644 index 8440f7e..0000000 --- a/doc/html/functions_vars.html +++ /dev/null @@ -1,51 +0,0 @@ - - -frei0r: Data Fields - Variables - - - - - - -
- -
-  -

-

-
Generated on Wed Nov 7 12:07:53 2007 for frei0r by  - -doxygen 1.4.6
- - diff --git a/doc/html/globals.html b/doc/html/globals.html deleted file mode 100644 index f42253b..0000000 --- a/doc/html/globals.html +++ /dev/null @@ -1,77 +0,0 @@ - - -frei0r: Data Fields - - - - - - -
- -
-
-
    -
  • f
  • -
-
- -

-Here is a list of all documented functions, variables, defines, enums, and typedefs with links to the documentation: -

-

- f -

-
Generated on Wed Nov 7 12:07:53 2007 for frei0r by  - -doxygen 1.4.6
- - diff --git a/doc/html/globals_defs.html b/doc/html/globals_defs.html deleted file mode 100644 index 1bd1607..0000000 --- a/doc/html/globals_defs.html +++ /dev/null @@ -1,51 +0,0 @@ - - -frei0r: Data Fields - - - - - - -
- -
-  -

-

-
Generated on Wed Nov 7 12:07:53 2007 for frei0r by  - -doxygen 1.4.6
- - diff --git a/doc/html/globals_func.html b/doc/html/globals_func.html deleted file mode 100644 index 26e6874..0000000 --- a/doc/html/globals_func.html +++ /dev/null @@ -1,47 +0,0 @@ - - -frei0r: Data Fields - - - - - - -
- -
-  -

-

-
Generated on Wed Nov 7 12:07:53 2007 for frei0r by  - -doxygen 1.4.6
- - diff --git a/doc/html/globals_type.html b/doc/html/globals_type.html deleted file mode 100644 index 4eaa92f..0000000 --- a/doc/html/globals_type.html +++ /dev/null @@ -1,46 +0,0 @@ - - -frei0r: Data Fields - - - - - - -
- -
-  -

-

-
Generated on Wed Nov 7 12:07:53 2007 for frei0r by  - -doxygen 1.4.6
- - diff --git a/doc/html/group__COLOR__MODEL.html b/doc/html/group__COLOR__MODEL.html deleted file mode 100644 index ae0601a..0000000 --- a/doc/html/group__COLOR__MODEL.html +++ /dev/null @@ -1,111 +0,0 @@ - - -frei0r: Color Models - - - - - -

Color Models

- - - - - - - - -

Defines

#define F0R_COLOR_MODEL_BGRA8888   0
#define F0R_COLOR_MODEL_RGBA8888   1
#define F0R_COLOR_MODEL_PACKED32   2
-

Detailed Description

-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.


Define Documentation

-

- - - - -
- - - - -
#define F0R_COLOR_MODEL_BGRA8888   0
-
- - - - - -
-   - - -

-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_PACKED32   2
-
- - - - - -
-   - - -

-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_RGBA8888   1
-
- - - - - -
-   - - -

-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.

-


Generated on Wed Nov 7 12:07:53 2007 for frei0r by  - -doxygen 1.4.6
- - diff --git a/doc/html/group__PARAM__TYPE.html b/doc/html/group__PARAM__TYPE.html deleted file mode 100644 index 1d07053..0000000 --- a/doc/html/group__PARAM__TYPE.html +++ /dev/null @@ -1,287 +0,0 @@ - - -frei0r: Parameter Types - - - - - -

Parameter Types

- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Data Structures

struct  f0r_param_color
struct  f0r_param_position

Defines

#define F0R_PARAM_BOOL   0
#define F0R_PARAM_DOUBLE   1
#define F0R_PARAM_COLOR   2
#define F0R_PARAM_POSITION   3
#define F0R_PARAM_STRING   4

Typedefs

typedef double f0r_param_bool
typedef double f0r_param_double
typedef f0r_param_color f0r_param_color_t
typedef f0r_param_position f0r_param_position_t
typedef char f0r_param_string
-

Define Documentation

-

- - - - -
- - - - -
#define F0R_PARAM_BOOL   0
-
- - - - - -
-   - - -

-Parameter type for boolean values

See also:
f0r_param_bool
-
-

- - - - -
- - - - -
#define F0R_PARAM_COLOR   2
-
- - - - - -
-   - - -

-Parameter type for color

See also:
f0r_param_color
-
-

- - - - -
- - - - -
#define F0R_PARAM_DOUBLE   1
-
- - - - - -
-   - - -

-Parameter type for doubles

See also:
f0r_param_double
-
-

- - - - -
- - - - -
#define F0R_PARAM_POSITION   3
-
- - - - - -
-   - - -

-Parameter type for position

See also:
f0r_param_position
-
-

- - - - -
- - - - -
#define F0R_PARAM_STRING   4
-
- - - - - -
-   - - -

-Parameter type for string

See also:
f0r_param_string
-
-


Typedef Documentation

-

- - - - -
- - - - -
typedef double f0r_param_bool
-
- - - - - -
-   - - -

-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 struct f0r_param_color f0r_param_color_t
-
- - - - - -
-   - - -

-The color type. All three color components are in the range [0, 1].

-

- - - - -
- - - - -
typedef double f0r_param_double
-
- - - - - -
-   - - -

-The double type. The allowed range of values is [0, 1].

-

- - - - -
- - - - -
typedef struct f0r_param_position f0r_param_position_t
-
- - - - - -
-   - - -

-The position type. Both position coordinates are in the range [0, 1].

-

- - - - -
- - - - -
typedef char f0r_param_string
-
- - - - - -
-   - - -

-The string type. Zero terminated array of 8-bit values in utf-8 encoding

-


Generated on Wed Nov 7 12:07:53 2007 for frei0r by  - -doxygen 1.4.6
- - diff --git a/doc/html/group__PLUGIN__TYPE.html b/doc/html/group__PLUGIN__TYPE.html deleted file mode 100644 index b6ed018..0000000 --- a/doc/html/group__PLUGIN__TYPE.html +++ /dev/null @@ -1,126 +0,0 @@ - - -frei0r: Type of the Plugin - - - - - -

Type of the Plugin

- - - - - - - - - - -

Defines

#define F0R_PLUGIN_TYPE_FILTER   0
#define F0R_PLUGIN_TYPE_SOURCE   1
#define F0R_PLUGIN_TYPE_MIXER2   2
#define F0R_PLUGIN_TYPE_MIXER3   3
-

Detailed Description

-These defines determine whether the plugin is a source, a filter or one of the two mixer types

Define Documentation

-

- - - - -
- - - - -
#define F0R_PLUGIN_TYPE_FILTER   0
-
- - - - - -
-   - - -

-one input and one output

-

- - - - -
- - - - -
#define F0R_PLUGIN_TYPE_MIXER2   2
-
- - - - - -
-   - - -

-two inputs and one output

-

- - - - -
- - - - -
#define F0R_PLUGIN_TYPE_MIXER3   3
-
- - - - - -
-   - - -

-three inputs and one output

-

- - - - -
- - - - -
#define F0R_PLUGIN_TYPE_SOURCE   1
-
- - - - - -
-   - - -

-just one output

-


Generated on Wed Nov 7 12:07:53 2007 for frei0r by  - -doxygen 1.4.6
- - diff --git a/doc/html/group__concurrency.html b/doc/html/group__concurrency.html deleted file mode 100644 index e76a8ee..0000000 --- a/doc/html/group__concurrency.html +++ /dev/null @@ -1,36 +0,0 @@ - - -frei0r: Concurrency - - - - - -

Concurrency

- -
-

-Concurrency

- -

-These methods must not be called more than once. It is obvious that no concurrent calls are allowed.

-

-

-Concurrent calls of these functions are allowed.

-

-

-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.


Generated on Wed Nov 7 12:07:53 2007 for frei0r by  - -doxygen 1.4.6
- - diff --git a/doc/html/group__icons.html b/doc/html/group__icons.html deleted file mode 100644 index f5ab79b..0000000 --- a/doc/html/group__icons.html +++ /dev/null @@ -1,41 +0,0 @@ - - -frei0r: Icons for frei0r effects - - - - - -

Icons for frei0r effects

- -
-

-Icons for frei0r effects

-Each frei0r effect can have an associated icon.

-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".

-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:

-

  <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>
- 

-(The wildcard '*' stands for any other plugin_path)

-For other platforms, no location is defined. We recommend to use the plugin path where possible.


Generated on Wed Nov 7 12:07:53 2007 for frei0r by  - -doxygen 1.4.6
- - diff --git a/doc/html/group__pluglocations.html b/doc/html/group__pluglocations.html deleted file mode 100644 index b96b38f..0000000 --- a/doc/html/group__pluglocations.html +++ /dev/null @@ -1,38 +0,0 @@ - - -frei0r: Plugin Locations - - - - - -

Plugin Locations

- -
-

-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.

-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.


Generated on Wed Nov 7 12:07:53 2007 for frei0r by  - -doxygen 1.4.6
- - diff --git a/doc/html/hierarchy.html b/doc/html/hierarchy.html deleted file mode 100644 index 50f1d91..0000000 --- a/doc/html/hierarchy.html +++ /dev/null @@ -1,32 +0,0 @@ - - -frei0r: Hierarchical Index - - - - - - -

frei0r Class Hierarchy

This inheritance list is sorted roughly, but not completely, alphabetically: -
Generated on Wed Nov 7 12:07:53 2007 for frei0r by  - -doxygen 1.4.6
- - diff --git a/doc/html/index.html b/doc/html/index.html deleted file mode 100644 index d3111c6..0000000 --- a/doc/html/index.html +++ /dev/null @@ -1,40 +0,0 @@ - - -frei0r: frei0r - a minimalistic plugin API for video effects - - - - - -

frei0r - a minimalistic plugin API for video effects

-

-

-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.

-Overview

-If you are new to frei0r, the best thing is probably to have a look at the frei0r header, which is quite simple.

-After that, you might want to look at the frei0r functions in more detail.

-When developing a new frei0r effect, you have to choose

-

-To round things up, you should decide whether your effect should have an associated icon (Icons for frei0r effects), and where it will be installed (Plugin Locations).

-Changes

-

-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 Concurrency
-
Generated on Wed Nov 7 12:07:53 2007 for frei0r by  - -doxygen 1.4.6
- - diff --git a/doc/html/modules.html b/doc/html/modules.html deleted file mode 100644 index 0c6498a..0000000 --- a/doc/html/modules.html +++ /dev/null @@ -1,28 +0,0 @@ - - -frei0r: Module Index - - - - - -

frei0r Modules

Here is a list of all modules: -
Generated on Wed Nov 7 12:07:53 2007 for frei0r by  - -doxygen 1.4.6
- - diff --git a/doc/html/structf0r__param__color.html b/doc/html/structf0r__param__color.html deleted file mode 100644 index d0e9182..0000000 --- a/doc/html/structf0r__param__color.html +++ /dev/null @@ -1,116 +0,0 @@ - - -frei0r: f0r_param_color Struct Reference - - - - - - -

f0r_param_color Struct Reference
- -[Parameter Types] -

#include <frei0r.h> -

- - - - - - - - - -

Data Fields

float r
float g
float b
-


Detailed Description

-The color type. All three color components are in the range [0, 1]. -

-


Field Documentation

-

- - - - -
- - - - -
float f0r_param_color::b
-
- - - - - -
-   - - -

-blue color component

-

- - - - -
- - - - -
float f0r_param_color::g
-
- - - - - -
-   - - -

-green color component

-

- - - - -
- - - - -
float f0r_param_color::r
-
- - - - - -
-   - - -

-red color component

-


The documentation for this struct was generated from the following file: -
Generated on Wed Nov 7 12:07:53 2007 for frei0r by  - -doxygen 1.4.6
- - diff --git a/doc/html/structf0r__param__info.html b/doc/html/structf0r__param__info.html deleted file mode 100644 index aa3f53f..0000000 --- a/doc/html/structf0r__param__info.html +++ /dev/null @@ -1,114 +0,0 @@ - - -frei0r: f0r_param_info Struct Reference - - - - - - -

f0r_param_info Struct Reference

#include <frei0r.h> -

- - - - - - - - - -

Data Fields

const char * name
int type
const char * explanation
-


Detailed Description

-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. -

-


Field Documentation

-

- - - - -
- - - - -
const char* f0r_param_info::explanation
-
- - - - - -
-   - - -

-Optional explanation (can be 0)

-

- - - - -
- - - - -
const char* f0r_param_info::name
-
- - - - - -
-   - - -

-The (short) name of the param

-

- - - - -
- - - - -
int f0r_param_info::type
-
- - - - - -
-   - - -

-The type (see the F0R_PARAM_* defines)

-


The documentation for this struct was generated from the following file: -
Generated on Wed Nov 7 12:07:53 2007 for frei0r by  - -doxygen 1.4.6
- - diff --git a/doc/html/structf0r__param__position.html b/doc/html/structf0r__param__position.html deleted file mode 100644 index 5be9948..0000000 --- a/doc/html/structf0r__param__position.html +++ /dev/null @@ -1,91 +0,0 @@ - - -frei0r: f0r_param_position Struct Reference - - - - - - -

f0r_param_position Struct Reference
- -[Parameter Types] -

#include <frei0r.h> -

- - - - - - - -

Data Fields

double x
double y
-


Detailed Description

-The position type. Both position coordinates are in the range [0, 1]. -

-


Field Documentation

-

- - - - -
- - - - -
double f0r_param_position::x
-
- - - - - -
-   - - -

-x coordinate

-

- - - - -
- - - - -
double f0r_param_position::y
-
- - - - - -
-   - - -

-y coordinate

-


The documentation for this struct was generated from the following file: -
Generated on Wed Nov 7 12:07:53 2007 for frei0r by  - -doxygen 1.4.6
- - diff --git a/doc/html/structf0r__plugin__info.html b/doc/html/structf0r__plugin__info.html deleted file mode 100644 index 1bb1890..0000000 --- a/doc/html/structf0r__plugin__info.html +++ /dev/null @@ -1,267 +0,0 @@ - - -frei0r: f0r_plugin_info Struct Reference - - - - - - -

f0r_plugin_info Struct Reference

#include <frei0r.h> -

- - - - - - - - - - - - - - - - - - - - - -

Data Fields

const char * name
const char * author
int plugin_type
int color_model
int frei0r_version
int major_version
int minor_version
int num_params
const char * explanation
-


Detailed Description

-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. -

-


Field Documentation

-

- - - - -
- - - - -
const char* f0r_plugin_info::author
-
- - - - - -
-   - - -

-The plugin author

-

- - - - -
- - - - -
int f0r_plugin_info::color_model
-
- - - - - -
-   - - -

-The color model used

-

- - - - -
- - - - -
const char* f0r_plugin_info::explanation
-
- - - - - -
-   - - -

-An optional explanation string

-

- - - - -
- - - - -
int f0r_plugin_info::frei0r_version
-
- - - - - -
-   - - -

-The frei0r major version this plugin is built for

-

- - - - -
- - - - -
int f0r_plugin_info::major_version
-
- - - - - -
-   - - -

-The major version of the plugin

-

- - - - -
- - - - -
int f0r_plugin_info::minor_version
-
- - - - - -
-   - - -

-The minor version of the plugin

-

- - - - -
- - - - -
const char* f0r_plugin_info::name
-
- - - - - -
-   - - -

-The (short) name of the plugin

-

- - - - -
- - - - -
int f0r_plugin_info::num_params
-
- - - - - -
-   - - -

-The number of parameters of the plugin

-

- - - - -
- - - - -
int f0r_plugin_info::plugin_type
-
- - - - - -
-   - - -

-The plugin type

See also:
Type of the Plugin
-
-


The documentation for this struct was generated from the following file: -
Generated on Wed Nov 7 12:07:53 2007 for frei0r by  - -doxygen 1.4.6
- - diff --git a/doc/html/tab_b.gif b/doc/html/tab_b.gif deleted file mode 100644 index 0d62348..0000000 Binary files a/doc/html/tab_b.gif and /dev/null differ diff --git a/doc/html/tab_l.gif b/doc/html/tab_l.gif deleted file mode 100644 index 9b1e633..0000000 Binary files a/doc/html/tab_l.gif and /dev/null differ diff --git a/doc/html/tab_r.gif b/doc/html/tab_r.gif deleted file mode 100644 index ce9dd9f..0000000 Binary files a/doc/html/tab_r.gif and /dev/null differ diff --git a/doc/html/tabs.css b/doc/html/tabs.css deleted file mode 100644 index a61552a..0000000 --- a/doc/html/tabs.css +++ /dev/null @@ -1,102 +0,0 @@ -/* 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; -} diff --git a/include/Makefile.in b/include/Makefile.in index 3823b7c..84c5d60 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -49,7 +49,10 @@ $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/config.h.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -103,6 +106,7 @@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DOXYGEN = @DOXYGEN@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -114,6 +118,7 @@ GAVL_CFLAGS = @GAVL_CFLAGS@ GAVL_LIBS = @GAVL_LIBS@ GREP = @GREP@ +HAVE_OPENCV = @HAVE_OPENCV@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -139,6 +144,8 @@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_DATA_DIR = @PACKAGE_DATA_DIR@ +PACKAGE_LIB_DIR = @PACKAGE_LIB_DIR@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ @@ -146,6 +153,8 @@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ diff --git a/include/config.h.in b/include/config.h.in index c1541bc..9199832 100644 --- a/include/config.h.in +++ b/include/config.h.in @@ -27,6 +27,9 @@ /* define if enabling MMX acceleration */ #undef HAVE_MMX + +/* compiled including opencv */ +#undef HAVE_OPENCV /* Define to 1 if you have the `pow' function. */ #undef HAVE_POW @@ -74,6 +77,9 @@ */ #undef LT_OBJDIR +/* opencv data prefix */ +#undef OPENCV_DATA_DIR + /* Name of package */ #undef PACKAGE diff --git a/include/frei0r.h b/include/frei0r.h index f6b81d2..1db4b84 100644 --- a/include/frei0r.h +++ b/include/frei0r.h @@ -39,6 +39,11 @@ * (\ref pluglocations). * * @section sec_changes Changes + * + * @subsection sec_changes_1_1_1_2 From frei0r 1.1 to frei0r 1.2 + * - make in plugin path optional + * - added section on FREI0R_PATH environment variable + * - added requirement to initialize all parameters in f0r_construct() * * @subsection sec_changes_1_0_1_1 From frei0r 1.0 to frei0r 1.1 * @@ -79,7 +84,7 @@ * - /home/martin/.frei0r-1/lib/martin/test.so * * Like in these examples plugins should be placed in "vendor" subdirs - * to reduce name clashes. + * to reduce name clashes. However, is optional and may be left blank. * * @subsection sec_order Plugin Loading Order * @@ -95,6 +100,16 @@ * * The order of loading plugins inside each of the directories * 1, 2, and 3 is not defined. + * + * @subsection sec_path FREI0R_PATH Environment Variable + * + * If the environment variable FREI0R_PATH is defined, then it shall be + * considered a colon separated list of directories which replaces the + * default list. + * + * For example: + * + * FREI0R_PATH=/home/foo/frei0r-plugins:/usr/lib/frei0r-1:/etc/frei0r */ /** @@ -173,7 +188,7 @@ /** \file - * \brief This file defines the frei0r api, version 1.1. + * \brief This file defines the frei0r api, version 1.2. * * A conforming plugin must implement and export all functions declared in * this header. @@ -195,7 +210,7 @@ /** * The frei0r API minor version */ -#define FREI0R_MINOR_VERSION 1 +#define FREI0R_MINOR_VERSION 2 //--------------------------------------------------------------------------- @@ -240,7 +255,7 @@ * 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. + * RGBA8888 is the recommended color model for frei0r-1.2 effects. * For effects that only work on pixels, PACKED32 is the recommended * color model since it helps the application to avoid unnecessary * color conversions. @@ -410,7 +425,7 @@ * The string type. * Zero terminated array of 8-bit values in utf-8 encoding */ -typedef char f0r_param_string; +typedef char* f0r_param_string; /** @} */ @@ -449,8 +464,9 @@ * Constructor for effect instances. The plugin returns a pointer to * its internal instance structure. * - * The resolution has to be an integer multiple of 8, + * The resolution must be an integer multiple of 8, * must be greater than 0 and be at most 2048 in both dimensions. + * The plugin must set default values for all parameters in this function. * * \param width The x-resolution of the processed video frames * \param height The y-resolution of the processed video frames @@ -481,6 +497,19 @@ * effect instance. Validity of the parameter pointer is handled by the * application thus the data must be copied by the effect. * + * If the parameter type is of F0R_PARAM_STRING, then the caller should + * supply a pointer to f0r_param_string (char**). The plugin must copy + * copy the string and not assume it exists beyond the lifetime of the call. + * The reason a double pointer is requested when only a single is really + * needed is simply for API consistency. + * + * Furthermore, if an update event/signal is needed in a host + * application to notice when parameters have changed, this should be + * implemented inside its own update() call. The host application + * would presumably need to store the current value as well to see if + * it changes; to make this thread safe, it should store a copy of the + * current value in a struct which uses instance as a key. + * * \param instance the effect instance * \param param pointer to the parameter value * \param param_index index of the parameter @@ -493,6 +522,13 @@ /** * This function allows the application to query the parameter values of an * effect instance. + * + * If the parameter type is of F0R_PARAM_STRING, then the caller should + * supply a pointer to f0r_param_string (char**). The plugin sets the + * pointer to the address of its copy of the parameter value. Therefore, + * the caller should not free the result. If the caller needs to modify + * the value, it should make a copy of it and modify before calling + * f0r_set_param_value(). * * \param instance the effect instance * \param param pointer to the parameter value @@ -551,7 +587,7 @@ * \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) + (can be zero for sources, filters and mixer2) * \param outframe the resulting video frame * * \see f0r_update diff --git a/include/frei0r.hpp b/include/frei0r.hpp index 8eaa889..1363bce 100644 --- a/include/frei0r.hpp +++ b/include/frei0r.hpp @@ -84,6 +84,14 @@ { param_ptrs.push_back(&p_loc); s_params.push_back(param_info(name,desc,F0R_PARAM_POSITION)); + } + + void register_param(const std::string& p_loc, + const std::string& name, + const std::string& desc) + { + param_ptrs.push_back(new std::string(p_loc)); + s_params.push_back(param_info(name,desc,F0R_PARAM_STRING)); } @@ -108,6 +116,10 @@ *static_cast(param) = *static_cast(ptr); break; + case F0R_PARAM_STRING: + *static_cast(param) + = const_cast(static_cast(ptr)->c_str()); + break; } } @@ -134,6 +146,11 @@ *static_cast(ptr) = *static_cast(param); break; + case F0R_PARAM_STRING: + delete static_cast(ptr); + param_ptrs[param_index] + = new std::string(*static_cast(param)); + break; } } @@ -146,8 +163,14 @@ virtual void update() = 0; - virtual ~fx(){}; - }; + virtual ~fx() + { + for (int i = 0; i < s_params.size(); i++) { + if (s_params[i].m_type == F0R_PARAM_STRING) + delete static_cast(param_ptrs[i]); + } + } + }; class source : public fx { diff --git a/include/msvc/inttypes.h b/include/msvc/inttypes.h new file mode 100644 index 0000000..ead903f --- /dev/null +++ b/include/msvc/inttypes.h @@ -0,0 +1,305 @@ +// ISO C9x compliant inttypes.h for Microsoft Visual Studio +// Based on ISO/IEC 9899:TC2 Committee draft (May 6, 2005) WG14/N1124 +// +// Copyright (c) 2006 Alexander Chemeris +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are met: +// +// 1. Redistributions of source code must retain the above copyright notice, +// this list of conditions and the following disclaimer. +// +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// 3. The name of the author may be used to endorse or promote products +// derived from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +// EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _MSC_VER // [ +#error "Use this header only with Microsoft Visual C++ compilers!" +#endif // _MSC_VER ] + +#ifndef _MSC_INTTYPES_H_ // [ +#define _MSC_INTTYPES_H_ + +#if _MSC_VER > 1000 +#pragma once +#endif + +#include "stdint.h" + +// 7.8 Format conversion of integer types + +typedef struct { + intmax_t quot; + intmax_t rem; +} imaxdiv_t; + +// 7.8.1 Macros for format specifiers + +#if !defined(__cplusplus) || defined(__STDC_FORMAT_MACROS) // [ See footnote 185 at page 198 + +// The fprintf macros for signed integers are: +#define PRId8 "d" +#define PRIi8 "i" +#define PRIdLEAST8 "d" +#define PRIiLEAST8 "i" +#define PRIdFAST8 "d" +#define PRIiFAST8 "i" + +#define PRId16 "hd" +#define PRIi16 "hi" +#define PRIdLEAST16 "hd" +#define PRIiLEAST16 "hi" +#define PRIdFAST16 "hd" +#define PRIiFAST16 "hi" + +#define PRId32 "I32d" +#define PRIi32 "I32i" +#define PRIdLEAST32 "I32d" +#define PRIiLEAST32 "I32i" +#define PRIdFAST32 "I32d" +#define PRIiFAST32 "I32i" + +#define PRId64 "I64d" +#define PRIi64 "I64i" +#define PRIdLEAST64 "I64d" +#define PRIiLEAST64 "I64i" +#define PRIdFAST64 "I64d" +#define PRIiFAST64 "I64i" + +#define PRIdMAX "I64d" +#define PRIiMAX "I64i" + +#define PRIdPTR "Id" +#define PRIiPTR "Ii" + +// The fprintf macros for unsigned integers are: +#define PRIo8 "o" +#define PRIu8 "u" +#define PRIx8 "x" +#define PRIX8 "X" +#define PRIoLEAST8 "o" +#define PRIuLEAST8 "u" +#define PRIxLEAST8 "x" +#define PRIXLEAST8 "X" +#define PRIoFAST8 "o" +#define PRIuFAST8 "u" +#define PRIxFAST8 "x" +#define PRIXFAST8 "X" + +#define PRIo16 "ho" +#define PRIu16 "hu" +#define PRIx16 "hx" +#define PRIX16 "hX" +#define PRIoLEAST16 "ho" +#define PRIuLEAST16 "hu" +#define PRIxLEAST16 "hx" +#define PRIXLEAST16 "hX" +#define PRIoFAST16 "ho" +#define PRIuFAST16 "hu" +#define PRIxFAST16 "hx" +#define PRIXFAST16 "hX" + +#define PRIo32 "I32o" +#define PRIu32 "I32u" +#define PRIx32 "I32x" +#define PRIX32 "I32X" +#define PRIoLEAST32 "I32o" +#define PRIuLEAST32 "I32u" +#define PRIxLEAST32 "I32x" +#define PRIXLEAST32 "I32X" +#define PRIoFAST32 "I32o" +#define PRIuFAST32 "I32u" +#define PRIxFAST32 "I32x" +#define PRIXFAST32 "I32X" + +#define PRIo64 "I64o" +#define PRIu64 "I64u" +#define PRIx64 "I64x" +#define PRIX64 "I64X" +#define PRIoLEAST64 "I64o" +#define PRIuLEAST64 "I64u" +#define PRIxLEAST64 "I64x" +#define PRIXLEAST64 "I64X" +#define PRIoFAST64 "I64o" +#define PRIuFAST64 "I64u" +#define PRIxFAST64 "I64x" +#define PRIXFAST64 "I64X" + +#define PRIoMAX "I64o" +#define PRIuMAX "I64u" +#define PRIxMAX "I64x" +#define PRIXMAX "I64X" + +#define PRIoPTR "Io" +#define PRIuPTR "Iu" +#define PRIxPTR "Ix" +#define PRIXPTR "IX" + +// The fscanf macros for signed integers are: +#define SCNd8 "d" +#define SCNi8 "i" +#define SCNdLEAST8 "d" +#define SCNiLEAST8 "i" +#define SCNdFAST8 "d" +#define SCNiFAST8 "i" + +#define SCNd16 "hd" +#define SCNi16 "hi" +#define SCNdLEAST16 "hd" +#define SCNiLEAST16 "hi" +#define SCNdFAST16 "hd" +#define SCNiFAST16 "hi" + +#define SCNd32 "ld" +#define SCNi32 "li" +#define SCNdLEAST32 "ld" +#define SCNiLEAST32 "li" +#define SCNdFAST32 "ld" +#define SCNiFAST32 "li" + +#define SCNd64 "I64d" +#define SCNi64 "I64i" +#define SCNdLEAST64 "I64d" +#define SCNiLEAST64 "I64i" +#define SCNdFAST64 "I64d" +#define SCNiFAST64 "I64i" + +#define SCNdMAX "I64d" +#define SCNiMAX "I64i" + +#ifdef _WIN64 // [ +# define SCNdPTR "I64d" +# define SCNiPTR "I64i" +#else // _WIN64 ][ +# define SCNdPTR "ld" +# define SCNiPTR "li" +#endif // _WIN64 ] + +// The fscanf macros for unsigned integers are: +#define SCNo8 "o" +#define SCNu8 "u" +#define SCNx8 "x" +#define SCNX8 "X" +#define SCNoLEAST8 "o" +#define SCNuLEAST8 "u" +#define SCNxLEAST8 "x" +#define SCNXLEAST8 "X" +#define SCNoFAST8 "o" +#define SCNuFAST8 "u" +#define SCNxFAST8 "x" +#define SCNXFAST8 "X" + +#define SCNo16 "ho" +#define SCNu16 "hu" +#define SCNx16 "hx" +#define SCNX16 "hX" +#define SCNoLEAST16 "ho" +#define SCNuLEAST16 "hu" +#define SCNxLEAST16 "hx" +#define SCNXLEAST16 "hX" +#define SCNoFAST16 "ho" +#define SCNuFAST16 "hu" +#define SCNxFAST16 "hx" +#define SCNXFAST16 "hX" + +#define SCNo32 "lo" +#define SCNu32 "lu" +#define SCNx32 "lx" +#define SCNX32 "lX" +#define SCNoLEAST32 "lo" +#define SCNuLEAST32 "lu" +#define SCNxLEAST32 "lx" +#define SCNXLEAST32 "lX" +#define SCNoFAST32 "lo" +#define SCNuFAST32 "lu" +#define SCNxFAST32 "lx" +#define SCNXFAST32 "lX" + +#define SCNo64 "I64o" +#define SCNu64 "I64u" +#define SCNx64 "I64x" +#define SCNX64 "I64X" +#define SCNoLEAST64 "I64o" +#define SCNuLEAST64 "I64u" +#define SCNxLEAST64 "I64x" +#define SCNXLEAST64 "I64X" +#define SCNoFAST64 "I64o" +#define SCNuFAST64 "I64u" +#define SCNxFAST64 "I64x" +#define SCNXFAST64 "I64X" + +#define SCNoMAX "I64o" +#define SCNuMAX "I64u" +#define SCNxMAX "I64x" +#define SCNXMAX "I64X" + +#ifdef _WIN64 // [ +# define SCNoPTR "I64o" +# define SCNuPTR "I64u" +# define SCNxPTR "I64x" +# define SCNXPTR "I64X" +#else // _WIN64 ][ +# define SCNoPTR "lo" +# define SCNuPTR "lu" +# define SCNxPTR "lx" +# define SCNXPTR "lX" +#endif // _WIN64 ] + +#endif // __STDC_FORMAT_MACROS ] + +// 7.8.2 Functions for greatest-width integer types + +// 7.8.2.1 The imaxabs function +#define imaxabs _abs64 + +// 7.8.2.2 The imaxdiv function + +// This is modified version of div() function from Microsoft's div.c found +// in %MSVC.NET%\crt\src\div.c +#ifdef STATIC_IMAXDIV // [ +static +#else // STATIC_IMAXDIV ][ +_inline +#endif // STATIC_IMAXDIV ] +imaxdiv_t __cdecl imaxdiv(intmax_t numer, intmax_t denom) +{ + imaxdiv_t result; + + result.quot = numer / denom; + result.rem = numer % denom; + + if (numer < 0 && result.rem > 0) { + // did division wrong; must fix up + ++result.quot; + result.rem -= denom; + } + + return result; +} + +// 7.8.2.3 The strtoimax and strtoumax functions +#define strtoimax _strtoi64 +#define strtoumax _strtoui64 + +// 7.8.2.4 The wcstoimax and wcstoumax functions +#define wcstoimax _wcstoi64 +#define wcstoumax _wcstoui64 + + +#endif // _MSC_INTTYPES_H_ ] diff --git a/include/msvc/stdint.h b/include/msvc/stdint.h new file mode 100644 index 0000000..c66fbb8 --- /dev/null +++ b/include/msvc/stdint.h @@ -0,0 +1,247 @@ +// ISO C9x compliant stdint.h for Microsoft Visual Studio +// Based on ISO/IEC 9899:TC2 Committee draft (May 6, 2005) WG14/N1124 +// +// Copyright (c) 2006-2008 Alexander Chemeris +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are met: +// +// 1. Redistributions of source code must retain the above copyright notice, +// this list of conditions and the following disclaimer. +// +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// 3. The name of the author may be used to endorse or promote products +// derived from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +// EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _MSC_VER // [ +#error "Use this header only with Microsoft Visual C++ compilers!" +#endif // _MSC_VER ] + +#ifndef _MSC_STDINT_H_ // [ +#define _MSC_STDINT_H_ + +#if _MSC_VER > 1000 +#pragma once +#endif + +#include + +// For Visual Studio 6 in C++ mode and for many Visual Studio versions when +// compiling for ARM we should wrap include with 'extern "C++" {}' +// or compiler give many errors like this: +// error C2733: second C linkage of overloaded function 'wmemchr' not allowed +#ifdef __cplusplus +extern "C" { +#endif +# include +#ifdef __cplusplus +} +#endif + +// Define _W64 macros to mark types changing their size, like intptr_t. +#ifndef _W64 +# if !defined(__midl) && (defined(_X86_) || defined(_M_IX86)) && _MSC_VER >= 1300 +# define _W64 __w64 +# else +# define _W64 +# endif +#endif + + +// 7.18.1 Integer types + +// 7.18.1.1 Exact-width integer types + +// Visual Studio 6 and Embedded Visual C++ 4 doesn't +// realize that, e.g. char has the same size as __int8 +// so we give up on __intX for them. +#if (_MSC_VER < 1300) + typedef signed char int8_t; + typedef signed short int16_t; + typedef signed int int32_t; + typedef unsigned char uint8_t; + typedef unsigned short uint16_t; + typedef unsigned int uint32_t; +#else + typedef signed __int8 int8_t; + typedef signed __int16 int16_t; + typedef signed __int32 int32_t; + typedef unsigned __int8 uint8_t; + typedef unsigned __int16 uint16_t; + typedef unsigned __int32 uint32_t; +#endif +typedef signed __int64 int64_t; +typedef unsigned __int64 uint64_t; + + +// 7.18.1.2 Minimum-width integer types +typedef int8_t int_least8_t; +typedef int16_t int_least16_t; +typedef int32_t int_least32_t; +typedef int64_t int_least64_t; +typedef uint8_t uint_least8_t; +typedef uint16_t uint_least16_t; +typedef uint32_t uint_least32_t; +typedef uint64_t uint_least64_t; + +// 7.18.1.3 Fastest minimum-width integer types +typedef int8_t int_fast8_t; +typedef int16_t int_fast16_t; +typedef int32_t int_fast32_t; +typedef int64_t int_fast64_t; +typedef uint8_t uint_fast8_t; +typedef uint16_t uint_fast16_t; +typedef uint32_t uint_fast32_t; +typedef uint64_t uint_fast64_t; + +// 7.18.1.4 Integer types capable of holding object pointers +#ifdef _WIN64 // [ + typedef signed __int64 intptr_t; + typedef unsigned __int64 uintptr_t; +#else // _WIN64 ][ + typedef _W64 signed int intptr_t; + typedef _W64 unsigned int uintptr_t; +#endif // _WIN64 ] + +// 7.18.1.5 Greatest-width integer types +typedef int64_t intmax_t; +typedef uint64_t uintmax_t; + + +// 7.18.2 Limits of specified-width integer types + +#if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) // [ See footnote 220 at page 257 and footnote 221 at page 259 + +// 7.18.2.1 Limits of exact-width integer types +#define INT8_MIN ((int8_t)_I8_MIN) +#define INT8_MAX _I8_MAX +#define INT16_MIN ((int16_t)_I16_MIN) +#define INT16_MAX _I16_MAX +#define INT32_MIN ((int32_t)_I32_MIN) +#define INT32_MAX _I32_MAX +#define INT64_MIN ((int64_t)_I64_MIN) +#define INT64_MAX _I64_MAX +#define UINT8_MAX _UI8_MAX +#define UINT16_MAX _UI16_MAX +#define UINT32_MAX _UI32_MAX +#define UINT64_MAX _UI64_MAX + +// 7.18.2.2 Limits of minimum-width integer types +#define INT_LEAST8_MIN INT8_MIN +#define INT_LEAST8_MAX INT8_MAX +#define INT_LEAST16_MIN INT16_MIN +#define INT_LEAST16_MAX INT16_MAX +#define INT_LEAST32_MIN INT32_MIN +#define INT_LEAST32_MAX INT32_MAX +#define INT_LEAST64_MIN INT64_MIN +#define INT_LEAST64_MAX INT64_MAX +#define UINT_LEAST8_MAX UINT8_MAX +#define UINT_LEAST16_MAX UINT16_MAX +#define UINT_LEAST32_MAX UINT32_MAX +#define UINT_LEAST64_MAX UINT64_MAX + +// 7.18.2.3 Limits of fastest minimum-width integer types +#define INT_FAST8_MIN INT8_MIN +#define INT_FAST8_MAX INT8_MAX +#define INT_FAST16_MIN INT16_MIN +#define INT_FAST16_MAX INT16_MAX +#define INT_FAST32_MIN INT32_MIN +#define INT_FAST32_MAX INT32_MAX +#define INT_FAST64_MIN INT64_MIN +#define INT_FAST64_MAX INT64_MAX +#define UINT_FAST8_MAX UINT8_MAX +#define UINT_FAST16_MAX UINT16_MAX +#define UINT_FAST32_MAX UINT32_MAX +#define UINT_FAST64_MAX UINT64_MAX + +// 7.18.2.4 Limits of integer types capable of holding object pointers +#ifdef _WIN64 // [ +# define INTPTR_MIN INT64_MIN +# define INTPTR_MAX INT64_MAX +# define UINTPTR_MAX UINT64_MAX +#else // _WIN64 ][ +# define INTPTR_MIN INT32_MIN +# define INTPTR_MAX INT32_MAX +# define UINTPTR_MAX UINT32_MAX +#endif // _WIN64 ] + +// 7.18.2.5 Limits of greatest-width integer types +#define INTMAX_MIN INT64_MIN +#define INTMAX_MAX INT64_MAX +#define UINTMAX_MAX UINT64_MAX + +// 7.18.3 Limits of other integer types + +#ifdef _WIN64 // [ +# define PTRDIFF_MIN _I64_MIN +# define PTRDIFF_MAX _I64_MAX +#else // _WIN64 ][ +# define PTRDIFF_MIN _I32_MIN +# define PTRDIFF_MAX _I32_MAX +#endif // _WIN64 ] + +#define SIG_ATOMIC_MIN INT_MIN +#define SIG_ATOMIC_MAX INT_MAX + +#ifndef SIZE_MAX // [ +# ifdef _WIN64 // [ +# define SIZE_MAX _UI64_MAX +# else // _WIN64 ][ +# define SIZE_MAX _UI32_MAX +# endif // _WIN64 ] +#endif // SIZE_MAX ] + +// WCHAR_MIN and WCHAR_MAX are also defined in +#ifndef WCHAR_MIN // [ +# define WCHAR_MIN 0 +#endif // WCHAR_MIN ] +#ifndef WCHAR_MAX // [ +# define WCHAR_MAX _UI16_MAX +#endif // WCHAR_MAX ] + +#define WINT_MIN 0 +#define WINT_MAX _UI16_MAX + +#endif // __STDC_LIMIT_MACROS ] + + +// 7.18.4 Limits of other integer types + +#if !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS) // [ See footnote 224 at page 260 + +// 7.18.4.1 Macros for minimum-width integer constants + +#define INT8_C(val) val##i8 +#define INT16_C(val) val##i16 +#define INT32_C(val) val##i32 +#define INT64_C(val) val##i64 + +#define UINT8_C(val) val##ui8 +#define UINT16_C(val) val##ui16 +#define UINT32_C(val) val##ui32 +#define UINT64_C(val) val##ui64 + +// 7.18.4.2 Macros for greatest-width integer constants +#define INTMAX_C INT64_C +#define UINTMAX_C UINT64_C + +#endif // __STDC_CONSTANT_MACROS ] + + +#endif // _MSC_STDINT_H_ ] diff --git a/msvc/frei0r_1_0.def b/msvc/frei0r_1_0.def new file mode 100644 index 0000000..ccb55e3 --- /dev/null +++ b/msvc/frei0r_1_0.def @@ -0,0 +1,10 @@ +EXPORTS + f0r_init + f0r_deinit + f0r_get_plugin_info + f0r_get_param_info + f0r_construct + f0r_destruct + f0r_set_param_value + f0r_get_param_value + f0r_update \ No newline at end of file diff --git a/msvc/frei0r_1_1.def b/msvc/frei0r_1_1.def new file mode 100644 index 0000000..04d96d9 --- /dev/null +++ b/msvc/frei0r_1_1.def @@ -0,0 +1,10 @@ +EXPORTS + f0r_init + f0r_deinit + f0r_get_plugin_info + f0r_get_param_info + f0r_construct + f0r_destruct + f0r_set_param_value + f0r_get_param_value + f0r_update2 \ No newline at end of file diff --git a/msvc/frei0r_1_2.def b/msvc/frei0r_1_2.def new file mode 100644 index 0000000..4c3fa4d --- /dev/null +++ b/msvc/frei0r_1_2.def @@ -0,0 +1,10 @@ +EXPORTS + f0r_init + f0r_deinit + f0r_get_plugin_info + f0r_get_param_info + f0r_construct + f0r_destruct + f0r_set_param_value + f0r_get_param_value + f0r_update2 diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt new file mode 100644 index 0000000..bb143d6 --- /dev/null +++ b/src/CMakeLists.txt @@ -0,0 +1,4 @@ +add_subdirectory (filter) +add_subdirectory (generator) +add_subdirectory (mixer2) +add_subdirectory (mixer3) diff --git a/src/Makefile.am b/src/Makefile.am index 2eb9c4f..663705f 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -9,21 +9,109 @@ # 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 nervous.la baltan.la partik0l.la cartoon.la vertigo.la delaygrab.la \ -glow.la lenscorrection.la transparency.la \ -colordistance.la perspective.la uvmap.la luminance.la edgeglow.la \ -cluster.la balanc0r.la tint0r.la levels.la curves.la three_point_balance.la \ -bluescreen0r.la primaries.la threelay0r.la \ -plasma.la + 3dflippo.la \ + addition.la \ + addition_alpha.la \ + alpha0ps.la \ + alphaatop.la \ + alphagrad.la \ + alphain.la \ + alphainjection.la \ + alphaout.la \ + alphaover.la \ + alphaspot.la \ + alphaxor.la \ + B.la \ + balanc0r.la \ + baltan.la \ + blend.la \ + bluescreen0r.la \ + brightness.la \ + burn.la \ + bw0r.la \ + c0rners.la \ + cartoon.la \ + cluster.la \ + coloradj_RGB.la \ + colordistance.la \ + color_only.la \ + composition.la \ + contrast0r.la \ + curves.la \ + d90stairsteppingfix.la \ + darken.la \ + defish0r.la \ + delay0r.la \ + delaygrab.la \ + difference.la \ + distort0r.la \ + divide.la \ + dodge.la \ + edgeglow.la \ + equaliz0r.la \ + flippo.la \ + G.la \ + gamma.la \ + glow.la \ + grain_extract.la \ + grain_merge.la \ + hardlight.la \ + hqdn3d.la \ + hue.la \ + hueshift0r.la \ + invert0r.la \ + ising0r.la \ + lenscorrection.la \ + letterb0xed.la \ + levels.la \ + lighten.la \ + lightgraffiti.la \ + lissajous0r.la \ + luminance.la \ + mask0mate.la \ + multiply.la \ + nervous.la \ + nois0r.la \ + nosync0r.la \ + onecol0r.la \ + overlay.la \ + partik0l.la \ + perspective.la \ + pixeliz0r.la \ + plasma.la \ + pr0be.la \ + pr0file.la \ + primaries.la \ + R.la \ + RGB.la \ + saturation.la \ + saturat0r.la \ + scanline0r.la \ + screen.la \ + select0r.la \ + sharpness.la \ + sobel.la \ + softlight.la \ + sopsat.la \ + squareblur.la \ + subtract.la \ + tehroxx0r.la \ + test_pat_B.la \ + test_pat_C.la \ + test_pat_G.la \ + test_pat_I.la \ + test_pat_L.la \ + test_pat_R.la \ + three_point_balance.la \ + threshold0r.la \ + threelay0r.la \ + tint0r.la \ + transparency.la \ + twolay0r.la \ + uvmap.la \ + value.la \ + vertigo.la \ + xfade0r.la if HAVE_GAVL plugin_LTLIBRARIES += scale0tilt.la @@ -43,97 +131,130 @@ endif if HAVE_OPENCV +plugin_LTLIBRARIES += facebl0r.la +facebl0r_la_SOURCES = filter/facebl0r/facebl0r.cpp +facebl0r_la_CFLAGS = @OPENCV_CFLAGS@ @CFLAGS@ +facebl0r_la_LIBADD = @OPENCV_LIBS@ plugin_LTLIBRARIES += facedetect.la -facedetect_la_SOURCES = filter/facedetect/facedetect.c -facedetect_la_CFLAGS = @OPENCV_CFLAGS@ @CFLAGS@ +facedetect_la_SOURCES = filter/facedetect/facedetect.cpp +facedetect_la_CFLAGS = @OPENCV_CFLAGS@ @CFLAGS@ facedetect_la_LIBADD = @OPENCV_LIBS@ endif +# +# FILTERS +# +3dflippo_la_SOURCES = filter/3dflippo/3dflippo.c +alpha0ps_la_SOURCES = filter/alpha0ps/alpha0ps.c +alphagrad_la_SOURCES = filter/alpha0ps/alphagrad.c +alphaspot_la_SOURCES = filter/alpha0ps/alphaspot.c +B_la_SOURCES = filter/RGB/B.c +balanc0r_la_SOURCES = filter/balanc0r/balanc0r.c +baltan_la_SOURCES = filter/baltan/baltan.cpp +bluescreen0r_la_SOURCES = filter/bluescreen0r/bluescreen0r.cpp +brightness_la_SOURCES = filter/brightness/brightness.c +bw0r_la_SOURCES = filter/bw0r/bw0r.c +c0rners_la_SOURCES = filter/c0rners/c0rners.c filter/c0rners/interp.h +cartoon_la_SOURCES = filter/cartoon/cartoon.cpp cluster_la_SOURCES = filter/cluster/cluster.c +coloradj_RGB_la_SOURCES = filter/coloradj/coloradj_RGB.c +colordistance_la_SOURCES = filter/colordistance/colordistance.c +contrast0r_la_SOURCES = filter/contrast0r/contrast0r.c +curves_la_SOURCES = filter/curves/curves.c +d90stairsteppingfix_la_SOURCES = filter/d90stairsteppingfix/d90stairsteppingfix.cpp +defish0r_la_SOURCES = filter/defish0r/defish0r.c filter/defish0r/interp.h +delay0r_la_SOURCES = filter/delay0r/delay0r.cpp +delaygrab_la_SOURCES = filter/delaygrab/delaygrab.cpp +distort0r_la_SOURCES = filter/distort0r/distort0r.c edgeglow_la_SOURCES = filter/edgeglow/edgeglow.cpp +equaliz0r_la_SOURCES = filter/equaliz0r/equaliz0r.cpp +flippo_la_SOURCES = filter/flippo/flippo.c +G_la_SOURCES = filter/RGB/G.c +gamma_la_SOURCES = filter/gamma/gamma.c +glow_la_SOURCES = filter/glow/glow.c filter/glow/blur.h +hqdn3d_la_SOURCES = filter/denoise/hqdn3d.c +hueshift0r_la_SOURCES = filter/hueshift0r/hueshift0r.c filter/hueshift0r/matrix.h +invert0r_la_SOURCES = filter/invert0r/invert0r.c +lenscorrection_la_SOURCES = filter/lenscorrection/lenscorrection.c +letterb0xed_la_SOURCES = filter/letterb0xed/letterb0xed.c +levels_la_SOURCES = filter/levels/levels.c +lightgraffiti_la_SOURCES = filter/lightgraffiti/lightgraffiti.cpp luminance_la_SOURCES = filter/luminance/luminance.c +mask0mate_la_SOURCES = filter/mask0mate/mask0mate.c filter/mask0mate/blur.h +nervous_la_SOURCES = filter/nervous/nervous.cpp +nosync0r_la_SOURCES = filter/nosync0r/nosync0r.cpp +partik0l_la_SOURCES = generator/partik0l/partik0l.cpp perspective_la_SOURCES = filter/perspective/perspective.c -colordistance_la_SOURCES = filter/colordistance/colordistance.c +pixeliz0r_la_SOURCES = filter/pixeliz0r/pixeliz0r.c +pr0be_la_SOURCES = filter/measure/pr0be.c filter/measure/measure.h filter/measure/font2.h +pr0file_la_SOURCES = filter/measure/pr0file.c filter/measure/measure.h filter/measure/font2.h +primaries_la_SOURCES = filter/primaries/primaries.cpp +R_la_SOURCES = filter/RGB/R.c +saturat0r_la_SOURCES = filter/saturat0r/saturat0r.c +scanline0r_la_SOURCES = filter/scanline0r/scanline0r.cpp +select0r_la_SOURCES = filter/select0r/select0r.c +sharpness_la_SOURCES = filter/sharpness/sharpness.c +sobel_la_SOURCES = filter/sobel/sobel.cpp +sopsat_la_SOURCES = filter/sopsat/sopsat.cpp +squareblur_la_SOURCES = filter/squareblur/squareblur.c +tehroxx0r_la_SOURCES = filter/tehroxx0r/tehRoxx0r.c +threelay0r_la_SOURCES = filter/threelay0r/threelay0r.cpp +three_point_balance_la_SOURCES = filter/three_point_balance/three_point_balance.c +threshold0r_la_SOURCES = filter/threshold0r/threshold0r.c +tint0r_la_SOURCES = filter/tint0r/tint0r.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 -nervous_la_SOURCES = filter/nervous/nervous.cpp -baltan_la_SOURCES = filter/baltan/baltan.cpp -delaygrab_la_SOURCES = filter/delaygrab/delaygrab.cpp +twolay0r_la_SOURCES = filter/twolay0r/twolay0r.cpp vertigo_la_SOURCES = filter/vertigo/vertigo.c -partik0l_la_SOURCES = generator/partik0l/partik0l.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 -balanc0r_la_SOURCES = filter/balanc0r/balanc0r.c -tint0r_la_SOURCES = filter/tint0r/tint0r.c -levels_la_SOURCES = filter/levels/levels.c -curves_la_SOURCES = filter/curves/curves.c -bluescreen0r_la_SOURCES = filter/bluescreen0r/bluescreen0r.cpp -primaries_la_SOURCES = filter/primaries/primaries.cpp -threelay0r_la_SOURCES = filter/threelay0r/threelay0r.cpp - -three_point_balance_la_SOURCES = filter/three_point_balance/three_point_balance.c + +# +# GENERATORS +# 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 plasma_la_SOURCES = generator/dem0scene/plasma.cpp - +test_pat_B_la_SOURCES = generator/test_pat/test_pat_B.c +test_pat_C_la_SOURCES = generator/test_pat/test_pat_C.c +test_pat_G_la_SOURCES = generator/test_pat/test_pat_G.c +test_pat_I_la_SOURCES = generator/test_pat/test_pat_I.c +test_pat_L_la_SOURCES = generator/test_pat/test_pat_L.c +test_pat_R_la_SOURCES = generator/test_pat/test_pat_R.c + +# +# MIXERS +# +addition_la_SOURCES = mixer2/addition/addition.cpp +addition_alpha_la_SOURCES = mixer2/addition_alpha/addition_alpha.cpp +alphaatop_la_SOURCES = mixer2/alphaatop/alphaatop.cpp +alphainjection_la_SOURCES = mixer2/alphainjection/alphainjection.c +alphain_la_SOURCES = mixer2/alphain/alphain.cpp +alphaout_la_SOURCES = mixer2/alphaout/alphaout.cpp +alphaover_la_SOURCES = mixer2/alphaover/alphaover.cpp +alphaxor_la_SOURCES = mixer2/alphaxor/alphaxor.cpp +blend_la_SOURCES = mixer2/blend/blend.cpp +burn_la_SOURCES = mixer2/burn/burn.cpp +color_only_la_SOURCES = mixer2/color_only/color_only.cpp +composition_la_SOURCES = mixer2/composition/composition.c +darken_la_SOURCES = mixer2/darken/darken.cpp +difference_la_SOURCES = mixer2/difference/difference.cpp +divide_la_SOURCES = mixer2/divide/divide.cpp +dodge_la_SOURCES = mixer2/dodge/dodge.cpp +grain_extract_la_SOURCES = mixer2/grain_extract/grain_extract.cpp +grain_merge_la_SOURCES = mixer2/grain_merge/grain_merge.cpp +hardlight_la_SOURCES = mixer2/hardlight/hardlight.cpp +hue_la_SOURCES = mixer2/hue/hue.cpp +lighten_la_SOURCES = mixer2/lighten/lighten.cpp +multiply_la_SOURCES = mixer2/multiply/multiply.cpp +overlay_la_SOURCES = mixer2/overlay/overlay.cpp +RGB_la_SOURCES = mixer3/RGB/RGB.c +saturation_la_SOURCES = mixer2/saturation/saturation.cpp +screen_la_SOURCES = mixer2/screen/screen.cpp +softlight_la_SOURCES = mixer2/softlight/softlight.cpp +subtract_la_SOURCES = mixer2/subtract/subtract.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 @@ -158,5 +279,3 @@ sofile=`basename $$file .la`.so; \ rm -f $(DESTDIR)/$(plugindir)/$$sofile; \ done - - diff --git a/src/Makefile.in b/src/Makefile.in index 75b304e..3189740 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -46,11 +46,14 @@ host_triplet = @host@ @HAVE_GAVL_TRUE@am__append_1 = scale0tilt.la vectorscope.la \ @HAVE_GAVL_TRUE@ rgbparade.la -@HAVE_OPENCV_TRUE@am__append_2 = facedetect.la +@HAVE_OPENCV_TRUE@am__append_2 = facebl0r.la facedetect.la subdir = src DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -98,9 +101,18 @@ addition_la_LIBADD = am_addition_la_OBJECTS = addition.lo addition_la_OBJECTS = $(am_addition_la_OBJECTS) +addition_alpha_la_LIBADD = +am_addition_alpha_la_OBJECTS = addition_alpha.lo +addition_alpha_la_OBJECTS = $(am_addition_alpha_la_OBJECTS) +alpha0ps_la_LIBADD = +am_alpha0ps_la_OBJECTS = alpha0ps.lo +alpha0ps_la_OBJECTS = $(am_alpha0ps_la_OBJECTS) alphaatop_la_LIBADD = am_alphaatop_la_OBJECTS = alphaatop.lo alphaatop_la_OBJECTS = $(am_alphaatop_la_OBJECTS) +alphagrad_la_LIBADD = +am_alphagrad_la_OBJECTS = alphagrad.lo +alphagrad_la_OBJECTS = $(am_alphagrad_la_OBJECTS) alphain_la_LIBADD = am_alphain_la_OBJECTS = alphain.lo alphain_la_OBJECTS = $(am_alphain_la_OBJECTS) @@ -113,6 +125,9 @@ alphaover_la_LIBADD = am_alphaover_la_OBJECTS = alphaover.lo alphaover_la_OBJECTS = $(am_alphaover_la_OBJECTS) +alphaspot_la_LIBADD = +am_alphaspot_la_OBJECTS = alphaspot.lo +alphaspot_la_OBJECTS = $(am_alphaspot_la_OBJECTS) alphaxor_la_LIBADD = am_alphaxor_la_OBJECTS = alphaxor.lo alphaxor_la_OBJECTS = $(am_alphaxor_la_OBJECTS) @@ -137,6 +152,9 @@ bw0r_la_LIBADD = am_bw0r_la_OBJECTS = bw0r.lo bw0r_la_OBJECTS = $(am_bw0r_la_OBJECTS) +c0rners_la_LIBADD = +am_c0rners_la_OBJECTS = c0rners.lo +c0rners_la_OBJECTS = $(am_c0rners_la_OBJECTS) cartoon_la_LIBADD = am_cartoon_la_OBJECTS = cartoon.lo cartoon_la_OBJECTS = $(am_cartoon_la_OBJECTS) @@ -146,6 +164,9 @@ color_only_la_LIBADD = am_color_only_la_OBJECTS = color_only.lo color_only_la_OBJECTS = $(am_color_only_la_OBJECTS) +coloradj_RGB_la_LIBADD = +am_coloradj_RGB_la_OBJECTS = coloradj_RGB.lo +coloradj_RGB_la_OBJECTS = $(am_coloradj_RGB_la_OBJECTS) colordistance_la_LIBADD = am_colordistance_la_OBJECTS = colordistance.lo colordistance_la_OBJECTS = $(am_colordistance_la_OBJECTS) @@ -158,9 +179,15 @@ curves_la_LIBADD = am_curves_la_OBJECTS = curves.lo curves_la_OBJECTS = $(am_curves_la_OBJECTS) +d90stairsteppingfix_la_LIBADD = +am_d90stairsteppingfix_la_OBJECTS = d90stairsteppingfix.lo +d90stairsteppingfix_la_OBJECTS = $(am_d90stairsteppingfix_la_OBJECTS) darken_la_LIBADD = am_darken_la_OBJECTS = darken.lo darken_la_OBJECTS = $(am_darken_la_OBJECTS) +defish0r_la_LIBADD = +am_defish0r_la_OBJECTS = defish0r.lo +defish0r_la_OBJECTS = $(am_defish0r_la_OBJECTS) delay0r_la_LIBADD = am_delay0r_la_OBJECTS = delay0r.lo delay0r_la_OBJECTS = $(am_delay0r_la_OBJECTS) @@ -185,14 +212,15 @@ equaliz0r_la_LIBADD = am_equaliz0r_la_OBJECTS = equaliz0r.lo equaliz0r_la_OBJECTS = $(am_equaliz0r_la_OBJECTS) +facebl0r_la_DEPENDENCIES = +am__facebl0r_la_SOURCES_DIST = filter/facebl0r/facebl0r.cpp +@HAVE_OPENCV_TRUE@am_facebl0r_la_OBJECTS = facebl0r.lo +facebl0r_la_OBJECTS = $(am_facebl0r_la_OBJECTS) +@HAVE_OPENCV_TRUE@am_facebl0r_la_rpath = -rpath $(plugindir) facedetect_la_DEPENDENCIES = -am__facedetect_la_SOURCES_DIST = filter/facedetect/facedetect.c -@HAVE_OPENCV_TRUE@am_facedetect_la_OBJECTS = \ -@HAVE_OPENCV_TRUE@ facedetect_la-facedetect.lo +am__facedetect_la_SOURCES_DIST = filter/facedetect/facedetect.cpp +@HAVE_OPENCV_TRUE@am_facedetect_la_OBJECTS = facedetect.lo facedetect_la_OBJECTS = $(am_facedetect_la_OBJECTS) -facedetect_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(facedetect_la_CFLAGS) \ - $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ @HAVE_OPENCV_TRUE@am_facedetect_la_rpath = -rpath $(plugindir) flippo_la_LIBADD = am_flippo_la_OBJECTS = flippo.lo @@ -212,6 +240,9 @@ hardlight_la_LIBADD = am_hardlight_la_OBJECTS = hardlight.lo hardlight_la_OBJECTS = $(am_hardlight_la_OBJECTS) +hqdn3d_la_LIBADD = +am_hqdn3d_la_OBJECTS = hqdn3d.lo +hqdn3d_la_OBJECTS = $(am_hqdn3d_la_OBJECTS) hue_la_LIBADD = am_hue_la_OBJECTS = hue.lo hue_la_OBJECTS = $(am_hue_la_OBJECTS) @@ -236,6 +267,9 @@ lighten_la_LIBADD = am_lighten_la_OBJECTS = lighten.lo lighten_la_OBJECTS = $(am_lighten_la_OBJECTS) +lightgraffiti_la_LIBADD = +am_lightgraffiti_la_OBJECTS = lightgraffiti.lo +lightgraffiti_la_OBJECTS = $(am_lightgraffiti_la_OBJECTS) lissajous0r_la_LIBADD = am_lissajous0r_la_OBJECTS = lissajous0r.lo lissajous0r_la_OBJECTS = $(am_lissajous0r_la_OBJECTS) @@ -275,6 +309,12 @@ plasma_la_LIBADD = am_plasma_la_OBJECTS = plasma.lo plasma_la_OBJECTS = $(am_plasma_la_OBJECTS) +pr0be_la_LIBADD = +am_pr0be_la_OBJECTS = pr0be.lo +pr0be_la_OBJECTS = $(am_pr0be_la_OBJECTS) +pr0file_la_LIBADD = +am_pr0file_la_OBJECTS = pr0file.lo +pr0file_la_OBJECTS = $(am_pr0file_la_OBJECTS) primaries_la_LIBADD = am_primaries_la_OBJECTS = primaries.lo primaries_la_OBJECTS = $(am_primaries_la_OBJECTS) @@ -308,12 +348,21 @@ screen_la_LIBADD = am_screen_la_OBJECTS = screen.lo screen_la_OBJECTS = $(am_screen_la_OBJECTS) +select0r_la_LIBADD = +am_select0r_la_OBJECTS = select0r.lo +select0r_la_OBJECTS = $(am_select0r_la_OBJECTS) +sharpness_la_LIBADD = +am_sharpness_la_OBJECTS = sharpness.lo +sharpness_la_OBJECTS = $(am_sharpness_la_OBJECTS) sobel_la_LIBADD = am_sobel_la_OBJECTS = sobel.lo sobel_la_OBJECTS = $(am_sobel_la_OBJECTS) softlight_la_LIBADD = am_softlight_la_OBJECTS = softlight.lo softlight_la_OBJECTS = $(am_softlight_la_OBJECTS) +sopsat_la_LIBADD = +am_sopsat_la_OBJECTS = sopsat.lo +sopsat_la_OBJECTS = $(am_sopsat_la_OBJECTS) squareblur_la_LIBADD = am_squareblur_la_OBJECTS = squareblur.lo squareblur_la_OBJECTS = $(am_squareblur_la_OBJECTS) @@ -323,6 +372,24 @@ tehroxx0r_la_LIBADD = am_tehroxx0r_la_OBJECTS = tehRoxx0r.lo tehroxx0r_la_OBJECTS = $(am_tehroxx0r_la_OBJECTS) +test_pat_B_la_LIBADD = +am_test_pat_B_la_OBJECTS = test_pat_B.lo +test_pat_B_la_OBJECTS = $(am_test_pat_B_la_OBJECTS) +test_pat_C_la_LIBADD = +am_test_pat_C_la_OBJECTS = test_pat_C.lo +test_pat_C_la_OBJECTS = $(am_test_pat_C_la_OBJECTS) +test_pat_G_la_LIBADD = +am_test_pat_G_la_OBJECTS = test_pat_G.lo +test_pat_G_la_OBJECTS = $(am_test_pat_G_la_OBJECTS) +test_pat_I_la_LIBADD = +am_test_pat_I_la_OBJECTS = test_pat_I.lo +test_pat_I_la_OBJECTS = $(am_test_pat_I_la_OBJECTS) +test_pat_L_la_LIBADD = +am_test_pat_L_la_OBJECTS = test_pat_L.lo +test_pat_L_la_OBJECTS = $(am_test_pat_L_la_OBJECTS) +test_pat_R_la_LIBADD = +am_test_pat_R_la_OBJECTS = test_pat_R.lo +test_pat_R_la_OBJECTS = $(am_test_pat_R_la_OBJECTS) three_point_balance_la_LIBADD = am_three_point_balance_la_OBJECTS = three_point_balance.lo three_point_balance_la_OBJECTS = $(am_three_point_balance_la_OBJECTS) @@ -360,9 +427,6 @@ vertigo_la_LIBADD = am_vertigo_la_OBJECTS = vertigo.lo vertigo_la_OBJECTS = $(am_vertigo_la_OBJECTS) -water_la_LIBADD = -am_water_la_OBJECTS = water.lo -water_la_OBJECTS = $(am_water_la_OBJECTS) xfade0r_la_LIBADD = am_xfade0r_la_OBJECTS = xfade0r.lo xfade0r_la_OBJECTS = $(am_xfade0r_la_OBJECTS) @@ -390,88 +454,107 @@ $(LDFLAGS) -o $@ SOURCES = $(3dflippo_la_SOURCES) $(B_la_SOURCES) $(G_la_SOURCES) \ $(R_la_SOURCES) $(RGB_la_SOURCES) $(addition_la_SOURCES) \ - $(alphaatop_la_SOURCES) $(alphain_la_SOURCES) \ - $(alphainjection_la_SOURCES) $(alphaout_la_SOURCES) \ - $(alphaover_la_SOURCES) $(alphaxor_la_SOURCES) \ + $(addition_alpha_la_SOURCES) $(alpha0ps_la_SOURCES) \ + $(alphaatop_la_SOURCES) $(alphagrad_la_SOURCES) \ + $(alphain_la_SOURCES) $(alphainjection_la_SOURCES) \ + $(alphaout_la_SOURCES) $(alphaover_la_SOURCES) \ + $(alphaspot_la_SOURCES) $(alphaxor_la_SOURCES) \ $(balanc0r_la_SOURCES) $(baltan_la_SOURCES) \ $(blend_la_SOURCES) $(bluescreen0r_la_SOURCES) \ $(brightness_la_SOURCES) $(burn_la_SOURCES) $(bw0r_la_SOURCES) \ - $(cartoon_la_SOURCES) $(cluster_la_SOURCES) \ - $(color_only_la_SOURCES) $(colordistance_la_SOURCES) \ + $(c0rners_la_SOURCES) $(cartoon_la_SOURCES) \ + $(cluster_la_SOURCES) $(color_only_la_SOURCES) \ + $(coloradj_RGB_la_SOURCES) $(colordistance_la_SOURCES) \ $(composition_la_SOURCES) $(contrast0r_la_SOURCES) \ - $(curves_la_SOURCES) $(darken_la_SOURCES) \ + $(curves_la_SOURCES) $(d90stairsteppingfix_la_SOURCES) \ + $(darken_la_SOURCES) $(defish0r_la_SOURCES) \ $(delay0r_la_SOURCES) $(delaygrab_la_SOURCES) \ $(difference_la_SOURCES) $(distort0r_la_SOURCES) \ $(divide_la_SOURCES) $(dodge_la_SOURCES) \ $(edgeglow_la_SOURCES) $(equaliz0r_la_SOURCES) \ - $(facedetect_la_SOURCES) $(flippo_la_SOURCES) \ - $(gamma_la_SOURCES) $(glow_la_SOURCES) \ + $(facebl0r_la_SOURCES) $(facedetect_la_SOURCES) \ + $(flippo_la_SOURCES) $(gamma_la_SOURCES) $(glow_la_SOURCES) \ $(grain_extract_la_SOURCES) $(grain_merge_la_SOURCES) \ - $(hardlight_la_SOURCES) $(hue_la_SOURCES) \ + $(hardlight_la_SOURCES) $(hqdn3d_la_SOURCES) $(hue_la_SOURCES) \ $(hueshift0r_la_SOURCES) $(invert0r_la_SOURCES) \ $(ising0r_la_SOURCES) $(lenscorrection_la_SOURCES) \ $(letterb0xed_la_SOURCES) $(levels_la_SOURCES) \ - $(lighten_la_SOURCES) $(lissajous0r_la_SOURCES) \ - $(luminance_la_SOURCES) $(mask0mate_la_SOURCES) \ - $(multiply_la_SOURCES) $(nervous_la_SOURCES) \ - $(nois0r_la_SOURCES) $(nosync0r_la_SOURCES) \ - $(onecol0r_la_SOURCES) $(overlay_la_SOURCES) \ - $(partik0l_la_SOURCES) $(perspective_la_SOURCES) \ - $(pixeliz0r_la_SOURCES) $(plasma_la_SOURCES) \ + $(lighten_la_SOURCES) $(lightgraffiti_la_SOURCES) \ + $(lissajous0r_la_SOURCES) $(luminance_la_SOURCES) \ + $(mask0mate_la_SOURCES) $(multiply_la_SOURCES) \ + $(nervous_la_SOURCES) $(nois0r_la_SOURCES) \ + $(nosync0r_la_SOURCES) $(onecol0r_la_SOURCES) \ + $(overlay_la_SOURCES) $(partik0l_la_SOURCES) \ + $(perspective_la_SOURCES) $(pixeliz0r_la_SOURCES) \ + $(plasma_la_SOURCES) $(pr0be_la_SOURCES) $(pr0file_la_SOURCES) \ $(primaries_la_SOURCES) $(rgbparade_la_SOURCES) \ $(saturat0r_la_SOURCES) $(saturation_la_SOURCES) \ $(scale0tilt_la_SOURCES) $(scanline0r_la_SOURCES) \ - $(screen_la_SOURCES) $(sobel_la_SOURCES) \ - $(softlight_la_SOURCES) $(squareblur_la_SOURCES) \ - $(subtract_la_SOURCES) $(tehroxx0r_la_SOURCES) \ - $(three_point_balance_la_SOURCES) $(threelay0r_la_SOURCES) \ - $(threshold0r_la_SOURCES) $(tint0r_la_SOURCES) \ - $(transparency_la_SOURCES) $(twolay0r_la_SOURCES) \ - $(uvmap_la_SOURCES) $(value_la_SOURCES) \ + $(screen_la_SOURCES) $(select0r_la_SOURCES) \ + $(sharpness_la_SOURCES) $(sobel_la_SOURCES) \ + $(softlight_la_SOURCES) $(sopsat_la_SOURCES) \ + $(squareblur_la_SOURCES) $(subtract_la_SOURCES) \ + $(tehroxx0r_la_SOURCES) $(test_pat_B_la_SOURCES) \ + $(test_pat_C_la_SOURCES) $(test_pat_G_la_SOURCES) \ + $(test_pat_I_la_SOURCES) $(test_pat_L_la_SOURCES) \ + $(test_pat_R_la_SOURCES) $(three_point_balance_la_SOURCES) \ + $(threelay0r_la_SOURCES) $(threshold0r_la_SOURCES) \ + $(tint0r_la_SOURCES) $(transparency_la_SOURCES) \ + $(twolay0r_la_SOURCES) $(uvmap_la_SOURCES) $(value_la_SOURCES) \ $(vectorscope_la_SOURCES) $(vertigo_la_SOURCES) \ - $(water_la_SOURCES) $(xfade0r_la_SOURCES) + $(xfade0r_la_SOURCES) DIST_SOURCES = $(3dflippo_la_SOURCES) $(B_la_SOURCES) $(G_la_SOURCES) \ $(R_la_SOURCES) $(RGB_la_SOURCES) $(addition_la_SOURCES) \ - $(alphaatop_la_SOURCES) $(alphain_la_SOURCES) \ - $(alphainjection_la_SOURCES) $(alphaout_la_SOURCES) \ - $(alphaover_la_SOURCES) $(alphaxor_la_SOURCES) \ + $(addition_alpha_la_SOURCES) $(alpha0ps_la_SOURCES) \ + $(alphaatop_la_SOURCES) $(alphagrad_la_SOURCES) \ + $(alphain_la_SOURCES) $(alphainjection_la_SOURCES) \ + $(alphaout_la_SOURCES) $(alphaover_la_SOURCES) \ + $(alphaspot_la_SOURCES) $(alphaxor_la_SOURCES) \ $(balanc0r_la_SOURCES) $(baltan_la_SOURCES) \ $(blend_la_SOURCES) $(bluescreen0r_la_SOURCES) \ $(brightness_la_SOURCES) $(burn_la_SOURCES) $(bw0r_la_SOURCES) \ - $(cartoon_la_SOURCES) $(cluster_la_SOURCES) \ - $(color_only_la_SOURCES) $(colordistance_la_SOURCES) \ + $(c0rners_la_SOURCES) $(cartoon_la_SOURCES) \ + $(cluster_la_SOURCES) $(color_only_la_SOURCES) \ + $(coloradj_RGB_la_SOURCES) $(colordistance_la_SOURCES) \ $(composition_la_SOURCES) $(contrast0r_la_SOURCES) \ - $(curves_la_SOURCES) $(darken_la_SOURCES) \ + $(curves_la_SOURCES) $(d90stairsteppingfix_la_SOURCES) \ + $(darken_la_SOURCES) $(defish0r_la_SOURCES) \ $(delay0r_la_SOURCES) $(delaygrab_la_SOURCES) \ $(difference_la_SOURCES) $(distort0r_la_SOURCES) \ $(divide_la_SOURCES) $(dodge_la_SOURCES) \ $(edgeglow_la_SOURCES) $(equaliz0r_la_SOURCES) \ + $(am__facebl0r_la_SOURCES_DIST) \ $(am__facedetect_la_SOURCES_DIST) $(flippo_la_SOURCES) \ $(gamma_la_SOURCES) $(glow_la_SOURCES) \ $(grain_extract_la_SOURCES) $(grain_merge_la_SOURCES) \ - $(hardlight_la_SOURCES) $(hue_la_SOURCES) \ + $(hardlight_la_SOURCES) $(hqdn3d_la_SOURCES) $(hue_la_SOURCES) \ $(hueshift0r_la_SOURCES) $(invert0r_la_SOURCES) \ $(ising0r_la_SOURCES) $(lenscorrection_la_SOURCES) \ $(letterb0xed_la_SOURCES) $(levels_la_SOURCES) \ - $(lighten_la_SOURCES) $(lissajous0r_la_SOURCES) \ - $(luminance_la_SOURCES) $(mask0mate_la_SOURCES) \ - $(multiply_la_SOURCES) $(nervous_la_SOURCES) \ - $(nois0r_la_SOURCES) $(nosync0r_la_SOURCES) \ - $(onecol0r_la_SOURCES) $(overlay_la_SOURCES) \ - $(partik0l_la_SOURCES) $(perspective_la_SOURCES) \ - $(pixeliz0r_la_SOURCES) $(plasma_la_SOURCES) \ + $(lighten_la_SOURCES) $(lightgraffiti_la_SOURCES) \ + $(lissajous0r_la_SOURCES) $(luminance_la_SOURCES) \ + $(mask0mate_la_SOURCES) $(multiply_la_SOURCES) \ + $(nervous_la_SOURCES) $(nois0r_la_SOURCES) \ + $(nosync0r_la_SOURCES) $(onecol0r_la_SOURCES) \ + $(overlay_la_SOURCES) $(partik0l_la_SOURCES) \ + $(perspective_la_SOURCES) $(pixeliz0r_la_SOURCES) \ + $(plasma_la_SOURCES) $(pr0be_la_SOURCES) $(pr0file_la_SOURCES) \ $(primaries_la_SOURCES) $(am__rgbparade_la_SOURCES_DIST) \ $(saturat0r_la_SOURCES) $(saturation_la_SOURCES) \ $(am__scale0tilt_la_SOURCES_DIST) $(scanline0r_la_SOURCES) \ - $(screen_la_SOURCES) $(sobel_la_SOURCES) \ - $(softlight_la_SOURCES) $(squareblur_la_SOURCES) \ - $(subtract_la_SOURCES) $(tehroxx0r_la_SOURCES) \ - $(three_point_balance_la_SOURCES) $(threelay0r_la_SOURCES) \ - $(threshold0r_la_SOURCES) $(tint0r_la_SOURCES) \ - $(transparency_la_SOURCES) $(twolay0r_la_SOURCES) \ - $(uvmap_la_SOURCES) $(value_la_SOURCES) \ + $(screen_la_SOURCES) $(select0r_la_SOURCES) \ + $(sharpness_la_SOURCES) $(sobel_la_SOURCES) \ + $(softlight_la_SOURCES) $(sopsat_la_SOURCES) \ + $(squareblur_la_SOURCES) $(subtract_la_SOURCES) \ + $(tehroxx0r_la_SOURCES) $(test_pat_B_la_SOURCES) \ + $(test_pat_C_la_SOURCES) $(test_pat_G_la_SOURCES) \ + $(test_pat_I_la_SOURCES) $(test_pat_L_la_SOURCES) \ + $(test_pat_R_la_SOURCES) $(three_point_balance_la_SOURCES) \ + $(threelay0r_la_SOURCES) $(threshold0r_la_SOURCES) \ + $(tint0r_la_SOURCES) $(transparency_la_SOURCES) \ + $(twolay0r_la_SOURCES) $(uvmap_la_SOURCES) $(value_la_SOURCES) \ $(am__vectorscope_la_SOURCES_DIST) $(vertigo_la_SOURCES) \ - $(water_la_SOURCES) $(xfade0r_la_SOURCES) + $(xfade0r_la_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -494,6 +577,7 @@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DOXYGEN = @DOXYGEN@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -505,6 +589,7 @@ GAVL_CFLAGS = @GAVL_CFLAGS@ GAVL_LIBS = @GAVL_LIBS@ GREP = @GREP@ +HAVE_OPENCV = @HAVE_OPENCV@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -530,6 +615,8 @@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_DATA_DIR = @PACKAGE_DATA_DIR@ +PACKAGE_LIB_DIR = @PACKAGE_LIB_DIR@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ @@ -537,6 +624,8 @@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ @@ -596,25 +685,30 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -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 nervous.la baltan.la \ - partik0l.la cartoon.la vertigo.la delaygrab.la glow.la \ - lenscorrection.la transparency.la colordistance.la \ - perspective.la uvmap.la luminance.la edgeglow.la cluster.la \ - balanc0r.la tint0r.la levels.la curves.la \ - three_point_balance.la bluescreen0r.la primaries.la \ - threelay0r.la plasma.la $(am__append_1) $(am__append_2) +plugin_LTLIBRARIES = 3dflippo.la addition.la addition_alpha.la \ + alpha0ps.la alphaatop.la alphagrad.la alphain.la \ + alphainjection.la alphaout.la alphaover.la alphaspot.la \ + alphaxor.la B.la balanc0r.la baltan.la blend.la \ + bluescreen0r.la brightness.la burn.la bw0r.la c0rners.la \ + cartoon.la cluster.la coloradj_RGB.la colordistance.la \ + color_only.la composition.la contrast0r.la curves.la \ + d90stairsteppingfix.la darken.la defish0r.la delay0r.la \ + delaygrab.la difference.la distort0r.la divide.la dodge.la \ + edgeglow.la equaliz0r.la flippo.la G.la gamma.la glow.la \ + grain_extract.la grain_merge.la hardlight.la hqdn3d.la hue.la \ + hueshift0r.la invert0r.la ising0r.la lenscorrection.la \ + letterb0xed.la levels.la lighten.la lightgraffiti.la \ + lissajous0r.la luminance.la mask0mate.la multiply.la \ + nervous.la nois0r.la nosync0r.la onecol0r.la overlay.la \ + partik0l.la perspective.la pixeliz0r.la plasma.la pr0be.la \ + pr0file.la primaries.la R.la RGB.la saturation.la saturat0r.la \ + scanline0r.la screen.la select0r.la sharpness.la sobel.la \ + softlight.la sopsat.la squareblur.la subtract.la tehroxx0r.la \ + test_pat_B.la test_pat_C.la test_pat_G.la test_pat_I.la \ + test_pat_L.la test_pat_R.la three_point_balance.la \ + threshold0r.la threelay0r.la tint0r.la transparency.la \ + twolay0r.la uvmap.la value.la vertigo.la xfade0r.la \ + $(am__append_1) $(am__append_2) @HAVE_GAVL_TRUE@scale0tilt_la_SOURCES = filter/scale0tilt/scale0tilt.c @HAVE_GAVL_TRUE@scale0tilt_la_CFLAGS = @GAVL_CFLAGS@ @CFLAGS@ @HAVE_GAVL_TRUE@scale0tilt_la_LIBADD = @GAVL_LIBS@ @@ -624,92 +718,127 @@ @HAVE_GAVL_TRUE@rgbparade_la_SOURCES = filter/rgbparade/rgbparade.c filter/rgbparade/rgbparade_image.h @HAVE_GAVL_TRUE@rgbparade_la_CFLAGS = @GAVL_CFLAGS@ @CFLAGS@ @HAVE_GAVL_TRUE@rgbparade_la_LIBADD = @GAVL_LIBS@ -@HAVE_OPENCV_TRUE@facedetect_la_SOURCES = filter/facedetect/facedetect.c -@HAVE_OPENCV_TRUE@facedetect_la_CFLAGS = @OPENCV_CFLAGS@ @CFLAGS@ +@HAVE_OPENCV_TRUE@facebl0r_la_SOURCES = filter/facebl0r/facebl0r.cpp +@HAVE_OPENCV_TRUE@facebl0r_la_CFLAGS = @OPENCV_CFLAGS@ @CFLAGS@ +@HAVE_OPENCV_TRUE@facebl0r_la_LIBADD = @OPENCV_LIBS@ +@HAVE_OPENCV_TRUE@facedetect_la_SOURCES = filter/facedetect/facedetect.cpp +@HAVE_OPENCV_TRUE@facedetect_la_CFLAGS = @OPENCV_CFLAGS@ @CFLAGS@ @HAVE_OPENCV_TRUE@facedetect_la_LIBADD = @OPENCV_LIBS@ + +# +# FILTERS +# +3dflippo_la_SOURCES = filter/3dflippo/3dflippo.c +alpha0ps_la_SOURCES = filter/alpha0ps/alpha0ps.c +alphagrad_la_SOURCES = filter/alpha0ps/alphagrad.c +alphaspot_la_SOURCES = filter/alpha0ps/alphaspot.c +B_la_SOURCES = filter/RGB/B.c +balanc0r_la_SOURCES = filter/balanc0r/balanc0r.c +baltan_la_SOURCES = filter/baltan/baltan.cpp +bluescreen0r_la_SOURCES = filter/bluescreen0r/bluescreen0r.cpp +brightness_la_SOURCES = filter/brightness/brightness.c +bw0r_la_SOURCES = filter/bw0r/bw0r.c +c0rners_la_SOURCES = filter/c0rners/c0rners.c filter/c0rners/interp.h +cartoon_la_SOURCES = filter/cartoon/cartoon.cpp cluster_la_SOURCES = filter/cluster/cluster.c +coloradj_RGB_la_SOURCES = filter/coloradj/coloradj_RGB.c +colordistance_la_SOURCES = filter/colordistance/colordistance.c +contrast0r_la_SOURCES = filter/contrast0r/contrast0r.c +curves_la_SOURCES = filter/curves/curves.c +d90stairsteppingfix_la_SOURCES = filter/d90stairsteppingfix/d90stairsteppingfix.cpp +defish0r_la_SOURCES = filter/defish0r/defish0r.c filter/defish0r/interp.h +delay0r_la_SOURCES = filter/delay0r/delay0r.cpp +delaygrab_la_SOURCES = filter/delaygrab/delaygrab.cpp +distort0r_la_SOURCES = filter/distort0r/distort0r.c edgeglow_la_SOURCES = filter/edgeglow/edgeglow.cpp +equaliz0r_la_SOURCES = filter/equaliz0r/equaliz0r.cpp +flippo_la_SOURCES = filter/flippo/flippo.c +G_la_SOURCES = filter/RGB/G.c +gamma_la_SOURCES = filter/gamma/gamma.c +glow_la_SOURCES = filter/glow/glow.c filter/glow/blur.h +hqdn3d_la_SOURCES = filter/denoise/hqdn3d.c +hueshift0r_la_SOURCES = filter/hueshift0r/hueshift0r.c filter/hueshift0r/matrix.h +invert0r_la_SOURCES = filter/invert0r/invert0r.c +lenscorrection_la_SOURCES = filter/lenscorrection/lenscorrection.c +letterb0xed_la_SOURCES = filter/letterb0xed/letterb0xed.c +levels_la_SOURCES = filter/levels/levels.c +lightgraffiti_la_SOURCES = filter/lightgraffiti/lightgraffiti.cpp luminance_la_SOURCES = filter/luminance/luminance.c +mask0mate_la_SOURCES = filter/mask0mate/mask0mate.c filter/mask0mate/blur.h +nervous_la_SOURCES = filter/nervous/nervous.cpp +nosync0r_la_SOURCES = filter/nosync0r/nosync0r.cpp +partik0l_la_SOURCES = generator/partik0l/partik0l.cpp 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 -nervous_la_SOURCES = filter/nervous/nervous.cpp -baltan_la_SOURCES = filter/baltan/baltan.cpp -delaygrab_la_SOURCES = filter/delaygrab/delaygrab.cpp -vertigo_la_SOURCES = filter/vertigo/vertigo.c -partik0l_la_SOURCES = generator/partik0l/partik0l.cpp +pixeliz0r_la_SOURCES = filter/pixeliz0r/pixeliz0r.c +pr0be_la_SOURCES = filter/measure/pr0be.c filter/measure/measure.h filter/measure/font2.h +pr0file_la_SOURCES = filter/measure/pr0file.c filter/measure/measure.h filter/measure/font2.h +primaries_la_SOURCES = filter/primaries/primaries.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 +scanline0r_la_SOURCES = filter/scanline0r/scanline0r.cpp +select0r_la_SOURCES = filter/select0r/select0r.c +sharpness_la_SOURCES = filter/sharpness/sharpness.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 +sopsat_la_SOURCES = filter/sopsat/sopsat.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 -balanc0r_la_SOURCES = filter/balanc0r/balanc0r.c -tint0r_la_SOURCES = filter/tint0r/tint0r.c -levels_la_SOURCES = filter/levels/levels.c -curves_la_SOURCES = filter/curves/curves.c -bluescreen0r_la_SOURCES = filter/bluescreen0r/bluescreen0r.cpp -primaries_la_SOURCES = filter/primaries/primaries.cpp threelay0r_la_SOURCES = filter/threelay0r/threelay0r.cpp three_point_balance_la_SOURCES = filter/three_point_balance/three_point_balance.c +threshold0r_la_SOURCES = filter/threshold0r/threshold0r.c +tint0r_la_SOURCES = filter/tint0r/tint0r.c +transparency_la_SOURCES = filter/transparency/transparency.c +twolay0r_la_SOURCES = filter/twolay0r/twolay0r.cpp +vertigo_la_SOURCES = filter/vertigo/vertigo.c + +# +# GENERATORS +# 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 plasma_la_SOURCES = generator/dem0scene/plasma.cpp +test_pat_B_la_SOURCES = generator/test_pat/test_pat_B.c +test_pat_C_la_SOURCES = generator/test_pat/test_pat_C.c +test_pat_G_la_SOURCES = generator/test_pat/test_pat_G.c +test_pat_I_la_SOURCES = generator/test_pat/test_pat_I.c +test_pat_L_la_SOURCES = generator/test_pat/test_pat_L.c +test_pat_R_la_SOURCES = generator/test_pat/test_pat_R.c + +# +# MIXERS +# +addition_la_SOURCES = mixer2/addition/addition.cpp +addition_alpha_la_SOURCES = mixer2/addition_alpha/addition_alpha.cpp +alphaatop_la_SOURCES = mixer2/alphaatop/alphaatop.cpp +alphainjection_la_SOURCES = mixer2/alphainjection/alphainjection.c +alphain_la_SOURCES = mixer2/alphain/alphain.cpp +alphaout_la_SOURCES = mixer2/alphaout/alphaout.cpp +alphaover_la_SOURCES = mixer2/alphaover/alphaover.cpp +alphaxor_la_SOURCES = mixer2/alphaxor/alphaxor.cpp +blend_la_SOURCES = mixer2/blend/blend.cpp +burn_la_SOURCES = mixer2/burn/burn.cpp +color_only_la_SOURCES = mixer2/color_only/color_only.cpp +composition_la_SOURCES = mixer2/composition/composition.c +darken_la_SOURCES = mixer2/darken/darken.cpp +difference_la_SOURCES = mixer2/difference/difference.cpp +divide_la_SOURCES = mixer2/divide/divide.cpp +dodge_la_SOURCES = mixer2/dodge/dodge.cpp +grain_extract_la_SOURCES = mixer2/grain_extract/grain_extract.cpp +grain_merge_la_SOURCES = mixer2/grain_merge/grain_merge.cpp +hardlight_la_SOURCES = mixer2/hardlight/hardlight.cpp +hue_la_SOURCES = mixer2/hue/hue.cpp +lighten_la_SOURCES = mixer2/lighten/lighten.cpp +multiply_la_SOURCES = mixer2/multiply/multiply.cpp +overlay_la_SOURCES = mixer2/overlay/overlay.cpp +RGB_la_SOURCES = mixer3/RGB/RGB.c +saturation_la_SOURCES = mixer2/saturation/saturation.cpp +screen_la_SOURCES = mixer2/screen/screen.cpp +softlight_la_SOURCES = mixer2/softlight/softlight.cpp +subtract_la_SOURCES = mixer2/subtract/subtract.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 -lm -export-dynamic @@ -770,8 +899,14 @@ $(LINK) -rpath $(plugindir) $(RGB_la_OBJECTS) $(RGB_la_LIBADD) $(LIBS) addition.la: $(addition_la_OBJECTS) $(addition_la_DEPENDENCIES) $(CXXLINK) -rpath $(plugindir) $(addition_la_OBJECTS) $(addition_la_LIBADD) $(LIBS) +addition_alpha.la: $(addition_alpha_la_OBJECTS) $(addition_alpha_la_DEPENDENCIES) + $(CXXLINK) -rpath $(plugindir) $(addition_alpha_la_OBJECTS) $(addition_alpha_la_LIBADD) $(LIBS) +alpha0ps.la: $(alpha0ps_la_OBJECTS) $(alpha0ps_la_DEPENDENCIES) + $(LINK) -rpath $(plugindir) $(alpha0ps_la_OBJECTS) $(alpha0ps_la_LIBADD) $(LIBS) alphaatop.la: $(alphaatop_la_OBJECTS) $(alphaatop_la_DEPENDENCIES) $(CXXLINK) -rpath $(plugindir) $(alphaatop_la_OBJECTS) $(alphaatop_la_LIBADD) $(LIBS) +alphagrad.la: $(alphagrad_la_OBJECTS) $(alphagrad_la_DEPENDENCIES) + $(LINK) -rpath $(plugindir) $(alphagrad_la_OBJECTS) $(alphagrad_la_LIBADD) $(LIBS) alphain.la: $(alphain_la_OBJECTS) $(alphain_la_DEPENDENCIES) $(CXXLINK) -rpath $(plugindir) $(alphain_la_OBJECTS) $(alphain_la_LIBADD) $(LIBS) alphainjection.la: $(alphainjection_la_OBJECTS) $(alphainjection_la_DEPENDENCIES) @@ -780,6 +915,8 @@ $(CXXLINK) -rpath $(plugindir) $(alphaout_la_OBJECTS) $(alphaout_la_LIBADD) $(LIBS) alphaover.la: $(alphaover_la_OBJECTS) $(alphaover_la_DEPENDENCIES) $(CXXLINK) -rpath $(plugindir) $(alphaover_la_OBJECTS) $(alphaover_la_LIBADD) $(LIBS) +alphaspot.la: $(alphaspot_la_OBJECTS) $(alphaspot_la_DEPENDENCIES) + $(LINK) -rpath $(plugindir) $(alphaspot_la_OBJECTS) $(alphaspot_la_LIBADD) $(LIBS) alphaxor.la: $(alphaxor_la_OBJECTS) $(alphaxor_la_DEPENDENCIES) $(CXXLINK) -rpath $(plugindir) $(alphaxor_la_OBJECTS) $(alphaxor_la_LIBADD) $(LIBS) balanc0r.la: $(balanc0r_la_OBJECTS) $(balanc0r_la_DEPENDENCIES) @@ -796,12 +933,16 @@ $(CXXLINK) -rpath $(plugindir) $(burn_la_OBJECTS) $(burn_la_LIBADD) $(LIBS) bw0r.la: $(bw0r_la_OBJECTS) $(bw0r_la_DEPENDENCIES) $(LINK) -rpath $(plugindir) $(bw0r_la_OBJECTS) $(bw0r_la_LIBADD) $(LIBS) +c0rners.la: $(c0rners_la_OBJECTS) $(c0rners_la_DEPENDENCIES) + $(LINK) -rpath $(plugindir) $(c0rners_la_OBJECTS) $(c0rners_la_LIBADD) $(LIBS) cartoon.la: $(cartoon_la_OBJECTS) $(cartoon_la_DEPENDENCIES) $(CXXLINK) -rpath $(plugindir) $(cartoon_la_OBJECTS) $(cartoon_la_LIBADD) $(LIBS) cluster.la: $(cluster_la_OBJECTS) $(cluster_la_DEPENDENCIES) $(LINK) -rpath $(plugindir) $(cluster_la_OBJECTS) $(cluster_la_LIBADD) $(LIBS) color_only.la: $(color_only_la_OBJECTS) $(color_only_la_DEPENDENCIES) $(CXXLINK) -rpath $(plugindir) $(color_only_la_OBJECTS) $(color_only_la_LIBADD) $(LIBS) +coloradj_RGB.la: $(coloradj_RGB_la_OBJECTS) $(coloradj_RGB_la_DEPENDENCIES) + $(LINK) -rpath $(plugindir) $(coloradj_RGB_la_OBJECTS) $(coloradj_RGB_la_LIBADD) $(LIBS) colordistance.la: $(colordistance_la_OBJECTS) $(colordistance_la_DEPENDENCIES) $(LINK) -rpath $(plugindir) $(colordistance_la_OBJECTS) $(colordistance_la_LIBADD) $(LIBS) composition.la: $(composition_la_OBJECTS) $(composition_la_DEPENDENCIES) @@ -810,8 +951,12 @@ $(LINK) -rpath $(plugindir) $(contrast0r_la_OBJECTS) $(contrast0r_la_LIBADD) $(LIBS) curves.la: $(curves_la_OBJECTS) $(curves_la_DEPENDENCIES) $(LINK) -rpath $(plugindir) $(curves_la_OBJECTS) $(curves_la_LIBADD) $(LIBS) +d90stairsteppingfix.la: $(d90stairsteppingfix_la_OBJECTS) $(d90stairsteppingfix_la_DEPENDENCIES) + $(CXXLINK) -rpath $(plugindir) $(d90stairsteppingfix_la_OBJECTS) $(d90stairsteppingfix_la_LIBADD) $(LIBS) darken.la: $(darken_la_OBJECTS) $(darken_la_DEPENDENCIES) $(CXXLINK) -rpath $(plugindir) $(darken_la_OBJECTS) $(darken_la_LIBADD) $(LIBS) +defish0r.la: $(defish0r_la_OBJECTS) $(defish0r_la_DEPENDENCIES) + $(LINK) -rpath $(plugindir) $(defish0r_la_OBJECTS) $(defish0r_la_LIBADD) $(LIBS) delay0r.la: $(delay0r_la_OBJECTS) $(delay0r_la_DEPENDENCIES) $(CXXLINK) -rpath $(plugindir) $(delay0r_la_OBJECTS) $(delay0r_la_LIBADD) $(LIBS) delaygrab.la: $(delaygrab_la_OBJECTS) $(delaygrab_la_DEPENDENCIES) @@ -828,8 +973,10 @@ $(CXXLINK) -rpath $(plugindir) $(edgeglow_la_OBJECTS) $(edgeglow_la_LIBADD) $(LIBS) equaliz0r.la: $(equaliz0r_la_OBJECTS) $(equaliz0r_la_DEPENDENCIES) $(CXXLINK) -rpath $(plugindir) $(equaliz0r_la_OBJECTS) $(equaliz0r_la_LIBADD) $(LIBS) +facebl0r.la: $(facebl0r_la_OBJECTS) $(facebl0r_la_DEPENDENCIES) + $(CXXLINK) $(am_facebl0r_la_rpath) $(facebl0r_la_OBJECTS) $(facebl0r_la_LIBADD) $(LIBS) facedetect.la: $(facedetect_la_OBJECTS) $(facedetect_la_DEPENDENCIES) - $(facedetect_la_LINK) $(am_facedetect_la_rpath) $(facedetect_la_OBJECTS) $(facedetect_la_LIBADD) $(LIBS) + $(CXXLINK) $(am_facedetect_la_rpath) $(facedetect_la_OBJECTS) $(facedetect_la_LIBADD) $(LIBS) flippo.la: $(flippo_la_OBJECTS) $(flippo_la_DEPENDENCIES) $(LINK) -rpath $(plugindir) $(flippo_la_OBJECTS) $(flippo_la_LIBADD) $(LIBS) gamma.la: $(gamma_la_OBJECTS) $(gamma_la_DEPENDENCIES) @@ -842,6 +989,8 @@ $(CXXLINK) -rpath $(plugindir) $(grain_merge_la_OBJECTS) $(grain_merge_la_LIBADD) $(LIBS) hardlight.la: $(hardlight_la_OBJECTS) $(hardlight_la_DEPENDENCIES) $(CXXLINK) -rpath $(plugindir) $(hardlight_la_OBJECTS) $(hardlight_la_LIBADD) $(LIBS) +hqdn3d.la: $(hqdn3d_la_OBJECTS) $(hqdn3d_la_DEPENDENCIES) + $(LINK) -rpath $(plugindir) $(hqdn3d_la_OBJECTS) $(hqdn3d_la_LIBADD) $(LIBS) hue.la: $(hue_la_OBJECTS) $(hue_la_DEPENDENCIES) $(CXXLINK) -rpath $(plugindir) $(hue_la_OBJECTS) $(hue_la_LIBADD) $(LIBS) hueshift0r.la: $(hueshift0r_la_OBJECTS) $(hueshift0r_la_DEPENDENCIES) @@ -858,6 +1007,8 @@ $(LINK) -rpath $(plugindir) $(levels_la_OBJECTS) $(levels_la_LIBADD) $(LIBS) lighten.la: $(lighten_la_OBJECTS) $(lighten_la_DEPENDENCIES) $(CXXLINK) -rpath $(plugindir) $(lighten_la_OBJECTS) $(lighten_la_LIBADD) $(LIBS) +lightgraffiti.la: $(lightgraffiti_la_OBJECTS) $(lightgraffiti_la_DEPENDENCIES) + $(CXXLINK) -rpath $(plugindir) $(lightgraffiti_la_OBJECTS) $(lightgraffiti_la_LIBADD) $(LIBS) lissajous0r.la: $(lissajous0r_la_OBJECTS) $(lissajous0r_la_DEPENDENCIES) $(CXXLINK) -rpath $(plugindir) $(lissajous0r_la_OBJECTS) $(lissajous0r_la_LIBADD) $(LIBS) luminance.la: $(luminance_la_OBJECTS) $(luminance_la_DEPENDENCIES) @@ -884,6 +1035,10 @@ $(LINK) -rpath $(plugindir) $(pixeliz0r_la_OBJECTS) $(pixeliz0r_la_LIBADD) $(LIBS) plasma.la: $(plasma_la_OBJECTS) $(plasma_la_DEPENDENCIES) $(CXXLINK) -rpath $(plugindir) $(plasma_la_OBJECTS) $(plasma_la_LIBADD) $(LIBS) +pr0be.la: $(pr0be_la_OBJECTS) $(pr0be_la_DEPENDENCIES) + $(LINK) -rpath $(plugindir) $(pr0be_la_OBJECTS) $(pr0be_la_LIBADD) $(LIBS) +pr0file.la: $(pr0file_la_OBJECTS) $(pr0file_la_DEPENDENCIES) + $(LINK) -rpath $(plugindir) $(pr0file_la_OBJECTS) $(pr0file_la_LIBADD) $(LIBS) primaries.la: $(primaries_la_OBJECTS) $(primaries_la_DEPENDENCIES) $(CXXLINK) -rpath $(plugindir) $(primaries_la_OBJECTS) $(primaries_la_LIBADD) $(LIBS) rgbparade.la: $(rgbparade_la_OBJECTS) $(rgbparade_la_DEPENDENCIES) @@ -898,16 +1053,34 @@ $(CXXLINK) -rpath $(plugindir) $(scanline0r_la_OBJECTS) $(scanline0r_la_LIBADD) $(LIBS) screen.la: $(screen_la_OBJECTS) $(screen_la_DEPENDENCIES) $(CXXLINK) -rpath $(plugindir) $(screen_la_OBJECTS) $(screen_la_LIBADD) $(LIBS) +select0r.la: $(select0r_la_OBJECTS) $(select0r_la_DEPENDENCIES) + $(LINK) -rpath $(plugindir) $(select0r_la_OBJECTS) $(select0r_la_LIBADD) $(LIBS) +sharpness.la: $(sharpness_la_OBJECTS) $(sharpness_la_DEPENDENCIES) + $(LINK) -rpath $(plugindir) $(sharpness_la_OBJECTS) $(sharpness_la_LIBADD) $(LIBS) sobel.la: $(sobel_la_OBJECTS) $(sobel_la_DEPENDENCIES) $(CXXLINK) -rpath $(plugindir) $(sobel_la_OBJECTS) $(sobel_la_LIBADD) $(LIBS) softlight.la: $(softlight_la_OBJECTS) $(softlight_la_DEPENDENCIES) $(CXXLINK) -rpath $(plugindir) $(softlight_la_OBJECTS) $(softlight_la_LIBADD) $(LIBS) +sopsat.la: $(sopsat_la_OBJECTS) $(sopsat_la_DEPENDENCIES) + $(CXXLINK) -rpath $(plugindir) $(sopsat_la_OBJECTS) $(sopsat_la_LIBADD) $(LIBS) squareblur.la: $(squareblur_la_OBJECTS) $(squareblur_la_DEPENDENCIES) $(LINK) -rpath $(plugindir) $(squareblur_la_OBJECTS) $(squareblur_la_LIBADD) $(LIBS) subtract.la: $(subtract_la_OBJECTS) $(subtract_la_DEPENDENCIES) $(CXXLINK) -rpath $(plugindir) $(subtract_la_OBJECTS) $(subtract_la_LIBADD) $(LIBS) tehroxx0r.la: $(tehroxx0r_la_OBJECTS) $(tehroxx0r_la_DEPENDENCIES) $(LINK) -rpath $(plugindir) $(tehroxx0r_la_OBJECTS) $(tehroxx0r_la_LIBADD) $(LIBS) +test_pat_B.la: $(test_pat_B_la_OBJECTS) $(test_pat_B_la_DEPENDENCIES) + $(LINK) -rpath $(plugindir) $(test_pat_B_la_OBJECTS) $(test_pat_B_la_LIBADD) $(LIBS) +test_pat_C.la: $(test_pat_C_la_OBJECTS) $(test_pat_C_la_DEPENDENCIES) + $(LINK) -rpath $(plugindir) $(test_pat_C_la_OBJECTS) $(test_pat_C_la_LIBADD) $(LIBS) +test_pat_G.la: $(test_pat_G_la_OBJECTS) $(test_pat_G_la_DEPENDENCIES) + $(LINK) -rpath $(plugindir) $(test_pat_G_la_OBJECTS) $(test_pat_G_la_LIBADD) $(LIBS) +test_pat_I.la: $(test_pat_I_la_OBJECTS) $(test_pat_I_la_DEPENDENCIES) + $(LINK) -rpath $(plugindir) $(test_pat_I_la_OBJECTS) $(test_pat_I_la_LIBADD) $(LIBS) +test_pat_L.la: $(test_pat_L_la_OBJECTS) $(test_pat_L_la_DEPENDENCIES) + $(LINK) -rpath $(plugindir) $(test_pat_L_la_OBJECTS) $(test_pat_L_la_LIBADD) $(LIBS) +test_pat_R.la: $(test_pat_R_la_OBJECTS) $(test_pat_R_la_DEPENDENCIES) + $(LINK) -rpath $(plugindir) $(test_pat_R_la_OBJECTS) $(test_pat_R_la_LIBADD) $(LIBS) three_point_balance.la: $(three_point_balance_la_OBJECTS) $(three_point_balance_la_DEPENDENCIES) $(LINK) -rpath $(plugindir) $(three_point_balance_la_OBJECTS) $(three_point_balance_la_LIBADD) $(LIBS) threelay0r.la: $(threelay0r_la_OBJECTS) $(threelay0r_la_DEPENDENCIES) @@ -928,8 +1101,6 @@ $(vectorscope_la_LINK) $(am_vectorscope_la_rpath) $(vectorscope_la_OBJECTS) $(vectorscope_la_LIBADD) $(LIBS) vertigo.la: $(vertigo_la_OBJECTS) $(vertigo_la_DEPENDENCIES) $(LINK) -rpath $(plugindir) $(vertigo_la_OBJECTS) $(vertigo_la_LIBADD) $(LIBS) -water.la: $(water_la_OBJECTS) $(water_la_DEPENDENCIES) - $(CXXLINK) -rpath $(plugindir) $(water_la_OBJECTS) $(water_la_LIBADD) $(LIBS) xfade0r.la: $(xfade0r_la_OBJECTS) $(xfade0r_la_DEPENDENCIES) $(CXXLINK) -rpath $(plugindir) $(xfade0r_la_OBJECTS) $(xfade0r_la_LIBADD) $(LIBS) @@ -945,11 +1116,15 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/R.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/RGB.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/addition.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/addition_alpha.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alpha0ps.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alphaatop.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alphagrad.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alphain.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alphainjection.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alphaout.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alphaover.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alphaspot.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alphaxor.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/balanc0r.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/baltan.Plo@am__quote@ @@ -958,14 +1133,18 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/brightness.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/burn.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bw0r.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/c0rners.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cartoon.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cluster.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/color_only.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/coloradj_RGB.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/colordistance.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/composition.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/contrast0r.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curves.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/d90stairsteppingfix.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/darken.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/defish0r.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/delay0r.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/delaygrab.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/difference.Plo@am__quote@ @@ -974,13 +1153,15 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dodge.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/edgeglow.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/equaliz0r.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/facedetect_la-facedetect.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/facebl0r.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/facedetect.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/flippo.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gamma.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glow.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/grain_extract.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/grain_merge.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hardlight.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hqdn3d.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hue.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hueshift0r.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/invert0r.Plo@am__quote@ @@ -989,6 +1170,7 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/letterb0xed.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/levels.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lighten.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lightgraffiti.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lissajous0r.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/luminance.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mask0mate.Plo@am__quote@ @@ -1002,6 +1184,8 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/perspective.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pixeliz0r.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/plasma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pr0be.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pr0file.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/primaries.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rgbparade_la-rgbparade.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/saturat0r.Plo@am__quote@ @@ -1009,11 +1193,20 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/scale0tilt_la-scale0tilt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/scanline0r.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/screen.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/select0r.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sharpness.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sobel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/softlight.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sopsat.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/squareblur.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/subtract.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tehRoxx0r.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_pat_B.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_pat_C.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_pat_G.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_pat_I.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_pat_L.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_pat_R.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/three_point_balance.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/threelay0r.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/threshold0r.Plo@am__quote@ @@ -1024,7 +1217,6 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/value.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vectorscope_la-vectorscope.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vertigo.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/water.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xfade0r.Plo@am__quote@ .c.o: @@ -1083,6 +1275,20 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o RGB.lo `test -f 'mixer3/RGB/RGB.c' || echo '$(srcdir)/'`mixer3/RGB/RGB.c +alpha0ps.lo: filter/alpha0ps/alpha0ps.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT alpha0ps.lo -MD -MP -MF $(DEPDIR)/alpha0ps.Tpo -c -o alpha0ps.lo `test -f 'filter/alpha0ps/alpha0ps.c' || echo '$(srcdir)/'`filter/alpha0ps/alpha0ps.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/alpha0ps.Tpo $(DEPDIR)/alpha0ps.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='filter/alpha0ps/alpha0ps.c' object='alpha0ps.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o alpha0ps.lo `test -f 'filter/alpha0ps/alpha0ps.c' || echo '$(srcdir)/'`filter/alpha0ps/alpha0ps.c + +alphagrad.lo: filter/alpha0ps/alphagrad.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT alphagrad.lo -MD -MP -MF $(DEPDIR)/alphagrad.Tpo -c -o alphagrad.lo `test -f 'filter/alpha0ps/alphagrad.c' || echo '$(srcdir)/'`filter/alpha0ps/alphagrad.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/alphagrad.Tpo $(DEPDIR)/alphagrad.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='filter/alpha0ps/alphagrad.c' object='alphagrad.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o alphagrad.lo `test -f 'filter/alpha0ps/alphagrad.c' || echo '$(srcdir)/'`filter/alpha0ps/alphagrad.c + alphainjection.lo: mixer2/alphainjection/alphainjection.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT alphainjection.lo -MD -MP -MF $(DEPDIR)/alphainjection.Tpo -c -o alphainjection.lo `test -f 'mixer2/alphainjection/alphainjection.c' || echo '$(srcdir)/'`mixer2/alphainjection/alphainjection.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/alphainjection.Tpo $(DEPDIR)/alphainjection.Plo @@ -1090,6 +1296,13 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o alphainjection.lo `test -f 'mixer2/alphainjection/alphainjection.c' || echo '$(srcdir)/'`mixer2/alphainjection/alphainjection.c +alphaspot.lo: filter/alpha0ps/alphaspot.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT alphaspot.lo -MD -MP -MF $(DEPDIR)/alphaspot.Tpo -c -o alphaspot.lo `test -f 'filter/alpha0ps/alphaspot.c' || echo '$(srcdir)/'`filter/alpha0ps/alphaspot.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/alphaspot.Tpo $(DEPDIR)/alphaspot.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='filter/alpha0ps/alphaspot.c' object='alphaspot.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o alphaspot.lo `test -f 'filter/alpha0ps/alphaspot.c' || echo '$(srcdir)/'`filter/alpha0ps/alphaspot.c + balanc0r.lo: filter/balanc0r/balanc0r.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT balanc0r.lo -MD -MP -MF $(DEPDIR)/balanc0r.Tpo -c -o balanc0r.lo `test -f 'filter/balanc0r/balanc0r.c' || echo '$(srcdir)/'`filter/balanc0r/balanc0r.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/balanc0r.Tpo $(DEPDIR)/balanc0r.Plo @@ -1111,6 +1324,13 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bw0r.lo `test -f 'filter/bw0r/bw0r.c' || echo '$(srcdir)/'`filter/bw0r/bw0r.c +c0rners.lo: filter/c0rners/c0rners.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT c0rners.lo -MD -MP -MF $(DEPDIR)/c0rners.Tpo -c -o c0rners.lo `test -f 'filter/c0rners/c0rners.c' || echo '$(srcdir)/'`filter/c0rners/c0rners.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/c0rners.Tpo $(DEPDIR)/c0rners.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='filter/c0rners/c0rners.c' object='c0rners.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o c0rners.lo `test -f 'filter/c0rners/c0rners.c' || echo '$(srcdir)/'`filter/c0rners/c0rners.c + cluster.lo: filter/cluster/cluster.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cluster.lo -MD -MP -MF $(DEPDIR)/cluster.Tpo -c -o cluster.lo `test -f 'filter/cluster/cluster.c' || echo '$(srcdir)/'`filter/cluster/cluster.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/cluster.Tpo $(DEPDIR)/cluster.Plo @@ -1118,6 +1338,13 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cluster.lo `test -f 'filter/cluster/cluster.c' || echo '$(srcdir)/'`filter/cluster/cluster.c +coloradj_RGB.lo: filter/coloradj/coloradj_RGB.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT coloradj_RGB.lo -MD -MP -MF $(DEPDIR)/coloradj_RGB.Tpo -c -o coloradj_RGB.lo `test -f 'filter/coloradj/coloradj_RGB.c' || echo '$(srcdir)/'`filter/coloradj/coloradj_RGB.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/coloradj_RGB.Tpo $(DEPDIR)/coloradj_RGB.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='filter/coloradj/coloradj_RGB.c' object='coloradj_RGB.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o coloradj_RGB.lo `test -f 'filter/coloradj/coloradj_RGB.c' || echo '$(srcdir)/'`filter/coloradj/coloradj_RGB.c + colordistance.lo: filter/colordistance/colordistance.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT colordistance.lo -MD -MP -MF $(DEPDIR)/colordistance.Tpo -c -o colordistance.lo `test -f 'filter/colordistance/colordistance.c' || echo '$(srcdir)/'`filter/colordistance/colordistance.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/colordistance.Tpo $(DEPDIR)/colordistance.Plo @@ -1146,6 +1373,13 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o curves.lo `test -f 'filter/curves/curves.c' || echo '$(srcdir)/'`filter/curves/curves.c +defish0r.lo: filter/defish0r/defish0r.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT defish0r.lo -MD -MP -MF $(DEPDIR)/defish0r.Tpo -c -o defish0r.lo `test -f 'filter/defish0r/defish0r.c' || echo '$(srcdir)/'`filter/defish0r/defish0r.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/defish0r.Tpo $(DEPDIR)/defish0r.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='filter/defish0r/defish0r.c' object='defish0r.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o defish0r.lo `test -f 'filter/defish0r/defish0r.c' || echo '$(srcdir)/'`filter/defish0r/defish0r.c + distort0r.lo: filter/distort0r/distort0r.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT distort0r.lo -MD -MP -MF $(DEPDIR)/distort0r.Tpo -c -o distort0r.lo `test -f 'filter/distort0r/distort0r.c' || echo '$(srcdir)/'`filter/distort0r/distort0r.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/distort0r.Tpo $(DEPDIR)/distort0r.Plo @@ -1153,13 +1387,6 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o distort0r.lo `test -f 'filter/distort0r/distort0r.c' || echo '$(srcdir)/'`filter/distort0r/distort0r.c -facedetect_la-facedetect.lo: filter/facedetect/facedetect.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(facedetect_la_CFLAGS) $(CFLAGS) -MT facedetect_la-facedetect.lo -MD -MP -MF $(DEPDIR)/facedetect_la-facedetect.Tpo -c -o facedetect_la-facedetect.lo `test -f 'filter/facedetect/facedetect.c' || echo '$(srcdir)/'`filter/facedetect/facedetect.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/facedetect_la-facedetect.Tpo $(DEPDIR)/facedetect_la-facedetect.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='filter/facedetect/facedetect.c' object='facedetect_la-facedetect.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(facedetect_la_CFLAGS) $(CFLAGS) -c -o facedetect_la-facedetect.lo `test -f 'filter/facedetect/facedetect.c' || echo '$(srcdir)/'`filter/facedetect/facedetect.c - flippo.lo: filter/flippo/flippo.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT flippo.lo -MD -MP -MF $(DEPDIR)/flippo.Tpo -c -o flippo.lo `test -f 'filter/flippo/flippo.c' || echo '$(srcdir)/'`filter/flippo/flippo.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/flippo.Tpo $(DEPDIR)/flippo.Plo @@ -1181,6 +1408,13 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o glow.lo `test -f 'filter/glow/glow.c' || echo '$(srcdir)/'`filter/glow/glow.c +hqdn3d.lo: filter/denoise/hqdn3d.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT hqdn3d.lo -MD -MP -MF $(DEPDIR)/hqdn3d.Tpo -c -o hqdn3d.lo `test -f 'filter/denoise/hqdn3d.c' || echo '$(srcdir)/'`filter/denoise/hqdn3d.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/hqdn3d.Tpo $(DEPDIR)/hqdn3d.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='filter/denoise/hqdn3d.c' object='hqdn3d.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o hqdn3d.lo `test -f 'filter/denoise/hqdn3d.c' || echo '$(srcdir)/'`filter/denoise/hqdn3d.c + hueshift0r.lo: filter/hueshift0r/hueshift0r.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT hueshift0r.lo -MD -MP -MF $(DEPDIR)/hueshift0r.Tpo -c -o hueshift0r.lo `test -f 'filter/hueshift0r/hueshift0r.c' || echo '$(srcdir)/'`filter/hueshift0r/hueshift0r.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/hueshift0r.Tpo $(DEPDIR)/hueshift0r.Plo @@ -1251,6 +1485,20 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pixeliz0r.lo `test -f 'filter/pixeliz0r/pixeliz0r.c' || echo '$(srcdir)/'`filter/pixeliz0r/pixeliz0r.c +pr0be.lo: filter/measure/pr0be.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pr0be.lo -MD -MP -MF $(DEPDIR)/pr0be.Tpo -c -o pr0be.lo `test -f 'filter/measure/pr0be.c' || echo '$(srcdir)/'`filter/measure/pr0be.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/pr0be.Tpo $(DEPDIR)/pr0be.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='filter/measure/pr0be.c' object='pr0be.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pr0be.lo `test -f 'filter/measure/pr0be.c' || echo '$(srcdir)/'`filter/measure/pr0be.c + +pr0file.lo: filter/measure/pr0file.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pr0file.lo -MD -MP -MF $(DEPDIR)/pr0file.Tpo -c -o pr0file.lo `test -f 'filter/measure/pr0file.c' || echo '$(srcdir)/'`filter/measure/pr0file.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/pr0file.Tpo $(DEPDIR)/pr0file.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='filter/measure/pr0file.c' object='pr0file.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pr0file.lo `test -f 'filter/measure/pr0file.c' || echo '$(srcdir)/'`filter/measure/pr0file.c + rgbparade_la-rgbparade.lo: filter/rgbparade/rgbparade.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rgbparade_la_CFLAGS) $(CFLAGS) -MT rgbparade_la-rgbparade.lo -MD -MP -MF $(DEPDIR)/rgbparade_la-rgbparade.Tpo -c -o rgbparade_la-rgbparade.lo `test -f 'filter/rgbparade/rgbparade.c' || echo '$(srcdir)/'`filter/rgbparade/rgbparade.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/rgbparade_la-rgbparade.Tpo $(DEPDIR)/rgbparade_la-rgbparade.Plo @@ -1272,6 +1520,20 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(scale0tilt_la_CFLAGS) $(CFLAGS) -c -o scale0tilt_la-scale0tilt.lo `test -f 'filter/scale0tilt/scale0tilt.c' || echo '$(srcdir)/'`filter/scale0tilt/scale0tilt.c +select0r.lo: filter/select0r/select0r.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT select0r.lo -MD -MP -MF $(DEPDIR)/select0r.Tpo -c -o select0r.lo `test -f 'filter/select0r/select0r.c' || echo '$(srcdir)/'`filter/select0r/select0r.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/select0r.Tpo $(DEPDIR)/select0r.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='filter/select0r/select0r.c' object='select0r.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o select0r.lo `test -f 'filter/select0r/select0r.c' || echo '$(srcdir)/'`filter/select0r/select0r.c + +sharpness.lo: filter/sharpness/sharpness.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sharpness.lo -MD -MP -MF $(DEPDIR)/sharpness.Tpo -c -o sharpness.lo `test -f 'filter/sharpness/sharpness.c' || echo '$(srcdir)/'`filter/sharpness/sharpness.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/sharpness.Tpo $(DEPDIR)/sharpness.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='filter/sharpness/sharpness.c' object='sharpness.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sharpness.lo `test -f 'filter/sharpness/sharpness.c' || echo '$(srcdir)/'`filter/sharpness/sharpness.c + squareblur.lo: filter/squareblur/squareblur.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT squareblur.lo -MD -MP -MF $(DEPDIR)/squareblur.Tpo -c -o squareblur.lo `test -f 'filter/squareblur/squareblur.c' || echo '$(srcdir)/'`filter/squareblur/squareblur.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/squareblur.Tpo $(DEPDIR)/squareblur.Plo @@ -1286,6 +1548,48 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tehRoxx0r.lo `test -f 'filter/tehroxx0r/tehRoxx0r.c' || echo '$(srcdir)/'`filter/tehroxx0r/tehRoxx0r.c +test_pat_B.lo: generator/test_pat/test_pat_B.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test_pat_B.lo -MD -MP -MF $(DEPDIR)/test_pat_B.Tpo -c -o test_pat_B.lo `test -f 'generator/test_pat/test_pat_B.c' || echo '$(srcdir)/'`generator/test_pat/test_pat_B.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/test_pat_B.Tpo $(DEPDIR)/test_pat_B.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='generator/test_pat/test_pat_B.c' object='test_pat_B.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test_pat_B.lo `test -f 'generator/test_pat/test_pat_B.c' || echo '$(srcdir)/'`generator/test_pat/test_pat_B.c + +test_pat_C.lo: generator/test_pat/test_pat_C.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test_pat_C.lo -MD -MP -MF $(DEPDIR)/test_pat_C.Tpo -c -o test_pat_C.lo `test -f 'generator/test_pat/test_pat_C.c' || echo '$(srcdir)/'`generator/test_pat/test_pat_C.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/test_pat_C.Tpo $(DEPDIR)/test_pat_C.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='generator/test_pat/test_pat_C.c' object='test_pat_C.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test_pat_C.lo `test -f 'generator/test_pat/test_pat_C.c' || echo '$(srcdir)/'`generator/test_pat/test_pat_C.c + +test_pat_G.lo: generator/test_pat/test_pat_G.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test_pat_G.lo -MD -MP -MF $(DEPDIR)/test_pat_G.Tpo -c -o test_pat_G.lo `test -f 'generator/test_pat/test_pat_G.c' || echo '$(srcdir)/'`generator/test_pat/test_pat_G.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/test_pat_G.Tpo $(DEPDIR)/test_pat_G.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='generator/test_pat/test_pat_G.c' object='test_pat_G.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test_pat_G.lo `test -f 'generator/test_pat/test_pat_G.c' || echo '$(srcdir)/'`generator/test_pat/test_pat_G.c + +test_pat_I.lo: generator/test_pat/test_pat_I.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test_pat_I.lo -MD -MP -MF $(DEPDIR)/test_pat_I.Tpo -c -o test_pat_I.lo `test -f 'generator/test_pat/test_pat_I.c' || echo '$(srcdir)/'`generator/test_pat/test_pat_I.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/test_pat_I.Tpo $(DEPDIR)/test_pat_I.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='generator/test_pat/test_pat_I.c' object='test_pat_I.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test_pat_I.lo `test -f 'generator/test_pat/test_pat_I.c' || echo '$(srcdir)/'`generator/test_pat/test_pat_I.c + +test_pat_L.lo: generator/test_pat/test_pat_L.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test_pat_L.lo -MD -MP -MF $(DEPDIR)/test_pat_L.Tpo -c -o test_pat_L.lo `test -f 'generator/test_pat/test_pat_L.c' || echo '$(srcdir)/'`generator/test_pat/test_pat_L.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/test_pat_L.Tpo $(DEPDIR)/test_pat_L.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='generator/test_pat/test_pat_L.c' object='test_pat_L.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test_pat_L.lo `test -f 'generator/test_pat/test_pat_L.c' || echo '$(srcdir)/'`generator/test_pat/test_pat_L.c + +test_pat_R.lo: generator/test_pat/test_pat_R.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test_pat_R.lo -MD -MP -MF $(DEPDIR)/test_pat_R.Tpo -c -o test_pat_R.lo `test -f 'generator/test_pat/test_pat_R.c' || echo '$(srcdir)/'`generator/test_pat/test_pat_R.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/test_pat_R.Tpo $(DEPDIR)/test_pat_R.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='generator/test_pat/test_pat_R.c' object='test_pat_R.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test_pat_R.lo `test -f 'generator/test_pat/test_pat_R.c' || echo '$(srcdir)/'`generator/test_pat/test_pat_R.c + three_point_balance.lo: filter/three_point_balance/three_point_balance.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT three_point_balance.lo -MD -MP -MF $(DEPDIR)/three_point_balance.Tpo -c -o three_point_balance.lo `test -f 'filter/three_point_balance/three_point_balance.c' || echo '$(srcdir)/'`filter/three_point_balance/three_point_balance.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/three_point_balance.Tpo $(DEPDIR)/three_point_balance.Plo @@ -1363,6 +1667,13 @@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o addition.lo `test -f 'mixer2/addition/addition.cpp' || echo '$(srcdir)/'`mixer2/addition/addition.cpp +addition_alpha.lo: mixer2/addition_alpha/addition_alpha.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT addition_alpha.lo -MD -MP -MF $(DEPDIR)/addition_alpha.Tpo -c -o addition_alpha.lo `test -f 'mixer2/addition_alpha/addition_alpha.cpp' || echo '$(srcdir)/'`mixer2/addition_alpha/addition_alpha.cpp +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/addition_alpha.Tpo $(DEPDIR)/addition_alpha.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='mixer2/addition_alpha/addition_alpha.cpp' object='addition_alpha.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o addition_alpha.lo `test -f 'mixer2/addition_alpha/addition_alpha.cpp' || echo '$(srcdir)/'`mixer2/addition_alpha/addition_alpha.cpp + alphaatop.lo: mixer2/alphaatop/alphaatop.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT alphaatop.lo -MD -MP -MF $(DEPDIR)/alphaatop.Tpo -c -o alphaatop.lo `test -f 'mixer2/alphaatop/alphaatop.cpp' || echo '$(srcdir)/'`mixer2/alphaatop/alphaatop.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/alphaatop.Tpo $(DEPDIR)/alphaatop.Plo @@ -1440,6 +1751,13 @@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o color_only.lo `test -f 'mixer2/color_only/color_only.cpp' || echo '$(srcdir)/'`mixer2/color_only/color_only.cpp +d90stairsteppingfix.lo: filter/d90stairsteppingfix/d90stairsteppingfix.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT d90stairsteppingfix.lo -MD -MP -MF $(DEPDIR)/d90stairsteppingfix.Tpo -c -o d90stairsteppingfix.lo `test -f 'filter/d90stairsteppingfix/d90stairsteppingfix.cpp' || echo '$(srcdir)/'`filter/d90stairsteppingfix/d90stairsteppingfix.cpp +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/d90stairsteppingfix.Tpo $(DEPDIR)/d90stairsteppingfix.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='filter/d90stairsteppingfix/d90stairsteppingfix.cpp' object='d90stairsteppingfix.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o d90stairsteppingfix.lo `test -f 'filter/d90stairsteppingfix/d90stairsteppingfix.cpp' || echo '$(srcdir)/'`filter/d90stairsteppingfix/d90stairsteppingfix.cpp + darken.lo: mixer2/darken/darken.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT darken.lo -MD -MP -MF $(DEPDIR)/darken.Tpo -c -o darken.lo `test -f 'mixer2/darken/darken.cpp' || echo '$(srcdir)/'`mixer2/darken/darken.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/darken.Tpo $(DEPDIR)/darken.Plo @@ -1496,6 +1814,20 @@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o equaliz0r.lo `test -f 'filter/equaliz0r/equaliz0r.cpp' || echo '$(srcdir)/'`filter/equaliz0r/equaliz0r.cpp +facebl0r.lo: filter/facebl0r/facebl0r.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT facebl0r.lo -MD -MP -MF $(DEPDIR)/facebl0r.Tpo -c -o facebl0r.lo `test -f 'filter/facebl0r/facebl0r.cpp' || echo '$(srcdir)/'`filter/facebl0r/facebl0r.cpp +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/facebl0r.Tpo $(DEPDIR)/facebl0r.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='filter/facebl0r/facebl0r.cpp' object='facebl0r.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o facebl0r.lo `test -f 'filter/facebl0r/facebl0r.cpp' || echo '$(srcdir)/'`filter/facebl0r/facebl0r.cpp + +facedetect.lo: filter/facedetect/facedetect.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT facedetect.lo -MD -MP -MF $(DEPDIR)/facedetect.Tpo -c -o facedetect.lo `test -f 'filter/facedetect/facedetect.cpp' || echo '$(srcdir)/'`filter/facedetect/facedetect.cpp +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/facedetect.Tpo $(DEPDIR)/facedetect.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='filter/facedetect/facedetect.cpp' object='facedetect.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o facedetect.lo `test -f 'filter/facedetect/facedetect.cpp' || echo '$(srcdir)/'`filter/facedetect/facedetect.cpp + grain_extract.lo: mixer2/grain_extract/grain_extract.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT grain_extract.lo -MD -MP -MF $(DEPDIR)/grain_extract.Tpo -c -o grain_extract.lo `test -f 'mixer2/grain_extract/grain_extract.cpp' || echo '$(srcdir)/'`mixer2/grain_extract/grain_extract.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/grain_extract.Tpo $(DEPDIR)/grain_extract.Plo @@ -1531,6 +1863,13 @@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o lighten.lo `test -f 'mixer2/lighten/lighten.cpp' || echo '$(srcdir)/'`mixer2/lighten/lighten.cpp +lightgraffiti.lo: filter/lightgraffiti/lightgraffiti.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT lightgraffiti.lo -MD -MP -MF $(DEPDIR)/lightgraffiti.Tpo -c -o lightgraffiti.lo `test -f 'filter/lightgraffiti/lightgraffiti.cpp' || echo '$(srcdir)/'`filter/lightgraffiti/lightgraffiti.cpp +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/lightgraffiti.Tpo $(DEPDIR)/lightgraffiti.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='filter/lightgraffiti/lightgraffiti.cpp' object='lightgraffiti.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o lightgraffiti.lo `test -f 'filter/lightgraffiti/lightgraffiti.cpp' || echo '$(srcdir)/'`filter/lightgraffiti/lightgraffiti.cpp + lissajous0r.lo: generator/lissajous0r/lissajous0r.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT lissajous0r.lo -MD -MP -MF $(DEPDIR)/lissajous0r.Tpo -c -o lissajous0r.lo `test -f 'generator/lissajous0r/lissajous0r.cpp' || echo '$(srcdir)/'`generator/lissajous0r/lissajous0r.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/lissajous0r.Tpo $(DEPDIR)/lissajous0r.Plo @@ -1636,6 +1975,13 @@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o softlight.lo `test -f 'mixer2/softlight/softlight.cpp' || echo '$(srcdir)/'`mixer2/softlight/softlight.cpp +sopsat.lo: filter/sopsat/sopsat.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT sopsat.lo -MD -MP -MF $(DEPDIR)/sopsat.Tpo -c -o sopsat.lo `test -f 'filter/sopsat/sopsat.cpp' || echo '$(srcdir)/'`filter/sopsat/sopsat.cpp +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/sopsat.Tpo $(DEPDIR)/sopsat.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='filter/sopsat/sopsat.cpp' object='sopsat.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o sopsat.lo `test -f 'filter/sopsat/sopsat.cpp' || echo '$(srcdir)/'`filter/sopsat/sopsat.cpp + subtract.lo: mixer2/subtract/subtract.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT subtract.lo -MD -MP -MF $(DEPDIR)/subtract.Tpo -c -o subtract.lo `test -f 'mixer2/subtract/subtract.cpp' || echo '$(srcdir)/'`mixer2/subtract/subtract.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/subtract.Tpo $(DEPDIR)/subtract.Plo @@ -1663,13 +2009,6 @@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='mixer2/value/value.cpp' object='value.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o value.lo `test -f 'mixer2/value/value.cpp' || echo '$(srcdir)/'`mixer2/value/value.cpp - -water.lo: filter/water/water.cpp -@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT water.lo -MD -MP -MF $(DEPDIR)/water.Tpo -c -o water.lo `test -f 'filter/water/water.cpp' || echo '$(srcdir)/'`filter/water/water.cpp -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/water.Tpo $(DEPDIR)/water.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='filter/water/water.cpp' object='water.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o water.lo `test -f 'filter/water/water.cpp' || echo '$(srcdir)/'`filter/water/water.cpp xfade0r.lo: mixer2/xfade0r/xfade0r.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT xfade0r.lo -MD -MP -MF $(DEPDIR)/xfade0r.Tpo -c -o xfade0r.lo `test -f 'mixer2/xfade0r/xfade0r.cpp' || echo '$(srcdir)/'`mixer2/xfade0r/xfade0r.cpp diff --git a/src/filter/3dflippo/3dflippo.c b/src/filter/3dflippo/3dflippo.c index 5099445..3a98027 100644 --- a/src/filter/3dflippo/3dflippo.c +++ b/src/filter/3dflippo/3dflippo.c @@ -27,6 +27,9 @@ #include #include #include +#if defined(_MSC_VER) +#define _USE_MATH_DEFINES +#endif /* _MSC_VER */ #include #define MSIZE 4 @@ -143,14 +146,14 @@ f0r_instance_t f0r_construct(unsigned int width,unsigned int height) { - tdflippo_instance_t *inst=calloc(1, sizeof(*inst)); + tdflippo_instance_t *inst=(tdflippo_instance_t*)calloc(1, sizeof(*inst)); 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->mask=(int*)malloc(sizeof(int)*inst->fsize); return (f0r_instance_t)inst; } @@ -297,11 +300,11 @@ static float **newmat(unsigned char unit_flg) { int i; - float **to_ret=malloc(sizeof(float *)*MSIZE); + float **to_ret=(float**)malloc(sizeof(float *)*MSIZE); for(i=0;iwidth = width; inst->height = height; return (f0r_instance_t)inst; } diff --git a/src/filter/RGB/CMakeLists.txt b/src/filter/RGB/CMakeLists.txt new file mode 100644 index 0000000..596fa12 --- /dev/null +++ b/src/filter/RGB/CMakeLists.txt @@ -0,0 +1,22 @@ +set (R_SOURCES R.c) +set (G_SOURCES G.c) +set (B_SOURCES B.c) + +if (MSVC) + set_source_files_properties (R.c G.c B.c PROPERTIES LANGUAGE CXX) + set (R_SOURCES ${R_SOURCES} ${FREI0R_DEF}) + set (G_SOURCES ${G_SOURCES} ${FREI0R_DEF}) + set (B_SOURCES ${B_SOURCES} ${FREI0R_DEF}) +endif (MSVC) + +add_library (R MODULE ${R_SOURCES}) +add_library (G MODULE ${G_SOURCES}) +add_library (B MODULE ${B_SOURCES}) + +set_target_properties (R PROPERTIES PREFIX "") +set_target_properties (G PROPERTIES PREFIX "") +set_target_properties (B PROPERTIES PREFIX "") + +install (TARGETS R LIBRARY DESTINATION ${LIBDIR}) +install (TARGETS G LIBRARY DESTINATION ${LIBDIR}) +install (TARGETS B LIBRARY DESTINATION ${LIBDIR}) diff --git a/src/filter/RGB/G.c b/src/filter/RGB/G.c index aa86f9d..d05dbc0 100644 --- a/src/filter/RGB/G.c +++ b/src/filter/RGB/G.c @@ -56,7 +56,7 @@ f0r_instance_t f0r_construct(unsigned int width, unsigned int height) { - rgb_instance_t* inst = calloc(1, sizeof(*inst)); + rgb_instance_t* inst = (rgb_instance_t*)calloc(1, sizeof(*inst)); inst->width = width; inst->height = height; return (f0r_instance_t)inst; } diff --git a/src/filter/RGB/R.c b/src/filter/RGB/R.c index c06fa3c..9e206af 100644 --- a/src/filter/RGB/R.c +++ b/src/filter/RGB/R.c @@ -56,7 +56,7 @@ f0r_instance_t f0r_construct(unsigned int width, unsigned int height) { - rgb_instance_t* inst = calloc(1, sizeof(*inst)); + rgb_instance_t* inst = (rgb_instance_t*)calloc(1, sizeof(*inst)); inst->width = width; inst->height = height; return (f0r_instance_t)inst; } diff --git a/src/filter/alpha0ps/CMakeLists.txt b/src/filter/alpha0ps/CMakeLists.txt new file mode 100644 index 0000000..40eb1cc --- /dev/null +++ b/src/filter/alpha0ps/CMakeLists.txt @@ -0,0 +1,22 @@ +set (O_SOURCES alpha0ps.c) +set (G_SOURCES alphagrad.c) +set (S_SOURCES alphaspot.c) + +if (MSVC) + set_source_files_properties (alpha0ps.c alphagrad.c alphaspot.c PROPERTIES LANGUAGE CXX) + set (O_SOURCES ${O_SOURCES} ${FREI0R_DEF}) + set (G_SOURCES ${G_SOURCES} ${FREI0R_DEF}) + set (S_SOURCES ${S_SOURCES} ${FREI0R_DEF}) +endif (MSVC) + +add_library (alpha0ps MODULE ${O_SOURCES}) +add_library (alphagrad MODULE ${G_SOURCES}) +add_library (alphaspot MODULE ${S_SOURCES}) + +set_target_properties (alpha0ps PROPERTIES PREFIX "") +set_target_properties (alphagrad PROPERTIES PREFIX "") +set_target_properties (alphaspot PROPERTIES PREFIX "") + +install (TARGETS alpha0ps LIBRARY DESTINATION ${LIBDIR}) +install (TARGETS alphagrad LIBRARY DESTINATION ${LIBDIR}) +install (TARGETS alphaspot LIBRARY DESTINATION ${LIBDIR}) diff --git a/src/filter/alpha0ps/alpha0ps.c b/src/filter/alpha0ps/alpha0ps.c new file mode 100755 index 0000000..44407db --- /dev/null +++ b/src/filter/alpha0ps/alpha0ps.c @@ -0,0 +1,618 @@ +/* +alpha0ps.c + +This frei0r plugin is for display & manipulation of alpha channel +Version 0.1 jul 2010 + +Copyright (C) 2010 Marko Cebokli http://lea.hamradio.si/~s57uuu + + + 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. + +*/ + + +//compile: gcc -c -fPIC -Wall alpha0ps.c -o alpha0ps.o +//link: gcc -shared -o alpha0ps.so alpha0ps.o + +#include +#include +#include +#include +#include + + + +//---------------------------------------- +//struktura za instanco efekta +typedef struct +{ +int h; +int w; + +int disp; +int din; +int op; +float thr; +int sga; +int inv; + +float *falpha,*ab; +} inst; + + +//--------------------------------------------------- +//RGBA8888 little endian +void alphagray(inst *in, const uint32_t* inframe, uint32_t* outframe) +{ +uint32_t s; +int i; + +if (in->din==0) + for (i=0;iw*in->h;i++) + { + s=(outframe[i]&0xFF000000)>>24; + s=s+(s<<8)+(s<<16); + outframe[i]=(outframe[i]&0xFF000000)|s; + } +else + for (i=0;iw*in->h;i++) + { + s=(inframe[i]&0xFF000000)>>24; + s=s+(s<<8)+(s<<16); + outframe[i]=(outframe[i]&0xFF000000)+s; + } +} + +//--------------------------------------------------- +//RGBA8888 little endian +void grayred(inst *in, const uint32_t* inframe, uint32_t* outframe) +{ +int i; +uint32_t r,g,b,a,y,s; + +if (in->din==0) + for (i=0;iw*in->h;i++) + { + b=(inframe[i]&0x00FF0000)>>16; + g=(inframe[i]&0x0000FF00)>>8; + r=inframe[i]&0x000000FF; + a=(outframe[i]&0xFF000000)>>24; + y=(r>>2)+(g>>1)+(b>>2); //approx luma + y=64+(y>>1); + r=y+(a>>1); + if (r>255) r=255; + s=r+(y<<8)+(y<<16); + outframe[i]=(inframe[i]&0xFF000000)+s; + } +else + for (i=0;iw*in->h;i++) + { + b=(inframe[i]&0x00FF0000)>>16; + g=(inframe[i]&0x0000FF00)>>8; + r=inframe[i]&0x000000FF; + a=(inframe[i]&0xFF000000)>>24; + y=(r>>2)+(g>>1)+(b>>2); + y=64+(y>>1); + r=y+(a<<1); + if (r>255) r=255; + s=r+(y<<8)+(y<<16); + outframe[i]=(inframe[i]&0xFF000000)+s; + } +} + +//--------------------------------------------------- +void drawsel(inst *in, const uint32_t* inframe, uint32_t* outframe, int bg) +{ +int i; +uint32_t bk; +uint32_t r,g,b,a,s; + +switch (bg) + { + case 0: bk=0x00; break; + case 1: bk=0x80; break; + case 2: bk=0xFF; break; + default: break; + } + +if (in->din==0) + for (i=0;iw*in->h;i++) + { + if (bg==3) + { + if (((i/8)%2)^((i/8/in->w)%2)) + bk=0x64; + else + bk=0x9B; + } + b=(outframe[i]&0x00FF0000)>>16; + g=(outframe[i]&0x0000FF00)>>8; + r=outframe[i]&0x000000FF; + a=(outframe[i]&0xFF000000)>>24; + r=a*r+(255-a)*bk; + r=r>>8; + g=a*g+(255-a)*bk; + g=g>>8; + b=a*b+(255-a)*bk; + b=b>>8; + s=r+(g<<8)+(b<<16); + outframe[i]=(inframe[i]&0xFF000000)+s; + } +else + for (i=0;iw*in->h;i++) + { + if (bg==3) + { + if (((i/8)%2)^((i/8/in->w)%2)) + bk=0x64; + else + bk=0x9B; + } + b=(inframe[i]&0x00FF0000)>>16; + g=(inframe[i]&0x0000FF00)>>8; + r=inframe[i]&0x000000FF; + a=(inframe[i]&0xFF000000)>>24; + r=a*r+(255-a)*bk; + r=r>>8; + g=a*g+(255-a)*bk; + g=g>>8; + b=a*b+(255-a)*bk; + b=b>>8; + s=r+(g<<8)+(b<<16); + outframe[i]=(inframe[i]&0xFF000000)+s; + } +} + +//---------------------------------------------------------- +//shave based on average of 8 neighbors +void shave_alpha(float *sl, float *ab, int w, int h) +{ +int i,j,p; +float m; + +for (i=1;ial[p-1]) + ab[p]=al[p-1]; + if (al[p]>al[p+1]) + ab[p]=al[p+1]; + if (al[p]>al[p-w]) + ab[p]=al[p-w]; + if (al[p]>al[p+w]) + ab[p]=al[p+w]; + p++; + } + } + break; + case 1: + for (i=1;ial[p-1]) + m=al[p-1]; + if (al[p]>al[p+1]) + m=al[p+1]; + if (al[p]>al[p-w]) + m=al[p-w]; + if (al[p]>al[p+w]) + m=al[p+w]; + md=al[p]; + if (al[p]>al[p-1-w]) + md=al[p-1-w]; + if (al[p]>al[p+1-w]) + md=al[p+1-w]; + if (al[p]>al[p-1+w]) + md=al[p-1+w]; + if (al[p]>al[p+1+w]) + md=al[p+1+w]; + + ab[p]=0.4*al[p]+0.4*m+0.2*md; +// ab[p]=0.3*al[p]+0.4*m+0.3*md; + p++; + } + } + break; + } + + + +for (i=0;ithr) ? hi : lo; +} + +//----------------------------------------------------- +//stretch [0...1] to parameter range [min...max] linear +float map_value_forward(double v, float min, float max) +{ +return min+(max-min)*v; +} + +//----------------------------------------------------- +//collapse from parameter range [min...max] to [0...1] linear +double map_value_backward(float v, float min, float max) +{ +return (v-min)/(max-min); +} + +//*********************************************** +// OBVEZNE FREI0R FUNKCIJE + +//----------------------------------------------- +int f0r_init() +{ +return 1; +} + +//------------------------------------------------ +void f0r_deinit() +{ +} + +//----------------------------------------------- +void f0r_get_plugin_info(f0r_plugin_info_t* info) +{ + +info->name="alpha0ps"; +info->author="Marko Cebokli"; +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="Display and manipulation of the alpha channel"; +} + +//-------------------------------------------------- +void f0r_get_param_info(f0r_param_info_t* info, int param_index) +{ +switch(param_index) + { + case 0: + info->name = "Display"; + info->type = F0R_PARAM_DOUBLE; + info->explanation = ""; + break; + case 1: + info->name = "Display input alpha"; + info->type = F0R_PARAM_BOOL; + info->explanation = ""; + break; + case 2: + info->name = "Operation"; + info->type = F0R_PARAM_DOUBLE; + info->explanation = ""; + break; + case 3: + info->name = "Threshold"; + info->type = F0R_PARAM_DOUBLE; + info->explanation = ""; + break; + case 4: + info->name = "Shrink/grow amount"; + info->type = F0R_PARAM_DOUBLE; + info->explanation = ""; + break; + case 5: + info->name = "Invert"; + info->type = F0R_PARAM_BOOL; + info->explanation = ""; + break; + } +} + +//---------------------------------------------- +f0r_instance_t f0r_construct(unsigned int width, unsigned int height) +{ +inst *in; + +in=calloc(1,sizeof(inst)); +in->w=width; +in->h=height; + +in->disp=0; +in->din=0; +in->op=0; +in->thr=0.5; +in->sga=1; +in->inv=0; + +in->falpha=(float*)calloc(in->w*in->h,sizeof(float)); +in->ab=(float*)calloc(in->w*in->h,sizeof(float)); + +return (f0r_instance_t)in; +} + +//--------------------------------------------------- +void f0r_destruct(f0r_instance_t instance) +{ +inst *in; + +in=(inst*)instance; + +free(in->falpha); +free(in->ab); +free(instance); +} + +//----------------------------------------------------- +void f0r_set_param_value(f0r_instance_t instance, f0r_param_t parm, int param_index) +{ +inst *p; +double tmpf; +int tmpi,chg; + +p=(inst*)instance; + +chg=0; +switch(param_index) + { + case 0: + tmpi=map_value_forward(*((double*)parm), 0.0, 6.9999); + if (p->disp != tmpi) chg=1; + p->disp=tmpi; + break; + case 1: + tmpi=map_value_forward(*((double*)parm), 0.0, 1.0); //BOOL!! + if (p->din != tmpi) chg=1; + p->din=tmpi; + break; + case 2: + tmpi=map_value_forward(*((double*)parm), 0.0, 6.9999); + if (p->op != tmpi) chg=1; + p->op=tmpi; + break; + case 3: + tmpf=*(double*)parm; + if (tmpf!=p->thr) chg=1; + p->thr=tmpf; + break; + case 4: + tmpi=map_value_forward(*((double*)parm), 0.0, 2.9999); + if (p->sga != tmpi) chg=1; + p->sga=tmpi; + break; + case 5: + tmpi=map_value_forward(*((double*)parm), 0.0, 1.0); //BOOL!! + if (p->inv != tmpi) chg=1; + p->inv=tmpi; + break; + } + +if (chg==0) return; + +} + +//-------------------------------------------------- +void f0r_get_param_value(f0r_instance_t instance, f0r_param_t param, int param_index) +{ +inst *p; +double tmpf; +int tmpi; + +p=(inst*)instance; + +switch(param_index) + { + case 0: + *((double*)param)=map_value_backward(p->disp, 0.0, 6.9999); + break; + case 1: + *((double*)param)=map_value_backward(p->din, 0.0, 1.0);//BOOL!! + break; + case 2: + *((double*)param)=map_value_backward(p->op, 0.0, 6.9999); + break; + case 3: + *((double*)param)=p->thr; + break; + case 4: + *((double*)param)=map_value_backward(p->sga, 0.0, 2.9999); + break; + case 5: + *((double*)param)=map_value_backward(p->inv, 0.0, 1.0);//BOOL!! + break; + } +} + +//------------------------------------------------- +//RGBA8888 little endian +void f0r_update(f0r_instance_t instance, double time, const uint32_t* inframe, uint32_t* outframe) +{ +inst *in; +int i; + +assert(instance); +in=(inst*)instance; + +//printf("update, op=%d, inv=%d disp=%d\n",in->op,in->inv,in->disp); + +for (i=0;iw*in->h;i++) + in->falpha[i]=(inframe[i]&0xFF000000)>>24; + +switch (in->op) + { + case 0: break; + case 1: + for (i=0;isga;i++) + shave_alpha(in->falpha, in->ab, in->w, in->h); + break; + case 2: + for (i=0;isga;i++) + shrink_alpha(in->falpha, in->ab, in->w, in->h, 0); + break; + case 3: + for (i=0;isga;i++) + shrink_alpha(in->falpha, in->ab, in->w, in->h, 1); + break; + case 4: + for (i=0;isga;i++) + grow_alpha(in->falpha, in->ab, in->w, in->h, 0); + break; + case 5: + for (i=0;isga;i++) + grow_alpha(in->falpha, in->ab, in->w, in->h, 1); + break; + case 6: + threshold_alpha(in->falpha, in->w, in->h, 255.0*in->thr, 255.0, 0.0); + break; + default: + break; + } + +if (in->inv==1) + for (i=0;iw*in->h;i++) + in->falpha[i]=255.0-in->falpha[i]; + +for (i=0;iw*in->h;i++) + outframe[i] = (inframe[i]&0x00FFFFFF) | (((uint32_t)in->falpha[i])<<24); + +switch (in->disp) + { + case 0: + break; + case 1: + alphagray(in, inframe, outframe); + break; + case 2: + grayred(in, inframe, outframe); + break; + case 3: + drawsel(in, inframe, outframe, 0); + break; + case 4: + drawsel(in, inframe, outframe, 1); + break; + case 5: + drawsel(in, inframe, outframe, 2); + break; + case 6: + drawsel(in, inframe, outframe, 3); + break; + default: + break; + } + +} + +//********************************************************** \ No newline at end of file diff --git a/src/filter/alpha0ps/alphagrad.c b/src/filter/alpha0ps/alphagrad.c new file mode 100755 index 0000000..d717744 --- /dev/null +++ b/src/filter/alpha0ps/alphagrad.c @@ -0,0 +1,340 @@ +/* +alphagrad.c + +This frei0r plugin fills alpha channel with a gradient +Version 0.1 aug 2010 + +Copyright (C) 2010 Marko Cebokli http://lea.hamradio.si/~s57uuu + + + 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. + +*/ + + +//compile: gcc -c -fPIC -Wall alphagrad.c -o alphagrad.o +//link: gcc -shared -o alphagrad.so alphagrad.o + +#include +#include +#include +#include +#include + + + +//---------------------------------------- +//struktura za instanco efekta +typedef struct +{ +int h; +int w; + +float poz,wdt,tilt,min,max; +uint32_t *gr8; +int op; + +} inst; + +//----------------------------------------------------- +//RGBA8888 little endian +void fill_grad(inst *in) +{ +int i,j; +float st,ct,po,wd,d,a; + +st=sinf(in->tilt); +ct=cosf(in->tilt); +po=(-in->w/2.0+in->poz*in->w)*1.5; +wd=in->wdt*in->w; + +if (in->min==in->max) + { + for (i=0;ih*in->w;i++) + in->gr8[i]=(((uint32_t)(in->min*255.0))<<24)&0xFF000000; + return; + } + +for (i=0;ih;i++) + for (j=0;jw;j++) + { + d=(i-in->h/2)*ct+(j-in->w/2)*st-po; + if (fabsf(d)>wd/2.0) + { + if (d>0.0) + a=in->min; + else + a=in->max; + } + else + { + if (d>wd/2.0) d=wd/2.0; + a = in->min+(wd/2.0-d) / wd*(in->max-in->min); + } + a=255.0*a; + in->gr8[i*in->w+j] = (((uint32_t)a)<<24)&0xFF000000; + } +} + +//----------------------------------------------------- +//stretch [0...1] to parameter range [min...max] linear +float map_value_forward(double v, float min, float max) +{ +return min+(max-min)*v; +} + +//----------------------------------------------------- +//collapse from parameter range [min...max] to [0...1] linear +double map_value_backward(float v, float min, float max) +{ +return (v-min)/(max-min); +} + +//*********************************************** +// OBVEZNE FREI0R FUNKCIJE + +//----------------------------------------------- +int f0r_init() +{ +return 1; +} + +//------------------------------------------------ +void f0r_deinit() +{ +} + +//----------------------------------------------- +void f0r_get_plugin_info(f0r_plugin_info_t* info) +{ + +info->name="alphagrad"; +info->author="Marko Cebokli"; +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="Fills alpha channel with a gradient"; +} + +//-------------------------------------------------- +void f0r_get_param_info(f0r_param_info_t* info, int param_index) +{ +switch(param_index) + { + case 0: + info->name = "Position"; + info->type = F0R_PARAM_DOUBLE; + info->explanation = ""; + break; + case 1: + info->name = "Transition width"; + info->type = F0R_PARAM_BOOL; + info->explanation = ""; + break; + case 2: + info->name = "Tilt"; + info->type = F0R_PARAM_DOUBLE; + info->explanation = ""; + break; + case 3: + info->name = "Min"; + info->type = F0R_PARAM_DOUBLE; + info->explanation = ""; + break; + case 4: + info->name = "Max"; + info->type = F0R_PARAM_DOUBLE; + info->explanation = ""; + break; + case 5: + info->name = "Operation"; + info->type = F0R_PARAM_DOUBLE; + info->explanation = ""; + break; + } +} + +//---------------------------------------------- +f0r_instance_t f0r_construct(unsigned int width, unsigned int height) +{ +inst *in; + +in=calloc(1,sizeof(inst)); +in->w=width; +in->h=height; + +in->poz=0.5; +in->wdt=0.5; +in->tilt=0.0; +in->min=0.0; +in->max=1.0; +in->op=0; + +in->gr8 = (uint32_t*)calloc(in->w*in->h, sizeof(uint32_t)); + +fill_grad(in); + +return (f0r_instance_t)in; +} + +//--------------------------------------------------- +void f0r_destruct(f0r_instance_t instance) +{ +inst *in; + +in=(inst*)instance; + +free(in->gr8); +free(instance); +} + +//----------------------------------------------------- +void f0r_set_param_value(f0r_instance_t instance, f0r_param_t parm, int param_index) +{ +inst *p; +double tmpf; +int tmpi,chg; + +p=(inst*)instance; + +chg=0; +switch(param_index) + { + case 0: + tmpf=*((double*)parm); + if (tmpf!=p->poz) chg=1; + p->poz=tmpf; + break; + case 1: + tmpf=*((double*)parm); + if (tmpf!=p->wdt) chg=1; + p->wdt=tmpf; + break; + case 2: + tmpf=map_value_forward(*((double*)parm), -3.15, 3.15); + if (tmpf!=p->tilt) chg=1; + p->tilt=tmpf; + break; + case 3: + tmpf=*((double*)parm); + if (tmpf!=p->min) chg=1; + p->min=tmpf; + break; + case 4: + tmpf=*((double*)parm); + if (tmpf!=p->max) chg=1; + p->max=tmpf; + break; + case 5: + tmpi=map_value_forward(*((double*)parm), 0.0, 4.9999); + if (p->op != tmpi) chg=1; + p->op=tmpi; + break; + } + +if (chg==0) return; + +fill_grad(p); +} + +//-------------------------------------------------- +void f0r_get_param_value(f0r_instance_t instance, f0r_param_t param, int param_index) +{ +inst *p; +double tmpf; +int tmpi; + +p=(inst*)instance; + +switch(param_index) + { + case 0: + *((double*)param)=p->poz; + break; + case 1: + *((double*)param)=p->wdt; + break; + case 2: + *((double*)param)=map_value_backward(p->tilt, -3.15, 3.15); + break; + case 3: + *((double*)param)=p->min; + break; + case 4: + *((double*)param)=p->max; + break; + case 5: + *((double*)param)=map_value_backward(p->op, 0.0, 4.9999); + break; + } +} + +//------------------------------------------------- +//RGBA8888 little endian +void f0r_update(f0r_instance_t instance, double time, const uint32_t* inframe, uint32_t* outframe) +{ +inst *in; +int i,j; +float a,d,st,ct; +float po,wd; +uint32_t t; + +assert(instance); +in=(inst*)instance; + +switch (in->op) + { + case 0: //write on clear + for (i=0;ih*in->w;i++) + outframe[i] = (inframe[i]&0x00FFFFFF) | in->gr8[i]; + break; + case 1: //max + for (i=0;ih*in->w;i++) + { + t=((inframe[i]&0xFF000000)>in->gr8[i]) ? inframe[i]&0xFF000000 : in->gr8[i]; + outframe[i] = (inframe[i]&0x00FFFFFF) | t; + } + break; + case 2: //min + for (i=0;ih*in->w;i++) + { + t=((inframe[i]&0xFF000000)gr8[i]) ? inframe[i]&0xFF000000 : in->gr8[i]; + outframe[i] = (inframe[i]&0x00FFFFFF) | t; + } + break; + case 3: //add + for (i=0;ih*in->w;i++) + { + t=((inframe[i]&0xFF000000)>>1)+(in->gr8[i]>>1); + t = (t>0x7F800000) ? 0xFF000000 : t<<1; + outframe[i] = (inframe[i]&0x00FFFFFF) | t; + } + break; + case 4: //subtract + for (i=0;ih*in->w;i++) + { + t= ((inframe[i]&0xFF000000)>in->gr8[i]) ? (inframe[i]&0xFF000000)-in->gr8[i] : 0; + outframe[i] = (inframe[i]&0x00FFFFFF) | t; + } + break; + default: + break; + } +} + +//********************************************************** \ No newline at end of file diff --git a/src/filter/alpha0ps/alphaspot.c b/src/filter/alpha0ps/alphaspot.c new file mode 100755 index 0000000..c26ebd5 --- /dev/null +++ b/src/filter/alpha0ps/alphaspot.c @@ -0,0 +1,541 @@ +/* +alphaspot.c + +This frei0r plugin draws simple shapes into the alpha channel +Version 0.1 aug 2010 + +Copyright (C) 2010 Marko Cebokli http://lea.hamradio.si/~s57uuu + + + 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. + +*/ + + +//compile: gcc -c -fPIC -Wall alphaspot.c -o alphaspot.o +//link: gcc -shared -o alphaspot.so alphaspot.o + +//#include +#include +#include +#include +#include + + + +//---------------------------------------- +//struktura za instanco efekta +typedef struct +{ +int h; +int w; + +float pozx,pozy,sizx,sizy,wdt,tilt,min,max; +int shp,op; + +uint32_t *gr8; + +} inst; + + +//---------------------------------------------------------- +//general (rotated) rectangle with soft border +void gen_rec_s(uint32_t* sl, int w, int h, float siz1, float siz2, float tilt, float pozx, float pozy, float min, float max, float wb) +{ +int i,j; +float d1,d2,d,db,st,ct,g,is1,is2; + +if ((siz1==0.0)||(siz2==0.0)) return; +st=sinf(tilt); +ct=cosf(tilt); +is1=1.0/siz1; +is2=1.0/siz2; + +for (i=0;i1.0) + g=min; + else + { + if (db<=1.004-wb) + g=max; + else + { + g=min+(1.0-wb-db)/wb*(max-min); + } + } + g=g*255.0; + sl[i*w+j] = (((uint32_t)g)<<24)&0xFF000000; + } +} + +//---------------------------------------------------------- +//general (rotated) ellipse with soft border +void gen_eli_s(uint32_t* sl, int w, int h, float siz1, float siz2, float tilt, float pozx, float pozy, float min, float max, float wb) +{ +int i,j; +float d1,d2,d,db,st,ct,is1,is2,g,wbb; + +if ((siz1==0.0)||(siz2==0.0)) return; +st=sinf(tilt); +ct=cosf(tilt); +is1=1.0/siz1; +is2=1.0/siz2; +wbb=wb; + +for (i=0;i1.0) + g=min; + else + { + if (db<=1.004-wb) + g=max; + else + { + g=min+(1.0-wb-db)/wb*(max-min); + } + } + g=g*255.0; + sl[i*w+j] = (((uint32_t)g)<<24)&0xFF000000; + } +} + +//---------------------------------------------------------- +//general (rotated) triangle with soft border +void gen_tri_s(uint32_t* sl, int w, int h, float siz1, float siz2, float tilt, float pozx, float pozy, float min, float max, float wb) +{ +int i,j; +float d1,d2,d3,d4,d,st,ct,is1,is2,k5,lim,db,g; + +if ((siz1==0.0)||(siz2==0.0)) return; +st=sinf(tilt); +ct=cosf(tilt); +is1=1.0/siz1; +is2=1.0/siz2; +k5=1.0/sqrtf(5.0); +lim=0.82; + +for (i=0;id) d=d3; + if (d4>d) d=d4; + db=d; + + if (fabsf(d)>lim) + g=min; + else + { + if (db<=1.004*lim-wb) + g=max; + else + { + g=min+(lim-wb-db)/wb*(max-min); + } + } + g=g*255.0; + sl[i*w+j] = (((uint32_t)g)<<24)&0xFF000000; + } +} + +//---------------------------------------------------------- +//general (rotated) diamond shape with soft border +void gen_dia_s(uint32_t* sl, int w, int h, float siz1, float siz2, float tilt, float pozx, float pozy, float min, float max, float wb) +{ +int i,j; +float d1,d2,d,db,st,ct,is1,is2,g; + +if ((siz1==0.0)||(siz2==0.0)) return; +st=sinf(tilt); +ct=cosf(tilt); +is1=1.0/siz1; +is2=1.0/siz2; + +for (i=0;i1.0) + g=min; + else + { + if (db<=1.004-wb) + g=max; + else + { + g=min+(1.0-wb-db)/wb*(max-min); + } + } + g=g*255.0; + sl[i*w+j] = (((uint32_t)g)<<24)&0xFF000000; + } +} + +//----------------------------------------------------- +void draw(inst *in) +{ +switch (in->shp) + { + case 0: + gen_rec_s(in->gr8, in->w, in->h, in->sizx*in->w, in->sizy*in->h, in->tilt, in->pozx*in->w, in->pozy*in->h, in->min, in->max, in->wdt); + break; + case 1: + gen_eli_s(in->gr8, in->w, in->h, in->sizx*in->w, in->sizy*in->h, in->tilt, in->pozx*in->w, in->pozy*in->h, in->min, in->max, in->wdt); + break; + case 2: + gen_tri_s(in->gr8, in->w, in->h, in->sizx*in->w, in->sizy*in->h, in->tilt, in->pozx*in->w, in->pozy*in->h, in->min, in->max, in->wdt); + break; + case 3: + gen_dia_s(in->gr8, in->w, in->h, in->sizx*in->w, in->sizy*in->h, in->tilt, in->pozx*in->w, in->pozy*in->h, in->min, in->max, in->wdt); + break; + default: + break; + } +} + +//----------------------------------------------------- +//stretch [0...1] to parameter range [min...max] linear +float map_value_forward(double v, float min, float max) +{ +return min+(max-min)*v; +} + +//----------------------------------------------------- +//collapse from parameter range [min...max] to [0...1] linear +double map_value_backward(float v, float min, float max) +{ +return (v-min)/(max-min); +} + +//*********************************************** +// OBVEZNE FREI0R FUNKCIJE + +//----------------------------------------------- +int f0r_init() +{ +return 1; +} + +//------------------------------------------------ +void f0r_deinit() +{ +} + +//----------------------------------------------- +void f0r_get_plugin_info(f0r_plugin_info_t* info) +{ + +info->name="alphaspot"; +info->author="Marko Cebokli"; +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=10; +info->explanation="Draws simple shapes into the alpha channel"; +} + +//-------------------------------------------------- +void f0r_get_param_info(f0r_param_info_t* info, int param_index) +{ +switch(param_index) + { + case 0: + info->name = "Shape"; + info->type = F0R_PARAM_DOUBLE; + info->explanation = ""; + break; + case 1: + info->name = "Position X"; + info->type = F0R_PARAM_DOUBLE; + info->explanation = ""; + break; + case 2: + info->name = "Position Y"; + info->type = F0R_PARAM_DOUBLE; + info->explanation = ""; + break; + case 3: + info->name = "Size X"; + info->type = F0R_PARAM_DOUBLE; + info->explanation = ""; + break; + case 4: + info->name = "Size Y"; + info->type = F0R_PARAM_DOUBLE; + info->explanation = ""; + break; + case 5: + info->name = "Tilt"; + info->type = F0R_PARAM_DOUBLE; + info->explanation = ""; + break; + case 6: + info->name = "Transition width"; + info->type = F0R_PARAM_DOUBLE; + info->explanation = ""; + break; + case 7: + info->name = "Min"; + info->type = F0R_PARAM_DOUBLE; + info->explanation = ""; + break; + case 8: + info->name = "Max"; + info->type = F0R_PARAM_DOUBLE; + info->explanation = ""; + break; + case 9: + info->name = "Operation"; + info->type = F0R_PARAM_DOUBLE; + info->explanation = ""; + break; + } +} + +//---------------------------------------------- +f0r_instance_t f0r_construct(unsigned int width, unsigned int height) +{ +inst *in; + +in=calloc(1,sizeof(inst)); +in->w=width; +in->h=height; + +in->shp=0; +in->pozx=0.5; +in->pozy=0.5; +in->sizx=0.1; +in->sizy=0.1; +in->wdt=0.2; +in->tilt=0.0; +in->min=0.0; +in->max=1.0; +in->op=0; + +in->gr8 = (uint32_t*)calloc(in->w*in->h, sizeof(uint32_t)); + +draw(in); + +return (f0r_instance_t)in; +} + +//--------------------------------------------------- +void f0r_destruct(f0r_instance_t instance) +{ +inst *in; + +in=(inst*)instance; + +free(in->gr8); +free(instance); +} + +//----------------------------------------------------- +void f0r_set_param_value(f0r_instance_t instance, f0r_param_t parm, int param_index) +{ +inst *p; +double tmpf; +int tmpi,chg; + +p=(inst*)instance; + +chg=0; +switch(param_index) + { + case 0: + tmpi=map_value_forward(*((double*)parm), 0.0, 3.9999); + if (p->shp != tmpi) chg=1; + p->shp=tmpi; + break; + case 1: + tmpf=*(double*)parm; + if (tmpf!=p->pozx) chg=1; + p->pozx=tmpf; + break; + case 2: + tmpf=*(double*)parm; + if (tmpf!=p->pozy) chg=1; + p->pozy=tmpf; + break; + case 3: + tmpf=*(double*)parm; + if (tmpf!=p->sizx) chg=1; + p->sizx=tmpf; + break; + case 4: + tmpf=*(double*)parm; + if (tmpf!=p->sizy) chg=1; + p->sizy=tmpf; + break; + case 5: + tmpf=map_value_forward(*((double*)parm), -3.15, 3.15); + if (tmpf!=p->tilt) chg=1; + p->tilt=tmpf; + break; + case 6: + tmpf=*(double*)parm; + if (tmpf!=p->wdt) chg=1; + p->wdt=tmpf; + break; + case 7: + tmpf=*(double*)parm; + if (tmpf!=p->min) chg=1; + p->min=tmpf; + break; + case 8: + tmpf=*(double*)parm; + if (tmpf!=p->max) chg=1; + p->max=tmpf; + break; + case 9: + tmpi=map_value_forward(*((double*)parm), 0.0, 4.9999); + if (p->op != tmpi) chg=1; + p->op=tmpi; + break; + } + +if (chg==0) return; + +draw(p); + +} + +//-------------------------------------------------- +void f0r_get_param_value(f0r_instance_t instance, f0r_param_t param, int param_index) +{ +inst *p; +double tmpf; +int tmpi; + +p=(inst*)instance; + +switch(param_index) + { + case 0: + *((double*)param)=map_value_backward(p->shp, 0.0, 3.9999); + break; + case 1: + *((double*)param)=p->pozx; + break; + case 2: + *((double*)param)=p->pozy; + break; + case 3: + *((double*)param)=p->sizx; + break; + case 4: + *((double*)param)=p->sizy; + break; + case 5: + *((double*)param)=map_value_backward(p->tilt, -3.15, 3.15); + break; + case 6: + *((double*)param)=p->wdt; + break; + case 7: + *((double*)param)=p->min; + break; + case 8: + *((double*)param)=p->max; + break; + case 9: + *((double*)param)=map_value_backward(p->op, 0.0, 4.9999); + break; + } +} + +//------------------------------------------------- +void f0r_update(f0r_instance_t instance, double time, const uint32_t* inframe, uint32_t* outframe) +{ +inst *in; +int i,j; +float a,d,st,ct; +uint32_t t; + +assert(instance); +in=(inst*)instance; + +switch (in->op) + { + case 0: //write on clear + for (i=0;ih*in->w;i++) + outframe[i] = (inframe[i]&0x00FFFFFF) | in->gr8[i]; + break; + case 1: //max + for (i=0;ih*in->w;i++) + { + t=((inframe[i]&0xFF000000)>in->gr8[i]) ? inframe[i]&0xFF000000 : in->gr8[i]; + outframe[i] = (inframe[i]&0x00FFFFFF) | t; + } + break; + case 2: //min + for (i=0;ih*in->w;i++) + { + t=((inframe[i]&0xFF000000)gr8[i]) ? inframe[i]&0xFF000000 : in->gr8[i]; + outframe[i] = (inframe[i]&0x00FFFFFF) | t; + } + break; + case 3: //add + for (i=0;ih*in->w;i++) + { + t=((inframe[i]&0xFF000000)>>1)+(in->gr8[i]>>1); + t = (t>0x7F800000) ? 0xFF000000 : t<<1; + outframe[i] = (inframe[i]&0x00FFFFFF) | t; + } + break; + case 4: //subtract + for (i=0;ih*in->w;i++) + { + t= ((inframe[i]&0xFF000000)>in->gr8[i]) ? (inframe[i]&0xFF000000)-in->gr8[i] : 0; + outframe[i] = (inframe[i]&0x00FFFFFF) | t; + } + break; + default: + break; + } +} + +//********************************************************** \ No newline at end of file diff --git a/src/filter/alpha0ps/readme b/src/filter/alpha0ps/readme new file mode 100755 index 0000000..3c417e5 --- /dev/null +++ b/src/filter/alpha0ps/readme @@ -0,0 +1,146 @@ +alpha0ps + +These plugins are for alpha channel manipulation + + +Included are the following plugins: + +alpha0ps: shrink,grow,threshold and visualize alpha +alphagrad: fill alpha channel with a gradient +alphaspot: draw simple shapes into the alpha channel + + +Written by Marko Cebokli, aug 2010, and released under GNU GPL + + +RELEASE NOTES + +** aug 2010 +Version 0.1 +"pre-alpha" (throw it out and see what happens... :-) + + + +ALPHAOPS: + +This plugin can shrink, grow, threshold and invert the alpha +channel. It is mainly intended to improve keying edges. +It can also display the alpha channel in various ways, to enable +quick assessment of the effect. +It is cascadable, so for example one can do a soft shrink first +and then threshold, which gives a slightly different result than +a hard shrink. + +Parameters: + +Display: +what to display. Choices are seven: Image, Alpha as gray, Gray+red, +Selection on black, Selection on gray, Selection on white and +Selection on checkers. +This is intended for monitoring during adjustment mostly. After +adjusting the parameters, it should be left on "Image", which lets +the unchanged input image through - this plugin is intended to +change only the alpha channel... + +Display input alpha: +use input alpha for the display function above. (Check what alpha +we are getting on the input) + +Operation: +select the operation to be done on the alpha channel. Currently +there are six choices: NO OP, Shave, Shrink hard, Shrink soft, Grow +hard, Grow soft, Threshold. +"Shave" tris to remove the "hairy" stuff, and also shrinks the selecton +a bit. +The "hard" operations introduce no new values to the alpha channel, +so if you have a "hard" key (only 0 and 255) it will stay that way. +The "soft" operations will introduce interpolated values, making +the edge softer. +NOTE: the shave, shrink and grow operations are quite slow, because they +do many conditional operations on each pixel. + +Threshold: +this is only used for the Threshold operation. + +Shrink/grow amount: +how far the shrinking/growing will extend. + +Invert: +Inverts the input alpha channel, transparent will become opaque +and vice versa. + + + + +ALPHAGRAD: + +This is a very simple plugin, that just fills the alpha channel +with a specified gradient. +It's purpose is to enable, together with alpha controlled color +manipulation, the use of graduated filters, for example like the +Cokin series #121, #122, #124, #150 and similar. +It is cascadable, allowing work with pre-existing alpha. + +Parameters: + +Position: +shift in the direction of gradient, for positioning the +gradient. + +Transition width: +Width of the gradient slope between min and max values. + +Tilt: +rotation of the gradient direction. + +Min: +minimum value of the alpha channel, "before" the gradient. + +Max: +maximum value of the alpha channel, "after" the gradient. + +Operation: +slects between "Draw on clear", "Min", "Max", "Add" and "Subtract". +The last four options combine the drawn gradient with pre-existing +alpha. + + + + +ALPHASPOT + +This is a simple plugin, that can draw a few simple shapes into +the alpha channel. It is intended for "in" and "out" masks in +keying, non-rectangular picture-in-picture, spotlight effects etc. +It is cascadable, allowing work with pre-existing alpha and +building of more complex shapes. + +Parameters: + +Shape: +selects between four shapes: rectangle, round, triangle and +diamond. + +Pozx, pozy: +position of the drawn shape. + +Sizx, sizy: +size of the drawn shape. + +Tilt: +rotation of the drawn shape. + +Transition width: +width of the soft border. + +Min: +value of alpha outside of the shape. + +Max: +value of alpha inside of the shape. + +Operation: +slects between Draw on clear, Min, Max, Add, Subtract. The last +four options combine the drawn shape with pre-existing alpha. + + diff --git a/src/filter/balanc0r/CMakeLists.txt b/src/filter/balanc0r/CMakeLists.txt new file mode 100644 index 0000000..3036124 --- /dev/null +++ b/src/filter/balanc0r/CMakeLists.txt @@ -0,0 +1,12 @@ +set (SOURCES balanc0r.c) +set (TARGET balanc0r) + +if (MSVC) + set_source_files_properties (balanc0r.c PROPERTIES LANGUAGE CXX) + set (SOURCES ${SOURCES} ${FREI0R_DEF}) +endif (MSVC) + +add_library (${TARGET} MODULE ${SOURCES}) +set_target_properties (${TARGET} PROPERTIES PREFIX "") + +install (TARGETS ${TARGET} LIBRARY DESTINATION ${LIBDIR}) diff --git a/src/filter/balanc0r/balanc0r.c b/src/filter/balanc0r/balanc0r.c index 449b214..f03fdeb 100644 --- a/src/filter/balanc0r/balanc0r.c +++ b/src/filter/balanc0r/balanc0r.c @@ -586,7 +586,7 @@ f0r_instance_t f0r_construct(unsigned int width, unsigned int height) { - balanc0r_instance_t* inst = calloc(1, sizeof(*inst)); + balanc0r_instance_t* inst = (balanc0r_instance_t*)calloc(1, sizeof(*inst)); inst->width = width; inst->height = height; inst->color.r = 1.0; inst->color.g = 1.0; @@ -625,7 +625,7 @@ balanc0r_instance_t* inst = (balanc0r_instance_t*)instance; switch(param_index) { - case 0: + case 0: { inst->color = *((f0r_param_color_t*)param); int l = 0; int r = sizeof(bbWB)/sizeof(float)/3; @@ -651,6 +651,7 @@ } setRGBmult(inst); break; + } case 1: { double g = *((double*)param); diff --git a/src/filter/baltan/CMakeLists.txt b/src/filter/baltan/CMakeLists.txt new file mode 100644 index 0000000..8d6ad5e --- /dev/null +++ b/src/filter/baltan/CMakeLists.txt @@ -0,0 +1,11 @@ +set (SOURCES baltan.cpp) +set (TARGET baltan) + +if (MSVC) + set (SOURCES ${SOURCES} ${FREI0R_DEF}) +endif (MSVC) + +add_library (${TARGET} MODULE ${SOURCES}) +set_target_properties (${TARGET} PROPERTIES PREFIX "") + +install (TARGETS ${TARGET} LIBRARY DESTINATION ${LIBDIR}) diff --git a/src/filter/baltan/baltan.cpp b/src/filter/baltan/baltan.cpp index 8d3b473..0ac44c4 100644 --- a/src/filter/baltan/baltan.cpp +++ b/src/filter/baltan/baltan.cpp @@ -70,7 +70,7 @@ pixels = geo.w*geo.h; planebuf = (uint32_t*)malloc(geo.size*PLANES); - bzero(planebuf, geo.size*PLANES); + memset(planebuf, 0, geo.size*PLANES); for(i=0;i>2; + planetable[plane][i] = (src[i] & 0xfcfcfc)>>2; cf = plane & (STRIDE-1); for(i=0; i>2; } + plane++; plane = plane & (PLANES-1); diff --git a/src/filter/bluescreen0r/CMakeLists.txt b/src/filter/bluescreen0r/CMakeLists.txt new file mode 100644 index 0000000..ef56d1f --- /dev/null +++ b/src/filter/bluescreen0r/CMakeLists.txt @@ -0,0 +1,11 @@ +set (SOURCES bluescreen0r.cpp) +set (TARGET bluescreen0r) + +if (MSVC) + set (SOURCES ${SOURCES} ${FREI0R_DEF}) +endif (MSVC) + +add_library (${TARGET} MODULE ${SOURCES}) +set_target_properties (${TARGET} PROPERTIES PREFIX "") + +install (TARGETS ${TARGET} LIBRARY DESTINATION ${LIBDIR}) diff --git a/src/filter/brightness/CMakeLists.txt b/src/filter/brightness/CMakeLists.txt new file mode 100644 index 0000000..cacfcaa --- /dev/null +++ b/src/filter/brightness/CMakeLists.txt @@ -0,0 +1,12 @@ +set (SOURCES brightness.c) +set (TARGET brightness) + +if (MSVC) + set_source_files_properties (brightness.c PROPERTIES LANGUAGE CXX) + set (SOURCES ${SOURCES} ${FREI0R_DEF}) +endif (MSVC) + +add_library (${TARGET} MODULE ${SOURCES}) +set_target_properties (${TARGET} PROPERTIES PREFIX "") + +install (TARGETS ${TARGET} LIBRARY DESTINATION ${LIBDIR}) diff --git a/src/filter/brightness/brightness.c b/src/filter/brightness/brightness.c index d7b19b7..e0f867c 100644 --- a/src/filter/brightness/brightness.c +++ b/src/filter/brightness/brightness.c @@ -85,7 +85,7 @@ f0r_instance_t f0r_construct(unsigned int width, unsigned int height) { - brightness_instance_t* inst = calloc(1, sizeof(*inst)); + brightness_instance_t* inst = (brightness_instance_t*)calloc(1, sizeof(*inst)); inst->width = width; inst->height = height; /* init look-up-table */ update_lut(inst); diff --git a/src/filter/bw0r/CMakeLists.txt b/src/filter/bw0r/CMakeLists.txt new file mode 100644 index 0000000..7ad040e --- /dev/null +++ b/src/filter/bw0r/CMakeLists.txt @@ -0,0 +1,12 @@ +set (SOURCES bw0r.c) +set (TARGET bw0r) + +if (MSVC) + set_source_files_properties (bw0r.c PROPERTIES LANGUAGE CXX) + set (SOURCES ${SOURCES} ${FREI0R_DEF}) +endif (MSVC) + +add_library (${TARGET} MODULE ${SOURCES}) +set_target_properties (${TARGET} PROPERTIES PREFIX "") + +install (TARGETS ${TARGET} LIBRARY DESTINATION ${LIBDIR}) diff --git a/src/filter/bw0r/bw0r.c b/src/filter/bw0r/bw0r.c index 70d3742..d315151 100644 --- a/src/filter/bw0r/bw0r.c +++ b/src/filter/bw0r/bw0r.c @@ -36,7 +36,7 @@ f0r_instance_t f0r_construct(unsigned int width, unsigned int height) { - blackwhite_instance_t* inst = calloc(1, sizeof(*inst)); + blackwhite_instance_t* inst = (blackwhite_instance_t*)calloc(1, sizeof(*inst)); inst->width = width; inst->height = height; return (f0r_instance_t)inst; } diff --git a/src/filter/c0rners/CMakeLists.txt b/src/filter/c0rners/CMakeLists.txt new file mode 100644 index 0000000..fba422d --- /dev/null +++ b/src/filter/c0rners/CMakeLists.txt @@ -0,0 +1,12 @@ +set (SOURCES c0rners.c interp.h) +set (TARGET c0rners) + +if (MSVC) + set_source_files_properties (c0rners.c PROPERTIES LANGUAGE CXX) + set (SOURCES ${SOURCES} ${FREI0R_DEF}) +endif (MSVC) + +add_library (${TARGET} MODULE ${SOURCES}) +set_target_properties (${TARGET} PROPERTIES PREFIX "") + +install (TARGETS ${TARGET} LIBRARY DESTINATION ${LIBDIR}) diff --git a/src/filter/c0rners/README b/src/filter/c0rners/README new file mode 100644 index 0000000..a686b54 --- /dev/null +++ b/src/filter/c0rners/README @@ -0,0 +1,123 @@ +"c0rners" is an attempt to introduce a new, more intuitive way (at least in some +cases) of specifying geometrical image transforms. +"c0rners" is a Frei0r plugin. + + +Written by Marko Cebokli, apr 2010 and released under GNU GPL + + +RELEASE NOTES + +apr 2010 +Version 0.1 "pre-alpha" (throw it out and see what happens... :-) + + +TODO: + +- alpha feathering of caustics +- use gavl for remapping +- make piece between Little and Big Indians + + +SOME NOTES ABOUT THE PLUGIN + +"c0rners" is a rather universal "geometry engine". It can do even more things +than the usual affine matrix transform. + +It can do: + +-shifts +-flips +-arbitrary scalings and anamorphs (anisotropic scaling) +-arbitrary angle rotations around arbitrary points +-perspective correction in any direction +-shears, distorts...etc... + +...and arbitrary combinations of these, in a single, time and quality preserving +step! + + +Its advantages are best explained in an example: + +Say, you have video1 which is a wideangle shot of a room with a picture frame on +a side wall. You want video2 to display as if it was played inside that frame. + +Now, with "classic" tools, you would need to do: +1 - scale down +2 - sideways perspective distort +3 - shift to the right place +4 - and maybe some rotation + +Tweaking all of the parameters of these transforms, to get the desired size, +shape and position of video2, would be quite a chore. + +With c0rners, you simply pull the corners of video2 to where you want them, and +it will do all of the above in a single step! + +My goal while programming it, was to make it survive ANY crazy combination of +corner positions the user might throw at it. +I'm not sure if I achieved that, but remember that if all corners are outside of +the frame to one side, or if you specify a zero area degenerate quadrangle, +there will be no output! This is not a bug - it is as should be. +If you happen onto a set of parameters that will crash it, please document +carefully the parameter values and video format, and let me know about it. + + + +PARAMETERS + +1. Corner positions + +For now, the user interface is not as nice as I would like... While the Frei0r +specification includes a "position" type parameter, it seems that host apps like +Kdenlive and Openmovieeditor currently do not pass such parameters to Frei0r +plugins. +Therefore, I just used two sliders (x,y) for each of the four corners. +This is rather clumsy, so as soon as I will figure out a better way, I will +change this. + +Corner 1 is the top left of the original picture, and the others follow +clockwise. + +Since it should be possible to pull the corners outside of the picture area, the +range of the parameters goes one picture width to the left and right, and one +picture height above and under the original picture. +Therefore, in the unscaled Frei0r 0...1 parameter range, the top left corner is +x=0.333... y=0.333..., the top right x=0.666... y=0.333... and so on. +The supplied Kdenlive effect description XML file should change this range to +0...3000, so that the original image lies between 1000 and 2000, with the upper +left corner x=1000, y=1000, the upper right corner x=2000, y=1000 and so on. It +should also set the defaults so that the undistorted input picture is displayed. +If you have no image, check that the corners specify a nonzero area at least +partly overlaping the output window. + +2. Stretch, x and y + +These allow additional exaggeration of the perspective, when simulating a tilted +plane. The default (undistorted) position is in the middle. I have included a +boolean checkbox parameter to disable this (default). These can also be used +alone (without moving the corners), to do funny things, like stretch people's +legs. + +3. Interpolation + +This allows one to choose a tradeoff between speed and quality. Low values = +high speed with low quality. +Default is bilinear, which is reasonably fast and should give enough quality in +most cases. + +4. Transparent background + +This fills the area outside of the transformed image with a "transparent" alpha +value. +This can be used to make a composite image - for example, in Kdenlive, use the +"Composite" transition with this. +Making the corner positions keyframable would allow one to create those "fly +away" transitions that were once so popular. + +5. Alpha Feather + +This can be used to make the transition between transparent and opaque gradual. +It should specify the width of the transition in pixels, 0 to 100. +For now it does not feather the "caustics" (those curved lines in the concave +and crossed settings, which are not edges of the input picture). diff --git a/src/filter/c0rners/c0rners.c b/src/filter/c0rners/c0rners.c new file mode 100644 index 0000000..c6f85bb --- /dev/null +++ b/src/filter/c0rners/c0rners.c @@ -0,0 +1,1011 @@ +/*c0rners.c + four corners geometry engine + + + * Copyright (C) 2010 Marko Cebokli http://lea.hamradio.si/~s57uuu + * 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. + */ + +//compile: gcc -Wall -std=c99 -c -fPIC c0rners.c -o c0rners.o +//link: gcc -shared -lm -o c0rners.so c0rners.o + +#include +#include +#include +#include +#include +#include "frei0r_math.h" +#include "interp.h" + +//---------------------------------------- +//structure for Frei0r instance +typedef struct +{ + int h; + int w; + float x1; + float y1; + float x2; + float y2; + float x3; + float y3; + float x4; + float y4; + int stretchON; + float stretchx; + float stretchy; + int intp; + int transb; + float feath; + int op; + + interpp interp; + float *map; + unsigned char *amap; + int mapIsDirty; +} inst; + + +//2D point +typedef struct //tocka v ravnini +{ + float x; + float y; +} tocka2; + +//2D line +typedef struct //premica v ravnini +{ + float a; + float b; + float c; + float sa; //se normalna oblika + float ca; + float p; +} premica2; + +//------------------------------------------------------ +//premica skozi dve tocki v ravnini (2D) +//izracuna a,b,c za enacbo premice: ax + by + c = 0 +//ps se sin a, cos a in p za normalno obliko +//vrne: (return value) +//-10 ce ni mozno dolociti p. (tocki sovpadata) coincident points +//0 splosna p. general case +//+1 navpicna p. x v *a vertical +//+2 vodoravna p. y v *b horizontal +//a line through two points +int premica2d(tocka2 t1, tocka2 t2, premica2 *p) +{ + float dx,dy,m; + + dx=t2.x-t1.x; + dy=t2.y-t1.y; + if (dx==0.0) //navpicna + { + if (dy==0.0) return -10; + p->a=1.0; + p->b=0.0; + p->c=-t1.x; + m=1.0/p->a; if (p->c>=0) m=-m; + p->sa=m; + p->ca=0.0; + p->p=m*p->c; + return 1; + } + + if (dy==0.0) //vodoravna + { + if (dx==0.0) return -10; + p->a=0.0; + p->b=1.0; + p->c=-t1.y; + m=1.0/p->b; if (p->c>=0) m=-m; + p->sa=0.0; + p->ca=m; + p->p=m*p->c; + return 2; + } + + //posevna + p->a=1.0/dx; + p->b=-1.0/dy; + p->c=t1.y/dy-t1.x/dx; + m=1.0/sqrtf(p->a*p->a+p->b*p->b); if (p->c>=0) m=-m; + p->sa=m*p->a; + p->ca=m*p->b; + p->p=m*p->c; + return 0; +} + +//----------------------------------------------------- +//razdalja tocke od premice (za alpha feather) +//distance between a point and a line +//needed only for alpha feathering +float razd_t_p(tocka2 t, premica2 p) +{ + float r; + + r = t.x*p.ca + t.y*p.sa + p.p; + + return r; +} + +//----------------------------------------------------- +//presecisce dveh premic v ravnini (2D) +//vrne: +//0 ce je vse OK +//-1 ce sta premici vzporedni +//intersection of two lines +int presecisce2(premica2 p1, premica2 p2, tocka2 *t) +{ + float d1,d2,d3; + + d1=p1.a*p2.b-p2.a*p1.b; + if (d1==0.0) //vzporedni + { + return -1; + } + d2=p1.b*p2.c-p2.b*p1.c; + d3=p1.c*p2.a-p2.c*p1.a; + t->x=d2/d1; + t->y=d3/d1; + return 0; +} + +//--------------------------------------------------------------- +//generate mapping for a general quadrangle +//wi,hi = input image size +//wo,ho = output image size +//vog[] = the four corners +//str: 0=no stretch 1=do stretch +//strx,stry: stretch values [0...1] 0.5 = no stretch +void cetverokotnik4(int wi, int hi, int wo, int ho, tocka2 vog[], int str, float strx, float stry, float *map) +{ + double a,b,c,d,e,f,g,h,a2,b2,c2,u,v,aa,bb,de,sde,v1,v2,u1,u2; + tocka2 T; + int x,y; + float kx,ky,k1,k2; + + de=0.0;v1=1000.0;v2=1000.0; //da compiler ne jamra + + kx=4.0*2.0*fabsl(strx-0.5)+0.00005; + k1=1.0-1.0/(kx+1.0); + ky=4.0*2.0*fabsl(stry-0.5)+0.00005; + k2=1.0-1.0/(ky+1.0); + + for (y=0;y=0.0) + { + sde=sqrt(de); + v1=(-b2+sde)/2.0/a2; + v2=(-b2-sde)/2.0/a2; + } + else + { + v1=1001.0; //krneki zunaj + v2=1001.0; //krneki zunaj + } + } + aa=b+d*v1; bb=f+h*v1; + if (fabsf(aa)>fabsf(bb)) + u1 = (aa!=0.0) ? -(a+c*v1)/aa : 1000.0; + else + u1 = (bb!=0.0) ? -(e+g*v1)/bb : 1000.0; + aa=b+d*v2; bb=f+h*v2; + if (fabsf(aa)>fabsf(bb)) + u2 = (aa!=0.0) ? -(a+c*v2)/aa : 1000.0; + else + u2 = (bb!=0.0) ? -(e+g*v2)/bb : 1000.0; + + if ((u1>0.0)&&(u1<1.0)&&(v1>0.0)&&(v1<1.0)) + { + u=u1; + v=v1; + } + else + { + if ((u2>0.0)&&(u2<1.0)&&(v2>0.0)&&(v2<1.0)) + { + u=u2; + v=v2; + } + else + { + u=1002.0; + v=1002.0; + } + } + + //if requested, apply stretching + if (str!=0) + { + if (strx>0.5) + u=(1.0-1.0/(kx*u+1.0))/k1; + else + u=1.0-(1.0-1.0/(kx*(1.0-u)+1.0))/k1; + if (stry>0.5) + v=(1.0-1.0/(ky*v+1.0))/k2; + else + v=1.0-(1.0-1.0/(ky*(1.0-v)+1.0))/k2; + } + + //zdaj samo se vpise izracunana (u,v) v map[] + if ((u>=0.0)&&(u<=1.0)&&(v>=0.0)&&(v<=1.0)) + { //ce smo znotraj orig slike + map[2*(y*wo+x)]=u*(wi-1); + map[2*(y*wo+x)+1]=v*(hi-1); + } + else + { + map[2*(y*wo+x)]=-1; + map[2*(y*wo+x)+1]=-1; + } + + } + } + +} + +//--------------------------------------------------------------- +//generate mapping for a triangle +void trikotnik1(int wi, int hi, int wo, int ho, tocka2 vog[], tocka2 R, tocka2 S, premica2 p12, premica2 p23, premica2 p34, premica2 p41, int t12, int t23, int str, float strx, float stry, float *map) +{ + int x,y; + tocka2 T,A,B; + premica2 p5,p6; + float u,v; + float kx,ky,k1,k2; + + kx=4.0*2.0*fabsl(strx-0.5)+0.00005; + k1=1.0-1.0/(kx+1.0); + ky=4.0*2.0*fabsl(stry-0.5)+0.00005; + k2=1.0-1.0/(ky+1.0); + + for (y=0;yfabsf(p12.b)) //bolj pokonci + u=(A.y-vog[0].y)/(vog[1].y-vog[0].y); + else + u=(A.x-vog[0].x)/(vog[1].x-vog[0].x); + } + else + { + presecisce2(p5,p34,&A); + if (fabsf(p34.a)>fabsf(p34.b)) //bolj pokonci + u=(A.y-vog[3].y)/(vog[2].y-vog[3].y); + else + u=(A.x-vog[3].x)/(vog[2].x-vog[3].x); + } + + premica2d(T,S,&p6); + presecisce2(p6,p23,&B); + if (t23!=-10) //razlicno od cetverokotnika + { + if (fabsf(p23.a)>fabsf(p23.b)) //bolj pokonci + v=(B.y-vog[1].y)/(vog[2].y-vog[1].y); + else + v=(B.x-vog[1].x)/(vog[2].x-vog[1].x); + } + else + { + presecisce2(p6,p41,&B); + if (fabsf(p41.a)>fabsf(p41.b)) //bolj pokonci + v=(B.y-vog[0].y)/(vog[3].y-vog[0].y); + else + v=(B.x-vog[0].x)/(vog[3].x-vog[0].x); + } + + //if requested, apply stretching + if (str!=0) + { + if (strx>0.5) + u=(1.0-1.0/(kx*u+1.0))/k1; + else + u=1.0-(1.0-1.0/(kx*(1.0-u)+1.0))/k1; + if (stry>0.5) + v=(1.0-1.0/(ky*v+1.0))/k2; + else + v=1.0-(1.0-1.0/(ky*(1.0-v)+1.0))/k2; + } + + //zdaj samo se vpise izracunana (u,v) v map[] + if ((u>=0.0)&&(u<=1.0)&&(v>=0.0)&&(v<=1.0)) + { //ce smo znotraj orig slike + map[2*(y*wo+x)]=u*(wi-1); + map[2*(y*wo+x)+1]=v*(hi-1); + } + else + { + map[2*(y*wo+x)]=-1; + map[2*(y*wo+x)+1]=-1; + } + } + } +} + +//------------------------------------------------------- +//generates a map of alpha values for transparent background +//with feathered (soft) border +//feath = soft border width 0..max in pixels +//amap = generated alpha map +//map = map generated by geom4c_b() +//nots[] = flags for inner sides +//for now it does not feather caustics on concaves an crossed sides +void make_alphamap(unsigned char *amap, tocka2 vog[], int wo, int ho, float *map, float feath, int nots[]) +{ + float r12, r23, r34, r41, rmin; + tocka2 t; + int i,j; + premica2 p12,p23,p34,p41; + + premica2d(vog[0],vog[1],&p12); // 1-2 + premica2d(vog[2],vog[3],&p34); // 3-4 + premica2d(vog[3],vog[0],&p41); // 4-1 + premica2d(vog[1],vog[2],&p23); // 2-3 + + for (i=0;i=0.0)&&(map[2*(i*wo+j)+1]>=0.0)) + { //inside + if (rmin<=feath) //border area + amap[i*wo+j]=255*(rmin/feath); + else + amap[i*wo+j]=255; + } + else //outside + amap[i*wo+j]=0; + } +} + +//------------------------------------------------------- +void apply_alphamap(uint32_t* frame, int w, int h, unsigned char *amap, int operation) +{ + int i,j, length; + uint32_t t; + length = w * h; + + switch (operation) + { + case 0: //write on clear + for (i=0;i>1)+(t>>1); + t = (t>0x7F800000) ? 0xFF000000 : t<<1; + frame[i] = (frame[i]&0x00FFFFFF) | t; + } + break; + case 4: //subtract + for (i=0;it) ? (frame[i]&0xFF000000)-t : 0; + frame[i] = (frame[i]&0x00FFFFFF) | t; + } + break; + default: + break; + } +} + +//--------------------------------------------------------------- +//funkcija za byte polja (char) +//generate map from the four corners +//first checks for different types of degenerate geometrty... +//wi,hi input image size +//wo,ho output image size +//vog[] the four corners +//nots[] "inner" sides (for alpha feathering) +int geom4c_b(int wi, int hi, int wo, int ho, tocka2 vog[], int str, float strx, float stry, float *map, int nots[]) +{ + premica2 p12,p23,p34,p41; + tocka2 R,S; + int r41,r23,s12,s34; //tocki R in S + int p1,p2; //paralelnost stranic + int t12,t23,t34,t41; //sovpadanje tock + int tip; //1=degen trik 2=paral 3=splosni 4=twist 5=konkavni + int i; + + for (i=0;i<4;i++) //convert indexes to positions (pixel) + { + vog[i].x=vog[i].x+0.5; + vog[i].y=vog[i].y+0.5; + } + + tip=3; + + t12=premica2d(vog[0],vog[1],&p12); // 1-2 + t34=premica2d(vog[2],vog[3],&p34); // 3-4 + t41=premica2d(vog[3],vog[0],&p41); // 4-1 + t23=premica2d(vog[1],vog[2],&p23); // 2-3 + + //preveri degeneracijo v crto ali piko + //check for degeneration into a line or point + if ((t12+t34+t41+t23)<-19) + { //vec kot dve sovpadata + //daj tu fill with background?? + return 0; + } + if (((vog[0].x==vog[2].x)&&(vog[0].y==vog[2].y)) || ((vog[1].x==vog[3].x)&&(vog[1].y==vog[3].y))) + { //sovpadata dve diagonalni tocki + //daj tu fill with background?? + return 0; + } + + p1=presecisce2(p12,p34,&S); //tocka S + p2=presecisce2(p41,p23,&R); //tocka R + + //preveri degeneracijo v trikotnik (sovpadanje nediagonalnih tock) + //check for degeneration into triangle (coincident non-diagonal c.) + if (t12==-10) {R=vog[0];p12=p34;p1=-1;tip=1;} + if (t34==-10) {R=vog[2];p34=p12;p1=-1;tip=1;} + if (t41==-10) {S=vog[0];p41=p23;p2=-1;tip=1;} + if (t23==-10) {S=vog[2];p23=p41;p2=-1;tip=1;} + + //preveri vzporednost + //check parallelity + if (p1==-1) //vzporedni 1-2 in 3-4 + { + if (fabsf(p12.a)>fabsf(p12.b)) //bolj pokonci + {S.y=1.0E9;S.x=-(p12.b*S.y+p12.c)/p12.a;} + else + {S.x=1.0E9;S.y=-(p12.a*S.x+p12.c)/p12.b;} + } + if (p2==-1) //vzporedni 2-3 in 4-1 + { + if (fabsf(p41.a)>fabsf(p41.b)) //bolj pokonci + {R.y=1.0E9;R.x=-(p41.b*R.y+p41.c)/p41.a;} + else + {R.x=1.0E9;R.y=-(p41.a*R.x+p41.c)/p41.b;} + } + + //pogleda, ce je priblizno paralelogram + //check if approximately parallelogram + if (((fabsf(R.x)>1000000.0)||(fabsf(R.y)>1000000.0)) && + ((fabsf(S.x)>1000000.0)||(fabsf(S.y)>1000000.0))) + tip=2; + + //preveri, ce je prekrizan ali konkaven (R ali S med ogljici) + //check for concave or crossed sides + r41=0;r23=0;s12=0;s34=0; + + if (fabsf(p41.a)>fabsf(p41.b)) //bolj pokonci + {if (((R.y-vog[3].y)*(R.y-vog[0].y))<0.0) r41=1;}//R na 4-1 + else + {if (((R.x-vog[3].x)*(R.x-vog[0].x))<0.0) r41=1;}//R na 4-1 + + if (fabsf(p23.a)>fabsf(p23.b)) //bolj pokonci + {if (((R.y-vog[1].y)*(R.y-vog[2].y))<0.0) r23=1;}//R na 2-3 + else + {if (((R.x-vog[1].x)*(R.x-vog[2].x))<0.0) r23=1;}//R na 2-3 + + if (fabsf(p12.a)>fabsf(p12.b)) //bolj pokonci + {if (((S.y-vog[0].y)*(S.y-vog[1].y))<0.0) s12=1;}//S na 1-2 + else + {if (((S.x-vog[0].x)*(S.x-vog[1].x))<0.0) s12=1;}//S na 1-2 + + if (fabsf(p34.a)>fabsf(p34.b)) //bolj pokonci + {if (((S.y-vog[2].y)*(S.y-vog[3].y))<0.0) s34=1;}//S na 3-4 + else + {if (((S.x-vog[2].x)*(S.x-vog[3].x))<0.0) s34=1;}//S na 3-4 + + if (((r41+r23+s12+s34)>0)&&(tip==3)) + { + if ((r41*r23+s12*s34)==0) //konkaven + tip=5; + else //prekrizan + tip=4; + } + + //prepare nots[] flags + nots[0]=nots[1]=nots[2]=nots[3]=0; + if (tip==4) + { + nots[0] = (s12==0) ? 0 : 1; + nots[1] = (r23==0) ? 0 : 1; + nots[2] = (s34==0) ? 0 : 1; + nots[3] = (r41==0) ? 0 : 1; + } + if (tip==5) + { + nots[2] = (s12==0) ? 0 : 1; + nots[3] = (r23==0) ? 0 : 1; + nots[0] = (s34==0) ? 0 : 1; + nots[1] = (r41==0) ? 0 : 1; + } + + //OK, zdaj gremo risat... + switch (tip) + { + case 0: //should never come to here... + break; + case 1: //triangle + trikotnik1(wi, hi, wo, ho, vog, R, S, p12, p23, p34, p41, t12, t23, str, strx, stry, map); + break; + case 2: //paralelogram + //a faster algorithm could be used here... + case 3: //general quadrangle + case 4: //crossed sides + case 5: //concave quadrangle + cetverokotnik4(wi, hi, wo, ho, vog, str, strx, stry, map); + break; + } + + return 0; +} + +//------------------------------------------------------- +interpp set_intp(inst p) +{ + switch (p.intp) //katero interpolacijo bo uporabil + { + // case -1:return interpNNpr_b; //nearest neighbor+print + case 0: return interpNN_b32; //nearest neighbor + case 1: return interpBL_b32; //bilinear + case 2: return interpBC_b32; //bicubic smooth + case 3: return interpBC2_b32; //bicibic sharp + case 4: return interpSP4_b32; //spline 4x4 + case 5: return interpSP6_b32; //spline 6x6 + case 6: return interpSC16_b32; //lanczos 8x8 + default: return NULL; + } +} + +//----------------------------------------------------- +//stretch [0...1] to parameter range [min...max] linear +float map_value_forward(double v, float min, float max) +{ + return min+(max-min)*v; +} + +//----------------------------------------------------- +//collapse from parameter range [min...max] to [0...1] linear +double map_value_backward(float v, float min, float max) +{ + return (v-min)/(max-min); +} + + +//*********************************************** +// OBVEZNE FREI0R FUNKCIJE + +//----------------------------------------------- +int f0r_init() +{ + return 1; +} + +//------------------------------------------------ +void f0r_deinit() +{ +} + +//----------------------------------------------- +void f0r_get_plugin_info(f0r_plugin_info_t* info) +{ + + info->name="c0rners"; + info->author="Marko Cebokli"; + 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=15; + info->explanation="Four corners geometry engine"; +} + +//-------------------------------------------------- +void f0r_get_param_info(f0r_param_info_t* info, int param_index) +{ + + switch(param_index) + { + case 0: + info->name = "Corner 1 X"; + info->type = F0R_PARAM_DOUBLE; + info->explanation = "X coordinate of corner 1"; + break; + case 1: + info->name = "Corner 1 Y"; + info->type = F0R_PARAM_DOUBLE; + info->explanation = "Y coordinate of corner 1"; + break; + case 2: + info->name = "Corner 2 X"; + info->type = F0R_PARAM_DOUBLE; + info->explanation = "X coordinate of corner 2"; + break; + case 3: + info->name = "Corner 2 Y"; + info->type = F0R_PARAM_DOUBLE; + info->explanation = "Y coordinate of corner 2"; + break; + case 4: + info->name = "Corner 3 X"; + info->type = F0R_PARAM_DOUBLE; + info->explanation = "X coordinate of corner 3"; + break; + case 5: + info->name = "Corner 3 Y"; + info->type = F0R_PARAM_DOUBLE; + info->explanation = "Y coordinate of corner 3"; + break; + case 6: + info->name = "Corner 4 X"; + info->type = F0R_PARAM_DOUBLE; + info->explanation = "X coordinate of corner 4"; + break; + case 7: + info->name = "Corner 4 Y"; + info->type = F0R_PARAM_DOUBLE; + info->explanation = "Y coordinate of corner 4"; + break; + case 8: + info->name = "Enable Stretch"; + info->type = F0R_PARAM_BOOL; + info->explanation = "Enable stretching"; + break; + case 9: + info->name = "Stretch X"; + info->type = F0R_PARAM_DOUBLE; + info->explanation = "Amount of stretching in X direction"; + break; + case 10: + info->name = "Stretch Y"; + info->type = F0R_PARAM_DOUBLE; + info->explanation = "Amount of stretching in Y direction"; + break; + case 11: + info->name = "Interpolator"; + info->type = F0R_PARAM_DOUBLE; + info->explanation = "Quality of interpolation"; + break; + case 12: + info->name = "Transparent Background"; + info->type = F0R_PARAM_BOOL; + info->explanation = "Makes background transparent"; + break; + case 13: + info->name = "Feather Alpha"; + info->type = F0R_PARAM_DOUBLE; + info->explanation = "Makes smooth transition into transparent"; + break; + case 14: + info->name = "Alpha operation"; + info->type = F0R_PARAM_DOUBLE; + info->explanation = ""; + } +} + +//---------------------------------------------- +f0r_instance_t f0r_construct(unsigned int width, unsigned int height) +{ + inst *in; + + in=(inst*)calloc(1, sizeof(inst)); + in->w=width; + in->h=height; + in->x1=0.333333; + in->y1=0.333333; + in->x2=0.666666; + in->y2=0.333333; + in->x3=0.666666; + in->y3=0.666666; + in->x4=0.333333; + in->y4=0.666666; + in->stretchON=0; + in->stretchx=0.5; + in->stretchy=0.5; + in->intp=1; + in->transb=0; + in->feath=1.0; + in->op=0; + + in->map=(float*)calloc(1, sizeof(float)*(in->w*in->h*2+2)); + in->amap=(unsigned char*)calloc(1, sizeof(char)*(in->w*in->h*2+2)); + in->interp=set_intp(*in); + in->mapIsDirty=1; + + return (f0r_instance_t)in; +} + +//--------------------------------------------------- +void f0r_destruct(f0r_instance_t instance) +{ + inst *p; + + p=(inst*)instance; + + free(p->map); + free(p->amap); + free(instance); +} + +//----------------------------------------------------- +void f0r_set_param_value(f0r_instance_t instance, f0r_param_t parm, int param_index) +{ + inst *p; + double tmpf; + int chg; + + p=(inst*)instance; + + chg=0; + switch(param_index) + { + case 0: //X coordinate of corner 1 + tmpf=*(double*)parm; + if (tmpf!=p->x1) chg=1; + p->x1=tmpf; + break; + case 1: //Y coordinate of corner 1 + tmpf=*(double*)parm; + if (tmpf!=p->y1) chg=1; + p->y1=tmpf; + break; + case 2: //X coordinate of corner 2 + tmpf=*(double*)parm; + if (tmpf!=p->x2) chg=1; + p->x2=tmpf; + break; + case 3: //Y coordinate of corner 2 + tmpf=*(double*)parm; + if (tmpf!=p->y2) chg=1; + p->y2=tmpf; + break; + case 4: //X coordinate of corner 3 + tmpf=*(double*)parm; + if (tmpf!=p->x3) chg=1; + p->x3=tmpf; + break; + case 5: //Y coordinate of corner 3 + tmpf=*(double*)parm; + if (tmpf!=p->y3) chg=1; + p->y3=tmpf; + break; + case 6: //X coordinate of corner 4 + tmpf=*(double*)parm; + if (tmpf!=p->x4) chg=1; + p->x4=tmpf; + break; + case 7: //Y coordinate of corner 4 + tmpf=*(double*)parm; + if (tmpf!=p->y4) chg=1; + p->y4=tmpf; + break; + case 8: //Enable stretching + tmpf=map_value_forward(*((double*)parm), 0.0, 1.0);//BOOL!! + if (p->stretchON != tmpf) chg=1; + p->stretchON = tmpf; + break; + case 9: //Stretch X + tmpf=*(double*)parm; + if (tmpf!=p->stretchx) chg=1; + p->stretchx=tmpf; + break; + case 10: //Stretch Y + tmpf=*(double*)parm; + if (tmpf!=p->stretchy) chg=1; + p->stretchy=tmpf; + break; + case 11: //Interpolation + tmpf=map_value_forward(*((double*)parm), 0.0, 6.999); + if (p->intp != tmpf) chg=1; + p->intp=tmpf; + break; + case 12: //Transparent Background + tmpf=map_value_forward(*((double*)parm), 0.0, 1.0);//BOOL!! + // if (p->transb != tmpf) chg=1; + p->transb = tmpf; + break; + case 13: //Feather Alpha + tmpf=map_value_forward(*((double*)parm), 0.0, 100.0); + if (tmpf!=p->feath) chg=1; + p->feath=tmpf; + break; + case 14: //Alpha operation + p->op=map_value_forward(*((double*)parm), 0.0, 4.9999); + printf("setting p->op: %i\n", p->op); + break; + } + + if (chg!=0) + { + p->interp=set_intp(*p); + p->mapIsDirty = 1; + } + +} + +//-------------------------------------------------- +void f0r_get_param_value(f0r_instance_t instance, f0r_param_t param, int param_index) +{ + inst *p; + double tmpf; + + p=(inst*)instance; + + switch(param_index) + { + case 0: //X coordinate of corner 1 + tmpf=(float)p->x1; + *((double*)param)=tmpf; + break; + case 1: //Y coordinate of corner 1 + tmpf=(float)p->y1; + *((double*)param)=tmpf; + break; + case 2: //X coordinate of corner 2 + tmpf=(float)p->x2; + *((double*)param)=tmpf; + break; + case 3: //Y coordinate of corner 2 + tmpf=(float)p->y2; + *((double*)param)=tmpf; + break; + case 4: //X coordinate of corner 3 + tmpf=(float)p->x3; + *((double*)param)=tmpf; + break; + case 5: //Y coordinate of corner 3 + tmpf=(float)p->y3; + *((double*)param)=tmpf; + break; + case 6: //X coordinate of corner 4 + tmpf=(float)p->x4; + *((double*)param)=tmpf; + break; + case 7: //Y coordinate of corner 4 + tmpf=(float)p->y4; + *((double*)param)=tmpf; + break; + case 8: //Enable stretching + *((double*)param)=map_value_backward(p->stretchON, 0.0, 1.0); //BOOL!! + break; + case 9: //Stretch X + tmpf=(float)p->stretchx; + *((double*)param)=tmpf; + break; + case 10: //Stretch Y + tmpf=(float)p->stretchy; + *((double*)param)=tmpf; + break; + case 11: //Interpolation + *((double*)param)=map_value_backward(p->intp, 0.0, 6.0); //!!!!!! 6.999 ???? tudi v defish!!!! + break; + case 12: //Transparent Background + *((double*)param)=map_value_backward(p->transb, 0.0, 1.0); //BOOL!! + break; + case 13: //Feather Alpha + *((double*)param)=map_value_backward(p->feath, 0.0, 100.0); + break; + case 14: //Alpha operation + *((double*)param)=map_value_backward(p->op, 0.0, 4.9999); + break; + } +} + + +//------------------------------------------------- +void f0r_update(f0r_instance_t instance, double time, const uint32_t* inframe, uint32_t* outframe) +{ + inst *p; + int bkgr; + + p=(inst*)instance; + + if (p->mapIsDirty) { + tocka2 vog[4]; + int nots[4]; + vog[0].x=(p->x1*3-1)*p->w; + vog[0].y=(p->y1*3-1)*p->h; + vog[1].x=(p->x2*3-1)*p->w; + vog[1].y=(p->y2*3-1)*p->h; + vog[2].x=(p->x3*3-1)*p->w; + vog[2].y=(p->y3*3-1)*p->h; + vog[3].x=(p->x4*3-1)*p->w; + vog[3].y=(p->y4*3-1)*p->h; + geom4c_b(p->w, p->h, p->w, p->h, vog, p->stretchON, p->stretchx, p->stretchy, p->map, nots); + make_alphamap(p->amap, vog, p->w, p->h, p->map, p->feath, nots); + p->mapIsDirty = 0; + } + + //if (p->transb==0) bkgr=0xFF000000; else bkgr=0; + bkgr=0xFF000000; + + remap32(p->w, p->h, p->w, p->h, (unsigned char*) inframe, (unsigned char *) outframe, p->map, bkgr, p->interp); + + if (p->transb!=0) + apply_alphamap(outframe, p->w, p->h, p->amap, p->op); + +} diff --git a/src/filter/c0rners/interp.h b/src/filter/c0rners/interp.h new file mode 100644 index 0000000..42905ec --- /dev/null +++ b/src/filter/c0rners/interp.h @@ -0,0 +1,824 @@ +//interp.c +/* + * Copyright (C) 2010 Marko Cebokli http://lea.hamradio.si/~s57uuu + * This file is a part of the Frei0r plugin "c0rners" + * + * 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. + */ + +/******************************************************************* + * The remapping functions use a map aray, which contains a pair + * of floating values fo each pixel of the output image. These + * represent the location in the input image, from where the value + * of the given output pixel should be interpolated. + * They are given in pixels of the input image. + * If the output image is wo pixels wide, then the x coordinate + * of the pixel in row r and column c is at 2*(r*wo+c) in the map + * array, and y at 2*(r*wo+c)+1 + * + * The map array is usually computation intensive to generate, and + * he purpose of the map array is to allow fast remapping of + * several images (video) using the same map array. + ******************************************************************/ + + +//compile: gcc -c -O2 -Wall -std=c99 -fPIC interp.c -o interp.o + +// -std=c99 za roundf() +// -fPIC da lahko linkas v .so (za frei0r) + +#include +#include /* za debug printoute */ +#include + +//-------------------------------------------------------- +//pointer to an interpolating function +typedef int (*interpp)(unsigned char*, int, int, float, float, unsigned char*); + +//************************************ +//REMAP AN IMAGE + +//-------------------------------------------------------- +// vhs = vhodna slika velikosti wi x hi +// izs = izhodna slika velikosti wo x ho +// map = za vsak pixel izs pove, kje ga vzamemo is vhs +// bgc = background color +// interp = kazalec na interpolacijsko funkcijo +void remap(int wi, int hi, int wo, int ho, unsigned char *vhs, unsigned char *izs, float *map, unsigned char bgc, interpp interp) +{ + int i,j; + float x,y; + + for (i=0;i0) + interp(vhs,wi,hi,x,y,&izs[wo*i+j]); + else + izs[wo*i+j]=bgc; //background fill + } +} + + +//-------------------------------------------------------- +//for four byte (int, 32 bit) values (packed RGB color) +//little endian !! +// vhs = vhodna slika velikosti wi x hi +// izs = izhodna slika velikosti wo x ho +// map = za vsak pixel izs pove, kje ga vzamemo is vhs +// bgc = background color +// interp = kazalec na interpolacijsko funkcijo +void remap32(int wi, int hi, int wo, int ho, unsigned char *vhs, unsigned char *izs, float *map, uint32_t bgc, interpp interp) +{ + int i,j; + float x,y; + + for (i=0;i0) + interp(vhs,wi,hi,x,y,&izs[4*(wo*i+j)]); + else //background fill + { + izs[4*(wo*i+j)]=bgc; + izs[4*(wo*i+j)+1]=bgc>>8; + izs[4*(wo*i+j)+2]=bgc>>16; + izs[4*(wo*i+j)+3]=bgc>>24; + } + } +} + +//************************************** +//HERE BEGIN THE INTERPOLATION FUNCTIONS + +#if defined(_MSC_VER) +__inline const float roundf(float x){ + return (int)floor(x+0.5); +} +#endif /* _MSC_VER */ + +//------------------------------------------------------ +//za debugging - z izpisovanjem +//interpolacija "najblizji sosed" (ni prava interpolacija) +//za byte (char) vrednosti +// *sl vhodni array (slika) +// w,h dimenzija slike je wxh +// x,y tocka, za katero izracuna interpolirano vrednost +// *v interpolirana vrednost +int interpNNpr_b(unsigned char *sl, int w, int h, float x, float y, unsigned char *v) +{ + //printf("u=%5.2f v=%5.2f ",x,y); + printf("u=%5.3f v=%5.3f ",x/(w-1),y/(h-1)); + //printf("U=%2d V=%2d ",(int)roundf(x),(int)roundf(y)); + +#ifdef TEST_XY_LIMITS + if ((x<0)||(x>w)||(y<0)||(y>h)) return -1; +#endif + + *v=sl[(int)roundf(x)+(int)roundf(y)*w]; + return 0; +} + +//------------------------------------------------------ +//interpolacija "najblizji sosed" (ni prava interpolacija) +//za byte (char) vrednosti +// *sl vhodni array (slika) +// w,h dimenzija slike je wxh +// x,y tocka, za katero izracuna interpolirano vrednost +// *v interpolirana vrednost +int interpNN_b(unsigned char *sl, int w, int h, float x, float y, unsigned char *v) +{ +#ifdef TEST_XY_LIMITS + if ((x<0)||(x>w)||(y<0)||(y>h)) return -1; +#endif + + *v=sl[(int)roundf(x)+(int)roundf(y)*w]; + return 0; +} + +//------------------------------------------------------ +//interpolacija "najblizji sosed" (ni prava interpolacija) +//za byte (char) vrednosti v packed color 32 bitnem formatu +//little endian !! +// *sl vhodni array (slika) +// w,h dimenzija slike je wxh +// x,y tocka, za katero izracuna interpolirano vrednost +// *v interpolirana vrednost +int interpNN_b32(unsigned char *sl, int w, int h, float x, float y, unsigned char *v) +{ +#ifdef TEST_XY_LIMITS + if ((x<0)||(x>w)||(y<0)||(y>h)) return -1; +#endif + + v[0]=sl[(int)roundf(x)*4+(int)roundf(y)*4*w]; + v[1]=sl[(int)roundf(x)*4+(int)roundf(y)*4*w+1]; + v[2]=sl[(int)roundf(x)*4+(int)roundf(y)*4*w+2]; + v[3]=sl[(int)roundf(x)*4+(int)roundf(y)*4*w+3]; + + return 0; +} + +//------------------------------------------------------ +//bilinearna interpolacija +//za byte (char) vrednosti +// *sl vhodni array (slika) +// w,h dimenzija slike je wxh +// x,y tocka, za katero izracuna interpolirano vrednost +// *v interpolirana vrednost +int interpBL_b(unsigned char *sl, int w, int h, float x, float y, unsigned char *v) +{ + int m,n,k,l; + float a,b; + +#ifdef TEST_XY_LIMITS + if ((x<0)||(x>w)||(y<0)||(y>h)) return -1; +#endif + + m=(int)floorf(x); n=(int)floorf(y); + k=n*w+m; l=(n+1)*w+m; + a=sl[k]+(sl[k+1]-sl[k])*(x-(float)m); + b=sl[l]+(sl[l+1]-sl[l])*(x-(float)m); + *v=a+(b-a)*(y-(float)n); + return 0; +} + +//------------------------------------------------------ +//bilinearna interpolacija +//za byte (char) vrednosti v packed color 32 bitnem formatu +int interpBL_b32(unsigned char *sl, int w, int h, float x, float y, unsigned char *v) +{ + int m,n,k,l,n1,l1,k1; + float a,b; + +#ifdef TEST_XY_LIMITS + if ((x<0)||(x>w)||(y<0)||(y>h)) return -1; +#endif + + m=(int)floorf(x); n=(int)floorf(y); + k=n*w+m; l=(n+1)*w+m; + k1=4*(k+1); l1=4*(l+1); n1=4*((n+1)*w+m); + l=4*l; k=4*k; + + a=sl[k]+(sl[k1]-sl[k])*(x-(float)m); + b=sl[l]+(sl[l1]-sl[n1])*(x-(float)m); + v[0]=a+(b-a)*(y-(float)n); + + a=sl[k+1]+(sl[k1+1]-sl[k+1])*(x-(float)m); + b=sl[l+1]+(sl[l1+1]-sl[n1+1])*(x-(float)m); + v[1]=a+(b-a)*(y-(float)n); + + a=sl[k+2]+(sl[k1+2]-sl[k+2])*(x-(float)m); + b=sl[l+2]+(sl[l1+2]-sl[n1+2])*(x-(float)m); + v[2]=a+(b-a)*(y-(float)n); + + a=sl[k+3]+(sl[k1+3]-sl[k+3])*(x-(float)m); + b=sl[l+3]+(sl[l1+3]-sl[n1+3])*(x-(float)m); + v[3]=a+(b-a)*(y-(float)n); + + + return 0; +} + +//------------------------------------------------------ +//bikubicna interpolacija "smooth" +//za byte (char) vrednosti +//kar Aitken-Neville formula iz Bronstajna +// *sl vhodni array (slika) +// w,h dimenzija slike je wxh +// x,y tocka, za katero izracuna interpolirano vrednost +// *v interpolirana vrednost +int interpBC_b(unsigned char *sl, int w, int h, float x, float y, unsigned char *v) +{ + int i,j,l,m,n; + float k; + float p[4],p1[4],p2[4],p3[4],p4[4]; + +#ifdef TEST_XY_LIMITS + if ((x<0)||(x>w)||(y<0)||(y>h)) return -1; +#endif + + m=(int)ceilf(x)-2; if (m<0) m=0; if ((m+5)>w) m=w-4; + n=(int)ceilf(y)-2; if (n<0) n=0; if ((n+5)>h) n=h-4; + + //njaprej po y (stiri stolpce) + for (i=0;i<4;i++) + { + l=m+(i+n)*w; + p1[i]=sl[l]; + p2[i]=sl[l+1]; + p3[i]=sl[l+2]; + p4[i]=sl[l+3]; + } + for (j=1;j<4;j++) + for (i=3;i>=j;i--) + { + k=(y-i-n)/j; + p1[i]=p1[i]+k*(p1[i]-p1[i-1]); + p2[i]=p2[i]+k*(p2[i]-p2[i-1]); + p3[i]=p3[i]+k*(p3[i]-p3[i-1]); + p4[i]=p4[i]+k*(p4[i]-p4[i-1]); + } + + //zdaj pa po x + p[0]=p1[3]; p[1]=p2[3]; p[2]=p3[3]; p[3]=p4[3]; + for (j=1;j<4;j++) + for (i=3;i>=j;i--) + p[i]=p[i]+(x-i-m)/j*(p[i]-p[i-1]); + + if (p[3]<0.0) p[3]=0.0; //printf("p=%f ",p[3]); + if (p[3]>256.0) p[3]=255.0; //printf("p=%f ",p[3]); + + *v=p[3]; + + return 0; +} + +//------------------------------------------------------ +//bikubicna interpolacija "smooth" +//za byte (char) vrednosti v packed color 32 bitnem formatu +int interpBC_b32(unsigned char *sl, int w, int h, float x, float y, unsigned char *v) +{ + int i,j,b,l,m,n; + float k; + float p[4],p1[4],p2[4],p3[4],p4[4]; + +#ifdef TEST_XY_LIMITS + if ((x<0)||(x>w)||(y<0)||(y>h)) return -1; +#endif + + m=(int)ceilf(x)-2; if (m<0) m=0; if ((m+5)>w) m=w-4; + n=(int)ceilf(y)-2; if (n<0) n=0; if ((n+5)>h) n=h-4; + + + for (b=0;b<4;b++) + { + //njaprej po y (stiri stolpce) + for (i=0;i<4;i++) + { + l=m+(i+n)*w; + p1[i]=sl[4*l+b]; + p2[i]=sl[4*(l+1)+b]; + p3[i]=sl[4*(l+2)+b]; + p4[i]=sl[4*(l+3)+b]; + } + for (j=1;j<4;j++) + for (i=3;i>=j;i--) + { + k=(y-i-n)/j; + p1[i]=p1[i]+k*(p1[i]-p1[i-1]); + p2[i]=p2[i]+k*(p2[i]-p2[i-1]); + p3[i]=p3[i]+k*(p3[i]-p3[i-1]); + p4[i]=p4[i]+k*(p4[i]-p4[i-1]); + } + + //zdaj pa po x + p[0]=p1[3]; p[1]=p2[3]; p[2]=p3[3]; p[3]=p4[3]; + for (j=1;j<4;j++) + for (i=3;i>=j;i--) + p[i]=p[i]+(x-i-m)/j*(p[i]-p[i-1]); + + if (p[3]<0.0) p[3]=0.0; + if (p[3]>256.0) p[3]=255.0; + + v[b]=p[3]; + } + + return 0; +} + +//------------------------------------------------------ +//bikubicna interpolacija "sharp" +//za byte (char) vrednosti +//Helmut Dersch polinom +// *sl vhodni array (slika) +// w,h dimenzija slike je wxh +// x,y tocka, za katero izracuna interpolirano vrednost +// *v interpolirana vrednost +//!!! ODKOD SUM??? (ze po eni rotaciji v interp_test !!) +//!!! v defish tega suma ni??? +int interpBC2_b(unsigned char *sl, int w, int h, float x, float y, unsigned char *v) +{ + int i,k,l,m,n; + float pp,p[4],wx[4],wy[4],xx; + +#ifdef TEST_XY_LIMITS + if ((x<0)||(x>w)||(y<0)||(y>h)) return -1; +#endif + + m=(int)ceilf(x)-2; if (m<0) m=0; if ((m+5)>w) m=w-4; + n=(int)ceilf(y)-2; if (n<0) n=0; if ((n+5)>h) n=h-4; + + + //najprej po y (stiri stolpce) + xx=y-n; wy[0]=(-0.75*(xx-5.0)*xx-6.0)*xx+3.0; + xx=xx-1.0; wy[1]=(1.25*xx-2.25)*xx*xx+1.0; + xx=1.0-xx; wy[2]=(1.25*xx-2.25)*xx*xx+1.0; + xx=xx+1.0; wy[3]=(-0.75*(xx-5.0)*xx-6.0)*xx+3.0; + //se po x + xx=x-m; wx[0]=(-0.75*(xx-5.0)*xx-6.0)*xx+3.0; + xx=xx-1.0; wx[1]=(1.25*xx-2.25)*xx*xx+1.0; + xx=1.0-xx; wx[2]=(1.25*xx-2.25)*xx*xx+1.0; + xx=xx+1.0; wx[3]=(-0.75*(xx-5.0)*xx-6.0)*xx+3.0; + + k=n*w+m; + for (i=0;i<4;i++) + { + p[i]=0.0; + l=k+i; + p[i]=wy[0]*sl[l]; l+=w; + p[i]+=wy[1]*sl[l]; l+=w; + p[i]+=wy[2]*sl[l]; l+=w; + p[i]+=wy[3]*sl[l]; + } + + pp=wx[0]*p[0]; + pp+=wx[1]*p[1]; + pp+=wx[2]*p[2]; + pp+=wx[3]*p[3]; + + if (pp<0.0) pp=0.0; + if (pp>256.0) pp=255.0; + + *v=pp; + return 0; +} + +//------------------------------------------------------ +//bikubicna interpolacija "sharp" +//za byte (char) vrednosti v packed color 32 bitnem formatu +//!!! ODKOD SUM??? (ze po eni rotaciji v interp_test !!) +//!!! v defish tega suma ni??? +int interpBC2_b32(unsigned char *sl, int w, int h, float x, float y, unsigned char *v) +{ + int b,i,k,l,m,n,u; + float pp,p[4],wx[4],wy[4],xx; + +#ifdef TEST_XY_LIMITS + if ((x<0)||(x>w)||(y<0)||(y>h)) return -1; +#endif + + m=(int)ceilf(x)-2; if (m<0) m=0; if ((m+5)>w) m=w-4; + n=(int)ceilf(y)-2; if (n<0) n=0; if ((n+5)>h) n=h-4; + + //najprej po y (stiri stolpce) + xx=y-n; wy[0]=(-0.75*(xx-5.0)*xx-6.0)*xx+3.0; + xx=xx-1.0; wy[1]=(1.25*xx-2.25)*xx*xx+1.0; + xx=1.0-xx; wy[2]=(1.25*xx-2.25)*xx*xx+1.0; + xx=xx+1.0; wy[3]=(-0.75*(xx-5.0)*xx-6.0)*xx+3.0; + //se po x + xx=x-m; wx[0]=(-0.75*(xx-5.0)*xx-6.0)*xx+3.0; + xx=xx-1.0; wx[1]=(1.25*xx-2.25)*xx*xx+1.0; + xx=1.0-xx; wx[2]=(1.25*xx-2.25)*xx*xx+1.0; + xx=xx+1.0; wx[3]=(-0.75*(xx-5.0)*xx-6.0)*xx+3.0; + + k=4*(n*w+m); u=4*w; + for (b=0;b<4;b++) + { + for (i=0;i<4;i++) + { + p[i]=0.0; + l=k+4*i; + p[i]=wy[0]*sl[l]; l+=u; + p[i]+=wy[1]*sl[l]; l+=u; + p[i]+=wy[2]*sl[l]; l+=u; + p[i]+=wy[3]*sl[l]; + } + k++; + + pp=wx[0]*p[0]; + pp+=wx[1]*p[1]; + pp+=wx[2]*p[2]; + pp+=wx[3]*p[3]; + + if (pp<0.0) pp=0.0; + if (pp>256.0) pp=255.0; + + v[b]=pp; + } + + return 0; +} + +//------------------------------------------------------ +//spline 4x4 interpolacija +//za byte (char) vrednosti +//Helmut Dersch polinom +// *sl vhodni array (slika) +// w,h dimenzija slike je wxh +// x,y tocka, za katero izracuna interpolirano vrednost +// *v interpolirana vrednost +int interpSP4_b(unsigned char *sl, int w, int h, float x, float y, unsigned char *v) +{ + int i,j,m,n; + float pp,p[4],wx[4],wy[4],xx; + +#ifdef TEST_XY_LIMITS + if ((x<0)||(x>w)||(y<0)||(y>h)) return -1; +#endif + + m=(int)ceilf(x)-2; if (m<0) m=0; if ((m+5)>w) m=w-4; + n=(int)ceilf(y)-2; if (n<0) n=0; if ((n+5)>h) n=h-4; + + //najprej po y (stiri stolpce) + xx=y-n; wy[0]=((-0.333333*(xx-1.0)+0.8)*(xx-1.0)-0.466667)*(xx-1.0); + xx=xx-1.0; wy[1]=((xx-1.8)*xx-0.2)*xx+1.0; + xx=1.0-xx; wy[2]=((xx-1.8)*xx-0.2)*xx+1.0; + xx=xx+1.0; wy[3]=((-0.333333*(xx-1.0)+0.8)*(xx-1.0)-0.466667)*(xx-1.0); + //se po x + xx=x-m; wx[0]=((-0.333333*(xx-1.0)+0.8)*(xx-1.0)-0.466667)*(xx-1.0); + xx=xx-1.0; wx[1]=((xx-1.8)*xx-0.2)*xx+1.0; + xx=1.0-xx; wx[2]=((xx-1.8)*xx-0.2)*xx+1.0; + xx=xx+1.0; wx[3]=((-0.333333*(xx-1.0)+0.8)*(xx-1.0)-0.466667)*(xx-1.0); + + for (i=0;i<4;i++) + { + p[i]=0.0; + for (j=0;j<4;j++) + { + p[i]=p[i]+wy[j]*sl[(j+n)*w+i+m]; + } + } + + pp=0.0; + for (i=0;i<4;i++) + pp=pp+wx[i]*p[i]; + + if (pp<0.0) pp=0.0; + if (pp>256.0) pp=255.0; + + *v=pp; + return 0; +} + +//------------------------------------------------------ +//spline 4x4 interpolacija +//za byte (char) vrednosti v packed color 32 bitnem formatu +int interpSP4_b32(unsigned char *sl, int w, int h, float x, float y, unsigned char *v) +{ + int i,j,m,n,b; + float pp,p[4],wx[4],wy[4],xx; + +#ifdef TEST_XY_LIMITS + if ((x<0)||(x>w)||(y<0)||(y>h)) return -1; +#endif + + m=(int)ceilf(x)-2; if (m<0) m=0; if ((m+5)>w) m=w-4; + n=(int)ceilf(y)-2; if (n<0) n=0; if ((n+5)>h) n=h-4; + + //najprej po y (stiri stolpce) + xx=y-n; wy[0]=((-0.333333*(xx-1.0)+0.8)*(xx-1.0)-0.466667)*(xx-1.0); + xx=xx-1.0; wy[1]=((xx-1.8)*xx-0.2)*xx+1.0; + xx=1.0-xx; wy[2]=((xx-1.8)*xx-0.2)*xx+1.0; + xx=xx+1.0; wy[3]=((-0.333333*(xx-1.0)+0.8)*(xx-1.0)-0.466667)*(xx-1.0); + //se po x + xx=x-m; wx[0]=((-0.333333*(xx-1.0)+0.8)*(xx-1.0)-0.466667)*(xx-1.0); + xx=xx-1.0; wx[1]=((xx-1.8)*xx-0.2)*xx+1.0; + xx=1.0-xx; wx[2]=((xx-1.8)*xx-0.2)*xx+1.0; + xx=xx+1.0; wx[3]=((-0.333333*(xx-1.0)+0.8)*(xx-1.0)-0.466667)*(xx-1.0); + + for (b=0;b<4;b++) + { + for (i=0;i<4;i++) + { + p[i]=0.0; + for (j=0;j<4;j++) + { + p[i]=p[i]+wy[j]*sl[4*((j+n)*w+i+m)+b]; + } + } + + pp=0.0; + for (i=0;i<4;i++) + pp=pp+wx[i]*p[i]; + + if (pp<0.0) pp=0.0; + if (pp>256.0) pp=255.0; + + v[b]=pp; + } + + return 0; +} + +//------------------------------------------------------ +//spline 6x6 interpolacija +//za byte (char) vrednosti +//Helmut Dersch polinom +// *sl vhodni array (slika) +// w,h dimenzija slike je wxh +// x,y tocka, za katero izracuna interpolirano vrednost +// *v interpolirana vrednost +//!!! PAZI, TOLE NE DELA CISTO PRAV ??? belina se siri +//!!! zaenkrat sem dodal fudge factor... +int interpSP6_b(unsigned char *sl, int w, int h, float x, float y, unsigned char *v) +{ + int i,j,m,n; + float pp,p[6],wx[6],wy[6],xx; + +#ifdef TEST_XY_LIMITS + if ((x<0)||(x>w)||(y<0)||(y>h)) return -1; +#endif + + m=(int)ceilf(x)-3; if (m<0) m=0; if ((m+7)>w) m=w-6; + n=(int)ceilf(y)-3; if (n<0) n=0; if ((n+7)>h) n=h-6; + + //najprej po y (sest stolpcev) + xx=y-n; + wy[0]=((0.090909*(xx-2.0)-0.215311)*(xx-2.0)+0.124402)*(xx-2.0); + xx=xx-1.0; + wy[1]=((-0.545455*(xx-1.0)+1.291866)*(xx-1.0)-0.746411)*(xx-1.0); + xx=xx-1.0; + wy[2]=((1.181818*xx-2.167464)*xx+0.014354)*xx+1.0; + xx=1.0-xx; + wy[3]=((1.181818*xx-2.167464)*xx+0.014354)*xx+1.0; + xx=xx+1.0; + wy[4]=((-0.545455*(xx-1.0)+1.291866)*(xx-1.0)-0.746411)*(xx-1.0); + xx=xx+1.0; + wy[5]=((0.090909*(xx-2.0)-0.215311)*(xx-2.0)+0.124402)*(xx-2.0); + //se po x + xx=x-m; + wx[0]=((0.090909*(xx-2.0)-0.215311)*(xx-2.0)+0.124402)*(xx-2.0); + xx=xx-1.0; + wx[1]=((-0.545455*(xx-1.0)+1.291866)*(xx-1.0)-0.746411)*(xx-1.0); + xx=xx-1.0; + wx[2]=((1.181818*xx-2.167464)*xx+0.014354)*xx+1.0; + xx=1.0-xx; + wx[3]=((1.181818*xx-2.167464)*xx+0.014354)*xx+1.0; + xx=xx+1.0; + wx[4]=((-0.545455*(xx-1.0)+1.291866)*(xx-1.0)-0.746411)*(xx-1.0); + xx=xx+1.0; + wx[5]=((0.090909*(xx-2.0)-0.215311)*(xx-2.0)+0.124402)*(xx-2.0); + + + for (i=0;i<6;i++) + { + p[i]=0.0; + for (j=0;j<6;j++) + { + p[i]=p[i]+wy[j]*sl[(j+n)*w+i+m]; + } + } + + pp=0.0; + for (i=0;i<6;i++) + pp=pp+wx[i]*p[i]; + + pp=0.947*pp; //fudge factor...!!! cca 0.947... + if (pp<0.0) pp=0.0; + if (pp>256.0) pp=255.0; + + *v=pp; + return 0; +} + +//------------------------------------------------------ +//spline 6x6 interpolacija +//za byte (char) vrednosti v packed color 32 bitnem formatu +//!!! PAZI, TOLE NE DELA CISTO PRAV ??? belina se siri +//!!! zaenkrat sem dodal fudge factor... +int interpSP6_b32(unsigned char *sl, int w, int h, float x, float y, unsigned char *v) +{ + int i,b,j,m,n; + float pp,p[6],wx[6],wy[6],xx; + +#ifdef TEST_XY_LIMITS + if ((x<0)||(x>w)||(y<0)||(y>h)) return -1; +#endif + + m=(int)ceilf(x)-3; if (m<0) m=0; if ((m+7)>w) m=w-6; + n=(int)ceilf(y)-3; if (n<0) n=0; if ((n+7)>h) n=h-6; + + //najprej po y (sest stolpcev) + xx=y-n; + wy[0]=((0.090909*(xx-2.0)-0.215311)*(xx-2.0)+0.124402)*(xx-2.0); + xx=xx-1.0; + wy[1]=((-0.545455*(xx-1.0)+1.291866)*(xx-1.0)-0.746411)*(xx-1.0); + xx=xx-1.0; + wy[2]=((1.181818*xx-2.167464)*xx+0.014354)*xx+1.0; + xx=1.0-xx; + wy[3]=((1.181818*xx-2.167464)*xx+0.014354)*xx+1.0; + xx=xx+1.0; + wy[4]=((-0.545455*(xx-1.0)+1.291866)*(xx-1.0)-0.746411)*(xx-1.0); + xx=xx+1.0; + wy[5]=((0.090909*(xx-2.0)-0.215311)*(xx-2.0)+0.124402)*(xx-2.0); + //se po x + xx=x-m; + wx[0]=((0.090909*(xx-2.0)-0.215311)*(xx-2.0)+0.124402)*(xx-2.0); + xx=xx-1.0; + wx[1]=((-0.545455*(xx-1.0)+1.291866)*(xx-1.0)-0.746411)*(xx-1.0); + xx=xx-1.0; + wx[2]=((1.181818*xx-2.167464)*xx+0.014354)*xx+1.0; + xx=1.0-xx; + wx[3]=((1.181818*xx-2.167464)*xx+0.014354)*xx+1.0; + xx=xx+1.0; + wx[4]=((-0.545455*(xx-1.0)+1.291866)*(xx-1.0)-0.746411)*(xx-1.0); + xx=xx+1.0; + wx[5]=((0.090909*(xx-2.0)-0.215311)*(xx-2.0)+0.124402)*(xx-2.0); + + + for (b=0;b<4;b++) + { + for (i=0;i<6;i++) + { + p[i]=0.0; + for (j=0;j<6;j++) + { + p[i]=p[i]+wy[j]*sl[4*((j+n)*w+i+m)+b]; + } + } + + pp=0.0; + for (i=0;i<6;i++) + pp=pp+wx[i]*p[i]; + + pp=0.947*pp; //fudge factor...!!! cca 0.947... + if (pp<0.0) pp=0.0; + if (pp>256.0) pp=255.0; + + v[b]=pp; + } + + return 0; +} + +//------------------------------------------------------ +//truncated sinc "lanczos" 16x16 interpolacija +//za byte (char) vrednosti +// *sl vhodni array (slika) +// w,h dimenzija slike je wxh +// x,y tocka, za katero izracuna interpolirano vrednost +// *v interpolirana vrednost +int interpSC16_b(unsigned char *sl, int w, int h, float x, float y, unsigned char *v) +{ + int i,j,m,n; + float pp,p[16],wx[16],wy[16],xx,xxx,x1; + float PI=3.141592654; + +#ifdef TEST_XY_LIMITS + if ((x<0)||(x>w)||(y<0)||(y>h)) return -1; +#endif + + m=(int)ceilf(x)-8; if (m<0) m=0; if ((m+17)>w) m=w-16; + n=(int)ceilf(y)-8; if (n<0) n=0; if ((n+17)>h) n=h-16; + + //najprej po y + xx=y-n; + for (i=7;i>=0;i--) + { + x1=xx*PI; + wy[7-i]=(sin(x1)/(x1))*(sin(x1*0.125)/(x1*0.125)); + xxx=(float)(2*i+1)-xx; + x1=xxx*PI; + wy[8+i]=(sin(x1)/(x1))*(sin(x1*0.125)/(x1*0.125)); + xx=xx-1.0; + } + //se po x + xx=x-m; + for (i=7;i>=0;i--) + { + x1=xx*PI; + wx[7-i]=(sin(x1)/(x1))*(sin(x1*0.125)/(x1*0.125)); + xxx=(float)(2*i+1)-xx; + x1=xxx*PI; + wx[8+i]=(sin(x1)/(x1))*(sin(x1*0.125)/(x1*0.125)); + xx=xx-1.0; + } + + for (i=0;i<16;i++) + { + p[i]=0.0; + for (j=0;j<16;j++) + { + p[i]=p[i]+wy[j]*sl[(j+n)*w+i+m]; + } + } + + pp=0.0; + for (i=0;i<16;i++) + pp=pp+wx[i]*p[i]; + + if (pp<0.0) pp=0.0; + if (pp>256.0) pp=255.0; + + *v=pp; + return 0; +} + +//------------------------------------------------------ +//truncated sinc "lanczos" 16x16 interpolacija +//za byte (char) vrednosti v packed color 32 bitnem formatu +int interpSC16_b32(unsigned char *sl, int w, int h, float x, float y, unsigned char *v) +{ + int i,j,m,b,n; + float pp,p[16],wx[16],wy[16],xx,xxx,x1; + float PI=3.141592654; + +#ifdef TEST_XY_LIMITS + if ((x<0)||(x>w)||(y<0)||(y>h)) return -1; +#endif + + m=(int)ceilf(x)-8; if (m<0) m=0; if ((m+17)>w) m=w-16; + n=(int)ceilf(y)-8; if (n<0) n=0; if ((n+17)>h) n=h-16; + + //najprej po y + xx=y-n; + for (i=7;i>=0;i--) + { + x1=xx*PI; + wy[7-i]=(sin(x1)/(x1))*(sin(x1*0.125)/(x1*0.125)); + xxx=(float)(2*i+1)-xx; + x1=xxx*PI; + wy[8+i]=(sin(x1)/(x1))*(sin(x1*0.125)/(x1*0.125)); + xx=xx-1.0; + } + //se po x + xx=x-m; + for (i=7;i>=0;i--) + { + x1=xx*PI; + wx[7-i]=(sin(x1)/(x1))*(sin(x1*0.125)/(x1*0.125)); + xxx=(float)(2*i+1)-xx; + x1=xxx*PI; + wx[8+i]=(sin(x1)/(x1))*(sin(x1*0.125)/(x1*0.125)); + xx=xx-1.0; + } + + for (b=0;b<4;b++) + { + for (i=0;i<16;i++) + { + p[i]=0.0; + for (j=0;j<16;j++) + { + p[i]=p[i]+wy[j]*sl[4*((j+n)*w+i+m)+b]; + } + } + + pp=0.0; + for (i=0;i<16;i++) + pp=pp+wx[i]*p[i]; + + if (pp<0.0) pp=0.0; + if (pp>256.0) pp=255.0; + + v[b]=pp; + } + + return 0; +} diff --git a/src/filter/cartoon/CMakeLists.txt b/src/filter/cartoon/CMakeLists.txt new file mode 100644 index 0000000..2a6dd0e --- /dev/null +++ b/src/filter/cartoon/CMakeLists.txt @@ -0,0 +1,11 @@ +set (SOURCES cartoon.cpp) +set (TARGET cartoon) + +if (MSVC) + set (SOURCES ${SOURCES} ${FREI0R_DEF}) +endif (MSVC) + +add_library (${TARGET} MODULE ${SOURCES}) +set_target_properties (${TARGET} PROPERTIES PREFIX "") + +install (TARGETS ${TARGET} LIBRARY DESTINATION ${LIBDIR}) diff --git a/src/filter/cartoon/cartoon.cpp b/src/filter/cartoon/cartoon.cpp index ab7fc0f..45297e8 100644 --- a/src/filter/cartoon/cartoon.cpp +++ b/src/filter/cartoon/cartoon.cpp @@ -90,6 +90,7 @@ free(conBuffer); free(yprecal); } + delete geo; } virtual void update() { diff --git a/src/filter/cluster/CMakeLists.txt b/src/filter/cluster/CMakeLists.txt new file mode 100644 index 0000000..e335568 --- /dev/null +++ b/src/filter/cluster/CMakeLists.txt @@ -0,0 +1,12 @@ +set (SOURCES cluster.c) +set (TARGET cluster) + +if (MSVC) + set_source_files_properties (cluster.c PROPERTIES LANGUAGE CXX) + set (SOURCES ${SOURCES} ${FREI0R_DEF}) +endif (MSVC) + +add_library (${TARGET} MODULE ${SOURCES}) +set_target_properties (${TARGET} PROPERTIES PREFIX "") + +install (TARGETS ${TARGET} LIBRARY DESTINATION ${LIBDIR}) diff --git a/src/filter/cluster/cluster.c b/src/filter/cluster/cluster.c index f7b6e9e..e6a1b61 100644 --- a/src/filter/cluster/cluster.c +++ b/src/filter/cluster/cluster.c @@ -86,7 +86,7 @@ inverterInfo->name = "K-Means Clustering"; inverterInfo->author = "binarymillenium"; inverterInfo->plugin_type = F0R_PLUGIN_TYPE_FILTER; - inverterInfo->color_model = F0R_COLOR_MODEL_BGRA8888; + inverterInfo->color_model = F0R_COLOR_MODEL_RGBA8888; inverterInfo->frei0r_version = FREI0R_MAJOR_VERSION; inverterInfo->major_version = 0; inverterInfo->minor_version = 1; @@ -121,7 +121,7 @@ f0r_instance_t f0r_construct(unsigned int width, unsigned int height) { - cluster_instance_t* inst = calloc(1, sizeof(*inst)); + cluster_instance_t* inst = (cluster_instance_t*)calloc(1, sizeof(*inst)); inst->width = width; inst->height = height; diff --git a/src/filter/coloradj/CMakeLists.txt b/src/filter/coloradj/CMakeLists.txt new file mode 100644 index 0000000..f2f2ef5 --- /dev/null +++ b/src/filter/coloradj/CMakeLists.txt @@ -0,0 +1,12 @@ +set (SOURCES coloradj_RGB.c) +set (TARGET coloradj_RGB) + +if (MSVC) + set_source_files_properties (coloradj_RGB.c PROPERTIES LANGUAGE CXX) + set (SOURCES ${SOURCES} ${FREI0R_DEF}) +endif (MSVC) + +add_library (${TARGET} MODULE ${SOURCES}) +set_target_properties (${TARGET} PROPERTIES PREFIX "") + +install (TARGETS ${TARGET} LIBRARY DESTINATION ${LIBDIR}) diff --git a/src/filter/coloradj/coloradj_RGB.c b/src/filter/coloradj/coloradj_RGB.c new file mode 100755 index 0000000..d3ef7d9 --- /dev/null +++ b/src/filter/coloradj/coloradj_RGB.c @@ -0,0 +1,512 @@ +/* +coloradj_RGB.c + +This frei0r plugin is for simple RGB color adjustment +Version 0.1 jul 2010 + +Copyright (C) 2010 Marko Cebokli http://lea.hamradio.si/~s57uuu + + + 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. + +*/ + + +//compile: gcc -c -fPIC -Wall coloradj_RGB.c -o coloradj_RGB.o +//link: gcc -shared -lm -o coloradj_RGB.so coloradj_RGB.o + +//#include +#include +#include +#include + +#include + +//------------------------------------------------------ +//computes x to the power p +//only for positive x +float pwr(float x, float p) +{ +if (x<=0) return 0; +return expf(p*logf(x)); +} + +//----------------------------------------------------- +//stretch [0...1] to parameter range [min...max] logarithmic +//min and max must be positive! +float map_value_forward_log(double v, float min, float max) +{ +float sr,k; + +sr=sqrtf(min*max); +k=2.0*log(max/sr); +return sr*expf(k*(v-0.5)); +} + +//--------------------------------------- +//8 bit RGB lookup table +typedef struct + { + unsigned char r[256]; + unsigned char g[256]; + unsigned char b[256]; + } lut_s; + +//------------------------------------------------------- +// "Add constant" +//norm=0 don't normalize norm=1 do normalize +void make_lut1(float r, float g, float b, lut_s *lut, int norm, int cm) +{ +int i; +float rr,gg,bb,l; + +for (i=0;i<256;i++) + { + rr=(float)i+(r-0.5)*150.0; if (rr<0.0) rr=0.0; + gg=(float)i+(g-0.5)*150.0; if (gg<0.0) gg=0.0; + bb=(float)i+(b-0.5)*150.0; if (bb<0.0) bb=0.0; + + if (norm==1) + { + switch (cm) + { + case 0: //rec 601 + { + l = 0.299*rr + 0.587*rr + 0.114*bb; + break; + } + case 1: //rec 709 + { + l = 0.2126*rr + 0.7152*gg + 0.0722*bb; + break; + } + default: + { + l=(float)i; + break; + } + } + if (l>0.0) + { + rr=rr*(float)i/l; + gg=gg*(float)i/l; + bb=bb*(float)i/l; + } + else + { + rr=0.0; gg=0.0; bb=0.0; + } + } + + if (rr>255.0) rr=255.0; + if (gg>255.0) gg=255.0; + if (bb>255.0) bb=255.0; + lut->r[i]=rintf(rr); + lut->g[i]=rintf(gg); + lut->b[i]=rintf(bb); + } +} + +//------------------------------------------------------- +// "Change gamma" +//norm=0 don't normalize norm=1 do normalize +void make_lut2(float r, float g, float b, lut_s *lut, int norm, int cm) +{ +int i; +float rr,gg,bb,gama,l; + +for (i=0;i<256;i++) + { + gama=map_value_forward_log(r,3.0,0.3333); + rr=255.0*pwr((float)i/255.0,gama); + gama=map_value_forward_log(g,3.0,0.3333); + gg=255.0*pwr((float)i/255.0,gama); + gama=map_value_forward_log(b,3.0,0.3333); + bb=255.0*pwr((float)i/255.0,gama); + + if (norm==1) + { + switch (cm) + { + case 0: //rec 601 + { + l = 0.299*rr + 0.587*gg + 0.114*bb; + break; + } + case 1: //rec 709 + { + l = 0.2126*rr + 0.7152*gg + 0.0722*bb; + break; + } + default: + { + l=(float)i; + break; + } + } + if (l>0.0) + { + rr=rr*(float)i/l; + gg=gg*(float)i/l; + bb=bb*(float)i/l; + } + else + { + rr=0.0; gg=0.0; bb=0.0; + } + } + + if (rr>255.0) rr=255.0; if (rr<0.0) rr=0.0; + if (gg>255.0) gg=255.0; if (gg<0.0) gg=0.0; + if (bb>255.0) bb=255.0; if (bb<0.0) bb=0.0; + lut->r[i]=rintf(rr); + lut->g[i]=rintf(gg); + lut->b[i]=rintf(bb); + } +} + +//------------------------------------------------------- +// "Multiply" +//norm=0 don't normalize norm=1 do normalize +void make_lut3(float r, float g, float b, lut_s *lut, int norm, int cm) +{ +int i; +float rr,gg,bb,l; + +for (i=0;i<256;i++) + { + rr=(float)i*map_value_forward_log(r,0.3333,3.0); + gg=(float)i*map_value_forward_log(g,0.3333,3.0); + bb=(float)i*map_value_forward_log(b,0.3333,3.0); + + if (norm==1) + { + switch (cm) + { + case 0: //rec 601 + { + l = 0.299*rr + 0.587*gg + 0.114*bb; + break; + } + case 1: //rec 709 + { + l = 0.2126*rr + 0.7152*gg + 0.0722*bb; + break; + } + default: + { + l=(float)i; + break; + } + } + if (l>0.0) + { + rr=rr*(float)i/l; + gg=gg*(float)i/l; + bb=bb*(float)i/l; + } + else + { + rr=0.0; gg=0.0; bb=0.0; + } + } + + if (rr>255.0) rr=255.0; if (rr<0.0) rr=0.0; + if (gg>255.0) gg=255.0; if (gg<0.0) gg=0.0; + if (bb>255.0) bb=255.0; if (bb<0.0) bb=0.0; + lut->r[i]=rintf(rr); + lut->g[i]=rintf(gg); + lut->b[i]=rintf(bb); + } +} + +//---------------------------------------------------- +//F0R_COLOR_MODEL_RGBA8888 little endian +void apply_lut(const uint32_t* inframe, uint32_t* outframe, int size, lut_s *lut, int ac) +{ +int i; +uint32_t r,g,b,a; + +if (ac==0) + { + for (i=0;ir[inframe[i]&255]; + outframe[i] = outframe[i] + ((lut->g[(inframe[i]>>8)&255])<<8); + outframe[i] = outframe[i] + ((lut->b[(inframe[i]>>16)&255])<<16); + outframe[i] = outframe[i] + (inframe[i]&0xFF000000); + } + } +else //alpha controlled + { + for (i=0;i>24)&255; + r = (255-a)*(inframe[i]&255) + a*lut->r[inframe[i]&255]; + g = (255-a)*((inframe[i]>>8)&255) + a*lut->g[(inframe[i]>>8)&255]; + b = (255-a)*((inframe[i]>>16)&255) + a*lut->b[(inframe[i]>>16)&255]; + outframe[i] = r/255 + ((g/255)<<8) + ((b/255)<<16); + outframe[i] = outframe[i] + (inframe[i]&0xFF000000); + } + } +} + +//----------------------------------------------------- +//stretch [0...1] to parameter range [min...max] linear +float map_value_forward(double v, float min, float max) +{ +return min+(max-min)*v; +} + +//----------------------------------------------------- +//collapse from parameter range [min...max] to [0...1] linear +double map_value_backward(float v, float min, float max) +{ +return (v-min)/(max-min); +} + +//---------------------------------------- +//struktura za instanco efekta +typedef struct +{ +int h; +int w; +float r,g,b; +int act; +int norm; +int ac; +int cm; +lut_s *lut; +} inst; + +//*********************************************** +// OBVEZNE FREI0R FUNKCIJE + +//----------------------------------------------- +int f0r_init() +{ +return 1; +} + +//------------------------------------------------ +void f0r_deinit() +{ +} + +//----------------------------------------------- +void f0r_get_plugin_info(f0r_plugin_info_t* info) +{ + +info->name="coloradj_RGB"; +info->author="Marko Cebokli"; +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=7; +info->explanation="Simple color adjustment"; +} + +//-------------------------------------------------- +void f0r_get_param_info(f0r_param_info_t* info, int param_index) +{ +switch(param_index) + { + case 0: + info->name = "R"; + info->type = F0R_PARAM_DOUBLE; + info->explanation = "Amount of red"; + break; + case 1: + info->name = "G"; + info->type = F0R_PARAM_DOUBLE; + info->explanation = "Amount of green"; + break; + case 2: + info->name = "B"; + info->type = F0R_PARAM_DOUBLE; + info->explanation = "Amount of blue"; + break; + case 3: + info->name = "Action"; + info->type = F0R_PARAM_DOUBLE; + info->explanation = "Type of color adjustment"; + break; + case 4: + info->name = "Keep luma"; + info->type = F0R_PARAM_BOOL; + info->explanation = "Don't change brightness"; + break; + case 5: + info->name = "Alpha controlled"; + info->type = F0R_PARAM_BOOL; + info->explanation = "Adjust only areas with nonzero alpha"; + break; + case 6: + info->name = "Luma formula"; + info->type = F0R_PARAM_DOUBLE; + info->explanation = ""; + break; + } +} + +//---------------------------------------------- +f0r_instance_t f0r_construct(unsigned int width, unsigned int height) +{ +inst *in; + +in=calloc(1,sizeof(inst)); +in->w=width; +in->h=height; +in->r = 0.5; +in->g = 0.5; +in->b = 0.5; +in->act=1; //change gamma +in->norm=1; //keep luma +in->ac=0; //alpha controlled OFF +in->cm=1; //rec 709 + +in->lut=(lut_s*)calloc(1,sizeof(lut_s)); +make_lut1(0.5,0.5,0.5,in->lut,0,1); + +return (f0r_instance_t)in; +} + +//--------------------------------------------------- +void f0r_destruct(f0r_instance_t instance) +{ +inst *in; + +in=(inst*)instance; + +free(in->lut); +free(instance); +} + +//----------------------------------------------------- +void f0r_set_param_value(f0r_instance_t instance, f0r_param_t parm, int param_index) +{ +inst *p; +double tmpf; +int tmpi,chg; + +p=(inst*)instance; + +chg=0; +switch(param_index) + { + case 0: + tmpf=*(double*)parm; + if (tmpf!=p->r) chg=1; + p->r=tmpf; + break; + case 1: + tmpf=*(double*)parm; + if (tmpf!=p->g) chg=1; + p->g=tmpf; + break; + case 2: + tmpf=*(double*)parm; + if (tmpf!=p->b) chg=1; + p->b=tmpf; + break; + case 3: + tmpi=map_value_forward(*((double*)parm), 0.0, 2.9999); + if (tmpi != p->act) chg=1; + p->act=tmpi; + break; + case 4: + tmpi=map_value_forward(*((double*)parm), 0.0, 1.0); //BOOL!! + if (p->norm != tmpi) chg=1; + p->norm=tmpi; + break; + case 5: + tmpi=map_value_forward(*((double*)parm), 0.0, 1.0); //BOOL!! + if (p->ac != tmpi) chg=1; + p->ac=tmpi; + break; + case 6: + tmpi=map_value_forward(*((double*)parm), 0.0, 1.9999); + if (p->cm != tmpi) chg=1; + p->cm=tmpi; + break; + } + +if (chg==0) return; + +switch(p->act) + { + case 0: + make_lut1(p->r,p->g,p->b,p->lut,p->norm,p->cm); + break; + case 1: + make_lut2(p->r,p->g,p->b,p->lut,p->norm,p->cm); + break; + case 2: + make_lut3(p->r,p->g,p->b,p->lut,p->norm,p->cm); + break; + } + +} + +//-------------------------------------------------- +void f0r_get_param_value(f0r_instance_t instance, f0r_param_t param, int param_index) +{ +inst *p; +double tmpf; +int tmpi; + +p=(inst*)instance; + +switch(param_index) + { + case 0: + *((double*)param)=p->r; + break; + case 1: + *((double*)param)=p->g; + break; + case 2: + *((double*)param)=p->b; + break; + case 3: + *((double*)param)=map_value_backward(p->act, 0.0, 2.9999); + break; + case 4: + *((double*)param)=map_value_backward(p->norm, 0.0, 1.0);//BOOL!! + break; + case 5: + *((double*)param)=map_value_backward(p->ac, 0.0, 1.0);//BOOL!! + break; + case 6: + *((double*)param)=map_value_backward(p->cm, 0.0, 1.9999); + break; + } +} + +//------------------------------------------------- +void f0r_update(f0r_instance_t instance, double time, const uint32_t* inframe, uint32_t* outframe) +{ +inst *in; + +assert(instance); +in=(inst*)instance; + +apply_lut(inframe,outframe,in->w*in->h, in->lut, in->ac); + +} + +//********************************************************** diff --git a/src/filter/coloradj/readme b/src/filter/coloradj/readme new file mode 100755 index 0000000..76f80f5 --- /dev/null +++ b/src/filter/coloradj/readme @@ -0,0 +1,70 @@ +coloradj* + +These plugins are for manual color adjustment. +For (semi)automatic color correction, use "balanc0r" and/or +"three_point_balance" plugins. + + +Included are the following plugins: + +coloradj_RGB: simple RGB manual color adjustment + + +Written by Marko Cebokli, jul 2010, and released under GNU GPL + + +RELEASE NOTES + +** jul 2010 +Version 0.1 +"pre-alpha" (throw it out and see what happens... :-) + + + + + + ****** DESCRIPTIONS OF EACH PLUGIN FOLLOW ****** + +COLORADJ_RGB + +This plugin is for simple manual color adjustment by RGB channel, either +through adding constants, or changing the channel gammas or gains. + +By "simple" I mean that it works channel-wise, no crosstalk. The +off-diagonal elements of the transform matrix are zero - no color +crosstalk, no color space rotation. +But this should be sufficient for many tasks. For example, when +shooting under tungsten light, the blue signal will not migrate into +red, it will simply be too small. Amplifying the blue (and a bit +of green too) should be all that is needed. Similar, an underwater +shot will simply be red deficient, needing some red boost, etc. + +parameters: + +R,G,B: +these determine the change in each of the three color channels. + +Action: +"Add constant" adds a fixed value between -150 and +150 (this + is sometimes called "black level" or "setup"). +"Change gamma" changes channel gamma between 0.3333 and 3.0. +"Multiply" multiplies channel with a value between 0.3333 + and 3.0 (sometimes called "gain" or "contrast") + +NOTE1: to apply more than one action above, use cascaded instances of +coloradj_RGB. +NOTE2: "Add constant" simply shifts the RGB "cube" colorspace. This +means, that on one end we are left with empty space, which is filled +with zeros, and on the other end, values can "fall outside", and in this +case they will be truncated to max (255). +"Change gain" changes the size of the cube, keeping the "black" corner +fixed, affecting predominately highlights, but the other end can still +"fall out" and get 255 truncated. +"Change gamma" keeps the whole cube in the same place, just stretches +and squeezes its interior, so no zero filling or truncation is necessary. +To visualize this plugin's actions, apply it to "test_pat_L" pattern 2, +and watch the result with "pr0file". + +Keep luma: +Fixes the luma value, so that the sliders only affect color. + diff --git a/src/filter/colordistance/CMakeLists.txt b/src/filter/colordistance/CMakeLists.txt new file mode 100644 index 0000000..6ab5bfc --- /dev/null +++ b/src/filter/colordistance/CMakeLists.txt @@ -0,0 +1,12 @@ +set (SOURCES colordistance.c) +set (TARGET colordistance) + +if (MSVC) + set_source_files_properties (colordistance.c PROPERTIES LANGUAGE CXX) + set (SOURCES ${SOURCES} ${FREI0R_DEF}) +endif (MSVC) + +add_library (${TARGET} MODULE ${SOURCES}) +set_target_properties (${TARGET} PROPERTIES PREFIX "") + +install (TARGETS ${TARGET} LIBRARY DESTINATION ${LIBDIR}) diff --git a/src/filter/colordistance/colordistance.c b/src/filter/colordistance/colordistance.c index c107a56..4dbcbcb 100644 --- a/src/filter/colordistance/colordistance.c +++ b/src/filter/colordistance/colordistance.c @@ -50,7 +50,7 @@ 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"; + 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) @@ -68,7 +68,7 @@ f0r_instance_t f0r_construct(unsigned int width, unsigned int height) { - colordistance_instance_t* inst = calloc(1, sizeof(*inst)); + colordistance_instance_t* inst = (colordistance_instance_t*)calloc(1, sizeof(*inst)); inst->width = width; inst->height = height; inst->color.r = 0.5; inst->color.g = 0.5; @@ -109,6 +109,11 @@ } +#if defined(_MSC_VER) +__inline const int rint(float x){ + return (int)(x+0.5); +} +#endif void f0r_update(f0r_instance_t instance, double time, const uint32_t* inframe, uint32_t* outframe) diff --git a/src/filter/contrast0r/CMakeLists.txt b/src/filter/contrast0r/CMakeLists.txt new file mode 100644 index 0000000..4df0d03 --- /dev/null +++ b/src/filter/contrast0r/CMakeLists.txt @@ -0,0 +1,12 @@ +set (SOURCES contrast0r.c) +set (TARGET contrast0r) + +if (MSVC) + set_source_files_properties (contrast0r.c PROPERTIES LANGUAGE CXX) + set (SOURCES ${SOURCES} ${FREI0R_DEF}) +endif (MSVC) + +add_library (${TARGET} MODULE ${SOURCES}) +set_target_properties (${TARGET} PROPERTIES PREFIX "") + +install (TARGETS ${TARGET} LIBRARY DESTINATION ${LIBDIR}) diff --git a/src/filter/contrast0r/contrast0r.c b/src/filter/contrast0r/contrast0r.c index a472463..f171bcc 100644 --- a/src/filter/contrast0r/contrast0r.c +++ b/src/filter/contrast0r/contrast0r.c @@ -79,7 +79,7 @@ f0r_instance_t f0r_construct(unsigned int width, unsigned int height) { - contrast0r_instance_t* inst = calloc(1, sizeof(*inst)); + contrast0r_instance_t* inst = (contrast0r_instance_t*)calloc(1, sizeof(*inst)); inst->width = width; inst->height = height; /* init look-up-table */ update_lut(inst); diff --git a/src/filter/curves/CMakeLists.txt b/src/filter/curves/CMakeLists.txt new file mode 100644 index 0000000..6a71f7e --- /dev/null +++ b/src/filter/curves/CMakeLists.txt @@ -0,0 +1,17 @@ +# Set C99 flag for gcc +if (CMAKE_COMPILER_IS_GNUCC) + set(CMAKE_C_FLAGS "-std=c99") +endif (CMAKE_COMPILER_IS_GNUCC) + +set (SOURCES curves.c) +set (TARGET curves) + +if (MSVC) + set_source_files_properties (curves.c PROPERTIES LANGUAGE CXX) + set (SOURCES ${SOURCES} ${FREI0R_DEF}) +endif (MSVC) + +add_library (${TARGET} MODULE ${SOURCES}) +set_target_properties (${TARGET} PROPERTIES PREFIX "") + +install (TARGETS ${TARGET} LIBRARY DESTINATION ${LIBDIR}) diff --git a/src/filter/curves/curves.c b/src/filter/curves/curves.c index b7b7a1e..96c68d1 100644 --- a/src/filter/curves/curves.c +++ b/src/filter/curves/curves.c @@ -1,5 +1,6 @@ /* curves.c * Copyright (C) 2009 Maksim Golovkin (m4ks1k@gmail.com) + * Copyright (C) 2010 Till Theato (root@ttill.de) * This file is a Frei0r plugin. * * This program is free software; you can redistribute it and/or modify @@ -17,6 +18,9 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#ifndef _GNU_SOURCE +#define _GNU_SOURCE +#endif #include #include #include @@ -25,10 +29,9 @@ #include "frei0r.h" #include "frei0r_math.h" -#define CHANNEL_RED 0 -#define CHANNEL_GREEN 1 -#define CHANNEL_BLUE 2 -#define CHANNEL_LUMA 3 + +#define MAX3(a, b, c) ( ( a > b && a > c) ? a : (b > c ? b : c) ) +#define MIN3(a, b, c) ( ( a < b && a < c) ? a : (b < c ? b : c) ) #define POS_TOP_LEFT 0 #define POS_TOP_RIGHT 1 @@ -39,24 +42,134 @@ #define INPUT_VALUE " input value" #define OUTPUT_VALUE " output value" +enum CHANNELS { CHANNEL_RED = 0, CHANNEL_GREEN, CHANNEL_BLUE, CHANNEL_ALPHA, CHANNEL_LUMA, CHANNEL_RGB, CHANNEL_HUE, CHANNEL_SATURATION }; + +typedef struct position +{ + double x; + double y; +} position; + +typedef position bspline_point[3]; // [0] = handle1, [1] = point, [2] = handle2 + + typedef struct curves_instance { unsigned int width; unsigned int height; - double channel; + enum CHANNELS channel; double pointNumber; double points[10]; double drawCurves; double curvesPosition; + double formula; + + char *bspline; + double *bsplineMap; } curves_instance_t; + + +// color conversion functions taken from: +// http://www.cs.rit.edu/~ncs/color/t_convert.html +// slightly modified + +// r,g,b values are from 0 to 255 +// h = [0,360], s = [0,1], v = [0,1] +// if s == 0, then h = -1 (undefined) +void RGBtoHSV(double r, double g, double b, double *h, double *s, double *v) +{ + double min = MIN3(r, g, b); + double max = MAX3(r, g, b); + *v = max / 255.; + + double delta = max - min; + + if (delta != 0) { + *s = delta / max; // s + } else { + // r = g = b // s = 0 + *s = 0; + *h = -1; + return; + } + + if (r == max) + *h = (g - b) / delta; // between yellow & magenta + else if (g == max) + *h = 2 + (b - r) / delta; // between cyan & yellow + else + *h = 4 + (r - g) / delta; // between magenta & cyan + + *h *= 60; // degrees + if (*h < 0) + *h += 360; +} + +// r,g,b values are from 0 to 1 +// h = [0,360], s = [0,1], v = [0,1] +void HSVtoRGB(double *r, double *g, double *b, double h, double s, double v) +{ + if (s == 0) { + // achromatic (grey) + *r = *g = *b = v; + return; + } + + h /= 60; // sector 0 to 5 + int i = (int)h; + double f = h - i; // factorial part of h + double p = v * (1 - s); + + if (i & 1) { + double q = v * (1 - s * f); + switch (i) { + case 1: + *r = q; + *g = v; + *b = p; + break; + case 3: + *r = p; + *g = q; + *b = v; + break; + case 5: + *r = v; + *g = p; + *b = q; + break; + } + } else { + double t = v * (1 - s * (1 - f)); + switch (i) { + case 0: + *r = v; + *g = t; + *b = p; + break; + case 2: + *r = p; + *g = v; + *b = t; + break; + case 4: + *r = t; + *g = p; + *b = v; + break; + } + } +} + +void updateBsplineMap(f0r_instance_t instance); char **param_names = NULL; int f0r_init() { - param_names = calloc(10, sizeof(char *)); + param_names = (char**)calloc(10, sizeof(char *)); for(int i = 0; i < 10; i++) { char *val = i % 2 == 0?INPUT_VALUE:OUTPUT_VALUE; - param_names[i] = calloc(strlen(POINT) + 2 + strlen(val), sizeof(char)); + param_names[i] = (char*)calloc(strlen(POINT) + 2 + strlen(val), sizeof(char)); sprintf(param_names[i], "%s%d%s", POINT, i / 2 + 1, val); } return 1; @@ -72,13 +185,13 @@ void f0r_get_plugin_info(f0r_plugin_info_t* curves_info) { curves_info->name = "Curves"; - curves_info->author = "Maksim Golovkin"; + curves_info->author = "Maksim Golovkin, Till Theato"; curves_info->plugin_type = F0R_PLUGIN_TYPE_FILTER; curves_info->color_model = F0R_COLOR_MODEL_RGBA8888; curves_info->frei0r_version = FREI0R_MAJOR_VERSION; - curves_info->major_version = 0; - curves_info->minor_version = 1; - curves_info->num_params = 14; + curves_info->major_version = 0; + curves_info->minor_version = 2; + curves_info->num_params = 16; curves_info->explanation = "Adjust luminance or color channel intensity with curve level mapping"; } @@ -93,7 +206,7 @@ case 0: info->name = "Channel"; info->type = F0R_PARAM_DOUBLE; - info->explanation = "Channel to adjust levels (1 = RED; 2 = GREEN; 3 = BLUE; 4 = LUMA)"; + info->explanation = "Channel to adjust (0 = red, 0.1 = green, 0.2 = blue, 0.3 = alpha, 0.4 = luma, 0.5 = rgb, 0.6 = hue, 0.7 = saturation)"; break; case 1: info->name = "Show curves"; @@ -108,13 +221,22 @@ case 3: info->name = "Curve point number"; info->type = F0R_PARAM_DOUBLE; - info->explanation = "Number of point to use to build curve"; + info->explanation = "Number of points to use to build curve"; break; + case 4: + info->name = "Luma formula"; + info->type = F0R_PARAM_BOOL; + info->explanation = "Use Rec. 601 (false) or Rec. 709 (true)"; + break; + case 5: + info->name = "Bézier spline"; + info->type = F0R_PARAM_STRING; + info->explanation = "Use cubic Bézier spline. Has to be a sorted list of points in the format \"handle1x;handle1y#pointx;pointy#handle2x;handle2y\"(pointx = in, pointy = out). Points are separated by a \"|\".The values can have \"double\" precision. x, y for points should be in the range 0-1. x,y for handles might also be out of this range."; default: - if (param_index > 3) { - info->name = get_param_name(param_index - 4); + if (param_index > 5) { + info->name = get_param_name(param_index - 6); info->type = F0R_PARAM_DOUBLE; - info->explanation = get_param_name(param_index - 4); + info->explanation = get_param_name(param_index - 6); } break; } @@ -122,12 +244,15 @@ f0r_instance_t f0r_construct(unsigned int width, unsigned int height) { - curves_instance_t* inst = calloc(1, sizeof(*inst)); + curves_instance_t* inst = (curves_instance_t*)calloc(1, sizeof(*inst)); inst->width = width; inst->height = height; - inst->channel = 0; + inst->channel = CHANNEL_RGB; inst->drawCurves = 1; inst->curvesPosition = 3; inst->pointNumber = 2; + inst->formula = 1; + inst->bspline = calloc(1, sizeof(char)); + inst->bsplineMap = malloc(sizeof(double)); inst->points[0] = 0; inst->points[1] = 0; inst->points[2] = 1; @@ -143,6 +268,8 @@ void f0r_destruct(f0r_instance_t instance) { + free(((curves_instance_t*)instance)->bspline); + free(((curves_instance_t*)instance)->bsplineMap); free(instance); } @@ -152,10 +279,35 @@ assert(instance); curves_instance_t* inst = (curves_instance_t*)instance; + double tmp; + f0r_param_string bspline; + switch(param_index) { case 0: - inst->channel = *((f0r_param_double *)param); + tmp = *((f0r_param_double *)param); + if (tmp >= 1) { + // legacy support + if (tmp == 3) { + if (inst->channel != CHANNEL_LUMA) { + inst->channel = CHANNEL_LUMA; + if (strlen(inst->bspline)) + updateBsplineMap(instance); + } + } else { + if ((int)inst->channel != (int)tmp) { + inst->channel = (enum CHANNELS)((int)tmp); + if (strlen(inst->bspline)) + updateBsplineMap(instance); + } + } + } else { + if ((int)inst->channel != (int)(tmp * 10)) { + inst->channel = (enum CHANNELS)(tmp * 10); + if (strlen(inst->bspline)) + updateBsplineMap(instance); + } + } break; case 1: inst->drawCurves = *((f0r_param_double *)param); @@ -166,9 +318,20 @@ case 3: inst->pointNumber = *((f0r_param_double *)param); break; + case 4: + inst->formula = *((f0r_param_double *)param); + break; + case 5: + bspline = *((f0r_param_string *)param); + if (strcmp(inst->bspline, bspline) != 0) { + free(inst->bspline); + inst->bspline = strdup(bspline); + updateBsplineMap(instance); + } + break; default: - if (param_index > 3) - inst->points[param_index - 4] = *((f0r_param_double *)param); //Assigning value to curve point + if (param_index > 5) + inst->points[param_index - 6] = *((f0r_param_double *)param); //Assigning value to curve point break; } } @@ -178,11 +341,11 @@ { assert(instance); curves_instance_t* inst = (curves_instance_t*)instance; - + switch(param_index) { case 0: - *((f0r_param_double *)param) = inst->channel; + *((f0r_param_double *)param) = inst->channel / 10.; break; case 1: *((f0r_param_double *)param) = inst->drawCurves; @@ -193,9 +356,15 @@ case 3: *((f0r_param_double *)param) = inst->pointNumber; break; + case 4: + *((f0r_param_double *)param) = inst->formula; + break; + case 5: + *((f0r_param_string *)param) = inst->bspline; + break; default: - if (param_index > 3) - *((f0r_param_double *)param) = inst->points[3]; //Fetch curve point value + if (param_index > 5) + *((f0r_param_double *)param) = inst->points[param_index - 6]; //Fetch curve point value break; } } @@ -226,7 +395,7 @@ } } //backward way: find solution from last to first - double *solution = calloc(size, sizeof(double)); + double *solution = (double*)calloc(size, sizeof(double)); for(int i = size - 1; i >= 0; i--) { solution[i] = A[i * extSize + size];// for(int j = size - 1; j > i; j--) { @@ -244,7 +413,7 @@ int mxSize = size > 3?4:size; int extMxSize = mxSize + 1; if (size == 2) { //coefficients of linear function Ax + B = y - double *m = calloc(mxSize * extMxSize, sizeof(double)); + double *m = (double*)calloc(mxSize * extMxSize, sizeof(double)); for(int i = 0; i < size; i++) { int offset = i * 2; m[i * extMxSize] = points[offset]; @@ -254,7 +423,7 @@ coeffs = gaussSLESolve(size, m); free(m); } else if (size == 3) { //coefficients of quadrant function Ax^2 + Bx + C = y - double *m = calloc(mxSize * extMxSize, sizeof(double)); + double *m = (double*)calloc(mxSize * extMxSize, sizeof(double)); for(int i = 0; i < size; i++) { int offset = i * 2; m[i * extMxSize] = points[offset]*points[offset]; @@ -265,7 +434,7 @@ coeffs = gaussSLESolve(size, m); free(m); } else if (size > 3) { //coefficients of cubic spline Ax^3 + Bx^2 + Cx + D = y - coeffs = calloc(5 * size,sizeof(double)); + coeffs = (double*)calloc(5 * size,sizeof(double)); for(int i = 0; i < size; i++) { int offset = i * 5; int srcOffset = i * 2; @@ -273,8 +442,8 @@ coeffs[offset + 1] = points[srcOffset + 1]; } coeffs[3] = coeffs[(size - 1) * 5 + 3] = 0; - double *alpha = calloc(size - 1,sizeof(double)); - double *beta = calloc(size - 1,sizeof(double)); + double *alpha = (double*)calloc(size - 1,sizeof(double)); + double *beta = (double*)calloc(size - 1,sizeof(double)); alpha[0] = beta[0] = 0; for(int i = 1; i < size - 1; i++) { int srcI = i * 2; @@ -345,95 +514,351 @@ points[offsetY + 1] = tempY; } + +/** + * Calculates a x,y pair for \param t on the cubic Bézier curve defined by \param points. + * \param t "time" in the range 0-1 + * \param points points[0] = point1, point[1] = handle1, point[2] = handle2, point[3] = point2 + */ +position pointOnBezier(double t, position points[4]) +{ + position pos; + + /* + * Calculating a point on the bezier curve using the coefficients from Bernstein basis polynomial of degree 3. + * Using the De Casteljau algorithm would be slightly faster when calculating a lot of values + * but the difference is far from noticable here since we update the spline only when the parameter changes + */ + double c1 = (1-t) * (1-t) * (1-t); + double c2 = 3 * t * (1-t) * (1-t); + double c3 = 3 * t * t * (1-t); + double c4 = t * t * t; + pos.x = points[0].x*c1 + points[1].x*c2 + points[2].x*c3 + points[3].x*c4; + pos.y = points[0].y*c1 + points[1].y*c2 + points[2].y*c3 + points[3].y*c4; + return pos; +} + +/** + * Splits given string into sub-strings at given delimiter. + * \param string input string + * \param delimiter delimiter + * \param tokens pointer to array of strings, will be filled with sub-strings + * \return Number of sub-strings + */ +int tokenise(char *string, const char *delimiter, char ***tokens) +{ + int count = 0; + char *input = strdup(string); + char *result = NULL; + result = strtok(input, delimiter); + while (result != NULL) { + *tokens = realloc(*tokens, (count + 1) * sizeof(char *)); + (*tokens)[count++] = strdup(result); + result = strtok(NULL, delimiter); + } + free(input); + return count; +} + +/** + * Updates the color map according to the bézier spline described in the "Bézier spline" parameter. + */ +void updateBsplineMap(f0r_instance_t instance) +{ + assert(instance); + curves_instance_t* inst = (curves_instance_t*)instance; + + int range = inst->channel == CHANNEL_HUE ? 361 : 256; + free(inst->bsplineMap); + inst->bsplineMap = malloc(range * sizeof(double)); + // fill with default values, in case the spline does not cover the whole range + if (inst->channel == CHANNEL_HUE) { + for(int i = 0; i < 361; ++i) + inst->bsplineMap[i] = i; + } else if (inst->channel == CHANNEL_LUMA || inst->channel == CHANNEL_SATURATION) { + for(int i = 0; i < 256; ++i) + inst->bsplineMap[i] = inst->channel == CHANNEL_LUMA ? 1 : i / 255.; + } else { + for(int i = 0; i < 256; ++i) + inst->bsplineMap[i] = i; + } + + /* + * string -> list of points + */ + char **pointStr = calloc(1, sizeof(char *)); + int count = tokenise(inst->bspline, "|", &pointStr); + + bspline_point points[count]; + + for (int i = 0; i < count; ++i) { + char **positionsStr = calloc(1, sizeof(char *)); + int positionsNum = tokenise(pointStr[i], "#", &positionsStr); + if (positionsNum == 3) { // h1, p, h2 + for (int j = 0; j < positionsNum; ++j) { + char **coords = calloc(1, sizeof(char *)); + int coordsNum = tokenise(positionsStr[j], ";", &coords); + if (coordsNum == 2) { // x, y + points[i][j].x = atof(coords[0]); + points[i][j].y = atof(coords[1]); + } + for (int k = 0; k < coordsNum; ++k) + free(coords[k]); + free(coords); + } + } + for(int j = 0; j < positionsNum; ++j) + free(positionsStr[j]); + free(positionsStr); + } + + for (int i = 0; i < count; ++i) + free(pointStr[i]); + free(pointStr); + + /* + * Actual work: calculate curves between points and fill map + */ + position p[4]; + double t, step, diff, y; + int pn, c, k; + for (int i = 0; i < count - 1; ++i) { + p[0] = points[i][1]; + p[1] = points[i][2]; + p[2] = points[i+1][0]; + p[3] = points[i+1][1]; + + // make sure points are in correct order + if (p[0].x > p[3].x) + continue; + + // try to avoid loops and other cases of one x having multiple y + p[1].x = CLAMP(p[1].x, p[0].x, p[3].x); + p[2].x = CLAMP(p[2].x, p[0].x, p[3].x); + + t = 0; + pn = 0; + // number of points calculated for this curve + // x range * 10 should give enough points + c = (int)((p[3].x - p[0].x) * range * 10); + if (c == 0) { + // points have same x value -> will result in a jump in the curve + // calculate anyways, in case we only have these two points (with more points this x value will be calculated three times) + c = 1; + } + step = 1 / (double)c; + position curve[c]; + while (t <= 1) { + curve[pn++] = pointOnBezier(t, p); + t += step; + } + + // Fill the map in range this curve provides + k = 0; + // connection points will be written twice (but therefore no special case for the last point is required) + for (int j = (int)(p[0].x * (range-1)); j <= (int)(p[3].x * (range-1)); ++j) { + if (k > 0) + --k; + diff = fabs(j / ((double)(range-1)) - curve[k].x); + y = curve[k].y; + // Find point closest to the one needed (integers 0 - range) + while (++k < pn) { + if (fabs(j / ((double)(range-1)) - curve[k].x) > diff) + break; + diff = fabs(j / ((double)(range-1)) - curve[k].x); + y = curve[k++].y; + } + + if (inst->channel == CHANNEL_HUE) + inst->bsplineMap[j] = CLAMP(y * 360, 0, 360); + else if (inst->channel == CHANNEL_LUMA) + inst->bsplineMap[j] = y / (j == 0 ? 1 : j / 255.); + else if (inst->channel == CHANNEL_SATURATION) + inst->bsplineMap[j] = CLAMP(y, 0, 1); + else + inst->bsplineMap[j] = CLAMP0255(ROUND(y * 255)); + } + } +} + + void f0r_update(f0r_instance_t instance, double time, const uint32_t* inframe, uint32_t* outframe) { assert(instance); curves_instance_t* inst = (curves_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; - int luma; - - int map[256]; + + int i = 0; + int mapI[256]; double mapLuma[256]; + double *map = NULL; float *mapCurves = NULL; int scale = inst->height / 2; - double *points = calloc(inst->pointNumber * 2, sizeof(double)); - int i = inst->pointNumber * 2; - //copy point values - while(--i) - points[i] = inst->points[i]; - //sort point values by X component - for(int i = 1; i < inst->pointNumber; i++) - for(int j = i; j > 0 && points[j * 2] < points[(j - 1) * 2]; j--) - swap(points, j, j - 1); - //calculating spline coeffincients - double *coeffs = calcSplineCoeffs(points, (size_t)inst->pointNumber); - - //building map for values from 0 to 255 - for(int i = 0; i < 256; i++) { - double v = i / 255.; - double w = spline(v, points, (size_t)inst->pointNumber, coeffs); - map[i] = CLAMP(w, 0, 1) * 255; - mapLuma[i] = i == 0?w:w / v; + double *points = NULL; + if (strlen(inst->bspline) == 0) { + points = (double*)calloc(inst->pointNumber * 2, sizeof(double)); + i = inst->pointNumber * 2; + //copy point values + while(--i) + points[i] = inst->points[i]; + //sort point values by X component + for(i = 1; i < inst->pointNumber; i++) + for(int j = i; j > 0 && points[j * 2] < points[(j - 1) * 2]; j--) + swap(points, j, j - 1); + //calculating spline coeffincients + double *coeffs = calcSplineCoeffs(points, (size_t)inst->pointNumber); + + //building map for values from 0 to 255 + for(i = 0; i < 256; i++) { + double v = i / 255.; + double w = spline(v, points, (size_t)inst->pointNumber, coeffs); + mapI[i] = CLAMP(w, 0, 1) * 255; + mapLuma[i] = i == 0?w:w / v; + } + //building map for drawing curve + if (inst->drawCurves) { + mapCurves = (float*)calloc(scale, sizeof(float)); + for(i = 0; i < scale; i++) + mapCurves[i] = spline((float)i / scale, points, (size_t)inst->pointNumber, coeffs) * scale; + } + free(coeffs); + + if (inst->channel == CHANNEL_HUE || inst->channel == CHANNEL_SATURATION) { + map = malloc(361*sizeof(double)); + if (CHANNEL_SATURATION) + for (i = 0; i < 256; ++i) + map[i] = mapI[i] / 255.; + else + for (i = 0; i < 361; ++i) + map[i] = mapI[(int)(i / 360. * 255)] / 360. * 255; + } + } else { + map = malloc(361*sizeof(double)); + memcpy(map, inst->bsplineMap, (inst->channel == CHANNEL_HUE ? 361 : 256)*sizeof(double)); + if (inst->channel != CHANNEL_SATURATION && inst->channel != CHANNEL_HUE) { + if (inst->channel == CHANNEL_LUMA) + memcpy(mapLuma, map, 256*sizeof(double)); + else + for (i = 0; i < 256; ++i) + mapI[i] = (int)map[i]; + } } - //building map for drawing curve - if (inst->drawCurves) { - mapCurves = calloc(scale, sizeof(float)); - for(int i = 0; i < scale; i++) - mapCurves[i] = spline((float)i / scale, points, (size_t)inst->pointNumber, coeffs) * scale; + + int r, g, b, luma; + double factorR, factorG, factorB, lumaValue; + double rf, gf, bf, hue, sat, val; + + switch ((int)inst->channel) { + case CHANNEL_RGB: + while (len--) { + *dst++ = mapI[*src++]; // r + *dst++ = mapI[*src++]; // g + *dst++ = mapI[*src++]; // b + *dst++ = *src++; // a + } + break; + case CHANNEL_RED: + memcpy(outframe, inframe, len*sizeof(uint32_t)); + while (len--) { + *dst = mapI[*dst]; + dst += 4; + } + break; + case CHANNEL_GREEN: + memcpy(outframe, inframe, len*sizeof(uint32_t)); + dst += 1; + while (len--) { + *dst = mapI[*dst]; + dst += 4; + } + break; + case CHANNEL_BLUE: + memcpy(outframe, inframe, len*sizeof(uint32_t)); + dst += 2; + while (len--) { + *dst = mapI[*dst]; + dst += 4; + } + break; + case CHANNEL_ALPHA: + memcpy(outframe, inframe, len*sizeof(uint32_t)); + dst += 3; + while (len--) { + *dst = mapI[*dst]; + dst += 4; + } + break; + case CHANNEL_LUMA: + if (inst->formula) { // Rec.709 + factorR = .2126; + factorG = .7152; + factorB = .0722; + } else { // Rec. 601 + factorR = .299; + factorG = .587; + factorB = .114; + } + while (len--) { + r = *src++; + g = *src++; + b = *src++; + luma = ROUND(factorR * r + factorG * g + factorB * b); + lumaValue = mapLuma[luma]; + if (luma == 0) { + *dst++ = lumaValue; + *dst++ = lumaValue; + *dst++ = lumaValue; + } else { + *dst++ = CLAMP0255((int)(r * lumaValue)); + *dst++ = CLAMP0255((int)(g * lumaValue)); + *dst++ = CLAMP0255((int)(b * lumaValue)); + } + *dst++ = *src++; + } + break; + case CHANNEL_HUE: + while (len--) { + rf = *src++; + gf = *src++; + bf = *src++; + RGBtoHSV(rf, gf, bf, &hue, &sat, &val); + if (hue != -1) { + HSVtoRGB(&rf, &gf, &bf, map[(int)hue], sat, val); + *dst++ = rf * 255; + *dst++ = gf * 255; + *dst++ = bf * 255; + } else { + *dst++ = rf; + *dst++ = gf; + *dst++ = bf; + } + *dst++ = *src++; + } + break; + case CHANNEL_SATURATION: + while (len--) { + rf = *src++; + gf = *src++; + bf = *src++; + RGBtoHSV(rf, gf, bf, &hue, &sat, &val); + HSVtoRGB(&rf, &gf, &bf, hue, map[(int)(sat * 255)], val); + *dst++ = rf * 255; + *dst++ = gf * 255; + *dst++ = bf * 255; + *dst++ = *src++; + } } - free(coeffs); - - while (len--) - { - r = *src++; - g = *src++; - b = *src++; - - //calculating point luminance value - if (inst->channel == CHANNEL_LUMA) - luma = CLAMP0255((unsigned int)(b * .114 + g * .587 + r * .299)); - - //mapping curve values to current point - switch ((int)inst->channel) { - case CHANNEL_RED: - *dst++ = map[r]; - *dst++ = g; - *dst++ = b; - break; - case CHANNEL_GREEN: - *dst++ = r; - *dst++ = map[g]; - *dst++ = b; - break; - case CHANNEL_BLUE: - *dst++ = r; - *dst++ = g; - *dst++ = map[b]; - break; - case CHANNEL_LUMA: - if (luma == 0) { - *dst++ = mapLuma[luma]; - *dst++ = mapLuma[luma]; - *dst++ = mapLuma[luma]; - } else { - *dst++ = CLAMP0255((unsigned int)(r * mapLuma[luma])); - *dst++ = CLAMP0255((unsigned int)(g * mapLuma[luma])); - *dst++ = CLAMP0255((unsigned int)(b * mapLuma[luma])); - } - break; - } - - *dst++ = *src++; // copy alpha - } - - if (inst->drawCurves) { + + if (map) + free(map); + + if (inst->drawCurves && !strlen(inst->bspline)) { unsigned char color[] = {0, 0, 0}; - if (inst->channel != CHANNEL_LUMA) + if (inst->channel == CHANNEL_RED || inst->channel == CHANNEL_GREEN || inst->channel == CHANNEL_BLUE) color[(int)inst->channel] = 255; //calculating graph offset by given position values int graphXOffset = inst->curvesPosition == POS_TOP_LEFT || inst->curvesPosition == POS_BOTTOM_LEFT?0:inst->width - scale; @@ -444,7 +869,7 @@ float lineWidth = scale / 254.; int cellSize = floor(lineWidth * 32); //filling up background and drawing grid - for(int i = 0; i < scale; i++) { + for(i = 0; i < scale; i++) { if (i % cellSize > lineWidth) //point doesn't aly on the grid for(int j = 0; j < scale; j++) { if (j % cellSize > lineWidth) { //point doesn't aly on the grid @@ -457,7 +882,7 @@ } float doubleLineWidth = 4 * lineWidth; //drawing points on the graph - for(int i = 0; i < inst->pointNumber; i++) { + for(i = 0; i < inst->pointNumber; i++) { int pointOffset = i * 2; int xPoint = points[pointOffset++] * maxYvalue; int yPoint = points[pointOffset] * maxYvalue; @@ -482,7 +907,7 @@ for(int j = 0; j < scale; j++) { float y = mapCurves[j]; if (j == 0 || y == prevY) { - for(int i = (int)floor(y - halfLineWidth); i <= ceil(y + halfLineWidth); i++) { + for(i = (int)floor(y - halfLineWidth); i <= ceil(y + halfLineWidth); i++) { int clampedI = i < 0?0:i >= scale?scale - 1:i; int offset = ((maxYvalue - clampedI + graphYOffset) * stride + j + graphXOffset) * 4; dst[offset++] = color[0]; @@ -495,7 +920,7 @@ //medium value between previous value and current value float mid = (y - prevY) * .5 + prevY; //drawing line from previous value to mid point - for(int i = (int)round(prevY - gap); factor * i < factor * (mid + gap); i += factor) { + for(i = ROUND(prevY - gap); factor * i < factor * (mid + gap); i += factor) { int clampedI = i < 0?0:i >= scale?scale - 1:i; int offset = ((maxYvalue - clampedI + graphYOffset) * stride + j - 1 + graphXOffset) * 4; dst[offset++] = color[0]; @@ -503,7 +928,7 @@ dst[offset++] = color[2]; } //drawing line from mid point to current value - for(int i = (int)round(mid - gap); factor * i < factor * ceil(y + gap); i += factor) { + for(i = ROUND(mid - gap); factor * i < factor * ceil(y + gap); i += factor) { int clampedI = i < 0?0:i >= scale?scale - 1:i; int offset = ((maxYvalue - clampedI + graphYOffset) * stride + j + graphXOffset) * 4; dst[offset++] = color[0]; diff --git a/src/filter/d90stairsteppingfix/CMakeLists.txt b/src/filter/d90stairsteppingfix/CMakeLists.txt new file mode 100644 index 0000000..486640f --- /dev/null +++ b/src/filter/d90stairsteppingfix/CMakeLists.txt @@ -0,0 +1,13 @@ +set (SOURCES d90stairsteppingfix.cpp) +set (TARGET d90stairsteppingfix) + +if (MSVC) + set (SOURCES ${SOURCES} ${FREI0R_DEF}) +endif (MSVC) + +add_library (${TARGET} MODULE ${SOURCES}) + +# No «lib» prefix (name.so instead of libname.so) +set_target_properties (${TARGET} PROPERTIES PREFIX "") + +install (TARGETS ${TARGET} LIBRARY DESTINATION ${LIBDIR}) diff --git a/src/filter/d90stairsteppingfix/d90stairsteppingfix.cpp b/src/filter/d90stairsteppingfix/d90stairsteppingfix.cpp new file mode 100644 index 0000000..45ed2ae --- /dev/null +++ b/src/filter/d90stairsteppingfix/d90stairsteppingfix.cpp @@ -0,0 +1,249 @@ +/* + * Copyright (C) 2010 Simon Andreas Eugster (simon.eu@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. + */ + +/** + * Videos recorded with the Nikon D90 and Firmware 1.0 (which might never + * be updated) show nasty steps in slanting lines. + * + * Lee Wilson's post about how to fix this was the first solution I found + * in the web: + * http://www.dvxuser.com/V6/showthread.php?t=149663 + * Thank you very much. + * + * Mike Martucci used some C code to remove the steps together with + * ffmpeg, to be found here: http://www.epsilonic.com/d90fix/. + * + * The «magic numbers», called slices here, have been developed by + * buildyo and cgipro, also in the dvxuser forum. + * + * + * This plugin «skips» the scaling step by using linear interpolation + * on the whole image directly. + * + * More accurate: + * The PROBLEM is that Nikon did not scale the videos directly but + * simply used some pixel rows and skipped others, as it seems. + * In regular distances the number of skipped rows is higher than + * usual, creating a gap that leads to steps on sloped lines. + * + * The SLICES describe rows belonging together, i.e. not having a + * big gap between. + * + * The IDEA behind fixing the stair steps is to insert + * a new line between two slices (there are a total of 82 slices), + * filling the line by interpolation, and scaling the image + * (which is now 720+81 pixels high) down to a height of 720 pixels + * again. (Only rows are affected, columns are not, mystically.) + * + * + * This filling followed by scaling can also be done + * WITHOUT SCALING. + * + * Terminology: + * H original height + * N number of slice lines (#slices-1) + * + * 1 Create a MESH containing points representing the position of each + * row. Initially it is just [0 1 2 3 4 ...]. + * Length: H + * + * 2 Insert the SLICE LINES into this mesh after each slice. If e.g. + * the first slice is of size 3, then we get [0 1 2 2.5 3 4 ...]. + * The new slice line is located between the 3rd and 4th line + * (i.e. line 2 and line 3). 2.5 will be interpolated using + * LINEAR INTERPOLATION: + * 0.5 * the values of line 2 + * 0.5 * the values of line 3 + * Analogous would a value of 2.1 mean + * 0.9 * the value of line 2 + * 0.1 * the value of line 3 + * Length: H+N + * + * 3 SCALE the mesh BACK to size H again. + * The mesh might now look like that: + * [0.08 1.25 2.2 2.8 3.75 4.9 ...] + * It gets denser around the inserted slice line and looser in the + * middle of the slices. + * Length: H + * + * This mesh can be reused now for every frame. What needs to be done + * for each frame is + * 4 Interpolate the color values using the mesh values. Continuing + * the example above, this e.g. means for the pixels in the first + * row (line) of the target frame: + * For each color, the new color is + * 0.92 * color of line 0 + * 0.08 * color of line 1 + * And, for the second row: + * For each color, the new color value is + * 0.75 * color of line 1 + * 0.25 * color of line 2 + * Note that for a mesh value a.b, + * a is the lower line number and + * (1-b) is the factor for the lower line. + * + */ + +#include "frei0r.hpp" + +#include +#include + +static int slices720p[] = {7,9,9,8,9,9,9,9,9,8,9,9,9,9,8,9,9,9,9,9,8,9,9,9,9, + 9,8,9,9,9,9,9,8,9,9,9,9,9,8,9,9,9,9,8,9,9,9,9,9,8, + 9,9,9,9,9,8,9,9,9,9,9,8,9,9,9,9,9,8,9,9,9,9,8,9,9, + 9,9,9,8,9,9,7}; + + +class D90StairsteppingFix : public frei0r::filter +{ + +public: + D90StairsteppingFix(unsigned int width, unsigned int height) + { + m_mesh = new float[height]; + + if (height == 720) { + + /** Number of newly inserted lines: always between two slices (so #slices-1) */ + int sliceLinesNumber = (sizeof slices720p)/(sizeof slices720p[0]) - 1; + + /** The height of the image after inserting the slice lines */ + int newHeight = height + sliceLinesNumber; + +// printf("%d slice lines, %d total new lines\n", sliceLinesNumber, newHeight); + + /** + * The position of each line including slice lines. + * Slice lines are inserted between two lines (e.g. between 6 and 7) + * and therefore get the number (line1+line2)/2, here 6.5. + * This positions will later be used for interpolation. + */ + float filled[newHeight]; + + int count = 0; + int index = 0; + for (int i = 0; i < sliceLinesNumber+1; i++) { + for (int j = 0; j < slices720p[i]; j++) { + + filled[index] = count; + count++; + index++; + + } + if (count < newHeight) { + filled[index] = count - 0.5; + index++; + } + } +// for (int i = 0; i < newHeight; i++) { +// printf("inserted Lines: %f at %d\n", filled[i], i); +// } + + /** + * Calculate scaling numbers to scale the full height matrix + * with the slice lines down to the original height (720p). + */ + float downScaling[height]; + + float scaleFactor = (float) newHeight/height; +// printf("scale factor: %f\n", scaleFactor); + for (int i = 0; i < height; i++) { + downScaling[i] = (float) (((2*i+1)*scaleFactor)-1)/2; +// printf("scaled: %f at %d\n", downScaling[i], i); + } + + + /** + * Finish the mesh by scaling the H+N sized mesh to size H, + * using linear interpolation and the previously + * calculated scaling numbers. + */ + float offset; + for (int i = 0; i < height; i++) { + + index = floor(downScaling[i]); + offset = downScaling[i] - index; + + m_mesh[i] = (1-offset)*filled[index] + offset*filled[index+1]; +// printf("%f at %d with weights %f and %f\n", m_mesh[i], i, (1-offset)*downScaling[i], offset*downScaling[i+1]); + } + + } else { + // Not a 720p file. + } + } + + ~D90StairsteppingFix() + { + delete[] m_mesh; + } + + virtual void update() + { + + if (height == 720) { +// printf("Converting.\n"); + + float factor; + int index; + unsigned char *cvA, *cvB, *cvOut; + + + for (int line = 0; line < height; line++) { + index = floor(m_mesh[line]); + factor = (float) m_mesh[line] - index; + + cvA = (unsigned char*) &in[width*index]; + cvB = (unsigned char*) &in[width*(index+1)]; + cvOut = (unsigned char*) &out[width*line]; + + for (int pixel = 0; pixel < width*4; pixel++) { + // Use linear interpolation on the colours + + // Use pointer arithmetics. Colour values are stored + // as AABBGGRR in the uint32_t values. + // Convert each colour separately. + + *cvOut = floor((float)(1-factor)*(*cvA) + (factor)*(*cvB)); + cvA++; + cvB++; + cvOut++; + } + } + std::copy(in + width*(height-1), in+width*height, out + width*(height-1)); + } else { + // Not a 720p file -> Cannot work, do nothing. +// printf("Just copying. Height is %d.\n", height); + std::copy(in, in + width*height, out); + } + } + +private: + float *m_mesh; + +}; + + + +frei0r::construct plugin("Nikon D90 Stairstepping fix", + "Removes the Stairstepping from Nikon D90 videos (720p only) by interpolation", + "Simon A. Eugster (Granjow)", + 0,1, + F0R_COLOR_MODEL_RGBA8888); diff --git a/src/filter/defish0r/CMakeLists.txt b/src/filter/defish0r/CMakeLists.txt new file mode 100644 index 0000000..5097ae4 --- /dev/null +++ b/src/filter/defish0r/CMakeLists.txt @@ -0,0 +1,12 @@ +set (SOURCES defish0r.c interp.h) +set (TARGET defish0r) + +if (MSVC) + set_source_files_properties (defish0r.c PROPERTIES LANGUAGE CXX) + set (SOURCES ${SOURCES} ${FREI0R_DEF}) +endif (MSVC) + +add_library (${TARGET} MODULE ${SOURCES}) +set_target_properties (${TARGET} PROPERTIES PREFIX "") + +install (TARGETS ${TARGET} LIBRARY DESTINATION ${LIBDIR}) diff --git a/src/filter/defish0r/README b/src/filter/defish0r/README new file mode 100644 index 0000000..017ea26 --- /dev/null +++ b/src/filter/defish0r/README @@ -0,0 +1,171 @@ +Defish0r is a Frei0r plugin that can convert fisheye video to +rectilinear, and vice versa. It is based on the angular mapping +functions actually used in fisheye lens design, to get the best +possible results. It can also be used to correct the slight distortion +of some wideangle convertors, or to bend the image beyond recognition +for special effects and light shows. + + +Written by Marko Cebokli, jan 2010 and released under GNU GPL + + +RELEASE NOTES + +** jan 2010 +Version 0.1 +"pre-alpha" (throw it out and see what happens... :-) +There is little or no math checking, so floating point exceptions are + rather more the rule than an exception... + +I've kept the remapping and interpolation functions in a separate file, +since they are quite universally useful for any program that does +geometric transforms on images. + +** apr 2010 +Version 0.2 +Added some IFs, to avoid "nan" results from asinf() + + +TODO: + +- use gavl for remapping +- make piece between Little and Big Indians + + +SOME NOTES ABOUT THE PLUGIN + +This plugin has quite a few adjustable parameters, but don't be afraid - +tweaking just the first one ("Amount") will usually bring you quite close to the +desired result... + + +Multiple Choice Parameters: + +Defish0r has some "multiple choice" type parameters. Because the Frei0r + API does not support this type of parameters, they are implemented as + "double", with the usual 0...1000 range. If there are N choices, this + range is simply divided into N subranges, representing the choices. + For example, if four options are available, the range 0...250 + represents the first option, the range 251...500 the second, and so + on. Within each range, there is no change, 260 is exactly the same as + 444 in the above four-option example. + + +Description of the available parameters: + +"Amount" + Controls the amount of (de)distortion applied to the video. It + controls the ratio of fisheye focal length to image half diagonal, but + in an nonlinear inverse way, to make the control more "comfortable". + It can be adjusted beyond "reasonable" values (which differ between + the mapping function types), to produce some looney effects. When + exploring this range, and the image disappears, check the scaling, + could be that the image became too big or too small to see. For some + unreasonable values the image might indeed disappear, when there are + math overflows or imaginary results... (types 1 and 2 are more prone + to image vanishing). Anyway, when working in the "special effect" + range, it is alway worth to try manual scaling. + +"DeFish" + If checked, the transform direction is from fisheye to rectiliear, + when not checked, it is rectilinear to fisheye. + +"Type" + Selects the fisheye angular mapping function used, among four + possibilities: + choice range function + 0 0...250 equidistant + 1 251...500 ortographic + 2 501...750 equiarea + 3 751...1000 stereographic + Wikipedia has a nice article about these. + +"Scaling" + Select among three auto scaling options and manual scale: + choice range function + 0 0...250 scale to fill + 1 251...500 keep center scale + 2 501...750 scale to fit + 3 751...1000 manual scale + "Fill" means that no empty borders will be left, but some of the + input image will be cropped. "Fit" means that no part of the input + image will be cropped, but there will be blank areas at the borders. + +"Manual Scale" + When "Scaling" is set to option 3 (>751), this control directly + affects the image scale, from 1/100 to 100X size. Only has effect when + "Scaling" is set to manual! + +"Interpolator" + Selects among seven different interpolators. This allows one to make + a quality/speed tradeoff. In most cases, a higher number means + better quality, but slower interpolation. The spline interpolating + polynomials are from Helmut Dersch. For realtime use, option 0 is the + fastest, in fact it is equal to no interpolation. In most cases + bilinear should be good enough, and on a decent machine should still + run in real time. Beyond bicubic, the quality gain is marginal for a + single resampling. Lanczos takes an eternity! + choice range function + 0 0...142 Nearest neighbor + 1 143...285 Bilinear + 2 286...428 Bicubic smooth + 3 429...571 Bicubic sharp + 4 572...714 Spline 4x4 + 5 715...857 Spline 6x6 + 6 858...1000 Lanczos 16x16 + +"Aspect Type" + Selects among four pixel aspect ratio presets, and manual: + choice range function + 0 0...200 Square pixels + 1 201...400 PAL DV 1.067 + 2 401...600 NTSC DV 0.889 + 3 601...800 HDV 1.333 + 4 801...1000 manual variable + To get the math right, Defish0r needs to know the pixel aspect + ratio. Because I found no way to get the aspect info from the host + application, I delegated the responsibility to the user :-) + +"Manual aspect" + When "Aspect Type" is set to option 4 (>801), this control directly + affects the pixel aspect ratio, from 0.5 to 2. Only has effect when + "Aspect Type" is set to manual! + + +SOME APPLICATION NOTES + +1. Tweaking the parameters for best defish + +Take a shot of something like a brick wall or bathroom tiles, that has +a lot of horizontal and vertical straight lines. Be careful to keep +the optical axis as perpendicular as possible to the wall (=keep a maximally +symmetrical image in the viewfinder). Use this +image to tweak the parameters. + + +2. Some examples of Defish0r abuse + +These were tried with PAL DV, in Kdenlive, where the parameters can be +adjusted between 0 and 1000. These examples work best, when there is +some interesting action near the center of the image. + +For a kind of roundish kaleidoscope, try this: +Amount=775 +Defish = OFF +Type = 0 +Scaling = 1000 (manual) +Manual Scale = 300...400 + +Another crazy distortion: +Amount = 921 +Defish = OFF +Type = 1000 +Scaling = 1000 (manual) +Manual Scale = 191 + +For an effect, reminiscent of some scenes from the "2001 Spcae Odyssey" try +this: +Amount = 876 +Defish = ON +Type = 0 +Scaling = 0 (fill) diff --git a/src/filter/defish0r/defish0r.c b/src/filter/defish0r/defish0r.c new file mode 100644 index 0000000..e98ff69 --- /dev/null +++ b/src/filter/defish0r/defish0r.c @@ -0,0 +1,650 @@ +/* defish0r.c + + * Copyright (C) 2010 Marko Cebokli http://lea.hamradio.si/~s57uuu + * 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. + */ + + + +//compile: gcc -Wall -std=c99 -c -fPIC defish0r.c -o defish0r.o + +//link: gcc -lm -shared -o defish0r.so defish0r.o + +//skaliranje za center=1 se ne dela!!!! + +#include +#include +#include + +#include + +#include "interp.h" + + +double PI=3.14159265358979; + +//--------------------------------------------------------- +// r = 0...1 izhod = 0...maxr +//ta funkcija da popacenje v odvisnosti od r +float fish(int n, float r, float f) +{ + float rr,ff; + + //printf("ff=%f\n",ff); + switch (n) + { + case 0: //equidistant + ff=f*2.0/PI; + rr=tanf(r/ff); + break; + case 1: //ortographic + ff=r/f; + if (ff>1.0) + rr=-1.0; + else + rr=tanf(asinf(ff)); + break; + case 2: //equiarea + ff=r/2.0/f; + if (ff>1.0) + rr=-1.0; + else + rr=tanf(2.0*asinf(r/2.0/f)); + break; + case 3: //stereographic + ff=f*2.0/PI; + rr=tanf(2.0*atanf(r/2.0/ff)); + break; + default: + // printf("Neznana fishitvena funkcija %d\n",n); + break; + } + return rr; +} + +//--------------------------------------------------------- +//ta funkcija da popacenje v odvisnosti od r +// r = 0...1 izhod = 0...1 +float defish(int n, float r, float f, float mr) +{ + float rr; + + switch (n) + { + case 0: //equidistant + rr=f*2.0/PI*atanf(r*mr); + break; + case 1: //ortographic + rr=f*sinf(atanf(r*mr)); + break; + case 2: //equiarea + rr=2.0*f*sinf(atanf(r*mr)/2.0); + break; + case 3: //stereographic + rr=f*4.0/PI*tanf(atanf(r*mr)/2.0); + break; + default: + // printf("Neznana fishitvena funkcija %d\n",n); + break; + } + return rr; +} + +#if defined(_MSC_VER) +#define hypotf _hypotf +#endif + +//---------------------------------------------------------------- +//nafila array map s polozaji pikslov +//locena funkcija, da jo poklicem samo enkrat na zacetku, +//array map[] potem uporablja funkcija remap() +//tako ni treba za vsak frame znova racunat teh sinusov itd... +//wi,hi,wo ho = input.output image width/height +//n = 0..3 function select +//f = focal ratio (amount of distortion) +//scal = scaling factor +//pari, paro = pixel aspect ratio (input / output) +//dx, dy offset on input (for non-cosited chroma subsampling) +void fishmap(int wi, int hi, int wo, int ho, int n, float f, float scal, float pari, float paro, float dx, float dy, float *map) +{ + float rmax,maxr,r,kot,x,y,imax; + int i,j,ww,wi2,hi2,wo2,ho2; + float ii,jj,sc; + + rmax=hypotf(ho/2.0,wo/2.0*paro); + maxr=fish(n,1.0,f); + imax=hypotf(hi/2.0,wi/2.0*pari); + sc=imax/maxr; + + //printf("Fishmap: F=%5.2f Rmax= %7.2f Maxr=%6.2f sc=%6.2f scal=%6.2f\n",f,rmax,maxr,sc,scal); + + wi2=wi/2; hi2=hi/2; wo2=wo/2; ho2=ho/2; + for (i=0;i0)&(x<(wi-1))&(y>0)&(y<(hi-1))) + { + map[ww]=x+dx; + map[ww+1]=y+dy; + } + else + { + map[ww]=-1; + map[ww+1]=-1; + } + } + } + } + +} + +//---------------------------------------------------------------- +//nafila array map s polozaji pikslov +//locena funkcija, da jo poklicem samo enkrat na zacetku, +//array map[] potem uporablja funkcija remap() +//tako ni treba za vsak frame znova racunat teh sinusov itd... +//wi,hi,wo ho = input.output image width/height +//n = 0..3 function select +//f = focal ratio (amount of distortion) +//scal = scaling factor +//pari,paro = pixel aspect ratio (input / output) +//dx, dy offset on input (for non-cosited chroma subsampling) +void defishmap(int wi, int hi, int wo, int ho, int n, float f, float scal, float pari, float paro, float dx, float dy, float *map) +{ + float rmax,maxr,r,kot,x,y,imax; + int i,j,ww,wi2,hi2,wo2,ho2; + float ii,jj,sc; + + rmax=hypotf(ho/2.0,wo/2.0*paro); + maxr=fish(n,1.0,f); + imax=hypotf(hi/2.0,wi/2.0*pari); + sc=imax/maxr; + + //printf("Defishmap: F=%f rmax= %f Maxr=%f sc=%6.2f scal=%6.2f\n",f,rmax,maxr,sc,scal); + + wi2=wi/2; hi2=hi/2; wo2=wo/2; ho2=ho/2; + for (i=0;i0)&(x<(wi-1))&(y>0)&(y<(hi-1))) + { + map[ww]=x; + map[ww+1]=y; + } + else + { + map[ww]=-1; + map[ww+1]=-1; + } + } + } + } +} + +//===================================================== +//kao instanca frei0r +//w,h: image dimensions in pixels +//f: focal ratio +//dir: 0=defish 1=fish +//type: 0..3 equidistant, ortographic, equiarea, stereographic +//scal: 0..3 image to fill, keep center scale, image to fit, manu +//intp: 0..6 type of interpolator +//aspt: 0..4 aspect type square, PAL, NTSC, HDV, manual +//par: pixel aspect ratio +typedef struct +{ + int w; + int h; + float f; + int dir; + int type; + int scal; + int intp; + float mscale; + int aspt; + float mpar; + float par; + float *map; + interpp interpol; +} param; + + + +//------------------------------------------------------- +interpp set_intp(param p) +{ + switch (p.intp) //katero interpolacijo bo uporabil + { + // case -1:return interpNNpr_b; //nearest neighbor+print + case 0: return interpNN_b32; //nearest neighbor + case 1: return interpBL_b32; //bilinear + case 2: return interpBC_b32; //bicubic smooth + case 3: return interpBC2_b32; //bicibic sharp + case 4: return interpSP4_b32; //spline 4x4 + case 5: return interpSP6_b32; //spline 6x6 + case 6: return interpSC16_b32; //lanczos 8x8 + default: return NULL; + } +} + +//-------------------------------------------------------- +void make_map(param p) +{ + float rmax,maxr,imax,fscal,dscal; + + rmax=hypotf(p.h/2.0,p.w/2.0*p.par); + maxr=fish(p.type,1.0,p.f); + imax=hypotf(p.h/2.0,p.w/2.0*p.par); + + if (p.dir==0) //defish + { + switch (p.scal) + { + case 0: //fill + dscal=maxr*p.h/2.0/rmax/fish(p.type,p.h/2.0/rmax,p.f); + break; + case 1: //keep + dscal=maxr*p.f; + if ((p.type==0)||(p.type==3)) dscal=dscal/PI*2.0;break; + case 2: //fit + dscal=1.0; break; + case 3: //manual + dscal=p.mscale; break; + } + defishmap(p.w ,p.h ,p.w ,p.h, p.type, p.f, dscal, p.par, p.par, 0.0, 0.0, p.map); + } + else //fish + { + switch (p.scal) + { + case 0: //fill + fscal=1.0;break; + case 1: //keep + fscal=maxr*p.f; + if ((p.type==0)||(p.type==3)) fscal=fscal/PI*2.0; + break; + case 2: //fit + fscal=2.0*defish(p.type,p.h/2.0*maxr/imax,p.f,1.0)/p.h*rmax; + break; + case 3: //manual + fscal=1.0/p.mscale; break; + } + fishmap(p.w, p.h, p.w ,p.h, p.type, p.f, fscal, p.par, p.par, 0.0, 0.0, p.map); + } + +} + +//********************************************************* +// OBVEZNE FREI0R FUNKCIJE + +//----------------------------------------------- +int f0r_init() +{ + return 1; +} + +//------------------------------------------------ +void f0r_deinit() +{ +} + +//----------------------------------------------- +void f0r_get_plugin_info(f0r_plugin_info_t* info) +{ + + info->name="Defish0r"; + info->author="Marko Cebokli"; + 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=2; + info->num_params=8; + info->explanation="Non rectilinear lens mappings"; +} + +//-------------------------------------------------- +void f0r_get_param_info(f0r_param_info_t* info, int param_index) +{ + switch(param_index) + { + case 0: + info->name = "Amount"; + info->type = F0R_PARAM_DOUBLE; + info->explanation = "Focal Ratio"; + break; + case 1: + info->name = "DeFish"; + info->type = F0R_PARAM_BOOL; + info->explanation = "Fish or Defish"; + break; + case 2: + info->name = "Type"; + info->type = F0R_PARAM_DOUBLE; + info->explanation = "Mapping function"; + break; + case 3: + info->name = "Scaling"; + info->type = F0R_PARAM_DOUBLE; + info->explanation = "Scaling method"; + break; + case 4: + info->name = "Manual Scale"; + info->type = F0R_PARAM_DOUBLE; + info->explanation = "Manual Scale"; + break; + case 5: + info->name = "Interpolator"; + info->type = F0R_PARAM_DOUBLE; + info->explanation = "Quality of interpolation"; + break; + case 6: + info->name = "Aspect type"; + info->type = F0R_PARAM_DOUBLE; + info->explanation = "Pixel aspect ratio presets"; + break; + case 7: + info->name = "Manual Aspect"; + info->type = F0R_PARAM_DOUBLE; + info->explanation = "Manual Pixel Aspect ratio"; + break; + } + +} + +//-------------------------------------------------------- +//kao constructor za frei0r +f0r_instance_t f0r_construct(unsigned int width, unsigned int height) +{ + param *p; + + p=(param*)calloc(1, sizeof(param)); + + p->w=width; + p->h=height; + p->f=20.0; //defaults (not used??) + p->dir=1; + p->type=2; + p->scal=2; + p->intp=1; + p->mscale=1.0; + p->aspt=0; //square pixels + p->par=1.0; //square pixels + p->mpar=1.0; + + p->map=(float*)calloc(1, sizeof(float)*(p->w*p->h*2+2)); + p->interpol=set_intp(*p); + + make_map(*p); + + //printf("Construct, w=%d h=%d\n",width,height); + + return (f0r_instance_t)p; +} + +//--------------------------------------------------- +void f0r_destruct(f0r_instance_t instance) +{ + param *p; + p=(param*)instance; + + free(p->map); + free(instance); +} + +//---------------------------------------------------- +//not used in frei0r plugin +void change_param(param *p, int w, int h, float f, int dir, int type, int scal, int intp) +{ + p->f=f; + p->dir=dir; + p->type=type; + p->scal=scal; + p->intp=intp; + + if ((w!=p->w)||(h!=p->h)) + { + free(p->map); + p->map=(float*)calloc(1, sizeof(float)*(w*h*2+2)); + p->w=w; + p->h=h; + } + + p->interpol=set_intp(*p); + make_map(*p); +} + +//----------------------------------------------------- +void print_param(param p) + //not used in frei0r plugin +{ + printf("Param: w=%d h=%d f=%f dir=%d",p.w, p.h, p.f, p.dir); + printf(" type=%d scal=%d intp=%d",p.type, p.scal, p.intp); + printf(" mscale=%f par=%f mpar=%f\n",p.mscale, p.par, p.mpar); +} + +//------------------------------------------------------ +//computes x to the power p +//only for positive x +float pwr(float x, float p) +{ + if (x<=0) return 0; + //printf("exp(%f)=%f\n",x,expf(p*logf(x))); + return expf(p*logf(x)); +} + +//----------------------------------------------------- +//stretch [0...1] to parameter range [min...max] logarithmic +//min and max must be positive! +float map_value_forward_log(double v, float min, float max) +{ + float sr,k; + + sr=sqrtf(min*max); + k=2.0*log(max/sr); + return sr*expf(k*(v-0.5)); +} + +//----------------------------------------------------- +//collapse from parameter range [min...max] to [0...1] logarithmic +//min and max must be positive! +double map_value_backward_log(float v, float min, float max) +{ + float sr,k; + + sr=sqrtf(min*max); + k=2.0*log(max/sr); + return logf(v/sr)/k+0.5; +} + +//----------------------------------------------------- +//stretch [0...1] to parameter range [min...max] linear +float map_value_forward(double v, float min, float max) +{ + return min+(max-min)*v; +} + +//----------------------------------------------------- +//collapse from parameter range [min...max] to [0...1] linear +double map_value_backward(float v, float min, float max) +{ + return (v-min)/(max-min); +} + +//----------------------------------------------------- +//smisele vrednosti za parameter f: (za fish) +// tip 0: (0.3) 1.001...10; tip 1: 1.000...10 +// tip 2: (0.5) 0.75...10.0 tip 3: (0.1) 0.78...10 +//za defish: +// tip 0: 0.1...10 tip 1: 1.0...10 +// tip 2: 0.5...10 tip 3: (0.1) 0.5...10 +void f0r_set_param_value(f0r_instance_t instance, f0r_param_t parm, int param_index) +{ + param *p; + int chg,tmpi; + float tmpf; + + p=(param*)instance; + + //printf("set parm: index=%d, value=%f\n",param_index,*(float*)parm); + chg=0; + switch(param_index) + { + case 0: //f + tmpf=pwr(*((double*)parm),1.0/5.0); + // tmpf=map_value_forward(*((double*)parm), 10.0, 0.1); + tmpf=map_value_forward(tmpf, 20.0, 0.1); + if (p->f != tmpf) chg=1; + p->f=tmpf; + break; + case 1: //fish + tmpi=map_value_forward(*((double*)parm), 1.0, 0.0);//BOOL!! + if (p->dir != tmpi) chg=1; + p->dir=tmpi; + break; + case 2: //type + tmpi=map_value_forward(*((double*)parm), 0.0, 3.999); + if (p->type != tmpi) chg=1; + p->type=tmpi; + break; + case 3: //scaling + tmpi=map_value_forward(*((double*)parm), 0.0, 3.999); + if (p->scal != tmpi) chg=1; + p->scal=tmpi; + break; + case 4: //manual scale + tmpf=map_value_forward_log(*((double*)parm), 0.01, 100.0); + if (p->mscale != tmpf) chg=1; + p->mscale=tmpf; + break; + case 5: //interpolator + tmpi=map_value_forward(*((double*)parm), 0.0, 6.999); + if (p->intp != tmpi) chg=1; + p->intp=tmpi; + break; + case 6: //aspect type + tmpi=map_value_forward(*((double*)parm), 0.0, 4.999); + if (p->aspt != tmpi) chg=1; + p->aspt=tmpi; + break; + case 7: //manual aspect + tmpf=map_value_forward_log(*((double*)parm), 0.5, 2.0); + if (p->mpar != tmpf) chg=1; + p->mpar=tmpf; + break; + } + + if (chg!=0) + { + switch (p->aspt) //pixel aspect ratio + { + case 0: p->par=1.000;break; //square pixels + case 1: p->par=1.067;break; //PAL DV + case 2: p->par=0.889;break; //NTSC DV + case 3: p->par=1.333;break; //HDV + case 4: p->par=p->mpar;break; //manual + } + p->interpol=set_intp(*p); + make_map(*p); + } + + //print_param(*p); +} + +//-------------------------------------------------- +void f0r_get_param_value(f0r_instance_t instance, f0r_param_t parm, int param_index) +{ + param *p; + float tmpf; + + p=(param*)instance; + + switch(param_index) + { + case 0: //f + // *((double*)parm)=map_value_backward(p->f, 10.0, 0.1); + tmpf=map_value_backward(p->f, 20.0, 0.1); + *((double*)parm)=pwr(tmpf, 5.0); + break; + case 1: //fish + *((double*)parm)=map_value_backward(p->dir, 1.0, 0.0); //BOOL!! + break; + case 2: //type + *((double*)parm)=map_value_backward(p->type, 0.0, 3.0); + break; + case 3: //scaling + *((double*)parm)=map_value_backward(p->scal, 0.0, 3.0); + break; + case 4: //manual scale + *((double*)parm)=map_value_backward_log(p->mscale, 0.01, 100.0); + break; + case 5: //interpolator + *((double*)parm)=map_value_backward(p->intp, 0.0, 6.0); + break; + case 6: //aspect type + *((double*)parm)=map_value_backward(p->aspt, 0.0, 4.999); + break; + case 7: //manual aspect + *((double*)parm)=map_value_backward_log(p->mpar, 0.5, 2.0); + break; + } +} + +//------------------------------------------------- +void f0r_update(f0r_instance_t instance, double time, const uint32_t* inframe, uint32_t* outframe) +{ + param *p; + int size; + int i,j; + + p=(param*)instance; + + remap32(p->w, p->h, p->w, p->h, (unsigned char*) inframe, (unsigned char*) outframe, p->map, 0, p->interpol); + +} diff --git a/src/filter/defish0r/interp.h b/src/filter/defish0r/interp.h new file mode 100644 index 0000000..2470fe7 --- /dev/null +++ b/src/filter/defish0r/interp.h @@ -0,0 +1,824 @@ +//interp.c +/* + * Copyright (C) 2010 Marko Cebokli http://lea.hamradio.si/~s57uuu + * This file is a part of the Frei0r plugin "defish0r" + * + * 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. + */ + +/******************************************************************* + * The remapping functions use a map aray, which contains a pair + * of floating values fo each pixel of the output image. These + * represent the location in the input image, from where the value + * of the given output pixel should be interpolated. + * They are given in pixels of the input image. + * If the output image is wo pixels wide, then the x coordinate + * of the pixel in row r and column c is at 2*(r*wo+c) in the map + * array, and y at 2*(r*wo+c)+1 + * + * The map array is usually computation intensive to generate, and + * he purpose of the map array is to allow fast remapping of + * several images (video) using the same map array. + ******************************************************************/ + + +//compile: gcc -c -O2 -Wall -std=c99 -fPIC interp.c -o interp.o + +// -std=c99 za roundf() +// -fPIC da lahko linkas v .so (za frei0r) + +#include +#include /* za debug printoute */ +#include + +//-------------------------------------------------------- +//pointer to an interpolating function +typedef int (*interpp)(unsigned char*, int, int, float, float, unsigned char*); + +//************************************ +//REMAP AN IMAGE + +//-------------------------------------------------------- +// vhs = vhodna slika velikosti wi x hi +// izs = izhodna slika velikosti wo x ho +// map = za vsak pixel izs pove, kje ga vzamemo is vhs +// bgc = background color +// interp = kazalec na interpolacijsko funkcijo +void remap(int wi, int hi, int wo, int ho, unsigned char *vhs, unsigned char *izs, float *map, unsigned char bgc, interpp interp) +{ + int i,j; + float x,y; + + for (i=0;i0) + interp(vhs,wi,hi,x,y,&izs[wo*i+j]); + else + izs[wo*i+j]=bgc; //background fill + } +} + + +//-------------------------------------------------------- +//for four byte (int, 32 bit) values (packed RGB color) +//little endian !! +// vhs = vhodna slika velikosti wi x hi +// izs = izhodna slika velikosti wo x ho +// map = za vsak pixel izs pove, kje ga vzamemo is vhs +// bgc = background color +// interp = kazalec na interpolacijsko funkcijo +void remap32(int wi, int hi, int wo, int ho, unsigned char *vhs, unsigned char *izs, float *map, uint32_t bgc, interpp interp) +{ + int i,j; + float x,y; + + for (i=0;i0) + interp(vhs,wi,hi,x,y,&izs[4*(wo*i+j)]); + else //background fill + { + izs[4*(wo*i+j)]=bgc; + izs[4*(wo*i+j)+1]=bgc>>8; + izs[4*(wo*i+j)+2]=bgc>>16; + izs[4*(wo*i+j)+3]=bgc>>24; + } + } +} + +//************************************** +//HERE BEGIN THE INTERPOLATION FUNCTIONS + +#if defined(_MSC_VER) +__inline const float roundf(float x){ + return (int)floor(x+0.5); +} +#endif /* _MSC_VER */ + +//------------------------------------------------------ +//za debugging - z izpisovanjem +//interpolacija "najblizji sosed" (ni prava interpolacija) +//za byte (char) vrednosti +// *sl vhodni array (slika) +// w,h dimenzija slike je wxh +// x,y tocka, za katero izracuna interpolirano vrednost +// *v interpolirana vrednost +int interpNNpr_b(unsigned char *sl, int w, int h, float x, float y, unsigned char *v) +{ + //printf("u=%5.2f v=%5.2f ",x,y); + printf("u=%5.3f v=%5.3f ",x/(w-1),y/(h-1)); + //printf("U=%2d V=%2d ",(int)roundf(x),(int)roundf(y)); + +#ifdef TEST_XY_LIMITS + if ((x<0)||(x>w)||(y<0)||(y>h)) return -1; +#endif + + *v=sl[(int)roundf(x)+(int)roundf(y)*w]; + return 0; +} + +//------------------------------------------------------ +//interpolacija "najblizji sosed" (ni prava interpolacija) +//za byte (char) vrednosti +// *sl vhodni array (slika) +// w,h dimenzija slike je wxh +// x,y tocka, za katero izracuna interpolirano vrednost +// *v interpolirana vrednost +int interpNN_b(unsigned char *sl, int w, int h, float x, float y, unsigned char *v) +{ +#ifdef TEST_XY_LIMITS + if ((x<0)||(x>w)||(y<0)||(y>h)) return -1; +#endif + + *v=sl[(int)roundf(x)+(int)roundf(y)*w]; + return 0; +} + +//------------------------------------------------------ +//interpolacija "najblizji sosed" (ni prava interpolacija) +//za byte (char) vrednosti v packed color 32 bitnem formatu +//little endian !! +// *sl vhodni array (slika) +// w,h dimenzija slike je wxh +// x,y tocka, za katero izracuna interpolirano vrednost +// *v interpolirana vrednost +int interpNN_b32(unsigned char *sl, int w, int h, float x, float y, unsigned char *v) +{ +#ifdef TEST_XY_LIMITS + if ((x<0)||(x>w)||(y<0)||(y>h)) return -1; +#endif + + v[0]=sl[(int)roundf(x)*4+(int)roundf(y)*4*w]; + v[1]=sl[(int)roundf(x)*4+(int)roundf(y)*4*w+1]; + v[2]=sl[(int)roundf(x)*4+(int)roundf(y)*4*w+2]; + v[3]=sl[(int)roundf(x)*4+(int)roundf(y)*4*w+3]; + + return 0; +} + +//------------------------------------------------------ +//bilinearna interpolacija +//za byte (char) vrednosti +// *sl vhodni array (slika) +// w,h dimenzija slike je wxh +// x,y tocka, za katero izracuna interpolirano vrednost +// *v interpolirana vrednost +int interpBL_b(unsigned char *sl, int w, int h, float x, float y, unsigned char *v) +{ + int m,n,k,l; + float a,b; + +#ifdef TEST_XY_LIMITS + if ((x<0)||(x>w)||(y<0)||(y>h)) return -1; +#endif + + m=(int)floorf(x); n=(int)floorf(y); + k=n*w+m; l=(n+1)*w+m; + a=sl[k]+(sl[k+1]-sl[k])*(x-(float)m); + b=sl[l]+(sl[l+1]-sl[l])*(x-(float)m); + *v=a+(b-a)*(y-(float)n); + return 0; +} + +//------------------------------------------------------ +//bilinearna interpolacija +//za byte (char) vrednosti v packed color 32 bitnem formatu +int interpBL_b32(unsigned char *sl, int w, int h, float x, float y, unsigned char *v) +{ + int m,n,k,l,n1,l1,k1; + float a,b; + +#ifdef TEST_XY_LIMITS + if ((x<0)||(x>w)||(y<0)||(y>h)) return -1; +#endif + + m=(int)floorf(x); n=(int)floorf(y); + k=n*w+m; l=(n+1)*w+m; + k1=4*(k+1); l1=4*(l+1); n1=4*((n+1)*w+m); + l=4*l; k=4*k; + + a=sl[k]+(sl[k1]-sl[k])*(x-(float)m); + b=sl[l]+(sl[l1]-sl[n1])*(x-(float)m); + v[0]=a+(b-a)*(y-(float)n); + + a=sl[k+1]+(sl[k1+1]-sl[k+1])*(x-(float)m); + b=sl[l+1]+(sl[l1+1]-sl[n1+1])*(x-(float)m); + v[1]=a+(b-a)*(y-(float)n); + + a=sl[k+2]+(sl[k1+2]-sl[k+2])*(x-(float)m); + b=sl[l+2]+(sl[l1+2]-sl[n1+2])*(x-(float)m); + v[2]=a+(b-a)*(y-(float)n); + + a=sl[k+3]+(sl[k1+3]-sl[k+3])*(x-(float)m); + b=sl[l+3]+(sl[l1+3]-sl[n1+3])*(x-(float)m); + v[3]=a+(b-a)*(y-(float)n); + + + return 0; +} + +//------------------------------------------------------ +//bikubicna interpolacija "smooth" +//za byte (char) vrednosti +//kar Aitken-Neville formula iz Bronstajna +// *sl vhodni array (slika) +// w,h dimenzija slike je wxh +// x,y tocka, za katero izracuna interpolirano vrednost +// *v interpolirana vrednost +int interpBC_b(unsigned char *sl, int w, int h, float x, float y, unsigned char *v) +{ + int i,j,l,m,n; + float k; + float p[4],p1[4],p2[4],p3[4],p4[4]; + +#ifdef TEST_XY_LIMITS + if ((x<0)||(x>w)||(y<0)||(y>h)) return -1; +#endif + + m=(int)ceilf(x)-2; if (m<0) m=0; if ((m+5)>w) m=w-4; + n=(int)ceilf(y)-2; if (n<0) n=0; if ((n+5)>h) n=h-4; + + //njaprej po y (stiri stolpce) + for (i=0;i<4;i++) + { + l=m+(i+n)*w; + p1[i]=sl[l]; + p2[i]=sl[l+1]; + p3[i]=sl[l+2]; + p4[i]=sl[l+3]; + } + for (j=1;j<4;j++) + for (i=3;i>=j;i--) + { + k=(y-i-n)/j; + p1[i]=p1[i]+k*(p1[i]-p1[i-1]); + p2[i]=p2[i]+k*(p2[i]-p2[i-1]); + p3[i]=p3[i]+k*(p3[i]-p3[i-1]); + p4[i]=p4[i]+k*(p4[i]-p4[i-1]); + } + + //zdaj pa po x + p[0]=p1[3]; p[1]=p2[3]; p[2]=p3[3]; p[3]=p4[3]; + for (j=1;j<4;j++) + for (i=3;i>=j;i--) + p[i]=p[i]+(x-i-m)/j*(p[i]-p[i-1]); + + if (p[3]<0.0) p[3]=0.0; //printf("p=%f ",p[3]); + if (p[3]>256.0) p[3]=255.0; //printf("p=%f ",p[3]); + + *v=p[3]; + + return 0; +} + +//------------------------------------------------------ +//bikubicna interpolacija "smooth" +//za byte (char) vrednosti v packed color 32 bitnem formatu +int interpBC_b32(unsigned char *sl, int w, int h, float x, float y, unsigned char *v) +{ + int i,j,b,l,m,n; + float k; + float p[4],p1[4],p2[4],p3[4],p4[4]; + +#ifdef TEST_XY_LIMITS + if ((x<0)||(x>w)||(y<0)||(y>h)) return -1; +#endif + + m=(int)ceilf(x)-2; if (m<0) m=0; if ((m+5)>w) m=w-4; + n=(int)ceilf(y)-2; if (n<0) n=0; if ((n+5)>h) n=h-4; + + + for (b=0;b<4;b++) + { + //njaprej po y (stiri stolpce) + for (i=0;i<4;i++) + { + l=m+(i+n)*w; + p1[i]=sl[4*l+b]; + p2[i]=sl[4*(l+1)+b]; + p3[i]=sl[4*(l+2)+b]; + p4[i]=sl[4*(l+3)+b]; + } + for (j=1;j<4;j++) + for (i=3;i>=j;i--) + { + k=(y-i-n)/j; + p1[i]=p1[i]+k*(p1[i]-p1[i-1]); + p2[i]=p2[i]+k*(p2[i]-p2[i-1]); + p3[i]=p3[i]+k*(p3[i]-p3[i-1]); + p4[i]=p4[i]+k*(p4[i]-p4[i-1]); + } + + //zdaj pa po x + p[0]=p1[3]; p[1]=p2[3]; p[2]=p3[3]; p[3]=p4[3]; + for (j=1;j<4;j++) + for (i=3;i>=j;i--) + p[i]=p[i]+(x-i-m)/j*(p[i]-p[i-1]); + + if (p[3]<0.0) p[3]=0.0; + if (p[3]>256.0) p[3]=255.0; + + v[b]=p[3]; + } + + return 0; +} + +//------------------------------------------------------ +//bikubicna interpolacija "sharp" +//za byte (char) vrednosti +//Helmut Dersch polinom +// *sl vhodni array (slika) +// w,h dimenzija slike je wxh +// x,y tocka, za katero izracuna interpolirano vrednost +// *v interpolirana vrednost +//!!! ODKOD SUM??? (ze po eni rotaciji v interp_test !!) +//!!! v defish tega suma ni??? +int interpBC2_b(unsigned char *sl, int w, int h, float x, float y, unsigned char *v) +{ + int i,k,l,m,n; + float pp,p[4],wx[4],wy[4],xx; + +#ifdef TEST_XY_LIMITS + if ((x<0)||(x>w)||(y<0)||(y>h)) return -1; +#endif + + m=(int)ceilf(x)-2; if (m<0) m=0; if ((m+5)>w) m=w-4; + n=(int)ceilf(y)-2; if (n<0) n=0; if ((n+5)>h) n=h-4; + + + //najprej po y (stiri stolpce) + xx=y-n; wy[0]=(-0.75*(xx-5.0)*xx-6.0)*xx+3.0; + xx=xx-1.0; wy[1]=(1.25*xx-2.25)*xx*xx+1.0; + xx=1.0-xx; wy[2]=(1.25*xx-2.25)*xx*xx+1.0; + xx=xx+1.0; wy[3]=(-0.75*(xx-5.0)*xx-6.0)*xx+3.0; + //se po x + xx=x-m; wx[0]=(-0.75*(xx-5.0)*xx-6.0)*xx+3.0; + xx=xx-1.0; wx[1]=(1.25*xx-2.25)*xx*xx+1.0; + xx=1.0-xx; wx[2]=(1.25*xx-2.25)*xx*xx+1.0; + xx=xx+1.0; wx[3]=(-0.75*(xx-5.0)*xx-6.0)*xx+3.0; + + k=n*w+m; + for (i=0;i<4;i++) + { + p[i]=0.0; + l=k+i; + p[i]=wy[0]*sl[l]; l+=w; + p[i]+=wy[1]*sl[l]; l+=w; + p[i]+=wy[2]*sl[l]; l+=w; + p[i]+=wy[3]*sl[l]; + } + + pp=wx[0]*p[0]; + pp+=wx[1]*p[1]; + pp+=wx[2]*p[2]; + pp+=wx[3]*p[3]; + + if (pp<0.0) pp=0.0; + if (pp>256.0) pp=255.0; + + *v=pp; + return 0; +} + +//------------------------------------------------------ +//bikubicna interpolacija "sharp" +//za byte (char) vrednosti v packed color 32 bitnem formatu +//!!! ODKOD SUM??? (ze po eni rotaciji v interp_test !!) +//!!! v defish tega suma ni??? +int interpBC2_b32(unsigned char *sl, int w, int h, float x, float y, unsigned char *v) +{ + int b,i,k,l,m,n,u; + float pp,p[4],wx[4],wy[4],xx; + +#ifdef TEST_XY_LIMITS + if ((x<0)||(x>w)||(y<0)||(y>h)) return -1; +#endif + + m=(int)ceilf(x)-2; if (m<0) m=0; if ((m+5)>w) m=w-4; + n=(int)ceilf(y)-2; if (n<0) n=0; if ((n+5)>h) n=h-4; + + //najprej po y (stiri stolpce) + xx=y-n; wy[0]=(-0.75*(xx-5.0)*xx-6.0)*xx+3.0; + xx=xx-1.0; wy[1]=(1.25*xx-2.25)*xx*xx+1.0; + xx=1.0-xx; wy[2]=(1.25*xx-2.25)*xx*xx+1.0; + xx=xx+1.0; wy[3]=(-0.75*(xx-5.0)*xx-6.0)*xx+3.0; + //se po x + xx=x-m; wx[0]=(-0.75*(xx-5.0)*xx-6.0)*xx+3.0; + xx=xx-1.0; wx[1]=(1.25*xx-2.25)*xx*xx+1.0; + xx=1.0-xx; wx[2]=(1.25*xx-2.25)*xx*xx+1.0; + xx=xx+1.0; wx[3]=(-0.75*(xx-5.0)*xx-6.0)*xx+3.0; + + k=4*(n*w+m); u=4*w; + for (b=0;b<4;b++) + { + for (i=0;i<4;i++) + { + p[i]=0.0; + l=k+4*i; + p[i]=wy[0]*sl[l]; l+=u; + p[i]+=wy[1]*sl[l]; l+=u; + p[i]+=wy[2]*sl[l]; l+=u; + p[i]+=wy[3]*sl[l]; + } + k++; + + pp=wx[0]*p[0]; + pp+=wx[1]*p[1]; + pp+=wx[2]*p[2]; + pp+=wx[3]*p[3]; + + if (pp<0.0) pp=0.0; + if (pp>256.0) pp=255.0; + + v[b]=pp; + } + + return 0; +} + +//------------------------------------------------------ +//spline 4x4 interpolacija +//za byte (char) vrednosti +//Helmut Dersch polinom +// *sl vhodni array (slika) +// w,h dimenzija slike je wxh +// x,y tocka, za katero izracuna interpolirano vrednost +// *v interpolirana vrednost +int interpSP4_b(unsigned char *sl, int w, int h, float x, float y, unsigned char *v) +{ + int i,j,m,n; + float pp,p[4],wx[4],wy[4],xx; + +#ifdef TEST_XY_LIMITS + if ((x<0)||(x>w)||(y<0)||(y>h)) return -1; +#endif + + m=(int)ceilf(x)-2; if (m<0) m=0; if ((m+5)>w) m=w-4; + n=(int)ceilf(y)-2; if (n<0) n=0; if ((n+5)>h) n=h-4; + + //najprej po y (stiri stolpce) + xx=y-n; wy[0]=((-0.333333*(xx-1.0)+0.8)*(xx-1.0)-0.466667)*(xx-1.0); + xx=xx-1.0; wy[1]=((xx-1.8)*xx-0.2)*xx+1.0; + xx=1.0-xx; wy[2]=((xx-1.8)*xx-0.2)*xx+1.0; + xx=xx+1.0; wy[3]=((-0.333333*(xx-1.0)+0.8)*(xx-1.0)-0.466667)*(xx-1.0); + //se po x + xx=x-m; wx[0]=((-0.333333*(xx-1.0)+0.8)*(xx-1.0)-0.466667)*(xx-1.0); + xx=xx-1.0; wx[1]=((xx-1.8)*xx-0.2)*xx+1.0; + xx=1.0-xx; wx[2]=((xx-1.8)*xx-0.2)*xx+1.0; + xx=xx+1.0; wx[3]=((-0.333333*(xx-1.0)+0.8)*(xx-1.0)-0.466667)*(xx-1.0); + + for (i=0;i<4;i++) + { + p[i]=0.0; + for (j=0;j<4;j++) + { + p[i]=p[i]+wy[j]*sl[(j+n)*w+i+m]; + } + } + + pp=0.0; + for (i=0;i<4;i++) + pp=pp+wx[i]*p[i]; + + if (pp<0.0) pp=0.0; + if (pp>256.0) pp=255.0; + + *v=pp; + return 0; +} + +//------------------------------------------------------ +//spline 4x4 interpolacija +//za byte (char) vrednosti v packed color 32 bitnem formatu +int interpSP4_b32(unsigned char *sl, int w, int h, float x, float y, unsigned char *v) +{ + int i,j,m,n,b; + float pp,p[4],wx[4],wy[4],xx; + +#ifdef TEST_XY_LIMITS + if ((x<0)||(x>w)||(y<0)||(y>h)) return -1; +#endif + + m=(int)ceilf(x)-2; if (m<0) m=0; if ((m+5)>w) m=w-4; + n=(int)ceilf(y)-2; if (n<0) n=0; if ((n+5)>h) n=h-4; + + //najprej po y (stiri stolpce) + xx=y-n; wy[0]=((-0.333333*(xx-1.0)+0.8)*(xx-1.0)-0.466667)*(xx-1.0); + xx=xx-1.0; wy[1]=((xx-1.8)*xx-0.2)*xx+1.0; + xx=1.0-xx; wy[2]=((xx-1.8)*xx-0.2)*xx+1.0; + xx=xx+1.0; wy[3]=((-0.333333*(xx-1.0)+0.8)*(xx-1.0)-0.466667)*(xx-1.0); + //se po x + xx=x-m; wx[0]=((-0.333333*(xx-1.0)+0.8)*(xx-1.0)-0.466667)*(xx-1.0); + xx=xx-1.0; wx[1]=((xx-1.8)*xx-0.2)*xx+1.0; + xx=1.0-xx; wx[2]=((xx-1.8)*xx-0.2)*xx+1.0; + xx=xx+1.0; wx[3]=((-0.333333*(xx-1.0)+0.8)*(xx-1.0)-0.466667)*(xx-1.0); + + for (b=0;b<4;b++) + { + for (i=0;i<4;i++) + { + p[i]=0.0; + for (j=0;j<4;j++) + { + p[i]=p[i]+wy[j]*sl[4*((j+n)*w+i+m)+b]; + } + } + + pp=0.0; + for (i=0;i<4;i++) + pp=pp+wx[i]*p[i]; + + if (pp<0.0) pp=0.0; + if (pp>256.0) pp=255.0; + + v[b]=pp; + } + + return 0; +} + +//------------------------------------------------------ +//spline 6x6 interpolacija +//za byte (char) vrednosti +//Helmut Dersch polinom +// *sl vhodni array (slika) +// w,h dimenzija slike je wxh +// x,y tocka, za katero izracuna interpolirano vrednost +// *v interpolirana vrednost +//!!! PAZI, TOLE NE DELA CISTO PRAV ??? belina se siri +//!!! zaenkrat sem dodal fudge factor... +int interpSP6_b(unsigned char *sl, int w, int h, float x, float y, unsigned char *v) +{ + int i,j,m,n; + float pp,p[6],wx[6],wy[6],xx; + +#ifdef TEST_XY_LIMITS + if ((x<0)||(x>w)||(y<0)||(y>h)) return -1; +#endif + + m=(int)ceilf(x)-3; if (m<0) m=0; if ((m+7)>w) m=w-6; + n=(int)ceilf(y)-3; if (n<0) n=0; if ((n+7)>h) n=h-6; + + //najprej po y (sest stolpcev) + xx=y-n; + wy[0]=((0.090909*(xx-2.0)-0.215311)*(xx-2.0)+0.124402)*(xx-2.0); + xx=xx-1.0; + wy[1]=((-0.545455*(xx-1.0)+1.291866)*(xx-1.0)-0.746411)*(xx-1.0); + xx=xx-1.0; + wy[2]=((1.181818*xx-2.167464)*xx+0.014354)*xx+1.0; + xx=1.0-xx; + wy[3]=((1.181818*xx-2.167464)*xx+0.014354)*xx+1.0; + xx=xx+1.0; + wy[4]=((-0.545455*(xx-1.0)+1.291866)*(xx-1.0)-0.746411)*(xx-1.0); + xx=xx+1.0; + wy[5]=((0.090909*(xx-2.0)-0.215311)*(xx-2.0)+0.124402)*(xx-2.0); + //se po x + xx=x-m; + wx[0]=((0.090909*(xx-2.0)-0.215311)*(xx-2.0)+0.124402)*(xx-2.0); + xx=xx-1.0; + wx[1]=((-0.545455*(xx-1.0)+1.291866)*(xx-1.0)-0.746411)*(xx-1.0); + xx=xx-1.0; + wx[2]=((1.181818*xx-2.167464)*xx+0.014354)*xx+1.0; + xx=1.0-xx; + wx[3]=((1.181818*xx-2.167464)*xx+0.014354)*xx+1.0; + xx=xx+1.0; + wx[4]=((-0.545455*(xx-1.0)+1.291866)*(xx-1.0)-0.746411)*(xx-1.0); + xx=xx+1.0; + wx[5]=((0.090909*(xx-2.0)-0.215311)*(xx-2.0)+0.124402)*(xx-2.0); + + + for (i=0;i<6;i++) + { + p[i]=0.0; + for (j=0;j<6;j++) + { + p[i]=p[i]+wy[j]*sl[(j+n)*w+i+m]; + } + } + + pp=0.0; + for (i=0;i<6;i++) + pp=pp+wx[i]*p[i]; + + pp=0.947*pp; //fudge factor...!!! cca 0.947... + if (pp<0.0) pp=0.0; + if (pp>256.0) pp=255.0; + + *v=pp; + return 0; +} + +//------------------------------------------------------ +//spline 6x6 interpolacija +//za byte (char) vrednosti v packed color 32 bitnem formatu +//!!! PAZI, TOLE NE DELA CISTO PRAV ??? belina se siri +//!!! zaenkrat sem dodal fudge factor... +int interpSP6_b32(unsigned char *sl, int w, int h, float x, float y, unsigned char *v) +{ + int i,b,j,m,n; + float pp,p[6],wx[6],wy[6],xx; + +#ifdef TEST_XY_LIMITS + if ((x<0)||(x>w)||(y<0)||(y>h)) return -1; +#endif + + m=(int)ceilf(x)-3; if (m<0) m=0; if ((m+7)>w) m=w-6; + n=(int)ceilf(y)-3; if (n<0) n=0; if ((n+7)>h) n=h-6; + + //najprej po y (sest stolpcev) + xx=y-n; + wy[0]=((0.090909*(xx-2.0)-0.215311)*(xx-2.0)+0.124402)*(xx-2.0); + xx=xx-1.0; + wy[1]=((-0.545455*(xx-1.0)+1.291866)*(xx-1.0)-0.746411)*(xx-1.0); + xx=xx-1.0; + wy[2]=((1.181818*xx-2.167464)*xx+0.014354)*xx+1.0; + xx=1.0-xx; + wy[3]=((1.181818*xx-2.167464)*xx+0.014354)*xx+1.0; + xx=xx+1.0; + wy[4]=((-0.545455*(xx-1.0)+1.291866)*(xx-1.0)-0.746411)*(xx-1.0); + xx=xx+1.0; + wy[5]=((0.090909*(xx-2.0)-0.215311)*(xx-2.0)+0.124402)*(xx-2.0); + //se po x + xx=x-m; + wx[0]=((0.090909*(xx-2.0)-0.215311)*(xx-2.0)+0.124402)*(xx-2.0); + xx=xx-1.0; + wx[1]=((-0.545455*(xx-1.0)+1.291866)*(xx-1.0)-0.746411)*(xx-1.0); + xx=xx-1.0; + wx[2]=((1.181818*xx-2.167464)*xx+0.014354)*xx+1.0; + xx=1.0-xx; + wx[3]=((1.181818*xx-2.167464)*xx+0.014354)*xx+1.0; + xx=xx+1.0; + wx[4]=((-0.545455*(xx-1.0)+1.291866)*(xx-1.0)-0.746411)*(xx-1.0); + xx=xx+1.0; + wx[5]=((0.090909*(xx-2.0)-0.215311)*(xx-2.0)+0.124402)*(xx-2.0); + + + for (b=0;b<4;b++) + { + for (i=0;i<6;i++) + { + p[i]=0.0; + for (j=0;j<6;j++) + { + p[i]=p[i]+wy[j]*sl[4*((j+n)*w+i+m)+b]; + } + } + + pp=0.0; + for (i=0;i<6;i++) + pp=pp+wx[i]*p[i]; + + pp=0.947*pp; //fudge factor...!!! cca 0.947... + if (pp<0.0) pp=0.0; + if (pp>256.0) pp=255.0; + + v[b]=pp; + } + + return 0; +} + +//------------------------------------------------------ +//truncated sinc "lanczos" 16x16 interpolacija +//za byte (char) vrednosti +// *sl vhodni array (slika) +// w,h dimenzija slike je wxh +// x,y tocka, za katero izracuna interpolirano vrednost +// *v interpolirana vrednost +int interpSC16_b(unsigned char *sl, int w, int h, float x, float y, unsigned char *v) +{ + int i,j,m,n; + float pp,p[16],wx[16],wy[16],xx,xxx,x1; + float PI=3.141592654; + +#ifdef TEST_XY_LIMITS + if ((x<0)||(x>w)||(y<0)||(y>h)) return -1; +#endif + + m=(int)ceilf(x)-8; if (m<0) m=0; if ((m+17)>w) m=w-16; + n=(int)ceilf(y)-8; if (n<0) n=0; if ((n+17)>h) n=h-16; + + //najprej po y + xx=y-n; + for (i=7;i>=0;i--) + { + x1=xx*PI; + wy[7-i]=(sin(x1)/(x1))*(sin(x1*0.125)/(x1*0.125)); + xxx=(float)(2*i+1)-xx; + x1=xxx*PI; + wy[8+i]=(sin(x1)/(x1))*(sin(x1*0.125)/(x1*0.125)); + xx=xx-1.0; + } + //se po x + xx=x-m; + for (i=7;i>=0;i--) + { + x1=xx*PI; + wx[7-i]=(sin(x1)/(x1))*(sin(x1*0.125)/(x1*0.125)); + xxx=(float)(2*i+1)-xx; + x1=xxx*PI; + wx[8+i]=(sin(x1)/(x1))*(sin(x1*0.125)/(x1*0.125)); + xx=xx-1.0; + } + + for (i=0;i<16;i++) + { + p[i]=0.0; + for (j=0;j<16;j++) + { + p[i]=p[i]+wy[j]*sl[(j+n)*w+i+m]; + } + } + + pp=0.0; + for (i=0;i<16;i++) + pp=pp+wx[i]*p[i]; + + if (pp<0.0) pp=0.0; + if (pp>256.0) pp=255.0; + + *v=pp; + return 0; +} + +//------------------------------------------------------ +//truncated sinc "lanczos" 16x16 interpolacija +//za byte (char) vrednosti v packed color 32 bitnem formatu +int interpSC16_b32(unsigned char *sl, int w, int h, float x, float y, unsigned char *v) +{ + int i,j,m,b,n; + float pp,p[16],wx[16],wy[16],xx,xxx,x1; + float PI=3.141592654; + +#ifdef TEST_XY_LIMITS + if ((x<0)||(x>w)||(y<0)||(y>h)) return -1; +#endif + + m=(int)ceilf(x)-8; if (m<0) m=0; if ((m+17)>w) m=w-16; + n=(int)ceilf(y)-8; if (n<0) n=0; if ((n+17)>h) n=h-16; + + //najprej po y + xx=y-n; + for (i=7;i>=0;i--) + { + x1=xx*PI; + wy[7-i]=(sin(x1)/(x1))*(sin(x1*0.125)/(x1*0.125)); + xxx=(float)(2*i+1)-xx; + x1=xxx*PI; + wy[8+i]=(sin(x1)/(x1))*(sin(x1*0.125)/(x1*0.125)); + xx=xx-1.0; + } + //se po x + xx=x-m; + for (i=7;i>=0;i--) + { + x1=xx*PI; + wx[7-i]=(sin(x1)/(x1))*(sin(x1*0.125)/(x1*0.125)); + xxx=(float)(2*i+1)-xx; + x1=xxx*PI; + wx[8+i]=(sin(x1)/(x1))*(sin(x1*0.125)/(x1*0.125)); + xx=xx-1.0; + } + + for (b=0;b<4;b++) + { + for (i=0;i<16;i++) + { + p[i]=0.0; + for (j=0;j<16;j++) + { + p[i]=p[i]+wy[j]*sl[4*((j+n)*w+i+m)+b]; + } + } + + pp=0.0; + for (i=0;i<16;i++) + pp=pp+wx[i]*p[i]; + + if (pp<0.0) pp=0.0; + if (pp>256.0) pp=255.0; + + v[b]=pp; + } + + return 0; +} diff --git a/src/filter/delay0r/CMakeLists.txt b/src/filter/delay0r/CMakeLists.txt new file mode 100644 index 0000000..0534a89 --- /dev/null +++ b/src/filter/delay0r/CMakeLists.txt @@ -0,0 +1,11 @@ +set (SOURCES delay0r.cpp) +set (TARGET delay0r) + +if (MSVC) + set (SOURCES ${SOURCES} ${FREI0R_DEF}) +endif (MSVC) + +add_library (${TARGET} MODULE ${SOURCES}) +set_target_properties (${TARGET} PROPERTIES PREFIX "") + +install (TARGETS ${TARGET} LIBRARY DESTINATION ${LIBDIR}) diff --git a/src/filter/delay0r/delay0r.cpp b/src/filter/delay0r/delay0r.cpp index 8cd304a..f635ad4 100644 --- a/src/filter/delay0r/delay0r.cpp +++ b/src/filter/delay0r/delay0r.cpp @@ -10,6 +10,7 @@ public: delay0r(unsigned int width, unsigned int height) { + delay = 0.0; register_param(delay,"DelayTime","the delay time"); } diff --git a/src/filter/delaygrab/CMakeLists.txt b/src/filter/delaygrab/CMakeLists.txt new file mode 100644 index 0000000..2a48e89 --- /dev/null +++ b/src/filter/delaygrab/CMakeLists.txt @@ -0,0 +1,11 @@ +set (SOURCES delaygrab.cpp) +set (TARGET delaygrab) + +if (MSVC) + set (SOURCES ${SOURCES} ${FREI0R_DEF}) +endif (MSVC) + +add_library (${TARGET} MODULE ${SOURCES}) +set_target_properties (${TARGET} PROPERTIES PREFIX "") + +install (TARGETS ${TARGET} LIBRARY DESTINATION ${LIBDIR}) diff --git a/src/filter/delaygrab/delaygrab.cpp b/src/filter/delaygrab/delaygrab.cpp index 168505c..9410d8e 100644 --- a/src/filter/delaygrab/delaygrab.cpp +++ b/src/filter/delaygrab/delaygrab.cpp @@ -283,7 +283,7 @@ -frei0r::construct plugin("Dealygrab", +frei0r::construct plugin("Delaygrab", "delayed frame blitting mapped on a time bitmap", "Bill Spinhover, Andreas Schiffler, Jaromil", 3,0); diff --git a/src/filter/denoise/CMakeLists.txt b/src/filter/denoise/CMakeLists.txt new file mode 100644 index 0000000..dba6bbe --- /dev/null +++ b/src/filter/denoise/CMakeLists.txt @@ -0,0 +1,12 @@ +set (SOURCES hqdn3d.c) +set (TARGET hqdn3d) + +if (MSVC) + set_source_files_properties (hqdn3d.c PROPERTIES LANGUAGE CXX) + set (SOURCES ${SOURCES} ${FREI0R_DEF}) +endif (MSVC) + +add_library (${TARGET} MODULE ${SOURCES}) +set_target_properties (${TARGET} PROPERTIES PREFIX "") + +install (TARGETS ${TARGET} LIBRARY DESTINATION ${LIBDIR}) diff --git a/src/filter/denoise/README b/src/filter/denoise/README new file mode 100644 index 0000000..a9ed4f3 --- /dev/null +++ b/src/filter/denoise/README @@ -0,0 +1,27 @@ +Denoise Frei0r plugins + + +For now, I have only ported the Daniel Moreno's hqdn3d filter from +Mplayer. + +I have also tried Mplayer's "ow" (overcomplete wavelet) denoiser, but +despite being only 2D, it is EXTREMELY slow (like <1fps...), so I +decided not to include it for now. + +In the future I would like to try at least a thresholded 3D median, +and maybe port something like fftdenoise3d from Avisynth. That +is a pretty big chunk of code, and originally written for another +operating system, so much more work, and it depends when I'll have +the spare time for that. + +Or maybe some other "smart" denoiser, suggestions welcome. + + + +HQDN3D + +This is a three dimensional nonlinear IIR filter. Does a pretty god +job at moderate noise levels. For stronger denoising, it becomes a bit +asymmetric, which is a consequence of its IIR form. + + diff --git a/src/filter/denoise/hqdn3d.c b/src/filter/denoise/hqdn3d.c new file mode 100755 index 0000000..c588b1a --- /dev/null +++ b/src/filter/denoise/hqdn3d.c @@ -0,0 +1,418 @@ +/* +hqdn3d.c + +This frei0r plugin is a port of Mplayer's hqdb3d denoiser +original by Daniel Moreno + +Version 0.1 nov 2010 + +Copyright (C) 2010 Marko Cebokli http://lea.hamradio.si/~s57uuu + + + 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. + +*/ + + +//compile: gcc -c -fPIC -Wall hqdn3d.c -o hqdn3d.o +//link: gcc -shared -o hqdn3d.so hqdn3d.o + +//#include +#include +#include +#include +#include +#include + +#define MIN_MATRIX_SIZE 3 +#define MAX_MATRIX_SIZE 63 + + +//---------------------------------------- +typedef struct { + int Coefs[4][512*16]; + unsigned int *Line; + unsigned short *Frame[3]; +}vf_priv_s; + +//---------------------------------------- +//struktura za instanco efekta +typedef struct +{ +int h; +int w; + +double LumSpac,LumTmp; +vf_priv_s vps; + +unsigned char *Rplani,*Gplani,*Bplani,*Rplano,*Gplano,*Bplano; +} inst; + + +//======================================================== +//functions LowPassMul, deNoiseTemporal, deNoiseSpacial, +//deNoise and PrecalaCoefs are from Mplayer "hqdn3d" filter +//by Daniel Moreno + +inline unsigned int LowPassMul(unsigned int PrevMul, unsigned int CurrMul, int* Coef){ +// int dMul= (PrevMul&0xFFFFFF)-(CurrMul&0xFFFFFF); + int dMul= PrevMul-CurrMul; + unsigned int d=((dMul+0x10007FF)>>12); + return CurrMul + Coef[d]; +} + +void deNoiseTemporal( + unsigned char *Frame, // mpi->planes[x] + unsigned char *FrameDest, // dmpi->planes[x] + unsigned short *FrameAnt, + int W, int H, int sStride, int dStride, + int *Temporal) +{ + long X, Y; + unsigned int PixelDst; + + for (Y = 0; Y < H; Y++){ + for (X = 0; X < W; X++){ + PixelDst = LowPassMul(FrameAnt[X]<<8, Frame[X]<<16, Temporal); + FrameAnt[X] = ((PixelDst+0x1000007F)>>8); + FrameDest[X]= ((PixelDst+0x10007FFF)>>16); + } + Frame += sStride; + FrameDest += dStride; + FrameAnt += W; + } +} + +void deNoiseSpacial( + unsigned char *Frame, // mpi->planes[x] + unsigned char *FrameDest, // dmpi->planes[x] + unsigned int *LineAnt, // vf->priv->Line (width bytes) + int W, int H, int sStride, int dStride, + int *Horizontal, int *Vertical) +{ + long X, Y; + long sLineOffs = 0, dLineOffs = 0; + unsigned int PixelAnt; + unsigned int PixelDst; + + /* First pixel has no left nor top neighbor. */ + PixelDst = LineAnt[0] = PixelAnt = Frame[0]<<16; + FrameDest[0]= ((PixelDst+0x10007FFF)>>16); + + /* First line has no top neighbor, only left. */ + for (X = 1; X < W; X++){ + PixelDst = LineAnt[X] = LowPassMul(PixelAnt, Frame[X]<<16, Horizontal); + FrameDest[X]= ((PixelDst+0x10007FFF)>>16); + } + + for (Y = 1; Y < H; Y++){ + unsigned int PixelAnt; + sLineOffs += sStride, dLineOffs += dStride; + /* First pixel on each line doesn't have previous pixel */ + PixelAnt = Frame[sLineOffs]<<16; + PixelDst = LineAnt[0] = LowPassMul(LineAnt[0], PixelAnt, Vertical); + FrameDest[dLineOffs]= ((PixelDst+0x10007FFF)>>16); + + for (X = 1; X < W; X++){ + unsigned int PixelDst; + /* The rest are normal */ + PixelAnt = LowPassMul(PixelAnt, Frame[sLineOffs+X]<<16, Horizontal); + PixelDst = LineAnt[X] = LowPassMul(LineAnt[X], PixelAnt, Vertical); + FrameDest[dLineOffs+X]= ((PixelDst+0x10007FFF)>>16); + } + } +} + +void deNoise(unsigned char *Frame, // mpi->planes[x] + unsigned char *FrameDest, // dmpi->planes[x] + unsigned int *LineAnt, // vf->priv->Line (width bytes) + unsigned short **FrameAntPtr, + int W, int H, int sStride, int dStride, + int *Horizontal, int *Vertical, int *Temporal) +{ + long X, Y; + long sLineOffs = 0, dLineOffs = 0; + unsigned int PixelAnt; + unsigned int PixelDst; + unsigned short* FrameAnt=(*FrameAntPtr); + + if(!FrameAnt){ + (*FrameAntPtr)=FrameAnt=malloc(W*H*sizeof(unsigned short)); + for (Y = 0; Y < H; Y++){ + unsigned short* dst=&FrameAnt[Y*W]; + unsigned char* src=Frame+Y*sStride; + for (X = 0; X < W; X++) dst[X]=src[X]<<8; + } + } + + if(!Horizontal[0] && !Vertical[0]){ + deNoiseTemporal(Frame, FrameDest, FrameAnt, + W, H, sStride, dStride, Temporal); + return; + } + if(!Temporal[0]){ + deNoiseSpacial(Frame, FrameDest, LineAnt, + W, H, sStride, dStride, Horizontal, Vertical); + return; + } + + /* First pixel has no left nor top neighbor. Only previous frame */ + LineAnt[0] = PixelAnt = Frame[0]<<16; + PixelDst = LowPassMul(FrameAnt[0]<<8, PixelAnt, Temporal); + FrameAnt[0] = ((PixelDst+0x1000007F)>>8); + FrameDest[0]= ((PixelDst+0x10007FFF)>>16); + + /* First line has no top neighbor. Only left one for each pixel and + * last frame */ + for (X = 1; X < W; X++){ + LineAnt[X] = PixelAnt = LowPassMul(PixelAnt, Frame[X]<<16, Horizontal); + PixelDst = LowPassMul(FrameAnt[X]<<8, PixelAnt, Temporal); + FrameAnt[X] = ((PixelDst+0x1000007F)>>8); + FrameDest[X]= ((PixelDst+0x10007FFF)>>16); + } + + for (Y = 1; Y < H; Y++){ + unsigned int PixelAnt; + unsigned short* LinePrev=&FrameAnt[Y*W]; + sLineOffs += sStride, dLineOffs += dStride; + /* First pixel on each line doesn't have previous pixel */ + PixelAnt = Frame[sLineOffs]<<16; + LineAnt[0] = LowPassMul(LineAnt[0], PixelAnt, Vertical); + PixelDst = LowPassMul(LinePrev[0]<<8, LineAnt[0], Temporal); + LinePrev[0] = ((PixelDst+0x1000007F)>>8); + FrameDest[dLineOffs]= ((PixelDst+0x10007FFF)>>16); + + for (X = 1; X < W; X++){ + unsigned int PixelDst; + /* The rest are normal */ + PixelAnt = LowPassMul(PixelAnt, Frame[sLineOffs+X]<<16, Horizontal); + LineAnt[X] = LowPassMul(LineAnt[X], PixelAnt, Vertical); + PixelDst = LowPassMul(LinePrev[X]<<8, LineAnt[X], Temporal); + LinePrev[X] = ((PixelDst+0x1000007F)>>8); + FrameDest[dLineOffs+X]= ((PixelDst+0x10007FFF)>>16); + } + } +} + +#define ABS(A) ( (A) > 0 ? (A) : -(A) ) + +static void PrecalcCoefs(int *Ct, double Dist25) +{ + int i; + double Gamma, Simil, C; + + Gamma = log(0.25) / log(1.0 - Dist25/255.0 - 0.00001); + + for (i = -255*16; i <= 255*16; i++) + { + Simil = 1.0 - ABS(i) / (16*255.0); + C = pow(Simil, Gamma) * 65536.0 * (double)i / 16.0; + Ct[16*256+i] = (C<0) ? (C-0.5) : (C+0.5); + } + + Ct[0] = (Dist25 != 0); +} + +//end of hqdn3d functions +//=============================================== + + + +//----------------------------------------------------- +//stretch [0...1] to parameter range [min...max] linear +float map_value_forward(double v, float min, float max) +{ +return min+(max-min)*v; +} + +//----------------------------------------------------- +//collapse from parameter range [min...max] to [0...1] linear +double map_value_backward(float v, float min, float max) +{ +return (v-min)/(max-min); +} + +//*********************************************** +// OBVEZNE FREI0R FUNKCIJE + +//----------------------------------------------- +int f0r_init() +{ +return 1; +} + +//------------------------------------------------ +void f0r_deinit() +{ +} + +//----------------------------------------------- +void f0r_get_plugin_info(f0r_plugin_info_t* info) +{ + +info->name="hqdn3d"; +info->author="Marko Cebokli, Daniel Moreno"; +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="High quality 3D denoiser from Mplayer"; +} + +//-------------------------------------------------- +void f0r_get_param_info(f0r_param_info_t* info, int param_index) +{ +switch(param_index) + { + case 0: + info->name = "Spatial"; + info->type = F0R_PARAM_DOUBLE; + info->explanation = "Amount of spatial filtering"; + break; + case 1: + info->name = "Temporal"; + info->type = F0R_PARAM_DOUBLE; + info->explanation = "Amount of temporal filtering"; + break; + } +} + +//---------------------------------------------- +f0r_instance_t f0r_construct(unsigned int width, unsigned int height) +{ +inst *in; + +in=calloc(1,sizeof(inst)); +in->w=width; +in->h=height; + +in->LumSpac=4; +in->LumTmp=6; +in->vps.Line=calloc(width,sizeof(int)); +in->Rplani=calloc(width*height,sizeof(unsigned char)); +in->Gplani=calloc(width*height,sizeof(unsigned char)); +in->Bplani=calloc(width*height,sizeof(unsigned char)); +in->Rplano=calloc(width*height,sizeof(unsigned char)); +in->Gplano=calloc(width*height,sizeof(unsigned char)); +in->Bplano=calloc(width*height,sizeof(unsigned char)); + +PrecalcCoefs(in->vps.Coefs[0],in->LumSpac); +PrecalcCoefs(in->vps.Coefs[1],in->LumTmp); + +return (f0r_instance_t)in; +} + +//--------------------------------------------------- +void f0r_destruct(f0r_instance_t instance) +{ +inst *in; + +in=(inst*)instance; + +free(in->vps.Line); +free(in->Rplani); +free(in->Gplani); +free(in->Bplani); +free(in->Rplano); +free(in->Gplano); +free(in->Bplano); + +free(instance); +} + +//----------------------------------------------------- +void f0r_set_param_value(f0r_instance_t instance, f0r_param_t parm, int param_index) +{ +inst *p; +double tmpf; +int chg; + +p=(inst*)instance; + +chg=0; +switch(param_index) + { + case 0: + tmpf=map_value_forward(*((double*)parm), 0.0, 100.0); + if (tmpf!=p->LumSpac) chg=1; + p->LumSpac=tmpf; + break; + case 1: + tmpf=map_value_forward(*((double*)parm), 0.0, 100.0); + if (tmpf!=p->LumTmp) chg=1; + p->LumTmp=tmpf; + break; + } + +if (chg==0) return; + +PrecalcCoefs(p->vps.Coefs[0],p->LumSpac); +PrecalcCoefs(p->vps.Coefs[1],p->LumTmp); + +} + +//-------------------------------------------------- +void f0r_get_param_value(f0r_instance_t instance, f0r_param_t param, int param_index) +{ +inst *p; + +p=(inst*)instance; + +switch(param_index) + { + case 0: + *((double*)param)=map_value_backward(p->LumSpac, 0.0, 100.0);//BOOL!! + break; + case 1: + *((double*)param)=map_value_backward(p->LumTmp, 0.0, 100.0);//BOOL!! + break; + } +} + +//------------------------------------------------- +void f0r_update(f0r_instance_t instance, double time, const uint32_t* inframe, uint32_t* outframe) +{ +inst *in; +int i; + +assert(instance); +in=(inst*)instance; + +//Frei0r works with packed color, Mplayer with planar color +//I decided to copy data rather than modify the hqdn3d functions +//this takes some time, but future inmprovements in hqdn3d +//functions can be simply copied here without modification + +for (i=0;i<(in->w*in->h);i++) //copy to planar + { + in->Rplani[i]=inframe[i]&255; + in->Gplani[i]=(inframe[i]>>8)&255; + in->Bplani[i]=(inframe[i]>>16)&255; + } + +deNoise(in->Rplani, in->Rplano, in->vps.Line, &in->vps.Frame[0], in->w, in->h, in->w, in->w, in->vps.Coefs[0], in->vps.Coefs[0], in->vps.Coefs[1]); +deNoise(in->Gplani, in->Gplano, in->vps.Line, &in->vps.Frame[1], in->w, in->h, in->w, in->w, in->vps.Coefs[0], in->vps.Coefs[0], in->vps.Coefs[1]); +deNoise(in->Bplani, in->Bplano, in->vps.Line, &in->vps.Frame[2], in->w, in->h, in->w, in->w, in->vps.Coefs[0], in->vps.Coefs[0], in->vps.Coefs[1]); + +for (i=0;i<(in->w*in->h);i++) //copy to packed, preserve alpha + { + outframe[i]=((uint32_t)in->Rplano[i])|((uint32_t)in->Gplano[i]<<8)|((uint32_t)in->Bplano[i]<<16)|(inframe[i]&0xFF000000); + } + + +} + diff --git a/src/filter/distort0r/CMakeLists.txt b/src/filter/distort0r/CMakeLists.txt new file mode 100644 index 0000000..8210bd6 --- /dev/null +++ b/src/filter/distort0r/CMakeLists.txt @@ -0,0 +1,12 @@ +set (SOURCES distort0r.c) +set (TARGET distort0r) + +if (MSVC) + set_source_files_properties (distort0r.c PROPERTIES LANGUAGE CXX) + set (SOURCES ${SOURCES} ${FREI0R_DEF}) +endif (MSVC) + +add_library (${TARGET} MODULE ${SOURCES}) +set_target_properties (${TARGET} PROPERTIES PREFIX "") + +install (TARGETS ${TARGET} LIBRARY DESTINATION ${LIBDIR}) diff --git a/src/filter/distort0r/distort0r.c b/src/filter/distort0r/distort0r.c index ea99573..5a9a9b4 100644 --- a/src/filter/distort0r/distort0r.c +++ b/src/filter/distort0r/distort0r.c @@ -1,5 +1,8 @@ #include #include +#if defined(_MSC_VER) +#define _USE_MATH_DEFINES +#endif #include #include "frei0r.h" @@ -41,7 +44,7 @@ distorterInfo->name = "Distort0r"; distorterInfo->author = "Gephex crew"; distorterInfo->plugin_type = F0R_PLUGIN_TYPE_FILTER; - distorterInfo->color_model = F0R_COLOR_MODEL_BGRA8888; + distorterInfo->color_model = F0R_COLOR_MODEL_PACKED32; distorterInfo->frei0r_version = FREI0R_MAJOR_VERSION; distorterInfo->major_version = 0; distorterInfo->minor_version = 9; @@ -68,7 +71,7 @@ f0r_instance_t f0r_construct(unsigned int width, unsigned int height) { - distorter_instance_t* inst = calloc(1, sizeof(*inst)); + distorter_instance_t* inst = (distorter_instance_t*)calloc(1, sizeof(*inst)); inst->width = width; inst->height = height; inst->grid = (grid_point_t*)malloc(sizeof(grid_point_t)* diff --git a/src/filter/edgeglow/CMakeLists.txt b/src/filter/edgeglow/CMakeLists.txt new file mode 100644 index 0000000..2efa41e --- /dev/null +++ b/src/filter/edgeglow/CMakeLists.txt @@ -0,0 +1,11 @@ +set (SOURCES edgeglow.cpp) +set (TARGET edgeglow) + +if (MSVC) + set (SOURCES ${SOURCES} ${FREI0R_DEF}) +endif (MSVC) + +add_library (${TARGET} MODULE ${SOURCES}) +set_target_properties (${TARGET} PROPERTIES PREFIX "") + +install (TARGETS ${TARGET} LIBRARY DESTINATION ${LIBDIR}) diff --git a/src/filter/edgeglow/edgeglow.cpp b/src/filter/edgeglow/edgeglow.cpp index 5507b99..deb66ca 100644 --- a/src/filter/edgeglow/edgeglow.cpp +++ b/src/filter/edgeglow/edgeglow.cpp @@ -39,6 +39,9 @@ edgeglow(unsigned int width, unsigned int height) { + lthresh = 0.0; + lupscale = 0.0; + lredscale = 0.0; 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"); diff --git a/src/filter/equaliz0r/CMakeLists.txt b/src/filter/equaliz0r/CMakeLists.txt new file mode 100644 index 0000000..b3a48e7 --- /dev/null +++ b/src/filter/equaliz0r/CMakeLists.txt @@ -0,0 +1,11 @@ +set (SOURCES equaliz0r.cpp) +set (TARGET equaliz0r) + +if (MSVC) + set (SOURCES ${SOURCES} ${FREI0R_DEF}) +endif (MSVC) + +add_library (${TARGET} MODULE ${SOURCES}) +set_target_properties (${TARGET} PROPERTIES PREFIX "") + +install (TARGETS ${TARGET} LIBRARY DESTINATION ${LIBDIR}) diff --git a/src/filter/facebl0r/CMakeLists.txt b/src/filter/facebl0r/CMakeLists.txt new file mode 100644 index 0000000..5cd7501 --- /dev/null +++ b/src/filter/facebl0r/CMakeLists.txt @@ -0,0 +1,15 @@ +set (SOURCES facebl0r.cpp) +set (TARGET facebl0r) + +if (MSVC) + set (SOURCES ${SOURCES} ${FREI0R_DEF}) +endif (MSVC) + +include_directories (${OpenCV_INCLUDE_DIR}) +link_directories (${OpenCV_LIBRARY_DIRS}) +LINK_LIBRARIES(${OpenCV_LIBS} ${OpenCV_LIBRARIES}) + +add_library (${TARGET} MODULE ${SOURCES}) +set_target_properties (${TARGET} PROPERTIES PREFIX "") + +install (TARGETS ${TARGET} LIBRARY DESTINATION ${LIBDIR}) diff --git a/src/filter/facebl0r/facebl0r.cpp b/src/filter/facebl0r/facebl0r.cpp new file mode 100644 index 0000000..4d4100c --- /dev/null +++ b/src/filter/facebl0r/facebl0r.cpp @@ -0,0 +1,352 @@ +/* + * 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 3 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. + */ + + +#include +#include +#include +#include + +#include + +typedef struct { + IplImage* hsv; //input image converted to HSV + IplImage* hue; //hue channel of HSV image + IplImage* mask; //image for masking pixels + IplImage* prob; //face probability estimates for each pixel + + CvHistogram* hist; //histogram of hue in original face image + + CvRect prev_rect; //location of face in previous frame + CvBox2D curr_box; //current face location estimate +} TrackedObj; + +#define FACEBL0R_PARAM_CLASSIFIER (0) + +class FaceBl0r: public frei0r::filter { + +public: + FaceBl0r(int wdt, int hgt); + ~FaceBl0r(); + + void update(); + +private: + +// camshift + TrackedObj* create_tracked_object (IplImage* image, CvRect* face_rect); + void destroy_tracked_object (TrackedObj* tracked_obj); + CvBox2D camshift_track_face (IplImage* image, TrackedObj* imgs); + void update_hue_image (const IplImage* image, TrackedObj* imgs); + +//trackface + CvRect* detect_face (IplImage*, CvHaarClassifierCascade*, CvMemStorage*); + + + TrackedObj* tracked_obj; + CvBox2D face_box; //area to draw + CvRect* face_rect; + +//used by capture_video_frame, so we don't have to keep creating. + IplImage* image; + + CvHaarClassifierCascade* cascade; + CvMemStorage* storage; + + // plugin parameters + f0r_param_bool ellipse; + f0r_param_double recheck; + f0r_param_double threads; + f0r_param_double search_scale; + f0r_param_double neighbors; + f0r_param_double smallest; + f0r_param_double largest; + + f0r_param_string classifier; + char old_classifier[512]; + + + unsigned int face_found; + unsigned int face_notfound; +}; + + +frei0r::construct plugin("FaceBl0r", + "automatic face blur", + "ZioKernel, Biilly, Jilt, Jaromil, ddennedy", + 1,1, F0R_COLOR_MODEL_PACKED32); + +FaceBl0r::FaceBl0r(int wdt, int hgt) { + + face_rect = 0; + image = 0; + tracked_obj = 0; + face_found = 0; + + cascade = 0; + storage = 0; + + register_param("/usr/share/opencv/haarcascades/haarcascade_frontalface_default.xml", + "Classifier", + "Full path to the XML pattern model for recognition; look in /usr/share/opencv/haarcascades"); + ellipse = false; + register_param(ellipse, "Ellipse", "Draw a red ellipse around the object"); + recheck = 0.025; + face_notfound = cvRound(recheck * 1000); + register_param(recheck, "Recheck", "How often to detect an object in number of frames, divided by 1000"); + threads = 0.01; //number of CPUs + register_param(threads, "Threads", "How many threads to use divided by 100; 0 uses CPU count"); + search_scale = 0.12; // increase size of search window by 20% on each pass + register_param(search_scale, "Search scale", "The search window scale factor, divided by 10"); + neighbors = 0.02; // require 2 neighbors + register_param(neighbors, "Neighbors", "Minimum number of rectangles that makes up an object, divided by 100"); + smallest = 0.0; // smallest window size is trained default + register_param(smallest, "Smallest", "Minimum window size in pixels, divided by 1000"); + largest = 0.0500; // largest object size shown is 500 px + register_param(largest, "Largest", "Maximum object size in pixels, divided by 10000"); +} + +FaceBl0r::~FaceBl0r() { + if(tracked_obj) + destroy_tracked_object(tracked_obj); + + if(cascade) cvReleaseHaarClassifierCascade(&cascade); + if(storage) cvReleaseMemStorage(&storage); + +} + +void FaceBl0r::update() { + + if (!cascade) { + cvSetNumThreads(cvRound(threads * 100)); + get_param_value(&classifier, FACEBL0R_PARAM_CLASSIFIER); + if (classifier) { + if ( strcmp(classifier, old_classifier) == 0) { + // same as before, avoid repeating error messages + memcpy(out, in, size * 4); // of course assuming we are RGBA only + return; + } else strcpy(old_classifier, classifier); + + cascade = (CvHaarClassifierCascade*) cvLoad(classifier, 0, 0, 0 ); + if (!cascade) { + fprintf(stderr, "ERROR in filter facebl0r, classifier cascade not found:\n"); + fprintf(stderr, " %s\n", classifier); + memcpy(out, in, size * 4); + return; + } + storage = cvCreateMemStorage(0); + } + else { + memcpy(out, in, size * 4); + return; + } + } + if( !image ) + image = cvCreateImage( cvSize(width,height), IPL_DEPTH_8U, 4 ); + + memcpy(image->imageData, in, size * 4); + + /* + no face* + - look for (detect_face) + yes face + - track face + - no more face + no face* + */ + if(face_notfound>0) { + + if(face_notfound % cvRound(recheck * 1000) == 0) + face_rect = detect_face(image, cascade, storage); + + // if no face detected + if (!face_rect) { + face_notfound++; + } else { + //track detected face with camshift + if(tracked_obj) + destroy_tracked_object(tracked_obj); + tracked_obj = create_tracked_object(image, face_rect); + face_notfound = 0; + face_found++; + } + + } + + if(face_found>0) { + //track the face in the new frame + face_box = camshift_track_face(image, tracked_obj); + + int min = cvRound(smallest * 1000); + min = min? min : 10; + int max = cvRound(largest * 10000); + if( ( face_box.size.width < min ) + || (face_box.size.height < min ) + || (face_box.size.width > max ) + || (face_box.size.height > max ) + ) { + face_found = 0; + face_notfound++; + } + else { +//////////////////////////////////////////////////////////////////////// + cvSetImageROI (image, tracked_obj->prev_rect); +// cvSmooth (image, image, CV_BLUR, 22, 22, 0, 0); + cvSmooth (image, image, CV_BLUR, 23, 23, 0, 0); +// cvSmooth (image, image, CV_GAUSSIAN, 11, 11, 0, 0); + cvResetImageROI (image); +//////////////////////////////////////////////////////////////////////// + + //outline face ellipse + if (ellipse) + cvEllipseBox(image, face_box, CV_RGB(255,0,0), 2, CV_AA, 0); + + face_found++; + if(face_found % cvRound(recheck * 1000) == 0) + face_notfound = cvRound(recheck * 1000); // try recheck + } + } + + memcpy(out, image->imageData, size * 4); + cvReleaseImage(&image); +} + +/* Given an image and a classider, detect and return region. */ +CvRect* FaceBl0r::detect_face (IplImage* image, + CvHaarClassifierCascade* cascade, + CvMemStorage* storage) { + + CvRect* rect = 0; + + if (cascade && storage) { + //use an equalized gray image for better recognition + IplImage* gray = cvCreateImage(cvSize(image->width, image->height), 8, 1); + cvCvtColor(image, gray, CV_BGR2GRAY); + cvEqualizeHist(gray, gray); + cvClearMemStorage(storage); + + //get a sequence of faces in image + int min = cvRound(smallest * 1000); + CvSeq *faces = cvHaarDetectObjects(gray, cascade, storage, + search_scale * 10.0, + cvRound(neighbors * 100), + CV_HAAR_FIND_BIGGEST_OBJECT|//since we track only the first, get the biggest + CV_HAAR_DO_CANNY_PRUNING, //skip regions unlikely to contain a face + cvSize(min, min)); + + //if one or more faces are detected, return the first one + if(faces && faces->total) + rect = (CvRect*) cvGetSeqElem(faces, 0); + + cvReleaseImage(&gray); + } + + return rect; +} + +/* Create a camshift tracked object from a region in image. */ +TrackedObj* FaceBl0r::create_tracked_object (IplImage* image, CvRect* region) { + TrackedObj* obj; + + //allocate memory for tracked object struct + if((obj = (TrackedObj *) malloc(sizeof *obj)) != NULL) { + //create-image: size(w,h), bit depth, channels + obj->hsv = cvCreateImage(cvGetSize(image), 8, 3); + obj->mask = cvCreateImage(cvGetSize(image), 8, 1); + obj->hue = cvCreateImage(cvGetSize(image), 8, 1); + obj->prob = cvCreateImage(cvGetSize(image), 8, 1); + + int hist_bins = 30; //number of histogram bins + float hist_range[] = {0,180}; //histogram range + float* range = hist_range; + obj->hist = cvCreateHist(1, //number of hist dimensions + &hist_bins, //array of dimension sizes + CV_HIST_ARRAY, //representation format + &range, //array of ranges for bins + 1); //uniformity flag + } + + //create a new hue image + update_hue_image(image, obj); + + float max_val = 0.f; + + //create a histogram representation for the face + cvSetImageROI(obj->hue, *region); + cvSetImageROI(obj->mask, *region); + cvCalcHist(&obj->hue, obj->hist, 0, obj->mask); + cvGetMinMaxHistValue(obj->hist, 0, &max_val, 0, 0 ); + cvConvertScale(obj->hist->bins, obj->hist->bins, + max_val ? 255.0/max_val : 0, 0); + cvResetImageROI(obj->hue); + cvResetImageROI(obj->mask); + + //store the previous face location + obj->prev_rect = *region; + + return obj; +} + +/* Release resources from tracked object. */ +void FaceBl0r::destroy_tracked_object (TrackedObj* obj) { + cvReleaseImage(&obj->hsv); + cvReleaseImage(&obj->hue); + cvReleaseImage(&obj->mask); + cvReleaseImage(&obj->prob); + cvReleaseHist(&obj->hist); + + free(obj); +} + +/* Given an image and tracked object, return box position. */ +CvBox2D FaceBl0r::camshift_track_face (IplImage* image, TrackedObj* obj) { + CvConnectedComp components; + + //create a new hue image + update_hue_image(image, obj); + + //create a probability image based on the face histogram + cvCalcBackProject(&obj->hue, obj->prob, obj->hist); + cvAnd(obj->prob, obj->mask, obj->prob, 0); + + //use CamShift to find the center of the new face probability + cvCamShift(obj->prob, obj->prev_rect, + cvTermCriteria(CV_TERMCRIT_EPS | CV_TERMCRIT_ITER, 10, 1), + &components, &obj->curr_box); + + //update face location and angle + obj->prev_rect = components.rect; + obj->curr_box.angle = -obj->curr_box.angle; + + return obj->curr_box; +} + +void FaceBl0r::update_hue_image (const IplImage* image, TrackedObj* obj) { + //limits for calculating hue + int vmin = 65, vmax = 256, smin = 55; + + //convert to HSV color model + cvCvtColor(image, obj->hsv, CV_BGR2HSV); + + //mask out-of-range values + cvInRangeS(obj->hsv, //source + cvScalar(0, smin, MIN(vmin, vmax), 0), //lower bound + cvScalar(180, 256, MAX(vmin, vmax) ,0), //upper bound + obj->mask); //destination + + //extract the hue channel, split: src, dest channels + cvSplit(obj->hsv, obj->hue, 0, 0, 0 ); +} diff --git a/src/filter/facedetect/CMakeLists.txt b/src/filter/facedetect/CMakeLists.txt new file mode 100644 index 0000000..1df614f --- /dev/null +++ b/src/filter/facedetect/CMakeLists.txt @@ -0,0 +1,15 @@ +set (SOURCES facedetect.cpp) +set (TARGET facedetect) + +if (MSVC) + set (SOURCES ${SOURCES} ${FREI0R_DEF}) +endif (MSVC) + +include_directories (${OpenCV_INCLUDE_DIR}) +link_directories (${OpenCV_LIBRARY_DIRS}) +LINK_LIBRARIES(${OpenCV_LIBS} ${OpenCV_LIBRARIES}) + +add_library (${TARGET} MODULE ${SOURCES}) +set_target_properties (${TARGET} PROPERTIES PREFIX "") + +install (TARGETS ${TARGET} LIBRARY DESTINATION ${LIBDIR}) diff --git a/src/filter/facedetect/facedetect.cpp b/src/filter/facedetect/facedetect.cpp new file mode 100644 index 0000000..c39d318 --- /dev/null +++ b/src/filter/facedetect/facedetect.cpp @@ -0,0 +1,299 @@ +/** + * Copyright (C) 2007 binarymillenium + * Copyright (C) 2011 Dan Dennedy + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "frei0r.hpp" + +#define USE_ROI +#define PAD (40) + +#define FACEBL0R_PARAM_CLASSIFIER (0) + +class FaceDetect; +frei0r::construct plugin("opencvfacedetect", + "detect faces and draw shapes on them", + "binarymillenium, ddennedy", + 2,0, F0R_COLOR_MODEL_PACKED32); + +class FaceDetect: public frei0r::filter +{ +private: + IplImage *image; + + unsigned count; + CvSeq *objects; + CvRect roi; + CvMemStorage *storage; + CvHaarClassifierCascade *cascade; + + // plugin parameters + f0r_param_double shape; + f0r_param_double recheck; + f0r_param_double threads; + f0r_param_double search_scale; + f0r_param_double neighbors; + f0r_param_double smallest; + f0r_param_double scale; + f0r_param_double stroke; + f0r_param_bool antialias; + f0r_param_double alpha; + f0r_param_color color[5]; + +public: + FaceDetect(int width, int height) + : image(0) + , count(0) + , objects(0) + , storage(0) + , cascade(0) + { + roi.width = roi.height = 0; + register_param("/usr/share/opencv/haarcascades/haarcascade_frontalface_default.xml", + "Classifier", + "Full path to the XML pattern model for recognition; look in /usr/share/opencv/haarcascades"); + threads = 0.01; //number of CPUs + register_param(threads, "Threads", "How many threads to use divided by 100; 0 uses CPU count"); + shape = 0.0; + register_param(shape, "Shape", "The shape to draw: 0=circle, 0.1=ellipse, 0.2=rectangle, 1=random"); + recheck = 0.025; + register_param(recheck, "Recheck", "How often to detect an object in number of frames, divided by 1000"); + search_scale = 0.12; // increase size of search window by 20% on each pass + register_param(search_scale, "Search scale", "The search window scale factor, divided by 10"); + neighbors = 0.02; // require 2 neighbors + register_param(neighbors, "Neighbors", "Minimum number of rectangles that makes up an object, divided by 100"); + smallest = 0.0; // smallest window size is trained default + register_param(smallest, "Smallest", "Minimum window size in pixels, divided by 1000"); + scale = 1.0 / 1.5; + register_param(scale, "Scale", "Down scale the image prior detection"); + stroke = CV_FILLED; + register_param(stroke, "Stroke", "Line width, divided by 100, or fill if 0"); + antialias = false; + register_param(antialias, "Antialias", "Draw with antialiasing"); + alpha = 1.0; + register_param(alpha, "Alpha", "The alpha channel value for the shapes"); + f0r_param_color color0 = {1.0, 1.0, 1.0}; + color[0] = color0; + register_param(color[0], "Color 1", "The color of the first object"); + f0r_param_color color1 = {0.0, 0.5, 1.0}; + color[1] = color1; + register_param(color[0], "Color 2", "The color of the second object"); + f0r_param_color color2 = {0.0, 1.0, 1.0}; + color[2] = color2; + register_param(color[0], "Color 3", "The color of the third object"); + f0r_param_color color3 = {0.0, 1.0, 0.0}; + color[3] = color3; + register_param(color[0], "Color 4", "The color of the fourth object"); + f0r_param_color color4 = {1.0, 0.5, 0.0}; + color[4] = color4; + register_param(color[0], "Color 5", "The color of the fifth object"); + srand(::time(NULL)); + } + + ~FaceDetect() + { + if (cascade) cvReleaseHaarClassifierCascade(&cascade); + if (storage) cvReleaseMemStorage(&storage); + } + + void update() + { + if (!cascade) { + cvSetNumThreads(cvRound(threads * 100)); + f0r_param_string classifier; + get_param_value(&classifier, FACEBL0R_PARAM_CLASSIFIER); + if (classifier) { + cascade = (CvHaarClassifierCascade*) cvLoad(classifier, 0, 0, 0 ); + if (!cascade) + fprintf(stderr, "ERROR: Could not load classifier cascade %s\n", classifier); + storage = cvCreateMemStorage(0); + } + else { + memcpy(out, in, size * 4); + return; + } + } + + // copy input image to OpenCV + if( !image ) + image = cvCreateImage(cvSize(width, height), IPL_DEPTH_8U, 4); + memcpy(image->imageData, in, size * 4); + + // only re-detect periodically to control performance and reduce shape jitter + int recheckInt = abs(cvRound(recheck * 1000)); + if ( recheckInt > 0 && count % recheckInt ) + { + // skip detect + count++; +// fprintf(stderr, "draw-only counter %u\n", count); + } + else + { + count = 1; // reset the recheck counter + if (objects) // reset the list of objects + cvClearSeq(objects); + + double elapsed = (double) cvGetTickCount(); + + objects = detect(); + + // use detection time to throttle frequency of re-detect vs. redraw (automatic recheck) + elapsed = cvGetTickCount() - elapsed; + elapsed = elapsed / ((double) cvGetTickFrequency() * 1000.0); + + // Automatic recheck uses an undocumented negative parameter value, + // which is not compliant, but technically feasible. + if (recheck < 0 && cvRound( elapsed / (1000.0 / (recheckInt + 1)) ) <= recheckInt) + count += recheckInt - cvRound( elapsed / (1000.0 / (recheckInt + 1))); +// fprintf(stderr, "detection time = %gms counter %u\n", elapsed, count); + } + + draw(); + + // copy filtered OpenCV image to output + memcpy(out, image->imageData, size * 4); + cvReleaseImage(&image); + } + +private: + CvSeq* detect() + { + if (!cascade) return 0; + double scale = this->scale == 0? 1.0 : this->scale; + IplImage* gray = cvCreateImage(cvSize(width, height ), 8, 1); + IplImage* small = cvCreateImage(cvSize(cvRound(width * scale), cvRound(height * scale)), 8, 1); + int min = cvRound(smallest * 1000); + CvSeq* faces = 0; + + // use a region of interest to improve performance + // This idea comes from the More than Technical blog: + // http://www.morethantechnical.com/2009/08/09/near-realtime-face-detection-on-the-iphone-w-opencv-port-wcodevideo/ + if ( roi.width > 0 && roi.height > 0) + { + cvSetImageROI(small, roi); + CvRect scaled_roi = cvRect(roi.x / scale, roi.y / scale, + roi.width / scale, roi.height / scale); + cvSetImageROI(image, scaled_roi); + cvSetImageROI(gray, scaled_roi); + } + + // use an equalized grayscale to improve detection + cvCvtColor(image, gray, CV_BGR2GRAY); + // use a smaller image to improve performance + cvResize(gray, small, CV_INTER_LINEAR); + cvEqualizeHist(small, small); + + // detect with OpenCV + cvClearMemStorage(storage); + faces = cvHaarDetectObjects(small, cascade, storage, + search_scale * 10.0, + cvRound(neighbors * 100), + CV_HAAR_DO_CANNY_PRUNING, + cvSize(min, min)); + +#ifdef USE_ROI + if (!faces || faces->total == 0) + { + // clear the region of interest + roi.width = roi.height = 0; + } + else if (faces && faces->total > 0) + { + // determine the region of interest from the first detected object + // XXX: based on the first object only? + CvRect* r = (CvRect*) cvGetSeqElem(faces, 0); + + if (roi.width > 0 && roi.height > 0) + { + r->x += roi.x; + r->y += roi.y; + } + int startX = MAX(r->x - PAD, 0); + int startY = MAX(r->y - PAD, 0); + int w = small->width - startX - r->width - PAD * 2; + int h = small->height - startY - r->height - PAD * 2; + int sw = r->x - PAD, sh = r->y - PAD; + + // store the region of interest + roi.x = startX; + roi.y = startY, + roi.width = r->width + PAD * 2 + ((w < 0) ? w : 0) + ((sw < 0) ? sw : 0); + roi.height = r->height + PAD * 2 + ((h < 0) ? h : 0) + ((sh < 0) ? sh : 0); + } +#endif + cvReleaseImage(&gray); + cvReleaseImage(&small); + cvResetImageROI(image); + return faces; + } + + void draw() + { + double scale = this->scale == 0? 1.0 : this->scale; + CvScalar colors[5] = { + {{cvRound(color[0].r * 255), cvRound(color[0].g * 255), cvRound(color[0].b * 255), cvRound(alpha * 255)}}, + {{cvRound(color[1].r * 255), cvRound(color[1].g * 255), cvRound(color[1].b * 255), cvRound(alpha * 255)}}, + {{cvRound(color[2].r * 255), cvRound(color[2].g * 255), cvRound(color[2].b * 255), cvRound(alpha * 255)}}, + {{cvRound(color[3].r * 255), cvRound(color[3].g * 255), cvRound(color[3].b * 255), cvRound(alpha * 255)}}, + {{cvRound(color[4].r * 255), cvRound(color[4].g * 255), cvRound(color[4].b * 255), cvRound(alpha * 255)}}, + }; + + for (int i = 0; i < (objects ? objects->total : 0); i++) + { + CvRect* r = (CvRect*) cvGetSeqElem(objects, i); + CvPoint center; + int thickness = stroke <= 0? CV_FILLED : cvRound(stroke * 100); + int linetype = antialias? CV_AA : 8; + + center.x = cvRound((r->x + r->width * 0.5) / scale); + center.y = cvRound((r->y + r->height * 0.5) / scale); + + switch (shape == 1.0? (rand() % 3) : cvRound(shape * 10)) + { + default: + case 0: + { + int radius = cvRound((r->width + r->height) * 0.25 / scale); + cvCircle(image, center, radius, colors[i % 5], thickness, linetype); + break; + } + case 1: + { + CvBox2D box = {{center.x, center.y}, {r->width / scale, (r->height / scale) * 1.2}, 90}; + cvEllipseBox(image, box, colors[i % 5], thickness, linetype); + break; + } + case 2: + { + CvPoint pt1 = {r->x / scale, r->y / scale}; + CvPoint pt2 = {(r->x + r->width) / scale, (r->y + r->height) / scale}; + cvRectangle(image, pt1, pt2, colors[i % 5], thickness, linetype); + break; + } + } + } + } +}; diff --git a/src/filter/flippo/CMakeLists.txt b/src/filter/flippo/CMakeLists.txt new file mode 100644 index 0000000..e169ffa --- /dev/null +++ b/src/filter/flippo/CMakeLists.txt @@ -0,0 +1,12 @@ +set (SOURCES flippo.c) +set (TARGET flippo) + +if (MSVC) + set_source_files_properties (flippo.c PROPERTIES LANGUAGE CXX) + set (SOURCES ${SOURCES} ${FREI0R_DEF}) +endif (MSVC) + +add_library (${TARGET} MODULE ${SOURCES}) +set_target_properties (${TARGET} PROPERTIES PREFIX "") + +install (TARGETS ${TARGET} LIBRARY DESTINATION ${LIBDIR}) diff --git a/src/filter/flippo/flippo.c b/src/filter/flippo/flippo.c index dce23bc..0af69e9 100644 --- a/src/filter/flippo/flippo.c +++ b/src/filter/flippo/flippo.c @@ -60,7 +60,7 @@ f0r_instance_t f0r_construct(unsigned int width,unsigned int height) { - flippo_instance_t *inst=calloc(1, sizeof(*inst)); + flippo_instance_t *inst=(flippo_instance_t*)calloc(1, sizeof(*inst)); inst->width=width; inst->height=height; diff --git a/src/filter/gamma/CMakeLists.txt b/src/filter/gamma/CMakeLists.txt new file mode 100644 index 0000000..8912fe7 --- /dev/null +++ b/src/filter/gamma/CMakeLists.txt @@ -0,0 +1,12 @@ +set (SOURCES gamma.c) +set (TARGET gamma) + +if (MSVC) + set_source_files_properties (gamma.c PROPERTIES LANGUAGE CXX) + set (SOURCES ${SOURCES} ${FREI0R_DEF}) +endif (MSVC) + +add_library (${TARGET} MODULE ${SOURCES}) +set_target_properties (${TARGET} PROPERTIES PREFIX "") + +install (TARGETS ${TARGET} LIBRARY DESTINATION ${LIBDIR}) diff --git a/src/filter/gamma/gamma.c b/src/filter/gamma/gamma.c index 3b56dd9..7c737fe 100644 --- a/src/filter/gamma/gamma.c +++ b/src/filter/gamma/gamma.c @@ -81,7 +81,7 @@ f0r_instance_t f0r_construct(unsigned int width, unsigned int height) { - gamma_instance_t* inst = calloc(1, sizeof(*inst)); + gamma_instance_t* inst = (gamma_instance_t*)calloc(1, sizeof(*inst)); inst->width = width; inst->height = height; /* init look-up-table */ inst->gamma = 1.0; diff --git a/src/filter/glow/CMakeLists.txt b/src/filter/glow/CMakeLists.txt new file mode 100644 index 0000000..088c7dd --- /dev/null +++ b/src/filter/glow/CMakeLists.txt @@ -0,0 +1,12 @@ +set (SOURCES glow.c blur.h) +set (TARGET glow) + +if (MSVC) + set_source_files_properties (glow.c PROPERTIES LANGUAGE CXX) + set (SOURCES ${SOURCES} ${FREI0R_DEF}) +endif (MSVC) + +add_library (${TARGET} MODULE ${SOURCES}) +set_target_properties (${TARGET} PROPERTIES PREFIX "") + +install (TARGETS ${TARGET} LIBRARY DESTINATION ${LIBDIR}) diff --git a/src/filter/glow/glow.c b/src/filter/glow/glow.c index 3ca098f..b0572f1 100644 --- a/src/filter/glow/glow.c +++ b/src/filter/glow/glow.c @@ -62,11 +62,11 @@ f0r_instance_t f0r_construct(unsigned int width, unsigned int height) { - glow_instance_t* inst = calloc(1, sizeof(*inst)); + glow_instance_t* inst = (glow_instance_t*)calloc(1, sizeof(*inst)); inst->w = width; inst->h = height; inst->blurred = (uint32_t*)malloc( width * height * sizeof(uint32_t) ); - inst->blur_instance = blur_construct( width, height ); + inst->blur_instance = (f0r_instance_t *)blur_construct( width, height ); blur_set_param_value(inst->blur_instance, &inst->blur, 0 ); return (f0r_instance_t)inst; } diff --git a/src/filter/host_param_test/CMakeLists.txt b/src/filter/host_param_test/CMakeLists.txt new file mode 100644 index 0000000..5e77cc0 --- /dev/null +++ b/src/filter/host_param_test/CMakeLists.txt @@ -0,0 +1,12 @@ +set (SOURCES host_param_test.c) +set (TARGET host_param_test) + +if (MSVC) + set_source_files_properties (host_param_test.c PROPERTIES LANGUAGE CXX) + set (SOURCES ${SOURCES} ${FREI0R_DEF}) +endif (MSVC) + +add_library (${TARGET} MODULE ${SOURCES}) +set_target_properties (${TARGET} PROPERTIES PREFIX "") + +install (TARGETS ${TARGET} LIBRARY DESTINATION ${LIBDIR}) diff --git a/src/filter/host_param_test/host_param_test.c b/src/filter/host_param_test/host_param_test.c index 46bbda2..9c178e4 100644 --- a/src/filter/host_param_test/host_param_test.c +++ b/src/filter/host_param_test/host_param_test.c @@ -22,9 +22,9 @@ #include #include -typedef int bool; -static const int false = 0; -static const int true = 1; +typedef int boolean; +#define FALSE 0 +#define TRUE 1 typedef struct host_param_test_instance { double dvalue; @@ -88,19 +88,19 @@ f0r_instance_t f0r_construct(unsigned int width, unsigned int height) { - host_param_test_instance_t* inst = calloc(1, sizeof(*inst)); + host_param_test_instance_t* inst = (host_param_test_instance_t*)calloc(1, sizeof(*inst)); inst->w = width; inst->h = height; inst->dvalue = 0.5; - inst->bvalue = false; + 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 ); + inst->svalue = (char*)malloc( strlen(sval) + 1 ); strcpy( inst->svalue, sval ); return (f0r_instance_t)inst; } @@ -130,7 +130,7 @@ case 4: { char* sval = ((char*)param); - inst->svalue = realloc( inst->svalue, strlen(sval) + 1 ); + inst->svalue = (char*)realloc( inst->svalue, strlen(sval) + 1 ); strcpy( inst->svalue, sval ); break; } diff --git a/src/filter/hueshift0r/CMakeLists.txt b/src/filter/hueshift0r/CMakeLists.txt new file mode 100644 index 0000000..bf11ed7 --- /dev/null +++ b/src/filter/hueshift0r/CMakeLists.txt @@ -0,0 +1,12 @@ +set (SOURCES hueshift0r.c matrix.h) +set (TARGET hueshift0r) + +if (MSVC) + set_source_files_properties (hueshift0r.c PROPERTIES LANGUAGE CXX) + set (SOURCES ${SOURCES} ${FREI0R_DEF}) +endif (MSVC) + +add_library (${TARGET} MODULE ${SOURCES}) +set_target_properties (${TARGET} PROPERTIES PREFIX "") + +install (TARGETS ${TARGET} LIBRARY DESTINATION ${LIBDIR}) diff --git a/src/filter/hueshift0r/hueshift0r.c b/src/filter/hueshift0r/hueshift0r.c index add2b1a..fed3944 100644 --- a/src/filter/hueshift0r/hueshift0r.c +++ b/src/filter/hueshift0r/hueshift0r.c @@ -18,6 +18,9 @@ */ #include +#if defined(_MSC_VER) +#define _USE_MATH_DEFINES +#endif /* _MSC_VER */ #include #include #include @@ -36,7 +39,7 @@ /* Updates the shift matrix. */ void update_mat(hueshift0r_instance_t *inst) { - identmat(inst->mat); + identmat((float*)inst->mat); huerotatemat(inst->mat, (float)inst->hueshift); } @@ -53,7 +56,7 @@ info->name = "Hueshift0r"; info->author = "Jean-Sebastien Senecal"; info->plugin_type = F0R_PLUGIN_TYPE_FILTER; - info->color_model = F0R_COLOR_MODEL_BGRA8888; + info->color_model = F0R_COLOR_MODEL_RGBA8888; info->frei0r_version = FREI0R_MAJOR_VERSION; info->major_version = 0; info->minor_version = 2; @@ -75,7 +78,7 @@ f0r_instance_t f0r_construct(unsigned int width, unsigned int height) { - hueshift0r_instance_t* inst = calloc(1, sizeof(*inst)); + hueshift0r_instance_t* inst = (hueshift0r_instance_t*)calloc(1, sizeof(*inst)); inst->width = width; inst->height = height; /* init transformation matrix */ inst->hueshift = 0; diff --git a/src/filter/hueshift0r/matrix.h b/src/filter/hueshift0r/matrix.h index 062bb5d..892d0f9 100644 --- a/src/filter/hueshift0r/matrix.h +++ b/src/filter/hueshift0r/matrix.h @@ -31,8 +31,7 @@ * print a 4 by 4 matrix */ void -printmat(mat) - float mat[4][4]; +printmat(float mat[4][4]) { int x, y; @@ -50,10 +49,7 @@ * use a matrix to transform colors. */ void -applymatrix(lptr,mat,n) - unsigned long *lptr; -float mat[4][4]; -int n; +applymatrix(unsigned long *lptr,float mat[4][4],int n) { int ir, ig, ib, r, g, b; unsigned char *cptr; @@ -78,8 +74,7 @@ * multiply two matricies */ void -matrixmult(a,b,c) - float a[4][4], b[4][4], c[4][4]; +matrixmult(float a[4][4],float b[4][4],float c[4][4]) { int x, y; float temp[4][4]; @@ -101,8 +96,7 @@ * make an identity matrix */ void -identmat(matrix) - float *matrix; +identmat(float *matrix) { *matrix++ = 1.0; /* row 1 */ *matrix++ = 0.0; @@ -127,10 +121,7 @@ * 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; +xformpnt(float matrix[4][4],float x,float y,float z,float *tx,float *ty,float *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]; @@ -142,9 +133,7 @@ * make a color scale marix */ void -cscalemat(mat,rscale,gscale,bscale) - float mat[4][4]; -float rscale, gscale, bscale; +cscalemat(float mat[4][4],float rscale,float gscale,float bscale) { float mmat[4][4]; @@ -176,8 +165,7 @@ * make a luminance marix */ void -lummat(mat) - float mat[4][4]; +lummat(float mat[4][4]) { float mmat[4][4]; float rwgt, gwgt, bwgt; @@ -212,9 +200,7 @@ * make a saturation marix */ void -saturatemat(mat,sat) - float mat[4][4]; -float sat; +saturatemat(float mat[4][4],float sat) { float mmat[4][4]; float a, b, c, d, e, f, g, h, i; @@ -260,9 +246,7 @@ * offset r, g, and b */ void -offsetmat(mat,roffset,goffset,boffset) - float mat[4][4]; -float roffset, goffset, boffset; +offsetmat(float mat[4][4],float roffset,float goffset,float boffset) { float mmat[4][4]; @@ -293,9 +277,7 @@ * rotate about the x (red) axis */ void -xrotatemat(mat,rs,rc) - float mat[4][4]; -float rs, rc; +xrotatemat(float mat[4][4],float rs,float rc) { float mmat[4][4]; @@ -326,9 +308,7 @@ * rotate about the y (green) axis */ void -yrotatemat(mat,rs,rc) - float mat[4][4]; -float rs, rc; +yrotatemat(float mat[4][4],float rs,float rc) { float mmat[4][4]; @@ -359,9 +339,7 @@ * rotate about the z (blue) axis */ void -zrotatemat(mat,rs,rc) - float mat[4][4]; -float rs, rc; +zrotatemat(float mat[4][4],float rs,float rc) { float mmat[4][4]; @@ -392,9 +370,7 @@ * shear z using x and y. */ void -zshearmat(mat,dx,dy) - float mat[4][4]; -float dx, dy; +zshearmat(float mat[4][4],float dx,float dy) { float mmat[4][4]; @@ -425,9 +401,7 @@ * simple hue rotation. This changes luminance */ void -simplehuerotatemat(mat,rot) - float mat[4][4]; -float rot; +simplehuerotatemat(float mat[4][4],float rot) { float mag; float xrs, xrc; @@ -460,9 +434,7 @@ * rotate the hue, while maintaining luminance. */ void -huerotatemat(mat,rot) - float mat[4][4]; -float rot; +huerotatemat(float mat[4][4],float rot) { float mmat[4][4]; float mag; @@ -472,7 +444,7 @@ float zrs, zrc; float zsx, zsy; - identmat(mmat); + identmat((float*)mmat); /* rotate the grey vector into positive Z */ mag = sqrt(2.0); diff --git a/src/filter/invert0r/CMakeLists.txt b/src/filter/invert0r/CMakeLists.txt new file mode 100644 index 0000000..e20e559 --- /dev/null +++ b/src/filter/invert0r/CMakeLists.txt @@ -0,0 +1,12 @@ +set (SOURCES invert0r.c) +set (TARGET invert0r) + +if (MSVC) + set_source_files_properties (invert0r.c PROPERTIES LANGUAGE CXX) + set (SOURCES ${SOURCES} ${FREI0R_DEF}) +endif (MSVC) + +add_library (${TARGET} MODULE ${SOURCES}) +set_target_properties (${TARGET} PROPERTIES PREFIX "") + +install (TARGETS ${TARGET} LIBRARY DESTINATION ${LIBDIR}) diff --git a/src/filter/invert0r/invert0r.c b/src/filter/invert0r/invert0r.c index 2fa1be7..4ea4b9c 100644 --- a/src/filter/invert0r/invert0r.c +++ b/src/filter/invert0r/invert0r.c @@ -37,7 +37,7 @@ f0r_instance_t f0r_construct(unsigned int width, unsigned int height) { - inverter_instance_t* inst = calloc(1, sizeof(*inst)); + inverter_instance_t* inst = (inverter_instance_t*)calloc(1, sizeof(*inst)); inst->width = width; inst->height = height; return (f0r_instance_t)inst; } diff --git a/src/filter/lenscorrection/CMakeLists.txt b/src/filter/lenscorrection/CMakeLists.txt new file mode 100644 index 0000000..3ca9175 --- /dev/null +++ b/src/filter/lenscorrection/CMakeLists.txt @@ -0,0 +1,12 @@ +set (SOURCES lenscorrection.c) +set (TARGET lenscorrection) + +if (MSVC) + set_source_files_properties (lenscorrection.c PROPERTIES LANGUAGE CXX) + set (SOURCES ${SOURCES} ${FREI0R_DEF}) +endif (MSVC) + +add_library (${TARGET} MODULE ${SOURCES}) +set_target_properties (${TARGET} PROPERTIES PREFIX "") + +install (TARGETS ${TARGET} LIBRARY DESTINATION ${LIBDIR}) diff --git a/src/filter/lenscorrection/lenscorrection.c b/src/filter/lenscorrection/lenscorrection.c index b6d8709..3db5541 100644 --- a/src/filter/lenscorrection/lenscorrection.c +++ b/src/filter/lenscorrection/lenscorrection.c @@ -91,7 +91,7 @@ f0r_instance_t f0r_construct(unsigned int width, unsigned int height) { - lenscorrection_instance_t* inst = calloc(1, sizeof(*inst)); + lenscorrection_instance_t* inst = (lenscorrection_instance_t*)calloc(1, sizeof(*inst)); inst->width = width; inst->height = height; inst->xcenter = 0.5; diff --git a/src/filter/letterb0xed/CMakeLists.txt b/src/filter/letterb0xed/CMakeLists.txt new file mode 100644 index 0000000..68df4cf --- /dev/null +++ b/src/filter/letterb0xed/CMakeLists.txt @@ -0,0 +1,12 @@ +set (SOURCES letterb0xed.c) +set (TARGET letterb0xed) + +if (MSVC) + set_source_files_properties (letterb0xed.c PROPERTIES LANGUAGE CXX) + set (SOURCES ${SOURCES} ${FREI0R_DEF}) +endif (MSVC) + +add_library (${TARGET} MODULE ${SOURCES}) +set_target_properties (${TARGET} PROPERTIES PREFIX "") + +install (TARGETS ${TARGET} LIBRARY DESTINATION ${LIBDIR}) diff --git a/src/filter/letterb0xed/letterb0xed.c b/src/filter/letterb0xed/letterb0xed.c index 927b247..a682d3b 100644 --- a/src/filter/letterb0xed/letterb0xed.c +++ b/src/filter/letterb0xed/letterb0xed.c @@ -69,7 +69,7 @@ f0r_instance_t f0r_construct(unsigned int width, unsigned int height) { - letterb0xed_instance_t* inst = calloc(1, sizeof(*inst)); + letterb0xed_instance_t* inst = (letterb0xed_instance_t*)calloc(1, sizeof(*inst)); inst->w = width; inst->h = height; inst->len = width * height; diff --git a/src/filter/levels/CMakeLists.txt b/src/filter/levels/CMakeLists.txt new file mode 100644 index 0000000..ef66de8 --- /dev/null +++ b/src/filter/levels/CMakeLists.txt @@ -0,0 +1,17 @@ +# Set C99 flag for gcc +if (CMAKE_COMPILER_IS_GNUCC) + set(CMAKE_C_FLAGS "-std=c99") +endif (CMAKE_COMPILER_IS_GNUCC) + +set (SOURCES levels.c) +set (TARGET levels) + +if (MSVC) + set_source_files_properties (levels.c PROPERTIES LANGUAGE CXX) + set (SOURCES ${SOURCES} ${FREI0R_DEF}) +endif (MSVC) + +add_library (${TARGET} MODULE ${SOURCES}) +set_target_properties (${TARGET} PROPERTIES PREFIX "") + +install (TARGETS ${TARGET} LIBRARY DESTINATION ${LIBDIR}) diff --git a/src/filter/levels/levels.c b/src/filter/levels/levels.c index 67d363d..5bfc83e 100644 --- a/src/filter/levels/levels.c +++ b/src/filter/levels/levels.c @@ -118,7 +118,7 @@ f0r_instance_t f0r_construct(unsigned int width, unsigned int height) { - levels_instance_t* inst = calloc(1, sizeof(*inst)); + levels_instance_t* inst = (levels_instance_t*)calloc(1, sizeof(*inst)); inst->width = width; inst->height = height; inst->inputMin = 0; inst->inputMax = 1; diff --git a/src/filter/lightgraffiti/CMakeLists.txt b/src/filter/lightgraffiti/CMakeLists.txt new file mode 100644 index 0000000..d106623 --- /dev/null +++ b/src/filter/lightgraffiti/CMakeLists.txt @@ -0,0 +1,13 @@ +set (SOURCES lightgraffiti.cpp) +set (TARGET lightgraffiti) + +if (MSVC) + set (SOURCES ${SOURCES} ${FREI0R_DEF}) +endif (MSVC) + +add_library (${TARGET} MODULE ${SOURCES}) + +# No «lib» prefix (name.so instead of libname.so) +set_target_properties (${TARGET} PROPERTIES PREFIX "") + +install (TARGETS ${TARGET} LIBRARY DESTINATION ${LIBDIR}) diff --git a/src/filter/lightgraffiti/lightgraffiti.cpp b/src/filter/lightgraffiti/lightgraffiti.cpp new file mode 100644 index 0000000..2bebad7 --- /dev/null +++ b/src/filter/lightgraffiti/lightgraffiti.cpp @@ -0,0 +1,1047 @@ +/* + * Copyright (C) 2010-2011 Simon Andreas Eugster (simon.eu@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. + */ + +/** + LIGHT GRAFFITI / LIGHT PAINTING / LUMASOL + + + This effect is intended to simulate what happens when you use a shutter speed of + e.g. 10 seconds for your camera and paint with light, like lamps, in the air + -- just with video. It tries to remember bright spots and keeps them in a mask. + Areas that are not very bright (i.e. background) will not sum up. + + Originally I saw this effect in some Ford Kuga commercials on YouTube when a friend + shew me those. One of them was [1]. No information about how this effect works is given + -- only that a guy from the Dutch PIPS:LAB[2] was involved. The technique seems to be + slightly different though; whileas this frei0r effect works in post, the original Lumasol + effect is said to work directly in-camera. + + Since the technique is fascinating I started writing this Open-Source effect.[3] The general + concept is: + 1. Extract the light by using thresholding (absolute brightness and brightness change relative to + the background image fetched from the first frame) + 2. Store the color in a light mask, and the estimated density in an alpha map (increased every time + that a light source hits a pixel to simulate overexposure) + 3. Paint the light mask over the video image + 4. Dim the alpha map, and update the background image (moving average), if desired. + 5. Repeat for the next frame. + + The second approach (LG_ADV) is based on the observation that colour mixing does not work well + with the above one that stores colour values and changes the brightness via an alpha map. Therefore + the new approach directly sums up colour values detected in the light source and does not use an + alpha map. + * Transitions are not very smooth out-of-the-box. This is solved by multiplying the light source's + RGB value by (r+g+b)/3 (after normalizing them to [0,1]); Darker lights will then be even darker + and the transition to the background looks smoother. + * Lights may look a little faint regarding color. Therefore the saturation can be increased by a custom + factor. Saturation depends on the brightness of the light map; the darker the light is, the more + the saturation is increased. This will, within a sensible range, make the lights look more vital. + Dimming works by scaling each color values individually. + + If you write your own Light Graffiti effect (e.g. for After Effects) I'd very much appreciate + to hear about it! + + -- Simon (Granjow) + + [1] http://www.youtube.com/watch?v=WVaxuIKPKvU + [2] http://www.pipslab.org/bio/keez-duyves/ + [3] http://kdenlive.org/users/granjow/writing-light-graffiti-effect + + */ +#include "frei0r.hpp" + +#include +#include +#include +#include + +#define LG_ADV +//#define LG_NO_OVERLAY // Not really working yet +//#define LG_DEBUG + +// Macros to extract color components +#define GETA(abgr) (((abgr) >> (3*CHAR_BIT)) & 0xFF) +#define GETB(abgr) (((abgr) >> (2*CHAR_BIT)) & 0xFF) +#define GETG(abgr) (((abgr) >> (1*CHAR_BIT)) & 0xFF) +#define GETR(abgr) (((abgr) >> (0*CHAR_BIT)) & 0xFF) + +// Macro to assemble a color in RGBA8888 format +#define RGBA(r,g,b,a) ( ((r) << (0*CHAR_BIT)) | ((g) << (1*CHAR_BIT)) | ((b) << (2*CHAR_BIT)) | ((a) << (3*CHAR_BIT)) ) +// Component-wise maximum +#define MAX(a,b) ( (((((a) >> (0*CHAR_BIT)) & 0xFF) > (((b) >> (0*CHAR_BIT)) & 0xFF)) ? ((a) & (0xFF << (0*CHAR_BIT))) : ((b) & (0xFF << (0*CHAR_BIT)))) \ + | (((((a) >> (1*CHAR_BIT)) & 0xFF) > (((b) >> (1*CHAR_BIT)) & 0xFF)) ? ((a) & (0xFF << (1*CHAR_BIT))) : ((b) & (0xFF << (1*CHAR_BIT)))) \ + | (((((a) >> (2*CHAR_BIT)) & 0xFF) > (((b) >> (2*CHAR_BIT)) & 0xFF)) ? ((a) & (0xFF << (2*CHAR_BIT))) : ((b) & (0xFF << (2*CHAR_BIT)))) \ + | (((((a) >> (3*CHAR_BIT)) & 0xFF) > (((b) >> (3*CHAR_BIT)) & 0xFF)) ? ((a) & (0xFF << (3*CHAR_BIT))) : ((b) & (0xFF << (3*CHAR_BIT)))) ) + +#define CLAMP(a) (((a) < 0) ? 0 : (((a) > 255) ? 255 : (a))) + +#define ALPHA(mask,img) \ + ( ( ((uint32_t) ( ((((mask) >> (0*CHAR_BIT)) & 0xFF)/255.0) * ( ((mask) >> (0*CHAR_BIT)) & 0xFF) \ + + (1 - (( ((mask) >> (0*CHAR_BIT)) & 0xFF)/255.0)) * ( ((img) >> (0*CHAR_BIT)) & 0xFF) )) << (0*CHAR_BIT)) \ + | ( ((uint32_t) ( ((((mask) >> (1*CHAR_BIT)) & 0xFF)/255.0) * ( ((mask) >> (1*CHAR_BIT)) & 0xFF) \ + + (1 - (( ((mask) >> (1*CHAR_BIT)) & 0xFF)/255.0)) * ( ((img) >> (1*CHAR_BIT)) & 0xFF) )) << (1*CHAR_BIT)) \ + | ( ((uint32_t) ( ((((mask) >> (2*CHAR_BIT)) & 0xFF)/255.0) * ( ((mask) >> (2*CHAR_BIT)) & 0xFF) \ + + (1 - (( ((mask) >> (2*CHAR_BIT)) & 0xFF)/255.0)) * ( ((img) >> (2*CHAR_BIT)) & 0xFF) )) << (2*CHAR_BIT)) \ + | ( ((uint32_t) ( ((((mask) >> (3*CHAR_BIT)) & 0xFF)/255.0) * ( ((mask) >> (3*CHAR_BIT)) & 0xFF) \ + + (1 - (( ((mask) >> (3*CHAR_BIT)) & 0xFF)/255.0)) * ( ((img) >> (3*CHAR_BIT)) & 0xFF) )) << (3*CHAR_BIT)) ) + +// Screen layer mode +#define SCREEN1(mask,img) ((uint8_t) (255-(255.0-(mask))*(255.0-(img))/255.0)) + +// Luma calculation. Refer to the SOP/Sat filter. +#define REC709Y(r,g,b) (.2126*(r) + .7152*(g) + .0722*(b)) + + struct RGBFloat { + float r; + float g; + float b; + }; + +class LightGraffiti : public frei0r::filter +{ + +public: + + LightGraffiti(unsigned int width, unsigned int height) : + m_lightMask(width*height, 0), + m_alphaMap(4*width*height, 0), + m_meanInitialized(false) + + { + m_mode = Graffiti_LongAvgAlphaCumC; + m_dimMode = Dim_Mult; + +#ifdef LG_ADV + RGBFloat rgb0; + rgb0.r = 0; + rgb0.g = 0; + rgb0.b = 0; + m_rgbLightMask = std::vector(width*height, rgb0); + +#ifdef LG_DEBUG + for (int i = 0; i < width*height; i++) { + if (m_rgbLightMask[i].r != 0 || m_rgbLightMask[i].g != 0 || m_rgbLightMask[i].b != 0) { + std::cout << "ERROR: " << m_rgbLightMask[i].r; + } + } +#endif +#endif + +#ifdef LG_NO_OVERLAY + m_prevMask = std::vector(width*height, rgb0); +#endif + + register_param(m_pSensitivity, "sensitivity", "Sensitivity of the effect for light (higher sensitivity will lead to brighter lights)"); // [0,5] + register_param(m_pBackgroundWeight, "backgroundWeight", "Describes how strong the (accumulated) background should shine through"); // [0,1] + register_param(m_pThresholdBrightness, "thresholdBrightness", "Brightness threshold to distinguish between foreground and background"); // {0...765} + register_param(m_pThresholdDifference, "thresholdDifference", "Threshold: Difference to background to distinguish between fore- and background"); // {0...255} + register_param(m_pThresholdDiffSum, "thresholdDiffSum", "Threshold for sum of differences. Can in most cases be ignored (set to 0)."); // {0...765} + register_param(m_pDim, "dim", "Dimming of the light mask"); // [0,1] + register_param(m_pSaturation, "saturation", "Saturation of lights"); // [0,4] (higher values hardly meaningful) + register_param(m_pLowerOverexposure, "lowerOverexposure", "Prevents some overexposure if the light source stays steady too long (varying speed)"); // {0...5} + register_param(m_pStatsBrightness, "statsBrightness", "Display the brightness and threshold, for adjusting the brightness threshold parameter"); + register_param(m_pStatsDiff, "statsDifference", "Display the background difference and threshold"); + register_param(m_pStatsDiffSum, "statsDiffSum", "Display the sum of the background difference and the threshold"); + register_param(m_pReset, "reset", "Reset filter masks"); + register_param(m_pTransparentBackground, "transparentBackground", "Make the background transparent"); + register_param(m_pBlackReference, "blackReference", "Uses black as background image instead of the first frame."); + register_param(m_pLongAlpha, "longAlpha", "Alpha value for moving average"); + register_param(m_pNonlinearDim, "nonlinearDim", "Nonlinear dimming (may look more natural)"); + m_pLongAlpha = 1/128.0; + m_pSensitivity = 1; + m_pBackgroundWeight = 0; + m_pThresholdBrightness = 450; + m_pThresholdDiffSum = 0; + m_pDim = 0; + m_pSaturation = 1; + m_pBlackReference = false; + + } + + ~LightGraffiti() + { + // I was told that a std::vector does not need to be deleted -- + // therefore nothing to do here! + } + + enum GraffitiMode { Graffiti_max, Graffiti_max_sum, Graffiti_Y, Graffiti_Avg, Graffiti_Avg2, + Graffiti_Avg_Stat, Graffiti_AvgTresh_Stat, Graffiti_Max_Stat, Graffiti_Y_Stat, Graffiti_S_Stat, + Graffiti_STresh_Stat, Graffiti_SDiff_Stat, Graffiti_SDiffTresh_Stat, + Graffiti_SSqrt_Stat, + Graffiti_LongAvg, Graffiti_LongAvg_Stat, Graffiti_LongAvgAlpha, Graffiti_LongAvgAlpha_Stat, + Graffiti_LongAvgAlphaCumC }; + enum DimMode { Dim_Mult, Dim_Sin }; + + + + + + virtual void update() + { + // Copy everything to the output image. + // Most of the image will very likely not change at all. + std::copy(in, in + width*height, out); + +#ifdef LG_ADV + RGBFloat rgb0; + rgb0.r = 0; + rgb0.g = 0; + rgb0.b = 0; +#endif + + if (m_pNonlinearDim) { + m_dimMode = Dim_Sin; + } else { + m_dimMode = Dim_Mult; + } + + + /* + Refresh the background image + */ + if (!m_meanInitialized || m_pReset) { + if (m_pBlackReference) { + // Do not use the first frame from the movie as background image but plain black + // to calculate the added light. Useful e.g. when dealing with still images. + m_longMeanImage = std::vector(width*height*3, 0); + } else { + m_longMeanImage = std::vector(width*height*3); + for (int pixel = 0; pixel < width*height; pixel++) { + m_longMeanImage[3*pixel+0] = GETR(in[pixel]); + m_longMeanImage[3*pixel+1] = GETG(in[pixel]); + m_longMeanImage[3*pixel+2] = GETB(in[pixel]); + } + } + m_meanInitialized = true; + } else { + // Calculate the mean image to estimate the background. If alpha is set > 0, bright light sources + // moving into the image and standing still will eventually be treated as background. + if (m_pLongAlpha > 0) { + for (int pixel = 0; pixel < width*height; pixel++) { + m_longMeanImage[3*pixel+0] = (1-m_pLongAlpha) * m_longMeanImage[3*pixel+0] + m_pLongAlpha * GETR(in[pixel]); + m_longMeanImage[3*pixel+1] = (1-m_pLongAlpha) * m_longMeanImage[3*pixel+1] + m_pLongAlpha * GETG(in[pixel]); + m_longMeanImage[3*pixel+2] = (1-m_pLongAlpha) * m_longMeanImage[3*pixel+2] + m_pLongAlpha * GETB(in[pixel]); + } + } + } + + + /* + Light mask dimming + */ + if (m_pDim > 0) { + // Dims the light mask. Lights will leave fainting trails. + + float factor = 1-m_pDim; + + /* Gnu Octave: + range=linspace(0,1,100); + % Sin + plot(range,sin(range*pi/2).^.5) + plot(range,sin(range*pi/2).^.25) + */ + + switch (m_dimMode) { + + case Dim_Mult: +#ifdef LG_ADV + for (int i = 0; i < m_rgbLightMask.size(); i++) { + m_rgbLightMask[i].r *= factor; + m_rgbLightMask[i].g *= factor; + m_rgbLightMask[i].b *= factor; + } +#else + for (int i = 0; i < width*height; i++) { + m_alphaMap[4*i + 0] *= factor; + m_alphaMap[4*i + 1] *= factor; + m_alphaMap[4*i + 2] *= factor; + m_alphaMap[4*i + 3] *= factor; + } +#endif + break; + + + case Dim_Sin: +#ifdef LG_ADV + for (int i = 0; i < m_rgbLightMask.size(); i++) { + // Red + if (m_rgbLightMask[i].r < 1) { + m_rgbLightMask[i].r *= pow(sin(m_rgbLightMask[i].r * M_PI/2), m_pDim) - .01; + } else { + m_rgbLightMask[i].r *= factor; + } + if (m_rgbLightMask[i].r < 0) { m_rgbLightMask[i].r = 0; } + + // Green + if (m_rgbLightMask[i].g < 1) { + m_rgbLightMask[i].g *= pow(sin(m_rgbLightMask[i].g * M_PI/2), m_pDim) - .01; + } else { + m_rgbLightMask[i].g *= factor; + } + if (m_rgbLightMask[i].g < 0) { m_rgbLightMask[i].g = 0; } + + // Blue + if (m_rgbLightMask[i].b < 1) { + m_rgbLightMask[i].b *= pow(sin(m_rgbLightMask[i].b * M_PI/2), m_pDim) - .01; + } else { + m_rgbLightMask[i].b *= factor; + } + if (m_rgbLightMask[i].b < 0) { m_rgbLightMask[i].b = 0; } + } +#else + // Attention: Since Graffiti_LongAvgAlphaCumC only makes use of the first alpha channel + // the other channels are not calculated here due to efficiency reasons. + // May have to be adjusted if required. + for (int i = 0; i < width*height; i++) { + if (m_alphaMap[4*i + 0] < 1) { + m_alphaMap[4*i + 0] *= pow(sin(m_alphaMap[4*i + 0] * M_PI/2), m_pDim) - .01; + } else { + m_alphaMap[4*i + 0] *= factor; + } + if (m_alphaMap[4*i + 0] < 0) { m_alphaMap[4*i + 0] = 0; } + } +#endif + break; + } + + } + + + + /* + Reset all masks if desired + (mainly for parameter adjustments when working in the NLE) + */ + if (m_pReset) { +#ifdef LG_ADV + m_rgbLightMask = std::vector(width*height, rgb0); +#else + std::fill(&m_lightMask[0], &m_lightMask[width*height - 1], 0); + std::fill(&m_alphaMap[0], &m_alphaMap[width*height*4 - 1], 0); +#endif + // m_longMeanImage has been handled above already (set to the current image). + } + + + int r, g, b; + int maxDiff, temp, sum; + int min; + int max; + float f, y; + uint32_t color; + float fr, fg, fb, sr, sg, sb, fy, fsat; + +#ifdef LG_DEBUG + int deCount = 0; +#endif + + + switch (m_mode) { + /* + Lots of testing modes here! + */ + case Graffiti_max: + for (int pixel = 0; pixel < width*height; pixel++) { + + if ( + (GETR(out[pixel]) == 0xFF + || GETG(out[pixel]) == 0xFF + || GETB(out[pixel]) == 0xFF) + ){ + m_lightMask[pixel] |= out[pixel]; + } + if (m_lightMask[pixel] != 0) { + out[pixel] = m_lightMask[pixel]; + } + } + break; + case Graffiti_max_sum: + for (int pixel = 0; pixel < width*height; pixel++) { + + if ( + (GETR(out[pixel]) == 0xFF + || GETG(out[pixel]) == 0xFF + || GETB(out[pixel]) == 0xFF) + && + (GETR(out[pixel]) + + GETG(out[pixel]) + + GETB(out[pixel]) + > 0xFF + 0xCC + 0xCC) + ){ + m_lightMask[pixel] |= out[pixel]; + } + if (m_lightMask[pixel] != 0) { + out[pixel] = m_lightMask[pixel]; + } + } + break; + + case Graffiti_Y: + for (int pixel = 0; pixel < width*height; pixel++) { + if ( + .299*GETR(out[pixel])/255.0 + + .587 * GETG(out[pixel])/255.0 + + .114 * GETB(out[pixel])/255.0 + >= .85 + ){ + m_lightMask[pixel] |= out[pixel]; + } + if (m_lightMask[pixel] != 0) { + out[pixel] = m_lightMask[pixel]; + } + } + break; + + case Graffiti_Max_Stat: + for (int pixel = 0; pixel < width*height; pixel++) { + if (GETR(out[pixel]) == 0xFF || GETG(out[pixel]) == 0xFF || GETB(out[pixel]) == 0xFF) { + out[pixel] = 0xFFFFFFFF; + } else { + out[pixel] = 0; + } + } + break; + case Graffiti_Y_Stat: + for (int pixel = 0; pixel < width*height; pixel++) { + temp = .299*GETR(out[pixel]) + .587 * GETG(out[pixel]) + .114 * GETB(out[pixel]); + temp = CLAMP(temp); + out[pixel] = RGBA(temp, temp, temp, 0xFF); + } + break; + case Graffiti_S_Stat: + for (int pixel = 0; pixel < width*height; pixel++) { + min = GETR(out[pixel]); + max = GETR(out[pixel]); + if (GETG(out[pixel]) < min) min = GETG(out[pixel]); + if (GETG(out[pixel]) > max) max = GETG(out[pixel]); + if (GETB(out[pixel]) < min) min = GETB(out[pixel]); + if (GETB(out[pixel]) > max) max = GETB(out[pixel]); + if (min == 0) { out[pixel] = 0; } + else { + temp = 255.0*(max-min)/(float)max; + temp = CLAMP(temp); + out[pixel] = RGBA(temp, temp, temp, 0xFF); + } + } + break; + case Graffiti_STresh_Stat: + for (int pixel = 0; pixel < width*height; pixel++) { + min = GETR(out[pixel]); + max = GETR(out[pixel]); + if (GETG(out[pixel]) < min) min = GETG(out[pixel]); + if (GETG(out[pixel]) > max) max = GETG(out[pixel]); + if (GETB(out[pixel]) < min) min = GETB(out[pixel]); + if (GETB(out[pixel]) > max) max = GETB(out[pixel]); + if (min == 0 || max < 0x80) { out[pixel] = 0; } + else { + temp = 255.0*((float)max-min)/max; + temp = CLAMP(temp); + out[pixel] = RGBA(temp, temp, temp, 0xFF); + } + } + break; + case Graffiti_SDiff_Stat: + for (int pixel = 0; pixel < width*height; pixel++) { + min = GETR(out[pixel]); + max = GETR(out[pixel]); + if (GETG(out[pixel]) < min) min = GETG(out[pixel]); + if (GETG(out[pixel]) > max) max = GETG(out[pixel]); + if (GETB(out[pixel]) < min) min = GETB(out[pixel]); + if (GETB(out[pixel]) > max) max = GETB(out[pixel]); + int sat; + if (min == 0) { sat = 0; } + else { + temp = 255.0*(max-min)/(float)max; + temp = CLAMP(temp); + sat = RGBA(temp, temp, temp, 0xFF); + } + min = m_longMeanImage[3*pixel+0]; + max = m_longMeanImage[3*pixel+0]; + if (m_longMeanImage[3*pixel+1] < min) min = m_longMeanImage[3*pixel+1]; + if (m_longMeanImage[3*pixel+1] > max) max = m_longMeanImage[3*pixel+1]; + if (m_longMeanImage[3*pixel+2] < min) min = m_longMeanImage[3*pixel+2]; + if (m_longMeanImage[3*pixel+2] > max) max = m_longMeanImage[3*pixel+2]; + if (min == 0) { out[pixel] = 0; } + else { + temp = 255.0*(max-min)/(float)max; + temp = CLAMP(temp); + out[pixel] = RGBA(temp, temp, temp, 0xFF); + } + temp = 0x7f + GETR(out[pixel]) - GETR(sat); + temp = CLAMP(temp); + out[pixel] = RGBA(temp, temp, temp, 0xFF); + } + break; + case Graffiti_SDiffTresh_Stat: + for (int pixel = 0; pixel < width*height; pixel++) { + min = GETR(out[pixel]); + max = GETR(out[pixel]); + if (GETG(out[pixel]) < min) min = GETG(out[pixel]); + if (GETG(out[pixel]) > max) max = GETG(out[pixel]); + if (GETB(out[pixel]) < min) min = GETB(out[pixel]); + if (GETB(out[pixel]) > max) max = GETB(out[pixel]); + int sat; + if (min == 0) { sat = 0; } + else { + temp = 255.0*(max-min)/(float)max; + temp = CLAMP(temp); + sat = RGBA(temp, temp, temp, 0xFF); + } + if (max < 0x80) { + out[pixel] = RGBA(0,0,0,0xFF); + } else { + min = m_longMeanImage[3*pixel+0]; + max = m_longMeanImage[3*pixel+0]; + if (m_longMeanImage[3*pixel+1] < min) min = m_longMeanImage[3*pixel+1]; + if (m_longMeanImage[3*pixel+1] > max) max = m_longMeanImage[3*pixel+1]; + if (m_longMeanImage[3*pixel+2] < min) min = m_longMeanImage[3*pixel+2]; + if (m_longMeanImage[3*pixel+2] > max) max = m_longMeanImage[3*pixel+2]; + if (min == 0) { out[pixel] = 0; } + else { + temp = 255.0*(max-min)/(float)max; + temp = CLAMP(temp); + out[pixel] = RGBA(temp, temp, temp, 0xFF); + } + temp = 0x7f + GETR(out[pixel]) - GETR(sat); + temp = CLAMP(temp); + out[pixel] = RGBA(temp, temp, temp, 0xFF); + } + } + break; + case Graffiti_SSqrt_Stat: + for (int pixel = 0; pixel < width*height; pixel++) { + min = GETR(out[pixel]); + max = GETR(out[pixel]); + if (GETG(out[pixel]) < min) min = GETG(out[pixel]); + if (GETG(out[pixel]) > max) max = GETG(out[pixel]); + if (GETB(out[pixel]) < min) min = GETB(out[pixel]); + if (GETB(out[pixel]) > max) max = GETB(out[pixel]); + if (min == 0) { out[pixel] = 0; } + else { + temp = 255.0*(max-min)/(float)max/(256.0-max); + temp = CLAMP(temp); + out[pixel] = RGBA(temp, temp, temp, 0xFF); + } + } + break; + case Graffiti_LongAvg_Stat: + maxDiff = 0; + temp = 0; + for (int pixel = 0; pixel < width*height; pixel++) { + r = 0x7f + (GETR(out[pixel]) - m_longMeanImage[3*pixel+0])/2; + r = CLAMP(r); + g = 0x7f + (GETG(out[pixel]) - m_longMeanImage[3*pixel+1])/2; + g = CLAMP(g); + b = 0x7f + (GETB(out[pixel]) - m_longMeanImage[3*pixel+2])/2; + b = CLAMP(b); + + out[pixel] = RGBA(r,g,b,0xFF); + } + break; + case Graffiti_LongAvg: + for (int pixel = 0; pixel < width*height; pixel++) { + + r = 0x7f + (GETR(out[pixel]) - m_longMeanImage[3*pixel+0]); + r = CLAMP(r); + max = GETR(out[pixel]); + maxDiff = r; + temp = r; + + g = 0x7f + (GETG(out[pixel]) - m_longMeanImage[3*pixel+1]); + g = CLAMP(g); + if (maxDiff < g) maxDiff = g; + if (max < GETG(out[pixel])) max = GETG(out[pixel]); + temp += g; + + b = 0x7f + (GETB(out[pixel]) - m_longMeanImage[3*pixel+2]); + b = CLAMP(b); + if (maxDiff < b) maxDiff = b; + if (max < GETB(out[pixel])) max = GETB(out[pixel]); + temp += b; + + if (maxDiff > 0xe0 && temp > 0xe0 + 0xd0 + 0x80) { + m_lightMask[pixel] = MAX(m_lightMask[pixel], out[pixel]); + + m_alphaMap[4*pixel+0] = 2*(GETR(out[pixel])-m_longMeanImage[3*pixel+0]); + m_alphaMap[4*pixel+0] = CLAMP(m_alphaMap[4*pixel+0])/255.0; + + m_alphaMap[4*pixel+1] = 2*(GETG(out[pixel])-m_longMeanImage[3*pixel+1]); + m_alphaMap[4*pixel+1] = CLAMP(m_alphaMap[4*pixel+1])/255.0; + + m_alphaMap[4*pixel+2] = 2*(GETB(out[pixel])-m_longMeanImage[3*pixel+2]); + m_alphaMap[4*pixel+2] = CLAMP(m_alphaMap[4*pixel+2])/255.0; + + m_alphaMap[4*pixel+3] = 1; + } + + if (m_lightMask[pixel] != 0) { + r = SCREEN1(GETR(out[pixel]), GETR(m_lightMask[pixel])); + g = SCREEN1(GETG(out[pixel]), GETG(m_lightMask[pixel])); + b = SCREEN1(GETB(out[pixel]), GETB(m_lightMask[pixel])); + r = CLAMP(r); + g = CLAMP(g); + b = CLAMP(b); + out[pixel] = RGBA(r,g,b,0xFF); + } + } + break; + case Graffiti_LongAvgAlpha_Stat: + for (int pixel = 0; pixel < width*height; pixel++) { + + r = 0x7f + (GETR(out[pixel]) - m_longMeanImage[3*pixel+0]); + r = CLAMP(r); + max = GETR(out[pixel]); + maxDiff = r; + temp = r; + + g = 0x7f + (GETG(out[pixel]) - m_longMeanImage[3*pixel+1]); + g = CLAMP(g); + if (maxDiff < g) maxDiff = g; + if (max < GETG(out[pixel])) max = GETG(out[pixel]); + temp += g; + + b = 0x7f + (GETB(out[pixel]) - m_longMeanImage[3*pixel+2]); + b = CLAMP(b); + if (maxDiff < b) maxDiff = b; + if (max < GETB(out[pixel])) max = GETB(out[pixel]); + temp += b; + + if (maxDiff > 0xe0 && temp > 0xe0 + 0xd0 + 0x80) { + m_lightMask[pixel] = MAX(m_lightMask[pixel], out[pixel]); + + f = 2*(GETR(out[pixel])-m_longMeanImage[3*pixel+0]); + f = CLAMP(f)/255.0; + if (f > m_alphaMap[4*pixel+0]) m_alphaMap[4*pixel+0] = f; + + f = 2*(GETG(out[pixel])-m_longMeanImage[3*pixel+1]); + f = CLAMP(f)/255.0; + if (f > m_alphaMap[4*pixel+1]) m_alphaMap[4*pixel+1] = f; + + f = 2*(GETB(out[pixel])-m_longMeanImage[3*pixel+2]); + f = CLAMP(f)/255.0; + if (f > m_alphaMap[4*pixel+2]) m_alphaMap[4*pixel+2] = f; + + m_alphaMap[4*pixel+3] = 1; + } + r = 255.0*m_alphaMap[4*pixel+0]; + g = 255*m_alphaMap[4*pixel+1]; + b = 255*m_alphaMap[4*pixel+2]; + out[pixel] = RGBA(r,g,b,0xFF); + } + break; + case Graffiti_LongAvgAlpha: + for (int pixel = 0; pixel < width*height; pixel++) { + + r = 0x7f + (GETR(out[pixel]) - m_longMeanImage[3*pixel+0]); + r = CLAMP(r); + max = GETR(out[pixel]); + maxDiff = r; + temp = r; + + g = 0x7f + (GETG(out[pixel]) - m_longMeanImage[3*pixel+1]); + g = CLAMP(g); + if (maxDiff < g) maxDiff = g; + if (max < GETG(out[pixel])) max = GETG(out[pixel]); + temp += g; + + b = 0x7f + (GETB(out[pixel]) - m_longMeanImage[3*pixel+2]); + b = CLAMP(b); + if (maxDiff < b) maxDiff = b; + if (max < GETB(out[pixel])) max = GETB(out[pixel]); + temp += b; + + if (maxDiff > 0xe0 && temp > 0xe0 + 0xd0 + 0x80) { + m_lightMask[pixel] = MAX(m_lightMask[pixel], out[pixel]); + + f = 2*(GETR(out[pixel])-m_longMeanImage[3*pixel+0]); + f = CLAMP(f)/255.0; + f *= f; + if (f > m_alphaMap[4*pixel+0]) m_alphaMap[4*pixel+0] = f; + + f = 2*(GETG(out[pixel])-m_longMeanImage[3*pixel+1]); + f = CLAMP(f)/255.0; + f *= f; + if (f > m_alphaMap[4*pixel+1]) m_alphaMap[4*pixel+1] = f; + + f = 2*(GETB(out[pixel])-m_longMeanImage[3*pixel+2]); + f = CLAMP(f)/255.0; + f *= f; + if (f > m_alphaMap[4*pixel+2]) m_alphaMap[4*pixel+2] = f; + } + if (m_lightMask[pixel] != 0) { + r = SCREEN1(GETR(out[pixel]), m_alphaMap[4*pixel+0]*GETR(m_lightMask[pixel])); + g = SCREEN1(GETG(out[pixel]), m_alphaMap[4*pixel+1]*GETG(m_lightMask[pixel])); + b = SCREEN1(GETB(out[pixel]), m_alphaMap[4*pixel+2]*GETB(m_lightMask[pixel])); + r = CLAMP(r); + g = CLAMP(g); + b = CLAMP(b); + out[pixel] = RGBA(r,g,b,0xFF); + } + } + break; + case Graffiti_LongAvgAlphaCumC: + + /** + Ideas (partially considered) to get a realistic look: + * Remember Hue if Saturation > 0.1 (below: Close to white, so Hue might be wrong → remember Saturation as well) + * Maximize Saturation for low alpha (opacity) + * Make alpha depend on the light source's brightness + * If alpha > 1: Simulate overexposure by going towards white + * If pixel is bright in another frame: Sum up alpha values (longer exposure) + Maybe: Logarithmic scale? → Overexposure becomes harder + log(alpha/factor + 1) or sqrt(alpha/factor) + */ + for (int pixel = 0; pixel < width*height; pixel++) { + + /* + Light detection + */ + + // maxDiff: Maximum difference to the mean image + // {-255,...,255} + // max: Maximum pixel value + // {0,...,255} + // temp: Sum of all differences + // {-3*255,...,3*255} + // sum: Sum of all pixel values + // {0,...,3*255} + + r = GETR(out[pixel]) - m_longMeanImage[3*pixel+0]; + maxDiff = r; + max = GETR(out[pixel]); + temp = r; + + g = GETG(out[pixel]) - m_longMeanImage[3*pixel+1]; + if (max < GETG(out[pixel])) { + max = GETG(out[pixel]); + } + if (maxDiff < g) { + maxDiff = g; + } + temp += g; + + b = GETB(out[pixel]) - m_longMeanImage[3*pixel+2]; + if (max < GETB(out[pixel])) { + max = GETB(out[pixel]); + } + if (maxDiff < b) { + maxDiff = b; + } + temp += b; + + sum = GETR(out[pixel]) + GETG(out[pixel]) + GETB(out[pixel]); + + if ( + maxDiff > m_pThresholdDifference + && temp > m_pThresholdDiffSum + && sum > m_pThresholdBrightness + // If all requirements are met, then this should be a light source. + ) + { +#ifdef LG_ADV + // Just add values as float. Overflows are highly unlikely (3.4E38+ frames ...). + fr = CLAMP(r)/255.0; + fg = CLAMP(g)/255.0; + fb = CLAMP(b)/255.0; + + f = (fr + fg + fb) / 3 * m_pSensitivity; + fr *= f; + fg *= f; + fb *= f; + +#ifdef LG_NO_OVERLAY +// std::cout << "fr: " << fr << "; fg: " << fg << "; fb: " << fb << "\n"; + fr -= m_prevMask[pixel].r; + fg -= m_prevMask[pixel].g; + fb -= m_prevMask[pixel].b; + m_prevMask[pixel].r += fr; + m_prevMask[pixel].g += fg; + m_prevMask[pixel].b += fb; +// std::cout << "fr2: " << fr << "; fg2: " << fg << "; fb2: " << fb << "\n"; + if (fr < 0) { fr = 0; } + if (fg < 0) { fg = 0; } + if (fb < 0) { fb = 0; } +#endif + + m_rgbLightMask[pixel].r += fr; + m_rgbLightMask[pixel].g += fg; + m_rgbLightMask[pixel].b += fb; + +#else + // Store the «additional» light delivered by the light source in the light mask. + color = RGBA(CLAMP(r), CLAMP(g), CLAMP(b),0xFF); + m_lightMask[pixel] = MAX(m_lightMask[pixel], color); + + // Add the brightness of the light source to the brightness map (alpha map) + y = REC709Y(CLAMP(r), CLAMP(g), CLAMP(b)) / 255.0; + y = y * m_pSensitivity; + m_alphaMap[4*pixel] += y; +#endif + } else { +#ifdef LG_NO_OVERLAY + m_prevMask[pixel] = rgb0; +#endif + } + + + + /* + Background weight + */ + if (m_pBackgroundWeight > 0) { + // Use part of the background mean. This allows to have only lights appearing in the video + // if people or other objects walk into the video after the first frame (darker, therefore not in the light mask). + out[pixel] = RGBA((int) (m_pBackgroundWeight*m_longMeanImage[3*pixel+0] + (1-m_pBackgroundWeight)*GETR(out[pixel])), + (int) (m_pBackgroundWeight*m_longMeanImage[3*pixel+1] + (1-m_pBackgroundWeight)*GETG(out[pixel])), + (int) (m_pBackgroundWeight*m_longMeanImage[3*pixel+2] + (1-m_pBackgroundWeight)*GETB(out[pixel])), + 0xFF); + } + + + /* + Adding light mask + */ +#ifdef LG_ADV + if ( + m_rgbLightMask[pixel].r != 0 || m_rgbLightMask[pixel].g != 0 || m_rgbLightMask[pixel].b != 0 + && !m_pStatsBrightness && !m_pStatsDiff && !m_pStatsDiffSum + ) + { + + fr = m_rgbLightMask[pixel].r; + fg = m_rgbLightMask[pixel].g; + fb = m_rgbLightMask[pixel].b; + + if (m_pLowerOverexposure > 0) { + // Comparisation of plots with octave: + // clf;hold on;plot([0 1],[0 1],'k');plot(range,ones(length(range),1),'k');plot(range,sqrt(range));plot(range,log(1+range),'k');plot(range,log(1+range),'g');plot(range,(log(1+range)/3).^.5,'r');axis equal + fr = pow( log(1+fr)/m_pLowerOverexposure, .5 ); + fg = pow( log(1+fg)/m_pLowerOverexposure, .5 ); + fb = pow( log(1+fb)/m_pLowerOverexposure, .5 ); + } + + + // Calculate overflow between different colours: + // A very bright red light source will eventually overflow into other channels. + sr = 0; + sg = 0; + sb = 0; + if (fr > 1) { + sr += fr - 1; + } + if (fg > 1) { + sg += fg - 1; + } + if (fb > 1) { + sb += fb - 1; + } + fr += (sg + sb)/2; + fg += (sr + sb)/2; + fb += (sg + sb)/2; + if (fr > 1) { + fr = 1; + } + if (fg > 1) { + fg = 1; + } + if (fb > 1) { + fb = 1; + } + + // Increase the saturation if the average brightness is below a certain level + // Do not use Rec709 Luma since we want to consider all colours to equal parts. + fy = (fr + fg + fb) / 3; + if (fy < 1 && m_pSaturation > 0) { + fsat = 1 + m_pSaturation*(1-fy); + + fr = fy + fsat * (fr-fy); + fg = fy + fsat * (fg-fy); + fb = fy + fsat * (fb-fy); + } + + // Paint the light on top of the image using addition + // Since brightness is equidistant in sRGB, this works fine. + r = 255*fr + GETR(out[pixel]); + g = 255*fg + GETG(out[pixel]); + b = 255*fb + GETB(out[pixel]); + r = CLAMP(r); + g = CLAMP(g); + b = CLAMP(b); + out[pixel] = RGBA(r,g,b,0xFF); + +#ifdef LG_DEBUG + deCount++; + if (deCount < 10) { + std::cout << "r: " << m_rgbLightMask[pixel].r << ", fy: " << fy << ", fr: " << fr << ", sr: " << sr << ", R: " << r << ", inR: " << GETR(in[pixel]) << "\n"; + } +#endif + + } else if (m_pTransparentBackground) { + // Transparent background + out[pixel] &= RGBA(0xFF, 0xFF, 0xFF, 0); + } +#else + if ( + m_lightMask[pixel] != 0 && m_alphaMap[4*pixel + 0] != 0 + && !m_pStatsBrightness && !m_pStatsDiff && !m_pStatsDiffSum + ) + { + + f = sqrt(m_alphaMap[4*pixel]); + + r = f * GETR(m_lightMask[pixel]); + g = f * GETG(m_lightMask[pixel]); + b = f * GETB(m_lightMask[pixel]); + + if (f > 1) { + // Simulate overexposure + sum = 0; + if (r > 255) { + sum += r-255; + } + if (g > 255) { + sum += g-255; + } + if (b > 255) { + sum += g-255; + } + + if (sum > 0) { + sum = sum/10.0; + r += sum; + g += sum; + b += sum; + } + } else if (f < 1) { + // Lower exposure: Stronger colors + y = REC709Y(r,g,b); + float sat = 2.0; + + r = y + sat * (r-y); + g = y + sat * (g-y); + b = y + sat * (b-y); + } + + + // Add the light map as additional light to the image + r += GETR(out[pixel]); + g += GETG(out[pixel]); + b += GETB(out[pixel]); + r = CLAMP(r); + g = CLAMP(g); + b = CLAMP(b); + out[pixel] = RGBA(r,g,b,0xFF); + } else if (m_pTransparentBackground) { + // Transparent background + out[pixel] &= RGBA(0xFF, 0xFF, 0xFF, 0); + } +#endif + + + /* + In-video statistics for easier parameter adjustment (thresholds) + */ + if (m_pStatsBrightness) { + // Show the image's brightness and highlight the threshold set by the user + + // Limit maximum brightness to 80% for still being able to distinguish + // between «bright spot» (light grey) and «over the threshold» (blue) + r = .8*sum/3; + g = .8*sum/3; + b = .8*sum/3; + if (sum > m_pThresholdBrightness) { + b = 255; + } + out[pixel] = RGBA(r,g,b,0xFF); + } + + if (m_pStatsDiff) { + // As above, but for the brightness difference relative to the background. + r = .8*CLAMP(maxDiff); + g = r; + if (!m_pStatsBrightness) { + b = r; + } + + if (maxDiff > m_pThresholdDifference) { + g = 255; + } + out[pixel] = RGBA(r,g,b,0xFF); + } + + if (m_pStatsDiffSum) { + // As above, for the sum of the differences in each color channel. + r = .8*CLAMP(temp/3.0); + if (!m_pStatsDiff) { + g = r; + } + if (!m_pStatsBrightness) { + b = r; + } + if (temp > m_pThresholdDiffSum) { + r = 255; + } + out[pixel] = RGBA(r,g,b,0xFF); + } + } + break; + } + } + +private: + std::vector m_lightMask; + std::vector m_longMeanImage; + std::vector m_alphaMap; + bool m_meanInitialized; + GraffitiMode m_mode; + DimMode m_dimMode; + +#ifdef LG_ADV + std::vector m_rgbLightMask; +#endif +#ifdef LG_NO_OVERLAY + std::vector m_prevMask; +#endif + + f0r_param_double m_pLongAlpha; + f0r_param_double m_pSensitivity; + f0r_param_double m_pBackgroundWeight; + f0r_param_double m_pThresholdBrightness; + f0r_param_double m_pThresholdDifference; + f0r_param_double m_pThresholdDiffSum; + f0r_param_double m_pDim; + f0r_param_double m_pSaturation; + f0r_param_double m_pLowerOverexposure; + f0r_param_bool m_pStatsBrightness; + f0r_param_bool m_pStatsDiff; + f0r_param_bool m_pStatsDiffSum; + f0r_param_bool m_pTransparentBackground; + f0r_param_bool m_pBlackReference; + f0r_param_bool m_pNonlinearDim; + f0r_param_bool m_pReset; + +}; + + + +frei0r::construct plugin("Light Graffiti", + "Creates light graffitis from a video by keeping the brightest spots.", + "Simon A. Eugster (Granjow)", + 0,1, + F0R_COLOR_MODEL_RGBA8888); diff --git a/src/filter/luminance/CMakeLists.txt b/src/filter/luminance/CMakeLists.txt new file mode 100644 index 0000000..db99d31 --- /dev/null +++ b/src/filter/luminance/CMakeLists.txt @@ -0,0 +1,12 @@ +set (SOURCES luminance.c) +set (TARGET luminance) + +if (MSVC) + set_source_files_properties (luminance.c PROPERTIES LANGUAGE CXX) + set (SOURCES ${SOURCES} ${FREI0R_DEF}) +endif (MSVC) + +add_library (${TARGET} MODULE ${SOURCES}) +set_target_properties (${TARGET} PROPERTIES PREFIX "") + +install (TARGETS ${TARGET} LIBRARY DESTINATION ${LIBDIR}) diff --git a/src/filter/luminance/luminance.c b/src/filter/luminance/luminance.c index 51561d8..394e0e3 100644 --- a/src/filter/luminance/luminance.c +++ b/src/filter/luminance/luminance.c @@ -59,7 +59,7 @@ f0r_instance_t f0r_construct(unsigned int width, unsigned int height) { - luminance_instance_t* inst = calloc(1, sizeof(*inst)); + luminance_instance_t* inst = (luminance_instance_t*)calloc(1, sizeof(*inst)); inst->width = width; inst->height = height; return (f0r_instance_t)inst; } diff --git a/src/filter/mask0mate/CMakeLists.txt b/src/filter/mask0mate/CMakeLists.txt new file mode 100644 index 0000000..7e2d7bc --- /dev/null +++ b/src/filter/mask0mate/CMakeLists.txt @@ -0,0 +1,12 @@ +set (SOURCES mask0mate.c blur.h) +set (TARGET mask0mate) + +if (MSVC) + set_source_files_properties (mask0mate.c PROPERTIES LANGUAGE CXX) + set (SOURCES ${SOURCES} ${FREI0R_DEF}) +endif (MSVC) + +add_library (${TARGET} MODULE ${SOURCES}) +set_target_properties (${TARGET} PROPERTIES PREFIX "") + +install (TARGETS ${TARGET} LIBRARY DESTINATION ${LIBDIR}) diff --git a/src/filter/mask0mate/mask0mate.c b/src/filter/mask0mate/mask0mate.c index 46396ab..bc1448f 100644 --- a/src/filter/mask0mate/mask0mate.c +++ b/src/filter/mask0mate/mask0mate.c @@ -136,7 +136,7 @@ f0r_instance_t f0r_construct(unsigned int width, unsigned int height) { - mask0mate_instance_t* inst = calloc(1, sizeof(*inst)); + mask0mate_instance_t* inst = (mask0mate_instance_t*)calloc(1, sizeof(*inst)); inst->w = width; inst->h = height; inst->left = 0.2; @@ -145,7 +145,7 @@ inst->bottom = 0.2; 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 ); + inst->blur_instance = (f0r_instance_t*)blur_construct( width, height ); update_mask( inst ); return (f0r_instance_t)inst; } diff --git a/src/filter/measure/CMakeLists.txt b/src/filter/measure/CMakeLists.txt new file mode 100644 index 0000000..2f09f47 --- /dev/null +++ b/src/filter/measure/CMakeLists.txt @@ -0,0 +1,17 @@ +set (B_SOURCES pr0be.c measure.h font2.h) +set (F_SOURCES pr0file.c measure.h font2.h) + +if (MSVC) + set_source_files_properties (pr0be.c pr0file.c PROPERTIES LANGUAGE CXX) + set (B_SOURCES ${B_SOURCES} ${FREI0R_DEF}) + set (F_SOURCES ${F_SOURCES} ${FREI0R_DEF}) +endif (MSVC) + +add_library (pr0be MODULE ${B_SOURCES}) +add_library (pr0file MODULE ${F_SOURCES}) + +set_target_properties (pr0be PROPERTIES PREFIX "") +set_target_properties (pr0file PROPERTIES PREFIX "") + +install (TARGETS pr0be LIBRARY DESTINATION ${LIBDIR}) +install (TARGETS pr0file LIBRARY DESTINATION ${LIBDIR}) diff --git a/src/filter/measure/README b/src/filter/measure/README new file mode 100644 index 0000000..18fbaac --- /dev/null +++ b/src/filter/measure/README @@ -0,0 +1,107 @@ +Measurement Frei0r plugins + +Plugins for various measurements on video + +Included are the following plugins: + +Pr0be Measure channel values, with statistics +Pr0file a 2D video oscilloscope with readouts + + + +Written by Marko Cebokli, jun 2010, and released under GNU GPL + + +RELEASE NOTES + +** jun 2010 +Version 0.1 +"pre-alpha" (throw it out and see what happens... :-) + + +INTRODUCTION + +I am an old engineer, who is not happy unless surrounded by ...scopes, +...meters, ...lyzers and stuff. So I had to do this, really. +I suspect these plugins won't be of much use for the general public +(well, the geeky types might like them anyway ;-). +They are intended mainly for developers and testers. + +NOTE1: The "test_pat_*" plugins can provide well defined signals for +stimulus/response measurements. + +NOTE2: for best results, watch the output on 1:1 pixel scale display. + + + + + ****** DESCRIPTIONS OF EACH PLUGIN FOLLOW ****** + + +PR0BE + +Uses a variable sized probe, that can be moved across the image to +sample values of the color channels. Comes with a magnifier for pixel +accurate work, and does statistics over the probe area. It is useful +mainly for checking color and levels. + +parameters: + +Measurement select the set of channels to measure +X X position of probe +Y Y position of probe +X size X size of probe +Y size Y size of probe +256 scale Show values as 0-255 instead of 0.0-1.0 +Show alpha Show the values of the alpha channel too +Big window Display a bigger info window + +The available channel sets are RGB, two flavors of Y'PrPb, HSV and HSL. +HSV and HSL are strange nonlinear combinations, not very scientific, so +the statistics are not displayed for them. +Avg is the average value within the probe rectangle. RMS is the "AC" +component. For example, it can be used to measure noise, when the probe +is placed over an otherwise uniform area. + + +PR0FILE + +A classic scope can show you a line waveform, and maybe a vertical +profile too. This one can show profiles at any angle anywhere in the +image, so I call it a "2D scope". It has two markers with delta and a +profile statistics display. It has a zillion parameters, but if you've +been to a lab lately, you probably noticed that any self respecting +'scope' is replete with buttons and knobs :-) +The main purpose of "pr0file" is to measure spatial impulse and step +responses, chroma delays, noise, etc. + +parameters: + +X X position of center of profile +Y Y position of center of profile +Tilt The angle of the profile +Length The length of the profile +Channel The color channel to display numnerically +Marker 1 Position of first marker along the profile +Marker 1 Position of second marker along the profile +R trace Turn on trace of R channel +G trace Turn on trace of G channel +B trace Turn on trace of B channel +Y trace Turn on trace of Y channel +Pr trace Turn on trace of Pr channel +Pb trace Turn on trace of Pb channel +Alpha trace Turn on trace of alpha channel +Display average Turn on numeric display of profile average +Display RMS Turn on numeric display of profile RMS (AC value) +Display minimum Turn on numeric display of profile minimum +Display maximum Turn on numeric display of profile maximum +256 scale Show values as 0-255 instead of 0.0-1.0 +Color Select rec 601 or rec 709 for Y'PrPb calculation +Crosshair color Select one of 8 colors for the profile marker, to make + it stand out from different image contents. + +The markers are switched on by pulling them from the leftmost position, +and turned off by slamming them all the way left. When a marker is +activated, a numeric display of its value is automatically turned on. +When both markers are active, a difference display appears. + diff --git a/src/filter/measure/font2.h b/src/filter/measure/font2.h new file mode 100755 index 0000000..6aae1b3 --- /dev/null +++ b/src/filter/measure/font2.h @@ -0,0 +1,131 @@ +#define font2_width 256 +#define font2_height 48 +static unsigned char font2_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x00, 0x18, 0x00, 0x00, 0x0c, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x18, 0x66, 0x00, 0x3e, 0x00, 0x1c, 0x0c, 0x30, 0x0c, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x1c, 0x18, 0x3e, 0x3e, 0x30, 0x7f, 0x1c, 0x7f, + 0x3e, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x3c, 0x66, 0x36, + 0x63, 0x00, 0x36, 0x0c, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x36, 0x1c, 0x63, 0x63, 0x38, 0x03, 0x06, 0x63, 0x63, 0x63, 0x00, 0x00, + 0x60, 0x00, 0x06, 0x63, 0x00, 0x3c, 0x24, 0x36, 0x43, 0x43, 0x36, 0x06, + 0x0c, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x63, 0x1e, 0x60, 0x60, + 0x3c, 0x03, 0x03, 0x60, 0x63, 0x63, 0x18, 0x18, 0x30, 0x00, 0x0c, 0x63, + 0x00, 0x3c, 0x00, 0x7f, 0x03, 0x63, 0x1c, 0x00, 0x0c, 0x30, 0x66, 0x18, + 0x00, 0x00, 0x00, 0x60, 0x63, 0x18, 0x30, 0x60, 0x36, 0x03, 0x03, 0x60, + 0x63, 0x63, 0x18, 0x18, 0x18, 0x7e, 0x18, 0x30, 0x00, 0x18, 0x00, 0x36, + 0x3e, 0x30, 0x6e, 0x00, 0x0c, 0x30, 0x3c, 0x18, 0x00, 0x00, 0x00, 0x30, + 0x6b, 0x18, 0x18, 0x3c, 0x33, 0x3f, 0x3f, 0x30, 0x3e, 0x7e, 0x00, 0x00, + 0x0c, 0x00, 0x30, 0x18, 0x00, 0x18, 0x00, 0x36, 0x60, 0x18, 0x3b, 0x00, + 0x0c, 0x30, 0xff, 0x7e, 0x00, 0x7f, 0x00, 0x18, 0x6b, 0x18, 0x0c, 0x60, + 0x7f, 0x60, 0x63, 0x18, 0x63, 0x60, 0x00, 0x00, 0x06, 0x00, 0x60, 0x18, + 0x00, 0x18, 0x00, 0x36, 0x60, 0x0c, 0x33, 0x00, 0x0c, 0x30, 0x3c, 0x18, + 0x00, 0x00, 0x00, 0x0c, 0x63, 0x18, 0x06, 0x60, 0x30, 0x60, 0x63, 0x0c, + 0x63, 0x60, 0x00, 0x00, 0x0c, 0x7e, 0x30, 0x18, 0x00, 0x00, 0x00, 0x7f, + 0x61, 0x06, 0x33, 0x00, 0x0c, 0x30, 0x66, 0x18, 0x18, 0x00, 0x00, 0x06, + 0x63, 0x18, 0x03, 0x60, 0x30, 0x60, 0x63, 0x0c, 0x63, 0x60, 0x18, 0x18, + 0x18, 0x00, 0x18, 0x00, 0x00, 0x18, 0x00, 0x36, 0x63, 0x63, 0x33, 0x00, + 0x18, 0x18, 0x00, 0x00, 0x18, 0x00, 0x18, 0x03, 0x36, 0x18, 0x63, 0x63, + 0x30, 0x63, 0x63, 0x0c, 0x63, 0x30, 0x18, 0x18, 0x30, 0x00, 0x0c, 0x18, + 0x00, 0x18, 0x00, 0x36, 0x3e, 0x61, 0x6e, 0x00, 0x30, 0x0c, 0x00, 0x00, + 0x18, 0x00, 0x18, 0x01, 0x1c, 0x7e, 0x7f, 0x3e, 0x78, 0x3e, 0x3e, 0x0c, + 0x3e, 0x1e, 0x00, 0x0c, 0x60, 0x00, 0x06, 0x18, 0x00, 0x00, 0x00, 0x00, + 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x08, 0x3f, 0x3c, + 0x1f, 0x7f, 0x7f, 0x3c, 0x63, 0x3c, 0x78, 0x67, 0x0f, 0x63, 0x63, 0x3e, + 0x3f, 0x3e, 0x3f, 0x3e, 0x7e, 0x63, 0x63, 0x63, 0x63, 0x66, 0x7f, 0x3c, + 0x00, 0x3c, 0x36, 0x00, 0x3e, 0x1c, 0x66, 0x66, 0x36, 0x66, 0x66, 0x66, + 0x63, 0x18, 0x30, 0x66, 0x06, 0x77, 0x67, 0x63, 0x66, 0x63, 0x66, 0x63, + 0x7e, 0x63, 0x63, 0x63, 0x63, 0x66, 0x63, 0x0c, 0x01, 0x30, 0x63, 0x00, + 0x63, 0x36, 0x66, 0x43, 0x66, 0x46, 0x46, 0x43, 0x63, 0x18, 0x30, 0x66, + 0x06, 0x7f, 0x6f, 0x63, 0x66, 0x63, 0x66, 0x63, 0x5a, 0x63, 0x63, 0x63, + 0x36, 0x66, 0x61, 0x0c, 0x03, 0x30, 0x00, 0x00, 0x63, 0x63, 0x66, 0x03, + 0x66, 0x16, 0x16, 0x03, 0x63, 0x18, 0x30, 0x36, 0x06, 0x7f, 0x7f, 0x63, + 0x66, 0x63, 0x66, 0x06, 0x18, 0x63, 0x63, 0x63, 0x3e, 0x66, 0x30, 0x0c, + 0x07, 0x30, 0x00, 0x00, 0x7b, 0x63, 0x3e, 0x03, 0x66, 0x1e, 0x1e, 0x03, + 0x7f, 0x18, 0x30, 0x1e, 0x06, 0x6b, 0x7b, 0x63, 0x3e, 0x63, 0x3e, 0x1c, + 0x18, 0x63, 0x63, 0x6b, 0x1c, 0x3c, 0x18, 0x0c, 0x0e, 0x30, 0x00, 0x00, + 0x7b, 0x7f, 0x66, 0x03, 0x66, 0x16, 0x16, 0x7b, 0x63, 0x18, 0x30, 0x1e, + 0x06, 0x63, 0x73, 0x63, 0x06, 0x63, 0x36, 0x30, 0x18, 0x63, 0x63, 0x6b, + 0x1c, 0x18, 0x0c, 0x0c, 0x1c, 0x30, 0x00, 0x00, 0x7b, 0x63, 0x66, 0x03, + 0x66, 0x06, 0x06, 0x63, 0x63, 0x18, 0x33, 0x36, 0x06, 0x63, 0x63, 0x63, + 0x06, 0x63, 0x66, 0x60, 0x18, 0x63, 0x63, 0x6b, 0x3e, 0x18, 0x06, 0x0c, + 0x38, 0x30, 0x00, 0x00, 0x3b, 0x63, 0x66, 0x43, 0x66, 0x46, 0x06, 0x63, + 0x63, 0x18, 0x33, 0x66, 0x46, 0x63, 0x63, 0x63, 0x06, 0x6b, 0x66, 0x63, + 0x18, 0x63, 0x36, 0x7f, 0x36, 0x18, 0x43, 0x0c, 0x70, 0x30, 0x00, 0x00, + 0x03, 0x63, 0x66, 0x66, 0x36, 0x66, 0x06, 0x66, 0x63, 0x18, 0x33, 0x66, + 0x66, 0x63, 0x63, 0x63, 0x06, 0x7b, 0x66, 0x63, 0x18, 0x63, 0x1c, 0x77, + 0x63, 0x18, 0x63, 0x0c, 0x60, 0x30, 0x00, 0x00, 0x3e, 0x63, 0x3f, 0x3c, + 0x1f, 0x7f, 0x0f, 0x5c, 0x63, 0x3c, 0x1e, 0x67, 0x7f, 0x63, 0x63, 0x3e, + 0x0f, 0x3e, 0x67, 0x3e, 0x3c, 0x3e, 0x08, 0x36, 0x63, 0x3c, 0x7f, 0x3c, + 0x40, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x6e, 0x00, 0x18, 0x00, 0x07, 0x00, 0x38, 0x00, 0x38, 0x00, + 0x07, 0x18, 0x60, 0x07, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x18, 0x0e, 0x3b, 0x00, + 0x30, 0x00, 0x06, 0x00, 0x30, 0x00, 0x6c, 0x00, 0x06, 0x18, 0x60, 0x06, + 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, + 0x30, 0x00, 0x4c, 0x00, 0x06, 0x00, 0x00, 0x06, 0x18, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, + 0x18, 0x18, 0x00, 0x00, 0x00, 0x1e, 0x1e, 0x3e, 0x3c, 0x3e, 0x0c, 0x6e, + 0x36, 0x1c, 0x70, 0x66, 0x18, 0x37, 0x3b, 0x3e, 0x3b, 0x6e, 0x3b, 0x3e, + 0x3f, 0x33, 0x63, 0x63, 0x63, 0x63, 0x7f, 0x18, 0x18, 0x18, 0x00, 0x00, + 0x00, 0x30, 0x36, 0x63, 0x36, 0x63, 0x1e, 0x33, 0x6e, 0x18, 0x60, 0x36, + 0x18, 0x7f, 0x66, 0x63, 0x66, 0x33, 0x6e, 0x63, 0x0c, 0x33, 0x63, 0x63, + 0x36, 0x63, 0x33, 0x0e, 0x18, 0x70, 0x00, 0x00, 0x00, 0x3e, 0x66, 0x03, + 0x33, 0x7f, 0x0c, 0x33, 0x66, 0x18, 0x60, 0x1e, 0x18, 0x6b, 0x66, 0x63, + 0x66, 0x33, 0x66, 0x06, 0x0c, 0x33, 0x63, 0x6b, 0x1c, 0x63, 0x18, 0x18, + 0x18, 0x18, 0x00, 0x00, 0x00, 0x33, 0x66, 0x03, 0x33, 0x03, 0x0c, 0x33, + 0x66, 0x18, 0x60, 0x1e, 0x18, 0x6b, 0x66, 0x63, 0x66, 0x33, 0x06, 0x1c, + 0x0c, 0x33, 0x63, 0x6b, 0x1c, 0x63, 0x0c, 0x18, 0x18, 0x18, 0x00, 0x00, + 0x00, 0x33, 0x66, 0x03, 0x33, 0x03, 0x0c, 0x33, 0x66, 0x18, 0x60, 0x36, + 0x18, 0x6b, 0x66, 0x63, 0x66, 0x33, 0x06, 0x30, 0x0c, 0x33, 0x63, 0x6b, + 0x1c, 0x63, 0x06, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x33, 0x66, 0x63, + 0x33, 0x63, 0x0c, 0x33, 0x66, 0x18, 0x60, 0x66, 0x18, 0x6b, 0x66, 0x63, + 0x66, 0x33, 0x06, 0x63, 0x6c, 0x33, 0x36, 0x7f, 0x36, 0x63, 0x63, 0x18, + 0x18, 0x18, 0x00, 0x00, 0x00, 0x6e, 0x3e, 0x3e, 0x6e, 0x3e, 0x1e, 0x3e, + 0x67, 0x3c, 0x60, 0x67, 0x3c, 0x63, 0x66, 0x3e, 0x3e, 0x3e, 0x0f, 0x3e, + 0x38, 0x6e, 0x1c, 0x36, 0x63, 0x7e, 0x7f, 0x70, 0x18, 0x0e, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x66, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x06, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x33, 0x00, 0x00, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x06, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, + 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x78, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; diff --git a/src/filter/measure/measure.h b/src/filter/measure/measure.h new file mode 100755 index 0000000..44dfa26 --- /dev/null +++ b/src/filter/measure/measure.h @@ -0,0 +1,398 @@ +/* +measure.c + +measures video pixel and profile values with averaging + +Version 0.1 jun 2010 + +Copyright (C) 2010 Marko Cebokli http://lea.hamradio.si/~s57uuu + + + 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. + +*/ + +//measurement functions for direct inclusion in pr0be.c, pr0file.c + +typedef struct //float pixel + { + float r; + float g; + float b; + float a; + } float_rgba; + +typedef struct //statistics + { + float avg; + float rms; + float min; + float max; + } stat; + +typedef struct //profile data and statistics + { + int n; //number of points used + float r[8192]; + float g[8192]; + float b[8192]; + float a[8192]; + float y[8192]; + float u[8192]; + float v[8192]; + stat sr; + stat sg; + stat sb; + stat sa; + stat sy; + stat su; + stat sv; + int xz,xk,yz,yk; //start and end point + } profdata; + +//----------------------------------------------------- +//luminance/luma statistics of a float_rgba pixel group +//color: +//0=use rec 601 +//1=use rec 709 +//w=width of image (stride) +//x,y=position of the center of the group in pixels +//sx,sy=size of the group in pixels +void meri_y(float_rgba *s, stat *yy, int color, int x, int y, int w, int sx, int sy) +{ +float wr,wg,wb,luma,nf; +int xp,yp; +float_rgba pix; +int i,j; + +switch (color) + { + case 0: //CCIR rec 601 + wr=0.299;wg=0.587;wb=0.114; + break; + case 1: //CCIR rec 709 + wr=0.2126;wg=0.7152;wb=0.0722; + break; + default: //unknown color model +// printf("Unknown color model %d\n",color); + break; + } + +yy->avg=0.0; yy->rms=0.0; yy->min=1.0E9; yy->max=-1.0E9; +for (i=0;i=w) xp=w-1; + if (yp<0) yp=0; //if (yp>=h) xp=h-1; + pix=s[yp*w+xp]; + luma=wr*pix.r+wg*pix.g+wb*pix.b; + if (lumamin) yy->min=luma; + if (luma>yy->max) yy->max=luma; + yy->avg=yy->avg+luma; + yy->rms=yy->rms+luma*luma; + } +nf=(float)(sx*sy); +yy->avg=yy->avg/nf; +yy->rms=sqrtf((yy->rms-nf*yy->avg*yy->avg)/nf); + +} + +//------------------------------------------------------- +//R,G,B statistics of a float_rgba pixel group +//w=width of image (stride) +//x,y=position of the center of the group in pixels +//sx,sy=size of the group in pixels +void meri_rgb(float_rgba *s, stat *r, stat *g, stat *b, int x, int y, int w, int sx, int sy) +{ +float nf; +int xp,yp; +float_rgba pix; +int i,j; + +r->avg=0.0; r->rms=0.0; r->min=1.0E9; r->max=-1.0E9; +g->avg=0.0; g->rms=0.0; g->min=1.0E9; g->max=-1.0E9; +b->avg=0.0; b->rms=0.0; b->min=1.0E9; b->max=-1.0E9; +for (i=0;i=w) xp=w-1; + if (yp<0) yp=0; //if (yp>=h) xp=h-1; + pix=s[yp*w+xp]; + + if (pix.rmin) r->min=pix.r; + if (pix.r>r->max) r->max=pix.r; + r->avg=r->avg+pix.r; + r->rms=r->rms+pix.r*pix.r; + + if (pix.gmin) g->min=pix.g; + if (pix.g>g->max) g->max=pix.g; + g->avg=g->avg+pix.g; + g->rms=g->rms+pix.g*pix.g; + + if (pix.bmin) b->min=pix.b; + if (pix.b>b->max) b->max=pix.b; + b->avg=b->avg+pix.b; + b->rms=b->rms+pix.b*pix.b; + } +nf=(float)(sx*sy); + +r->avg=r->avg/nf; +r->rms=sqrtf((r->rms-nf*r->avg*r->avg)/nf); + +g->avg=g->avg/nf; +g->rms=sqrtf((g->rms-nf*g->avg*g->avg)/nf); + +b->avg=b->avg/nf; +b->rms=sqrtf((b->rms-nf*b->avg*b->avg)/nf); + +} + +//-------------------------------------------------------- +//alpha channel statistics of a float_rgba pixel group +//w=width of image (stride) +//x,y=position of the center of the group in pixels +//sx,sy=size of the group in pixels +void meri_a(float_rgba *s, stat *a, int x, int y, int w, int sx, int sy) +{ +float nf; +int xp,yp; +float_rgba pix; +int i,j; + +a->avg=0.0; a->rms=0.0; a->min=1.0E9; a->max=-1.0E9; +for (i=0;i=w) xp=w-1; + if (yp<0) yp=0; //if (yp>=h) xp=h-1; + pix=s[yp*w+xp]; + + if (pix.amin) a->min=pix.a; + if (pix.a>a->max) a->max=pix.a; + a->avg=a->avg+pix.a; + a->rms=a->rms+pix.a*pix.a; + } +nf=(float)(sx*sy); + +a->avg=a->avg/nf; +a->rms=sqrtf((a->rms-nf*a->avg*a->avg)/nf); + +} + +//-------------------------------------------------------- +//R-Y, B-Y statistics of a float_rgba pixel group +//color: +//0=use rec 601 +//1=use rec 709 +//w=width of image (stride) +//x,y=position of the center of the group in pixels +//sx,sy=size of the group in pixels +void meri_uv(float_rgba *s, stat *u, stat *v, int color, int x, int y, int w, int sx, int sy) +{ +float wr,wg,wb,uu,vv,nf; +int xp,yp; +float_rgba pix; +int i,j; + +switch (color) + { + case 0: //CCIR rec 601 + wr=0.299;wg=0.587;wb=0.114; + break; + case 1: //CCIR rec 709 + wr=0.2126;wg=0.7152;wb=0.0722; + break; + default: //unknown color model +// printf("Unknown color model %d\n",color); + break; + } + +u->avg=0.0; u->rms=0.0; u->min=1.0E9; u->max=-1.0E9; +v->avg=0.0; v->rms=0.0; v->min=1.0E9; v->max=-1.0E9; +for (i=0;i=w) xp=w-1; + if (yp<0) yp=0; //if (yp>=h) xp=h-1; + pix=s[yp*w+xp]; + + //R-Y + uu=(1.0-wr)*pix.r-wg*pix.g-wb*pix.b; + if (uumin) u->min=uu; + if (uu>u->max) u->max=uu; + u->avg=u->avg+uu; + u->rms=u->rms+uu*uu; + + //B-Y + vv=(1.0-wb)*pix.b-wr*pix.r-wg*pix.g; + if (vvmin) v->min=vv; + if (vv>v->max) v->max=vv; + v->avg=v->avg+vv; + v->rms=v->rms+vv*vv; + } +nf=(float)(sx*sy); + +u->avg=u->avg/nf; +u->rms=sqrtf((u->rms-nf*u->avg*u->avg)/nf); + +v->avg=v->avg/nf; +v->rms=sqrtf((v->rms-nf*v->avg*v->avg)/nf); + +} + +//------------------------------------------------------------ +//statistics of a float_rgba pixel profile +//color: +//0=use rec 601 +//1=use rec 709 +//w,h=size of image +//xz,yy,xk,yk=end points of the profile line +//sir=width of profile in pixels (averaging) +void meriprof(float_rgba *s, int w, int h, int xz, int yz, int xk, int yk, int sir, profdata *p) +{ +int x,y,d,i; +float_rgba pix; + +d = abs(xk-xz)>abs(yk-yz) ? abs(xk-xz) : abs(yk-yz); +p->n=d; +for (i=0;i=0)&&(x=0)&&(yr[i]=pix.r; + p->g[i]=pix.g; + p->b[i]=pix.b; + p->a[i]=pix.a; + } + +} + +//----------------------------------------------------- +//c=0 rec 601 c=1 rec 709 +void prof_yuv(profdata *p, int color) +{ +int i; +float wr,wg,wb; + +switch (color) + { + case 0: //CCIR rec 601 + wr=0.299;wg=0.587;wb=0.114; + break; + case 1: //CCIR rec 709 + wr=0.2126;wg=0.7152;wb=0.0722; + break; + default: //unknown color model +// printf("Unknown color model %d\n",color); + break; + } + +for (i=0;in;i++) + { + p->y[i]=wr*p->r[i]+wg*p->g[i]+wb*p->b[i]; + p->u[i]=p->r[i]-p->y[i]; + p->v[i]=p->b[i]-p->y[i]; + } +} + +//--------------------------------------------------------- +//calculates AVG, RMS, MIN, MAX +//for r,g,b,a,y,u,v profiles +void prof_stat(profdata *p) +{ +int i; +float nf; + +p->sr.avg=0.0; p->sr.rms=0.0; p->sr.min=1.0E9; p->sr.max=-1.0E9; +p->sg.avg=0.0; p->sg.rms=0.0; p->sg.min=1.0E9; p->sg.max=-1.0E9; +p->sb.avg=0.0; p->sb.rms=0.0; p->sb.min=1.0E9; p->sb.max=-1.0E9; +p->sa.avg=0.0; p->sa.rms=0.0; p->sa.min=1.0E9; p->sa.max=-1.0E9; +p->sy.avg=0.0; p->sy.rms=0.0; p->sy.min=1.0E9; p->sy.max=-1.0E9; +p->su.avg=0.0; p->su.rms=0.0; p->su.min=1.0E9; p->su.max=-1.0E9; +p->sv.avg=0.0; p->sv.rms=0.0; p->sv.min=1.0E9; p->sv.max=-1.0E9; +for (i=0;in;i++) + { + if (p->r[i]sr.min) p->sr.min=p->r[i]; + if (p->r[i]>p->sr.max) p->sr.max=p->r[i]; + p->sr.avg=p->sr.avg+p->r[i]; + p->sr.rms=p->sr.rms+p->r[i]*p->r[i]; + + if (p->g[i]sg.min) p->sg.min=p->g[i]; + if (p->g[i]>p->sg.max) p->sg.max=p->g[i]; + p->sg.avg=p->sg.avg+p->g[i]; + p->sg.rms=p->sg.rms+p->g[i]*p->g[i]; + + if (p->b[i]sb.min) p->sb.min=p->b[i]; + if (p->b[i]>p->sb.max) p->sb.max=p->b[i]; + p->sb.avg=p->sb.avg+p->b[i]; + p->sb.rms=p->sb.rms+p->b[i]*p->b[i]; + + if (p->a[i]sa.min) p->sa.min=p->a[i]; + if (p->a[i]>p->sa.max) p->sa.max=p->a[i]; + p->sa.avg=p->sa.avg+p->a[i]; + p->sa.rms=p->sa.rms+p->a[i]*p->a[i]; + + if (p->y[i]sy.min) p->sy.min=p->y[i]; + if (p->y[i]>p->sy.max) p->sy.max=p->y[i]; + p->sy.avg=p->sy.avg+p->y[i]; + p->sy.rms=p->sy.rms+p->y[i]*p->y[i]; + + if (p->u[i]su.min) p->su.min=p->u[i]; + if (p->u[i]>p->su.max) p->su.max=p->u[i]; + p->su.avg=p->su.avg+p->u[i]; + p->su.rms=p->su.rms+p->u[i]*p->u[i]; + + if (p->v[i]sv.min) p->sv.min=p->v[i]; + if (p->v[i]>p->sv.max) p->sv.max=p->v[i]; + p->sv.avg=p->sv.avg+p->v[i]; + p->sv.rms=p->sv.rms+p->v[i]*p->v[i]; + } +nf=(float)(p->n); + +p->sr.avg=p->sr.avg/nf; +p->sr.rms=sqrtf((p->sr.rms-nf*p->sr.avg*p->sr.avg)/nf); + +p->sg.avg=p->sg.avg/nf; +p->sg.rms=sqrtf((p->sg.rms-nf*p->sg.avg*p->sg.avg)/nf); + +p->sb.avg=p->sb.avg/nf; +p->sb.rms=sqrtf((p->sb.rms-nf*p->sb.avg*p->sb.avg)/nf); + +p->sa.avg=p->sa.avg/nf; +p->sa.rms=sqrtf((p->sa.rms-nf*p->sa.avg*p->sa.avg)/nf); + +p->sy.avg=p->sy.avg/nf; +p->sy.rms=sqrtf((p->sy.rms-nf*p->sy.avg*p->sy.avg)/nf); + +p->su.avg=p->su.avg/nf; +p->su.rms=sqrtf((p->su.rms-nf*p->su.avg*p->su.avg)/nf); + +p->sv.avg=p->sv.avg/nf; +p->sv.rms=sqrtf((p->sv.rms-nf*p->sv.avg*p->sv.avg)/nf); + +} + diff --git a/src/filter/measure/pr0be.c b/src/filter/measure/pr0be.c new file mode 100644 index 0000000..d1b7743 --- /dev/null +++ b/src/filter/measure/pr0be.c @@ -0,0 +1,755 @@ +/* +pr0be.c + +This frei0r plugin measures pixels in video +Version 0.1 jun 2010 + +Copyright (C) 2010 Marko Cebokli http://lea.hamradio.si/~s57uuu + + + 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. + +*/ + +//compile: gcc -c -fPIC -Wall pr0be.c -o pr0be.o +//link: gcc -shared -o pr0be.so pr0be.o + +#include +#include +#include +#include +#include + +#include "font2.h" +#include "measure.h" + +double PI=3.14159265358979; + +//--------------------------------------------------------------- +void draw_rectangle(float_rgba *s, int w, int h, float x, float y, float wr, float hr, float_rgba c) +{ +int i,j; +int zx,kx,zy,ky; + +zx=x; if (zx<0) zx=0; +zy=y; if (zy<0) zy=0; +kx=x+wr; if (kx>w) kx=w; +ky=y+hr; if (ky>h) ky=h; +for (i=zy;iw) kx=w; +ky=y+hr; if (ky>h) ky=h; +for (i=zy;i127)) return; +if (x<0) return; +if ((x+8)>=w) return; +if (y<0) return; +if ((y+16)>=h)return; + +z=(c-32)%32+((c-32)/32)*512; + +for (i=0;i<16;i++) + for (j=0;j<8;j++) + if ((font2_bits[z+32*i]&(1<=10.0)&&(b<100.0)) ss=p1m1; + ss=p3m; + } + } +sprintf(s,"%s",ss); +} + +//------------------------------------------------------------- +//print avg,rms,min,max into a string +//u=units 0=0.0-1.0 1=0-255 +//m=sign 0=unsigned +//mm=1 print min/max +void izpis(char *str, char *lab, stat s, int u, int m, int mm) +{ +char fs[256],as[16],rs[16],ns[16],xs[16]; + +if (u==1) + { + s.avg=255.0*s.avg; + s.rms=255.0*s.rms; + s.min=255.0*s.min; + s.max=255.0*s.max; + } + +if (mm==1) + { + forstr(s.avg,1-u,m,as); + forstr(s.rms,1-u,0,rs); + forstr(s.min,1-u,m,ns); + forstr(s.max,1-u,m,xs); + sprintf(fs,"%s%s%s %s%s", lab, as, rs, ns, xs); + sprintf(str,fs,s.avg,s.rms,s.min,s.max); + } +else + { + forstr(s.avg,1-u,m,as); + forstr(s.rms,1-u,0,rs); + sprintf(fs,"%s%s%s", lab, as, rs); + sprintf(str,fs,s.avg,s.rms); + } +} + +//----------------------------------------------------------- +//probe size markers in the magnifier diaplay +void sxmarkers(float_rgba *s, int w, int h, int x0, int y0, int np, int sx, int sy, int vp) +{ +int np2,x,y,i,j; +float_rgba white={1.0,1.0,1.0,1.0}; + +np2=np/2+1; + +//top left +x=x0+(np2-sx/2)*vp-1; if (sx>np) x=x0; +y=y0+(np2-sy/2)*vp-1; if (sy>np) y=y0; +if (sx<=np) draw_rectangle(s, w, h, x, y, 1, vp, white); +if (sy<=np) draw_rectangle(s, w, h, x, y, vp, 1, white); +//top right +x=x0+(np2+sx/2+1)*vp-1; +y=y0+(np2-sy/2)*vp-1; if (sy>np) y=y0; +if (sx<=np) draw_rectangle(s, w, h, x, y, 1, vp, white); +x=x0+(np2+sx/2)*vp; +y=y0+(np2-sy/2)*vp-1; if (sx>np) x=x0+(np+1)*vp-1; +if (sy<=np) draw_rectangle(s, w, h, x, y, vp, 1, white); +//bottom left +x=x0+(np2-sx/2)*vp-1; +y=y0+(np2+sy/2)*vp; if (sy>np) y=y0+(np+1)*vp; +if (sx<=np) draw_rectangle(s, w, h, x, y, 1, vp, white); +x=x0+(np2-sx/2)*vp-1; if (sx>np) x=x0; +y=y0+(np2+sy/2+1)*vp-1; +if (sy<=np) draw_rectangle(s, w, h, x, y, vp, 1, white); +//bottom right +x=x0+(np2+sx/2)*vp+vp-1; +y=y0+(np2+sy/2)*vp; if (sy>np) y=y0+(np+1)*vp; +if (sx<=np) draw_rectangle(s, w, h, x, y, 1, vp, white); +x=x0+(np2+sx/2)*vp; +y=y0+(np2+sy/2+1)*vp-1; if (sx>np) x=x0+(np+1)*vp-1; +if (sy<=np) draw_rectangle(s, w, h, x, y, vp, 1, white); + +//"out of box" arrows +if (sx>np) + { + for (i=1;inp) + { + for (i=1;i7*w/12) *poz=0; //left +if (xw/2+30) *poz=0; //left +vp=9; //pixel size in magnifier +y0=h/20; +if (bw==1) //big window + { + vx=240; + vy = (m<=2) ? 320 : 300; + x0 = (*poz==0) ? h/20 : w-h/20-vx; + np=25; //size of magnifier + xn = (m<=2) ? x0+8 : x0+70; + yn=y0+(np+1)*vp+8; + } +else //small window + { + vx=152; + vy = (m<=2) ? 230 : 210; + x0 = (*poz==0) ? h/20 : w-h/20-vx; + np=15; //size of magnifier + xn = (m<=2) ? x0+15 : x0+25; + yn=y0+(np+1)*vp+8; + } +np2=np/2+1; +if (sha==1) vy=vy+20; + +//keep probe inside +if (x=(w-sx/2)) x=w-sx/2-1; +if (y=(h-sy/2)) y=h-sy/2-1; + +//info window background +darken_rectangle(s, w, h, x0, y0, vx, vy, 0.4); + +//magnifier background +draw_rectangle(s, w, h, x0+vp-1, y0+vp-1, np*vp+1, np*vp+1, black); +//sx,sy marks +sxmarkers(s, w, h, x0, y0, np, sx, sy, vp); +//magnifier pixels +for (i=0;i=0)&&(xp=0)&&(ypva) va=gg.avg; if (bb.avg>va) va=bb.avg; + li=rr.avg; + if (gg.avgva) va=gg.avg; if (bb.avg>va) va=bb.avg; + li=rr.avg; + if (gg.avg>8))*0.00392157; + sl[i].b=((float)((inframe[i] & 0x00FF0000)>>16))*0.00392157; + sl[i].a=((float)((inframe[i] & 0xFF000000)>>24))*0.00392157; + } +} + +//----------------------------------------------------- +//stretch [0...1] to parameter range [min...max] linear +float map_value_forward(double v, float min, float max) +{ +return min+(max-min)*v; +} + +//----------------------------------------------------- +//collapse from parameter range [min...max] to [0...1] linear +double map_value_backward(float v, float min, float max) +{ +return (v-min)/(max-min); +} + +//---------------------------------------- +//struktura za instanco efekta +typedef struct +{ +int h; +int w; + +int mer; +int x; +int y; +int sx; +int sy; +int un; +int sha; +int bw; + +int poz; +float_rgba *sl; +} inst; + +//*********************************************** +// OBVEZNE FREI0R FUNKCIJE + +//----------------------------------------------- +int f0r_init() +{ +return 1; +} + +//------------------------------------------------ +void f0r_deinit() +{ +} + +//----------------------------------------------- +void f0r_get_plugin_info(f0r_plugin_info_t* info) +{ + +info->name="pr0be"; +info->author="Marko Cebokli"; +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=8; +info->explanation="Measure video values"; +} + +//-------------------------------------------------- +void f0r_get_param_info(f0r_param_info_t* info, int param_index) +{ +switch(param_index) + { + case 0: + info->name = "Measurement"; + info->type = F0R_PARAM_DOUBLE; + info->explanation = "What measurement to display"; + break; + case 1: + info->name = "X"; + info->type = F0R_PARAM_DOUBLE; + info->explanation = "X position of probe"; + break; + case 2: + info->name = "Y"; + info->type = F0R_PARAM_DOUBLE; + info->explanation = "Y position of probe"; + break; + case 3: + info->name = "X size"; + info->type = F0R_PARAM_DOUBLE; + info->explanation = "X size of probe"; + break; + case 4: + info->name = "Y size"; + info->type = F0R_PARAM_DOUBLE; + info->explanation = "Y size of probe"; + break; + case 5: + info->name = "256 scale"; + info->type = F0R_PARAM_BOOL; + info->explanation = "use 0-255 instead of 0.0-1.0"; + break; + case 6: + info->name = "Show alpha"; + info->type = F0R_PARAM_BOOL; + info->explanation = "Display alpha value too"; + break; + case 7: + info->name = "Big window"; + info->type = F0R_PARAM_BOOL; + info->explanation = "Display more data"; + break; + } +} + +//---------------------------------------------- +f0r_instance_t f0r_construct(unsigned int width, unsigned int height) +{ +inst *in; + +in=calloc(1,sizeof(inst)); +in->w=width; +in->h=height; + +in->mer=0; +in->x=width/2; +in->y=height/2; +in->sx=3; +in->sy=3; +in->un=0; +in->sha=0; +in->bw=0; + +in->poz=0; +in->sl=(float_rgba*)calloc(width*height,sizeof(float_rgba)); + +return (f0r_instance_t)in; +} + +//--------------------------------------------------- +void f0r_destruct(f0r_instance_t instance) +{ +inst *in; + +in=(inst*)instance; + +free(in->sl); +free(instance); +} + +//----------------------------------------------------- +void f0r_set_param_value(f0r_instance_t instance, f0r_param_t parm, int param_index) +{ +inst *p; +double tmpf; +int tmpi,chg; +float l; + +p=(inst*)instance; + +chg=0; +switch(param_index) + { + case 0: + tmpi=map_value_forward(*((double*)parm), 0.0, 4.9999); + if (tmpi != p->mer) chg=1; + p->mer=tmpi; + break; + case 1: + tmpi=map_value_forward(*((double*)parm), 0.0, p->w); + if (tmpi != p->x) chg=1; + p->x=tmpi; + break; + case 2: + tmpi=map_value_forward(*((double*)parm), 0.0, p->h); + if (tmpi != p->y) chg=1; + p->y=tmpi; + break; + case 3: + tmpi=map_value_forward(*((double*)parm), 0.0, 12.0); + if (tmpi != p->sx) chg=1; + p->sx=tmpi; + break; + case 4: + tmpi=map_value_forward(*((double*)parm), 0.0, 12.0); + if (tmpi != p->sy) chg=1; + p->sy=tmpi; + break; + case 5: + tmpi=map_value_forward(*((double*)parm), 0.0, 1.0); //BOOL!! + if (p->un != tmpi) chg=1; + p->un=tmpi; + break; + case 6: + tmpi=map_value_forward(*((double*)parm), 0.0, 1.0); //BOOL!! + if (p->sha != tmpi) chg=1; + p->sha=tmpi; + break; + case 7: + tmpi=map_value_forward(*((double*)parm), 0.0, 1.0); //BOOL!! + if (p->bw != tmpi) chg=1; + p->bw=tmpi; + break; + } + +if (chg==0) return; + +} + +//-------------------------------------------------- +void f0r_get_param_value(f0r_instance_t instance, f0r_param_t param, int param_index) +{ +inst *p; +double tmpf; +int tmpi; + +p=(inst*)instance; + +switch(param_index) + { + case 0: + *((double*)param)=map_value_backward(p->mer, 0.0, 4.9999); + break; + case 1: + *((double*)param)=map_value_backward(p->x, 0.0, p->w); + break; + case 2: + *((double*)param)=map_value_backward(p->y, 0.0, p->h); + break; + case 3: + *((double*)param)=map_value_backward(p->sx, 0.0, 12.0); + break; + case 4: + *((double*)param)=map_value_backward(p->sy, 0.0, 12.0); + break; + case 5: + *((double*)param)=map_value_backward(p->un, 0.0, 1.0);//BOOL!! + break; + case 6: + *((double*)param)=map_value_backward(p->sha, 0.0, 1.0);//BOOL!! + break; + case 7: + *((double*)param)=map_value_backward(p->bw, 0.0, 1.0);//BOOL!! + break; + } +} + +//------------------------------------------------- +void f0r_update(f0r_instance_t instance, double time, const uint32_t* inframe, uint32_t* outframe) +{ +inst *in; +float l; +unsigned char lc; +int i; + +assert(instance); +in=(inst*)instance; + +color2floatrgba(inframe, in->sl, in->w , in->h); + +sonda(in->sl, in->w, in->h, in->x, in->y, 2*in->sx+1, 2*in->sy+1, &in->poz, in->mer, in->un, in->sha, in->bw); +crosshair(in->sl, in->w, in->h, in->x, in->y, 2*in->sx+1, 2*in->sy+1, 15); + +floatrgba2color(in->sl, outframe, in->w , in->h); +} + diff --git a/src/filter/measure/pr0file.c b/src/filter/measure/pr0file.c new file mode 100644 index 0000000..9016507 --- /dev/null +++ b/src/filter/measure/pr0file.c @@ -0,0 +1,1043 @@ +/* +pr0file.c + +This frei0r plugin ia an "2D video oscilloscope" +Version 0.1 jun 2010 + +Copyright (C) 2010 Marko Cebokli http://lea.hamradio.si/~s57uuu + + + 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. + +*/ + +//compile: gcc -c -fPIC -Wall pr0file.c -o pr0file.o +//link: gcc -shared -o pr0file.so pr0file.o + +#include + +#include +#include +#include +#include +#include + +#include "font2.h" +#include "measure.h" + +double PI=3.14159265358979; + +//--------------------------------------------------------------- +void draw_rectangle(float_rgba *s, int w, int h, float x, float y, float wr, float hr, float_rgba c) +{ +int i,j; +int zx,kx,zy,ky; + +zx=x; if (zx<0) zx=0; +zy=y; if (zy<0) zy=0; +kx=x+wr; if (kx>w) kx=w; +ky=y+hr; if (ky>h) ky=h; +for (i=zy;iw) kx=w; +ky=y+hr; if (ky>h) ky=h; +for (i=zy;i127)) return; +if (x<0) return; +if ((x+8)>=w) return; +if (y<0) return; +if ((y+16)>=h)return; + +z=(c-32)%32+((c-32)/32)*512; //position in font image + +for (i=0;i<16;i++) + for (j=0;j<8;j++) + if ((font2_bits[z+32*i]&(1<=10.0)&&(b<100.0)) ss=p1m1; + ss=p3m; + } + } +sprintf(s,"%s",ss); +} + +//------------------------------------------------------------- +//draws a simple line (no antialiasing) +//xz,yz=start point +//xk,yk=end point +void draw_line(float_rgba *s, int w, int h, int xz, int yz, int xk, int yk, float_rgba c) +{ +int x,y,d,i; + +d = (abs(xk-xz)>abs(yk-yz)) ? abs(xk-xz) : abs(yk-yz); +if (d==0) return; +for (i=0;i=0)&&(x=0)&&(y0.0) + { + xm=xz+dd*dx*m1; + ym=yz+dd*dy*m1; + draw_line(s, w, h, xm+s2*dy, ym-s2*dx, xm+s3*dy, ym-s3*dx, c); + draw_line(s, w, h, xm-s2*dy, ym+s2*dx, xm-s3*dy, ym+s3*dx, c); + } +if (m2>0.0) + { + xm=xz+dd*dx*m2; + ym=yz+dd*dy*m2; + draw_line(s, w, h, xm+s2*dy, ym-s2*dx, xm+s3*dy, ym-s3*dx, c); + draw_line(s, w, h, xm-s2*dy, ym+s2*dx, xm-s3*dy, ym+s3*dx, c); + } +} + +//-------------------------------------------------------- +//select one of 8 colors for the crosshair +float_rgba mcolor(int c) +{ +float_rgba wh={1.0,1.0,1.0,1.0}; +float_rgba ye={1.0,1.0,0.0,1.0}; +float_rgba cy={0.0,1.0,1.0,1.0}; +float_rgba gr={0.0,1.0,0.0,1.0}; +float_rgba mg={1.0,0.0,1.0,1.0}; +float_rgba rd={1.0,0.0,0.0,1.0}; +float_rgba bl={0.0,0.0,1.0,1.0}; +float_rgba bk={0.0,0.0,0.0,1.0}; + +switch (c) + { + case 0: return wh; //white + case 1: return ye; //yellow + case 2: return cy; //cyan + case 3: return gr; //green + case 4: return mg; //magenta + case 5: return rd; //red + case 6: return bl; //blue + case 7: return bk; //black + default: return bk; //black + } +} + +//-------------------------------------------------------- +//graph p[], p[]+ofs should be between 0.0 and 1.0 +void draw_trace(float_rgba *s, int w, int h, int x0, int y0, int vx, int vy, float p[], int n, float ofs, float_rgba c) +{ +int i,x,y,xs,ys; + +if (n==0) return; +xs=x0; ys=y0+vy*(1.0-p[0]-ofs); +for (i=0;i=w) x=w-1; + y=y0+(vy-1)*(1.0-p[i]-ofs)+1; + if (y=(y0+vy)) y=y0+vy-1; if (y>=h) y=h-1; + draw_line(s, w, h, xs, ys, xs, y, c); + draw_line(s, w, h, xs, y, x, y, c); + xs=x; ys=y; + } +} + +//------------------------------------------------------------- +//numeric display below the "oscilloscope" +//m=which channel to display (one of seven) +//dit=what data to display (display items flags) +//m1,m2 marker positions as indexes into p.x arrays +//output is written into string *str +void izpis(profdata p, char *str, int m, int u, int m1, int m2, int dit) +{ +int i; +char fs[256],frs[16]; +float data[8]; + +for (i=0;i<8;i++) data[i]=0; + +switch (m>>24) //select channel (r,g,b....) & copy data + { + case 0: //display nothing + return; + case 1: //display R channel + data[0]=p.r[m1]; data[1]=p.r[m2]; data[2]=data[1]-data[0]; + data[3]=p.sr.avg; data[4]=p.sr.rms; data[5]=p.sr.min; + data[6]=p.sr.max; + break; + case 2: //display G channel + data[0]=p.g[m1]; data[1]=p.g[m2]; data[2]=data[1]-data[0]; + data[3]=p.sg.avg; data[4]=p.sg.rms; data[5]=p.sg.min; + data[6]=p.sg.max; + break; + case 3: //display B channel + data[0]=p.b[m1]; data[1]=p.b[m2]; data[2]=data[1]-data[0]; + data[3]=p.sb.avg; data[4]=p.sb.rms; data[5]=p.sb.min; + data[6]=p.sb.max; + break; + case 4: //display Y channel + data[0]=p.y[m1]; data[1]=p.y[m2]; data[2]=data[1]-data[0]; + data[3]=p.sy.avg; data[4]=p.sy.rms; data[5]=p.sy.min; + data[6]=p.sy.max; + break; + case 5: //display Pr channel + data[0]=p.u[m1]; data[1]=p.u[m2]; data[2]=data[1]-data[0]; + data[3]=p.su.avg; data[4]=p.su.rms; data[5]=p.su.min; + data[6]=p.su.max; + break; + case 6: //display Pb channel + data[0]=p.v[m1]; data[1]=p.v[m2]; data[2]=data[1]-data[0]; + data[3]=p.sv.avg; data[4]=p.sv.rms; data[5]=p.sv.min; + data[6]=p.sv.max; + break; + case 7: //display alpha channel + data[0]=p.a[m1]; data[1]=p.a[m2]; data[2]=data[1]-data[0]; + data[3]=p.sa.avg; data[4]=p.sa.rms; data[5]=p.sa.min; + data[6]=p.sa.max; + break; + default: + break; + } + +if (u!=0) for (i=0;i<8;i++) data[i]=data[i]*255.0; + +for (i=0;i<256;i++) {fs[i]=0; str[i]=0;} +if ((dit&0x00000001)!=0) //marker 1 value + { + if (m1>=0) + { + forstr(data[0],1-u,0,frs); + sprintf(fs,"%%s Mk1=%s", frs); + sprintf(str,fs,str,data[0]); + } + else + sprintf(str,"%s %s",str,"Mk1= -----"); + } +if ((dit&0x00000004)!=0) //marker 2 value + { + if (m2>=0) + { + forstr(data[1],1-u,0,frs); + sprintf(fs,"%%s Mk2=%s", frs); + sprintf(str,fs,str,data[1]); + } + else + sprintf(str,"%s %s",str,"Mk2= -----"); + } +if ((dit&0x00000010)!=0) //difference marker2-marker1 + { + if ((m2>=0)&&(m1>=0)) + { + forstr(data[2],1-u,0,frs); + sprintf(fs,"%%s D=%s", frs); + sprintf(str,fs,str,data[2]); + } + else + sprintf(str,"%s %s",str,"D= -----"); + } +if ((dit&0x00000020)!=0) //average of profile + { + forstr(data[3],1-u,0,frs); + sprintf(fs,"%%s Avg=%s", frs); + sprintf(str,fs,str,data[3]); + } +if ((dit&0x00000040)!=0) //RMS of profile + { + forstr(data[4],1-u,0,frs); + sprintf(fs,"%%s RMS=%s", frs); + sprintf(str,fs,str,data[4]); + } +if ((dit&0x00000080)!=0) //MIN of profile + { + forstr(data[5],1-u,0,frs); + sprintf(fs,"%%s Min=%s", frs); + sprintf(str,fs,str,data[5]); + } +if ((dit&0x00000100)!=0) //MAX of profile + { + forstr(data[6],1-u,0,frs); + sprintf(fs,"%%s Max=%s", frs); + sprintf(str,fs,str,data[6]); + } +} + +//-------------------------------------------------------------- +//draw info window +//sx,sy=size of probe (must be odd) +//poz=position of info window 0=left 1=right +//m=measurement channel, trace/numeric display +//u=units 0=0.0-1.0 1=0-255 +//as = auto scale +//m1,m2=marker positions +//dit=display items flags +//cc=crosshair color [0...7] +//cm=0 rec 601, cm=1 rec 709 +void prof(float_rgba *s, int w, int h, int *poz, int x, int y, float tilt, int len, int sir, int m, int u, int as, int m1, int m2, int dit, int cc, int cm, profdata *p) +{ +int x0,y0,vx,vy; +int xz,xk,yz,yk; //zacetna in koncna tocka +char string[256]; +int i,sl; +float_rgba white={1.0,1.0,1.0,1.0}; +float_rgba lgray={0.7,0.7,0.7,1.0}; +float_rgba gray={0.5,0.5,0.5,1.0}; +float_rgba dgray={0.3,0.3,0.3,1.0}; +float_rgba red={1.0,0.0,0.0,1.0}; +float_rgba dgreen={0.0,0.7,0.0,1.0}; +float_rgba lblue={0.3,0.3,1.0,1.0}; +float_rgba yellow={0.7,0.7,0.0,1.0}; +float_rgba pink={0.8,0.4,0.5,1.0}; +float_rgba magenta={0.8,0.0,0.8,1.0}; +float_rgba cyan={0.0,0.7,0.8,1.0}; + +//position and size of info window +if (yh/2+20) *poz=0; //top +x0=h/20; +vx=w*15/16; +vy = h*6/16; +y0 = (*poz==0) ? h/20 : h-h/20-vy; + +//end points of profile +xz=x-len/2.0*cosf(tilt); +xk=x+len/2.0*cosf(tilt); +yz=y-len/2.0*sinf(tilt); +yk=y+len/2.0*sinf(tilt); + +//measure +meriprof(s, w, h, xz, yz, xk, yk, sir, p); +prof_yuv(p,cm); +prof_stat(p); + +//draw crosshair +pmarker(s, w, h, xz, yz, xk, yk, sir, mcolor(cc), (float)m1/p->n, (float)m2/p->n); + +//info window background +darken_rectangle(s, w, h, x0, y0, vx, vy, 0.4); + +//draw scope +//background +//draw_rectangle(s, w, h, x0+50, y0+5, vx-55, vy-40, black); +//grid +yz=y0+6; yk=y0+vy-36; +for (i=0;i<9;i++) + { + xz=x0+49+(i+1)*(vx-55)/10; + draw_line(s, w, h, xz, yz, xz, yk, dgray); + } +xz=x0+50;xk=x0+vx-6; +for (i=0;i<3;i++) + { + yz=y0+5+(i+1)*(vy-40)/4; + draw_line(s, w, h, xz, yz, xk, yz, dgray); + } +//traces +if ((m&0x00000001)!=0) //R + draw_trace(s, w, h, x0+50, y0+5, vx-55, vy-40, p->r, p->n, 0.0, red); +if ((m&0x00000002)!=0) //G + draw_trace(s, w, h, x0+50, y0+5, vx-55, vy-40, p->g, p->n, 0.0, dgreen); +if ((m&0x00000004)!=0) //B + draw_trace(s, w, h, x0+50, y0+5, vx-55, vy-40, p->b, p->n, 0.0, lblue); +if ((m&0x00000008)!=0) //Y + draw_trace(s, w, h, x0+50, y0+5, vx-55, vy-40, p->y, p->n, 0.0, lgray); +if ((m&0x00000010)!=0) //Pr + draw_trace(s, w, h, x0+50, y0+5, vx-55, vy-40, p->u, p->n, 0.5, magenta); +if ((m&0x00000020)!=0) //Pb + draw_trace(s, w, h, x0+50, y0+5, vx-55, vy-40, p->v, p->n, 0.5, cyan); +if ((m&0x00000040)!=0) //alpha + draw_trace(s, w, h, x0+50, y0+5, vx-55, vy-40, p->a, p->n, 0.0, gray); +//markers +if ((m1>=0)&&(m1n)) + { + draw_line(s, w, h, x0+50+(m1+0.5)*(vx-55)/p->n, y0+5, x0+50+(m1+0.5)*(vx-55)/p->n, y0+vy-35, yellow); + } +if ((m2>=0)&&(m2n)) + { + draw_line(s, w, h, x0+50+(m2+0.5)*(vx-55)/p->n, y0+5, x0+50+(m2+0.5)*(vx-55)/p->n, y0+vy-35, pink); + } +//frame +draw_line(s, w, h, x0+49, y0+5, x0+vx-5, y0+5, gray); +draw_line(s, w, h, x0+49, y0+vy-35, x0+vx-5, y0+vy-35, gray); +draw_line(s, w, h, x0+49, y0+5, x0+49, y0+vy-35, gray); +draw_line(s, w, h, x0+vx-5, y0+5, x0+vx-5, y0+vy-35, gray); + +//numeric display +izpis(*p,string,m,u,m1,m2,dit); +sl=strlen(string); +if (sl>((vx-55)/8)) + { + sprintf(string,"<- NOT ENOUGH SPACE ->"); + draw_string(s, w, h, x0+vx/2-88, y0+vy-25, string, white); + return; + } +switch (m>>24) //which channel data under the scope + { + case 0: + break; + case 1: + draw_string(s, w, h, x0+20, y0+vy-25, "R", red); + draw_string(s, w, h, x0+60, y0+vy-25, string, red); + break; + case 2: + draw_string(s, w, h, x0+20, y0+vy-25, "G", dgreen); + draw_string(s, w, h, x0+60, y0+vy-25, string, dgreen); + break; + case 3: + draw_string(s, w, h, x0+20, y0+vy-25, "B", lblue); + draw_string(s, w, h, x0+60, y0+vy-25, string, lblue); + break; + case 4: + draw_string(s, w, h, x0+20, y0+vy-25, "Y", lgray); + draw_string(s, w, h, x0+60, y0+vy-25, string, lgray); + break; + case 5: + draw_string(s, w, h, x0+20, y0+vy-25, "Pr", magenta); + draw_string(s, w, h, x0+60, y0+vy-25, string, magenta); + break; + case 6: + draw_string(s, w, h, x0+20, y0+vy-25, "Pb", cyan); + draw_string(s, w, h, x0+60, y0+vy-25, string, cyan); + break; + case 7: + draw_string(s, w, h, x0+20, y0+vy-25, "a", gray); + draw_string(s, w, h, x0+60, y0+vy-25, string, gray); + break; + default: + break; + } + +} + +//----------------------------------------------------- +//converts the internal RGBA float image into +//Frei0r rgba8888 color +void floatrgba2color(float_rgba *sl, uint32_t* outframe, int w , int h) +{ +int i; +uint32_t p; + +for (i=0;i>8))*0.00392157; + sl[i].b=((float)((inframe[i] & 0x00FF0000)>>16))*0.00392157; + sl[i].a=((float)((inframe[i] & 0xFF000000)>>24))*0.00392157; + } +} + +//----------------------------------------------------- +//stretch [0...1] to parameter range [min...max] linear +float map_value_forward(double v, float min, float max) +{ +return min+(max-min)*v; +} + +//----------------------------------------------------- +//collapse from parameter range [min...max] to [0...1] linear +double map_value_backward(float v, float min, float max) +{ +return (v-min)/(max-min); +} + +//---------------------------------------- +//struktura za instanco efekta +typedef struct +{ +int h; +int w; + +int x; //horizontal position +int y; //vertical position +float tilt; //tilt of profile +int len; //length of profile +int chn; //channel for numeric display +int m1; //marker 1 position along profile +int m2; //marker 2 position along profile +int rt; //show r trace BOOL +int gt; //show g trace BOOL +int bt; //show b trace BOOL +int yt; //show Y' trace BOOL +int ut; //show Pr trace BOOL +int vt; //show Pb trace BOOL +int at; //show alpha trace BOOL +int davg; //display average BOOL +int drms; //display rms BOOL +int dmin; //display minimum BOOL +int dmax; //display maximum BOOL +int un; //0...255 units BOOL +int col; //color, rec 601 or rec 709 +int chc; //crosshair color [0...7] + +int poz; +int mer; //display channel + trace flags +int dit; //numeric display items flags + +float_rgba *sl; +profdata *p; + +} inst; + +//*********************************************** +// OBVEZNE FREI0R FUNKCIJE + +//----------------------------------------------- +int f0r_init() +{ +return 1; +} + +//------------------------------------------------ +void f0r_deinit() +{ +} + +//----------------------------------------------- +void f0r_get_plugin_info(f0r_plugin_info_t* info) +{ + +info->name="pr0file"; +info->author="Marko Cebokli"; +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=21; +info->explanation="2D video oscilloscope"; +} + +//-------------------------------------------------- +void f0r_get_param_info(f0r_param_info_t* info, int param_index) +{ + +switch(param_index) + { + case 0: + info->name = "X"; + info->type = F0R_PARAM_DOUBLE; + info->explanation = "X position of profile"; + break; + case 1: + info->name = "Y"; + info->type = F0R_PARAM_DOUBLE; + info->explanation = "Y position of profile"; + break; + case 2: + info->name = "Tilt"; + info->type = F0R_PARAM_DOUBLE; + info->explanation = "Tilt of profile"; + break; + case 3: + info->name = "Length"; + info->type = F0R_PARAM_DOUBLE; + info->explanation = "Length of profile"; + break; + case 4: + info->name = "Channel"; + info->type = F0R_PARAM_DOUBLE; + info->explanation = "Channel to numerically display"; + break; + case 5: + info->name = "Marker 1"; + info->type = F0R_PARAM_DOUBLE; + info->explanation = "Position of marker 1"; + break; + case 6: + info->name = "Marker 2"; + info->type = F0R_PARAM_DOUBLE; + info->explanation = "Position of marker 2"; + break; + case 7: + info->name = "R trace"; + info->type = F0R_PARAM_BOOL; + info->explanation = "Show R trace on scope"; + break; + case 8: + info->name = "G trace"; + info->type = F0R_PARAM_BOOL; + info->explanation = "Show G trace on scope"; + break; + case 9: + info->name = "B trace"; + info->type = F0R_PARAM_BOOL; + info->explanation = "Show B trace on scope"; + break; + case 10: + info->name = "Y trace"; + info->type = F0R_PARAM_BOOL; + info->explanation = "Show Y' trace on scope"; + break; + case 11: + info->name = "Pr trace"; + info->type = F0R_PARAM_BOOL; + info->explanation = "Show Pr trace on scope"; + break; + case 12: + info->name = "Pb trace"; + info->type = F0R_PARAM_BOOL; + info->explanation = "Show Pb trace on scope"; + break; + case 13: + info->name = "Alpha trace"; + info->type = F0R_PARAM_BOOL; + info->explanation = "Show Alpha trace on scope"; + break; + case 14: + info->name = "Display average"; + info->type = F0R_PARAM_BOOL; + info->explanation = "e"; + break; + case 15: + info->name = "Display RMS"; + info->type = F0R_PARAM_BOOL; + info->explanation = ""; + break; + case 16: + info->name = "Display minimum"; + info->type = F0R_PARAM_BOOL; + info->explanation = ""; + break; + case 17: + info->name = "Display maximum"; + info->type = F0R_PARAM_BOOL; + info->explanation = ""; + break; + case 18: + info->name = "256 scale"; + info->type = F0R_PARAM_BOOL; + info->explanation = "use 0-255 instead of 0.0-1.0"; + break; + case 19: + info->name = "Color"; + info->type = F0R_PARAM_DOUBLE; + info->explanation = "rec 601 or rec 709"; + break; + case 20: + info->name = "Crosshair color"; + info->type = F0R_PARAM_DOUBLE; + info->explanation = "Color of the profile marker"; + break; + } +} + +//---------------------------------------------- +f0r_instance_t f0r_construct(unsigned int width, unsigned int height) +{ +inst *in; + +in=calloc(1,sizeof(inst)); +in->w=width; +in->h=height; + +in->x=width/2; +in->y=height/2; +in->tilt=0.0; +in->len=3*width/4; +in->chn=3; +in->m1=-1; +in->m2=-1; +in->rt=1; +in->gt=1; +in->bt=1; +in->yt=0; +in->ut=0; +in->vt=0; +in->at=0; +in->davg=1; +in->drms=1; +in->dmin=0; +in->dmax=0; +in->un=0; +in->col=0; +in->chc=0; + +in->poz=1; +in->mer=(3<<24)+7; //Y display + R,G,B traces +in->dit=32+64; //avg+RMS + +in->sl=(float_rgba*)calloc(width*height,sizeof(float_rgba)); +in->p=(profdata*)calloc(1,sizeof(profdata)); + +in->p->n=5; + +return (f0r_instance_t)in; +} + +//--------------------------------------------------- +void f0r_destruct(f0r_instance_t instance) +{ +inst *in; + +in=(inst*)instance; + +free(in->sl); +free(in->p); +free(instance); +} + +//----------------------------------------------------- +void f0r_set_param_value(f0r_instance_t instance, f0r_param_t parm, int param_index) +{ +inst *p; +double tmpf; +int tmpi,chg; + +p=(inst*)instance; + +chg=0; +switch(param_index) + { + case 0: //X + tmpi=map_value_forward(*((double*)parm), 0.0, p->w); + if (tmpi != p->x) chg=1; + p->x=tmpi; + break; + case 1: //Y + tmpi=map_value_forward(*((double*)parm), 0.0, p->h); + if (tmpi != p->y) chg=1; + p->y=tmpi; + break; + case 2: //tilt + tmpf=map_value_forward(*((double*)parm), -PI/2.0, PI/2.0); + if (tmpf != p->tilt) chg=1; + p->tilt=tmpf; + break; + case 3: //length + tmpi=map_value_forward(*((double*)parm), 20.0, sqrtf(p->w*p->w+p->h*p->h)); + if (tmpi != p->len) chg=1; + p->len=tmpi; + break; + case 4: //channel + tmpi=map_value_forward(*((double*)parm), 1.0, 7.9999); + if (tmpi != p->chn) chg=1; + p->chn=tmpi; + break; + case 5: //marker 1 + tmpi=map_value_forward(*((double*)parm), -1.0, p->p->n); + if (tmpi != p->m1) chg=1; + p->m1=tmpi; + break; + case 6: //marker 2 + tmpi=map_value_forward(*((double*)parm), -1.0, p->p->n); + if (tmpi != p->m2) chg=1; + p->m2=tmpi; + break; + case 7: //R trace + tmpi=map_value_forward(*((double*)parm), 0.0, 1.0); //BOOL!! + if (p->rt != tmpi) chg=1; + p->rt=tmpi; + break; + case 8: //G trace + tmpi=map_value_forward(*((double*)parm), 0.0, 1.0); //BOOL!! + if (p->gt != tmpi) chg=1; + p->gt=tmpi; + break; + case 9: //B trace + tmpi=map_value_forward(*((double*)parm), 0.0, 1.0); //BOOL!! + if (p->bt != tmpi) chg=1; + p->bt=tmpi; + break; + case 10: //Y trace + tmpi=map_value_forward(*((double*)parm), 0.0, 1.0); //BOOL!! + if (p->yt != tmpi) chg=1; + p->yt=tmpi; + break; + case 11: //U trace + tmpi=map_value_forward(*((double*)parm), 0.0, 1.0); //BOOL!! + if (p->ut != tmpi) chg=1; + p->ut=tmpi; + break; + case 12: //V trace + tmpi=map_value_forward(*((double*)parm), 0.0, 1.0); //BOOL!! + if (p->vt != tmpi) chg=1; + p->vt=tmpi; + break; + case 13: //alpha trace + tmpi=map_value_forward(*((double*)parm), 0.0, 1.0); //BOOL!! + if (p->at != tmpi) chg=1; + p->at=tmpi; + break; + case 14: //display avg + tmpi=map_value_forward(*((double*)parm), 0.0, 1.0); //BOOL!! + if (p->davg != tmpi) chg=1; + p->davg=tmpi; + break; + case 15: //display RMS + tmpi=map_value_forward(*((double*)parm), 0.0, 1.0); //BOOL!! + if (p->drms != tmpi) chg=1; + p->drms=tmpi; + break; + case 16: //display min + tmpi=map_value_forward(*((double*)parm), 0.0, 1.0); //BOOL!! + if (p->dmin != tmpi) chg=1; + p->dmin=tmpi; + break; + case 17: //display max + tmpi=map_value_forward(*((double*)parm), 0.0, 1.0); //BOOL!! + if (p->dmax != tmpi) chg=1; + p->dmax=tmpi; + break; + case 18: //256 units + tmpi=map_value_forward(*((double*)parm), 0.0, 1.0); //BOOL!! + if (p->un != tmpi) chg=1; + p->un=tmpi; + break; + case 19: //color mode + tmpi=map_value_forward(*((double*)parm), 0.0, 1.9999); + if (p->col != tmpi) chg=1; + p->col=tmpi; + break; + case 20: //Crosshair color + tmpi=map_value_forward(*((double*)parm), 0.0, 7.9999); + if (p->chc != tmpi) chg=1; + p->chc=tmpi; + break; + } + +if (chg==0) return; + +p->mer=p->chn<<24; +p->mer=p->mer+p->rt; +p->mer=p->mer+2*p->gt; +p->mer=p->mer+4*p->bt; +p->mer=p->mer+8*p->yt; +p->mer=p->mer+16*p->ut; +p->mer=p->mer+32*p->vt; +p->mer=p->mer+64*p->at; + +p->dit=0; +if (p->m1>=0) p->dit=p->dit+1; +if (p->m2>=0) p->dit=p->dit+4; +if ((p->m1>=0)&&(p->m2>=0)) p->dit=p->dit+16; +p->dit=p->dit+32*p->davg; +p->dit=p->dit+64*p->drms; +p->dit=p->dit+128*p->dmin; +p->dit=p->dit+256*p->dmax; + +} + +//-------------------------------------------------- +void f0r_get_param_value(f0r_instance_t instance, f0r_param_t param, int param_index) +{ +inst *p; +double tmpf; +int tmpi; + +p=(inst*)instance; + +switch(param_index) + { + case 0: + *((double*)param)=map_value_backward(p->x, 0.0, p->w); + break; + case 1: + *((double*)param)=map_value_backward(p->y, 0.0, p->h); + break; + case 2: + *((double*)param)=map_value_backward(p->tilt, -PI/2.0, PI/2.0); + break; + case 3: + *((double*)param)=map_value_backward(p->len, 20.0, sqrtf(p->w*p->w+p->h*p->h)); + break; + case 4: + *((double*)param)=map_value_backward(p->chn, 0.0, 7.9999); + break; + case 5: + *((double*)param)=map_value_backward(p->m1, 0.0, p->p->n); + break; + case 6: + *((double*)param)=map_value_backward(p->m2, 0.0, p->p->n); + break; + case 7: + *((double*)param)=map_value_backward(p->rt, 0.0, 1.0);//BOOL!! + break; + case 8: + *((double*)param)=map_value_backward(p->gt, 0.0, 1.0);//BOOL!! + break; + case 9: + *((double*)param)=map_value_backward(p->bt, 0.0, 1.0);//BOOL!! + break; + case 10: + *((double*)param)=map_value_backward(p->yt, 0.0, 1.0);//BOOL!! + break; + case 11: + *((double*)param)=map_value_backward(p->ut, 0.0, 1.0);//BOOL!! + break; + case 12: + *((double*)param)=map_value_backward(p->vt, 0.0, 1.0);//BOOL!! + break; + case 13: + *((double*)param)=map_value_backward(p->at, 0.0, 1.0);//BOOL!! + break; + case 14: + *((double*)param)=map_value_backward(p->davg, 0.0, 1.0);//BOOL!! + break; + case 15: + *((double*)param)=map_value_backward(p->drms, 0.0, 1.0);//BOOL!! + break; + case 16: + *((double*)param)=map_value_backward(p->dmin, 0.0, 1.0);//BOOL!! + break; + case 17: + *((double*)param)=map_value_backward(p->dmax, 0.0, 1.0);//BOOL!! + break; + case 18: + *((double*)param)=map_value_backward(p->un, 0.0, 1.0);//BOOL!! + break; + case 19: + *((double*)param)=map_value_backward(p->col, 0.0, 1.9999); + break; + case 20: + *((double*)param)=map_value_backward(p->chc, 0.0, 7.9999); + break; + } +} + +//------------------------------------------------- +void f0r_update(f0r_instance_t instance, double time, const uint32_t* inframe, uint32_t* outframe) +{ +inst *in; +float l; +unsigned char lc; +int i; + +assert(instance); +in=(inst*)instance; + +color2floatrgba(inframe, in->sl, in->w , in->h); + +prof(in->sl, in->w, in->h, &in->poz, in->x, in->y, in->tilt, in->len, 1, in->mer, in->un, 0, in->m1, in->m2, in->dit, in->chc, in->col, in->p); + +floatrgba2color(in->sl, outframe, in->w , in->h); +} + diff --git a/src/filter/nervous/CMakeLists.txt b/src/filter/nervous/CMakeLists.txt new file mode 100644 index 0000000..7f61e1e --- /dev/null +++ b/src/filter/nervous/CMakeLists.txt @@ -0,0 +1,11 @@ +set (SOURCES nervous.cpp) +set (TARGET nervous) + +if (MSVC) + set (SOURCES ${SOURCES} ${FREI0R_DEF}) +endif (MSVC) + +add_library (${TARGET} MODULE ${SOURCES}) +set_target_properties (${TARGET} PROPERTIES PREFIX "") + +install (TARGETS ${TARGET} LIBRARY DESTINATION ${LIBDIR}) diff --git a/src/filter/nosync0r/CMakeLists.txt b/src/filter/nosync0r/CMakeLists.txt new file mode 100644 index 0000000..fe66cd7 --- /dev/null +++ b/src/filter/nosync0r/CMakeLists.txt @@ -0,0 +1,11 @@ +set (SOURCES nosync0r.cpp) +set (TARGET nosync0r) + +if (MSVC) + set (SOURCES ${SOURCES} ${FREI0R_DEF}) +endif (MSVC) + +add_library (${TARGET} MODULE ${SOURCES}) +set_target_properties (${TARGET} PROPERTIES PREFIX "") + +install (TARGETS ${TARGET} LIBRARY DESTINATION ${LIBDIR}) diff --git a/src/filter/nosync0r/nosync0r.cpp b/src/filter/nosync0r/nosync0r.cpp index b3e35e3..a2df846 100644 --- a/src/filter/nosync0r/nosync0r.cpp +++ b/src/filter/nosync0r/nosync0r.cpp @@ -8,6 +8,7 @@ public: nosync0r(unsigned int width, unsigned int height) { + hsync = 0.0; register_param(hsync,"HSync","the hsync offset"); } diff --git a/src/filter/perspective/CMakeLists.txt b/src/filter/perspective/CMakeLists.txt new file mode 100644 index 0000000..85df84a --- /dev/null +++ b/src/filter/perspective/CMakeLists.txt @@ -0,0 +1,12 @@ +set (SOURCES perspective.c) +set (TARGET perspective) + +if (MSVC) + set_source_files_properties (perspective.c PROPERTIES LANGUAGE CXX) + set (SOURCES ${SOURCES} ${FREI0R_DEF}) +endif (MSVC) + +add_library (${TARGET} MODULE ${SOURCES}) +set_target_properties (${TARGET} PROPERTIES PREFIX "") + +install (TARGETS ${TARGET} LIBRARY DESTINATION ${LIBDIR}) diff --git a/src/filter/perspective/perspective.c b/src/filter/perspective/perspective.c index 6dd2f8a..d84c39a 100644 --- a/src/filter/perspective/perspective.c +++ b/src/filter/perspective/perspective.c @@ -117,7 +117,7 @@ f0r_instance_t f0r_construct(unsigned int width, unsigned int height) { - perspective_instance_t* inst = calloc(1, sizeof(*inst)); + perspective_instance_t* inst = (perspective_instance_t*)calloc(1, sizeof(*inst)); inst->w = width; inst->h = height; inst->tl.x = 0.0; @@ -173,6 +173,13 @@ break; } } + +#if defined(_MSC_VER) +__inline const long lrint(double x){ + return (long)(x+0.5); +} +#endif + void f0r_update(f0r_instance_t instance, double time, const uint32_t* inframe, uint32_t* outframe) { diff --git a/src/filter/pixeliz0r/CMakeLists.txt b/src/filter/pixeliz0r/CMakeLists.txt new file mode 100644 index 0000000..c3a60c0 --- /dev/null +++ b/src/filter/pixeliz0r/CMakeLists.txt @@ -0,0 +1,12 @@ +set (SOURCES pixeliz0r.c) +set (TARGET pixeliz0r) + +if (MSVC) + set_source_files_properties (pixeliz0r.c PROPERTIES LANGUAGE CXX) + set (SOURCES ${SOURCES} ${FREI0R_DEF}) +endif (MSVC) + +add_library (${TARGET} MODULE ${SOURCES}) +set_target_properties (${TARGET} PROPERTIES PREFIX "") + +install (TARGETS ${TARGET} LIBRARY DESTINATION ${LIBDIR}) diff --git a/src/filter/pixeliz0r/pixeliz0r.c b/src/filter/pixeliz0r/pixeliz0r.c index beacc70..6baf91b 100644 --- a/src/filter/pixeliz0r/pixeliz0r.c +++ b/src/filter/pixeliz0r/pixeliz0r.c @@ -34,7 +34,7 @@ pixelizerInfo->name = "pixeliz0r"; pixelizerInfo->author = "Gephex crew"; pixelizerInfo->plugin_type = F0R_PLUGIN_TYPE_FILTER; - pixelizerInfo->color_model = F0R_COLOR_MODEL_BGRA8888; + pixelizerInfo->color_model = F0R_COLOR_MODEL_PACKED32; pixelizerInfo->frei0r_version = FREI0R_MAJOR_VERSION; pixelizerInfo->major_version = 1; pixelizerInfo->minor_version = 0; @@ -61,7 +61,7 @@ f0r_instance_t f0r_construct(unsigned int width, unsigned int height) { - pixelizer_instance_t* inst = calloc(1, sizeof(*inst)); + pixelizer_instance_t* inst = (pixelizer_instance_t*)calloc(1, sizeof(*inst)); inst->width = width; inst->height = height; inst->block_size_x = 8; inst->block_size_y = 8; return (f0r_instance_t)inst; diff --git a/src/filter/primaries/CMakeLists.txt b/src/filter/primaries/CMakeLists.txt new file mode 100644 index 0000000..5d16601 --- /dev/null +++ b/src/filter/primaries/CMakeLists.txt @@ -0,0 +1,11 @@ +set (SOURCES primaries.cpp) +set (TARGET primaries) + +if (MSVC) + set (SOURCES ${SOURCES} ${FREI0R_DEF}) +endif (MSVC) + +add_library (${TARGET} MODULE ${SOURCES}) +set_target_properties (${TARGET} PROPERTIES PREFIX "") + +install (TARGETS ${TARGET} LIBRARY DESTINATION ${LIBDIR}) diff --git a/src/filter/rgbparade/CMakeLists.txt b/src/filter/rgbparade/CMakeLists.txt new file mode 100644 index 0000000..597995b --- /dev/null +++ b/src/filter/rgbparade/CMakeLists.txt @@ -0,0 +1,16 @@ +set (SOURCES rgbparade.c rgbparade_image.h) +set (TARGET rgbparade) + +if (MSVC) + set_source_files_properties (rgbparade.c PROPERTIES LANGUAGE CXX) + set (SOURCES ${SOURCES} ${FREI0R_DEF}) +endif (MSVC) + +include_directories (${GAVL_INCLUDE_DIRS}) +link_directories (${GAVL_LIBRARY_DIRS}) +LINK_LIBRARIES(${GAVL_LIBRARIES}) + +add_library (${TARGET} MODULE ${SOURCES}) +set_target_properties (${TARGET} PROPERTIES PREFIX "") + +install (TARGETS ${TARGET} LIBRARY DESTINATION ${LIBDIR}) diff --git a/src/filter/rgbparade/rgbparade.c b/src/filter/rgbparade/rgbparade.c index 14178e3..66bde18 100644 --- a/src/filter/rgbparade/rgbparade.c +++ b/src/filter/rgbparade/rgbparade.c @@ -72,7 +72,7 @@ f0r_instance_t f0r_construct(unsigned int width, unsigned int height) { - rgbparade_t* inst = calloc(1, sizeof(*inst)); + rgbparade_t* inst = (rgbparade_t*)calloc(1, sizeof(*inst)); inst->w = width; inst->h = height; @@ -131,16 +131,22 @@ frame_src->planes[0] = (uint8_t *)rgbparade_image.pixel_data; frame_dst->planes[0] = (uint8_t *)inst->scala; + /* Pad the source image to make the stride a multiple of 16. */ + gavl_video_frame_t* padded = gavl_video_frame_create( &format_src ); + gavl_video_frame_copy( &format_src, padded, frame_src ); + 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_scale( video_scaler, padded, 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 ); + gavl_video_frame_null( padded ); + gavl_video_frame_destroy( padded ); options = gavl_video_scaler_get_options( inst->parade_scaler ); diff --git a/src/filter/saturat0r/CMakeLists.txt b/src/filter/saturat0r/CMakeLists.txt new file mode 100644 index 0000000..d03401d --- /dev/null +++ b/src/filter/saturat0r/CMakeLists.txt @@ -0,0 +1,12 @@ +set (SOURCES saturat0r.c) +set (TARGET saturat0r) + +if (MSVC) + set_source_files_properties (saturat0r.c PROPERTIES LANGUAGE CXX) + set (SOURCES ${SOURCES} ${FREI0R_DEF}) +endif (MSVC) + +add_library (${TARGET} MODULE ${SOURCES}) +set_target_properties (${TARGET} PROPERTIES PREFIX "") + +install (TARGETS ${TARGET} LIBRARY DESTINATION ${LIBDIR}) diff --git a/src/filter/saturat0r/saturat0r.c b/src/filter/saturat0r/saturat0r.c index b78d444..ec9dbce 100644 --- a/src/filter/saturat0r/saturat0r.c +++ b/src/filter/saturat0r/saturat0r.c @@ -67,7 +67,7 @@ f0r_instance_t f0r_construct(unsigned int width, unsigned int height) { - saturat0r_instance_t* inst = calloc(1, sizeof(*inst)); + saturat0r_instance_t* inst = (saturat0r_instance_t*)calloc(1, sizeof(*inst)); inst->width = width; inst->height = height; return (f0r_instance_t)inst; } diff --git a/src/filter/scale0tilt/CMakeLists.txt b/src/filter/scale0tilt/CMakeLists.txt new file mode 100644 index 0000000..71887dc --- /dev/null +++ b/src/filter/scale0tilt/CMakeLists.txt @@ -0,0 +1,16 @@ +set (SOURCES scale0tilt.c) +set (TARGET scale0tilt) + +if (MSVC) + set_source_files_properties (scale0tilt.c PROPERTIES LANGUAGE CXX) + set (SOURCES ${SOURCES} ${FREI0R_DEF}) +endif (MSVC) + +include_directories (${GAVL_INCLUDE_DIRS}) +link_directories (${GAVL_LIBRARY_DIRS}) +LINK_LIBRARIES(${GAVL_LIBRARIES}) + +add_library (${TARGET} MODULE ${SOURCES}) +set_target_properties (${TARGET} PROPERTIES PREFIX "") + +install (TARGETS ${TARGET} LIBRARY DESTINATION ${LIBDIR}) diff --git a/src/filter/scale0tilt/scale0tilt.c b/src/filter/scale0tilt/scale0tilt.c index 2877931..c053111 100644 --- a/src/filter/scale0tilt/scale0tilt.c +++ b/src/filter/scale0tilt/scale0tilt.c @@ -23,6 +23,8 @@ #include #include +#define EPSILON 1e-6 + typedef struct scale0tilt_instance { double cl, ct, cr, cb; double sx, sy; @@ -31,13 +33,15 @@ gavl_video_scaler_t* video_scaler; gavl_video_frame_t* frame_src; gavl_video_frame_t* frame_dst; + int do_scale; } scale0tilt_instance_t; void update_scaler( scale0tilt_instance_t* inst ) { float dst_x, dst_y, dst_w, dst_h; float src_x, src_y, src_w, src_h; - + + inst->do_scale = 1; src_x = inst->w * inst->cl; src_y = inst->h * inst->ct; src_w = inst->w * (1.0 - inst->cl - inst->cr ); @@ -47,6 +51,12 @@ dst_y = inst->h * inst->ct * inst->sy + inst->ty * inst->h; dst_w = inst->w * (1.0 - inst->cl - inst->cr) * inst->sx; dst_h = inst->h * (1.0 - inst->ct - inst->cb) * inst->sy; + + if((dst_w < EPSILON) || (dst_h < EPSILON) || + (src_w < EPSILON) || (src_h < EPSILON)) { + inst->do_scale = 0; + return; + } if ( dst_x + dst_w > inst->w ) { src_w = src_w * ( (inst->w-dst_x) / dst_w ); @@ -68,13 +78,20 @@ dst_h = dst_h + dst_y; dst_y = 0; } + + if((dst_w < EPSILON) || (dst_h < EPSILON) || + (src_w < EPSILON) || (src_h < EPSILON)) { + inst->do_scale = 0; + return; + } + gavl_video_options_t* options = gavl_video_scaler_get_options( inst->video_scaler ); gavl_video_format_t format_src; gavl_video_format_t format_dst; - memset(&format_src, 0, sizeof(format_src)); - memset(&format_dst, 0, sizeof(format_dst)); + memset(&format_src, 0, sizeof(format_src)); + memset(&format_dst, 0, sizeof(format_dst)); format_dst.frame_width = inst->w; format_dst.frame_height = inst->h; @@ -177,7 +194,7 @@ f0r_instance_t f0r_construct(unsigned int width, unsigned int height) { - scale0tilt_instance_t* inst = calloc(1, sizeof(*inst)); + scale0tilt_instance_t* inst = (scale0tilt_instance_t*)calloc(1, sizeof(*inst)); inst->w = width; inst->h = height; inst->sx = 1.0; @@ -274,6 +291,7 @@ for ( i = 0; i < len; i++ ) { outframe[i] = 0; } - gavl_video_scaler_scale( inst->video_scaler, inst->frame_src, inst->frame_dst ); -} - + if(inst->do_scale) + gavl_video_scaler_scale( inst->video_scaler, inst->frame_src, inst->frame_dst ); +} + diff --git a/src/filter/scanline0r/CMakeLists.txt b/src/filter/scanline0r/CMakeLists.txt new file mode 100644 index 0000000..9c7ed80 --- /dev/null +++ b/src/filter/scanline0r/CMakeLists.txt @@ -0,0 +1,11 @@ +set (SOURCES scanline0r.cpp) +set (TARGET scanline0r) + +if (MSVC) + set (SOURCES ${SOURCES} ${FREI0R_DEF}) +endif (MSVC) + +add_library (${TARGET} MODULE ${SOURCES}) +set_target_properties (${TARGET} PROPERTIES PREFIX "") + +install (TARGETS ${TARGET} LIBRARY DESTINATION ${LIBDIR}) diff --git a/src/filter/scanline0r/scanline0r.cpp b/src/filter/scanline0r/scanline0r.cpp index eaeade7..49b2fa8 100644 --- a/src/filter/scanline0r/scanline0r.cpp +++ b/src/filter/scanline0r/scanline0r.cpp @@ -12,7 +12,7 @@ virtual void update() { - for (unsigned int line=0; line != height; line+=4) + for (unsigned int line=0; line < height; line+=4) { std::copy(in+line*width,in+(line+1)*width,out+(line*width)); std::fill(out+(line+1)*width,out+(line+5)*width,0x00000000); diff --git a/src/filter/select0r/CMakeLists.txt b/src/filter/select0r/CMakeLists.txt new file mode 100644 index 0000000..f12e4ee --- /dev/null +++ b/src/filter/select0r/CMakeLists.txt @@ -0,0 +1,12 @@ +set (SOURCES select0r.c) +set (TARGET select0r) + +if (MSVC) + set_source_files_properties (select0r.c PROPERTIES LANGUAGE CXX) + set (SOURCES ${SOURCES} ${FREI0R_DEF}) +endif (MSVC) + +add_library (${TARGET} MODULE ${SOURCES}) +set_target_properties (${TARGET} PROPERTIES PREFIX "") + +install (TARGETS ${TARGET} LIBRARY DESTINATION ${LIBDIR}) diff --git a/src/filter/select0r/readme b/src/filter/select0r/readme new file mode 100755 index 0000000..15f1aab --- /dev/null +++ b/src/filter/select0r/readme @@ -0,0 +1,82 @@ +select0r + +This plugin selects a range of colors, and creates a corresponding +alpha channel. It is cascadable, allowing construction of complex +color selection subspaces. + + +Written by Marko Cebokli, aug 2010, and released under GNU GPL + + +RELEASE NOTES + +** aug 2010 +Version 0.1 +"pre-alpha" (throw it out and see what happens... :-) + + + +DESCRIPTION + +parameters: + +Color to select: +the color to select. This is the center point of the selected +color subspace. + +Invert selection: +When ON, the selected color will be transparent, as normally used +with keying. When OFF (default) the selected color will be opaque, +for exmaple for alpha controlled adjustment of that color only. + +Delta XXXX: +These three parameters determine the size of the color subspace +along each axis. Bigger value means bigger tolerance on that axis. +For example, setting a high I delta (in ABI and HCI), will allow +the selection of a specific color in both light and shadows, but +will also discard most of the high-bandwidth luma signal, making +the selection less spatially accurate. + +Selection subspace: +specifies in which of the three color spaces (RGB, ABI, HCI) the +delta controls will work. Both ABI and HCI are separated +luma/chroma. HCI is a cylindrical "Hue Chromacity Intensity" space, +and ABI is a cartesian version thereof. Both suffer from chroma +subsampling, and will give less sharp results than RGB. +NOTE1: chroma subsampling is not a fault of this plugin. Frei0r +plugins work in RGB 4:4:4. If you supply it with a truly 4:4:4 +video, it will produce perfectly sharp alpha from all three color +spaces. +NOTE2: HCI is slow, because it has to calculate atan2() and hypot() +for each pixel. +NOTE3: ABI is based on the alpha an beta coordinates, upon which +most of the Hxx type colorspaces are defined. +See http://en.wikipedia.org/wiki/HSL_and_HSV + +Subspace shape: +determines the shape of the color subspace. Options are: box, +ellipsoid or diamond. Box is the biggest of them (by volume) and +diamond the smallest. Imagine an octahedron inscribed inside an +ellipsoid, which is in turn inscribed in a box. The tips of the +diamond touch the ellipsoid, and the box, at the center of the +sides of the box. + +Edge mode: +has four options: "Hard", "Fat", "Normal" and "Skinny". +"Hard" means the alpha channel will be thresholded to two values only, +fully opaque and fully transparent. This is mainly useful for +keying. +The remaining options ("Fat", "Normal" and "Skinny") create a gradual +transition between transparent and opaque. Alpha will be a function of +the difference of color from the selected color, with cutoff at the +delta points.The fatter the choice, the more the selected areas are +filled towards the rim. This is useful with alpha controlled color +adjustment tools. + +Operation: +determines the way in which the alpha channel will be written. +The "min", "max", "add" and "subtract" options allow cascading +of select0r plugins (or combination with other alpha-writting +plugins). These options combine the current selection with the +pre-existing alpha of the source material. +This way complex selections can be built. diff --git a/src/filter/select0r/select0r.c b/src/filter/select0r/select0r.c new file mode 100755 index 0000000..67edc78 --- /dev/null +++ b/src/filter/select0r/select0r.c @@ -0,0 +1,933 @@ +/* +select0r.c + +This frei0r plugin makes a color based alpha selection +Version 0.1 jul 2010 + +Copyright (C) 2010 Marko Cebokli http://lea.hamradio.si/~s57uuu + + + 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. + +*/ + + +//compile: gcc -c -fPIC -Wall select0r.c -o select0r.o +//link: gcc -shared -o select0r.so select0r.o + +//#include +#include +#include +#include +#include + +typedef struct + { + float r; + float g; + float b; + float a; + } float_rgba; + +typedef struct + { + float x; + float y; + float z; + } triplet; + +double PI=3.14159265358979; + +//----------------------------------------------------------- +//inline functions for subspace metrics +//distance from center point for different shapes +//for cartesian and cylindric (wraparound hue) spaces +//cx,cy,cz: center of subspace +//dx,dy,dz: size of subspace +//dx, dy and dz must be inverse (1/x) values! (avoid division) +//x,y,z: point from which distance is determined +// returns square of distance +// r==1 is edge of subspace +//box shape +inline float dist_box(float cx, float cy, float cz, float dx, float dy, float dz, float x, float y, float z) +{ +float ax,ay,az,r; + +ax=fabsf(x-cx)*dx; +ay=fabsf(y-cy)*dy; +az=fabsf(z-cz)*dz; +r=ax; +if (ay>r) r=ay; +if (az>r) r=az; +r=r*r; +return r; +} +//ellipsoid shape +inline float dist_eli(float cx, float cy, float cz, float dx, float dy, float dz, float x, float y, float z) +{ +float ax,ay,az,r; + +ax=(x-cx)*dx; +ay=(y-cy)*dy; +az=(z-cz)*dz; +r=ax*ax+ay*ay+az*az; +return r; +} +//octahedron shape +inline float dist_oct(float cx, float cy, float cz, float dx, float dy, float dz, float x, float y, float z) +{ +float ax,ay,az,r; + +ax=fabsf(x-cx)*dx; +ay=fabsf(y-cy)*dy; +az=fabsf(z-cz)*dz; +r=ax+ay+az; +r=r*r; +return r; +} +//box shape, cylindrical space +inline float dist_box_c(float chue, float cy, float cz, float dhue, float dy, float dz, float hue, float y, float z) +{ +float ax,ay,az,r; + +ax=fabsf(hue-chue); +//if (ax>PI) ax=ax-PI; +if (ax>0.5) ax=ax-0.5; +ax=ax*dhue; +ay=fabsf(y-cy)*dy; +az=fabsf(z-cz)*dz; +r=ax; +if (ay>r) r=ay; +if (az>r) r=az; +r=r*r; +return r; +} +//ellipsoid shape, cylindrical space +inline float dist_eli_c(float chue, float cy, float cz, float dhue, float dy, float dz, float hue, float y, float z) +{ +float ax,ay,az,r; + +ax=(hue-chue); +//if (ax>PI) ax=ax-PI; +if (ax>0.5) ax=ax-0.5; +ax=ax*dhue; +ay=(y-cy)*dy; +az=(z-cz)*dz; +r=ax*ax+ay*ay+az*az; +return r; +} +//octahedron shape, cylindrical space +inline float dist_oct_c(float chue, float cy, float cz, float dhue, float dy, float dz, float hue, float y, float z) +{ +float ax,ay,az,r; + +ax=fabsf(hue-chue); +//if (ax>PI) ax=ax-PI; +if (ax>0.5) ax=ax-0.5; +ax=ax*dhue; +ay=fabsf(y-cy)*dy; +az=fabsf(z-cz)*dz; +r=ax+ay+az; +r=r*r; +return r; +} + +//---------------------------------------------------------- +//inline RGB to ABI conversion function +inline void rgb2abi(float k32, float r, float g, float b, float *a, float *bb, float *i) +{ +*a=r-0.5*g-0.5*b; +*bb=k32*(g-b); +*i=0.3333*(r+g+b); +} + +//---------------------------------------------------------- +//inline RGB to HCI conversion function +inline void rgb2hci(float ipi2, float k32, float r, float g, float b, float *h, float *c, float *i) +{ +float a,bb; +a=r-0.5*g-0.5*b; +bb=k32*(g-b); +*h=atan2(bb,a)*ipi2; +*c=hypotf(a,bb); +*i=0.3333*(r+g+b); +} + +//------------------------------------------------------ +//thresholding inline functions (hard and soft) +inline float thres(float a) +{ +return (a<1.0) ? 1.0 : 0.0; +} + +inline float fat(float a) +{ +a=a*a*a*a; +return (a<1.0) ? 1.0-a : 0.0; +} + +inline float norm(float a) +{ +a=a*a; +return (a<1.0) ? 1.0-a : 0.0; +} + +inline float skiny(float a) +{ +return (a<1.0) ? 1.0-a : 0.0; +} + +//---------------------------------------------------------- +//RGB selection +//d = deltas (size of subspace) +//n = nudges +//ss = subspace shape [0..2] box, ellipsoid, octahedron +//thr: 0=thresholded 1=linear fat 2=lin norm 3=lin skiny +//avoids switch () inside inner loop for speed - this means +//a big, repetitive switch statement outside.... +void sel_rgb(float_rgba *slika, int w, int h, float_rgba key, triplet d, triplet n, int ss, int thr) +{ +float kr,kg,kb,dd; +int i,s; +float ddx,ddy,ddz; + +//add nudge +kr=key.r+n.x; +kg=key.g+n.y; +kb=key.b+n.z; +ddx = (d.x!=0) ? 1.0/d.x : 1.0E6; +ddy = (d.y!=0) ? 1.0/d.y : 1.0E6; +ddz = (d.z!=0) ? 1.0/d.z : 1.0E6; + +s=10*ss+thr; //to avoid nested switch statements + +switch (s) + { + case 0: //box, thresholded + for (i=0;iname="select0r"; +info->author="Marko Cebokli"; +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=9; +info->explanation="Color based alpha selection"; +} + +//-------------------------------------------------- +void f0r_get_param_info(f0r_param_info_t* info, int param_index) +{ +switch(param_index) + { + case 0: + info->name = "Color to select"; + info->type = F0R_PARAM_COLOR; + info->explanation = ""; + break; + case 1: + info->name = "Invert selection"; + info->type = F0R_PARAM_BOOL; + info->explanation = ""; + break; + case 2: + info->name = "Delta R / A / Hue"; + info->type = F0R_PARAM_DOUBLE; + info->explanation = ""; + break; + case 3: + info->name = "Delta G / B / Chroma"; + info->type = F0R_PARAM_DOUBLE; + info->explanation = ""; + break; + case 4: + info->name = "Delta B / I / I"; + info->type = F0R_PARAM_DOUBLE; + info->explanation = ""; + break; + case 5: + info->name = "Selection subspace"; + info->type = F0R_PARAM_DOUBLE; + info->explanation = ""; + break; + case 6: + info->name = "Subspace shape"; + info->type = F0R_PARAM_DOUBLE; + info->explanation = ""; + break; + case 7: + info->name = "Edge mode"; + info->type = F0R_PARAM_DOUBLE; + info->explanation = ""; + break; + case 8: + info->name = "Operation"; + info->type = F0R_PARAM_DOUBLE; + info->explanation = ""; + break; + } +} + +//---------------------------------------------- +f0r_instance_t f0r_construct(unsigned int width, unsigned int height) +{ +inst *in; + +in=calloc(1,sizeof(inst)); + +in->w=width; +in->h=height; + +in->col.r=0.0; +in->col.g=0.8; +in->col.b=0.0; +in->subsp=0; +in->sshape=0; +in->del1=0.2; in->del2=0.2; in->del3=0.2; +in->nud1=0.0; in->nud2=0.0; in->nud3=0.0; +in->soft=0; +in->inv=0; +in->op=0; + +in->sl=(float_rgba*)calloc(in->w*in->h,sizeof(float_rgba)); + +return (f0r_instance_t)in; +} + +//--------------------------------------------------- +void f0r_destruct(f0r_instance_t instance) +{ +inst *in; + +in=(inst*)instance; + +free(in->sl); +free(instance); +} + +//----------------------------------------------------- +void f0r_set_param_value(f0r_instance_t instance, f0r_param_t parm, int param_index) +{ +inst *p; +double tmpf; +int tmpi,chg; +f0r_param_color_t tmpc; + +p=(inst*)instance; + +chg=0; +switch(param_index) + { + case 0: //color + tmpc=*(f0r_param_color_t*)parm; + if ((tmpc.r!=p->col.r) || (tmpc.g!=p->col.g) || (tmpc.b!=p->col.b)) + chg=1; + p->col=tmpc; + break; + case 1: //invert + tmpi=map_value_forward(*((double*)parm), 0.0, 1.0); //BOOL!! + if (p->inv != tmpi) chg=1; + p->inv=tmpi; + break; + case 2: //delta 1 + tmpf=*(double*)parm; + if (tmpf!=p->del1) chg=1; + p->del1=tmpf; + break; + case 3: //delta 2 + tmpf=*(double*)parm; + if (tmpf!=p->del2) chg=1; + p->del2=tmpf; + break; + case 4: //delta 3 + tmpf=*(double*)parm; + if (tmpf!=p->del3) chg=1; + p->del3=tmpf; + break; + case 5: //subspace + tmpi=map_value_forward(*((double*)parm), 0.0, 2.9999); + if (p->subsp != tmpi) chg=1; + p->subsp=tmpi; + break; + case 6: //shape + tmpi=map_value_forward(*((double*)parm), 0.0, 2.9999); + if (p->sshape != tmpi) chg=1; + p->sshape=tmpi; + break; + case 7: //edge mode + tmpi=map_value_forward(*((double*)parm), 0.0, 3.9999); + if (p->soft != tmpi) chg=1; + p->soft=tmpi; + break; + case 8: //operation + tmpi=map_value_forward(*((double*)parm), 0.0, 4.9999); + if (p->op != tmpi) chg=1; + p->op=tmpi; + break; + } + +if (chg==0) return; + +} + +//-------------------------------------------------- +void f0r_get_param_value(f0r_instance_t instance, f0r_param_t param, int param_index) +{ +inst *p; +double tmpf; +int tmpi; + +p=(inst*)instance; + +switch(param_index) + { + case 0: + *((f0r_param_color_t*)param)=p->col; + break; + case 1: + *((double*)param)=map_value_backward(p->inv, 0.0, 1.0);//BOOL!! + break; + case 2: + *((double*)param)=p->del1; + break; + case 3: + *((double*)param)=p->del2; + break; + case 4: + *((double*)param)=p->del3; + break; + case 5: + *((double*)param)=map_value_backward(p->subsp, 0.0, 2.9999); + break; + case 6: + *((double*)param)=map_value_backward(p->sshape, 0.0, 2.9999); + break; + case 7: + *((double*)param)=map_value_backward(p->soft, 0.0, 3.9999); + break; + case 8: + *((double*)param)=map_value_backward(p->op, 0.0, 4.9999); + break; + } +} + +//------------------------------------------------- +//RGBA8888 little endian +void f0r_update(f0r_instance_t instance, double time, const uint32_t* inframe, uint32_t* outframe) +{ +inst *in; +float_rgba key; +triplet d,n; +int i; +uint32_t a,t; + +assert(instance); +in=(inst*)instance; + +key.r=in->col.r; +key.g=in->col.g; +key.b=in->col.b; +key.a=1.0; +d.x=in->del1; +d.y=in->del2; +d.z=in->del3; +n.x=in->nud1; +n.y=in->nud2; +n.z=in->nud3; + +//convert to float +for (i=0;ih*in->w;i++) + { + in->sl[i].r=((float)(inframe[i]&0x000000FF))*0.00392157; + in->sl[i].g=((float)((inframe[i]&0x0000FF00)>>8))*0.00392157; + in->sl[i].b=((float)((inframe[i]&0x00FF0000)>>16))*0.00392157; + } + +//make the selection +switch (in->subsp) + { + case 0: + sel_rgb(in->sl, in->w, in->h, key, d, n, in->sshape, in->soft); + break; + case 1: + sel_abi(in->sl, in->w, in->h, key, d, n, in->sshape, in->soft); + break; + case 2: + sel_hci(in->sl, in->w, in->h, key, d, n, in->sshape, in->soft); + break; + default: + break; + } + +//invert selection if required +if (in->inv==1) + for (i=0;ih*in->w;i++) + in->sl[i].a = 1.0 - in->sl[i].a; + +//apply alpha +switch (in->op) + { + case 0: //write on clear + for (i=0;ih*in->w;i++) + { + a=((uint32_t)(in->sl[i].a*255.0))<<24; + outframe[i] = (inframe[i]&0x00FFFFFF) | a; + } + break; + case 1: //max + for (i=0;ih*in->w;i++) + { + a=((uint32_t)(in->sl[i].a*255.0))<<24; + t=((inframe[i]&0xFF000000)>a) ? inframe[i]&0xFF000000 : a; + outframe[i] = (inframe[i]&0x00FFFFFF) | t; + } + break; + case 2: //min + for (i=0;ih*in->w;i++) + { + a=((uint32_t)(in->sl[i].a*255.0))<<24; + t=((inframe[i]&0xFF000000)h*in->w;i++) + { + a=((uint32_t)(in->sl[i].a*255.0))<<24; + t=((inframe[i]&0xFF000000)>>1)+(a>>1); + t = (t>0x7F800000) ? 0xFF000000 : t<<1; + outframe[i] = (inframe[i]&0x00FFFFFF) | t; + } + break; + case 4: //subtract + for (i=0;ih*in->w;i++) + { + a=((uint32_t)(in->sl[i].a*255.0))<<24; + t= ((inframe[i]&0xFF000000)>a) ? (inframe[i]&0xFF000000)-a : 0; + outframe[i] = (inframe[i]&0x00FFFFFF) | t; + } + break; + default: + break; + } + +} + +//********************************************************** \ No newline at end of file diff --git a/src/filter/sharpness/CMakeLists.txt b/src/filter/sharpness/CMakeLists.txt new file mode 100644 index 0000000..3db05e4 --- /dev/null +++ b/src/filter/sharpness/CMakeLists.txt @@ -0,0 +1,12 @@ +set (SOURCES sharpness.c) +set (TARGET sharpness) + +if (MSVC) + set_source_files_properties (sharpness.c PROPERTIES LANGUAGE CXX) + set (SOURCES ${SOURCES} ${FREI0R_DEF}) +endif (MSVC) + +add_library (${TARGET} MODULE ${SOURCES}) +set_target_properties (${TARGET} PROPERTIES PREFIX "") + +install (TARGETS ${TARGET} LIBRARY DESTINATION ${LIBDIR}) diff --git a/src/filter/sharpness/sharpness.c b/src/filter/sharpness/sharpness.c new file mode 100755 index 0000000..9057633 --- /dev/null +++ b/src/filter/sharpness/sharpness.c @@ -0,0 +1,331 @@ +/* +sharpness.c + +This frei0r plugin is a port of Mplayer's unsharp mask filter +original by by Remi Guyomarch + +Version 0.1 jul 2010 + +Copyright (C) 2010 Marko Cebokli http://lea.hamradio.si/~s57uuu + + + 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. + +*/ + + +//compile: gcc -c -fPIC -Wall sharpness.c -o sharpness.o +//link: gcc -shared -o sharpness.so sharpness.o + +//#include +#include +#include +//#include +#include +#include + +#define MIN_MATRIX_SIZE 3 +#define MAX_MATRIX_SIZE 63 + +typedef struct FilterParam { + int msizeX, msizeY; + double amount; + uint32_t *SC[MAX_MATRIX_SIZE-1]; +} FilterParam; + + +//---------------------------------------- +//struktura za instanco efekta +typedef struct +{ +int h; +int w; + +FilterParam fp; +int size,ac; +unsigned char *Rplani,*Gplani,*Bplani,*Rplano,*Gplano,*Bplano; + +} inst; + + +//======================================================== +//unsharp() function from Mplayer unsharp filter +//by Remi Guyomarch + +/* This code is based on : + +An Efficient algorithm for Gaussian blur using finite-state machines +Frederick M. Waltz and John W. V. Miller + +SPIE Conf. on Machine Vision Systems for Inspection and Metrology VII +Originally published Boston, Nov 98 + +*/ + +void unsharp( uint8_t *dst, uint8_t *src, int dstStride, int srcStride, int width, int height, FilterParam *fp ) { + + uint32_t **SC = fp->SC; + uint32_t SR[MAX_MATRIX_SIZE-1], Tmp1, Tmp2; + uint8_t* src2 = src; // avoid gcc warning + + int32_t res; + int x, y, z; + int amount = fp->amount * 65536.0; + int stepsX = fp->msizeX/2; + int stepsY = fp->msizeY/2; + int scalebits = (stepsX+stepsY)*2; + int32_t halfscale = 1 << ((stepsX+stepsY)*2-1); + + if( !fp->amount ) { + if( src == dst ) + return; + if( dstStride == srcStride ) +// fast_memcpy( dst, src, srcStride*height ); + memcpy( dst, src, srcStride*height ); + else + for( y=0; y=width ? src2[width-1] : src2[x]; + for( z=0; z=stepsX && y>=stepsY ) { + uint8_t* srx = src - stepsY*srcStride + x - stepsX; + uint8_t* dsx = dst - stepsY*dstStride + x - stepsX; + + res = (int32_t)*srx + ( ( ( (int32_t)*srx - (int32_t)((Tmp1+halfscale) >> scalebits) ) * amount ) >> 16 ); + *dsx = res>255 ? 255 : res<0 ? 0 : (uint8_t)res; + } + } + if( y >= 0 ) { + dst += dstStride; + src += srcStride; + } + } +} + + + +//----------------------------------------------------- +//stretch [0...1] to parameter range [min...max] linear +float map_value_forward(double v, float min, float max) +{ +return min+(max-min)*v; +} + +//----------------------------------------------------- +//collapse from parameter range [min...max] to [0...1] linear +double map_value_backward(float v, float min, float max) +{ +return (v-min)/(max-min); +} + +//*********************************************** +// OBVEZNE FREI0R FUNKCIJE + +//----------------------------------------------- +int f0r_init() +{ +return 1; +} + +//------------------------------------------------ +void f0r_deinit() +{ +} + +//----------------------------------------------- +void f0r_get_plugin_info(f0r_plugin_info_t* info) +{ + +info->name="Sharpness"; +info->author="Marko Cebokli, Remi Guyomarch"; +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="Unsharp masking (port from Mplayer)"; +} + +//-------------------------------------------------- +void f0r_get_param_info(f0r_param_info_t* info, int param_index) +{ +switch(param_index) + { + case 0: + info->name = "Amount"; + info->type = F0R_PARAM_DOUBLE; + info->explanation = ""; + break; + case 1: + info->name = "Size"; + info->type = F0R_PARAM_DOUBLE; + info->explanation = ""; + break; + } +} + +//---------------------------------------------- +f0r_instance_t f0r_construct(unsigned int width, unsigned int height) +{ +inst *in; +int z; + +in=calloc(1,sizeof(inst)); +in->w=width; +in->h=height; + +in->Rplani=calloc(width*height,sizeof(unsigned char)); +in->Gplani=calloc(width*height,sizeof(unsigned char)); +in->Bplani=calloc(width*height,sizeof(unsigned char)); +in->Rplano=calloc(width*height,sizeof(unsigned char)); +in->Gplano=calloc(width*height,sizeof(unsigned char)); +in->Bplano=calloc(width*height,sizeof(unsigned char)); + +//defaults +in->fp.amount=0.0; +in->size=3; +in->fp.msizeX=3; +in->fp.msizeY=3; +in->ac=0; + +memset(in->fp.SC,0,sizeof(in->fp.SC)); +for( z=0; zfp.msizeY; z++ ) + in->fp.SC[z] = calloc(in->w+in->fp.msizeX , sizeof(*(in->fp.SC[z]))); + +return (f0r_instance_t)in; +} + +//--------------------------------------------------- +void f0r_destruct(f0r_instance_t instance) +{ +inst *in; + +in=(inst*)instance; + +free(in->Rplani); +free(in->Gplani); +free(in->Bplani); +free(in->Rplano); +free(in->Gplano); +free(in->Bplano); + +free(instance); +} + +//----------------------------------------------------- +void f0r_set_param_value(f0r_instance_t instance, f0r_param_t parm, int param_index) +{ +inst *p; +double tmpf; +int tmpi,chg,z; + +p=(inst*)instance; + +chg=0; +switch(param_index) + { + case 0: + tmpf=map_value_forward(*((double*)parm), -1.5, 3.5); + if (tmpf!=p->fp.amount) chg=1; + p->fp.amount=tmpf; + break; + case 1: + tmpi=map_value_forward(*((double*)parm), 3.0, 11.0); + if (p->size != tmpi) chg=1; + p->size=tmpi; + break; + } + +if (chg==0) return; + + +for( z=0; zfp.msizeY; z++ ) + free(p->fp.SC[z]); + +p->fp.msizeX=p->size; +p->fp.msizeY=p->size; + +memset(p->fp.SC,0,sizeof(p->fp.SC)); +for( z=0; zfp.msizeY; z++ ) + p->fp.SC[z] = calloc(p->w+p->fp.msizeX , sizeof(*(p->fp.SC[z]))); + +} + +//-------------------------------------------------- +void f0r_get_param_value(f0r_instance_t instance, f0r_param_t param, int param_index) +{ +inst *p; + +p=(inst*)instance; + +switch(param_index) + { + case 0: + *((double*)param)=map_value_backward(p->fp.amount, -1.5, 3.5); + break; + case 1: + *((double*)param)=map_value_backward(p->size, 3.0, 11.0); + break; + } +} + +//------------------------------------------------- +void f0r_update(f0r_instance_t instance, double time, const uint32_t* inframe, uint32_t* outframe) +{ +inst *in; +int i; + +assert(instance); +in=(inst*)instance; + +//Frei0r works with packed color, Mplayer with planar color +for (i=0;i<(in->w*in->h);i++) //copy to planar + { + in->Rplani[i]=inframe[i]&255; + in->Gplani[i]=(inframe[i]>>8)&255; + in->Bplani[i]=(inframe[i]>>16)&255; + } + +unsharp(in->Rplano, in->Rplani, in->w, in->w, in->w, in->h, &in->fp); +unsharp(in->Gplano, in->Gplani, in->w, in->w, in->w, in->h, &in->fp); +unsharp(in->Bplano, in->Bplani, in->w, in->w, in->w, in->h, &in->fp); + +for (i=0;i<(in->w*in->h);i++) //copy to packed, preserve alpha + { + outframe[i]=((uint32_t)in->Rplano[i])|((uint32_t)in->Gplano[i]<<8)|((uint32_t)in->Bplano[i]<<16)|(inframe[i]&0xFF000000); + } + + +} + diff --git a/src/filter/sobel/CMakeLists.txt b/src/filter/sobel/CMakeLists.txt new file mode 100644 index 0000000..757270e --- /dev/null +++ b/src/filter/sobel/CMakeLists.txt @@ -0,0 +1,11 @@ +set (SOURCES sobel.cpp) +set (TARGET sobel) + +if (MSVC) + set (SOURCES ${SOURCES} ${FREI0R_DEF}) +endif (MSVC) + +add_library (${TARGET} MODULE ${SOURCES}) +set_target_properties (${TARGET} PROPERTIES PREFIX "") + +install (TARGETS ${TARGET} LIBRARY DESTINATION ${LIBDIR}) diff --git a/src/filter/sopsat/CMakeLists.txt b/src/filter/sopsat/CMakeLists.txt new file mode 100644 index 0000000..7247520 --- /dev/null +++ b/src/filter/sopsat/CMakeLists.txt @@ -0,0 +1,12 @@ +set (SOURCES sopsat.cpp) +set (TARGET sopsat) + +if (MSVC) + set (SOURCES ${SOURCES} ${FREI0R_DEF}) +endif (MSVC) + +add_library (${TARGET} MODULE ${SOURCES}) + +set_target_properties (${TARGET} PROPERTIES PREFIX "") + +install (TARGETS ${TARGET} LIBRARY DESTINATION ${LIBDIR}) diff --git a/src/filter/sopsat/sopsat.cpp b/src/filter/sopsat/sopsat.cpp new file mode 100644 index 0000000..f23f067 --- /dev/null +++ b/src/filter/sopsat/sopsat.cpp @@ -0,0 +1,216 @@ +/* + * Copyright (C) 2010 Simon Andreas Eugster (simon.eu@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 +#include +#include "frei0r.hpp" +#include "frei0r_math.h" + +/** + This filter implements a standard way of color correction proposed by + the American Society of Cinematographers: The Color Decision List, also + known as the + + ASC CDL + + More information about the ASC CDL can be found on Wikipedia[1], and + the current revision of the specification, including example code, can + be obtained by sending a mail to asc-cdl at theasc dot com. (Really works.) + + The ASC CDL is a standard format for basic primary color correction (primary + meaning affecting the whole image and not only selected parts). Even big + editing systems use it :) This filter only obtains the values; Importing and + exporting to one of the possible ASC CDL exchange files must be done elsewhere. + + Basically there are two stages in the correction: + 1. SOP correction for each channel separately + 2. Overall saturation correction + All corrections work on [0,1], so the RGB(A) values need to be transposed + from {0,...,255} to [0,1]. + 1. SOP correction + * Slope: out = in * slope; 0 <= slope < \infty + * Offset: out = in + offset; -\infty < offset < \infty + * Power: out = in^power; 0 < power < \infty + 2. Saturation + * Luma: Y = 0.2126 R + 0.7152 G + 0.0722 B (according to Rec. 709) + * Forall channels: + out = luma + sat * (in-luma) + As the values may exceed 1 (or 0), they need to be clamped where necessary. + + + [1] http://en.wikipedia.org/wiki/Color_Decision_List + */ + +class SOPSat : public frei0r::filter +{ + +public: + + f0r_param_double rSlope; + f0r_param_double gSlope; + f0r_param_double bSlope; + f0r_param_double aSlope; + f0r_param_double rOffset; + f0r_param_double gOffset; + f0r_param_double bOffset; + f0r_param_double aOffset; + f0r_param_double rPower; + f0r_param_double gPower; + f0r_param_double bPower; + f0r_param_double aPower; + f0r_param_double saturation; + + SOPSat(unsigned int, unsigned int) + { + + register_param(rSlope, "rSlope", "Slope of the red color component"); + register_param(gSlope, "gSlope", "Slope of the green color component"); + register_param(bSlope, "bSlope", "Slope of the blue color component"); + register_param(aSlope, "aSlope", "Slope of the alpha component"); + register_param(rOffset, "rOffset", "Offset of the red color component"); + register_param(gOffset, "gOffset", "Offset of the green color component"); + register_param(bOffset, "bOffset", "Offset of the blue color component"); + register_param(aOffset, "aOffset", "Offset of the alpha component"); + register_param(rPower, "rPower", "Power (Gamma) of the red color component"); + register_param(gPower, "gPower", "Power (Gamma) of the green color component"); + register_param(bPower, "bPower", "Power (Gamma) of the blue color component"); + register_param(aPower, "aPower", "Power (Gamma) of the alpha component"); + register_param(saturation, "saturation", "Overall saturation"); + rSlope = 1; + gSlope = 1; + bSlope = 1; + aSlope = 1; + rOffset = 0; + gOffset = 0; + bOffset = 0; + aOffset = 0; + rPower = 1; + gPower = 1; + bPower = 1; + aPower = 1; + saturation = 200; + + // Pre-build the lookup table. + // For 1080p, rendering a 5-second video took + // * 37 s without the LUT + // * 7 s with the LUT + // * 5 s without any effect applied (plain rendering). + // So the LUT brings about 15x speedup. + m_lutR = (unsigned char *) malloc(256*sizeof(char)); + m_lutG = (unsigned char *) malloc(256*sizeof(char)); + m_lutB = (unsigned char *) malloc(256*sizeof(char)); + m_lutA = (unsigned char *) malloc(256*sizeof(char)); + updateLUT(); + + } + + ~SOPSat() + { + free(m_lutR); + free(m_lutG); + free(m_lutB); + free(m_lutA); + } + + virtual void update() + { + // Rebuild the lookup table in case the prarameters have changed. + updateLUT(); + + unsigned char *pixel = (unsigned char *) in; + unsigned char *dest = (unsigned char *) out; + + if (fabs(m_sat-1) < 0.001) { + // Calculating the saturation is expensive. So first check whether + // we really need to do it. + // Keeping the if/else outside of the loop gives a little speed gain. + // Worth the duplicate code, as only 4 lines so far :) + + for (unsigned int i = 0; i < size; i++) { + *dest++ = m_lutR[*pixel++]; + *dest++ = m_lutG[*pixel++]; + *dest++ = m_lutB[*pixel++]; + *dest++ = m_lutA[*pixel++]; + } + } else { + double luma; + for (unsigned int i = 0; i < size; i++) { + luma = 0.2126 * m_lutR[*(pixel+0)] + + 0.7152 * m_lutG[*(pixel+1)] + + 0.0722 * m_lutB[*(pixel+2)]; + *dest++ = CLAMP0255(luma + m_sat*(m_lutR[*pixel++]-luma)); + *dest++ = CLAMP0255(luma + m_sat*(m_lutG[*pixel++]-luma)); + *dest++ = CLAMP0255(luma + m_sat*(m_lutB[*pixel++]-luma)); + *dest++ = m_lutA[*pixel++]; + } + } + } + +private: + unsigned char *m_lutR; + unsigned char *m_lutG; + unsigned char *m_lutB; + unsigned char *m_lutA; + + double m_sat; + + void updateLUT() { + double rS = rSlope; + double gS = gSlope; + double bS = bSlope; + double aS = aSlope; + + double rO = rOffset; + double gO = gOffset; + double bO = bOffset; + double aO = aOffset; + + double rP = rPower; + double gP = gPower; + double bP = bPower; + double aP = aPower; + + m_sat = saturation; + + for (int i = 0; i < 256; i++) { + // above0 avoids overflows for negative numbers. + m_lutR[i] = CLAMP0255((int) (pow(above0((float)i/255 * rS + rO), rP)*255)); + m_lutG[i] = CLAMP0255((int) (pow(above0((float)i/255 * gS + gO), gP)*255)); + m_lutB[i] = CLAMP0255((int) (pow(above0((float)i/255 * bS + bO), bP)*255)); + m_lutA[i] = CLAMP0255((int) (pow(above0((float)i/255 * aS + aO), aP)*255)); + } + } + + double above0(double f) { + if (f < 0) { + return 0; + } else { + return f; + } + } + +}; + + + +frei0r::construct plugin("SOP/Sat", + "Slope/Offset/Power and Saturation color corrections according to the ASC CDL (Color Decision List)", + "Simon A. Eugster (Granjow)", + 0,1, + F0R_COLOR_MODEL_RGBA8888); diff --git a/src/filter/squareblur/CMakeLists.txt b/src/filter/squareblur/CMakeLists.txt new file mode 100644 index 0000000..30c33fd --- /dev/null +++ b/src/filter/squareblur/CMakeLists.txt @@ -0,0 +1,12 @@ +set (SOURCES squareblur.c) +set (TARGET squareblur) + +if (MSVC) + set_source_files_properties (squareblur.c PROPERTIES LANGUAGE CXX) + set (SOURCES ${SOURCES} ${FREI0R_DEF}) +endif (MSVC) + +add_library (${TARGET} MODULE ${SOURCES}) +set_target_properties (${TARGET} PROPERTIES PREFIX "") + +install (TARGETS ${TARGET} LIBRARY DESTINATION ${LIBDIR}) diff --git a/src/filter/squareblur/squareblur.c b/src/filter/squareblur/squareblur.c index ea57731..3ab98ff 100644 --- a/src/filter/squareblur/squareblur.c +++ b/src/filter/squareblur/squareblur.c @@ -160,7 +160,7 @@ f0r_instance_t f0r_construct(unsigned int width, unsigned int height) { - squareblur_instance_t* inst = calloc(1, sizeof(*inst)); + squareblur_instance_t* inst = (squareblur_instance_t*)calloc(1, sizeof(*inst)); unsigned int i; unsigned int acc_width, acc_height = height+1; uint32_t* iter_mem; diff --git a/src/filter/tehroxx0r/CMakeLists.txt b/src/filter/tehroxx0r/CMakeLists.txt new file mode 100644 index 0000000..e5bb4d0 --- /dev/null +++ b/src/filter/tehroxx0r/CMakeLists.txt @@ -0,0 +1,12 @@ +set (SOURCES tehRoxx0r.c) +set (TARGET tehRoxx0r) + +if (MSVC) + set_source_files_properties (tehRoxx0r.c PROPERTIES LANGUAGE CXX) + set (SOURCES ${SOURCES} ${FREI0R_DEF}) +endif (MSVC) + +add_library (${TARGET} MODULE ${SOURCES}) +set_target_properties (${TARGET} PROPERTIES PREFIX "") + +install (TARGETS ${TARGET} LIBRARY DESTINATION ${LIBDIR}) diff --git a/src/filter/tehroxx0r/tehRoxx0r.c b/src/filter/tehroxx0r/tehRoxx0r.c index b8cfd15..5aa3256 100644 --- a/src/filter/tehroxx0r/tehRoxx0r.c +++ b/src/filter/tehroxx0r/tehRoxx0r.c @@ -40,7 +40,7 @@ tehRoxx0rInfo->name = "TehRoxx0r"; tehRoxx0rInfo->author = "Coma"; tehRoxx0rInfo->plugin_type = F0R_PLUGIN_TYPE_FILTER; - tehRoxx0rInfo->color_model = F0R_COLOR_MODEL_BGRA8888; + tehRoxx0rInfo->color_model = F0R_COLOR_MODEL_PACKED32; tehRoxx0rInfo->frei0r_version = FREI0R_MAJOR_VERSION; tehRoxx0rInfo->major_version = 0; tehRoxx0rInfo->minor_version = 9; @@ -59,7 +59,7 @@ f0r_instance_t f0r_construct(unsigned int width, unsigned int height) { int blocksize; - tehRoxx0r_instance_t* inst = calloc(1, sizeof(*inst)); + tehRoxx0r_instance_t* inst = (tehRoxx0r_instance_t*)calloc(1, sizeof(*inst)); inst->width = width; inst->height = height; inst->change_speed = 0.01; diff --git a/src/filter/three_point_balance/CMakeLists.txt b/src/filter/three_point_balance/CMakeLists.txt new file mode 100644 index 0000000..7a3b35f --- /dev/null +++ b/src/filter/three_point_balance/CMakeLists.txt @@ -0,0 +1,17 @@ +# Set C99 flag for gcc +if (CMAKE_COMPILER_IS_GNUCC) + set(CMAKE_C_FLAGS "-std=c99") +endif (CMAKE_COMPILER_IS_GNUCC) + +set (SOURCES three_point_balance.c) +set (TARGET three_point_balance) + +if (MSVC) + set_source_files_properties (three_point_balance.c PROPERTIES LANGUAGE CXX) + set (SOURCES ${SOURCES} ${FREI0R_DEF}) +endif (MSVC) + +add_library (${TARGET} MODULE ${SOURCES}) +set_target_properties (${TARGET} PROPERTIES PREFIX "") + +install (TARGETS ${TARGET} LIBRARY DESTINATION ${LIBDIR}) diff --git a/src/filter/three_point_balance/three_point_balance.c b/src/filter/three_point_balance/three_point_balance.c index d0a8099..f847e31 100644 --- a/src/filter/three_point_balance/three_point_balance.c +++ b/src/filter/three_point_balance/three_point_balance.c @@ -92,7 +92,7 @@ f0r_instance_t f0r_construct(unsigned int width, unsigned int height) { - three_point_balance_instance_t* inst = calloc(1, sizeof(*inst)); + three_point_balance_instance_t* inst = (three_point_balance_instance_t*)calloc(1, sizeof(*inst)); inst->width = width; inst->height = height; inst->blackColor.r = 0; inst->blackColor.g = 0; @@ -191,7 +191,7 @@ } } //backward way: find solution from last to first - double *solution = calloc(size, sizeof(double)); + double *solution = (double*)calloc(size, sizeof(double)); for(int i = size - 1; i >= 0; i--) { solution[i] = A[i * extSize + size];// for(int j = size - 1; j > i; j--) { @@ -204,7 +204,7 @@ double* calcParabolaCoeffs(double* points) { - double *m = calloc(3 * 4, sizeof(double)); + double *m = (double*)calloc(3 * 4, sizeof(double)); for(int i = 0; i < 3; i++) { int offset = i * 2; m[i * 4] = points[offset] * points[offset]; diff --git a/src/filter/threelay0r/CMakeLists.txt b/src/filter/threelay0r/CMakeLists.txt new file mode 100644 index 0000000..8ce78ed --- /dev/null +++ b/src/filter/threelay0r/CMakeLists.txt @@ -0,0 +1,11 @@ +set (SOURCES threelay0r.cpp) +set (TARGET threelay0r) + +if (MSVC) + set (SOURCES ${SOURCES} ${FREI0R_DEF}) +endif (MSVC) + +add_library (${TARGET} MODULE ${SOURCES}) +set_target_properties (${TARGET} PROPERTIES PREFIX "") + +install (TARGETS ${TARGET} LIBRARY DESTINATION ${LIBDIR}) diff --git a/src/filter/threshold0r/CMakeLists.txt b/src/filter/threshold0r/CMakeLists.txt new file mode 100644 index 0000000..f5c480a --- /dev/null +++ b/src/filter/threshold0r/CMakeLists.txt @@ -0,0 +1,12 @@ +set (SOURCES threshold0r.c) +set (TARGET threshold0r) + +if (MSVC) + set_source_files_properties (threshold0r.c PROPERTIES LANGUAGE CXX) + set (SOURCES ${SOURCES} ${FREI0R_DEF}) +endif (MSVC) + +add_library (${TARGET} MODULE ${SOURCES}) +set_target_properties (${TARGET} PROPERTIES PREFIX "") + +install (TARGETS ${TARGET} LIBRARY DESTINATION ${LIBDIR}) diff --git a/src/filter/threshold0r/threshold0r.c b/src/filter/threshold0r/threshold0r.c index 3a23aa7..8b280f3 100644 --- a/src/filter/threshold0r/threshold0r.c +++ b/src/filter/threshold0r/threshold0r.c @@ -85,7 +85,7 @@ f0r_instance_t f0r_construct(unsigned int width, unsigned int height) { - threshold0r_instance_t* inst = calloc(1, sizeof(*inst)); + threshold0r_instance_t* inst = (threshold0r_instance_t*)calloc(1, sizeof(*inst)); inst->width = width; inst->height = height; /* init look-up-table */ update_lut(inst); diff --git a/src/filter/tint0r/CMakeLists.txt b/src/filter/tint0r/CMakeLists.txt new file mode 100644 index 0000000..2ea47bf --- /dev/null +++ b/src/filter/tint0r/CMakeLists.txt @@ -0,0 +1,12 @@ +set (SOURCES tint0r.c) +set (TARGET tint0r) + +if (MSVC) + set_source_files_properties (tint0r.c PROPERTIES LANGUAGE CXX) + set (SOURCES ${SOURCES} ${FREI0R_DEF}) +endif (MSVC) + +add_library (${TARGET} MODULE ${SOURCES}) +set_target_properties (${TARGET} PROPERTIES PREFIX "") + +install (TARGETS ${TARGET} LIBRARY DESTINATION ${LIBDIR}) diff --git a/src/filter/tint0r/tint0r.c b/src/filter/tint0r/tint0r.c index 68e69b1..f3bbb15 100644 --- a/src/filter/tint0r/tint0r.c +++ b/src/filter/tint0r/tint0r.c @@ -77,7 +77,7 @@ f0r_instance_t f0r_construct(unsigned int width, unsigned int height) { - tint0r_instance_t* inst = calloc(1, sizeof(*inst)); + tint0r_instance_t* inst = (tint0r_instance_t*)calloc(1, sizeof(*inst)); inst->width = width; inst->height = height; inst->amount = .25; inst->whiteColor.r = .5; diff --git a/src/filter/transparency/CMakeLists.txt b/src/filter/transparency/CMakeLists.txt new file mode 100644 index 0000000..b65ab76 --- /dev/null +++ b/src/filter/transparency/CMakeLists.txt @@ -0,0 +1,12 @@ +set (SOURCES transparency.c) +set (TARGET transparency) + +if (MSVC) + set_source_files_properties (transparency.c PROPERTIES LANGUAGE CXX) + set (SOURCES ${SOURCES} ${FREI0R_DEF}) +endif (MSVC) + +add_library (${TARGET} MODULE ${SOURCES}) +set_target_properties (${TARGET} PROPERTIES PREFIX "") + +install (TARGETS ${TARGET} LIBRARY DESTINATION ${LIBDIR}) diff --git a/src/filter/transparency/transparency.c b/src/filter/transparency/transparency.c index b8c06cc..1da05d5 100644 --- a/src/filter/transparency/transparency.c +++ b/src/filter/transparency/transparency.c @@ -45,7 +45,7 @@ f0r_instance_t f0r_construct(unsigned int width, unsigned int height) { - transparency_instance_t* inst = calloc(1, sizeof(*inst)); + transparency_instance_t* inst = (transparency_instance_t*)calloc(1, sizeof(*inst)); inst->width = width; inst->height = height; inst->transparency = 0.0; return (f0r_instance_t)inst; diff --git a/src/filter/tutorial/CMakeLists.txt b/src/filter/tutorial/CMakeLists.txt new file mode 100644 index 0000000..f22e72c --- /dev/null +++ b/src/filter/tutorial/CMakeLists.txt @@ -0,0 +1,17 @@ +# Replace «tutorial» by the library name of your filter +# and add the filter directory in src/filter/CMakeLists.txt. +set (SOURCES tutorial.cpp) +set (TARGET tutorial) + +if (MSVC) + set (SOURCES ${SOURCES} ${FREI0R_DEF}) +endif (MSVC) + +add_library (${TARGET} MODULE ${SOURCES}) + +# No «lib» prefix (name.so instead of libname.so) +set_target_properties (${TARGET} PROPERTIES PREFIX "") + +# Do not install a tutorial effect ;) +# (Can be installed for testing though.) +#install (TARGETS ${TARGET} LIBRARY DESTINATION ${LIBDIR}) diff --git a/src/filter/tutorial/tutorial.cpp b/src/filter/tutorial/tutorial.cpp new file mode 100644 index 0000000..1356dee --- /dev/null +++ b/src/filter/tutorial/tutorial.cpp @@ -0,0 +1,177 @@ +/* + * Copyright (C) 2010-2011 Simon Andreas Eugster (simon.eu@gmail.com) + * This file is not a Frei0r plugin but a collection of ideas. + * + * 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" + +// Other includes used for the examples below. +// Can be removed on copy/paste. + +// Limits (min/max values) of various data types +#include +// For the CHAR_BIT constant +#include +// pow() and other mathematical functions +#include + +/** +This is a sample filter for easy copy/pasting. + +The CMakeLists.txt needs to be adjusted as well (both in this directory and in the parent directory). +Also, don't forget src/Makefile.am. +*/ + +class Tutorial : public frei0r::filter +{ + +public: + + Tutorial(unsigned int width, unsigned int height) + + { + // Everything here is example code and can be removed on copy/paste. + + + register_param(m_barSize, "barSize", "Size of the black bar"); + register_param(m_pointerMethod, "pointerMethod", "Pointer Method (internal)"); + m_barSize = 0.1; + + + + // Create the lookup table (see update()). Use std::vector instead of an array here, since: + // http://stackoverflow.com/questions/381621/using-arrays-or-stdvectors-in-c-whats-the-performance-gap + // Using std::numeric_limits just for fun here. + lookupTable = std::vector(std::numeric_limits::max()+1, 0); + std::cout << lookupTable.size() << " elements in the lookup table." << std::endl; + + // Calculate the entries in the lookup table. Applied on the R value in this example. + // If the R value of an input pixel is r, then the output R value will be mapped to lookupTable[r]. + // We'll use a calculation that looks expensive here. + float f, h; + int tempVal; + for (int i = 0; i < lookupTable.size(); i++) { + f = i / (float)std::numeric_limits::max(); // Normalize to [0,1] + h = f/5; + f = 2*f - 1; // Stretch to [-1,1] + f = pow(f, 2); // Parabola + f = f*.8 + h; // Modification to the parabola + + // Since we might get negative values above, directly putting f into an unsigned data type + // may lead to interesting effects. To avoid this, use a signed integer and clamp it to valid ranges. + tempVal = f * std::numeric_limits::max(); + if (tempVal < 0) { + tempVal = 0; + } + if (tempVal > std::numeric_limits::max()) { + tempVal = std::numeric_limits::max(); + } + lookupTable[i] = tempVal; + } + + + // This is a second lookup table for addition of two uint8 numbers. The result of {0,255}+{0,255} + // ranges in {0,511}. The usual way to clamp the values to the {0,255} range is to use if/else + // (if (k > 255) { k = 255; }), however using a lookup table is slightly faster: + // http://stackoverflow.com/questions/4783674/lookup-table-vs-if-else + additionTable = std::vector( 2*std::numeric_limits::max() + 1, 0 ); + for (int i = 0; i < 2*std::numeric_limits::max(); i++) { + if (i <= std::numeric_limits::max()) { + additionTable[i] = i; + } else { + additionTable[i] = std::numeric_limits::max(); + } + } + } + + ~Tutorial() + { + // Delete member variables if necessary. + } + + virtual void update() + { + // Just copy input to output. + // This is useful if ony few changes are made to the output. + // If the whole image is processed, this makes no sense! + std::copy(in, in + width*height, out); + + // Fill the given amount of the top part with black. + std::fill(&out[0], &out[(int) (m_barSize*width*height)], 0); + + // Performance is important! + // One way to improve the performance is to use a LOOKUP TABLE + // instead of doing the same calculation several times. For example, the + // SOP/Sat effect uses pow(), division, and multiplication for the Power parameter. + // Since this only depends on the R/G/B value and not on previous frames, the target value + // can be pre-computed; when applying the filter, only thing left to do is reading the value + // in the lookup table. + + // This parameter allows to do simple benchmarking: Rendering a video with uint8_t pointers and with uint32_t pointers. + // (Don't forget to substract the rendering time without this effect applied to avoid counting + // encoding and decoding as well!) + if (m_pointerMethod == 0) { + uint8_t *in_pointer = (uint8_t *) in; + uint8_t *out_pointer = (uint8_t *) out; + for (int x = 0; x < width; x++) { + for (int y = 0; y < height; y++) { + + // Apply the parabola to the R channel with a single lookup + *out_pointer++ = lookupTable[*in_pointer++]; + + // Add g+b and clamp with the second lookup table + *out_pointer = additionTable[*in_pointer + *(in_pointer+1)]; + *out_pointer++; *in_pointer++; + + // Copy the other channels + *out_pointer++ = *in_pointer++; + *out_pointer++ = *in_pointer++; + } + } + } else { + // This method takes only 80% of the time if only processing the R channel, + // and 90% of the time with additionally the G channel, + // compared to the above solution using uint8_t pointers. + for (int px = 0; px < width*height; px++) { + out[px] = + // Parabola to Red channel + lookupTable[(in[px] & 0xFF)] + // g+b to Green channel + | (additionTable[((in[px] & 0xFF00) >> CHAR_BIT) + ((in[px] & 0xFF0000) >> 2*CHAR_BIT)] << CHAR_BIT) + // copy blue and alpha + | (in[px] & 0xFFFF0000); + } + } + } + +private: + // The various f0r_params are adjustable parameters. + // This one determines the size of the black bar in this example. + f0r_param_double m_barSize; + f0r_param_bool m_pointerMethod; + std::vector lookupTable; + std::vector additionTable; + +}; + + + +frei0r::construct plugin("Tutorial filter", + "This is an example filter, kind of a quick howto showing how to add a frei0r filter.", + "Your Name", + 0,1, + F0R_COLOR_MODEL_RGBA8888); diff --git a/src/filter/twolay0r/CMakeLists.txt b/src/filter/twolay0r/CMakeLists.txt new file mode 100644 index 0000000..7effcbc --- /dev/null +++ b/src/filter/twolay0r/CMakeLists.txt @@ -0,0 +1,11 @@ +set (SOURCES twolay0r.cpp) +set (TARGET twolay0r) + +if (MSVC) + set (SOURCES ${SOURCES} ${FREI0R_DEF}) +endif (MSVC) + +add_library (${TARGET} MODULE ${SOURCES}) +set_target_properties (${TARGET} PROPERTIES PREFIX "") + +install (TARGETS ${TARGET} LIBRARY DESTINATION ${LIBDIR}) diff --git a/src/filter/vectorscope/CMakeLists.txt b/src/filter/vectorscope/CMakeLists.txt new file mode 100644 index 0000000..302566d --- /dev/null +++ b/src/filter/vectorscope/CMakeLists.txt @@ -0,0 +1,16 @@ +set (SOURCES vectorscope.c vectorscope_image.h) +set (TARGET vectorscope) + +if (MSVC) + set_source_files_properties (vectorscope.c PROPERTIES LANGUAGE CXX) + set (SOURCES ${SOURCES} ${FREI0R_DEF}) +endif (MSVC) + +include_directories (${GAVL_INCLUDE_DIRS}) +link_directories (${GAVL_LIBRARY_DIRS}) +LINK_LIBRARIES(${GAVL_LIBRARIES}) + +add_library (${TARGET} MODULE ${SOURCES}) +set_target_properties (${TARGET} PROPERTIES PREFIX "") + +install (TARGETS ${TARGET} LIBRARY DESTINATION ${LIBDIR}) diff --git a/src/filter/vectorscope/vectorscope.c b/src/filter/vectorscope/vectorscope.c index 6b37951..fd28313 100644 --- a/src/filter/vectorscope/vectorscope.c +++ b/src/filter/vectorscope/vectorscope.c @@ -34,12 +34,14 @@ #define OFFSET_B 16 #define OFFSET_A 24 -#define SCOPE_WIDTH 255 -#define SCOPE_HEIGHT 255 +#define SCOPE_WIDTH 256 +#define SCOPE_HEIGHT 256 /* c99 seems to be extra clever, and removes the definition of M_PI, * this adds it again */ +#ifndef M_PI #define M_PI 3.14159265358979323846 +#endif typedef struct { double Y, Cb, Cr; @@ -84,7 +86,7 @@ f0r_instance_t f0r_construct(unsigned int width, unsigned int height) { - vectorscope_instance_t* inst = calloc(1, sizeof(*inst)); + vectorscope_instance_t* inst = (vectorscope_instance_t*)calloc(1, sizeof(*inst)); inst->w = width; inst->h = height; if ( width == 0 || height == 0 ) { diff --git a/src/filter/vertigo/CMakeLists.txt b/src/filter/vertigo/CMakeLists.txt new file mode 100644 index 0000000..bc29ac9 --- /dev/null +++ b/src/filter/vertigo/CMakeLists.txt @@ -0,0 +1,12 @@ +set (SOURCES vertigo.c) +set (TARGET vertigo) + +if (MSVC) + set_source_files_properties (vertigo.c PROPERTIES LANGUAGE CXX) + set (SOURCES ${SOURCES} ${FREI0R_DEF}) +endif (MSVC) + +add_library (${TARGET} MODULE ${SOURCES}) +set_target_properties (${TARGET} PROPERTIES PREFIX "") + +install (TARGETS ${TARGET} LIBRARY DESTINATION ${LIBDIR}) diff --git a/src/filter/vertigo/vertigo.c b/src/filter/vertigo/vertigo.c index 36a6e2d..d7279e7 100644 --- a/src/filter/vertigo/vertigo.c +++ b/src/filter/vertigo/vertigo.c @@ -33,7 +33,6 @@ unsigned int width; unsigned int height; int x,y,xc,yc; - int mode; double phase_increment; double zoomrate; double tfactor; @@ -68,7 +67,7 @@ vertigoInfo->frei0r_version = FREI0R_MAJOR_VERSION; vertigoInfo->major_version = 1; vertigoInfo->minor_version = 0; - vertigoInfo->num_params = 3; + vertigoInfo->num_params = 2; vertigoInfo->explanation = "alpha blending with zoomed and rotated images"; } @@ -77,16 +76,11 @@ switch(param_index) { case 0: - info->name = "Mode"; - info->type = F0R_PARAM_DOUBLE; - info->explanation = "The effect mode"; - break; - case 1: info->name = "PhaseIncrement"; info->type = F0R_PARAM_DOUBLE; info->explanation = "Phase increment"; break; - case 2: + case 1: info->name = "Zoomrate"; info->type = F0R_PARAM_DOUBLE; info->explanation = "Zoomrate"; @@ -112,7 +106,6 @@ inst->alt_buffer = inst->buffer + inst->pixels; inst->phase = 0.0; - inst->mode = 3; inst->phase_increment = 0.02; inst->zoomrate = 1.01; @@ -145,14 +138,10 @@ switch(param_index) { case 0: - /* mode */ - inst->mode = *((double*)param); - break; - case 1: /* phase_increment */ inst->phase_increment = *((double*)param); break; - case 2: + case 1: /* zoomrate */ inst->zoomrate = *((double*)param); inst->tfactor = (inst->xc+inst->yc) * inst->zoomrate; @@ -169,14 +158,10 @@ switch(param_index) { case 0: - /* mode */ - *((double*)param) = (double) (inst->mode); - break; - case 1: /* phase_increment */ *((double*)param) = (double) (inst->phase_increment); break; - case 2: + case 1: /* zoomrate */ *((double*)param) = (double) (inst->zoomrate); break; @@ -255,7 +240,7 @@ if(i<0) i = 0; if(i>=inst->pixels) i = inst->pixels; v = inst->current_buffer[i] & 0xfcfcff; - v = (v * inst->mode) + ((*src++) & 0xfcfcff); + v = (v * 3) + ((*src++) & 0xfcfcff); *dst++ = (v>>2); *p++ = (v>>2); ox += inst->dx; diff --git a/src/filter/water/CMakeLists.txt b/src/filter/water/CMakeLists.txt new file mode 100644 index 0000000..eb417ec --- /dev/null +++ b/src/filter/water/CMakeLists.txt @@ -0,0 +1,11 @@ +set (SOURCES water.cpp) +set (TARGET water) + +if (MSVC) + set (SOURCES ${SOURCES} ${FREI0R_DEF}) +endif (MSVC) + +add_library (${TARGET} MODULE ${SOURCES}) +set_target_properties (${TARGET} PROPERTIES PREFIX "") + +install (TARGETS ${TARGET} LIBRARY DESTINATION ${LIBDIR}) diff --git a/src/filter/water/water.cpp b/src/filter/water/water.cpp index d548f1c..211c6f1 100644 --- a/src/filter/water/water.cpp +++ b/src/filter/water/water.cpp @@ -66,7 +66,6 @@ class Water: public frei0r::filter { public: - f0r_param_position splash; f0r_param_double physics; bool rain; bool distort; @@ -76,7 +75,7 @@ bool randomize_swirl; Water(unsigned int width, unsigned int height) { - register_param(splash, "splash", "make a big splash in the center"); + physics = 0.0; register_param(physics, "physics", "water density: from 1 to 4"); register_param(rain, "rain", "rain drops all over"); register_param(distort, "distort", "distort all surface like dropping a bucket to the floor"); @@ -136,6 +135,7 @@ } ~Water() { + delete geo; free(Height[0]); free(Height[1]); free(BkGdImagePre); diff --git a/src/generator/CMakeLists.txt b/src/generator/CMakeLists.txt new file mode 100644 index 0000000..0e3f8b9 --- /dev/null +++ b/src/generator/CMakeLists.txt @@ -0,0 +1,7 @@ +add_subdirectory (dem0scene) +add_subdirectory (ising0r) +add_subdirectory (lissajous0r) +add_subdirectory (nois0r) +add_subdirectory (onecol0r) +add_subdirectory (partik0l) +add_subdirectory (test_pat) diff --git a/src/generator/dem0scene/CMakeLists.txt b/src/generator/dem0scene/CMakeLists.txt new file mode 100644 index 0000000..c550f8d --- /dev/null +++ b/src/generator/dem0scene/CMakeLists.txt @@ -0,0 +1,11 @@ +set (SOURCES plasma.cpp) +set (TARGET plasma) + +if (MSVC) + set (SOURCES ${SOURCES} ${FREI0R_DEF}) +endif (MSVC) + +add_library (${TARGET} MODULE ${SOURCES}) +set_target_properties (${TARGET} PROPERTIES PREFIX "") + +install (TARGETS ${TARGET} LIBRARY DESTINATION ${LIBDIR}) diff --git a/src/generator/ising0r/CMakeLists.txt b/src/generator/ising0r/CMakeLists.txt new file mode 100644 index 0000000..0432ec8 --- /dev/null +++ b/src/generator/ising0r/CMakeLists.txt @@ -0,0 +1,12 @@ +set (SOURCES ising0r.c) +set (TARGET ising0r) + +if (MSVC) + set_source_files_properties (ising0r.c PROPERTIES LANGUAGE CXX) + set (SOURCES ${SOURCES} ${FREI0R_DEF}) +endif (MSVC) + +add_library (${TARGET} MODULE ${SOURCES}) +set_target_properties (${TARGET} PROPERTIES PREFIX "") + +install (TARGETS ${TARGET} LIBRARY DESTINATION ${LIBDIR}) diff --git a/src/generator/ising0r/ising0r.c b/src/generator/ising0r/ising0r.c index 36f5d66..927470a 100644 --- a/src/generator/ising0r/ising0r.c +++ b/src/generator/ising0r/ising0r.c @@ -22,6 +22,9 @@ #include #include #include +#if defined(_MSC_VER) +#define __STDC_LIMIT_MACROS +#endif /* _MSC_VER */ #include "frei0r.h" //------------------------------------------------------------------------- @@ -80,7 +83,7 @@ nois0rInfo->name = "Ising0r"; nois0rInfo->author = "Gephex crew"; nois0rInfo->plugin_type = F0R_PLUGIN_TYPE_SOURCE; - nois0rInfo->color_model = F0R_COLOR_MODEL_BGRA8888; + nois0rInfo->color_model = F0R_COLOR_MODEL_PACKED32; nois0rInfo->frei0r_version = FREI0R_MAJOR_VERSION; nois0rInfo->major_version = 0; nois0rInfo->minor_version = 9; @@ -109,7 +112,7 @@ f0r_instance_t f0r_construct(unsigned int width, unsigned int height) { - ising0r_instance_t* inst = calloc(1, sizeof(*inst)); + ising0r_instance_t* inst = (ising0r_instance_t*)calloc(1, sizeof(*inst)); inst->width = width; inst->height = height; diff --git a/src/generator/lissajous0r/CMakeLists.txt b/src/generator/lissajous0r/CMakeLists.txt new file mode 100644 index 0000000..6429a53 --- /dev/null +++ b/src/generator/lissajous0r/CMakeLists.txt @@ -0,0 +1,11 @@ +set (SOURCES lissajous0r.cpp) +set (TARGET lissajous0r) + +if (MSVC) + set (SOURCES ${SOURCES} ${FREI0R_DEF}) +endif (MSVC) + +add_library (${TARGET} MODULE ${SOURCES}) +set_target_properties (${TARGET} PROPERTIES PREFIX "") + +install (TARGETS ${TARGET} LIBRARY DESTINATION ${LIBDIR}) diff --git a/src/generator/nois0r/CMakeLists.txt b/src/generator/nois0r/CMakeLists.txt new file mode 100644 index 0000000..e6426a9 --- /dev/null +++ b/src/generator/nois0r/CMakeLists.txt @@ -0,0 +1,11 @@ +set (SOURCES nois0r.cpp) +set (TARGET nois0r) + +if (MSVC) + set (SOURCES ${SOURCES} ${FREI0R_DEF}) +endif (MSVC) + +add_library (${TARGET} MODULE ${SOURCES}) +set_target_properties (${TARGET} PROPERTIES PREFIX "") + +install (TARGETS ${TARGET} LIBRARY DESTINATION ${LIBDIR}) diff --git a/src/generator/onecol0r/CMakeLists.txt b/src/generator/onecol0r/CMakeLists.txt new file mode 100644 index 0000000..1f027d1 --- /dev/null +++ b/src/generator/onecol0r/CMakeLists.txt @@ -0,0 +1,11 @@ +set (SOURCES onecol0r.cpp) +set (TARGET onecol0r) + +if (MSVC) + set (SOURCES ${SOURCES} ${FREI0R_DEF}) +endif (MSVC) + +add_library (${TARGET} MODULE ${SOURCES}) +set_target_properties (${TARGET} PROPERTIES PREFIX "") + +install (TARGETS ${TARGET} LIBRARY DESTINATION ${LIBDIR}) diff --git a/src/generator/partik0l/CMakeLists.txt b/src/generator/partik0l/CMakeLists.txt new file mode 100644 index 0000000..262edc7 --- /dev/null +++ b/src/generator/partik0l/CMakeLists.txt @@ -0,0 +1,11 @@ +set (SOURCES partik0l.cpp) +set (TARGET partik0l) + +if (MSVC) + set (SOURCES ${SOURCES} ${FREI0R_DEF}) +endif (MSVC) + +add_library (${TARGET} MODULE ${SOURCES}) +set_target_properties (${TARGET} PROPERTIES PREFIX "") + +install (TARGETS ${TARGET} LIBRARY DESTINATION ${LIBDIR}) diff --git a/src/generator/partik0l/partik0l.cpp b/src/generator/partik0l/partik0l.cpp index 97045de..6dd5a8a 100644 --- a/src/generator/partik0l/partik0l.cpp +++ b/src/generator/partik0l/partik0l.cpp @@ -31,13 +31,13 @@ #include #include +#if defined(_MSC_VER) +#define _USE_MATH_DEFINES +#endif /* _MSC_VER */ #include #include #include - -#include - /* defines for blob size and roundness */ #define LIM 8 // 25 diff --git a/src/generator/test_pat/CMakeLists.txt b/src/generator/test_pat/CMakeLists.txt new file mode 100644 index 0000000..f0cf5e9 --- /dev/null +++ b/src/generator/test_pat/CMakeLists.txt @@ -0,0 +1,37 @@ +set (B_SOURCES test_pat_B.c) +set (C_SOURCES test_pat_C.c) +set (G_SOURCES test_pat_G.c) +set (I_SOURCES test_pat_I.c) +set (L_SOURCES test_pat_L.c) +set (R_SOURCES test_pat_R.c) + +if (MSVC) + set_source_files_properties (test_pat_B.c test_pat_C.c test_pat_G.c test_pat_I.c test_pat_L.c test_pat_R.c PROPERTIES LANGUAGE CXX) + set (B_SOURCES ${B_SOURCES} ${FREI0R_DEF}) + set (C_SOURCES ${C_SOURCES} ${FREI0R_DEF}) + set (G_SOURCES ${G_SOURCES} ${FREI0R_DEF}) + set (I_SOURCES ${I_SOURCES} ${FREI0R_DEF}) + set (L_SOURCES ${L_SOURCES} ${FREI0R_DEF}) + set (R_SOURCES ${R_SOURCES} ${FREI0R_DEF}) +endif (MSVC) + +add_library (test_pat_B MODULE ${B_SOURCES}) +add_library (test_pat_C MODULE ${C_SOURCES}) +add_library (test_pat_G MODULE ${G_SOURCES}) +add_library (test_pat_I MODULE ${I_SOURCES}) +add_library (test_pat_L MODULE ${L_SOURCES}) +add_library (test_pat_R MODULE ${R_SOURCES}) + +set_target_properties (test_pat_B PROPERTIES PREFIX "") +set_target_properties (test_pat_C PROPERTIES PREFIX "") +set_target_properties (test_pat_G PROPERTIES PREFIX "") +set_target_properties (test_pat_I PROPERTIES PREFIX "") +set_target_properties (test_pat_L PROPERTIES PREFIX "") +set_target_properties (test_pat_R PROPERTIES PREFIX "") + +install (TARGETS test_pat_B LIBRARY DESTINATION ${LIBDIR}) +install (TARGETS test_pat_C LIBRARY DESTINATION ${LIBDIR}) +install (TARGETS test_pat_G LIBRARY DESTINATION ${LIBDIR}) +install (TARGETS test_pat_I LIBRARY DESTINATION ${LIBDIR}) +install (TARGETS test_pat_L LIBRARY DESTINATION ${LIBDIR}) +install (TARGETS test_pat_R LIBRARY DESTINATION ${LIBDIR}) diff --git a/src/generator/test_pat/README b/src/generator/test_pat/README new file mode 100644 index 0000000..2d41e93 --- /dev/null +++ b/src/generator/test_pat/README @@ -0,0 +1,387 @@ +test_pat_* + +This is a set of test pattern generating Frei0r plugins. Mostly, I just +gathered together a pile of C functions that I wrote over the years for +testing other image processing stuff, but some I wrote anew (like the +broadcast test card lookalikes). +They are useful for measuring the effects of image processing, for +display checking and adjustment, for reverse engineering of video +effects, for debugging during development of video software, etc... + + +Included are the following plugins: + +test_pat_B broadcast test card lookalikes +test_pat_C color space cross sections +test_pat_G geometry checking +test_pat_I spatial impulse and step response checking +test_pat_L levels and linearity checking +test_pat_M motion response checking (*) +test_pat_R resolution and spatial frequency response checking +test_pat_T time domain response checking (*) + +(*) not yet finished (heck, not even started working on them :-) + +Each one of these can generate several different patterns, many of them +adjustable through parameters. + + +Written by Marko Cebokli, jun 2010, and released under GNU GPL + + +RELEASE NOTES + +** jun 2010 +Version 0.1 +"pre-alpha" (throw it out and see what happens... :-) + + +INTRODUCTION + +First question that comes to mind is, "why bother with this?" +Would it not be simpler to just use PNG images and import them as +slides? +This is why: +- First, in that case you would need a separate PNG for each video +format - otherwise scaling would be done on import, introducing +scaling artefacts. Test_pat plugins draw algorithmically, adapting +the patterns to the chosen format. +- Second, many of these plugins accept parameters, to change the +features in the pattern, making them much more versatile than fixed +slides. +- Third, time domain and motion tests wouldn't be feasible at all +with slides. + + +PIXEL ASPECT RATIO + +Some of the plugins will attempt to draw exact circles and squares. +To do this, they need to know the pixel aspect ratio. Since this info +is not available directly to a Frei0r plugin, the user must set it +manually. Seven options are offered: square pixels, five standard video +pixel aspect ratios, and arbitrary manual adjustment. + + +COLOR FORMAT + +For maximum portability, these plugins internally generate the patterns +in floating point format, in the range [0...1], so most of the code is +independent of the final color model, endianness and number of bits. +The test_pat_G uses "char" with [0...255] range internally, since it +only needs a few levels. +Converting to the final format (in the case of Frei0r rgba8888) is +done last, and is confined to a few functions (in most cases a single +one), so adding other color models should be simple. + + +LEVELS AND COLOR ACCURACY + +On the output of these plugins, they should be as accurate as the +used color model allows - but note that the host application might +convert to a different model, enforce DV legality (rec 601 levels), or +chop the color gamut... + + +ARTEFACTS + +The patterns are drawn algorithmically and should not contain artefacts. +If you see any, they are probably caused because you are not viewing +at exact 1:1 pixel scale (the image was scaled before display). +Higher spatial frequencies can cause "moire" patterns, even when +below the Nyquist limit. This is a normal consequence of the fact, +that there is no anti-aliasing filter present between the monitor +and your eyes. + + +MEASUREMENT AND QUANTITATIVE ANALYSIS + +can be done by combining these generators with the "pr0be", +"pr0file" and other measurement plugins. + + +MULTIPLE CHOICE (list / enum) TYPE PARAMETERS + +Parameters of this type are not natively supported in the Frei0r +specification, therefore they must be somehow implemented using +a floating point argument. The Frei0r specification requires this +to be in the [0...1] range. These plugins conform to that by dividing +the [0...1] range into N subintervals (if there are N choices for this +parameter), each corresponding to one of the choices. +However, this is a bit clumsy for command line usage, so I have +also mapped the integers 0...(N-1) to the same parameter choices. +For example, if a parameter has five choices, 0.7 and 3 will both +mean the fourth choice. + + + + + ****** DESCRIPTIONS OF EACH PLUGIN FOLLOW ****** + + +*** THE "TEST_PAT_B" PLUGIN ("B" for Broadcasting) + +This one produces patterns similar to some popular broadcast test cards. +Because those contain some specifically "analog" stuff, like the +illegal phase color subcarrier in the PAL PM5544, or "infrablack" +in the SMPTE color bars "pluge" group, they can not be +100% emulated in a digital environment. Also, for most of them I did +not have the original specification, so I more or less guessed the +values with some help from Google... +Therefore, I call them "lookalikes". + +Parameters: + +Type: selects among the available patterns +Aspect type: square pixel, PAL, wPAL, NTSC, wNTSC, HDV, Manual +Manual aspect: active when Aspect type is set to manual + +Available patterns: + +Pattern 0 100% PAL color bars +Pattern 1 100% PAL color bars with red +Pattern 2 95% BBC color bars (PAL) +Pattern 3 75% EBU color bars +Pattern 4 SMPTE color bars +Pattern 5 Philips PM5544 +Pattern 6 FuBK +Pattern 7 Simplified FuBK + + +*** THE "TEST_PAT_C" PLUGIN ("C" for Color) + +This plugin draws cross sections of various color spaces. I have +written it mainly to test color keying, but other uses for it could +probably be found. + +Parameters: + +Color space: +Selects among four spaces: RGB, Y'PrPb, ABI and HCI + +Cross section: +Selects between three possible cross sections, 12(3), 23(1), 31(2) +NOTE: the numbers tell which two axes are represented in the 2D plane, +(the first two numbers), and which axis is controlled by the "third +axis value" slider (the third number in parentheses). For example, +23(1) in RGB menas that G will change along the horizontal axis, B +along vertical, and R will be set by the "third axis value" slider. + +Third axis value: +sets the value along the "third" axis, which cannot be accomodated +on a 2D display. + +Fullscreen: +extends the image across the full screen. Normally, it is drawn +somewhat smaller, to avoid "bad" areas of CRT displays. + +NOTE: +The strange shapes that appear on the display result from the edges +of valid color in various spaces. (defined by RGB c [0...1]) + + +*** THE "TEST_PAT_G" PLUGIN ("G" for Geometry) + +This one generates patterns for testing of the image geometry. + +Parameters: + +Type: selects among the possible patterns +Size 1: size of major features +Size 2: size of minor features +Negative: just that +Aspect type: square pixel, PAL, wPAL, NTSC, wNTSC, HDV, Manual +Manual aspect: active when Aspect type is set to manual + +Available patterns: + +Pattern 0 checkerboard +Pattern 1 checkerboard with gray rim +Pattern 2 horizontal lines +Pattern 3 vertical lines +Pattern 4 rectangular grid +Pattern 5 points (small squares) +Pattern 6 bullseye (CAUTION: most displays aren't bullet proof!) +These are similar to what old "analog" hardware test generators +produced, for adjustment of CRT display geometry and convergence. + +Pattern 7 is useful to check if something is eating the borders of +your video, and determine how much is missing. +One would think that with digital flat panel displays, overscan is a +thing of the past, but sadly, this is not the case. +Especially camcorder viewfinders are prone to this! To test camcorders +which do not support firewire input, make a tape with one that does. + +Pattern 8 is probably not of much general use... I made it while +testing the "c0rners" plugin, to see where each corner ended, even +with extreme distortion. + +Pattern 9 are "pixel rulers" useful for centering, etc. This only +looks good on an 1:1 pixel scale display. + +Pattern 10 is a measurement grid, scaled in pixels, in a +"computer graphics" type coordinate system (0,0 is upper left). +This only looks good on an 1:1 pixel scale display, and is also an +indicator of whether the image has been scaled. (Pattern 0, +Size1=minimum is also good for such check) + +Pattern 11 +Pattern 12 +are the same patterns as 9 and 10, but with a transparent background. +They can be used to measure positions and sizes of stuff in video. +For example, I've used this to determine the position and size of +logos, to use the mencoder's delogo filter. + +NOTE: Test_pat_G always draws things at integer pixel coordinates, +to make the lines maximally sharp. This means that with non-square +pixels, squares might not have exactly equal sides, and circles be a +bit elliptic. Test_pat_G will do a best effort rounding in such cases. + + +*** THE "TEST_PAT_I" PLUGIN ("I" for Impulse response) + +This one generates patterns for measuring the spatial impulse and +step responses. + +Parameters: + +Type: selects among the possible patterns +Channel: choices are: All(gray), R, G, B, R-Y, B-Y (601 and 709) +Amplitude: amplitude of impulses and steps +Width: width of impulse +Tilt: angle of line (patterns 2,3,4 only) +Negative: just that + + +Available patterns: + +Pattern 0 square point impulse +Pattern 1 raised cosine point impulse +Pattern 2 square line impulse +Pattern 3 raised cosine line impulse +Pattern 4 step (raised cos) +Pattern 5 step (linear ramp) + +These can be used to check code that does spatial convolution, like +blurring and sharpening, etc. For example, with a single pixel square +point, a convolution kernel can be directly read out with pr0be. + + +*** THE "TEST_PAT_L" PLUGIN ("L" for Levels) + +This one produces patterns with defined "gray" levels in the chosen +channel, for checking the amplitude transfer curves, gamma, etc. + +Parameters: + +Type: selects among the available patterns +Channel: choices are: All(gray), R, G, B, R-Y, B-Y (601 and 709) + +Available patterns: + +Pattern 0 8 step gray scale 0.0 to 1.0 + +Pattern 1 is an 8 step gray scale with contrast squares. The steps are +somewhat smaller than in pattern 0, the range is 0.0625...0.9375. +The top row of square pairs differ by plus minus one percent from their +backgrounds, the second 2%, then 5, 10 and 20%. In the left and right +column, the 10 and 20% squares are truncated to black and white, +respectively. Pattern 1 is mostly useful for a visual check of +black and white "crushing". + +Pattern 2 is a continuous horizontal gradient from 0.0 to 1.0, flanked +left and right with 50% gray. If you see stripes, your display (or +something in the line between this plugin and your display) is cheating +on the number of bits per pixel... + +Pattern 3 are 256 different levels arranged in a 16 x 16 matrix. This +gives each level more area, to enable the use of spatially averaged +pr0be for level measurement. Background is 50% gray. + +Pattern 4 are "contrast bands". The level difference between the +vertically adjacent bands in each box is constant from left to right. +In the top box it is 1%, then 2, 5, and 10%. This is a check of the +"perceptual uniformity" of the video transfer curve. + +Pattern 5 is for gamma checking. It only works on a 1:1 pixel scale +display, when the vertical gray (zebra) stripes show no artefacts. +To determine the gamma of your display, step back, so that the zebra +pattern is no more visible, and determine which of the gray patches +seems of the most similar brightness as the zebra bars. +For viewing video, the display gamma should be between cca 2.0 and 2.4, +with lower values suitable for brighter, and higher values for dimmer +viewing environments. +The bars at left and right are for checking the black level and +highlight crushing. The small squares are 1% steps from 1 to 10%. +Especially the black level (the "brightness" control on the monitor) +is important for correct gamma setting! The dimmer squares in the +black bar should be just barely visible. (if the darkest two or three +are not visible, it's not a catastrophe...) + +NOTE: Most test cards of this type use a constant step gamma scale. +Because in that case, the grays for the higher gamma values are very +similar (small differences), I have decided to do it a bit differently. +Here, a constant gray level step scale is used, and the corresponding +gamma values are calculated (therefore the non-round gamma values). +I think this is more in sync with the usual goal of perceptual +uniformity. + +Pattern 6 is just something that I wrote to help me with the development +of an orthicon simulator. + +NOTE: If you see any color cast when output is to the "All" channel +(default), it is a problem of your display. Either it is less than + 4 bit "true color", or a misaligned CRT, etc... + + +*** THE "TEST_PAT_R" PLUGIN ("R" for resolution) + +This one generates patterns for resolution and spatial frequency +response measurement. + +Parameters: + +Type: selects among the available patterns +Channel: choices are: All(gray), R, G, B, R-Y, B-Y (601 and 709) +Amplitude: amplitude (contrast) of the patterns +Lin. p. swp.: OFF = linear frequency sweep ON = linear period sweep +Freq1: Pattern 7 only: horizontal component of 2D frequency +Freq2: Pattern 7 only: vertical component of 2D frequency +Aspect type: square pixel, PAL, wPAL, NTSC, wNTSC, HDV, Manual +Manual aspect: active when Aspect type is set to manual + +The pixel aspect ratio is only used to calculate the "Lines per +picture height" labels on horizontal frequencies (vertical lines), +and does not affect the pattern itself, which is specified in parts +of the Nyquist frequency.. + +Available patterns: + +Pattern 0 vertical sweep of horizontal frequencies +Pattern 1 horizontal sweep of horizontal frequencies +Pattern 2 vertical sweep of vertical frequencies +Pattern 3 horizontal sweep of vertical frequencies +Pattern 4 radials ("Siemens star"), 0.7N cutoff +Pattern 5 rings, radial sweep, high frequencies outside +Pattern 6 rings, radial sweep, high frequencies nside +Pattern 7 uniform 2D spatial frequency (Freq1, Freq2) +Pattern 8 "Nyquist blocks" H,checkers,V, freqs of N and N/2 +Pattern 9 Square wave bars at integer Nyquist fractions + +The sweep limit frequencies are always relative to the Nyquist +frequency. This way the patterns automatically optimally adapt to +frame size/resolution. Additional labels are provided in lines per +picture height, LPPH. +The sweeps go from 0.05 Nyquist to 0.7 Nyquist. The sweep function is +either linear frequency, which gives more emphasis to the higher +frequencies, or linear period, which emphasizes the lower frequencies. +The 0.7 Nyquist cutoff was chosen because it corresponds to the most +popular value of the Kell factor, 0.7. +All patterns, except 8 and 9 which are square waves, are drawn as +smooth phase sinewaves. + +NOTE: These patterns are very sensitive to scaling and interpolation, +any warts there will be revealed in a very drastical manner! Monitor +windows in video software are often done in a "fast" way, so it may +be necessary to do a final rendering, to see a fair result. + + diff --git a/src/generator/test_pat/test_pat_B.c b/src/generator/test_pat/test_pat_B.c new file mode 100644 index 0000000..dcb7ce2 --- /dev/null +++ b/src/generator/test_pat/test_pat_B.c @@ -0,0 +1,899 @@ +/* +test_pat_B +This frei0r plugin generates TV test card approximations +Version 0.1 may 2010 + +Copyright (C) 2010 Marko Cebokli http://lea.hamradio.si/~s57uuu + + + 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. + +*/ + +/*********************************************************** +Test patterns: Broadcast test cards + +This plugin draws a set of test patterns, similar to popular +TV test cards + +The patterns are drawn into a temporary float array, for two reasons: +1. drawing routines are color model independent, +2. drawing is done only when a parameter changes. + +only the function floatrgba2color() +needs to care about color models, endianness, DV legality etc. + +*************************************************************/ + +//compile: gcc -Wall -c -fPIC test_pat_B.c -o test_pat_B.o + +//link: gcc -lm -shared -o test_pat_B.so test_pat_B.o + +#include +#include +#include + +#include "frei0r.h" + + + +double PI=3.14159265358979; + +typedef struct + { + float r; + float g; + float b; + float a; + } float_rgba; + + +//------------------------------------------------------------------ +void draw_rectangle(float_rgba *s, int w, int h, float x, float y, float wr, float hr, float_rgba c) +{ +int i,j; +int zx,kx,zy,ky; + +zx=x; if (zx<0) zx=0; +zy=y; if (zy<0) zy=0; +kx=x+wr; if (kx>w) kx=w; +ky=y+hr; if (ky>h) ky=h; +for (i=zy;iw) kx=w; +ky=y+rz+1; if (ky>h) ky=h; +rmin=(float)rn; +rmax=(float)rz; +for (i=zy;i=rmin)&&(rr<=rmax)) sl[w*i+j]=c; + } + +} + + +//------------------------------------------------------------------ +//ar = pixel aspect ratio +//x,y = center +//xb,yb = upper left corner of box +//vx,vy = size of box +void draw_boxed_circle(float_rgba *s, int w, int h, float x, float y, float r, float xb, float yb, float vx, float vy, float ar, float_rgba c) +{ +int xz,yz,xk,yk; +int i,j; +float rr; + +xz=x-r/ar-1; if (xz<0) xz=0; if (xzw) xk=w; if (xk>(xb+vx)) xk=xb+vx; +yz=y-r-1; if (yz<0) yz=0; if (yzh) yk=h; if (yk>(yb+vy)) yk=yb+vy; + +for (i=yz;ivkx) x0=x0-vkx; +y0=(h-vky*14)/2; +rk=6.7*vky; +c.a=1.0; + +//ozadje +c.r=0.25; c.g=0.25; c.b=0.25; +for (i=0;iname = "test_pat_B"; + tp_info->author = "Marko Cebokli"; + tp_info->plugin_type = F0R_PLUGIN_TYPE_SOURCE; +// tp_info->plugin_type = F0R_PLUGIN_TYPE_FILTER; + tp_info->color_model = F0R_COLOR_MODEL_RGBA8888; + tp_info->frei0r_version = FREI0R_MAJOR_VERSION; + tp_info->major_version = 0; + tp_info->minor_version = 1; + tp_info->num_params = 3; + tp_info->explanation = "Generates test card lookalikes"; +} + +//-------------------------------------------------- +void f0r_get_param_info(f0r_param_info_t* info, int param_index) +{ + switch (param_index) + { + case 0: + info->name = "Type"; + info->type = F0R_PARAM_DOUBLE; + info->explanation = "8 choices, select test pattern"; break; + case 1: + info->name ="Aspect type"; + info->type = F0R_PARAM_DOUBLE; + info->explanation = "7 choices, pixel aspect ratio"; + break; + case 2: + info->name = "Manual Aspect"; + info->type = F0R_PARAM_DOUBLE; + info->explanation = "Manual pixel aspect ratio (Aspect type 6)"; + break; + } +} + +//-------------------------------------------------- +f0r_instance_t f0r_construct(unsigned int width, unsigned int height) +{ + tp_inst_t* inst = calloc(1, sizeof(*inst)); + inst->w = width; + inst->h = height; + + inst->type=0; + inst->aspt=0; + inst->mpar=1.0; + + inst->par=1.0; + inst->sl=(float_rgba*)calloc(width*height,sizeof(float_rgba)); + + bars_simple(inst->sl, inst->w, inst->h, 0, 0); + + return (f0r_instance_t)inst; +} + +//-------------------------------------------------- +void f0r_destruct(f0r_instance_t instance) +{ + tp_inst_t* inst = (tp_inst_t*)instance; + + free(inst->sl); + free(inst); +} + +//-------------------------------------------------- +void f0r_set_param_value(f0r_instance_t instance, f0r_param_t param, int param_index) +{ + tp_inst_t* inst = (tp_inst_t*)instance; + + f0r_param_double* p = (f0r_param_double*) param; + + int chg,tmpi; + float tmpf; + + chg=0; + switch (param_index) + { + case 0: //type + tmpf=*((double*)p); + if (tmpf>=1.0) + tmpi=(int)tmpf; + else + tmpi = map_value_forward(tmpf, 0.0, 7.9999); + if ((tmpi<0)||(tmpi>7.0)) break; + if (inst->type != tmpi) chg=1; + inst->type = tmpi; + break; + case 1: //aspect type + tmpf=*((double*)p); + if (tmpf>=1.0) + tmpi=(int)tmpf; + else + tmpi = map_value_forward(tmpf, 0.0, 6.9999); + if ((tmpi<0)||(tmpi>6.0)) break; + if (inst->aspt != tmpi) chg=1; + inst->aspt = tmpi; + switch (inst->aspt) //pixel aspect ratio + { + case 0: inst->par=1.000;break; //square pixels + case 1: inst->par=1.067;break; //PAL DV + case 2: inst->par=1.455;break; //PAL wide + case 3: inst->par=0.889;break; //NTSC DV + case 4: inst->par=1.212;break; //NTSC wide + case 5: inst->par=1.333;break; //HDV + case 6: inst->par=inst->mpar;break; //manual + } + break; + case 2: //manual aspect + tmpf = map_value_forward_log(*((double*)p), 0.5, 2.0); + if (inst->mpar != tmpf) chg=1; + inst->mpar = tmpf; + if (inst->aspt==4) inst->par=inst->mpar; + break; + } + + if (chg==0) return; + + switch (inst->type) + { + case 0: //100% PAL color bars + bars_simple(inst->sl, inst->w, inst->h, 0, 0); + break; + case 1: //PAL color bars with red + bars_simple(inst->sl, inst->w, inst->h, 0, 1); + break; + case 2: //95% BBC color bars + bars_simple(inst->sl, inst->w, inst->h, 1, 0); + break; + case 3: //75% EBU color bars + bars_simple(inst->sl, inst->w, inst->h, 2, 0); + break; + case 4: //SMPTE color bars + bars_smpte(inst->sl, inst->w, inst->h); + break; + case 5: //philips PM5544 + draw_pm(inst->sl, inst->w, inst->h, inst->par); + break; + case 6: //FuBK + draw_fu(inst->sl, inst->w, inst->h, inst->par, 0); + break; + case 7: //simplified FuBK + draw_fu(inst->sl, inst->w, inst->h, inst->par, 1); + break; + default: + break; + } + +} + +//------------------------------------------------- +void f0r_get_param_value(f0r_instance_t instance, f0r_param_t param, int param_index) +{ + tp_inst_t* inst = (tp_inst_t*)instance; + + f0r_param_double* p = (f0r_param_double*) param; + + switch (param_index) + { + case 0: //type + *p = map_value_backward(inst->type, 0.0, 7.9999); + break; + case 1: //aspect type + *p = map_value_backward(inst->aspt, 0.0, 6.9999); + break; + case 2: //manual aspect + *p = map_value_backward_log(inst->mpar, 0.5, 2.0); + break; + } +} + +//--------------------------------------------------- +void f0r_update(f0r_instance_t instance, double time, const uint32_t* inframe, uint32_t* outframe) +{ + + assert(instance); + tp_inst_t* inst = (tp_inst_t*)instance; + + floatrgba2color(inst->sl, outframe, inst->w , inst->h); + +} diff --git a/src/generator/test_pat/test_pat_C.c b/src/generator/test_pat/test_pat_C.c new file mode 100644 index 0000000..393289b --- /dev/null +++ b/src/generator/test_pat/test_pat_C.c @@ -0,0 +1,698 @@ +/* +test_pat_C +This frei0r plugin generates cross sections of color spaces +Version 0.1 aug 2010 + +Copyright (C) 2010 Marko Cebokli http://lea.hamradio.si/~s57uuu + + + 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. + +*/ + +/*********************************************************** +Test patterns: cross sections of color spaces +*************************************************************/ + +//compile: gcc -Wall -c -fPIC test_pat_C.c -o test_pat_C.o + +//link: gcc -lm -shared -o test_pat_C.so test_pat_C.o + +#include +#include +#include + +#include "frei0r.h" + + + +double PI=3.14159265358979; + +typedef struct + { + float r; + float g; + float b; + float a; + } float_rgba; + +//-------------------------------------------------------------- +void draw_rectangle(float_rgba *s, int w, int h, float x, float y, float wr, float hr, float_rgba c) +{ +int i,j; +int zx,kx,zy,ky; + +zx=x; if (zx<0) zx=0; +zy=y; if (zy<0) zy=0; +kx=x+wr; if (kx>w) kx=w; +ky=y+hr; if (ky>h) ky=h; +for (i=zy;i1.0) return 0; +if (c.g<0.0) return 0; +if (c.g>1.0) return 0; +if (c.b<0.0) return 0; +if (c.b>1.0) return 0; +return 1; +} + +//----------------------------------------------------------- +//os: 0=RG(B) 1=GB(R) 2=BR(G) +//a: value on third axis +void risi_presek_rgb(float_rgba *s, int w, int h, float x, float y, float wr, float hr, int os, float a) +{ +int i,j; +int zx,kx,zy,ky; +float_rgba c; +float d1,d2; + +zx=x; if (zx<0) zx=0; +zy=y; if (zy<0) zy=0; +kx=x+wr; if (kx>w) kx=w; +ky=y+hr; if (ky>h) ky=h; +switch (os) + { + case 0: + c.b=a; + d1=1.0/hr; + d2=1.0/wr; + c.r=0.0; + for (i=zy;iw) kx=w; +ky=y+hr; if (ky>h) ky=h; +switch (os) + { + case 0: + pb=a-0.5; + d1=1.0/hr; + d2=1.0/wr; + yy=0.0; + for (i=zy;iw) kx=w; +ky=y+hr; if (ky>h) ky=h; +k3=sqrtf(3.0)/2.0; +ik3=0.5/k3; + +switch (os) + { + case 0: + ii=a; + d1=2.0/hr; + d2=2.0/wr; + aa=-1.0; + for (i=zy;iw) kx=w; +ky=y+hr; if (ky>h) ky=h; +k3=sqrtf(3.0)/2.0; +ik3=0.5/k3; + +switch (os) + { + case 0: + ii=a; + d1=2.0*PI/hr; + d2=1.0/wr; + hh=0.0; + for (i=zy;iname = "test_pat_C"; + tp_info->author = "Marko Cebokli"; + tp_info->plugin_type = F0R_PLUGIN_TYPE_SOURCE; +// tp_info->plugin_type = F0R_PLUGIN_TYPE_FILTER; + tp_info->color_model = F0R_COLOR_MODEL_RGBA8888; + tp_info->frei0r_version = FREI0R_MAJOR_VERSION; + tp_info->major_version = 0; + tp_info->minor_version = 1; + tp_info->num_params = 4; + tp_info->explanation = "Generates cross sections of color spaces"; +} + +//-------------------------------------------------- +void f0r_get_param_info(f0r_param_info_t* info, int param_index) +{ + switch (param_index) + { + case 0: + info->name = "Color space"; + info->type = F0R_PARAM_DOUBLE; + info->explanation = ""; + break; + case 1: + info->name ="Cross section"; + info->type = F0R_PARAM_DOUBLE; + info->explanation = ""; + break; + case 2: + info->name = "Third axis value"; + info->type = F0R_PARAM_DOUBLE; + info->explanation = ""; + break; + case 3: + info->name = "Fullscreen"; + info->type = F0R_PARAM_BOOL; + info->explanation = ""; + break; + } +} + +//-------------------------------------------------- +f0r_instance_t f0r_construct(unsigned int width, unsigned int height) +{ + int x0,y0,velx,vely; + float_rgba c; + tp_inst_t* inst = calloc(1, sizeof(*inst)); + inst->w = width; + inst->h = height; + + inst->spc=0; + inst->cs=0; + inst->thav=0.5; + inst->fs=0; + + inst->sl=(float_rgba*)calloc(width*height,sizeof(float_rgba)); + + x0=(inst->w-3*inst->h/4)/2; + y0=inst->h/8; + velx=3*inst->h/4; + vely=3*inst->h/4; + c.r=0.5;c.g=0.5;c.b=0.5;c.a=1.0; //gray background + draw_rectangle(inst->sl, inst->w, inst->h, 0.0, 0.0, (float)inst->w, (float)inst->h, c); + c.r=0.4;c.g=0.4;c.b=0.4;c.a=1.0; //darker gray background + draw_rectangle(inst->sl, inst->w, inst->h, x0, y0, velx, vely, c); + risi_presek_rgb(inst->sl, inst->w, inst->h, x0, y0, velx, vely, inst->cs, inst->thav); + + return (f0r_instance_t)inst; +} + +//-------------------------------------------------- +void f0r_destruct(f0r_instance_t instance) +{ + tp_inst_t* inst = (tp_inst_t*)instance; + + free(inst->sl); + free(inst); +} + +//-------------------------------------------------- +void f0r_set_param_value(f0r_instance_t instance, f0r_param_t param, int param_index) +{ + tp_inst_t* inst = (tp_inst_t*)instance; + f0r_param_double* p = (f0r_param_double*) param; + int chg,tmpi,x0,y0,velx,vely; + float tmpf; + float_rgba c; + + chg=0; + switch (param_index) + { + case 0: //color space + tmpf=*((double*)p); + if (tmpf>=1.0) + tmpi=(int)tmpf; + else + tmpi = map_value_forward(tmpf, 0.0, 3.9999); + if ((tmpi<0)||(tmpi>3.0)) break; + if (inst->spc != tmpi) chg=1; + inst->spc = tmpi; + break; + case 1: //cross section + tmpf=*((double*)p); + if (tmpf>=1.0) + tmpi=(int)tmpf; + else + tmpi = map_value_forward(tmpf, 0.0, 2.9999); + if ((tmpi<0)||(tmpi>2.0)) break; + if (inst->cs != tmpi) chg=1; + inst->cs = tmpi; + break; + case 2: //third axis value + tmpf = map_value_forward(*((double*)p), 0.0, 1.0); + if (inst->thav != tmpf) chg=1; + inst->thav = tmpf; + break; + case 3: //fullscreen (BOOL) + tmpi = map_value_forward(*((double*)p), 0.0, 1.0); + if (inst->fs != tmpi) chg=1; + inst->fs = tmpi; + break; + } + + if (chg==0) return; + + if (inst->fs==0) + { + x0=(inst->w-3*inst->h/4)/2; + y0=inst->h/8; + velx=3*inst->h/4; + vely=3*inst->h/4; + } + else + { + x0=0; + y0=0; + velx=inst->w; + vely=inst->h; + } + + c.r=0.5;c.g=0.5;c.b=0.5;c.a=1.0; //gray background + draw_rectangle(inst->sl, inst->w, inst->h, 0.0, 0.0, (float)inst->w, (float)inst->h, c); + c.r=0.4;c.g=0.4;c.b=0.4;c.a=1.0; //darker gray background + draw_rectangle(inst->sl, inst->w, inst->h, x0, y0, velx, vely, c); + +switch (inst->spc) + { + case 0: + risi_presek_rgb(inst->sl, inst->w, inst->h, x0, y0, velx, vely, inst->cs, inst->thav); + break; + case 1: + risi_presek_yprpb601(inst->sl, inst->w, inst->h, x0, y0, velx, vely, inst->cs, inst->thav); + break; + case 2: + risi_presek_abi(inst->sl, inst->w, inst->h, x0, y0, velx, vely, inst->cs, inst->thav); + break; + case 3: + risi_presek_hci(inst->sl, inst->w, inst->h, x0, y0, velx, vely, inst->cs, inst->thav); + break; + default: + break; + } + +} + +//------------------------------------------------- +void f0r_get_param_value(f0r_instance_t instance, f0r_param_t param, int param_index) +{ + tp_inst_t* inst = (tp_inst_t*)instance; + + f0r_param_double* p = (f0r_param_double*) param; + + switch (param_index) + { + case 0: //color space + *p = map_value_backward(inst->spc, 0.0, 3.9999); + break; + case 1: //cross section + *p = map_value_backward(inst->cs, 0.0, 2.9999); + break; + case 2: //third axis value + *p = map_value_backward(inst->thav, 0.0, 1.0); + break; + case 3: //fullscreen (BOOL) + *p = map_value_backward_log(inst->fs, 0.0, 1.0); + break; + } +} + +//--------------------------------------------------- +void f0r_update(f0r_instance_t instance, double time, const uint32_t* inframe, uint32_t* outframe) +{ + + assert(instance); + tp_inst_t* inst = (tp_inst_t*)instance; + + floatrgba2color(inst->sl, outframe, inst->w , inst->h); + +} diff --git a/src/generator/test_pat/test_pat_G.c b/src/generator/test_pat/test_pat_G.c new file mode 100644 index 0000000..5f896a8 --- /dev/null +++ b/src/generator/test_pat/test_pat_G.c @@ -0,0 +1,852 @@ +/* +test_pat_G +This frei0r plugin generates geometry test pattern images +Version 0.1 may 2010 + +Copyright (C) 2010 Marko Cebokli http://lea.hamradio.si/~s57uuu + + + 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. + +*/ + +/*********************************************************** +Test patterns: Geometry + +This plugin draws a set of test patterns, which are useful for image geometry checking. + +The patterns are drawn into a temporary char array, for two reasons: +1. drawing routines are color model independent, +2. drawing is done only when a parameter changes. + +only the functions make_char2color_table(), quadrants() and +f0r_update() need to care about color models, endianness, +DV legality etc. + +*************************************************************/ + +//compile: gcc -Wall -c -fPIC test_pat_G.c -o test_pat_G.o + +//link: gcc -lm -shared -o test_pat_G.so test_pat_G.o + +#include +#include +#include + +#include "frei0r.h" + + +//---------------------------------------------------------- +void draw_rectangle(unsigned char *sl, int w, int h, int x, int y, int wr, int hr, unsigned char gray) +{ +int i,j; +int zx,kx,zy,ky; + +zx=x; if (zx<0) zx=0; +zy=y; if (zy<0) zy=0; +kx=x+wr; if (kx>w) kx=w; +ky=y+hr; if (ky>h) ky=h; +for (i=zy;i=w) kx=w-1; +ky=y+rz+1; if (ky>=h) ky=h-1; +rmin=(float)rn; +rmax=(float)rz; +for (i=zy;i=rmin)&&(rr<=rmax)) sl[w*i+j]=gray; + } + +} + +//----------------------------------------------------------- +//dir: 1=up 2=right 3=down 4=left +void draw_wedge(unsigned char *sl, int w, int h, int x, int y, int size, int dir, unsigned char gray) +{ +int i,j,ii,jj; + +switch (dir) + { + case 1: //up + for (i=0;i=h) ii=h-1; + jj=x+j; if (jj>=w) jj=w-1; + sl[w*ii+jj]=gray; + jj=x-j; if (jj<0) jj=0; + sl[w*ii+jj]=gray; + } + break; + case 2: //right + for (i=0;i=h) jj=h-1; + sl[w*jj+ii]=gray; + jj=y-j; if (jj<0) jj=0; + sl[w*jj+ii]=gray; + } + break; + case 3: //down + for (i=0;i=w) jj=w-1; + sl[w*ii+jj]=gray; + jj=x-j; if (jj<0) jj=0; + sl[w*ii+jj]=gray; + } + break; + case 4: //left + for (i=0;i=w) ii=w-1; + jj=y+j; if (jj>=h) jj=h-1; + sl[w*jj+ii]=gray; + jj=y-j; if (jj<0) jj=0; + sl[w*jj+ii]=gray; + } + break; + default: + break; + } +} + +//---------------------------------------------------------- +//draws a checkerboard pattern +//size = size of squares (pixels) +//ar = pixel aspect ratio +//rim : 0=uniform 1=gray rim +void sah1(unsigned char *sl, int w, int h, int size, float ar, int rim) +{ +int i,j,kx,ky,z,pv,ps,zv,zs; +unsigned char black,gray1,gray2,white; +int ox,oy; + +kx=size; ky=size; +kx=kx/ar; //kao aspect!=1 (anamorph) + +black=0; +white=255; +gray1=black+(white-black)*0.3; +gray2=black+(white-black)*0.7; + +ox=kx*2-(w/2)%(kx*2); //centering offset +oy=ky*2-(h/2)%(ky*2); +ps=(w/2)%kx; if (ps==0) ps=kx; +pv=(h/2)%ky; if (pv==0) pv=ky; +zv=h-pv; +zs=w-ps; + +if (rim==0) + { + for (i=0;i=zs)||(i=zv)) z=1; + if ((((i+oy)/ky)%2)^(((j+ox)/kx)%2)) + sl[i*w+j]= (z==0) ? white : gray2; + else + sl[i*w+j]= (z==0) ? black : gray1; + } + } + } + +} + +//------------------------------------------------- +//draws horizontal lines +//clr=clear background +void hlines(unsigned char *sl, int w, int h, int size1, int size2, float ar, int clr) +{ +int i,iz; +unsigned char black,white; + +black=0; +white=255; + +if (clr!=0) for (i=0;i<(w*h);i++) sl[i]=black; //black background + +iz=h/2-size1*((h/2)/size1); +for (i=iz;iname = "test_pat_G"; + tp_info->author = "Marko Cebokli"; + tp_info->plugin_type = F0R_PLUGIN_TYPE_SOURCE; +// tp_info->plugin_type = F0R_PLUGIN_TYPE_FILTER; + tp_info->color_model = F0R_COLOR_MODEL_RGBA8888; + tp_info->frei0r_version = FREI0R_MAJOR_VERSION; + tp_info->major_version = 0; + tp_info->minor_version = 1; + tp_info->num_params = 6; + tp_info->explanation = "Generates geometry test pattern images"; +} + +//-------------------------------------------------- +void f0r_get_param_info(f0r_param_info_t* info, int param_index) +{ + switch (param_index) + { + case 0: + info->name = "Type"; + info->type = F0R_PARAM_DOUBLE; + info->explanation = "Type of test pattern"; break; + case 1: + info->name = "Size 1"; + info->type = F0R_PARAM_DOUBLE; + info->explanation = "Size of major features"; break; + case 2: + info->name = "Size 2"; + info->type = F0R_PARAM_DOUBLE; + info->explanation = "Size of minor features"; break; + case 3: + info->name = "Negative"; + info->type = F0R_PARAM_BOOL; + info->explanation = "Polarity of image"; break; + case 4: + info->name ="Aspect type"; + info->type = F0R_PARAM_DOUBLE; + info->explanation = "Pixel aspect ratio presets"; + break; + case 5: + info->name = "Manual Aspect"; + info->type = F0R_PARAM_DOUBLE; + info->explanation = "Manual pixel aspect ratio"; + break; + } +} + +//-------------------------------------------------- +f0r_instance_t f0r_construct(unsigned int width, unsigned int height) +{ + tp_inst_t* inst = calloc(1, sizeof(*inst)); + inst->w = width; + inst->h = height; + + inst->type=0; + inst->size1=72; + inst->size2=4; + inst->aspt=0; + inst->mpar=1.0; + inst->neg=0; + + inst->par=1.0; + inst->sl=(unsigned char*)calloc(width*height,1); + inst->alpha=(unsigned char*)calloc(width*height,1); + inst->c2c=(uint32_t *)calloc(256,sizeof(uint32_t)); + + make_char2color_table(inst->c2c,inst->neg); + sah1(inst->sl, inst->w, inst->h, inst->size1, inst->par, 0); + + return (f0r_instance_t)inst; +} + +//-------------------------------------------------- +void f0r_destruct(f0r_instance_t instance) +{ + tp_inst_t* inst = (tp_inst_t*)instance; + + free(inst->sl); + free(inst->alpha); + free(inst->c2c); + free(inst); +} + +//-------------------------------------------------- +void f0r_set_param_value(f0r_instance_t instance, f0r_param_t param, int param_index) +{ + tp_inst_t* inst = (tp_inst_t*)instance; + + f0r_param_double* p = (f0r_param_double*) param; + + int chg,tmpi; + float tmpf; + + chg=0; + switch (param_index) + { + case 0: //type + tmpf=*((double*)p); + if (tmpf>=1.0) + tmpi=(int)tmpf; + else + tmpi = map_value_forward(tmpf, 0.0, 12.9999); + if ((tmpi<0)||(tmpi>12.0)) break; + if (inst->type != tmpi) chg=1; + inst->type = tmpi; + break; + case 1: //size 1 + tmpi = map_value_forward(*((double*)p), 0.0, 256.0); + if (inst->size1 != tmpi) chg=1; + inst->size1 = tmpi; + break; + case 2: //size 2 + tmpi = map_value_forward(*((double*)p), 0.0, 64.0); + if (inst->size2 != tmpi) chg=1; + inst->size2 = tmpi; + break; + case 3: //negative + tmpi = map_value_forward(*((double*)p), 0.0, 1.0); + if (inst->neg != tmpi) chg=1; + inst->neg = tmpi; + make_char2color_table(inst->c2c,inst->neg); + break; + case 4: //aspect type + tmpf=*((double*)p); + if (tmpf>=1.0) + tmpi=(int)tmpf; + else + tmpi = map_value_forward(*((double*)p), 0.0, 6.9999); + if ((tmpi<0)||(tmpi>6.0)) break; + if (inst->aspt != tmpi) chg=1; + inst->aspt = tmpi; + switch (inst->aspt) //pixel aspect ratio + { + case 0: inst->par=1.000;break; //square pixels + case 1: inst->par=1.067;break; //PAL DV + case 2: inst->par=1.455;break; //PAL wide + case 3: inst->par=0.889;break; //NTSC DV + case 4: inst->par=1.212;break; //NTSC wide + case 5: inst->par=1.333;break; //HDV + case 6: inst->par=inst->mpar;break; //manual + } + break; + case 5: //manual aspect + tmpf = map_value_forward_log(*((double*)p), 0.5, 2.0); + if (inst->mpar !=tmpf) chg=1; + inst->mpar = tmpf; + if (inst->aspt==4) inst->par=inst->mpar; + break; + } + + if (chg==0) return; + + switch (inst->type) + { + case 0: //checkerboard + sah1(inst->sl, inst->w, inst->h, inst->size1, inst->par, 0); + break; + case 1: //checkerboard with border + sah1(inst->sl, inst->w, inst->h, inst->size1, inst->par, 1); + break; + case 2: //horizontal lines + hlines(inst->sl, inst->w, inst->h, inst->size1, inst->size2, inst->par, 1); + break; + case 3: //vertical lines + vlines(inst->sl, inst->w, inst->h, inst->size1, inst->size2, inst->par, 1); + break; + case 4: //grid + mreza(inst->sl, inst->w, inst->h, inst->size1, inst->size2, inst->par); + break; + case 5: //points + pike(inst->sl, inst->w, inst->h, inst->size1, inst->size2, inst->par); + break; + case 6: //bullseye + tarca(inst->sl, inst->w, inst->h, inst->size1, inst->size2+1, inst->par); + break; + case 7: //edge marks + robovi(inst->sl, inst->w, inst->h); + break; + case 8: //color quadrants are drawn in update() + break; + case 9: //pixel rulers + case 11: + rulers(inst->sl, inst->w, inst->h, inst->alpha); + break; + case 10: //measurement grid + case 12: + grid(inst->sl, inst->w, inst->h, inst->alpha); + break; + default: + break; + } + +} + +//------------------------------------------------- +void f0r_get_param_value(f0r_instance_t instance, f0r_param_t param, int param_index) +{ + tp_inst_t* inst = (tp_inst_t*)instance; + + f0r_param_double* p = (f0r_param_double*) param; + + switch (param_index) + { + case 0: //type + *p = map_value_backward(inst->type, 0.0, 12.9999); + break; + case 1: //size 1 + *p = map_value_backward(inst->size1, 0.0, 256.0); + break; + case 2: //size 2 + *p = map_value_backward(inst->size2, 0.0, 64.0); + break; + case 3: //negative + *p = map_value_backward(inst->size2, 0.0, 1.0); + break; + case 4: //aspect type + *p = map_value_backward(inst->aspt, 0.0, 6.9999); + break; + case 5: //manual aspect + *p = map_value_backward_log(inst->mpar, 0.5, 2.0); + break; + } +} + +//--------------------------------------------------- +//COLOR MODEL DEPENDENT +void f0r_update(f0r_instance_t instance, double time, const uint32_t* inframe, uint32_t* outframe) +{ + int i; + + assert(instance); + tp_inst_t* inst = (tp_inst_t*)instance; + + switch (inst->type) + { + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 10: + for (i=0;i<(inst->h*inst->w);i++) + outframe[i]=0xFF000000|inst->c2c[inst->sl[i]]; + break; + case 8: + kvadranti(outframe,inst->w,inst->h,inst->neg); + break; + case 11: + case 12: + for (i=0;i<(inst->h*inst->w);i++) + outframe[i]=((uint32_t)inst->alpha[i])<<24|inst->c2c[inst->sl[i]]; + break; + default: + break; + } + +} diff --git a/src/generator/test_pat/test_pat_I.c b/src/generator/test_pat/test_pat_I.c new file mode 100644 index 0000000..3dc49a4 --- /dev/null +++ b/src/generator/test_pat/test_pat_I.c @@ -0,0 +1,590 @@ +/* +test_pat_I +This frei0r plugin generates test patterns for measurement of +spatial impulse and step responses + +Version 0.1 may 2010 + +Copyright (C) 2010 Marko Cebokli http://lea.hamradio.si/~s57uuu + + + 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. + +*/ + +/*********************************************************** +Test patterns: spatial impulse and step response + +The patterns are drawn into a temporary float array, for two reasons: +1. drawing routines are color model independent, +2. drawing is done only when a parameter changes. + +only the function float2color() +needs to care about color models, endianness, DV legality etc. + +*************************************************************/ + +//compile: gcc -Wall -c -fPIC test_pat_I.c -o test_pat_I.o + +//link: gcc -lm -shared -o test_pat_I.so test_pat_I.o + +#include +#include +#include + +#include "frei0r.h" + + + +double PI=3.14159265358979; + +typedef struct + { + float r; + float g; + float b; + float a; + } float_rgba; + + +//---------------------------------------------------------- +void draw_rectangle(float *sl, int w, int h, int x, int y, int wr, int hr, float gray) +{ +int i,j; +int zx,kx,zy,ky; + +zx=x; if (zx<0) zx=0; +zy=y; if (zy<0) zy=0; +kx=x+wr; if (kx>w) kx=w; +ky=y+hr; if (ky>h) ky=h; +for (i=zy;isize/2.0) r=size/2.0; + g=0.5+amp/2.0*cosf(r/size*2.0*PI); + sl[(i+h/2-(int)size/2)*w+j+w/2-(int)size/2]=g; + } + +} + +//---------------------------------------------------- +//crta pravokotna +void crta_p(float *sl, int w, int h, float size, float amp, float tilt) +{ +int i,j; +float d,st,ct; + +st=sinf(tilt); +ct=cosf(tilt); +for (i=0;isize/2.0) + { + sl[i*w+j]=0.5-amp/2.0; + } + else + { + sl[i*w+j]=0.5+amp/2.0; + } + } + +} + +//---------------------------------------------------- +//crta raised cos +void crta(float *sl, int w, int h, float size, float amp, float tilt) +{ +int i,j; +float d,st,ct,g; + +st=sinf(tilt); +ct=cosf(tilt); +for (i=0;isize/2.0) + { + sl[i*w+j]=0.5-amp/2.0; + } + else + { + if (d>size/2.0) d=size/2.0; + g=0.5+amp/2.0*cosf(d/size*2.0*PI); + sl[i*w+j]=g; + } + } + +} + +//---------------------------------------------------- +//crta step raised cos, oz. pravokotna, ce das size=1 +void crta_s(float *sl, int w, int h, float size, float amp, float tilt) +{ +int i,j; +float d,st,ct,g; + +st=sinf(tilt); +ct=cosf(tilt); +for (i=0;isize/2.0) + { + if (d>0.0) + sl[i*w+j]=0.5-amp/2.0; + else + sl[i*w+j]=0.5+amp/2.0; + } + else + { + if (d>size/2.0) d=size/2.0; + g=0.5-amp/2.0*sinf(d/size*PI); + sl[i*w+j]=g; + } + } + +} + +//---------------------------------------------------- +//crta step linear ramp, oz. pravokotna, ce das size=1 +void crta_r(float *sl, int w, int h, float size, float amp, float tilt) +{ +int i,j; +float d,st,ct,g; + +st=sinf(tilt); +ct=cosf(tilt); +for (i=0;isize/2.0) + { + if (d>0.0) + sl[i*w+j]=0.5-amp/2.0; + else + sl[i*w+j]=0.5+amp/2.0; + } + else + { + if (d>size/2.0) d=size/2.0; + g = 0.5-amp*(d/size); + sl[i*w+j]=g; + } + } + +} + +//----------------------------------------------------- +//converts the internal monochrome float image into +//Frei0r rgba8888 color +//ch selects the channel 0=all 1=R 2=G 3=B +//sets alpha to opaque +void float2color(float *sl, uint32_t* outframe, int w , int h, int ch) +{ +int i,ri,gi,bi; +uint32_t p; +float r,g,b; + +switch (ch) + { + case 0: //all (gray) + for (i=0;iname = "test_pat_I"; + tp_info->author = "Marko Cebokli"; + tp_info->plugin_type = F0R_PLUGIN_TYPE_SOURCE; +// tp_info->plugin_type = F0R_PLUGIN_TYPE_FILTER; + tp_info->color_model = F0R_COLOR_MODEL_RGBA8888; + tp_info->frei0r_version = FREI0R_MAJOR_VERSION; + tp_info->major_version = 0; + tp_info->minor_version = 1; + tp_info->num_params = 6; + tp_info->explanation = "Generates spatial impulse and step test patterns"; +} + +//-------------------------------------------------- +void f0r_get_param_info(f0r_param_info_t* info, int param_index) +{ + switch (param_index) + { + case 0: + info->name = "Type"; + info->type = F0R_PARAM_DOUBLE; + info->explanation = "Type of test pattern"; break; + case 1: + info->name ="Channel"; + info->type = F0R_PARAM_DOUBLE; + info->explanation = "Into which color channel to draw"; + break; + case 2: + info->name = "Amplitude"; + info->type = F0R_PARAM_DOUBLE; + info->explanation = "Amplitude (contrast) of the pattern"; + break; + case 3: + info->name = "Width"; + info->type = F0R_PARAM_DOUBLE; + info->explanation = "Width of impulse"; + break; + case 4: + info->name = "Tilt"; + info->type = F0R_PARAM_DOUBLE; + info->explanation = "Angle of step function"; + break; + case 5: + info->name = "Negative"; + info->type = F0R_PARAM_BOOL; + info->explanation = "Change polarity of impulse/step"; + break; + } +} + +//-------------------------------------------------- +f0r_instance_t f0r_construct(unsigned int width, unsigned int height) +{ + tp_inst_t* inst = calloc(1, sizeof(*inst)); + inst->w = width; + inst->h = height; + + inst->type=0; + inst->chan=0; + inst->amp=0.8; + inst->pw=5.0; + inst->tilt=0.0; + inst->neg=0; + + inst->sl=(float*)calloc(width*height,sizeof(float)); + + pika_p(inst->sl, inst->w, inst->h, inst->pw, inst->amp); + + return (f0r_instance_t)inst; +} + +//-------------------------------------------------- +void f0r_destruct(f0r_instance_t instance) +{ + tp_inst_t* inst = (tp_inst_t*)instance; + + free(inst->sl); + free(inst); +} + +//-------------------------------------------------- +void f0r_set_param_value(f0r_instance_t instance, f0r_param_t param, int param_index) +{ + tp_inst_t* inst = (tp_inst_t*)instance; + + f0r_param_double* p = (f0r_param_double*) param; + + int chg,tmpi; + float tmpf; + + chg=0; + switch (param_index) + { + case 0: //type + tmpf=*((double*)p); + if (tmpf>=1.0) + tmpi=(int)tmpf; + else + tmpi = map_value_forward(tmpf, 0.0, 5.9999); + if ((tmpi<0)||(tmpi>5.0)) break; + if (inst->type != tmpi) chg=1; + inst->type = tmpi; + break; + case 1: //channel + tmpf=*((double*)p); + if (tmpf>=1.0) + tmpi=(int)tmpf; + else + tmpi = map_value_forward(tmpf, 0.0, 7.9999); + if ((tmpi<0)||(tmpi>7.0)) break; + if (inst->chan != tmpi) chg=1; + inst->chan = tmpi; + case 2: //amplitude + tmpf = map_value_forward(*((double*)p), 0.0, 1.0); + if (inst->amp != tmpf) chg=1; + inst->amp = tmpf; + break; + case 3: //width + tmpf = map_value_forward(*((double*)p), 1.0, 100.0); + if (inst->pw != tmpf) chg=1; + inst->pw = tmpf; + break; + case 4: //tilt + tmpf = map_value_forward(*((double*)p), -PI/2.0, PI/2.0); + if (inst->tilt != tmpf) chg=1; + inst->tilt = tmpf; + break; + case 5: //negative + tmpi = map_value_forward(*((double*)p), 0.0, 1.0); + if (inst->neg != tmpi) chg=1; + inst->neg = tmpi; + break; + } + + if (chg==0) return; + + switch (inst->type) + { + case 0: // + pika_p(inst->sl, inst->w, inst->h, inst->pw, inst->amp); + break; + case 1: // + pika_o(inst->sl, inst->w, inst->h, inst->pw, inst->amp); + break; + case 2: // + crta_p(inst->sl, inst->w, inst->h, inst->pw, inst->amp, inst->tilt); + break; + case 3: // + crta(inst->sl, inst->w, inst->h, inst->pw, inst->amp, inst->tilt); + break; + case 4: // + crta_s(inst->sl, inst->w, inst->h, inst->pw, inst->amp, inst->tilt); + break; + case 5: // + crta_r(inst->sl, inst->w, inst->h, inst->pw, inst->amp, inst->tilt); + break; + default: + break; + } + +} + +//------------------------------------------------- +void f0r_get_param_value(f0r_instance_t instance, f0r_param_t param, int param_index) +{ + tp_inst_t* inst = (tp_inst_t*)instance; + + f0r_param_double* p = (f0r_param_double*) param; + + switch (param_index) + { + case 0: //type + *p = map_value_backward(inst->type, 0.0, 5.9999); + break; + case 1: //channel + *p = map_value_backward(inst->chan, 0.0, 7.9999); + break; + case 2: //amplitude + *p = map_value_backward(inst->amp, 0.0, 1.0); + break; + case 3: //width + *p = map_value_backward(inst->pw, 1.0, 100.0); + break; + case 4: //tilt + *p = map_value_backward_log(inst->tilt, -PI/2.0, PI/2.0); + break; + case 5: //negative + *p = map_value_backward_log(inst->neg, 0.0, 1.0); + break; + } +} + +//--------------------------------------------------- +void f0r_update(f0r_instance_t instance, double time, const uint32_t* inframe, uint32_t* outframe) +{ + + assert(instance); + tp_inst_t* inst = (tp_inst_t*)instance; + + float2color(inst->sl, outframe, inst->w , inst->h, inst->chan); + +} diff --git a/src/generator/test_pat/test_pat_L.c b/src/generator/test_pat/test_pat_L.c new file mode 100644 index 0000000..38ed3a1 --- /dev/null +++ b/src/generator/test_pat/test_pat_L.c @@ -0,0 +1,700 @@ +/* +test_pat_L +This frei0r plugin generates test patterns for levels and +linearity checking + +Version 0.1 may 2010 + +Copyright (C) 2010 Marko Cebokli http://lea.hamradio.si/~s57uuu + + + 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. + +*/ + +/*********************************************************** +Test patterns: Levels and Linearity + +This plugin draws a set of test patterns, used for checking of +linearity, gamma, contrast, etc. + +The patterns are drawn into a temporary float array, for two reasons: +1. drawing routines are color model independent, +2. drawing is done only when a parameter changes. + +only the function float2color() +needs to care about color models, endianness, DV legality etc. + +*************************************************************/ + +//compile: gcc -Wall -c -fPIC test_pat_L.c -o test_pat_L.o + +//link: gcc -lm -shared -o test_pat_L.so test_pat_L.o + +#include +#include +#include +#include + +#include "frei0r.h" + + +double PI=3.14159265358979; + + +//---------------------------------------------------------- +void draw_rectangle(float *sl, int w, int h, int x, int y, int wr, int hr, float gray) +{ +int i,j; +int zx,kx,zy,ky; + +zx=x; if (zx<0) zx=0; +zy=y; if (zy<0) zy=0; +kx=x+wr; if (kx>w) kx=w; +ky=y+hr; if (ky>h) ky=h; +for (i=zy;iw) kx=w; +ky=y+hr; if (ky>h) ky=h; +switch (dir) + { + case 0: + dg=(gray2-gray1)/(wr-1); + g=gray1; + for (j=zx;jw) kx=w; +ky=y+rz+1; if (ky>h) ky=h; +rmin=(float)rn; +rmax=(float)rz; +for (i=zy;i=rmin)&&(rr<=rmax)) sl[w*i+j]=gray; + } + +} + +//------------------------------------------------------- +//draw one numerical digit, 7-segment style +//v=size in x direction (in y it is 2*v) +//d= number [0...9] +void disp7s(float *sl, int w, int h, int x, int y, int v, int d, float gray) +{ +char seg[10]={0xEE,0x24,0xBA,0xB6,0x74,0xD6,0xDE,0xA4,0xFE,0xF6}; + +if ((d<0)||(d>9)) return; + +if ((seg[d]&128)!=0) draw_rectangle(sl,w,h,x,y-2*v,v,1,gray); +if ((seg[d]&64)!=0) draw_rectangle(sl,w,h,x,y-2*v,1,v,gray); +if ((seg[d]&32)!=0) draw_rectangle(sl,w,h,x+v,y-2*v,1,v,gray); +if ((seg[d]&16)!=0) draw_rectangle(sl,w,h,x,y-v,v,1,gray); +if ((seg[d]&8)!=0) draw_rectangle(sl,w,h,x,y-v,1,v,gray); +if ((seg[d]&4)!=0) draw_rectangle(sl,w,h,x+v,y-v,1,v,gray); +if ((seg[d]&2)!=0) draw_rectangle(sl,w,h,x,y,v,1,gray); +} + +//---------------------------------------------------------------- +//draw a floating point number +//v=size +//n=number +//f=format (as in printf) +void dispF(float *sl, int w, int h, int x, int y, int v, float n, char *f, float gray) +{ +char str[64]; +int i; + +sprintf(str,f,n); +i=0; +while (str[i]!=0) + { + if (str[i]=='-') + draw_rectangle(sl,w,h,x+i*(v+v/3+1),y-v,v,1,gray); + else + disp7s(sl,w,h,x+i*(v+v/3+1),y,v,str[i]-48,gray); + i++; + } + +} + +//---------------------------------------------------------- +//gray staircase +void stopnice(float *sl, int w, int h) +{ +int j,n; +float s; + +n=8; +for (j=0;jh/20) h1=h/20; + for (j=0;j1.0) s2=1.0; + draw_rectangle(sl,w,h, j*w/n+w1,1*h/16, w1,h1, s1); + draw_rectangle(sl,w,h, j*w/n+w1,2*h/16, w1,h1, s2); + + s1=s-0.02; if (s1<0.0) s1=0.0; + s2=s+0.02; if (s2>1.0) s2=1.0; + draw_rectangle(sl,w,h, j*w/n+w1,4*h/16, w1,h1, s1); + draw_rectangle(sl,w,h, j*w/n+w1,5*h/16, w1,h1, s2); + + s1=s-0.05; if (s1<0.0) s1=0.0; + s2=s+0.05; if (s2>1.0) s2=1.0; + draw_rectangle(sl,w,h, j*w/n+w1,7*h/16, w1,h1, s1); + draw_rectangle(sl,w,h, j*w/n+w1,8*h/16, w1,h1, s2); + + s1=s-0.1; if (s1<0.0) s1=0.0; + s2=s+0.1; if (s2>1.0) s2=1.0; + draw_rectangle(sl,w,h, j*w/n+w1,10*h/16, w1,h1, s1); + draw_rectangle(sl,w,h, j*w/n+w1,11*h/16, w1,h1, s2); + + s1=s-0.2; if (s1<0.0) s1=0.0; + s2=s+0.2; if (s2>1.0) s2=1.0; + draw_rectangle(sl,w,h, j*w/n+w1,13*h/16, w1,w1, s1); + draw_rectangle(sl,w,h, j*w/n+w1,14*h/16, w1,w1, s2); + } + +} + +//----------------------------------------------------- +//gray gradient +void sivi_klin(float *sl, int w, int h) +{ +draw_rectangle(sl,w,h, 0, 0, w/7, h, 0.5); +draw_rectangle(sl,w,h, 6*w/7, 0, w/7, h, 0.5); +draw_gradient(sl,w,h, w/8, 0, 3*w/4, h, 0.0, 1.0, 0); +} + +//---------------------------------------------------- +//256 grays +void sivine256(float *sl, int w, int h) +{ +int i,j,w1,h1; +float s; + +draw_rectangle(sl,w,h, 0, 0, w, h, 0.5); +if (w>h) w1=h/20; else w1=w/20; +h1=w1-2; +for (i=0;i<16;i++) + for (j=0;j<16;j++) + { + s=(float)(16*i+j)/255.0; + draw_rectangle(sl,w,h, (w-h)/2+(j+2)*w1, (i+2)*w1, h1, h1, s); + } +} + +//------------------------------------------------------ +//contrast bands +void trakovi(float *sl, int w, int h) +{ +int i,h1; + +draw_rectangle(sl,w,h, 0, 0, w, h, 0.5); +h1=h/64; +for (i=0;i<4;i++) + { + draw_gradient(sl,w,h, w/8, (7+2*i)*h1, 3*w/4, h1, 0.0, 0.99, 0); + draw_gradient(sl,w,h, w/8, (8+2*i)*h1, 3*w/4, h1, 0.01, 1.0, 0); + } +for (i=0;i<4;i++) + { + draw_gradient(sl,w,h, w/8, (21+2*i)*h1, 3*w/4, h1, 0.0, 0.98, 0); + draw_gradient(sl,w,h, w/8, (22+2*i)*h1, 3*w/4, h1, 0.02, 1.0, 0); + } +for (i=0;i<4;i++) + { + draw_gradient(sl,w,h, w/8, (35+2*i)*h1, 3*w/4, h1, 0.0, 0.95, 0); + draw_gradient(sl,w,h, w/8, (36+2*i)*h1, 3*w/4, h1, 0.05, 1.0, 0); + } +for (i=0;i<4;i++) + { + draw_gradient(sl,w,h, w/8, (49+2*i)*h1, 3*w/4, h1, 0.0, 0.90, 0); + draw_gradient(sl,w,h, w/8, (50+2*i)*h1, 3*w/4, h1, 0.1, 1.0, 0); + } + +} + +//---------------------------------------------------------- +void gamatest(float *sl, int w, int h) +{ +int i,s,x,y; +float g; + +for (i=0;iname = "test_pat_L"; + tp_info->author = "Marko Cebokli"; + tp_info->plugin_type = F0R_PLUGIN_TYPE_SOURCE; +// tp_info->plugin_type = F0R_PLUGIN_TYPE_FILTER; + tp_info->color_model = F0R_COLOR_MODEL_RGBA8888; + tp_info->frei0r_version = FREI0R_MAJOR_VERSION; + tp_info->major_version = 0; + tp_info->minor_version = 1; + tp_info->num_params = 2; + tp_info->explanation = "Generates linearity checking patterns"; +} + +//-------------------------------------------------- +void f0r_get_param_info(f0r_param_info_t* info, int param_index) +{ + switch (param_index) + { + case 0: + info->name = "Type"; + info->type = F0R_PARAM_DOUBLE; + info->explanation = "Type of test pattern"; break; + case 1: + info->name ="Channel"; + info->type = F0R_PARAM_DOUBLE; + info->explanation = "Into which color channel to draw"; + break; + } +} + +//-------------------------------------------------- +f0r_instance_t f0r_construct(unsigned int width, unsigned int height) +{ + tp_inst_t* inst = calloc(1, sizeof(*inst)); + inst->w = width; + inst->h = height; + + inst->type=0; + inst->chan=0; + + inst->sl=(float*)calloc(width*height,sizeof(float)); + + stopnice(inst->sl, inst->w, inst->h); + + return (f0r_instance_t)inst; +} + +//-------------------------------------------------- +void f0r_destruct(f0r_instance_t instance) +{ + tp_inst_t* inst = (tp_inst_t*)instance; + + free(inst->sl); + free(inst); +} + +//-------------------------------------------------- +void f0r_set_param_value(f0r_instance_t instance, f0r_param_t param, int param_index) +{ + tp_inst_t* inst = (tp_inst_t*)instance; + + f0r_param_double* p = (f0r_param_double*) param; + + int chg,tmpi; + float tmpf; + + chg=0; + switch (param_index) + { + case 0: //type + tmpf=*((double*)p); + if (tmpf>=1.0) + tmpi=(int)tmpf; + else + tmpi = map_value_forward(tmpf, 0.0, 6.9999); + if ((tmpi<0)||(tmpi>6.0)) break; + if (inst->type != tmpi) chg=1; + inst->type = tmpi; + break; + case 1: //channel + tmpf=*((double*)p); + if (tmpf>=1.0) + tmpi=(int)tmpf; + else + tmpi = map_value_forward(tmpf, 0.0, 7.9999); + if ((tmpi<0)||(tmpi>7.0)) break; + if (inst->chan != tmpi) chg=1; + inst->chan = tmpi; + } + + if (chg==0) return; + + switch (inst->type) + { + case 0: //gray steps + stopnice(inst->sl, inst->w, inst->h); + break; + case 1: //gray steps with contrast squares + stopnice_k(inst->sl, inst->w, inst->h); + break; + case 2: //gray gradient + sivi_klin(inst->sl, inst->w, inst->h); + break; + case 3: //256 gray squares in a 16x16 matrix + sivine256(inst->sl, inst->w, inst->h); + break; + case 4: //contrast bands + trakovi(inst->sl, inst->w, inst->h); + break; + case 5: //gama ckecking chart + gamatest(inst->sl, inst->w, inst->h); + break; + case 6: //for testing orthicon simulator + ortikon(inst->sl, inst->w, inst->h); + break; + default: + break; + } + +} + +//------------------------------------------------- +void f0r_get_param_value(f0r_instance_t instance, f0r_param_t param, int param_index) +{ + tp_inst_t* inst = (tp_inst_t*)instance; + + f0r_param_double* p = (f0r_param_double*) param; + + switch (param_index) + { + case 0: //type + *p = map_value_backward(inst->type, 0.0, 6.9999); + break; + case 1: //channel + *p = map_value_backward(inst->chan, 0.0, 7.9999); + break; + } +} + +//--------------------------------------------------- +void f0r_update(f0r_instance_t instance, double time, const uint32_t* inframe, uint32_t* outframe) +{ + + assert(instance); + tp_inst_t* inst = (tp_inst_t*)instance; + + float2color(inst->sl, outframe, inst->w , inst->h, inst->chan); + +} diff --git a/src/generator/test_pat/test_pat_R.c b/src/generator/test_pat/test_pat_R.c new file mode 100644 index 0000000..ca029ed --- /dev/null +++ b/src/generator/test_pat/test_pat_R.c @@ -0,0 +1,1036 @@ +/* +test_pat_R +This frei0r plugin generates resolution test patterns +Version 0.1 may 2010 + +Copyright (C) 2010 Marko Cebokli http://lea.hamradio.si/~s57uuu + + + 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. + +*/ + +/*********************************************************** +Test patterns: Resolution and spatial frequency response + +The patterns are drawn into a temporary float array, for two reasons: +1. drawing routines are color model independent, +2. drawing is done only when a parameter changes. + +only the function float2color() +needs to care about color models, endianness, DV legality etc. + +*************************************************************/ + +//compile: gcc -Wall -std=c99 -c -fPIC test_pat_R.c -o test_pat_R.o + +//link: gcc -lm -shared -o test_pat_R.so test_pat_R.o + +#include +#include +#include +#include + +#include "frei0r.h" + + + +double PI=3.14159265358979; + +typedef struct + { + float r; + float g; + float b; + float a; + } float_rgba; + + +//---------------------------------------------------------- +void draw_rectangle(float *sl, int w, int h, int x, int y, int wr, int hr, float gray) +{ +int i,j; +int zx,kx,zy,ky; + +zx=x; if (zx<0) zx=0; +zy=y; if (zy<0) zy=0; +kx=x+wr; if (kx>w) kx=w; +ky=y+hr; if (ky>h) ky=h; +for (i=zy;i9)) return; + +if ((seg[d]&0x80)!=0) draw_rectangle(sl,w,h,x, y-2*v,v,1,gray); +if ((seg[d]&0x40)!=0) draw_rectangle(sl,w,h,x, y-2*v,1,v,gray); +if ((seg[d]&0x20)!=0) draw_rectangle(sl,w,h,x+v,y-2*v,1,v,gray); +if ((seg[d]&0x10)!=0) draw_rectangle(sl,w,h,x, y-v, v,1,gray); +if ((seg[d]&0x08)!=0) draw_rectangle(sl,w,h,x, y-v, 1,v,gray); +if ((seg[d]&0x04)!=0) draw_rectangle(sl,w,h,x+v,y-v, 1,v,gray); +if ((seg[d]&0x02)!=0) draw_rectangle(sl,w,h,x ,y, v,1,gray); +} + +//----------------------------------------------------------------- +//draw a floating point number, using disp7s() +//v=size +//n=number +//f=format (as in printf, for example %5.1f) +void dispF(float *sl, int w, int h, int x, int y, int v, float n, char *f, float gray) +{ +char str[64]; +int i; + +sprintf(str,f,n); +i=0; +while (str[i]!=0) + { + if (str[i]=='-') + draw_rectangle(sl,w,h,x+i*(v+v/3+1),y-v,v,1,gray); + else + disp7s(sl,w,h,x+i*(v+v/3+1),y,v,str[i]-48,gray); + i++; + } + +} + +//----------------------------------------------------------- +//sweep parallel with bars +//x,y,wr,hr same as in draw_rectangle() +//f1, f2 as fraction of Nyquist +//a = amplitude, 1.0=100% mod [0.0...1.0] +//dir: 0=vertical 1=horizontal sweep +//linp: 0=linear frequency sweep 1=linear period sweep +void draw_sweep_1(float *sl, int w, int h, int x, int y, int wr, int hr, float f1, float f2, float a, int dir, int linp) +{ +int i,j; +int zx,kx,zy,ky; +double p,dp,dp1,dp2,dt,dt1,dt2; + +zx=x; if (zx<0) zx=0; +zy=y; if (zy<0) zy=0; +kx=x+wr; if (kx>w) kx=w; +ky=y+hr; if (ky>h) ky=h; + +dp1=PI*f1; dp2=PI*f2; //phase steps +dt1=1.0/dp1; dt2=1.0/dp2; +a=a/2.0; + +p=0; +if (dir==0) + { + for (i=zy;iw) kx=w; +ky=y+hr; if (ky>h) ky=h; + +dp1=PI*f1; dp2=PI*f2; //phase steps +dt1=1.0/dp1; dt2=1.0/dp2; +a=a/2.0; + +p=0; +if (dir==0) + { + for (i=zy;i=0.0)&&(xl<=1.0)) + { + x=w/8-60; + y=h/16+xl*(14*h/16); + draw_rectangle(sl,w,h,w/8-15,y,10,3,0.9); + dispF(sl,w,h,x,y+6,6,lf1[i],"%5.2f",0.9); + } + } + for (i=0;i=0.0)&&(xl<=1.0)) + { + x=7*w/8+10; + y=h/16+xl*(14*h/16); + draw_rectangle(sl,w,h,7*w/8+5,y,10,3,0.9); + dispF(sl,w,h,x,y+6,6,lf3[i],"%4.0f",0.9); + } + } + } +else //lin period sweep + { + for (i=0;i=0.0)&&(xl<=1.0)) + { + x=w/8-60; + y=h/16+xl*(14*h/16); + draw_rectangle(sl,w,h,w/8-15,y,10,3,0.9); + dispF(sl,w,h,x,y+6,6,lf2[i],"%5.2f",0.9); + } + } + for (i=0;i=0.0)&&(xl<=1.0)) + { + x=7*w/8+10; + y=h/16+xl*(14*h/16); + draw_rectangle(sl,w,h,7*w/8+5,y,10,3,0.9); + dispF(sl,w,h,x,y+6,6,lf4[i],"%4.0f",0.9); + } + } + } +} + +//-------------------------------------------------------------- +//horizontal sweep with labels (frequency changes with x) +//a=axis 0=horizontal frequencies 1=vert freqs +//amp = amplitude +//lps: 0=lin f sweep 1=lin p sweep +//ar = pixel aspect ratio (used only for LPPH labels on hor f) +//sf,ef start,end freqs in Nyquists +//LPPH (lines per picture height) labels are in "TV lines", +//not line pairs. Line pairs = TV lines / 2.0 +//lf* arrays determine where the labels will be drawn +void sweep_h(float *sl, int w, int h, int a, float amp, int lps, float ar, float sf, float ef) +{ +float xl,nf; +float lf1[]={0.05,0.2,0.3,0.4,0.5,0.6,0.7}; //label lin f nyq +float lf2[]={0.05,0.07,0.1,0.15,0.3,0.7}; //label lin p nyq +float lf3[]={100.0,200.0,300.0,400.0,500.0,600.0,700.0,800.0,900.0}; +float lf4[]={10.0,25.0,50.0,100.0,200.0,400.0,800.0}; +int i,x,y; + +for (x=0;x=0.0)&&(xl<=1.0)) + { + y=7*h/8+25; + x=w/16+xl*(14*w/16); + draw_rectangle(sl,w,h,x,y-20,3,10,0.9); + dispF(sl,w,h,x-20,y+6,6,lf1[i],"%5.2f",0.9); + } + } + for (i=0;i=0.0)&&(xl<=1.0)) + { + y=h/8-25; + x=w/16+xl*(14*w/16); + draw_rectangle(sl,w,h,x,y+8,3,10,0.9); + dispF(sl,w,h,x-20,y+2,6,lf3[i],"%4.0f",0.9); + } + } + } +else //lin period sweep + { + for (i=0;i=0.0)&&(xl<=1.0)) + { + y=7*h/8+25; + x=w/16+xl*(14*w/16); + draw_rectangle(sl,w,h,x,y-20,3,10,0.9); + dispF(sl,w,h,x-20,y+6,6,lf2[i],"%5.2f",0.9); + } + } + for (i=0;i=0.0)&&(xl<=1.0)) + { + y=h/8-25; + x=w/16+xl*(14*w/16); + draw_rectangle(sl,w,h,x,y+8,3,10,0.9); + dispF(sl,w,h,x-20,y+2,6,lf4[i],"%4.0f",0.9); + } + } + } +} + +//---------------------------------------------------------- +//draws a "Siemens star" pattern +//ar = pixel aspect ratio (not used currently) +//np = numbers of periods around the circle +void radials(float *sl, int w, int h, float a, float ar, float np) +{ +float an,s,c,g,da,r,rmin,rmax; +int x,y; + +da=PI/2000.0; + +for (x=0;xname = "test_pat_R"; + tp_info->author = "Marko Cebokli"; + tp_info->plugin_type = F0R_PLUGIN_TYPE_SOURCE; +// tp_info->plugin_type = F0R_PLUGIN_TYPE_FILTER; + tp_info->color_model = F0R_COLOR_MODEL_RGBA8888; + tp_info->frei0r_version = FREI0R_MAJOR_VERSION; + tp_info->major_version = 0; + tp_info->minor_version = 1; + tp_info->num_params = 8; + tp_info->explanation = "Generates resolution test patterns"; +} + +//-------------------------------------------------- +void f0r_get_param_info(f0r_param_info_t* info, int param_index) +{ + switch (param_index) + { + case 0: + info->name = "Type"; + info->type = F0R_PARAM_DOUBLE; + info->explanation = "Type of test pattern"; break; + case 1: + info->name ="Channel"; + info->type = F0R_PARAM_DOUBLE; + info->explanation = "Into which color channel to draw"; + break; + case 2: + info->name = "Amplitude"; + info->type = F0R_PARAM_DOUBLE; + info->explanation = "Amplitude (contrast) of the pattern"; + break; + case 3: + info->name = "Lin P swp"; + info->type = F0R_PARAM_BOOL; + info->explanation = "Use linear period sweep"; + break; + case 4: + info->name = "Freq 1"; + info->type = F0R_PARAM_DOUBLE; + info->explanation = "Pattern 7 H frequency"; + break; + case 5: + info->name = "Freq 2"; + info->type = F0R_PARAM_DOUBLE; + info->explanation = "Pattern 7 V frequency"; + break; + case 6: + info->name ="Aspect type"; + info->type = F0R_PARAM_DOUBLE; + info->explanation = "Pixel aspect ratio presets"; + break; + case 7: + info->name = "Manual aspect"; + info->type = F0R_PARAM_DOUBLE; + info->explanation = "Manual pixel aspect ratio"; + break; + } +} + +//-------------------------------------------------- +f0r_instance_t f0r_construct(unsigned int width, unsigned int height) +{ + tp_inst_t* inst = calloc(1, sizeof(*inst)); + inst->w = width; + inst->h = height; + + inst->type=0; + inst->chan=0; + inst->amp=0.8; + inst->linp=0; + inst->f1=0.03; + inst->f2=0.03; + inst->aspt=0; + inst->mpar=1.0; + + inst->par=1.0; + inst->sl=(float*)calloc(width*height,sizeof(float)); + + sweep_v(inst->sl, inst->w, inst->h, 0, inst->amp, inst->linp, inst->par, 0.05, 0.7); + + return (f0r_instance_t)inst; +} + +//-------------------------------------------------- +void f0r_destruct(f0r_instance_t instance) +{ + tp_inst_t* inst = (tp_inst_t*)instance; + + free(inst->sl); + free(inst); +} + +//-------------------------------------------------- +void f0r_set_param_value(f0r_instance_t instance, f0r_param_t param, int param_index) +{ + tp_inst_t* inst = (tp_inst_t*)instance; + + f0r_param_double* p = (f0r_param_double*) param; + + int chg,tmpi; + float tmpf; + + chg=0; + switch (param_index) + { + case 0: //type + tmpf=*((double*)p); + if (tmpf>=1.0) + tmpi=(int)tmpf; + else + tmpi = map_value_forward(tmpf, 0.0, 9.9999); + if ((tmpi<0)||(tmpi>9.0)) break; + if (inst->type != tmpi) chg=1; + inst->type = tmpi; + break; + case 1: //channel + tmpf=*((double*)p); + if (tmpf>=1.0) + tmpi=(int)tmpf; + else + tmpi = map_value_forward(tmpf, 0.0, 7.9999); + if ((tmpi<0)||(tmpi>7.0)) break; + if (inst->chan != tmpi) chg=1; + inst->chan = tmpi; + case 2: //amplitude + tmpf = map_value_forward(*((double*)p), 0.0, 1.0); + if (inst->amp != tmpf) chg=1; + inst->amp = tmpf; + break; + case 3: //linear period sweep + tmpi = map_value_forward(*((double*)p), 0.0, 1.0); + if (inst->linp != tmpi) chg=1; + inst->linp = tmpi; + break; + case 4: //frequency 1 + tmpf = map_value_forward(*((double*)p), 0.0, 1.0); + if (inst->f1 != tmpf) chg=1; + inst->f1 = tmpf; + break; + case 5: //frequency 2 + tmpf = map_value_forward(*((double*)p), 0.0, 1.0); + if (inst->f2 != tmpf) chg=1; + inst->f2 = tmpf; + break; + case 6: //aspect type + tmpf=*((double*)p); + if (tmpf>=1.0) + tmpi=(int)tmpf; + else + tmpi = map_value_forward(tmpf, 0.0, 6.9999); + if ((tmpi<0)||(tmpi>6.0)) break; + if (inst->aspt != tmpi) chg=1; + inst->aspt = tmpi; + switch (inst->aspt) //pixel aspect ratio + { + case 0: inst->par=1.000;break; //square pixels + case 1: inst->par=1.067;break; //PAL DV + case 2: inst->par=1.455;break; //PAL wide + case 3: inst->par=0.889;break; //NTSC DV + case 4: inst->par=1.212;break; //NTSC wide + case 5: inst->par=1.333;break; //HDV + case 6: inst->par=inst->mpar;break; //manual + } + break; + case 7: //manual aspect + tmpf = map_value_forward_log(*((double*)p), 0.5, 2.0); + if (inst->mpar != tmpf) chg=1; + inst->mpar = tmpf; + if (inst->aspt==6) inst->par=inst->mpar; + break; + } + + if (chg==0) return; + + switch (inst->type) + { + case 0: //hor freq ver sweep + sweep_v(inst->sl, inst->w, inst->h, 0, inst->amp, inst->linp, inst->par, 0.05, 0.7); + break; + case 1: //hor freq hor sweep + sweep_h(inst->sl, inst->w, inst->h, 0, inst->amp, inst->linp, inst->par, 0.05, 0.7); + break; + case 2: //ver freq ver sweep + sweep_v(inst->sl, inst->w, inst->h, 1, inst->amp, inst->linp, inst->par, 0.05, 0.7); //ver f ver sw + break; + case 3: //ver freq hor sweep + sweep_h(inst->sl, inst->w, inst->h, 1, inst->amp, inst->linp, inst->par, 0.05, 0.7); + break; + case 4: // "Siemens star" + radials(inst->sl, inst->w, inst->h, inst->amp, inst->par, 60.0); + break; + case 5: //rings outwards + rings(inst->sl, inst->w, inst->h, inst->amp, inst->par, inst->linp, 0.05, 0.7); + break; + case 6: //rings inwards + rings(inst->sl, inst->w, inst->h, inst->amp, inst->par, inst->linp, 0.7, 0.05); + break; + case 7: //uniform 2D spatial frequency + diags(inst->sl, inst->w, inst->h, inst->amp, inst->par, inst->f1, inst->f2); + break; + case 8: // "Nyquist blocks" + nblocks(inst->sl, inst->w, inst->h, inst->amp); + break; + case 9: //square bars at integer Nyquist fractions + sqbars(inst->sl, inst->w, inst->h, inst->amp); + break; + default: + break; + } + +} + +//------------------------------------------------- +void f0r_get_param_value(f0r_instance_t instance, f0r_param_t param, int param_index) +{ + tp_inst_t* inst = (tp_inst_t*)instance; + + f0r_param_double* p = (f0r_param_double*) param; + + switch (param_index) + { + case 0: //type + *p = map_value_backward(inst->type, 0.0, 9.9999); + break; + case 1: //channel + *p = map_value_backward(inst->chan, 0.0, 7.9999); + break; + case 2: //amplitude + *p = map_value_backward(inst->amp, 0.0, 1.0); + break; + case 3: //linear period sweep + *p = map_value_backward(inst->linp, 0.0, 1.0); + break; + case 4: //frequency 1 + *p = map_value_backward_log(inst->f1, 0.0, 1.0); + break; + case 5: //frequency 2 + *p = map_value_backward_log(inst->f2, 0.0, 1.0); + break; + case 6: //aspect type + *p = map_value_backward(inst->aspt, 0.0, 6.9999); + break; + case 7: //manual aspect + *p = map_value_backward_log(inst->mpar, 0.5, 2.0); + break; + } +} + +//--------------------------------------------------- +void f0r_update(f0r_instance_t instance, double time, const uint32_t* inframe, uint32_t* outframe) +{ + + assert(instance); + tp_inst_t* inst = (tp_inst_t*)instance; + + float2color(inst->sl, outframe, inst->w , inst->h, inst->chan); + +} diff --git a/src/mixer2/CMakeLists.txt b/src/mixer2/CMakeLists.txt new file mode 100644 index 0000000..71b5dea --- /dev/null +++ b/src/mixer2/CMakeLists.txt @@ -0,0 +1,30 @@ +add_subdirectory (addition) +add_subdirectory (addition_alpha) +add_subdirectory (alphaatop) +add_subdirectory (alphain) +add_subdirectory (alphainjection) +add_subdirectory (alphaout) +add_subdirectory (alphaover) +add_subdirectory (alphaxor) +add_subdirectory (blend) +add_subdirectory (burn) +add_subdirectory (color_only) +add_subdirectory (composition) +add_subdirectory (darken) +add_subdirectory (difference) +add_subdirectory (divide) +add_subdirectory (dodge) +add_subdirectory (grain_extract) +add_subdirectory (grain_merge) +add_subdirectory (hardlight) +add_subdirectory (hue) +add_subdirectory (lighten) +add_subdirectory (multiply) +add_subdirectory (overlay) +add_subdirectory (saturation) +add_subdirectory (screen) +add_subdirectory (softlight) +add_subdirectory (subtract) +add_subdirectory (uvmap) +add_subdirectory (value) +add_subdirectory (xfade0r) diff --git a/src/mixer2/addition/CMakeLists.txt b/src/mixer2/addition/CMakeLists.txt new file mode 100644 index 0000000..b0cfaed --- /dev/null +++ b/src/mixer2/addition/CMakeLists.txt @@ -0,0 +1,11 @@ +set (SOURCES addition.cpp) +set (TARGET addition) + +if (MSVC) + set (SOURCES ${SOURCES} ${FREI0R_1_1_DEF}) +endif (MSVC) + +add_library (${TARGET} MODULE ${SOURCES}) +set_target_properties (${TARGET} PROPERTIES PREFIX "") + +install (TARGETS ${TARGET} LIBRARY DESTINATION ${LIBDIR}) diff --git a/src/mixer2/addition_alpha/CMakeLists.txt b/src/mixer2/addition_alpha/CMakeLists.txt new file mode 100644 index 0000000..d5a7027 --- /dev/null +++ b/src/mixer2/addition_alpha/CMakeLists.txt @@ -0,0 +1,11 @@ +set (SOURCES addition_alpha.cpp) +set (TARGET addition_alpha) + +if (MSVC) + set (SOURCES ${SOURCES} ${FREI0R_1_1_DEF}) +endif (MSVC) + +add_library (${TARGET} MODULE ${SOURCES}) +set_target_properties (${TARGET} PROPERTIES PREFIX "") + +install (TARGETS ${TARGET} LIBRARY DESTINATION ${LIBDIR}) diff --git a/src/mixer2/addition_alpha/addition_alpha.cpp b/src/mixer2/addition_alpha/addition_alpha.cpp new file mode 100644 index 0000000..227f39d --- /dev/null +++ b/src/mixer2/addition_alpha/addition_alpha.cpp @@ -0,0 +1,81 @@ +/* addition_alpha.cpp + * Copyright (C) 2006 Jean-Sebastien Senecal (js@drone.ws) + * 2011 Simon A. Eugster (simon.eu@gmail.com) + * This file is a Frei0r plugin. + * The code is a modified version of code from the Gimp. + * + * 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 "frei0r_math.h" + +#define NBYTES 4 +#define ALPHA 3 + +class addition_alpha : public frei0r::mixer2 +{ +public: + addition_alpha(unsigned int width, unsigned int height) + { + // initialize look-up table + for (int i = 0; i < 256; i++) + add_lut[i] = i; + for (int i = 256; i <= 510; i++) + add_lut[i] = 255; + } + + /** + * + * Perform an RGB[A] addition_alpha operation of the pixel sources in1 + * and in2. + * + * This is a modification of the original addition filter, adding the color of the + * second channel only if its alpha channel is not 0. + * + **/ + void update() + { + const uint8_t *A = reinterpret_cast(in1); + const uint8_t *B = reinterpret_cast(in2); + uint8_t *D = reinterpret_cast(out); + uint32_t sizeCounter = size; + + uint32_t b; + + while (sizeCounter--) + { + for (b = 0; b < ALPHA; b++) + D[b] = add_lut[A[b] + ((B[b]*B[ALPHA])>>8)]; + + D[ALPHA] = 255; + A += NBYTES; + B += NBYTES; + D += NBYTES; + } + } + +private: + static uint8_t add_lut[511]; // look-up table storing values to do a quick MAX of two values when you know you add two unsigned chars +}; + +uint8_t addition_alpha::add_lut[511]; + +frei0r::construct plugin("addition_alpha", + "Perform an RGB[A] addition_alpha operation of the pixel sources.", + "Jean-Sebastien Senecal", + 0,1, + F0R_COLOR_MODEL_RGBA8888); + diff --git a/src/mixer2/alphaatop/CMakeLists.txt b/src/mixer2/alphaatop/CMakeLists.txt new file mode 100644 index 0000000..239216f --- /dev/null +++ b/src/mixer2/alphaatop/CMakeLists.txt @@ -0,0 +1,11 @@ +set (SOURCES alphaatop.cpp) +set (TARGET alphaatop) + +if (MSVC) + set (SOURCES ${SOURCES} ${FREI0R_1_1_DEF}) +endif (MSVC) + +add_library (${TARGET} MODULE ${SOURCES}) +set_target_properties (${TARGET} PROPERTIES PREFIX "") + +install (TARGETS ${TARGET} LIBRARY DESTINATION ${LIBDIR}) diff --git a/src/mixer2/alphain/CMakeLists.txt b/src/mixer2/alphain/CMakeLists.txt new file mode 100644 index 0000000..82d6e33 --- /dev/null +++ b/src/mixer2/alphain/CMakeLists.txt @@ -0,0 +1,11 @@ +set (SOURCES alphain.cpp) +set (TARGET alphain) + +if (MSVC) + set (SOURCES ${SOURCES} ${FREI0R_1_1_DEF}) +endif (MSVC) + +add_library (${TARGET} MODULE ${SOURCES}) +set_target_properties (${TARGET} PROPERTIES PREFIX "") + +install (TARGETS ${TARGET} LIBRARY DESTINATION ${LIBDIR}) diff --git a/src/mixer2/alphainjection/CMakeLists.txt b/src/mixer2/alphainjection/CMakeLists.txt new file mode 100644 index 0000000..c8349e2 --- /dev/null +++ b/src/mixer2/alphainjection/CMakeLists.txt @@ -0,0 +1,12 @@ +set (SOURCES alphainjection.c) +set (TARGET alphainjection) + +if (MSVC) + set_source_files_properties (alphainjection.c PROPERTIES LANGUAGE CXX) + set (SOURCES ${SOURCES} ${FREI0R_1_1_DEF}) +endif (MSVC) + +add_library (${TARGET} MODULE ${SOURCES}) +set_target_properties (${TARGET} PROPERTIES PREFIX "") + +install (TARGETS ${TARGET} LIBRARY DESTINATION ${LIBDIR}) diff --git a/src/mixer2/alphainjection/alphainjection.c b/src/mixer2/alphainjection/alphainjection.c index d603463..e5cf489 100644 --- a/src/mixer2/alphainjection/alphainjection.c +++ b/src/mixer2/alphainjection/alphainjection.c @@ -56,7 +56,7 @@ f0r_instance_t f0r_construct(unsigned int width, unsigned int height) { - alphainjection_instance_t* inst = calloc(1, sizeof(*inst)); + alphainjection_instance_t* inst = (alphainjection_instance_t*)calloc(1, sizeof(*inst)); inst->width = width; inst->height = height; return (f0r_instance_t)inst; } diff --git a/src/mixer2/alphaout/CMakeLists.txt b/src/mixer2/alphaout/CMakeLists.txt new file mode 100644 index 0000000..7ec8bf3 --- /dev/null +++ b/src/mixer2/alphaout/CMakeLists.txt @@ -0,0 +1,11 @@ +set (SOURCES alphaout.cpp) +set (TARGET alphaout) + +if (MSVC) + set (SOURCES ${SOURCES} ${FREI0R_1_1_DEF}) +endif (MSVC) + +add_library (${TARGET} MODULE ${SOURCES}) +set_target_properties (${TARGET} PROPERTIES PREFIX "") + +install (TARGETS ${TARGET} LIBRARY DESTINATION ${LIBDIR}) diff --git a/src/mixer2/alphaover/CMakeLists.txt b/src/mixer2/alphaover/CMakeLists.txt new file mode 100644 index 0000000..32fef11 --- /dev/null +++ b/src/mixer2/alphaover/CMakeLists.txt @@ -0,0 +1,11 @@ +set (SOURCES alphaover.cpp) +set (TARGET alphaover) + +if (MSVC) + set (SOURCES ${SOURCES} ${FREI0R_1_1_DEF}) +endif (MSVC) + +add_library (${TARGET} MODULE ${SOURCES}) +set_target_properties (${TARGET} PROPERTIES PREFIX "") + +install (TARGETS ${TARGET} LIBRARY DESTINATION ${LIBDIR}) diff --git a/src/mixer2/alphaxor/CMakeLists.txt b/src/mixer2/alphaxor/CMakeLists.txt new file mode 100644 index 0000000..a54d89b --- /dev/null +++ b/src/mixer2/alphaxor/CMakeLists.txt @@ -0,0 +1,11 @@ +set (SOURCES alphaxor.cpp) +set (TARGET alphaxor) + +if (MSVC) + set (SOURCES ${SOURCES} ${FREI0R_1_1_DEF}) +endif (MSVC) + +add_library (${TARGET} MODULE ${SOURCES}) +set_target_properties (${TARGET} PROPERTIES PREFIX "") + +install (TARGETS ${TARGET} LIBRARY DESTINATION ${LIBDIR}) diff --git a/src/mixer2/blend/CMakeLists.txt b/src/mixer2/blend/CMakeLists.txt new file mode 100644 index 0000000..aebcaf7 --- /dev/null +++ b/src/mixer2/blend/CMakeLists.txt @@ -0,0 +1,11 @@ +set (SOURCES blend.cpp) +set (TARGET blend) + +if (MSVC) + set (SOURCES ${SOURCES} ${FREI0R_1_1_DEF}) +endif (MSVC) + +add_library (${TARGET} MODULE ${SOURCES}) +set_target_properties (${TARGET} PROPERTIES PREFIX "") + +install (TARGETS ${TARGET} LIBRARY DESTINATION ${LIBDIR}) diff --git a/src/mixer2/burn/CMakeLists.txt b/src/mixer2/burn/CMakeLists.txt new file mode 100644 index 0000000..1443469 --- /dev/null +++ b/src/mixer2/burn/CMakeLists.txt @@ -0,0 +1,11 @@ +set (SOURCES burn.cpp) +set (TARGET burn) + +if (MSVC) + set (SOURCES ${SOURCES} ${FREI0R_1_1_DEF}) +endif (MSVC) + +add_library (${TARGET} MODULE ${SOURCES}) +set_target_properties (${TARGET} PROPERTIES PREFIX "") + +install (TARGETS ${TARGET} LIBRARY DESTINATION ${LIBDIR}) diff --git a/src/mixer2/color_only/CMakeLists.txt b/src/mixer2/color_only/CMakeLists.txt new file mode 100644 index 0000000..c81422f --- /dev/null +++ b/src/mixer2/color_only/CMakeLists.txt @@ -0,0 +1,11 @@ +set (SOURCES color_only.cpp) +set (TARGET color_only) + +if (MSVC) + set (SOURCES ${SOURCES} ${FREI0R_1_1_DEF}) +endif (MSVC) + +add_library (${TARGET} MODULE ${SOURCES}) +set_target_properties (${TARGET} PROPERTIES PREFIX "") + +install (TARGETS ${TARGET} LIBRARY DESTINATION ${LIBDIR}) diff --git a/src/mixer2/composition/CMakeLists.txt b/src/mixer2/composition/CMakeLists.txt new file mode 100644 index 0000000..26ec93f --- /dev/null +++ b/src/mixer2/composition/CMakeLists.txt @@ -0,0 +1,12 @@ +set (SOURCES composition.c) +set (TARGET composition) + +if (MSVC) + set_source_files_properties (composition.c PROPERTIES LANGUAGE CXX) + set (SOURCES ${SOURCES} ${FREI0R_1_1_DEF}) +endif (MSVC) + +add_library (${TARGET} MODULE ${SOURCES}) +set_target_properties (${TARGET} PROPERTIES PREFIX "") + +install (TARGETS ${TARGET} LIBRARY DESTINATION ${LIBDIR}) diff --git a/src/mixer2/composition/composition.c b/src/mixer2/composition/composition.c index bed40bf..926d773 100644 --- a/src/mixer2/composition/composition.c +++ b/src/mixer2/composition/composition.c @@ -57,7 +57,7 @@ f0r_instance_t f0r_construct(unsigned int width, unsigned int height) { - composition_instance_t* inst = calloc(1, sizeof(*inst)); + composition_instance_t* inst = (composition_instance_t*)calloc(1, sizeof(*inst)); inst->width = width; inst->height = height; return (f0r_instance_t)inst; } diff --git a/src/mixer2/darken/CMakeLists.txt b/src/mixer2/darken/CMakeLists.txt new file mode 100644 index 0000000..5c6ace0 --- /dev/null +++ b/src/mixer2/darken/CMakeLists.txt @@ -0,0 +1,11 @@ +set (SOURCES darken.cpp) +set (TARGET darken) + +if (MSVC) + set (SOURCES ${SOURCES} ${FREI0R_1_1_DEF}) +endif (MSVC) + +add_library (${TARGET} MODULE ${SOURCES}) +set_target_properties (${TARGET} PROPERTIES PREFIX "") + +install (TARGETS ${TARGET} LIBRARY DESTINATION ${LIBDIR}) diff --git a/src/mixer2/difference/CMakeLists.txt b/src/mixer2/difference/CMakeLists.txt new file mode 100644 index 0000000..873d5b2 --- /dev/null +++ b/src/mixer2/difference/CMakeLists.txt @@ -0,0 +1,11 @@ +set (SOURCES difference.cpp) +set (TARGET difference) + +if (MSVC) + set (SOURCES ${SOURCES} ${FREI0R_1_1_DEF}) +endif (MSVC) + +add_library (${TARGET} MODULE ${SOURCES}) +set_target_properties (${TARGET} PROPERTIES PREFIX "") + +install (TARGETS ${TARGET} LIBRARY DESTINATION ${LIBDIR}) diff --git a/src/mixer2/divide/CMakeLists.txt b/src/mixer2/divide/CMakeLists.txt new file mode 100644 index 0000000..3575226 --- /dev/null +++ b/src/mixer2/divide/CMakeLists.txt @@ -0,0 +1,11 @@ +set (SOURCES divide.cpp) +set (TARGET divide) + +if (MSVC) + set (SOURCES ${SOURCES} ${FREI0R_1_1_DEF}) +endif (MSVC) + +add_library (${TARGET} MODULE ${SOURCES}) +set_target_properties (${TARGET} PROPERTIES PREFIX "") + +install (TARGETS ${TARGET} LIBRARY DESTINATION ${LIBDIR}) diff --git a/src/mixer2/dodge/CMakeLists.txt b/src/mixer2/dodge/CMakeLists.txt new file mode 100644 index 0000000..87fd21e --- /dev/null +++ b/src/mixer2/dodge/CMakeLists.txt @@ -0,0 +1,11 @@ +set (SOURCES dodge.cpp) +set (TARGET dodge) + +if (MSVC) + set (SOURCES ${SOURCES} ${FREI0R_1_1_DEF}) +endif (MSVC) + +add_library (${TARGET} MODULE ${SOURCES}) +set_target_properties (${TARGET} PROPERTIES PREFIX "") + +install (TARGETS ${TARGET} LIBRARY DESTINATION ${LIBDIR}) diff --git a/src/mixer2/grain_extract/CMakeLists.txt b/src/mixer2/grain_extract/CMakeLists.txt new file mode 100644 index 0000000..df539a2 --- /dev/null +++ b/src/mixer2/grain_extract/CMakeLists.txt @@ -0,0 +1,11 @@ +set (SOURCES grain_extract.cpp) +set (TARGET grain_extract) + +if (MSVC) + set (SOURCES ${SOURCES} ${FREI0R_1_1_DEF}) +endif (MSVC) + +add_library (${TARGET} MODULE ${SOURCES}) +set_target_properties (${TARGET} PROPERTIES PREFIX "") + +install (TARGETS ${TARGET} LIBRARY DESTINATION ${LIBDIR}) diff --git a/src/mixer2/grain_merge/CMakeLists.txt b/src/mixer2/grain_merge/CMakeLists.txt new file mode 100644 index 0000000..df905f3 --- /dev/null +++ b/src/mixer2/grain_merge/CMakeLists.txt @@ -0,0 +1,11 @@ +set (SOURCES grain_merge.cpp) +set (TARGET grain_merge) + +if (MSVC) + set (SOURCES ${SOURCES} ${FREI0R_1_1_DEF}) +endif (MSVC) + +add_library (${TARGET} MODULE ${SOURCES}) +set_target_properties (${TARGET} PROPERTIES PREFIX "") + +install (TARGETS ${TARGET} LIBRARY DESTINATION ${LIBDIR}) diff --git a/src/mixer2/hardlight/CMakeLists.txt b/src/mixer2/hardlight/CMakeLists.txt new file mode 100644 index 0000000..21f7768 --- /dev/null +++ b/src/mixer2/hardlight/CMakeLists.txt @@ -0,0 +1,11 @@ +set (SOURCES hardlight.cpp) +set (TARGET hardlight) + +if (MSVC) + set (SOURCES ${SOURCES} ${FREI0R_1_1_DEF}) +endif (MSVC) + +add_library (${TARGET} MODULE ${SOURCES}) +set_target_properties (${TARGET} PROPERTIES PREFIX "") + +install (TARGETS ${TARGET} LIBRARY DESTINATION ${LIBDIR}) diff --git a/src/mixer2/hue/CMakeLists.txt b/src/mixer2/hue/CMakeLists.txt new file mode 100644 index 0000000..6d34a1d --- /dev/null +++ b/src/mixer2/hue/CMakeLists.txt @@ -0,0 +1,11 @@ +set (SOURCES hue.cpp) +set (TARGET hue) + +if (MSVC) + set (SOURCES ${SOURCES} ${FREI0R_1_1_DEF}) +endif (MSVC) + +add_library (${TARGET} MODULE ${SOURCES}) +set_target_properties (${TARGET} PROPERTIES PREFIX "") + +install (TARGETS ${TARGET} LIBRARY DESTINATION ${LIBDIR}) diff --git a/src/mixer2/lighten/CMakeLists.txt b/src/mixer2/lighten/CMakeLists.txt new file mode 100644 index 0000000..3672105 --- /dev/null +++ b/src/mixer2/lighten/CMakeLists.txt @@ -0,0 +1,11 @@ +set (SOURCES lighten.cpp) +set (TARGET lighten) + +if (MSVC) + set (SOURCES ${SOURCES} ${FREI0R_1_1_DEF}) +endif (MSVC) + +add_library (${TARGET} MODULE ${SOURCES}) +set_target_properties (${TARGET} PROPERTIES PREFIX "") + +install (TARGETS ${TARGET} LIBRARY DESTINATION ${LIBDIR}) diff --git a/src/mixer2/multiply/CMakeLists.txt b/src/mixer2/multiply/CMakeLists.txt new file mode 100644 index 0000000..db5d4ba --- /dev/null +++ b/src/mixer2/multiply/CMakeLists.txt @@ -0,0 +1,11 @@ +set (SOURCES multiply.cpp) +set (TARGET multiply) + +if (MSVC) + set (SOURCES ${SOURCES} ${FREI0R_1_1_DEF}) +endif (MSVC) + +add_library (${TARGET} MODULE ${SOURCES}) +set_target_properties (${TARGET} PROPERTIES PREFIX "") + +install (TARGETS ${TARGET} LIBRARY DESTINATION ${LIBDIR}) diff --git a/src/mixer2/overlay/CMakeLists.txt b/src/mixer2/overlay/CMakeLists.txt new file mode 100644 index 0000000..27810d3 --- /dev/null +++ b/src/mixer2/overlay/CMakeLists.txt @@ -0,0 +1,11 @@ +set (SOURCES overlay.cpp) +set (TARGET overlay) + +if (MSVC) + set (SOURCES ${SOURCES} ${FREI0R_1_1_DEF}) +endif (MSVC) + +add_library (${TARGET} MODULE ${SOURCES}) +set_target_properties (${TARGET} PROPERTIES PREFIX "") + +install (TARGETS ${TARGET} LIBRARY DESTINATION ${LIBDIR}) diff --git a/src/mixer2/saturation/CMakeLists.txt b/src/mixer2/saturation/CMakeLists.txt new file mode 100644 index 0000000..6011e9e --- /dev/null +++ b/src/mixer2/saturation/CMakeLists.txt @@ -0,0 +1,11 @@ +set (SOURCES saturation.cpp) +set (TARGET saturation) + +if (MSVC) + set (SOURCES ${SOURCES} ${FREI0R_1_1_DEF}) +endif (MSVC) + +add_library (${TARGET} MODULE ${SOURCES}) +set_target_properties (${TARGET} PROPERTIES PREFIX "") + +install (TARGETS ${TARGET} LIBRARY DESTINATION ${LIBDIR}) diff --git a/src/mixer2/screen/CMakeLists.txt b/src/mixer2/screen/CMakeLists.txt new file mode 100644 index 0000000..8fd6536 --- /dev/null +++ b/src/mixer2/screen/CMakeLists.txt @@ -0,0 +1,11 @@ +set (SOURCES screen.cpp) +set (TARGET screen) + +if (MSVC) + set (SOURCES ${SOURCES} ${FREI0R_1_1_DEF}) +endif (MSVC) + +add_library (${TARGET} MODULE ${SOURCES}) +set_target_properties (${TARGET} PROPERTIES PREFIX "") + +install (TARGETS ${TARGET} LIBRARY DESTINATION ${LIBDIR}) diff --git a/src/mixer2/softlight/CMakeLists.txt b/src/mixer2/softlight/CMakeLists.txt new file mode 100644 index 0000000..7640d4f --- /dev/null +++ b/src/mixer2/softlight/CMakeLists.txt @@ -0,0 +1,11 @@ +set (SOURCES softlight.cpp) +set (TARGET softlight) + +if (MSVC) + set (SOURCES ${SOURCES} ${FREI0R_1_1_DEF}) +endif (MSVC) + +add_library (${TARGET} MODULE ${SOURCES}) +set_target_properties (${TARGET} PROPERTIES PREFIX "") + +install (TARGETS ${TARGET} LIBRARY DESTINATION ${LIBDIR}) diff --git a/src/mixer2/subtract/CMakeLists.txt b/src/mixer2/subtract/CMakeLists.txt new file mode 100644 index 0000000..e8e00fb --- /dev/null +++ b/src/mixer2/subtract/CMakeLists.txt @@ -0,0 +1,11 @@ +set (SOURCES subtract.cpp) +set (TARGET subtract) + +if (MSVC) + set (SOURCES ${SOURCES} ${FREI0R_1_1_DEF}) +endif (MSVC) + +add_library (${TARGET} MODULE ${SOURCES}) +set_target_properties (${TARGET} PROPERTIES PREFIX "") + +install (TARGETS ${TARGET} LIBRARY DESTINATION ${LIBDIR}) diff --git a/src/mixer2/uvmap/CMakeLists.txt b/src/mixer2/uvmap/CMakeLists.txt new file mode 100644 index 0000000..ad7afd0 --- /dev/null +++ b/src/mixer2/uvmap/CMakeLists.txt @@ -0,0 +1,12 @@ +set (SOURCES uvmap.c) +set (TARGET uvmap) + +if (MSVC) + set_source_files_properties (uvmap.c PROPERTIES LANGUAGE CXX) + set (SOURCES ${SOURCES} ${FREI0R_1_1_DEF}) +endif (MSVC) + +add_library (${TARGET} MODULE ${SOURCES}) +set_target_properties (${TARGET} PROPERTIES PREFIX "") + +install (TARGETS ${TARGET} LIBRARY DESTINATION ${LIBDIR}) diff --git a/src/mixer2/uvmap/uvmap.c b/src/mixer2/uvmap/uvmap.c index adcf6d6..93c97db 100644 --- a/src/mixer2/uvmap/uvmap.c +++ b/src/mixer2/uvmap/uvmap.c @@ -57,7 +57,7 @@ f0r_instance_t f0r_construct(unsigned int width, unsigned int height) { - uvmap_instance_t* inst = calloc(1, sizeof(*inst)); + uvmap_instance_t* inst = (uvmap_instance_t*)calloc(1, sizeof(*inst)); inst->width = width; inst->height = height; return (f0r_instance_t)inst; } @@ -75,6 +75,11 @@ f0r_param_t param, int param_index) { /* no params */ } +#if defined(_MSC_VER) +__inline const long int lrintf(float x){ + return (long int)(x+0.5); +} +#endif /* _MSC_VER */ void f0r_update2(f0r_instance_t instance, double time, diff --git a/src/mixer2/value/CMakeLists.txt b/src/mixer2/value/CMakeLists.txt new file mode 100644 index 0000000..6e48547 --- /dev/null +++ b/src/mixer2/value/CMakeLists.txt @@ -0,0 +1,11 @@ +set (SOURCES value.cpp) +set (TARGET value) + +if (MSVC) + set (SOURCES ${SOURCES} ${FREI0R_1_1_DEF}) +endif (MSVC) + +add_library (${TARGET} MODULE ${SOURCES}) +set_target_properties (${TARGET} PROPERTIES PREFIX "") + +install (TARGETS ${TARGET} LIBRARY DESTINATION ${LIBDIR}) diff --git a/src/mixer2/xfade0r/CMakeLists.txt b/src/mixer2/xfade0r/CMakeLists.txt new file mode 100644 index 0000000..7bdc5af --- /dev/null +++ b/src/mixer2/xfade0r/CMakeLists.txt @@ -0,0 +1,11 @@ +set (SOURCES xfade0r.cpp) +set (TARGET xfade0r) + +if (MSVC) + set (SOURCES ${SOURCES} ${FREI0R_1_1_DEF}) +endif (MSVC) + +add_library (${TARGET} MODULE ${SOURCES}) +set_target_properties (${TARGET} PROPERTIES PREFIX "") + +install (TARGETS ${TARGET} LIBRARY DESTINATION ${LIBDIR}) diff --git a/src/mixer3/CMakeLists.txt b/src/mixer3/CMakeLists.txt new file mode 100644 index 0000000..d85f61e --- /dev/null +++ b/src/mixer3/CMakeLists.txt @@ -0,0 +1 @@ +add_subdirectory (RGB) \ No newline at end of file diff --git a/src/mixer3/RGB/CMakeLists.txt b/src/mixer3/RGB/CMakeLists.txt new file mode 100644 index 0000000..cc0feda --- /dev/null +++ b/src/mixer3/RGB/CMakeLists.txt @@ -0,0 +1,12 @@ +set (SOURCES RGB.c) +set (TARGET RGB) + +if (MSVC) + set_source_files_properties (RGB.c PROPERTIES LANGUAGE CXX) + set (SOURCES ${SOURCES} ${FREI0R_1_1_DEF}) +endif (MSVC) + +add_library (${TARGET} MODULE ${SOURCES}) +set_target_properties (${TARGET} PROPERTIES PREFIX "") + +install (TARGETS ${TARGET} LIBRARY DESTINATION ${LIBDIR}) diff --git a/src/mixer3/RGB/RGB.c b/src/mixer3/RGB/RGB.c index 0a8ce90..deab6be 100644 --- a/src/mixer3/RGB/RGB.c +++ b/src/mixer3/RGB/RGB.c @@ -56,7 +56,7 @@ f0r_instance_t f0r_construct(unsigned int width, unsigned int height) { - RGB_instance_t* inst = calloc(1, sizeof(*inst)); + RGB_instance_t* inst = (RGB_instance_t*)calloc(1, sizeof(*inst)); inst->width = width; inst->height = height; return (f0r_instance_t)inst; } diff --git a/web/.gitignore b/web/.gitignore new file mode 100644 index 0000000..0fd672b --- /dev/null +++ b/web/.gitignore @@ -0,0 +1,11 @@ +*.html +*.pdf +*.tex +*.txt +apache.conf +templates_c/ +cache +filter +generator +mixer2 +mixer3 diff --git a/web/Doxyfile b/web/Doxyfile new file mode 100644 index 0000000..988f519 --- /dev/null +++ b/web/Doxyfile @@ -0,0 +1,1517 @@ +# Doxyfile 1.6.1 + +# This file describes the settings to be used by the documentation system +# doxygen (www.doxygen.org) for a project +# +# All text after a hash (#) is considered a comment and will be ignored +# The format is: +# TAG = value [value, ...] +# For lists items can also be appended using: +# TAG += value [value, ...] +# Values that contain spaces should be placed between quotes (" ") + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- + +# This tag specifies the encoding used for all characters in the config file +# that follow. The default is UTF-8 which is also the encoding used for all +# text before the first occurrence of this tag. Doxygen uses libiconv (or the +# iconv built into libc) for the transcoding. See +# http://www.gnu.org/software/libiconv for the list of possible encodings. + +DOXYFILE_ENCODING = UTF-8 + +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded +# by quotes) that should identify the project. + +PROJECT_NAME = frei0r + +# The PROJECT_NUMBER tag can be used to enter a project or revision number. +# This could be handy for archiving the generated documentation or +# if some version control system is used. + +PROJECT_NUMBER = + +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) +# base path where the generated documentation will be put. +# If a relative path is entered, it will be relative to the location +# where doxygen was started. If left blank the current directory will be used. + +OUTPUT_DIRECTORY = web/codedoc + +# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create +# 4096 sub-directories (in 2 levels) under the output directory of each output +# format and will distribute the generated files over these directories. +# Enabling this option can be useful when feeding doxygen a huge amount of +# source files, where putting all generated files in the same directory would +# otherwise cause performance problems for the file system. + +CREATE_SUBDIRS = NO + +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# The default language is English, other supported languages are: +# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, +# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German, +# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English +# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, +# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak, +# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese. + +OUTPUT_LANGUAGE = English + +# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will +# include brief member descriptions after the members that are listed in +# the file and class documentation (similar to JavaDoc). +# Set to NO to disable this. + +BRIEF_MEMBER_DESC = YES + +# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend +# the brief description of a member or function before the detailed description. +# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# brief descriptions will be completely suppressed. + +REPEAT_BRIEF = YES + +# This tag implements a quasi-intelligent brief description abbreviator +# that is used to form the text in various listings. Each string +# in this list, if found as the leading text of the brief description, will be +# stripped from the text and the result after processing the whole list, is +# used as the annotated text. Otherwise, the brief description is used as-is. +# If left blank, the following values are used ("$name" is automatically +# replaced with the name of the entity): "The $name class" "The $name widget" +# "The $name file" "is" "provides" "specifies" "contains" +# "represents" "a" "an" "the" + +ABBREVIATE_BRIEF = + +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# Doxygen will generate a detailed section even if there is only a brief +# description. + +ALWAYS_DETAILED_SEC = NO + +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all +# inherited members of a class in the documentation of that class as if those +# members were ordinary class members. Constructors, destructors and assignment +# operators of the base classes will not be shown. + +INLINE_INHERITED_MEMB = NO + +# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full +# path before files name in the file list and in the header files. If set +# to NO the shortest path that makes the file name unique will be used. + +FULL_PATH_NAMES = YES + +# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag +# can be used to strip a user-defined part of the path. Stripping is +# only done if one of the specified strings matches the left-hand part of +# the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the +# path to strip. + +STRIP_FROM_PATH = + +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of +# the path mentioned in the documentation of a class, which tells +# the reader which header file to include in order to use a class. +# If left blank only the name of the header file containing the class +# definition is used. Otherwise one should specify the include paths that +# are normally passed to the compiler using the -I flag. + +STRIP_FROM_INC_PATH = + +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter +# (but less readable) file names. This can be useful is your file systems +# doesn't support long names like on DOS, Mac, or CD-ROM. + +SHORT_NAMES = NO + +# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen +# will interpret the first line (until the first dot) of a JavaDoc-style +# comment as the brief description. If set to NO, the JavaDoc +# comments will behave just like regular Qt-style comments +# (thus requiring an explicit @brief command for a brief description.) + +JAVADOC_AUTOBRIEF = NO + +# If the QT_AUTOBRIEF tag is set to YES then Doxygen will +# interpret the first line (until the first dot) of a Qt-style +# comment as the brief description. If set to NO, the comments +# will behave just like regular Qt-style comments (thus requiring +# an explicit \brief command for a brief description.) + +QT_AUTOBRIEF = NO + +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen +# treat a multi-line C++ special comment block (i.e. a block of //! or /// +# comments) as a brief description. This used to be the default behaviour. +# The new default is to treat a multi-line C++ comment block as a detailed +# description. Set this tag to YES if you prefer the old behaviour instead. + +MULTILINE_CPP_IS_BRIEF = NO + +# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented +# member inherits the documentation from any documented member that it +# re-implements. + +INHERIT_DOCS = YES + +# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce +# a new page for each member. If set to NO, the documentation of a member will +# be part of the file/class/namespace that contains it. + +SEPARATE_MEMBER_PAGES = NO + +# The TAB_SIZE tag can be used to set the number of spaces in a tab. +# Doxygen uses this value to replace tabs by spaces in code fragments. + +TAB_SIZE = 8 + +# This tag can be used to specify a number of aliases that acts +# as commands in the documentation. An alias has the form "name=value". +# For example adding "sideeffect=\par Side Effects:\n" will allow you to +# put the command \sideeffect (or @sideeffect) in the documentation, which +# will result in a user-defined paragraph with heading "Side Effects:". +# You can put \n's in the value part of an alias to insert newlines. + +ALIASES = + +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C +# sources only. Doxygen will then generate output that is more tailored for C. +# For instance, some of the names that are used will be different. The list +# of all members will be omitted, etc. + +OPTIMIZE_OUTPUT_FOR_C = YES + +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java +# sources only. Doxygen will then generate output that is more tailored for +# Java. For instance, namespaces will be presented as packages, qualified +# scopes will look different, etc. + +OPTIMIZE_OUTPUT_JAVA = NO + +# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran +# sources only. Doxygen will then generate output that is more tailored for +# Fortran. + +OPTIMIZE_FOR_FORTRAN = NO + +# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL +# sources. Doxygen will then generate output that is tailored for +# VHDL. + +OPTIMIZE_OUTPUT_VHDL = NO + +# Doxygen selects the parser to use depending on the extension of the files it parses. +# With this tag you can assign which parser to use for a given extension. +# Doxygen has a built-in mapping, but you can override or extend it using this tag. +# The format is ext=language, where ext is a file extension, and language is one of +# the parsers supported by doxygen: IDL, Java, Javascript, C#, C, C++, D, PHP, +# Objective-C, Python, Fortran, VHDL, C, C++. For instance to make doxygen treat +# .inc files as Fortran files (default is PHP), and .f files as C (default is Fortran), +# use: inc=Fortran f=C. Note that for custom extensions you also need to set FILE_PATTERNS otherwise the files are not read by doxygen. + +EXTENSION_MAPPING = + +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want +# to include (a tag file for) the STL sources as input, then you should +# set this tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. +# func(std::string) {}). This also make the inheritance and collaboration +# diagrams that involve STL classes more complete and accurate. + +BUILTIN_STL_SUPPORT = NO + +# If you use Microsoft's C++/CLI language, you should set this option to YES to +# enable parsing support. + +CPP_CLI_SUPPORT = NO + +# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. +# Doxygen will parse them like normal C++ but will assume all classes use public +# instead of private inheritance when no explicit protection keyword is present. + +SIP_SUPPORT = NO + +# For Microsoft's IDL there are propget and propput attributes to indicate getter +# and setter methods for a property. Setting this option to YES (the default) +# will make doxygen to replace the get and set methods by a property in the +# documentation. This will only work if the methods are indeed getting or +# setting a simple type. If this is not the case, or you want to show the +# methods anyway, you should set this option to NO. + +IDL_PROPERTY_SUPPORT = YES + +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES, then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default +# all members of a group must be documented explicitly. + +DISTRIBUTE_GROUP_DOC = YES + +# Set the SUBGROUPING tag to YES (the default) to allow class member groups of +# the same type (for instance a group of public functions) to be put as a +# subgroup of that type (e.g. under the Public Functions section). Set it to +# NO to prevent subgrouping. Alternatively, this can be done per class using +# the \nosubgrouping command. + +SUBGROUPING = YES + +# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum +# is documented as struct, union, or enum with the name of the typedef. So +# typedef struct TypeS {} TypeT, will appear in the documentation as a struct +# with name TypeT. When disabled the typedef will appear as a member of a file, +# namespace, or class. And the struct will be named TypeS. This can typically +# be useful for C code in case the coding convention dictates that all compound +# types are typedef'ed and only the typedef is referenced, never the tag name. + +TYPEDEF_HIDES_STRUCT = NO + +# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to +# determine which symbols to keep in memory and which to flush to disk. +# When the cache is full, less often used symbols will be written to disk. +# For small to medium size projects (<1000 input files) the default value is +# probably good enough. For larger projects a too small cache size can cause +# doxygen to be busy swapping symbols to and from disk most of the time +# causing a significant performance penality. +# If the system has enough physical memory increasing the cache will improve the +# performance by keeping more symbols in memory. Note that the value works on +# a logarithmic scale so increasing the size by one will rougly double the +# memory usage. The cache size is given by this formula: +# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, +# corresponding to a cache size of 2^16 = 65536 symbols + +SYMBOL_CACHE_SIZE = 0 + +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- + +# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in +# documentation are documented, even if no documentation was available. +# Private class members and static file members will be hidden unless +# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES + +EXTRACT_ALL = NO + +# If the EXTRACT_PRIVATE tag is set to YES all private members of a class +# will be included in the documentation. + +EXTRACT_PRIVATE = NO + +# If the EXTRACT_STATIC tag is set to YES all static members of a file +# will be included in the documentation. + +EXTRACT_STATIC = NO + +# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) +# defined locally in source files will be included in the documentation. +# If set to NO only classes defined in header files are included. + +EXTRACT_LOCAL_CLASSES = YES + +# This flag is only useful for Objective-C code. When set to YES local +# methods, which are defined in the implementation section but not in +# the interface are included in the documentation. +# If set to NO (the default) only methods in the interface are included. + +EXTRACT_LOCAL_METHODS = NO + +# If this flag is set to YES, the members of anonymous namespaces will be +# extracted and appear in the documentation as a namespace called +# 'anonymous_namespace{file}', where file will be replaced with the base +# name of the file that contains the anonymous namespace. By default +# anonymous namespace are hidden. + +EXTRACT_ANON_NSPACES = NO + +# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all +# undocumented members of documented classes, files or namespaces. +# If set to NO (the default) these members will be included in the +# various overviews, but no documentation section is generated. +# This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_MEMBERS = NO + +# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. +# If set to NO (the default) these classes will be included in the various +# overviews. This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_CLASSES = NO + +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all +# friend (class|struct|union) declarations. +# If set to NO (the default) these declarations will be included in the +# documentation. + +HIDE_FRIEND_COMPOUNDS = NO + +# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any +# documentation blocks found inside the body of a function. +# If set to NO (the default) these blocks will be appended to the +# function's detailed documentation block. + +HIDE_IN_BODY_DOCS = NO + +# The INTERNAL_DOCS tag determines if documentation +# that is typed after a \internal command is included. If the tag is set +# to NO (the default) then the documentation will be excluded. +# Set it to YES to include the internal documentation. + +INTERNAL_DOCS = NO + +# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate +# file names in lower-case letters. If set to YES upper-case letters are also +# allowed. This is useful if you have classes or files whose names only differ +# in case and if your file system supports case sensitive file names. Windows +# and Mac users are advised to set this option to NO. + +CASE_SENSE_NAMES = NO + +# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen +# will show members with their full class and namespace scopes in the +# documentation. If set to YES the scope will be hidden. + +HIDE_SCOPE_NAMES = NO + +# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen +# will put a list of the files that are included by a file in the documentation +# of that file. + +SHOW_INCLUDE_FILES = YES + +# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] +# is inserted in the documentation for inline members. + +INLINE_INFO = YES + +# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen +# will sort the (detailed) documentation of file and class members +# alphabetically by member name. If set to NO the members will appear in +# declaration order. + +SORT_MEMBER_DOCS = YES + +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the +# brief documentation of file, namespace and class members alphabetically +# by member name. If set to NO (the default) the members will appear in +# declaration order. + +SORT_BRIEF_DOCS = NO + +# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the (brief and detailed) documentation of class members so that constructors and destructors are listed first. If set to NO (the default) the constructors will appear in the respective orders defined by SORT_MEMBER_DOCS and SORT_BRIEF_DOCS. This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO. + +SORT_MEMBERS_CTORS_1ST = NO + +# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the +# hierarchy of group names into alphabetical order. If set to NO (the default) +# the group names will appear in their defined order. + +SORT_GROUP_NAMES = NO + +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be +# sorted by fully-qualified names, including namespaces. If set to +# NO (the default), the class list will be sorted only by class name, +# not including the namespace part. +# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. +# Note: This option applies only to the class list, not to the +# alphabetical list. + +SORT_BY_SCOPE_NAME = NO + +# The GENERATE_TODOLIST tag can be used to enable (YES) or +# disable (NO) the todo list. This list is created by putting \todo +# commands in the documentation. + +GENERATE_TODOLIST = YES + +# The GENERATE_TESTLIST tag can be used to enable (YES) or +# disable (NO) the test list. This list is created by putting \test +# commands in the documentation. + +GENERATE_TESTLIST = YES + +# The GENERATE_BUGLIST tag can be used to enable (YES) or +# disable (NO) the bug list. This list is created by putting \bug +# commands in the documentation. + +GENERATE_BUGLIST = YES + +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or +# disable (NO) the deprecated list. This list is created by putting +# \deprecated commands in the documentation. + +GENERATE_DEPRECATEDLIST= YES + +# The ENABLED_SECTIONS tag can be used to enable conditional +# documentation sections, marked by \if sectionname ... \endif. + +ENABLED_SECTIONS = + +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines +# the initial value of a variable or define consists of for it to appear in +# the documentation. If the initializer consists of more lines than specified +# here it will be hidden. Use a value of 0 to hide initializers completely. +# The appearance of the initializer of individual variables and defines in the +# documentation can be controlled using \showinitializer or \hideinitializer +# command in the documentation regardless of this setting. + +MAX_INITIALIZER_LINES = 30 + +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated +# at the bottom of the documentation of classes and structs. If set to YES the +# list will mention the files that were used to generate the documentation. + +SHOW_USED_FILES = YES + +# If the sources in your project are distributed over multiple directories +# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy +# in the documentation. The default is NO. + +SHOW_DIRECTORIES = YES + +# Set the SHOW_FILES tag to NO to disable the generation of the Files page. +# This will remove the Files entry from the Quick Index and from the +# Folder Tree View (if specified). The default is YES. + +SHOW_FILES = YES + +# Set the SHOW_NAMESPACES tag to NO to disable the generation of the +# Namespaces page. +# This will remove the Namespaces entry from the Quick Index +# and from the Folder Tree View (if specified). The default is YES. + +SHOW_NAMESPACES = YES + +# The FILE_VERSION_FILTER tag can be used to specify a program or script that +# doxygen should invoke to get the current version for each file (typically from +# the version control system). Doxygen will invoke the program by executing (via +# popen()) the command , where is the value of +# the FILE_VERSION_FILTER tag, and is the name of an input file +# provided by doxygen. Whatever the program writes to standard output +# is used as the file version. See the manual for examples. + +FILE_VERSION_FILTER = + +# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed by +# doxygen. The layout file controls the global structure of the generated output files +# in an output format independent way. The create the layout file that represents +# doxygen's defaults, run doxygen with the -l option. You can optionally specify a +# file name after the option, if omitted DoxygenLayout.xml will be used as the name +# of the layout file. + +LAYOUT_FILE = + +#--------------------------------------------------------------------------- +# configuration options related to warning and progress messages +#--------------------------------------------------------------------------- + +# The QUIET tag can be used to turn on/off the messages that are generated +# by doxygen. Possible values are YES and NO. If left blank NO is used. + +QUIET = NO + +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated by doxygen. Possible values are YES and NO. If left blank +# NO is used. + +WARNINGS = YES + +# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings +# for undocumented members. If EXTRACT_ALL is set to YES then this flag will +# automatically be disabled. + +WARN_IF_UNDOCUMENTED = YES + +# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some +# parameters in a documented function, or documenting parameters that +# don't exist or using markup commands wrongly. + +WARN_IF_DOC_ERROR = YES + +# This WARN_NO_PARAMDOC option can be abled to get warnings for +# functions that are documented, but have no documentation for their parameters +# or return value. If set to NO (the default) doxygen will only warn about +# wrong or incomplete parameter documentation, but not about the absence of +# documentation. + +WARN_NO_PARAMDOC = NO + +# The WARN_FORMAT tag determines the format of the warning messages that +# doxygen can produce. The string should contain the $file, $line, and $text +# tags, which will be replaced by the file and line number from which the +# warning originated and the warning text. Optionally the format may contain +# $version, which will be replaced by the version of the file (if it could +# be obtained via FILE_VERSION_FILTER) + +WARN_FORMAT = "$file:$line: $text" + +# The WARN_LOGFILE tag can be used to specify a file to which warning +# and error messages should be written. If left blank the output is written +# to stderr. + +WARN_LOGFILE = + +#--------------------------------------------------------------------------- +# configuration options related to the input files +#--------------------------------------------------------------------------- + +# The INPUT tag can be used to specify the files and/or directories that contain +# documented source files. You may enter file names like "myfile.cpp" or +# directories like "/usr/src/myproject". Separate the files or directories +# with spaces. + +INPUT = "include/frei0r.h" + +# This tag can be used to specify the character encoding of the source files +# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is +# also the default input encoding. Doxygen uses libiconv (or the iconv built +# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for +# the list of possible encodings. + +INPUT_ENCODING = UTF-8 + +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank the following patterns are tested: +# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx +# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90 + +FILE_PATTERNS = + +# The RECURSIVE tag can be used to turn specify whether or not subdirectories +# should be searched for input files as well. Possible values are YES and NO. +# If left blank NO is used. + +RECURSIVE = NO + +# The EXCLUDE tag can be used to specify files and/or directories that should +# excluded from the INPUT source files. This way you can easily exclude a +# subdirectory from a directory tree whose root is specified with the INPUT tag. + +EXCLUDE = + +# The EXCLUDE_SYMLINKS tag can be used select whether or not files or +# directories that are symbolic links (a Unix filesystem feature) are excluded +# from the input. + +EXCLUDE_SYMLINKS = NO + +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. Note that the wildcards are matched +# against the file with absolute path, so to exclude all test directories +# for example use the pattern */test/* + +EXCLUDE_PATTERNS = + +# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names +# (namespaces, classes, functions, etc.) that should be excluded from the +# output. The symbol name can be a fully qualified name, a word, or if the +# wildcard * is used, a substring. Examples: ANamespace, AClass, +# AClass::ANamespace, ANamespace::*Test + +EXCLUDE_SYMBOLS = + +# The EXAMPLE_PATH tag can be used to specify one or more files or +# directories that contain example code fragments that are included (see +# the \include command). + +EXAMPLE_PATH = + +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank all files are included. + +EXAMPLE_PATTERNS = + +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude +# commands irrespective of the value of the RECURSIVE tag. +# Possible values are YES and NO. If left blank NO is used. + +EXAMPLE_RECURSIVE = NO + +# The IMAGE_PATH tag can be used to specify one or more files or +# directories that contain image that are included in the documentation (see +# the \image command). + +IMAGE_PATH = + +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command , where +# is the value of the INPUT_FILTER tag, and is the name of an +# input file. Doxygen will then use the output that the filter program writes +# to standard output. +# If FILTER_PATTERNS is specified, this tag will be +# ignored. + +INPUT_FILTER = + +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern +# basis. +# Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. +# The filters are a list of the form: +# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further +# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER +# is applied to all files. + +FILTER_PATTERNS = + +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER) will be used to filter the input files when producing source +# files to browse (i.e. when SOURCE_BROWSER is set to YES). + +FILTER_SOURCE_FILES = NO + +#--------------------------------------------------------------------------- +# configuration options related to source browsing +#--------------------------------------------------------------------------- + +# If the SOURCE_BROWSER tag is set to YES then a list of source files will +# be generated. Documented entities will be cross-referenced with these sources. +# Note: To get rid of all source code in the generated output, make sure also +# VERBATIM_HEADERS is set to NO. + +SOURCE_BROWSER = YES + +# Setting the INLINE_SOURCES tag to YES will include the body +# of functions and classes directly in the documentation. + +INLINE_SOURCES = NO + +# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct +# doxygen to hide any special comment blocks from generated source code +# fragments. Normal C and C++ comments will always remain visible. + +STRIP_CODE_COMMENTS = YES + +# If the REFERENCED_BY_RELATION tag is set to YES +# then for each documented function all documented +# functions referencing it will be listed. + +REFERENCED_BY_RELATION = YES + +# If the REFERENCES_RELATION tag is set to YES +# then for each documented function all documented entities +# called/used by that function will be listed. + +REFERENCES_RELATION = YES + +# If the REFERENCES_LINK_SOURCE tag is set to YES (the default) +# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from +# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will +# link to the source code. +# Otherwise they will link to the documentation. + +REFERENCES_LINK_SOURCE = YES + +# If the USE_HTAGS tag is set to YES then the references to source code +# will point to the HTML generated by the htags(1) tool instead of doxygen +# built-in source browser. The htags tool is part of GNU's global source +# tagging system (see http://www.gnu.org/software/global/global.html). You +# will need version 4.8.6 or higher. + +USE_HTAGS = NO + +# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen +# will generate a verbatim copy of the header file for each class for +# which an include is specified. Set to NO to disable this. + +VERBATIM_HEADERS = YES + +#--------------------------------------------------------------------------- +# configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- + +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index +# of all compounds will be generated. Enable this if the project +# contains a lot of classes, structs, unions or interfaces. + +ALPHABETICAL_INDEX = YES + +# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then +# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns +# in which this list will be split (can be a number in the range [1..20]) + +COLS_IN_ALPHA_INDEX = 5 + +# In case all classes in a project start with a common prefix, all +# classes will be put under the same header in the alphabetical index. +# The IGNORE_PREFIX tag can be used to specify one or more prefixes that +# should be ignored while generating the index headers. + +IGNORE_PREFIX = + +#--------------------------------------------------------------------------- +# configuration options related to the HTML output +#--------------------------------------------------------------------------- + +# If the GENERATE_HTML tag is set to YES (the default) Doxygen will +# generate HTML output. + +GENERATE_HTML = YES + +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `html' will be used as the default path. + +HTML_OUTPUT = html + +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for +# each generated HTML page (for example: .htm,.php,.asp). If it is left blank +# doxygen will generate files with .html extension. + +HTML_FILE_EXTENSION = .php + +# The HTML_HEADER tag can be used to specify a personal HTML header for +# each generated HTML page. If it is left blank doxygen will generate a +# standard header. + +HTML_HEADER = +# HTML_HEADER = web/header.php + +# The HTML_FOOTER tag can be used to specify a personal HTML footer for +# each generated HTML page. If it is left blank doxygen will generate a +# standard footer. + +HTML_FOOTER = +# HTML_FOOTER = web/footer.php + +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading +# style sheet that is used by each HTML page. It can be used to +# fine-tune the look of the HTML output. If the tag is left blank doxygen +# will generate a default style sheet. Note that doxygen will try to copy +# the style sheet file to the HTML output directory, so don't put your own +# stylesheet in the HTML output directory as well, or it will be erased! + +HTML_STYLESHEET = +# HTML_STYLESHEET = web/style.css + +# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, +# files or namespaces will be aligned in HTML using tables. If set to +# NO a bullet list will be used. + +HTML_ALIGN_MEMBERS = YES + +# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML +# documentation will contain sections that can be hidden and shown after the +# page has loaded. For this to work a browser that supports +# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox +# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari). + +HTML_DYNAMIC_SECTIONS = YES + +# If the GENERATE_DOCSET tag is set to YES, additional index files +# will be generated that can be used as input for Apple's Xcode 3 +# integrated development environment, introduced with OSX 10.5 (Leopard). +# To create a documentation set, doxygen will generate a Makefile in the +# HTML output directory. Running make will produce the docset in that +# directory and running "make install" will install the docset in +# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find +# it at startup. +# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html for more information. + +GENERATE_DOCSET = NO + +# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the +# feed. A documentation feed provides an umbrella under which multiple +# documentation sets from a single provider (such as a company or product suite) +# can be grouped. + +DOCSET_FEEDNAME = "Doxygen generated docs" + +# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that +# should uniquely identify the documentation set bundle. This should be a +# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen +# will append .docset to the name. + +DOCSET_BUNDLE_ID = org.dyne.piksel.frei0r + +# If the GENERATE_HTMLHELP tag is set to YES, additional index files +# will be generated that can be used as input for tools like the +# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) +# of the generated HTML documentation. + +GENERATE_HTMLHELP = NO + +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can +# be used to specify the file name of the resulting .chm file. You +# can add a path in front of the file if the result should not be +# written to the html output directory. + +CHM_FILE = + +# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can +# be used to specify the location (absolute path including file name) of +# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run +# the HTML help compiler on the generated index.hhp. + +HHC_LOCATION = + +# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag +# controls if a separate .chi index file is generated (YES) or that +# it should be included in the master .chm file (NO). + +GENERATE_CHI = NO + +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING +# is used to encode HtmlHelp index (hhk), content (hhc) and project file +# content. + +CHM_INDEX_ENCODING = + +# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag +# controls whether a binary table of contents is generated (YES) or a +# normal table of contents (NO) in the .chm file. + +BINARY_TOC = NO + +# The TOC_EXPAND flag can be set to YES to add extra items for group members +# to the contents of the HTML help documentation and to the tree view. + +TOC_EXPAND = NO + +# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and QHP_VIRTUAL_FOLDER +# are set, an additional index file will be generated that can be used as input for +# Qt's qhelpgenerator to generate a Qt Compressed Help (.qch) of the generated +# HTML documentation. + +GENERATE_QHP = NO + +# If the QHG_LOCATION tag is specified, the QCH_FILE tag can +# be used to specify the file name of the resulting .qch file. +# The path specified is relative to the HTML output folder. + +QCH_FILE = + +# The QHP_NAMESPACE tag specifies the namespace to use when generating +# Qt Help Project output. For more information please see +# http://doc.trolltech.com/qthelpproject.html#namespace + +QHP_NAMESPACE = + +# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating +# Qt Help Project output. For more information please see +# http://doc.trolltech.com/qthelpproject.html#virtual-folders + +QHP_VIRTUAL_FOLDER = doc + +# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to add. +# For more information please see +# http://doc.trolltech.com/qthelpproject.html#custom-filters + +QHP_CUST_FILTER_NAME = + +# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the custom filter to add.For more information please see +# Qt Help Project / Custom Filters. + +QHP_CUST_FILTER_ATTRS = + +# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this project's +# filter section matches. +# Qt Help Project / Filter Attributes. + +QHP_SECT_FILTER_ATTRS = + +# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can +# be used to specify the location of Qt's qhelpgenerator. +# If non-empty doxygen will try to run qhelpgenerator on the generated +# .qhp file. + +QHG_LOCATION = + +# The DISABLE_INDEX tag can be used to turn on/off the condensed index at +# top of each HTML page. The value NO (the default) enables the index and +# the value YES disables it. + +DISABLE_INDEX = NO + +# This tag can be used to set the number of enum values (range [1..20]) +# that doxygen will group on one line in the generated HTML documentation. + +ENUM_VALUES_PER_LINE = 4 + +# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index +# structure should be generated to display hierarchical information. +# If the tag value is set to YES, a side panel will be generated +# containing a tree-like index structure (just like the one that +# is generated for HTML Help). For this to work a browser that supports +# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser). +# Windows users are probably better off using the HTML help feature. + +GENERATE_TREEVIEW = YES + +# By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories, +# and Class Hierarchy pages using a tree view instead of an ordered list. + +USE_INLINE_TREES = NO + +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be +# used to set the initial width (in pixels) of the frame in which the tree +# is shown. + +TREEVIEW_WIDTH = 250 + +# Use this tag to change the font size of Latex formulas included +# as images in the HTML documentation. The default is 10. Note that +# when you change the font size after a successful doxygen run you need +# to manually remove any form_*.png images from the HTML output directory +# to force them to be regenerated. + +FORMULA_FONTSIZE = 10 + +# When the SEARCHENGINE tag is enable doxygen will generate a search box for the HTML output. The underlying search engine uses javascript +# and DHTML and should work on any modern browser. Note that when using HTML help (GENERATE_HTMLHELP) or Qt help (GENERATE_QHP) +# there is already a search function so this one should typically +# be disabled. + +SEARCHENGINE = NO + +#--------------------------------------------------------------------------- +# configuration options related to the LaTeX output +#--------------------------------------------------------------------------- + +# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will +# generate Latex output. + +GENERATE_LATEX = YES + +# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `latex' will be used as the default path. + +LATEX_OUTPUT = latex + +# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be +# invoked. If left blank `latex' will be used as the default command name. + +LATEX_CMD_NAME = latex + +# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to +# generate index for LaTeX. If left blank `makeindex' will be used as the +# default command name. + +MAKEINDEX_CMD_NAME = makeindex + +# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact +# LaTeX documents. This may be useful for small projects and may help to +# save some trees in general. + +COMPACT_LATEX = NO + +# The PAPER_TYPE tag can be used to set the paper type that is used +# by the printer. Possible values are: a4, a4wide, letter, legal and +# executive. If left blank a4wide will be used. + +PAPER_TYPE = a4wide + +# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX +# packages that should be included in the LaTeX output. + +EXTRA_PACKAGES = + +# The LATEX_HEADER tag can be used to specify a personal LaTeX header for +# the generated latex document. The header should contain everything until +# the first chapter. If it is left blank doxygen will generate a +# standard header. Notice: only use this tag if you know what you are doing! + +LATEX_HEADER = + +# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated +# is prepared for conversion to pdf (using ps2pdf). The pdf file will +# contain links (just like the HTML output) instead of page references +# This makes the output suitable for online browsing using a pdf viewer. + +PDF_HYPERLINKS = YES + +# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of +# plain latex in the generated Makefile. Set this option to YES to get a +# higher quality PDF documentation. + +USE_PDFLATEX = YES + +# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. +# command to the generated LaTeX files. This will instruct LaTeX to keep +# running if errors occur, instead of asking the user for help. +# This option is also used when generating formulas in HTML. + +LATEX_BATCHMODE = NO + +# If LATEX_HIDE_INDICES is set to YES then doxygen will not +# include the index chapters (such as File Index, Compound Index, etc.) +# in the output. + +LATEX_HIDE_INDICES = NO + +# If LATEX_SOURCE_CODE is set to YES then doxygen will include source code with syntax highlighting in the LaTeX output. Note that which sources are shown also depends on other settings such as SOURCE_BROWSER. + +LATEX_SOURCE_CODE = YES + +#--------------------------------------------------------------------------- +# configuration options related to the RTF output +#--------------------------------------------------------------------------- + +# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output +# The RTF output is optimized for Word 97 and may not look very pretty with +# other RTF readers or editors. + +GENERATE_RTF = YES + +# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `rtf' will be used as the default path. + +RTF_OUTPUT = rtf + +# If the COMPACT_RTF tag is set to YES Doxygen generates more compact +# RTF documents. This may be useful for small projects and may help to +# save some trees in general. + +COMPACT_RTF = YES + +# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated +# will contain hyperlink fields. The RTF file will +# contain links (just like the HTML output) instead of page references. +# This makes the output suitable for online browsing using WORD or other +# programs which support those fields. +# Note: wordpad (write) and others do not support links. + +RTF_HYPERLINKS = NO + +# Load stylesheet definitions from file. Syntax is similar to doxygen's +# config file, i.e. a series of assignments. You only have to provide +# replacements, missing definitions are set to their default value. + +RTF_STYLESHEET_FILE = + +# Set optional variables used in the generation of an rtf document. +# Syntax is similar to doxygen's config file. + +RTF_EXTENSIONS_FILE = + +#--------------------------------------------------------------------------- +# configuration options related to the man page output +#--------------------------------------------------------------------------- + +# If the GENERATE_MAN tag is set to YES (the default) Doxygen will +# generate man pages + +GENERATE_MAN = YES + +# The MAN_OUTPUT tag is used to specify where the man pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `man' will be used as the default path. + +MAN_OUTPUT = man + +# The MAN_EXTENSION tag determines the extension that is added to +# the generated man pages (default is the subroutine's section .3) + +MAN_EXTENSION = .3 + +# If the MAN_LINKS tag is set to YES and Doxygen generates man output, +# then it will generate one additional man file for each entity +# documented in the real man page(s). These additional files +# only source the real man page, but without them the man command +# would be unable to find the correct page. The default is NO. + +MAN_LINKS = NO + +#--------------------------------------------------------------------------- +# configuration options related to the XML output +#--------------------------------------------------------------------------- + +# If the GENERATE_XML tag is set to YES Doxygen will +# generate an XML file that captures the structure of +# the code including all documentation. + +GENERATE_XML = NO + +# The XML_OUTPUT tag is used to specify where the XML pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `xml' will be used as the default path. + +XML_OUTPUT = xml + +# The XML_SCHEMA tag can be used to specify an XML schema, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_SCHEMA = + +# The XML_DTD tag can be used to specify an XML DTD, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_DTD = + +# If the XML_PROGRAMLISTING tag is set to YES Doxygen will +# dump the program listings (including syntax highlighting +# and cross-referencing information) to the XML output. Note that +# enabling this will significantly increase the size of the XML output. + +XML_PROGRAMLISTING = YES + +#--------------------------------------------------------------------------- +# configuration options for the AutoGen Definitions output +#--------------------------------------------------------------------------- + +# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will +# generate an AutoGen Definitions (see autogen.sf.net) file +# that captures the structure of the code including all +# documentation. Note that this feature is still experimental +# and incomplete at the moment. + +GENERATE_AUTOGEN_DEF = NO + +#--------------------------------------------------------------------------- +# configuration options related to the Perl module output +#--------------------------------------------------------------------------- + +# If the GENERATE_PERLMOD tag is set to YES Doxygen will +# generate a Perl module file that captures the structure of +# the code including all documentation. Note that this +# feature is still experimental and incomplete at the +# moment. + +GENERATE_PERLMOD = NO + +# If the PERLMOD_LATEX tag is set to YES Doxygen will generate +# the necessary Makefile rules, Perl scripts and LaTeX code to be able +# to generate PDF and DVI output from the Perl module output. + +PERLMOD_LATEX = NO + +# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be +# nicely formatted so it can be parsed by a human reader. +# This is useful +# if you want to understand what is going on. +# On the other hand, if this +# tag is set to NO the size of the Perl module output will be much smaller +# and Perl will parse it just the same. + +PERLMOD_PRETTY = YES + +# The names of the make variables in the generated doxyrules.make file +# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. +# This is useful so different doxyrules.make files included by the same +# Makefile don't overwrite each other's variables. + +PERLMOD_MAKEVAR_PREFIX = + +#--------------------------------------------------------------------------- +# Configuration options related to the preprocessor +#--------------------------------------------------------------------------- + +# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will +# evaluate all C-preprocessor directives found in the sources and include +# files. + +ENABLE_PREPROCESSING = YES + +# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro +# names in the source code. If set to NO (the default) only conditional +# compilation will be performed. Macro expansion can be done in a controlled +# way by setting EXPAND_ONLY_PREDEF to YES. + +MACRO_EXPANSION = NO + +# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES +# then the macro expansion is limited to the macros specified with the +# PREDEFINED and EXPAND_AS_DEFINED tags. + +EXPAND_ONLY_PREDEF = NO + +# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files +# in the INCLUDE_PATH (see below) will be search if a #include is found. + +SEARCH_INCLUDES = YES + +# The INCLUDE_PATH tag can be used to specify one or more directories that +# contain include files that are not input files but should be processed by +# the preprocessor. + +INCLUDE_PATH = + +# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard +# patterns (like *.h and *.hpp) to filter out the header-files in the +# directories. If left blank, the patterns specified with FILE_PATTERNS will +# be used. + +INCLUDE_FILE_PATTERNS = + +# The PREDEFINED tag can be used to specify one or more macro names that +# are defined before the preprocessor is started (similar to the -D option of +# gcc). The argument of the tag is a list of macros of the form: name +# or name=definition (no spaces). If the definition and the = are +# omitted =1 is assumed. To prevent a macro definition from being +# undefined via #undef or recursively expanded use the := operator +# instead of the = operator. + +PREDEFINED = + +# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then +# this tag can be used to specify a list of macro names that should be expanded. +# The macro definition that is found in the sources will be used. +# Use the PREDEFINED tag if you want to use a different macro definition. + +EXPAND_AS_DEFINED = + +# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then +# doxygen's preprocessor will remove all function-like macros that are alone +# on a line, have an all uppercase name, and do not end with a semicolon. Such +# function macros are typically used for boiler-plate code, and will confuse +# the parser if not removed. + +SKIP_FUNCTION_MACROS = YES + +#--------------------------------------------------------------------------- +# Configuration::additions related to external references +#--------------------------------------------------------------------------- + +# The TAGFILES option can be used to specify one or more tagfiles. +# Optionally an initial location of the external documentation +# can be added for each tagfile. The format of a tag file without +# this location is as follows: +# +# TAGFILES = file1 file2 ... +# Adding location for the tag files is done as follows: +# +# TAGFILES = file1=loc1 "file2 = loc2" ... +# where "loc1" and "loc2" can be relative or absolute paths or +# URLs. If a location is present for each tag, the installdox tool +# does not have to be run to correct the links. +# Note that each tag file must have a unique name +# (where the name does NOT include the path) +# If a tag file is not located in the directory in which doxygen +# is run, you must also specify the path to the tagfile here. + +TAGFILES = + +# When a file name is specified after GENERATE_TAGFILE, doxygen will create +# a tag file that is based on the input files it reads. + +GENERATE_TAGFILE = + +# If the ALLEXTERNALS tag is set to YES all external classes will be listed +# in the class index. If set to NO only the inherited external classes +# will be listed. + +ALLEXTERNALS = NO + +# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed +# in the modules index. If set to NO, only the current project's groups will +# be listed. + +EXTERNAL_GROUPS = YES + +# The PERL_PATH should be the absolute path and name of the perl script +# interpreter (i.e. the result of `which perl'). + +PERL_PATH = /usr/bin/perl + +#--------------------------------------------------------------------------- +# Configuration options related to the dot tool +#--------------------------------------------------------------------------- + +# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will +# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base +# or super classes. Setting the tag to NO turns the diagrams off. Note that +# this option is superseded by the HAVE_DOT option below. This is only a +# fallback. It is recommended to install and use dot, since it yields more +# powerful graphs. + +CLASS_DIAGRAMS = YES + +# You can define message sequence charts within doxygen comments using the \msc +# command. Doxygen will then run the mscgen tool (see +# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the +# documentation. The MSCGEN_PATH tag allows you to specify the directory where +# the mscgen tool resides. If left empty the tool is assumed to be found in the +# default search path. + +MSCGEN_PATH = + +# If set to YES, the inheritance and collaboration graphs will hide +# inheritance and usage relations if the target is undocumented +# or is not a class. + +HIDE_UNDOC_RELATIONS = YES + +# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is +# available from the path. This tool is part of Graphviz, a graph visualization +# toolkit from AT&T and Lucent Bell Labs. The other options in this section +# have no effect if this option is set to NO (the default) + +HAVE_DOT = YES + +# By default doxygen will write a font called FreeSans.ttf to the output +# directory and reference it in all dot files that doxygen generates. This +# font does not include all possible unicode characters however, so when you need +# these (or just want a differently looking font) you can specify the font name +# using DOT_FONTNAME. You need need to make sure dot is able to find the font, +# which can be done by putting it in a standard location or by setting the +# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory +# containing the font. + +DOT_FONTNAME = FreeSans + +# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. +# The default size is 10pt. + +DOT_FONTSIZE = 10 + +# By default doxygen will tell dot to use the output directory to look for the +# FreeSans.ttf font (which doxygen will put there itself). If you specify a +# different font using DOT_FONTNAME you can set the path where dot +# can find it using this tag. + +DOT_FONTPATH = + +# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect inheritance relations. Setting this tag to YES will force the +# the CLASS_DIAGRAMS tag to NO. + +CLASS_GRAPH = YES + +# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect implementation dependencies (inheritance, containment, and +# class references variables) of the class with other documented classes. + +COLLABORATION_GRAPH = YES + +# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for groups, showing the direct groups dependencies + +GROUP_GRAPHS = YES + +# If the UML_LOOK tag is set to YES doxygen will generate inheritance and +# collaboration diagrams in a style similar to the OMG's Unified Modeling +# Language. + +UML_LOOK = NO + +# If set to YES, the inheritance and collaboration graphs will show the +# relations between templates and their instances. + +TEMPLATE_RELATIONS = NO + +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT +# tags are set to YES then doxygen will generate a graph for each documented +# file showing the direct and indirect include dependencies of the file with +# other documented files. + +INCLUDE_GRAPH = YES + +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and +# HAVE_DOT tags are set to YES then doxygen will generate a graph for each +# documented header file showing the documented files that directly or +# indirectly include this file. + +INCLUDED_BY_GRAPH = YES + +# If the CALL_GRAPH and HAVE_DOT options are set to YES then +# doxygen will generate a call dependency graph for every global function +# or class method. Note that enabling this option will significantly increase +# the time of a run. So in most cases it will be better to enable call graphs +# for selected functions only using the \callgraph command. + +CALL_GRAPH = NO + +# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then +# doxygen will generate a caller dependency graph for every global function +# or class method. Note that enabling this option will significantly increase +# the time of a run. So in most cases it will be better to enable caller +# graphs for selected functions only using the \callergraph command. + +CALLER_GRAPH = NO + +# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen +# will graphical hierarchy of all classes instead of a textual one. + +GRAPHICAL_HIERARCHY = YES + +# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES +# then doxygen will show the dependencies a directory has on other directories +# in a graphical way. The dependency relations are determined by the #include +# relations between the files in the directories. + +DIRECTORY_GRAPH = YES + +# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images +# generated by dot. Possible values are png, jpg, or gif +# If left blank png will be used. + +DOT_IMAGE_FORMAT = png + +# The tag DOT_PATH can be used to specify the path where the dot tool can be +# found. If left blank, it is assumed the dot tool can be found in the path. + +DOT_PATH = + +# The DOTFILE_DIRS tag can be used to specify one or more directories that +# contain dot files that are included in the documentation (see the +# \dotfile command). + +DOTFILE_DIRS = + +# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of +# nodes that will be shown in the graph. If the number of nodes in a graph +# becomes larger than this value, doxygen will truncate the graph, which is +# visualized by representing a node as a red box. Note that doxygen if the +# number of direct children of the root node in a graph is already larger than +# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note +# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. + +DOT_GRAPH_MAX_NODES = 50 + +# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the +# graphs generated by dot. A depth value of 3 means that only nodes reachable +# from the root by following a path via at most 3 edges will be shown. Nodes +# that lay further from the root node will be omitted. Note that setting this +# option to 1 or 2 may greatly reduce the computation time needed for large +# code bases. Also note that the size of a graph can be further restricted by +# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. + +MAX_DOT_GRAPH_DEPTH = 0 + +# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent +# background. This is disabled by default, because dot on Windows does not +# seem to support this out of the box. Warning: Depending on the platform used, +# enabling this option may lead to badly anti-aliased labels on the edges of +# a graph (i.e. they become hard to read). + +DOT_TRANSPARENT = NO + +# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output +# files in one run (i.e. multiple -o and -T options on the command line). This +# makes dot run faster, but since only newer versions of dot (>1.8.10) +# support this, this feature is disabled by default. + +DOT_MULTI_TARGETS = YES + +# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will +# generate a legend page explaining the meaning of the various boxes and +# arrows in the dot generated graphs. + +GENERATE_LEGEND = YES + +# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will +# remove the intermediate dot files that are used to generate +# the various graphs. + +DOT_CLEANUP = YES diff --git a/web/README b/web/README new file mode 100644 index 0000000..f33cadb --- /dev/null +++ b/web/README @@ -0,0 +1,25 @@ + +Org-mode generated website setup for dyne.org + +This directory contains .org files for content +and scripts to render the website locally for preview +once pushed on the server the website will be visible + +To activate local preview make sure you have installed Emacs +and TexLive on your distribution, then manually install the +latest stable version of Org-mode from orgmode.org + +from inside orgmode, do: + + make + sudo make install + sudo cp -ra contrib/lisp/* /usr/local/share/emacs/site-lisp/ + +this will install the latest version in /usr/local/share + +then run make in this directory to generate the site +and then follow instructions to activate the apache.conf + +happy hacking ;^) + + diff --git a/web/TODO.org b/web/TODO.org new file mode 100644 index 0000000..177d0a8 --- /dev/null +++ b/web/TODO.org @@ -0,0 +1,87 @@ +#+TITLE: Frei0r - free video plugins +#+AUTHOR: Pikselites +#+EMAIL: frei0r-dev@dyne.org +#+LANGUAGE: en +#+OPTIONS: H:3 num:nil toc:t \n:nil @:t ::t |:t ^:t -:t f:t *:t +#+OPTIONS: TeX:t LaTeX:t skip:t d:nil tags:not-in-toc + +#+INFOJS_OPT: path:org-info.js +#+INFOJS_OPT: toc:nil localtoc:nil view:content sdepth:2 mouse:underline buttons:nil +#+INFOJS_OPT: home:http://frei0r.dyne.org + +#+LATEX_HEADER: \documentclass[final,a4paper,10pt,onecolumn,twoside]{memoir} +#+LATEX_HEADER: \usepackage[english]{babel} +#+LATEX_HEADER: \usepackage{amsfonts, amsmath, amssymb} +#+LATEX_HEADER: \usepackage{ucs} +#+LATEX_HEADER: \usepackage[utf8x]{inputenc} +#+LATEX_HEADER: \usepackage[T1]{fontenc} +#+LATEX_HEADER: \usepackage{hyperref} +#+LATEX_HEADER: \usepackage[pdftex]{graphicx} +#+LATEX_HEADER: \usepackage{fullpage} +#+LATEX_HEADER: \usepackage{lmodern} + +* Welcome hackers! + +The Frei0r mailinglist is the first step to get in touch with us: the +one we use is [[https://piksel.no/mailman/listinfo/frei0r-devel][frei0r-devel]] and it has [[http://piksel.no/pipermail/frei0r-devel/][public archives]] that are also +[[http://blog.gmane.org/gmane.comp.video.frei0r.devel][searchable and indexed]] online. + +The bugtracker we are currently using is [[http://www.piksel.no/projects/frei0r/report][the Piksel trac]], have a look +there and, if you know how to report a bug, please open a new issue +and give it as many details as you can. + +Here below are outlined some open issues in the development flow, they +range from /bugfixing/ tasks to /specification updates/ and +/documentation/. + +* Port existing code + +Porting new Effects from existing collections should be easy, for +instance there is a lot of code to be ported from [[http://effectv.sf.net/][EffecTV]], the [[http://demo-effects.sourceforge.net/][Demo +Effects Collection]], [[ftp://ftp.dyne.org/freej/plugins/petespluginslinux_070114.tar.gz][Pete's plugins]] and the XScreensavers… let us if +you engage the task, it can be fun and not so difficult if you are +just learning how to program in C or C++. + +* Bugfixes + +We should remove from installation any plugins which casuse a crash or +data loss - and if we want them back we'd better fix them, in any case +we can't allow distribution of plugins that can potentially crash the +host. + +This is an old issue with dynamically loaded objects: if they crash, +they'll crash the host application loading them! one reason why JWZ +made XScreensavers share an X11 /back-display/... + +** TODO Test suite + +Develop a test suite for frei0r plugins (/scaffolding/ technique) +which can be run to generate reports on reliability. + +** TODO Null parameters + +Fix plugins which do not set parameters to a default value inside +*f0r_init()* - this crashes some applications as often reported in +bugreports. + +* Spec Update + +We sometimes need to review the Frei0r specification and confront it +with new issues coming up. It might be also useful to confront it with +the specification drafted in [[http://livido.dyne.org/codedoc/][LiViDO]], which provides a broader +case-study, and other standards adopted in [[http://gstreamer.freedesktop.org/documentation/][GStreamer]]. + +* Documentation + +** Screenshots + +A Gallery of filters is already being generated, but not yet complete +with screenshots. Right now [[http://freej.dyne.org][FreeJ]] is being used with scripts to parse +plugin contents and render them into a webpage, still what are missing +are screenshots or maybe short video renderings of plugins in action. + +** TODO Trac spam + +We should fix the trac on piksel.org, install a new bugtracker like +[[http://flyspray.org][flyspray]] or use the mantis already up at [[http://bugs.dyne.org][bugs.dyne.org]]. + diff --git a/web/TODO.php b/web/TODO.php new file mode 100644 index 0000000..218aada --- /dev/null +++ b/web/TODO.php @@ -0,0 +1,54 @@ +compile_check = true; +$smarty->debugging = false; +$smarty->caching = 0; + +$smarty->cache_dir = "cache"; +$smarty->template_dir = "templates"; +$smarty->compile_dir = "templates_c"; +$smarty->plugins_dir = array('/usr/share/php/smarty/plugins'); + + +$smarty->assign("page_class", "software org-mode"); +$smarty->assign("page_hgroup", "

Frei0r :: TODO

"); +$smarty->assign("page_title", "free video effect plugins"); + +$smarty->assign("pagename","software"); +$smarty->display("_header.tpl"); + +// sidebar +div("menu"); +$smarty->display("software/doctypes.tpl"); +showfile("TODO-toc.html"); +echo(""); + +// page content +showfile("TODO-body.html"); + +$smarty->display("_footer.tpl"); + +?> diff --git a/web/bin/generate-apache-conf.sh b/web/bin/generate-apache-conf.sh new file mode 100755 index 0000000..8da7445 --- /dev/null +++ b/web/bin/generate-apache-conf.sh @@ -0,0 +1,42 @@ +#!/bin/sh + +# this script generates the website configuration locally +# it requires emacs, texlive and latest stable org-mode +# will download some scripts and prepare this directory +# so that running make the website will be compiled + +mkdir -p templates_c; chmod a+w templates_c +mkdir -p cache; chmod a+w cache +cat > apache.conf < + ServerAdmin webmaster@localhost + + ServerName freej.local.org + DocumentRoot `pwd` + + Options Indexes FollowSymLinks MultiViews + AllowOverride None + Order allow,deny + allow from all + + + ErrorLog /var/log/apache2/freej-error.log + + # Possible values include: debug, info, notice, warn, error, crit, + # alert, emerg. + LogLevel warn + + CustomLog /var/log/apache2/freej-access.log combined + +EOT +echo +echo "generation completed, link the apache.conf to enable the website" +echo "then add freej.local.org to your /etc/hosts to reach it:" +echo +echo "sudo ln -s `pwd`/apache.conf /etc/apache2/sites-enabled/freej-web" +echo "sudo sh -c 'echo \"127.0.0.1 freej.local.org\" >> /etc/hosts'" +echo +echo "use 'make' to generate a new version of the website which will be" +echo "visible on http://freej.local.org" +echo + diff --git a/web/bin/generate-code-gallery.sh b/web/bin/generate-code-gallery.sh new file mode 100755 index 0000000..7592d55 --- /dev/null +++ b/web/bin/generate-code-gallery.sh @@ -0,0 +1,104 @@ +#!/bin/bash +# shell script to generate a gallery of effects and their code +# generates gallery-index.html and subdirectories containing html pages +# all is rendered using emacs, org-mode, htmlize and twilight color theme +# for syntax highlight and such. pages are served by gallery.php +# +# March 2010 by Jaromil , GNU GPL v3 + +if [ -z $1 ]; then + echo "usage: generate-code-gallery.sh frei0r/src" + echo "this tool visits all frei0r src directory and renders" + echo "a web browsable gallery with their code" + exit 1 +fi +tmpfile="/tmp/generate-code-gallery-`date +%s`" +rm -f $tmpfile + +srcdir=${1} + +if ! [ -d ${srcdir} ]; then + echo "error: ${srcdir} not found" + exit 1 +fi + +render_code() { + t=$1 + f=$2 + lang=$3 + src=${srcdir}/${t}/${f}/${f}.${lang} + + echo "#+TITLE Frei0r :: ${f} + +* ${f} + +#+BEGIN_SRC ${lang}" > $t/${f}.org + cat ${src} >> $t/${f}.org + + echo "#+END_SRC" >> $t/${f}.org + + emacs -no-site-file -batch -l elisp/org-batch.el \ + --visit $t/${f}.org -f org-export-as-html + +# filter out orgmode html and get only the syntax highlight + cat ${t}/${f}.html | awk ' +BEGIN { content=0; } +/
 /tmp/${f}_info.js
+    freej -c -S soft -j /tmp/${f}_info.js 1> ${t}/${f}.html 2>/dev/null
+    rm -f /tmp/${f}_info.js
+    cat ${tmpfile} >> ${t}/${f}.html
+    
+
+}
+
+echo "" > gallery-index.html
+
+for t in filter generator mixer2 mixer3; do
+
+    mkdir -p ${t}
+    # open the index section
+    echo "
+
    +

    ${t}

    + +" >> gallery-index.html + + for f in `ls ${srcdir}/${t}/`; do + + if [ -r ${srcdir}/${t}/${f}/${f}.c ]; then + + # render code in syntax highlight + if ! [ -r ${t}/${f}.html ]; then + render_code ${t} ${f} "c" + fi + + # add entry to the index + echo "
  • ${f}
  • " \ + >> gallery-index.html + + fi + if [ -r ${srcdir}/${t}/${f}/${f}.cpp ]; then + + # render code in syntax highlight + if ! [ -r ${t}/${f}.html ]; then + render_code ${t} ${f} "cpp" + fi + + # add entry to the index + echo "
  • ${f}
  • " \ + >> gallery-index.html + + fi + done + echo "
+
+" >> gallery-index.html +done + +echo "
" >> gallery-index.html diff --git a/web/bin/generate-documents.sh b/web/bin/generate-documents.sh new file mode 100755 index 0000000..6201edd --- /dev/null +++ b/web/bin/generate-documents.sh @@ -0,0 +1,15 @@ +#!/bin/bash +# shell script to generate web pages from org-mode files +# to be run inside the directory containing them + + +for o in `ls *.org`; do + emacs -no-site-file -q -batch -l elisp/org-batch.el \ + --visit $o -f org-export-as-ascii + emacs -no-site-file -q -batch -l elisp/org-batch.el \ + --visit $o -f org-export-as-pdf + + emacs -no-site-file -q -batch -l elisp/org-batch.el \ + --visit $o -f org-export-as-html + bin/org-split-body-toc.sh ${o%%.*}.html +done diff --git a/web/bin/org-split-body-toc.sh b/web/bin/org-split-body-toc.sh new file mode 100755 index 0000000..1139c11 --- /dev/null +++ b/web/bin/org-split-body-toc.sh @@ -0,0 +1,64 @@ +#!/bin/sh +# +# small shell script to collate together the web pages +# extracts the part from the org-mode rendered HTML file +# then formats it as a template to be shown by the index.php +# +# March 2010 by Jaromil + +if [ -z $1 ]; then + echo "usage: org-split-body-toc.sh orgmode.html" + echo "this tool splits an orgmode in two parts: and " + echo "it also eliminates headers and footers." + exit 1 +fi + +tmpfile="/tmp/org-split-body-toc-`date +%s`" +rm -f $tmpfile + +orgfile=${1} + +orgname=`echo $orgfile|cut -d. -f1` + +cat $orgfile | \ + awk ' +BEGIN { body_found=0; title_found=0; } +// { body_found=1; next; } +/^

/ { title_found=1; next; } + +{ +if(body_found==1) + if(title_found==1) + print $0; +} + +/^

/ { title_found=0; } +/^<\/body>/ { body_found=0; next; } +' > $tmpfile + +# separate the TOC +echo "

" > ${orgname}-toc.html +cat $tmpfile | \ + awk ' +BEGIN { toc_found=0; div_count=0; } +/^
/ { toc_found=1; next; } +{ if(div_count>1) toc_found=0; + if(toc_found==1) print $0; +} +/^<\/div>/ { div_count++; } +' >> ${orgname}-toc.html + +# separate the BODY +cat $tmpfile | \ + awk ' +BEGIN { div_count=0; } +{ if(div_count>1) print $0; } +/^<\/div>/ { div_count++; } +' > ${orgname}-body.html +echo "
" >> ${orgname}-body.html + +# delete the temporary file +rm -f $tmpfile + +echo "org-mode html $orgfile splitted in ${orgname}-toc.html and ${orgname}-body.html" + diff --git a/web/elisp/color-theme.el b/web/elisp/color-theme.el new file mode 100644 index 0000000..c92c1a5 --- /dev/null +++ b/web/elisp/color-theme.el @@ -0,0 +1,1668 @@ +;;; color-theme.el --- install color themes + +;; Copyright (C) 1999, 2000 Jonadab the Unsightly One +;; Copyright (C) 2000, 2001, 2002, 2003 Alex Schroeder +;; Copyright (C) 2003, 2004, 2005, 2006 Xavier Maillard + +;; Version: 6.6.0 +;; Keywords: faces +;; Author: Jonadab the Unsightly One +;; Maintainer: Xavier Maillard +;; URL: http://www.emacswiki.org/cgi-bin/wiki.pl?ColorTheme + +;; This file is not (YET) part of GNU Emacs. + +;; This 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, or (at your option) any later +;; version. +;; +;; This 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 GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +;; MA 02111-1307, USA. + +;;; Commentary: + +;; Please read README and BUGS files for any relevant help. +;; Contributors (not themers) should also read HACKING file. + +;;; Thanks + +;; Deepak Goel +;; S. Pokrovsky for ideas and discussion. +;; Gordon Messmer for ideas and discussion. +;; Sriram Karra for the color-theme-submit stuff. +;; Olgierd `Kingsajz' Ziolko for the spec-filter idea. +;; Brian Palmer for color-theme-library ideas and code +;; All the users that contributed their color themes. + + + +;;; Code: +(eval-when-compile + (require 'easymenu) + (require 'reporter) + (require 'sendmail)) + +(require 'cl); set-difference is a function... + +;; for custom-face-attributes-get or face-custom-attributes-get +(require 'cus-face) +(require 'wid-edit); for widget-apply stuff in cus-face.el + +(defconst color-theme-maintainer-address "zedek@gnu.org" + "Address used by `submit-color-theme'.") + +;; Emacs / XEmacs compatibility and workaround layer + +(cond ((and (facep 'tool-bar) + (not (facep 'toolbar))) + (put 'toolbar 'face-alias 'tool-bar)) + ((and (facep 'toolbar) + (not (facep 'tool-bar))) + (put 'tool-bar 'face-alias 'toolbar))) + +(defvar color-theme-xemacs-p (and (featurep 'xemacs) + (string-match "XEmacs" emacs-version)) + "Non-nil if running XEmacs.") + +;; Add this since it appears to miss in emacs-2x +(or (fboundp 'replace-in-string) + (defun replace-in-string (target old new) + (replace-regexp-in-string old new target))) + +;; face-attr-construct has a problem in Emacs 20.7 and older when +;; dealing with inverse-video faces. Here is a short test to check +;; wether you are affected. + +;; (set-background-color "wheat") +;; (set-foreground-color "black") +;; (setq a (make-face 'a-face)) +;; (face-spec-set a '((t (:background "white" :foreground "black" :inverse-video t)))) +;; (face-attr-construct a) +;; => (:background "black" :inverse-video t) + +;; The expected response is the original specification: +;; => (:background "white" :foreground "black" :inverse-video t) + +;; That's why we depend on cus-face.el functionality. + +(cond ((fboundp 'custom-face-attributes-get) + (defun color-theme-face-attr-construct (face frame) + (if (atom face) + (custom-face-attributes-get face frame) + (if (and (consp face) (eq (car face) 'quote)) + (custom-face-attributes-get (cadr face) frame) + (custom-face-attributes-get (car face) frame))))) + ((fboundp 'face-custom-attributes-get) + (defalias 'color-theme-face-attr-construct + 'face-custom-attributes-get)) + (t + (defun color-theme-face-attr-construct (&rest ignore) + (error "Unable to construct face attributes")))) + +(defun color-theme-alist (plist) + "Transform PLIST into an alist if it is a plist and return it. +If the first element of PLIST is a cons cell, we just return PLIST, +assuming PLIST to be an alist. If the first element of plist is not a +symbol, this is an error: We cannot distinguish a plist from an ordinary +list, but a list that doesn't start with a symbol is certainly no plist +and no alist. + +This is used to make sure `default-frame-alist' really is an alist and not +a plist. In XEmacs, the alist is deprecated; a plist is used instead." + (cond ((consp (car plist)) + plist) + ((not (symbolp (car plist))) + (error "Wrong type argument: plist, %S" plist)) + ((featurep 'xemacs) + (plist-to-alist plist)))); XEmacs only + +;; Customization + +(defgroup color-theme nil + "Color Themes for Emacs. +A color theme consists of frame parameter settings, variable settings, +and face definitions." + :version "20.6" + :group 'faces) + +(defcustom color-theme-legal-frame-parameters "\\(color\\|mode\\)$" + "Regexp that matches frame parameter names. +Only frame parameter names that match this regexp can be changed as part +of a color theme." + :type '(choice (const :tag "Colors only" "\\(color\\|mode\\)$") + (const :tag "Colors, fonts, and size" + "\\(color\\|mode\\|font\\|height\\|width\\)$") + (regexp :tag "Custom regexp")) + :group 'color-theme + :link '(info-link "(elisp)Window Frame Parameters")) + +(defcustom color-theme-legal-variables "\\(color\\|face\\)$" + "Regexp that matches variable names. +Only variables that match this regexp can be changed as part of a color +theme. In addition to matching this name, the variables have to be user +variables (see function `user-variable-p')." + :type 'regexp + :group 'color-theme) + +(defcustom color-theme-illegal-faces "^w3-" + "Regexp that matches face names forbidden in themes. +The default setting \"^w3-\" excludes w3 faces since these +are created dynamically." + :type 'regexp + :group 'color-theme + :link '(info-link "(elisp)Faces for Font Lock") + :link '(info-link "(elisp)Standard Faces")) + +(defcustom color-theme-illegal-default-attributes '(:family :height :width) + "A list of face properties to be ignored when installing faces. +This prevents Emacs from doing terrible things to your display just because +a theme author likes weird fonts." + :type '(repeat symbol) + :group 'color-theme) + +(defcustom color-theme-is-global t + "*Determines wether a color theme is installed on all frames or not. +If non-nil, color themes will be installed for all frames. +If nil, color themes will be installed for the selected frame only. + +A possible use for this variable is dynamic binding. Here is a larger +example to put in your ~/.emacs; it will make the Blue Sea color theme +the default used for the first frame, and it will create two additional +frames with different color themes. + +setup: + \(require 'color-theme) + ;; set default color theme + \(color-theme-blue-sea) + ;; create some frames with different color themes + \(let ((color-theme-is-global nil)) + \(select-frame (make-frame)) + \(color-theme-gnome2) + \(select-frame (make-frame)) + \(color-theme-standard)) + +Please note that using XEmacs and and a nil value for +color-theme-is-global will ignore any variable settings for the color +theme, since XEmacs doesn't have frame-local variable bindings. + +Also note that using Emacs and a non-nil value for color-theme-is-global +will install a new color theme for all frames. Using XEmacs and a +non-nil value for color-theme-is-global will install a new color theme +only on those frames that are not using a local color theme." + :type 'boolean + :group 'color-theme) + +(defcustom color-theme-is-cumulative t + "*Determines wether new color themes are installed on top of each other. +If non-nil, installing a color theme will undo all settings made by +previous color themes." + :type 'boolean + :group 'color-theme) + +(defcustom color-theme-directory nil + "Directory where we can find additionnal themes (personnal). +Note that there is at least one directory shipped with the official +color-theme distribution where all contributed themes are located. +This official selection can't be changed with that variable. +However, you still can decide to turn it on or off and thus, +not be shown with all themes but yours." + :type '(repeat string) + :group 'color-theme) + +(defcustom color-theme-libraries (directory-files + (concat + (file-name-directory (locate-library "color-theme")) + "/themes") t "^color-theme") + "A list of files, which will be loaded in color-theme-initialize depending +on `color-theme-load-all-themes' value. +This allows a user to prune the default color-themes (which can take a while +to load)." + :type '(repeat string) + :group 'color-theme) + +(defcustom color-theme-load-all-themes t + "When t, load all color-theme theme files +as presented by `color-theme-libraries'. Else +do not load any of this themes." + :type 'boolean + :group 'color-theme) + +(defcustom color-theme-mode-hook nil + "Hook for color-theme-mode." + :type 'hook + :group 'color-theme) + +(defvar color-theme-mode-map + (let ((map (make-sparse-keymap))) + (define-key map (kbd "RET") 'color-theme-install-at-point) + (define-key map (kbd "c") 'list-colors-display) + (define-key map (kbd "d") 'color-theme-describe) + (define-key map (kbd "f") 'list-faces-display) + (define-key map (kbd "i") 'color-theme-install-at-point) + (define-key map (kbd "l") 'color-theme-install-at-point-for-current-frame) + (define-key map (kbd "p") 'color-theme-print) + (define-key map (kbd "q") 'bury-buffer) + (define-key map (kbd "?") 'color-theme-describe) + (if color-theme-xemacs-p + (define-key map (kbd "") 'color-theme-install-at-mouse) + (define-key map (kbd "") 'color-theme-install-at-mouse)) + map) + "Mode map used for the buffer created by `color-theme-select'.") + +(defvar color-theme-initialized nil + "Internal variable determining whether color-theme-initialize has been invoked yet") + +(defvar color-theme-buffer-name "*Color Theme Selection*" + "Name of the color theme selection buffer.") + +(defvar color-theme-original-frame-alist nil + "nil until one of the color themes has been installed.") + +(defvar color-theme-history nil + "List of color-themes called, in reverse order") + +(defcustom color-theme-history-max-length nil + "Max length of history to maintain. +Two other values are acceptable: t means no limit, and +nil means that no history is maintained." + :type '(choice (const :tag "No history" nil) + (const :tag "Unlimited length" t) + integer) + :group 'color-theme) + +(defvar color-theme-counter 0 + "Counter for every addition to `color-theme-history'. +This counts how many themes were installed, regardless +of `color-theme-history-max-length'.") + +(defvar color-theme-entry-path (cond + ;; Emacs 22.x and later + ((lookup-key global-map [menu-bar tools]) + '("tools")) + ;; XEmacs + ((featurep 'xemacs) + (setq tool-entry '("Tools"))) + ;; Emacs < 22 + (t + '("Tools"))) + "Menu tool entry path.") + +(defun color-theme-add-to-history (name) + "Add color-theme NAME to `color-theme-history'." + (setq color-theme-history + (cons (list name color-theme-is-cumulative) + color-theme-history) + color-theme-counter (+ 1 color-theme-counter)) + ;; Truncate the list if necessary. + (when (and (integerp color-theme-history-max-length) + (>= (length color-theme-history) + color-theme-history-max-length)) + (setcdr (nthcdr (1- color-theme-history-max-length) + color-theme-history) + nil))) + +;; (let ((l '(1 2 3 4 5))) +;; (setcdr (nthcdr 2 l) nil) +;; l) + + + +;; List of color themes used to create the *Color Theme Selection* +;; buffer. + +(defvar color-themes + '((color-theme-aalto-dark "Aalto Dark" "Jari Aalto ") + (color-theme-aalto-light "Aalto Light" "Jari Aalto ") + (color-theme-aliceblue "Alice Blue" "Girish Bharadwaj ") + (color-theme-andreas "Andreas" "Andreas Busch ") + (color-theme-arjen "Arjen" "Arjen Wiersma ") + (color-theme-beige-diff "Beige Diff" "Alex Schroeder " t) + (color-theme-bharadwaj "Bharadwaj" "Girish Bharadwaj ") + (color-theme-bharadwaj-slate "Bharadwaj Slate" "Girish Bharadwaj ") + (color-theme-billw "Billw" "Bill White ") + (color-theme-black-on-gray "BlackOnGray" "Sudhir Bhojwani ") + (color-theme-blippblopp "Blipp Blopp" "Thomas Sicheritz-Ponten") + (color-theme-simple-1 "Black" "Jonadab ") + (color-theme-blue-erc "Blue ERC" "Alex Schroeder " t) + (color-theme-blue-gnus "Blue Gnus" "Alex Schroeder " t) + (color-theme-blue-mood "Blue Mood" "Nelson Loyola ") + (color-theme-blue-sea "Blue Sea" "Alex Schroeder ") + (color-theme-calm-forest "Calm Forest" "Artur Hefczyc ") + (color-theme-charcoal-black "Charcoal Black" "Lars Chr. Hausmann ") + (color-theme-goldenrod "Cheap Goldenrod" "Alex Schroeder ") + (color-theme-clarity "Clarity and Beauty" "Richard Wellum ") + (color-theme-classic "Classic" "Frederic Giroud ") + (color-theme-comidia "Comidia" "Marcelo Dias de Toledo ") + (color-theme-jsc-dark "Cooper Dark" "John S Cooper ") + (color-theme-jsc-light "Cooper Light" "John S Cooper ") + (color-theme-jsc-light2 "Cooper Light 2" "John S Cooper ") + (color-theme-dark-blue "Dark Blue" "Chris McMahan ") + (color-theme-dark-blue2 "Dark Blue 2" "Chris McMahan ") + (color-theme-dark-green "Dark Green" "eddy_woody@hotmail.com") + (color-theme-dark-laptop "Dark Laptop" "Laurent Michel ") + (color-theme-deep-blue "Deep Blue" "Tomas Cerha ") + (color-theme-digital-ofs1 "Digital OFS1" "Gareth Owen ") + (color-theme-euphoria "Euphoria" "oGLOWo@oGLOWo.cjb.net") + (color-theme-feng-shui "Feng Shui" "Walter Higgins ") + (color-theme-fischmeister "Fischmeister" + "Sebastian Fischmeister ") + (color-theme-gnome "Gnome" "Jonadab ") + (color-theme-gnome2 "Gnome 2" "Alex Schroeder ") + (color-theme-gray1 "Gray1" "Paul Pulli ") + (color-theme-gray30 "Gray30" "Girish Bharadwaj ") + (color-theme-kingsajz "Green Kingsajz" "Olgierd `Kingsajz' Ziolko ") + (color-theme-greiner "Greiner" "Kevin Greiner ") + (color-theme-gtk-ide "GTK IDE" "Gordon Messmer ") + (color-theme-high-contrast "High Contrast" "Alex Schroeder ") + (color-theme-hober "Hober" "Edward O'Connor ") + (color-theme-infodoc "Infodoc" "Frederic Giroud ") + (color-theme-jb-simple "JB Simple" "jeff@dvns.com") + (color-theme-jedit-grey "Jedit Grey" "Gordon Messmer ") + (color-theme-jonadabian "Jonadab" "Jonadab ") + (color-theme-jonadabian-slate "Jonadabian Slate" "Jonadab ") + (color-theme-katester "Katester" "Higgins_Walter@emc.com") + (color-theme-late-night "Late Night" "Alex Schroeder ") + (color-theme-lawrence "Lawrence" "lawrence mitchell ") + (color-theme-lethe "Lethe" "Ivica Loncar ") + (color-theme-ld-dark "Linh Dang Dark" "Linh Dang ") + (color-theme-marine "Marine" "Girish Bharadwaj ") + (color-theme-matrix "Matrix" "Walter Higgins ") + (color-theme-marquardt "Marquardt" "Colin Marquardt ") + (color-theme-midnight "Midnight" "Gordon Messmer ") + (color-theme-mistyday "Misty Day" "Hari Kumar ") + (color-theme-montz "Montz" "Brady Montz ") + (color-theme-oswald "Oswald" "Tom Oswald ") + (color-theme-parus "Parus" "Jon K Hellan ") + (color-theme-pierson "Pierson" "Dan L. Pierson ") + (color-theme-ramangalahy "Ramangalahy" "Solofo Ramangalahy ") + (color-theme-raspopovic "Raspopovic" "Pedja Raspopovic ") + (color-theme-renegade "Renegade" "Dave Benjamin ") + (color-theme-resolve "Resolve" "Damien Elmes ") + (color-theme-retro-green "Retro Green" "Alex Schroeder ") + (color-theme-retro-orange "Retro Orange" "Alex Schroeder ") + (color-theme-robin-hood "Robin Hood" "Alex Schroeder ") + (color-theme-rotor "Rotor" "Jinwei Shen ") + (color-theme-ryerson "Ryerson" "Luis Fernandes ") + (color-theme-salmon-diff "Salmon Diff" "Alex Schroeder " t) + (color-theme-salmon-font-lock "Salmon Font-Lock" "Alex Schroeder " t) + (color-theme-scintilla "Scintilla" "Gordon Messmer ") + (color-theme-shaman "Shaman" "shaman@interdon.net") + (color-theme-sitaramv-nt "Sitaram NT" + "Sitaram Venkatraman ") + (color-theme-sitaramv-solaris "Sitaram Solaris" + "Sitaram Venkatraman ") + (color-theme-snow "Snow" "Nicolas Rist ") + (color-theme-snowish "Snowish" "Girish Bharadwaj ") + (color-theme-standard-ediff "Standard Ediff" "Emacs Team, added by Alex Schroeder " t) + (color-theme-standard "Standard Emacs 20" "Emacs Team, added by Alex Schroeder ") + (color-theme-emacs-21 "Standard Emacs 21" "Emacs Team, added by Alex Schroeder ") + (color-theme-emacs-nw "Standard Emacs 21 No Window" "Emacs Team, added by D. Goel ") + (color-theme-xemacs "Standard XEmacs" "XEmacs Team, added by Alex Schroeder ") + (color-theme-subtle-blue "Subtle Blue" "Chris McMahan ") + (color-theme-subtle-hacker "Subtle Hacker" "Colin Walters ") + (color-theme-taming-mr-arneson "Taming Mr Arneson" "Erik Arneson ") + (color-theme-taylor "Taylor" "Art Taylor ") + (color-theme-tty-dark "TTY Dark" "O Polite ") + (color-theme-vim-colors "Vim Colors" "Michael Soulier ") + (color-theme-whateveryouwant "Whateveryouwant" "Fabien Penso , color by Scott Jaderholm ") + (color-theme-wheat "Wheat" "Alex Schroeder ") + (color-theme-pok-wob "White On Black" "S. Pokrovsky ") + (color-theme-pok-wog "White On Grey" "S. Pokrovsky ") + (color-theme-word-perfect "WordPerfect" "Thomas Gehrlein ") + (color-theme-xp "XP" "Girish Bharadwaj ")) + "List of color themes. + +Each THEME is itself a three element list (FUNC NAME MAINTAINER &optional LIBRARY). + +FUNC is a color theme function which does the setup. The function +FUNC may call `color-theme-install'. The color theme function may be +interactive. + +NAME is the name of the theme and MAINTAINER is the name and/or email of +the maintainer of the theme. + +If LIBRARY is non-nil, the color theme will be considered a library and +may not be shown in the default menu. + +If you defined your own color theme and want to add it to this list, +use something like this: + + (add-to-list 'color-themes '(color-theme-gnome2 \"Gnome2\" \"Alex\"))") + +;;; Functions + +(defun color-theme-backup-original-values () + "Back up the original `default-frame-alist'. +The values are stored in `color-theme-original-frame-alist' on +startup." + (if (null color-theme-original-frame-alist) + (setq color-theme-original-frame-alist + (color-theme-filter (frame-parameters (selected-frame)) + color-theme-legal-frame-parameters)))) +(add-hook 'after-init-hook 'color-theme-backup-original-values) + +;;;###autoload +(defun color-theme-select (&optional arg) + "Displays a special buffer for selecting and installing a color theme. +With optional prefix ARG, this buffer will include color theme libraries +as well. A color theme library is in itself not complete, it must be +used as part of another color theme to be useful. Thus, color theme +libraries are mainly useful for color theme authors." + (interactive "P") + (unless color-theme-initialized (color-theme-initialize)) + (switch-to-buffer (get-buffer-create color-theme-buffer-name)) + (setq buffer-read-only nil) + (erase-buffer) + ;; recreate the snapshot if necessary + (when (or (not (assq 'color-theme-snapshot color-themes)) + (not (commandp 'color-theme-snapshot))) + (fset 'color-theme-snapshot (color-theme-make-snapshot)) + (setq color-themes (delq (assq 'color-theme-snapshot color-themes) + color-themes) + color-themes (delq (assq 'bury-buffer color-themes) + color-themes) + color-themes (append '((color-theme-snapshot + "[Reset]" "Undo changes, if possible.") + (bury-buffer + "[Quit]" "Bury this buffer.")) + color-themes))) + (dolist (theme color-themes) + (let ((func (nth 0 theme)) + (name (nth 1 theme)) + (author (nth 2 theme)) + (library (nth 3 theme)) + (desc)) + (when (or (not library) arg) + (setq desc (format "%-23s %s" + (if library (concat name " [lib]") name) + author)) + (put-text-property 0 (length desc) 'color-theme func desc) + (put-text-property 0 (length name) 'face 'bold desc) + (put-text-property 0 (length name) 'mouse-face 'highlight desc) + (insert desc) + (newline)))) + (goto-char (point-min)) + (setq buffer-read-only t) + (set-buffer-modified-p nil) + (color-theme-mode)) + +(when (require 'easymenu) + (easy-menu-add-item nil color-theme-entry-path "--") + (easy-menu-add-item nil color-theme-entry-path + ["Color Themes" color-theme-select t])) + +(defun color-theme-mode () + "Major mode to select and install color themes. + +Use \\[color-theme-install-at-point] to install a color theme on all frames. +Use \\[color-theme-install-at-point-for-current-frame] to install a color theme for the current frame only. + +The changes are applied on top of your current setup. This is a +feature. + +Some of the themes should be considered extensions to the standard color +theme: they modify only a limited number of faces and variables. To +verify the final look of a color theme, install the standard color +theme, then install the other color theme. This is a feature. It allows +you to mix several color themes. + +Use \\[color-theme-describe] to read more about the color theme function at point. +If you want to install the color theme permanently, put the call to the +color theme function into your ~/.emacs: + + \(require 'color-theme) + \(color-theme-gnome2) + +If you worry about the size of color-theme.el: You are right. Use +\\[color-theme-print] to print the current color theme and save the resulting buffer +as ~/.emacs-color-theme. Now you can install only this specific color +theme in your .emacs: + + \(load-file \"~/.emacs-color-theme\") + \(my-color-theme) + +The Emacs menu is not affected by color themes within Emacs. Depending +on the toolkit you used to compile Emacs, you might have to set specific +X ressources. See the info manual for more information. Here is an +example ~/.Xdefaults fragment: + + emacs*Background: DarkSlateGray + emacs*Foreground: wheat + +\\{color-theme-mode-map} + +The color themes are listed in `color-themes', which see." + (kill-all-local-variables) + (setq major-mode 'color-theme-mode) + (setq mode-name "Color Themes") + (use-local-map color-theme-mode-map) + (when (functionp 'goto-address); Emacs + (goto-address)) + (run-hooks 'color-theme-mode-hook)) + +;;; Commands in Color Theme Selection mode + +;;;###autoload +(defun color-theme-describe () + "Describe color theme listed at point. +This shows the documentation of the value of text-property color-theme +at point. The text-property color-theme should be a color theme +function. See `color-themes'." + (interactive) + (describe-function (get-text-property (point) 'color-theme))) + +;;;###autoload +(defun color-theme-install-at-mouse (event) + "Install color theme clicked upon using the mouse. +First argument EVENT is used to set point. Then +`color-theme-install-at-point' is called." + (interactive "e") + (save-excursion + (mouse-set-point event) + (color-theme-install-at-point))) + +;;;autoload +(defun color-theme-install-at-point () + "Install color theme at point. +This calls the value of the text-property `color-theme' at point. +The text-property `color-theme' should be a color theme function. +See `color-themes'." + (interactive) + (let ((func (get-text-property (point) 'color-theme))) + ;; install theme + (if func + (funcall func)) + ;; If goto-address is being used, remove all overlays in the current + ;; buffer and run it again. The face used for the mail addresses in + ;; the the color theme selection buffer is based on the variable + ;; goto-address-mail-face. Changes in that variable will not affect + ;; existing overlays, however, thereby confusing users. + (when (functionp 'goto-address); Emacs + (dolist (o (overlays-in (point-min) (point-max))) + (delete-overlay o)) + (goto-address)))) + +;;;###autoload +(defun color-theme-install-at-point-for-current-frame () + "Install color theme at point for current frame only. +Binds `color-theme-is-global' to nil and calls +`color-theme-install-at-point'." + (interactive) + (let ((color-theme-is-global nil)) + (color-theme-install-at-point))) + + + +;; Taking a snapshot of the current color theme and pretty printing it. + +(defun color-theme-filter (old-list regexp &optional exclude) + "Filter OLD-LIST. +The resulting list will be newly allocated and contains only elements +with names matching REGEXP. OLD-LIST may be a list or an alist. If you +want to filter a plist, use `color-theme-alist' to convert your plist to +an alist, first. + +If the optional argument EXCLUDE is non-nil, then the sense is +reversed: only non-matching elements will be retained." + (let (elem new-list) + (dolist (elem old-list) + (setq name (symbol-name (if (listp elem) (car elem) elem))) + (when (or (and (not exclude) + (string-match regexp name)) + (and exclude + (not (string-match regexp name)))) + ;; Now make sure that if elem is a cons cell, and the cdr of + ;; that cons cell is a string, then we need a *new* string in + ;; the new list. Having a new cons cell is of no use because + ;; modify-frame-parameters will modify this string, thus + ;; modifying our color theme functions! + (when (and (consp elem) + (stringp (cdr elem))) + (setq elem (cons (car elem) + (copy-sequence (cdr elem))))) + ;; Now store elem + (setq new-list (cons elem new-list)))) + new-list)) + +(defun color-theme-spec-filter (spec) + "Filter the attributes in SPEC. +This makes sure that SPEC has the form ((t (PLIST ...))). +Only properties not in `color-theme-illegal-default-attributes' +are included in the SPEC returned." + (let ((props (cadar spec)) + result prop val) + (while props + (setq prop (nth 0 props) + val (nth 1 props) + props (nthcdr 2 props)) + (unless (memq prop color-theme-illegal-default-attributes) + (setq result (cons val (cons prop result))))) + `((t ,(nreverse result))))) + +;; (color-theme-spec-filter '((t (:background "blue3")))) +;; (color-theme-spec-filter '((t (:stipple nil :background "Black" :foreground "SteelBlue" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :width semi-condensed :family "misc-fixed")))) + +(defun color-theme-plist-delete (plist prop) + "Delete property PROP from property list PLIST by side effect. +This modifies PLIST." + ;; deal with prop at the start + (while (eq (car plist) prop) + (setq plist (cddr plist))) + ;; deal with empty plist + (when plist + (let ((lastcell (cdr plist)) + (l (cddr plist))) + (while l + (if (eq (car l) prop) + (progn + (setq l (cddr l)) + (setcdr lastcell l)) + (setq lastcell (cdr l) + l (cddr l)))))) + plist) + +;; (color-theme-plist-delete '(a b c d e f g h) 'a) +;; (color-theme-plist-delete '(a b c d e f g h) 'b) +;; (color-theme-plist-delete '(a b c d e f g h) 'c) +;; (color-theme-plist-delete '(a b c d e f g h) 'g) +;; (color-theme-plist-delete '(a b c d c d e f g h) 'c) +;; (color-theme-plist-delete '(a b c d e f c d g h) 'c) + +(if (or (featurep 'xemacs) + (< emacs-major-version 21)) + (defalias 'color-theme-spec-compat 'identity) + (defun color-theme-spec-compat (spec) + "Filter the attributes in SPEC such that is is never invalid. +Example: Eventhough :bold works in Emacs, it is not recognized by +`customize-face' -- and then the face is uncustomizable. This +function replaces a :bold attribute with the corresponding :weight +attribute, if there is no :weight, or deletes it. This undoes the +doings of `color-theme-spec-canonical-font', more or less." + (let ((props (cadar spec))) + (when (plist-member props :bold) + (setq props (color-theme-plist-delete props :bold)) + (unless (plist-member props :weight) + (setq props (plist-put props :weight 'bold)))) + (when (plist-member props :italic) + (setq props (color-theme-plist-delete props :italic)) + (unless (plist-member props :slant) + (setq props (plist-put props :slant 'italic)))) + `((t ,props))))) + +;; (color-theme-spec-compat '((t (:foreground "blue" :bold t)))) +;; (color-theme-spec-compat '((t (:bold t :foreground "blue" :weight extra-bold)))) +;; (color-theme-spec-compat '((t (:italic t :foreground "blue")))) +;; (color-theme-spec-compat '((t (:slant oblique :italic t :foreground "blue")))) + +(defun color-theme-spec-canonical-font (atts) + "Add :bold and :italic attributes if necessary." + ;; add these to the front of atts -- this will keept the old value for + ;; customize-face in Emacs 21. + (when (and (memq (plist-get atts :weight) + '(ultra-bold extra-bold bold semi-bold)) + (not (plist-get atts :bold))) + (setq atts (cons :bold (cons t atts)))) + (when (and (not (memq (plist-get atts :slant) + '(normal nil))) + (not (plist-get atts :italic))) + (setq atts (cons :italic (cons t atts)))) + atts) +;; (color-theme-spec-canonical-font (color-theme-face-attr-construct 'bold (selected-frame))) +;; (defface foo '((t (:weight extra-bold))) "foo") +;; (color-theme-spec-canonical-font (color-theme-face-attr-construct 'foo (selected-frame))) +;; (face-spec-set 'foo '((t (:weight extra-bold))) nil) +;; (face-spec-set 'foo '((t (:bold t))) nil) +;; (face-spec-set 'foo '((t (:bold t :weight extra-bold))) nil) + +;; Handle :height according to NEWS file for Emacs 21 +(defun color-theme-spec-resolve-height (old new) + "Return the new height given OLD and NEW height. +OLD is the current setting, NEW is the setting inherited from." + (cond ((not old) + new) + ((integerp old) + old) + ((and (floatp old) + (integerp new)) + (round (* old new))) + ((and (floatp old) + (floatp new)) + (* old new)) + ((and (functionp old) + (integerp new)) + (round (funcall old new))) + ((and (functionp old) + (float new)) + `(lambda (f) (* (funcall ,old f) ,new))) + ((and (functionp old) + (functionp new)) + `(lambda (f) (* (funcall ,old (funcall ,new f))))) + (t + (error "Illegal :height attributes: %S or %S" old new)))) +;; (color-theme-spec-resolve-height 12 1.2) +;; (color-theme-spec-resolve-height 1.2 1.2) +;; (color-theme-spec-resolve-height 1.2 12) +;; (color-theme-spec-resolve-height 1.2 'foo) +;; (color-theme-spec-resolve-height (lambda (f) (* 2 f)) 5) +;; (color-theme-spec-resolve-height (lambda (f) (* 2 f)) 2.0) +;; the following lambda is the result from the above calculation +;; (color-theme-spec-resolve-height (lambda (f) (* (funcall (lambda (f) (* 2 f)) f) 2.0)) 5) + +(defun color-theme-spec-resolve-inheritance (atts) + "Resolve all occurences of the :inherit attribute." + (let ((face (plist-get atts :inherit))) + ;; From the Emacs 21 NEWS file: "Attributes from inherited faces are + ;; merged into the face like an underlying face would be." -- + ;; therefore properties of the inherited face only add missing + ;; attributes. + (when face + ;; remove :inherit face from atts -- this assumes only one + ;; :inherit attribute. + (setq atts (delq ':inherit (delq face atts))) + (let ((more-atts (color-theme-spec-resolve-inheritance + (color-theme-face-attr-construct + face (selected-frame)))) + att val) + (while more-atts + (setq att (car more-atts) + val (cadr more-atts) + more-atts (cddr more-atts)) + ;; Color-theme assumes that no value is ever 'unspecified. + (cond ((eq att ':height); cumulative effect! + (setq atts (plist-put atts + ':height + (color-theme-spec-resolve-height + (plist-get atts att) + val)))) + ;; Default: Only put if it has not been specified before. + ((not (plist-get atts att)) + (setq atts (cons att (cons val atts)))) + +)))) + atts)) +;; (color-theme-spec-resolve-inheritance '(:bold t)) +;; (color-theme-spec-resolve-inheritance '(:bold t :foreground "blue")) +;; (color-theme-face-attr-construct 'font-lock-comment-face (selected-frame)) +;; (color-theme-spec-resolve-inheritance '(:bold t :inherit font-lock-comment-face)) +;; (color-theme-spec-resolve-inheritance '(:bold t :foreground "red" :inherit font-lock-comment-face)) +;; (color-theme-face-attr-construct 'Info-title-2-face (selected-frame)) +;; (color-theme-face-attr-construct 'Info-title-3-face (selected-frame)) +;; (color-theme-face-attr-construct 'Info-title-4-face (selected-frame)) +;; (color-theme-spec-resolve-inheritance '(:inherit Info-title-2-face)) + +;; The :inverse-video attribute causes Emacs to swap foreground and +;; background colors, XEmacs does not. Therefore, if anybody chooses +;; the inverse-video attribute, we 1. swap the colors ourselves in Emacs +;; and 2. we remove the inverse-video attribute in Emacs and XEmacs. +;; Inverse-video is only useful on a monochrome tty. +(defun color-theme-spec-maybe-invert (atts) + "Remove the :inverse-video attribute from ATTS. +If ATTS contains :inverse-video t, remove it and swap foreground and +background color. Return ATTS." + (let ((inv (plist-get atts ':inverse-video))) + (if inv + (let (result att) + (while atts + (setq att (car atts) + atts (cdr atts)) + (cond ((and (eq att :foreground) (not color-theme-xemacs-p)) + (setq result (cons :background result))) + ((and (eq att :background) (not color-theme-xemacs-p)) + (setq result (cons :foreground result))) + ((eq att :inverse-video) + (setq atts (cdr atts))); this prevents using dolist + (t + (setq result (cons att result))))) + (nreverse result)) + ;; else + atts))) +;; (color-theme-spec-maybe-invert '(:bold t)) +;; (color-theme-spec-maybe-invert '(:foreground "blue")) +;; (color-theme-spec-maybe-invert '(:background "red")) +;; (color-theme-spec-maybe-invert '(:inverse-video t)) +;; (color-theme-spec-maybe-invert '(:inverse-video t :foreground "red")) +;; (color-theme-spec-maybe-invert '(:inverse-video t :background "red")) +;; (color-theme-spec-maybe-invert '(:inverse-video t :background "red" :foreground "blue" :bold t)) +;; (color-theme-spec-maybe-invert '(:inverse-video nil :background "red" :foreground "blue" :bold t)) + +(defun color-theme-spec (face) + "Return a list for FACE which has the form (FACE SPEC). +See `defface' for the format of SPEC. In this case we use only one +DISPLAY, t, and determine ATTS using `color-theme-face-attr-construct'. +If ATTS is nil, (nil) is used instead. + +If ATTS contains :inverse-video t, we remove it and swap foreground and +background color using `color-theme-spec-maybe-invert'. We do this +because :inverse-video is handled differently in Emacs and XEmacs. We +will loose on a tty without colors, because in that situation, +:inverse-video means something." + (let ((atts + (color-theme-spec-canonical-font + (color-theme-spec-maybe-invert + (color-theme-spec-resolve-inheritance + (color-theme-face-attr-construct face (selected-frame))))))) + (if atts + `(,face ((t ,atts))) + `(,face ((t (nil))))))) + +(defun color-theme-get-params () + "Return a list of frame parameter settings usable in a color theme. +Such an alist may be installed by `color-theme-install-frame-params'. The +frame parameters returned must match `color-theme-legal-frame-parameters'." + (let ((params (color-theme-filter (frame-parameters (selected-frame)) + color-theme-legal-frame-parameters))) + (sort params (lambda (a b) (string< (symbol-name (car a)) + (symbol-name (car b))))))) + +(defun color-theme-get-vars () + "Return a list of variable settings usable in a color theme. +Such an alist may be installed by `color-theme-install-variables'. +The variable names must match `color-theme-legal-variables', and the +variable must be a user variable according to `user-variable-p'." + (let ((vars) + (val)) + (mapatoms (lambda (v) + (and (boundp v) + (user-variable-p v) + (string-match color-theme-legal-variables + (symbol-name v)) + (setq val (eval v)) + (add-to-list 'vars (cons v val))))) + (sort vars (lambda (a b) (string< (car a) (car b)))))) + +(defun color-theme-print-alist (alist) + "Print ALIST." + (insert "\n " (if alist "(" "nil")) + (dolist (elem alist) + (when (= (preceding-char) ?\)) + (insert "\n ")) + (prin1 elem (current-buffer))) + (when (= (preceding-char) ?\)) (insert ")"))) + +(defun color-theme-get-faces () + "Return a list of faces usable in a color theme. +Such an alist may be installed by `color-theme-install-faces'. The +faces returned must not match `color-theme-illegal-faces'." + (let ((faces (color-theme-filter (face-list) color-theme-illegal-faces t))) + ;; default face must come first according to comments in + ;; custom-save-faces, the rest is to be sorted by name + (cons 'default (sort (delq 'default faces) 'string-lessp)))) + +(defun color-theme-get-face-definitions () + "Return face settings usable in a color-theme." + (let ((faces (color-theme-get-faces))) + (mapcar 'color-theme-spec faces))) + +(defun color-theme-print-faces (faces) + "Print face settings for all faces returned by `color-theme-get-faces'." + (when faces + (insert "\n ")) + (dolist (face faces) + (when (= (preceding-char) ?\)) + (insert "\n ")) + (prin1 face (current-buffer)))) + +(defun color-theme-reset-faces () + "Reset face settings for all faces returned by `color-theme-get-faces'." + (let ((faces (color-theme-get-faces)) + (face) (spec) (entry) + (frame (if color-theme-is-global nil (selected-frame)))) + (while faces + (setq entry (color-theme-spec (car faces))) + (setq face (nth 0 entry)) + (setq spec '((t (nil)))) + (setq faces (cdr faces)) + (if (functionp 'face-spec-reset-face) + (face-spec-reset-face face frame) + (face-spec-set face spec frame) + (if color-theme-is-global + (put face 'face-defface-spec spec)))))) + +(defun color-theme-print-theme (func doc params vars faces) + "Print a theme into the current buffer. +FUNC is the function name, DOC the doc string, PARAMS the +frame parameters, VARS the variable bindings, and FACES +the list of faces and their specs." + (insert "(defun " (symbol-name func) " ()\n" + " \"" doc "\"\n" + " (interactive)\n" + " (color-theme-install\n" + " '(" (symbol-name func)) + ;; alist of frame parameters + (color-theme-print-alist params) + ;; alist of variables + (color-theme-print-alist vars) + ;; remaining elements of snapshot: face specs + (color-theme-print-faces faces) + (insert ")))\n") + (insert "(add-to-list 'color-themes '(" (symbol-name func) " " + " \"THEME NAME\" \"YOUR NAME\"))") + (goto-char (point-min))) + +;;;###autoload +(defun color-theme-print (&optional buf) + "Print the current color theme function. + +You can contribute this function to or +paste it into your .emacs file and call it. That should recreate all +the settings necessary for your color theme. + +Example: + + \(require 'color-theme) + \(defun my-color-theme () + \"Color theme by Alex Schroeder, created 2000-05-17.\" + \(interactive) + \(color-theme-install + '(... + ... + ...))) + \(my-color-theme) + +If you want to use a specific color theme function, you can call the +color theme function in your .emacs directly. + +Example: + + \(require 'color-theme) + \(color-theme-gnome2)" + (interactive) + (message "Pretty printing current color theme function...") + (switch-to-buffer (if buf + buf + (get-buffer-create "*Color Theme*"))) + (unless buf + (setq buffer-read-only nil) + (erase-buffer)) + ;; insert defun + (insert "(eval-when-compile" + " (require 'color-theme))\n") + (color-theme-print-theme 'my-color-theme + (concat "Color theme by " + (if (string= "" user-full-name) + (user-login-name) + user-full-name) + ", created " (format-time-string "%Y-%m-%d") ".") + (color-theme-get-params) + (color-theme-get-vars) + (mapcar 'color-theme-spec (color-theme-get-faces))) + (unless buf + (emacs-lisp-mode)) + (goto-char (point-min)) + (message "Pretty printing current color theme function... done")) + +(defun color-theme-analyze-find-theme (code) + "Find the sexpr that calls `color-theme-install'." + (let (theme) + (while (and (not theme) code) + (when (eq (car code) 'color-theme-install) + (setq theme code)) + (when (listp (car code)) + (setq theme (color-theme-analyze-find-theme (car code)))) + (setq code (cdr code))) + theme)) + +;; (equal (color-theme-analyze-find-theme +;; '(defun color-theme-blue-eshell () +;; "Color theme for eshell faces only." +;; (color-theme-install +;; '(color-theme-blue-eshell +;; nil +;; (eshell-ls-archive-face ((t (:bold t :foreground "IndianRed")))) +;; (eshell-ls-backup-face ((t (:foreground "Grey")))))))) +;; '(color-theme-install +;; (quote +;; (color-theme-blue-eshell +;; nil +;; (eshell-ls-archive-face ((t (:bold t :foreground "IndianRed")))) +;; (eshell-ls-backup-face ((t (:foreground "Grey"))))))))) + +(defun color-theme-analyze-add-face (a b regexp faces) + "If only one of A or B are in FACES, the other is added, and FACES is returned. +If REGEXP is given, this is only done if faces contains a match for regexps." + (when (or (not regexp) + (catch 'found + (dolist (face faces) + (when (string-match regexp (symbol-name (car face))) + (throw 'found t))))) + (let ((face-a (assoc a faces)) + (face-b (assoc b faces))) + (if (and face-a (not face-b)) + (setq faces (cons (list b (nth 1 face-a)) + faces)) + (if (and (not face-a) face-b) + (setq faces (cons (list a (nth 1 face-b)) + faces)))))) + faces) + +;; (equal (color-theme-analyze-add-face +;; 'blue 'violet nil +;; '((blue ((t (:foreground "blue")))) +;; (bold ((t (:bold t)))))) +;; '((violet ((t (:foreground "blue")))) +;; (blue ((t (:foreground "blue")))) +;; (bold ((t (:bold t)))))) +;; (equal (color-theme-analyze-add-face +;; 'violet 'blue nil +;; '((blue ((t (:foreground "blue")))) +;; (bold ((t (:bold t)))))) +;; '((violet ((t (:foreground "blue")))) +;; (blue ((t (:foreground "blue")))) +;; (bold ((t (:bold t)))))) +;; (equal (color-theme-analyze-add-face +;; 'violet 'blue "foo" +;; '((blue ((t (:foreground "blue")))) +;; (bold ((t (:bold t)))))) +;; '((blue ((t (:foreground "blue")))) +;; (bold ((t (:bold t)))))) +;; (equal (color-theme-analyze-add-face +;; 'violet 'blue "blue" +;; '((blue ((t (:foreground "blue")))) +;; (bold ((t (:bold t)))))) +;; '((violet ((t (:foreground "blue")))) +;; (blue ((t (:foreground "blue")))) +;; (bold ((t (:bold t)))))) + +(defun color-theme-analyze-add-faces (faces) + "Add missing faces to FACES and return it." + ;; The most important thing is to add missing faces for the other + ;; editor. These are the most important faces to check. The + ;; following rules list two faces, A and B. If either of the two is + ;; part of the theme, the other must be, too. The optional third + ;; argument specifies a regexp. Only if an existing face name + ;; matches this regexp, is the rule applied. + (let ((rules '((font-lock-builtin-face font-lock-reference-face) + (font-lock-doc-face font-lock-doc-string-face) + (font-lock-constant-face font-lock-preprocessor-face) + ;; In Emacs 21 `modeline' is just an alias for + ;; `mode-line'. I recommend the use of + ;; `modeline' until further notice. + (modeline mode-line) + (modeline modeline-buffer-id) + (modeline modeline-mousable) + (modeline modeline-mousable-minor-mode) + (region primary-selection) + (region zmacs-region) + (font-lock-string-face dired-face-boring "^dired") + (font-lock-function-name-face dired-face-directory "^dired") + (default dired-face-executable "^dired") + (font-lock-warning-face dired-face-flagged "^dired") + (font-lock-warning-face dired-face-marked "^dired") + (default dired-face-permissions "^dired") + (default dired-face-setuid "^dired") + (default dired-face-socket "^dired") + (font-lock-keyword-face dired-face-symlink "^dired") + (tool-bar menu)))) + (dolist (rule rules) + (setq faces (color-theme-analyze-add-face + (nth 0 rule) (nth 1 rule) (nth 2 rule) faces)))) + ;; The `fringe' face defines what the left and right borders of the + ;; frame look like in Emacs 21. To give them default fore- and + ;; background colors, use (fringe ((t (nil)))) in your color theme. + ;; Usually it makes more sense to choose a color slightly lighter or + ;; darker from the default background. + (unless (assoc 'fringe faces) + (setq faces (cons '(fringe ((t (nil)))) faces))) + ;; The tool-bar should not be part of the frame-parameters, since it + ;; should not appear or disappear depending on the color theme. The + ;; apppearance of the toolbar, however, can be changed by the color + ;; theme. For Emacs 21, use the `tool-bar' face. The easiest way + ;; to do this is to give it the default fore- and background colors. + ;; This can be achieved using (tool-bar ((t (nil)))) in the theme. + ;; Usually it makes more sense, however, to provide the same colors + ;; as used in the `menu' face, and to specify a :box attribute. In + ;; order to alleviate potential Emacs/XEmacs incompatibilities, + ;; `toolbar' will be defined as an alias for `tool-bar' if it does + ;; not exist, and vice-versa. This is done eventhough the face + ;; `toolbar' seems to have no effect on XEmacs. If you look at + ;; XEmacs lisp/faces.el, however, you will find that it is in fact + ;; referenced for XPM stuff. + (unless (assoc 'tool-bar faces) + (setq faces (cons '(tool-bar ((t (nil)))) faces))) + ;; Move the default face back to the front, and sort the rest. + (unless (eq (caar faces) 'default) + (let ((face (assoc 'default faces))) + (setq faces (cons face + (sort (delete face faces) + (lambda (a b) + (string-lessp (car a) (car b)))))))) + faces) + +(defun color-theme-analyze-remove-heights (faces) + "Remove :height property where it is an integer and return FACES." + ;; I don't recommend making font sizes part of a color theme. Most + ;; users would be surprised to see their font sizes change when they + ;; install a color-theme. Therefore, remove all :height attributes + ;; if the value is an integer. If the value is a float, this is ok + ;; -- the value is relative to the default height. One notable + ;; exceptions is for a color-theme created for visually impaired + ;; people. These *must* use a larger font in order to be usable. + (let (result) + (dolist (face faces) + (let ((props (cadar (nth 1 face)))) + (if (and (plist-member props :height) + (integerp (plist-get props :height))) + (setq props (color-theme-plist-delete props :height) + result (cons (list (car face) `((t ,props))) + result)) + (setq result (cons face result))))) + (nreverse result))) + +;; (equal (color-theme-analyze-remove-heights +;; '((blue ((t (:foreground "blue" :height 2)))) +;; (bold ((t (:bold t :height 1.0)))))) +;; '((blue ((t (:foreground "blue")))) +;; (bold ((t (:bold t :height 1.0)))))) + +;;;###autoload +(defun color-theme-analyze-defun () + "Once you have a color-theme printed, check for missing faces. +This is used by maintainers who receive a color-theme submission +and want to make sure it follows the guidelines by the color-theme +author." + ;; The support for :foreground and :background attributes works for + ;; Emacs 20 and 21 as well as for XEmacs. :inverse-video is taken + ;; care of while printing color themes. + (interactive) + ;; Parse the stuff and find the call to color-theme-install + (save-excursion + (save-restriction + (narrow-to-defun) + ;; define the function + (eval-defun nil) + (goto-char (point-min)) + (let* ((code (read (current-buffer))) + (theme (color-theme-canonic + (eval + (cadr + (color-theme-analyze-find-theme + code))))) + (func (color-theme-function theme)) + (doc (documentation func t)) + (variables (color-theme-variables theme)) + (faces (color-theme-faces theme)) + (params (color-theme-frame-params theme))) + (setq faces (color-theme-analyze-remove-heights + (color-theme-analyze-add-faces faces))) + ;; Remove any variable bindings of faces that point to their + ;; symbol? Perhaps not, because another theme might want to + ;; change this, so it is important to be able to reset them. + ;; (let (result) + ;; (dolist (var variables) + ;; (unless (eq (car var) (cdr var)) + ;; (setq result (cons var result)))) + ;; (setq variables (nreverse result))) + ;; Now modify the theme directly. + (setq theme (color-theme-analyze-find-theme code)) + (setcdr (cadadr theme) (list params variables faces)) + (message "Pretty printing analysed color theme function...") + (with-current-buffer (get-buffer-create "*Color Theme*") + (setq buffer-read-only nil) + (erase-buffer) + ;; insert defun + (color-theme-print-theme func doc params variables faces) + (emacs-lisp-mode)) + (message "Pretty printing analysed color theme function... done") + (ediff-buffers (current-buffer) + (get-buffer "*Color Theme*")))))) + +;;; Creating a snapshot of the current color theme + +(defun color-theme-snapshot nil) + +;;;###autoload +(defun color-theme-make-snapshot () + "Return the definition of the current color-theme. +The function returned will recreate the color-theme in use at the moment." + (eval `(lambda () + "The color theme in use when the selection buffer was created. +\\[color-theme-select] creates the color theme selection buffer. At the +same time, this snapshot is created as a very simple undo mechanism. +The snapshot is created via `color-theme-snapshot'." + (interactive) + (color-theme-install + '(color-theme-snapshot + ;; alist of frame parameters + ,(color-theme-get-params) + ;; alist of variables + ,(color-theme-get-vars) + ;; remaining elements of snapshot: face specs + ,@(color-theme-get-face-definitions)))))) + + + +;;; Handling the various parts of a color theme install + +(defvar color-theme-frame-param-frobbing-rules + '((foreground-color default foreground) + (background-color default background)) + "List of rules to use when frobbing faces based on frame parameters. +This is only necessary for XEmacs, because in Emacs 21 changing the +frame paramters automatically affects the relevant faces.") + +;; fixme: silent the bytecompiler with set-face-property +(defun color-theme-frob-faces (params) + "Change certain faces according to PARAMS. +This uses `color-theme-frame-param-frobbing-rules'." + (dolist (rule color-theme-frame-param-frobbing-rules) + (let* ((param (nth 0 rule)) + (face (nth 1 rule)) + (prop (nth 2 rule)) + (val (cdr (assq param params))) + (frame (if color-theme-is-global nil (selected-frame)))) + (when val + (set-face-property face prop val frame))))) + +(defun color-theme-alist-reduce (old-list) + "Reduce OLD-LIST. +The resulting list will be newly allocated and will not contain any elements +with duplicate cars. This will speed the installation of new themes by +only installing unique attributes." + (let (new-list) + (dolist (elem old-list) + (when (not (assq (car elem) new-list)) + (setq new-list (cons elem new-list)))) + new-list)) + +(defun color-theme-install-frame-params (params) + "Change frame parameters using alist PARAMETERS. + +If `color-theme-is-global' is non-nil, all frames are modified using +`modify-frame-parameters' and the PARAMETERS are prepended to +`default-frame-alist'. The value of `initial-frame-alist' is not +modified. If `color-theme-is-global' is nil, only the selected frame is +modified. If `color-theme-is-cumulative' is nil, the frame parameters +are restored from `color-theme-original-frame-alist'. + +If the current frame parameters have a parameter `minibuffer' with +value `only', then the frame parameters are not installed, since this +indicates a dedicated minibuffer frame. + +Called from `color-theme-install'." + (setq params (color-theme-filter + params color-theme-legal-frame-parameters)) + ;; We have a new list in params now, therefore we may use + ;; destructive nconc. + (if color-theme-is-global + (let ((frames (frame-list))) + (if (or color-theme-is-cumulative + (null color-theme-original-frame-alist)) + (setq default-frame-alist + (append params (color-theme-alist default-frame-alist)) + minibuffer-frame-alist + (append params (color-theme-alist minibuffer-frame-alist))) + (setq default-frame-alist + (append params color-theme-original-frame-alist) + minibuffer-frame-alist + (append params (color-theme-alist minibuffer-frame-alist)))) + (setq default-frame-alist + (color-theme-alist-reduce default-frame-alist) + minibuffer-frame-alist + (color-theme-alist-reduce minibuffer-frame-alist)) + (dolist (frame frames) + (let ((params (if (eq 'only (cdr (assq 'minibuffer (frame-parameters frame)))) + minibuffer-frame-alist + default-frame-alist))) + (condition-case var + (modify-frame-parameters frame params) + (error (message "Error using params %S: %S" params var)))))) + (condition-case var + (modify-frame-parameters (selected-frame) params) + (error (message "Error using params %S: %S" params var)))) + (when color-theme-xemacs-p + (color-theme-frob-faces params))) + +;; (setq default-frame-alist (cons '(height . 30) default-frame-alist)) + +(defun color-theme-install-variables (vars) + "Change variables using alist VARS. +All variables matching `color-theme-legal-variables' are set. + +If `color-theme-is-global' and `color-theme-xemacs-p' are nil, variables +are made frame-local before setting them. Variables are set using `set' +in either case. This may lead to problems if changing the variable +requires the usage of the function specified with the :set tag in +defcustom declarations. + +Called from `color-theme-install'." + (let ((vars (color-theme-filter vars color-theme-legal-variables))) + (dolist (var vars) + (if (or color-theme-is-global color-theme-xemacs-p) + (set (car var) (cdr var)) + (make-variable-frame-local (car var)) + (modify-frame-parameters (selected-frame) (list var)))))) + +(defun color-theme-install-faces (faces) + "Change faces using FACES. + +Change faces for all frames and create any faces listed in FACES which +don't exist. The modified faces will be marked as \"unchanged from +its standard setting\". This is OK, since the changes made by +installing a color theme should never by saved in .emacs by +customization code. + +FACES should be a list where each entry has the form: + + (FACE SPEC) + +See `defface' for the format of SPEC. + +If `color-theme-is-global' is non-nil, faces are modified on all frames +using `face-spec-set'. If `color-theme-is-global' is nil, faces are +only modified on the selected frame. Non-existing faces are created +using `make-empty-face' in either case. If `color-theme-is-cumulative' +is nil, all faces are reset before installing the new faces. + +Called from `color-theme-install'." + ;; clear all previous faces + (when (not color-theme-is-cumulative) + (color-theme-reset-faces)) + ;; install new faces + (let ((faces (color-theme-filter faces color-theme-illegal-faces t)) + (frame (if color-theme-is-global nil (selected-frame)))) + (dolist (entry faces) + (let ((face (nth 0 entry)) + (spec (nth 1 entry))) + (or (facep face) + (make-empty-face face)) + ;; remove weird properties from the default face only + (when (eq face 'default) + (setq spec (color-theme-spec-filter spec))) + ;; Emacs/XEmacs customization issues: filter out :bold when + ;; the spec contains :weight, etc, such that the spec remains + ;; "valid" for custom. + (setq spec (color-theme-spec-compat spec)) + ;; using a spec of ((t (nil))) to reset a face doesn't work + ;; in Emacs 21, we use the new function face-spec-reset-face + ;; instead + (if (and (functionp 'face-spec-reset-face) + (equal spec '((t (nil))))) + (face-spec-reset-face face frame) + (condition-case var + (progn + (face-spec-set face spec frame) + (if color-theme-is-global + (put face 'face-defface-spec spec))) + (error (message "Error using spec %S: %S" spec var)))))))) + +;; `custom-set-faces' is unusable here because it doesn't allow to set +;; the faces for one frame only. + +;; Emacs `face-spec-set': If FRAME is nil, the face is created and +;; marked as a customized face. This is achieved by setting the +;; `face-defface-spec' property. If we don't, new frames will not be +;; created using the face we installed because `face-spec-set' is +;; broken: If given a FRAME of nil, it will not set the default faces; +;; instead it will walk through all the frames and set modify the faces. +;; If we do set a property (`saved-face' or `face-defface-spec'), +;; `make-frame' will correctly use the faces we defined with our color +;; theme. If we used the property `saved-face', +;; `customize-save-customized' will save all the faces installed as part +;; of a color-theme in .emacs. That's why we use the +;; `face-defface-spec' property. + + + +;;; Theme accessor functions, canonicalization, merging, comparing + +(defun color-theme-canonic (theme) + "Return the canonic form of THEME. +This deals with all the backwards compatibility stuff." + (let (function frame-params variables faces) + (when (functionp (car theme)) + (setq function (car theme) + theme (cdr theme))) + (setq frame-params (car theme) + theme (cdr theme)) + ;; optional variable defintions (for backwards compatibility) + (when (listp (caar theme)) + (setq variables (car theme) + theme (cdr theme))) + ;; face definitions + (setq faces theme) + (list function frame-params variables faces))) + +(defun color-theme-function (theme) + "Return function used to create THEME." + (nth 0 theme)) + +(defun color-theme-frame-params (theme) + "Return frame-parameters defined by THEME." + (nth 1 theme)) + +(defun color-theme-variables (theme) + "Return variables set by THEME." + (nth 2 theme)) + +(defun color-theme-faces (theme) + "Return faces defined by THEME." + (nth 3 theme)) + +(defun color-theme-merge-alists (&rest alists) + "Merges all the alist arguments into one alist. +Only the first instance of every key will be part of the resulting +alist. Membership will be tested using `assq'." + (let (result) + (dolist (l alists) + (dolist (entry l) + (unless (assq (car entry) result) + (setq result (cons entry result))))) + (nreverse result))) +;; (color-theme-merge-alists '((a . 1) (b . 2))) +;; (color-theme-merge-alists '((a . 1) (b . 2) (a . 3))) +;; (color-theme-merge-alists '((a . 1) (b . 2)) '((a . 3))) +;; (color-theme-merge-alists '((a . 1) (b . 2)) '((c . 3))) +;; (color-theme-merge-alists '((a . 1) (b . 2)) '((c . 3) (d . 4))) +;; (color-theme-merge-alists '((a . 1) (b . 2)) '((c . 3) (d . 4) (b . 5))) + +;;;###autoload +(defun color-theme-compare (theme-a theme-b) + "Compare two color themes. +This will print the differences between installing THEME-A and +installing THEME-B. Note that the order is important: If a face is +defined in THEME-A and not in THEME-B, then this will not show up as a +difference, because there is no reset before installing THEME-B. If a +face is defined in THEME-B and not in THEME-A, then this will show up as +a difference." + (interactive + (list + (intern + (completing-read "Theme A: " + (mapcar (lambda (i) (list (symbol-name (car i)))) + color-themes) + (lambda (i) (string-match "color-theme" (car i))))) + (intern + (completing-read "Theme B: " + (mapcar (lambda (i) (list (symbol-name (car i)))) + color-themes) + (lambda (i) (string-match "color-theme" (car i))))))) + ;; install the themes in a new frame and get the definitions + (let ((color-theme-is-global nil)) + (select-frame (make-frame)) + (funcall theme-a) + (setq theme-a (list theme-a + (color-theme-get-params) + (color-theme-get-vars) + (color-theme-get-face-definitions))) + (funcall theme-b) + (setq theme-b (list theme-b + (color-theme-get-params) + (color-theme-get-vars) + (color-theme-get-face-definitions))) + (delete-frame)) + (let ((params (set-difference + (color-theme-frame-params theme-b) + (color-theme-frame-params theme-a) + :test 'equal)) + (vars (set-difference + (color-theme-variables theme-b) + (color-theme-variables theme-a) + :test 'equal)) + (faces (set-difference + (color-theme-faces theme-b) + (color-theme-faces theme-a) + :test 'equal))) + (list 'diff + params + vars + faces))) + + + +;;; Installing a color theme +;;;###autoload +(defun color-theme-install (theme) + "Install a color theme defined by frame parameters, variables and faces. + +The theme is installed for all present and future frames; any missing +faces are created. See `color-theme-install-faces'. + +THEME is a color theme definition. See below for more information. + +If you want to install a color theme from your .emacs, use the output +generated by `color-theme-print'. This produces color theme function +which you can copy to your .emacs. + +A color theme definition is a list: +\([FUNCTION] FRAME-PARAMETERS VARIABLE-SETTINGS FACE-DEFINITIONS) + +FUNCTION is the color theme function which called `color-theme-install'. +This is no longer used. There was a time when this package supported +automatic factoring of color themes. This has been abandoned. + +FRAME-PARAMETERS is an alist of frame parameters. These are installed +with `color-theme-install-frame-params'. These are installed last such +that any changes to the default face can be changed by the frame +parameters. + +VARIABLE-DEFINITIONS is an alist of variable settings. These are +installed with `color-theme-install-variables'. + +FACE-DEFINITIONS is an alist of face definitions. These are installed +with `color-theme-install-faces'. + +If `color-theme-is-cumulative' is nil, a color theme will undo face and +frame-parameter settings of previous color themes." + (setq theme (color-theme-canonic theme)) + (color-theme-install-variables (color-theme-variables theme)) + (color-theme-install-faces (color-theme-faces theme)) + ;; frame parameters override faces + (color-theme-install-frame-params (color-theme-frame-params theme)) + (when color-theme-history-max-length + (color-theme-add-to-history + (car theme)))) + + + +;; Sharing your stuff +;;;###autoload +(defun color-theme-submit () + "Submit your color-theme to the maintainer." + (interactive) + (require 'reporter) + (let ((reporter-eval-buffer (current-buffer)) + final-resting-place + after-sep-pos + (reporter-status-message "Formatting buffer...") + (reporter-status-count 0) + (problem "Yet another color-theme") + (agent (reporter-compose-outgoing)) + (mailbuf (current-buffer)) + hookvar) + ;; do the work + (require 'sendmail) + ;; If mailbuf did not get made visible before, make it visible now. + (let (same-window-buffer-names same-window-regexps) + (pop-to-buffer mailbuf) + ;; Just in case the original buffer is not visible now, bring it + ;; back somewhere + (and pop-up-windows (display-buffer reporter-eval-buffer))) + (goto-char (point-min)) + (mail-position-on-field "to") + (insert color-theme-maintainer-address) + (mail-position-on-field "subject") + (insert problem) + ;; move point to the body of the message + (mail-text) + (setq after-sep-pos (point)) + (unwind-protect + (progn + (setq final-resting-place (point-marker)) + (goto-char final-resting-place)) + (color-theme-print (current-buffer)) + (goto-char final-resting-place) + (insert "\n\n") + (goto-char final-resting-place) + (insert "Hello there!\n\nHere's my color theme named: ") + (set-marker final-resting-place nil)) + ;; compose the minibuf message and display this. + (let* ((sendkey-whereis (where-is-internal + (get agent 'sendfunc) nil t)) + (abortkey-whereis (where-is-internal + (get agent 'abortfunc) nil t)) + (sendkey (if sendkey-whereis + (key-description sendkey-whereis) + "C-c C-c")); TBD: BOGUS hardcode + (abortkey (if abortkey-whereis + (key-description abortkey-whereis) + "M-x kill-buffer"))); TBD: BOGUS hardcode + (message "Enter a message and type %s to send or %s to abort." + sendkey abortkey)))) + + + +;; Use this to define themes +(defmacro define-color-theme (name author description &rest forms) + (let ((n name)) + `(progn + (add-to-list 'color-themes + (list ',n + (upcase-initials + (replace-in-string + (replace-in-string + (symbol-name ',n) "^color-theme-" "") "-" " ")) + ,author)) + (defun ,n () + ,description + (interactive) + ,@forms)))) + + +;;; FIXME: is this useful ?? +;;;###autoload +(defun color-theme-initialize () + "Initialize the color theme package by loading color-theme-libraries." + (interactive) + + (cond ((and (not color-theme-load-all-themes) + color-theme-directory) + (setq color-theme-libraries + (directory-files color-theme-directory t "^color-theme"))) + (color-theme-directory + (push (cdr (directory-files color-theme-directory t "^color-theme")) + color-theme-libraries))) + (dolist (library color-theme-libraries) + (load library))) + +(when nil + (setq color-theme-directory "themes/" + color-theme-load-all-themes nil) + (color-theme-initialize) +) +;; TODO: I don't like all those function names cluttering up my namespace. +;; Instead, a hashtable for the color-themes should be created. Now that +;; define-color-theme is around, it should be easy to change in just the +;; one place. + + +(provide 'color-theme) + +;;; color-theme.el ends here diff --git a/web/elisp/org-batch.el b/web/elisp/org-batch.el new file mode 100644 index 0000000..058ef54 --- /dev/null +++ b/web/elisp/org-batch.el @@ -0,0 +1,27 @@ +;; emacs org-mode batch configuration + +;; local emacs extensions +(add-to-list 'load-path "./elisp") + +;;; ORG mode +(require 'org-install) +(require 'org-exp-blocks) +(require 'htmlize) + +;; set auto load on .org files +(add-to-list 'auto-mode-alist '("\\.org\\'" . org-mode)) + +;; org mode customisations +(setq org-export-htmlize-output-type 'css) + + +'(org-export-blocks (quote ((comment org-export-blocks-format-comment t) (ditaa org-export-blocks-format-ditaa nil) (dot org-export-blocks-format-dot t) (r org-export-blocks-format-R nil) (R org-export-blocks-format-R nil)))) +'(org-export-html-inline-images t) +'(org-export-html-use-infojs t) + + +'(org-export-htmlize-output-type "css") +'(org-export-html-validation-link "

Validate XHTML 1.0

") +'(org-export-html-with-timestamp nil) +'(org-modules (quote (org-bbdb org-bibtex org-info org-jsinfo org-irc org-w3m org-mouse org-eval org-eval-light org-exp-bibtex org-man org-mtags org-panel org-R org-special-blocks org-exp-blocks))) + diff --git a/web/elisp/themes/color-theme-twilight.el b/web/elisp/themes/color-theme-twilight.el new file mode 100644 index 0000000..a6f9d28 --- /dev/null +++ b/web/elisp/themes/color-theme-twilight.el @@ -0,0 +1,69 @@ +;; Twilight Colour Theme for Emacs. +;; +;; Defines a colour scheme resembling that of the original TextMate Twilight colour theme. +;; To use add the following to your .emacs file (requires the color-theme package): +;; +;; (require 'color-theme) +;; (color-theme-initialize) +;; (load-file "~/.emacs.d/twilight-emacs/color-theme-twilight.el") +;; +;; And then (color-theme-twilight) to activate it. +;; +;; Several areas still require improvement such as recognition of code that ruby-mode doesn't +;; yet pick up (eg. parent classes), Rails/Merb keywords, or non Ruby code related areas +;; (eg. dired, HTML, etc). Please feel free to customize further and send in any improvements, +;; patches most welcome. +;; +;; MIT License Copyright (c) 2008 Marcus Crafter +;; Credits due to the excellent TextMate Twilight theme +;; +;; Thanks to Travis Jeffery for ido-mode and fixes to the minibuffer-prompt to fit in with the rest of the theme +;; + +(defun color-theme-twilight () + "Color theme by Marcus Crafter, based off the TextMate Twilight theme, created 2008-04-18" + (interactive) + (color-theme-install + '(color-theme-twilight + ((background-color . "#141414") + (background-mode . dark) + (border-color . "black") + (cursor-color . "#A7A7A7") + (foreground-color . "#F8F8F8") + (mouse-color . "sienna1")) + (default ((t (:background "#141414" :foreground "#CACACA")))) + (blue ((t (:foreground "blue")))) + (border-glyph ((t (nil)))) + (buffers-tab ((t (:background "#141414" :foreground "#CACACA")))) + (font-lock-builtin-face ((t (:foreground "#CACACA")))) + (font-lock-comment-face ((t (:foreground "#5F5A60")))) + (font-lock-constant-face ((t (:foreground "#CF6A4C")))) + (font-lock-doc-string-face ((t (:foreground "DarkOrange")))) + (font-lock-function-name-face ((t (:foreground "#9B703F")))) + (font-lock-keyword-face ((t (:foreground "#CDA869")))) + (font-lock-preprocessor-face ((t (:foreground "Aquamarine")))) + (font-lock-reference-face ((t (:foreground "SlateBlue")))) + + (font-lock-regexp-grouping-backslash ((t (:foreground "#E9C062")))) + (font-lock-regexp-grouping-construct ((t (:foreground "red")))) + + (minibuffer-prompt ((t (:foreground "#5F5A60")))) + (ido-subdir ((t (:foreground "#CF6A4C")))) + (ido-first-match ((t (:foreground "#8F9D6A")))) + (ido-only-match ((t (:foreground "#8F9D6A")))) + (mumamo-background-chunk-submode ((t (:background "#222222")))) + + (font-lock-string-face ((t (:foreground "#8F9D6A")))) + (font-lock-type-face ((t (:foreground "#9B703F")))) + (font-lock-variable-name-face ((t (:foreground "#7587A6")))) + (font-lock-warning-face ((t (:background "#EE799F" :foreground "red")))) + (gui-element ((t (:background "#D4D0C8" :foreground "black")))) + (region ((t (:background "#27292A")))) + (mode-line ((t (:background "grey75" :foreground "black")))) + (highlight ((t (:background "#111111")))) + (highline-face ((t (:background "SeaGreen")))) + (left-margin ((t (nil)))) + (text-cursor ((t (:background "yellow" :foreground "black")))) + (toolbar ((t (nil)))) + (underline ((nil (:underline nil)))) + (zmacs-region ((t (:background "snow" :foreground "blue"))))))) diff --git a/web/gallery.php b/web/gallery.php new file mode 100644 index 0000000..502515c --- /dev/null +++ b/web/gallery.php @@ -0,0 +1,120 @@ +compile_check = true; +$smarty->debugging = false; +$smarty->caching = 0; + +$smarty->cache_dir = "cache"; +$smarty->template_dir = "templates"; +$smarty->compile_dir = "templates_c"; +$smarty->plugins_dir = array('/usr/share/php/smarty/plugins'); + + + +$filter = $_GET["filter"]; +$generator = $_GET["generator"]; +$mixer2 = $_GET["mixer2"]; +$mixer3 = $_GET["mixer3"]; + +if( $filter || $generator || $mixer2 || $mixer3 ) { // pages selected + + if($filter) { + + $smarty->assign("page_hgroup", "

Frei0r filter :: $filter

"); + + $fd = fopen("filter/$filter.html","r"); + + if(!$fd) { $selection = NULL; } + else { + $selection = "filter/$filter.html"; + fclose($fd); + } + + } else if($generator) { + + $smarty->assign("page_hgroup", "

Frei0r generator :: $generator

"); + + $fd = fopen("generator/$generator.html","r"); + + if(!$fd) { $selection = NULL; } + else { + $selection = "generator/$generator.html"; + fclose($fd); + } + + } else if($mixer2) { + + $smarty->assign("page_hgroup", "

Frei0r mixer-2 :: $mixer2

"); + + $fd = fopen("mixer2/$mixer2.html","r"); + + if(!$fd) { $selection = NULL; } + else { + $selection = "mixer2/$mixer2.html"; + fclose($fd); + } + + } else if($mixer3) { + + $smarty->assign("page_hgroup", "

Frei0r mixer-3 :: $mixer3

"); + + $fd = fopen("mixer3/$mixer3.html","r"); + + if(!$fd) { $selection = NULL; } + else { + $selection = "mixer3/$mixer3.html"; + fclose($fd); + } + + } + +} + +if(!$selection) { + + $smarty->assign("page_hgroup", "

Frei0r plugin gallery

"); + + $selection = "gallery-index.html"; + +} + + + + +$smarty->assign("page_class", "software org-mode"); + +$smarty->assign("page_title", "free video effect plugins gallery"); +$smarty->assign("stylesheet", "gallery.css"); + +$smarty->assign("pagename","software"); +$smarty->display("_header.tpl"); + +if(! $selection) { echo("

file not found: $filter $generator

"); +} else { showfile($selection); } + +$smarty->display("_footer.tpl"); + +?> diff --git a/web/helpers.inc.php b/web/helpers.inc.php new file mode 100644 index 0000000..3d2f28b --- /dev/null +++ b/web/helpers.inc.php @@ -0,0 +1,44 @@ +ERROR: $f not found

"; + } else { + $st = fstat($fd); + $text = fread($fd,$st["size"]); fclose($fd); + } + echo($text); +} + +function stripslashes_array($value) { + $value = is_array($value) ? + array_map('stripslashes_array', $value) : + stripslashes($value); + + return $value; +} + +function div($str) { echo("\n
\n"); } +function section($str) { echo("\n
\n"); } + +?> diff --git a/web/images/livido_pikselites01.jpg b/web/images/livido_pikselites01.jpg new file mode 100644 index 0000000..b64c25b Binary files /dev/null and b/web/images/livido_pikselites01.jpg differ diff --git a/web/images/livido_pikselites02.jpg b/web/images/livido_pikselites02.jpg new file mode 100644 index 0000000..6476c23 Binary files /dev/null and b/web/images/livido_pikselites02.jpg differ diff --git a/web/images/livido_pikselites03.jpg b/web/images/livido_pikselites03.jpg new file mode 100644 index 0000000..59bccf1 Binary files /dev/null and b/web/images/livido_pikselites03.jpg differ diff --git a/web/index.org b/web/index.org new file mode 100644 index 0000000..57f416f --- /dev/null +++ b/web/index.org @@ -0,0 +1,252 @@ +#+TITLE: Frei0r - free video plugins +#+AUTHOR: Pikselites +#+EMAIL: frei0r-dev@dyne.org +#+LANGUAGE: en +#+OPTIONS: H:3 num:nil toc:t \n:nil @:t ::t |:t ^:t -:t f:t *:t +#+OPTIONS: TeX:t LaTeX:t skip:t d:nil tags:not-in-toc + +#+INFOJS_OPT: path:org-info.js +#+INFOJS_OPT: toc:nil localtoc:nil view:content sdepth:2 mouse:underline buttons:nil +#+INFOJS_OPT: home:http://frei0r.dyne.org + +#+LATEX_CLASS: book-1column + +#+LATEX_HEADER: \usepackage[english]{babel} +#+LATEX_HEADER: \usepackage{amsfonts, amsmath, amssymb} +#+LATEX_HEADER: \usepackage{ucs} +#+LATEX_HEADER: \usepackage{listings} +#+LATEX_HEADER: \usepackage[utf8x]{inputenc} +#+LATEX_HEADER: \usepackage[T1]{fontenc} +#+LATEX_HEADER: \usepackage{hyperref} +#+LATEX_HEADER: \usepackage[pdftex]{graphicx} +#+LATEX_HEADER: \usepackage{fullpage} +#+LATEX_HEADER: \usepackage{lmodern} + + +* Introduction + +#+HTML: + +** What Frei0r is + +Frei0r is a minimalistic plugin API for video effects. + +The main emphasis is on simplicity for an API that will round up the +most common video effects into 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. + +** What Frei0r is not + +Frei0r 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. + +It is not meant as a generic API for all kinds of video applications, +as it doesn't provides things like an extensive parameter mechanism or +event handling. + +Eventually the frei0r API can be wrapped by higher level APIs +expanding its functionalities (for instance as GStreamer, MLT, FFmpeg +and others do). + +** Current status + +#+BEGIN_HTML: +
+ + + +
+#+END_HTML: + +If you like to peek in what's boiling in the pot, have a look at our +[[file:TODO][TODO]] + +Developers are sporadically contributing and we are happy if more +people like to get involved, so let us know about your creations! Code +and patches are well accepted, get in touch with us on the +mailinglist. + +** Code gallery + +You might want to look at the code in frei0r more in detail, then +browse the existing effects by visiting the [[/gallery][Frei0r plugin gallery]]. + +** History + +Frei0r has been around since 2006, born from yearly brainstormings +held at the [[http://www.piksel.no][Piksel]] conference with the participation of various free +and open source video software developers. + +It is mostly adopted on GNU/Linux and OSX platforms, counts more than +80 effects implemented and is used by free video applications as +[[http://www.artefacte.org/pd/][PureData]], [[http://openmovieeditor.sourceforge.net/][Open Movie Editor]], [[http://www.freenet.org.nz/dvedit][DVEdit]], [[http://www.gephex.org/][Gephex]], [[http://lives.sf.net][LiVES]], [[http://freej.dyne.org][FreeJ]], [[http://mob.bek.no/][MøB]], +[[http://veejayhq.net][VeeJay]], [[http://www.mltframework.org/][MLT]] and [[http://www.kdenlive.org/][KDEnLive]] among the others. + +Find our more on the [[http://en.wikipedia.org/wiki/Frei0r][Wikipedia page about Frei0r]]. + + +* Download + +** Source code + +Stable frei0r releases are packaged periodically and distributed on + + ftp://ftp.dyne.org/frei0r + +We encourage the unauthorized mirroring of this source repository by +all those interested, using the command + + rsync -Pr rsync.dyne.org::frei0r . + +Frei0r sourcecode is released under the terms of the GNU General +Public License and, eventually other compatible Free Software +licenses. + +The latest source for frei0r plugins can be attained using our +revisioning system *GIT* + +: git clone git://code.dyne.org/frei0r.git + +Daily snapshots are on the FTP and on [[http://www.piksel.no/frei0r/snapshot/][www.piksel.no/frei0r/snapshot]] + +*** Build dependencies + + + GNU autotools ( ./configure && make ) + or + + CMake ( cmake . && make ) + +Frei0r can be built on GNU/Linux, M$/Windows and Apple/OSX platforms, +possibly in even more environments. + +**** Optional Dependencies + + + [[http://gmerlin.sourceforge.net/][Gavl]] ( required for scale0tilt and vectorscope filters ) + + [[http://opencvlibrary.sourceforge.net/][OpenCV]] (required for facebl0r filter ) + + +** Debian / Ubuntu + +Binary packages are mantained for Debian ([[http://packages.qa.debian.org/f/frei0r.html][QA]]) and Ubuntu ([[http://packages.ubuntu.com/search?searchon=names&keywords=frei0r][pkg]]), to +install the stable version distributed use *apt-get* or *synaptic*: + +: sudo apt-get install frei0r-plugins + +** Apple / OSX + +[[http://www.macports.org][MacPorts]] provide ready to install packages for OSX: in case you have +this packaging system installed, you just need to open a terminal and +give the following command: + +: sudo port install frei0r-plugins + +* Documentation + +If you are new to frei0r (but not to programming) the best thing is +probably to have a look at the [[/codedoc/html/frei0r_8h-source.html][frei0r header]], which is quite simple +and well documented + +** API explanation + +While the main source of documentation for the Frei0r API is the +header, the sourcecode is well commented so you can study its full +[[http://frei0r.dyne.org/codedoc/html][doxyfied documentation]] online. + +** C++ Filter example + +A simple skeleton for a frei0r video filter looks like this: + +#+BEGIN_SRC c++ +#include + +typedef struct { + int16_t w, h; + uint8_t bpp; + uint32_t size; +} ScreenGeometry; + +class MyExample: public frei0r::filter { +public: + MyExample(int wdt, int hgt); + ~MyExample(); + virtual void update(); +private: + ScreenGeometry geo; + void _init(int wdt, int hgt); +} + +MyExample::MyExample() { /* constructor */ } +MyExample::~MyExample() { /* destructor */ } + +void MyExample::_init(int wdt, int hgt) { + geo.w = wdt; + geo.h = hgt; + geo.bpp = 32; // this filter works only in RGBA 32bit + geo.size = geo.w*geo.h*(geo.bpp/8); // calculate the size in bytes +} + +void MyExample::update() { + // we get video input via buffer pointer (void*)in + uint32_t *src = (uint32_t*)in; + // and we give video output via buffer pointer (void*)out + uint32_t *dst = (uint32_t*)out; + // this example here does just a copy of input to output + memcpy(dst, src, geo.size); +} + +frei0r::construct + plugin("MyExample", "short and simple description for my example", + "Who did it", 1, 0); + +#+END_SRC + +* Communication + +You can get in touch with our developer community, send your new +effects and share your intentions with us. + +We have a free mailinglist open to subscription on [[https://piksel.no/mailman/listinfo/frei0r-devel][frei0r-devel]] with +[[http://piksel.no/pipermail/frei0r-devel/][public archives]] that are also [[http://blog.gmane.org/gmane.comp.video.frei0r.devel][searchable and indexed]] online. + +For effective and indexed bug reporting regarding plugin +implementations and platform builds, here is a publicly available +[[http://www.piksel.no/projects/frei0r/report][issue tracker]]. + +* Acknowledgments + +#+HTML: pikselites pic1 + +Frei0r is the result of a collective effort in coordination with +several software developers meeting at [[http://www.piksel.no][Piksel]] between 2003 and 2005 to +find a common standard for video effect plugins to be used among their +applications: Andraz Tori (Cinelerra/CVS), Daniel Fischer +(Pakt/GStreamet), Denis Jaromil Rojo (FreeJ/Dyne), Gabriel "Salsaman" +Finch (LiVES), Kentaro Fukuchi (EffecTV), Niels Elburg (VeeJay), +Øyvind Kolås (Gegl/Babl/Gimp), Tom Schouten (PDP/PureData), Georg +Seidel, Martin Bayer and Phillip Promesberger (Gephex). + +#+HTML: pikselites pic1 + +We first aimed at the realisation of a comprehensive specification for +dynamically loaded plugins named [[http://livido.dyne.org/codedoc/][LiViDO]], which then spawned two +implementations: one being Frei0r, a minimalistic implementation +contributed by the Gephex team and the other one being the [[http://lives.cvs.sourceforge.net/lives/lives/weed-docs/][WEED]] +implementation by LiVES developer Salsaman, sporting more features for +GUI integration and scriptability. + +#+HTML: pikselites pic1 + +Within the span of a few years, the minimalistic approach of *frei0r* +has been widely adopted among more applications and became a *de-facto +standard*. Maintenance and further refinements were contributed by +Carlo Prelz (MøB/BEK), Richard Spindler (Open Movie Editor) and Dan +Dennedy (MLT/KDEnLive), while Debian/Ubuntu packaging and build system +standardization were taken care of by dyne.org developers Filippo +Giunchedi and Luca Bigliardi. For a complete list of contributors, +please refer to the [[AUTHORS]] file. + +--------------------------------------------------------------------- diff --git a/web/index.php b/web/index.php new file mode 100644 index 0000000..e9d7b46 --- /dev/null +++ b/web/index.php @@ -0,0 +1,54 @@ +compile_check = true; +$smarty->debugging = false; +$smarty->caching = 0; + +$smarty->cache_dir = "cache"; +$smarty->template_dir = "templates"; +$smarty->compile_dir = "templates_c"; +$smarty->plugins_dir = array('/usr/share/php/smarty/plugins'); + + +$smarty->assign("page_class", "software org-mode"); +$smarty->assign("page_hgroup", "

Frei0r

"); +$smarty->assign("page_title", "free video effect plugins"); + +$smarty->assign("pagename","software"); +$smarty->display("_header.tpl"); + +// sidebar +div("menu"); +$smarty->display("software/doctypes.tpl"); +showfile("index-toc.html"); +echo("
"); + +// page content +showfile("index-body.html"); + +$smarty->display("_footer.tpl"); + +?> diff --git a/web/stylesheets/dyne.css b/web/stylesheets/dyne.css new file mode 100644 index 0000000..cf9fa23 --- /dev/null +++ b/web/stylesheets/dyne.css @@ -0,0 +1,131 @@ +body { + background-color: #fed; + color: #000; + font-family: monospace; + font-size: medium; +} + +a { text-decoration: none } +a:link { color: #a60; } +a:visited { color: #840 } +a:hover,a:focus,a:active { text-decoration: underline } + +#dyne_links { + margin: 0 auto; + padding: 0; + list-style: none; + text-align: center; + font-size: larger; + font-weight: bold; +} +#dyne_links li { + display: inline; +} +#dyne_links li.org { + font-size: medium; + font-weight: normal; +} + +header { + background-color: #fed; + position: fixed; + left: 0; + right: 0; + z-index: 666; +} + +header hgroup, section { + position: absolute; + left: 0; + right: 0; +} +header hgroup, #intro { + margin-left: 2.5%; + margin-right: 70% +} +header hgroup p { + margin: 5px +} +#intro { + position: fixed; + margin-top: 6em; + text-align: center +} +#intro p { font-weight: bold; text-align: justify; line-height: 1.5em } +#intro img { } +#sites { + margin-left: 35%; + margin-right: 2.5%; + margin-top: 3em +} +#sites img { + background-color: #fed; + border: 24px solid #fed; + margin: 0 3% 0 0; + width: 48px; + height: 48px; + float: left +} + +header hgroup { + padding-top: 1em +} +header h1 { + margin: 0 +} + + +#sites dl { + margin: 0 +} +#software, #events { + margin-top: 180px; +} +#software { + margin-left: 35%; + margin-right: 35%; +} +#events { + margin-left: 70%; +} + +.data { display: none } + +footer { + background-color: #fed; + position: fixed; + bottom: 0; + padding: 0 10px; + padding-bottom: 10px; + left: 0; right: 0; + font-size: smaller; + height: 70px; +} +footer:hover,footer:focus { + height: auto; +} +footer:hover section, footer:focus section, +footer:hover section h2, footer:focus section h2, +footer:hover #clustrMaps +{ + display: block +} + +#self-promotion,#badges { width: 15% } + +footer ul { + list-style: none; + margin: 0; + padding: 0; +} + +footer section { + position: relative; + display: none; + float: left; + width: 33%; +} +footer section h2 { display: none } +#credits { display: block } +#clustrMaps { display: none } +footer section.copyright { display: block } \ No newline at end of file diff --git a/web/stylesheets/dyne5.css b/web/stylesheets/dyne5.css new file mode 100644 index 0000000..68ee63e --- /dev/null +++ b/web/stylesheets/dyne5.css @@ -0,0 +1,530 @@ +html.foundation #foundation, +html.software #software, +html.culture #culture, +html.events #events, +html.contact #contact, +html.discussion #discussion { + width: 35%; +} + +body { + background-color: #fed; + color: #333; + font-family: Arial, Helvetica, sans-serif; + font-size: 10pt; + margin: 0; + padding: 0; +} + +a:link, a:visited { text-decoration: none; font-weight: bold } +a:hover, a:focus, a:active { text-decoration: underline } +a:link { color: #a60 } +a:visited { color: #840 } +a:hover, a:focus { color: #000 } +a:active { color: #fed } + +img { border: 0} + +header { + background: #fed url(/images/bg.png) top left repeat-x; + margin-top: 10px; +} + +header nav { + margin: 1em; +} +header nav ul { + list-style: none; + margin: 0 auto; + width: 50em; +} +header nav ul li { + display: inline; + font-weight: bold; +} +header nav ul li:first-child, +header nav ul li:last-child +{ + font-weight: normal; + font-size: smaller; +} +header nav ul:first-child:before { + content: " - -( "; +} +header nav ul:last-child:after { + content: " )- - " +} + +header hgroup { + font-family: monospace; +} +header hgroup h1 { + font-size: 18pt; + margin: 10px 0 0 1em; +} +#software h1, +#events h1 { + font-size: 18pt; + margin: 0; +} +header hgroup h2 { + margin-bottom: 0; + margin: 0 2em 1em 2em; + font-weight: normal; + font-size: 14pt; +} +header hgroup p { + margin: 20px 2em -10px 2em; +} + +body > section { + float: left; + margin: 0; + padding: 0; +} +section p { + margin: 1em; +} +#about { + margin-left: 0.5em; + text-align: justify; +} +#culture { + width: 35%; +} +#software, #events { + margin-top: -2.25em; + width: 20%; +} +#software hgroup h2, +#events hgroup h2 { + margin-top: 0; + font-size: 10pt; + font-weight: bold; +} +#events h3 { + font-size: medium; + font-weight: normal; + margin: 0.25em 2em; +} +#events h3:before { + content: "clock "; +} + + +#software #no_shit { + margin: 0; + padding: 0; + +} + +#moebius { + display: block; + margin: 0 auto; + text-align: center; +} + +html.contact #contact { width: 65% } +html.contact #foundation img { float: left; margin: 0 10px 25px 0; } +html.contact #foundation h2 { margin: 0.5em } +html.contact #foundation p { margin: 1em; text-align: justify } +html.contact #foundation address { margin-left: 1em } + +html.contact #foundation { width: 35%; padding:0 1em} + +footer { + clear: both; + display: compact; + font-size: smaller; + height: 25em; +} +footer hr { + background-color: #f0e0d0; + border: 0; + height: 1px; +} +footer ul { + list-style: none; + margin: 0; + padding: 0; +} +footer section { + width: 8em; + float: right; +} +footer section h2 { + text-align: center; + display: none; } +#cluster_maps { + text-align: center; } +#disclaimer { + font-size: smaller; + text-align: justify; + width: 20em; } +#credits { + text-align: right; + width: 17em; } +#recognition { + margin-top: 1em; + text-align: center; } +#badges { + margin-top: 2em; + text-align: center; } +/** + * Google Search +**/ + +#google_search fieldset { + border: 0; +} +#google_search input { + background-color: #fed; + border: 1px solid #a60; +} +#google_search input[type=submit] { + font-weight: bold; +} +#google_search input:hover, +#google_search input:focus { + background-color: #fff; +} + +/** + * homepage aka foundation +**/ + +html.foundation #foundation { width: 25%; } +html.foundation #culture { width: 25%; } +html.foundation #software { width: 20%; } +html.foundation #events { width: 30%; } + +html.foundation #foundation p { + text-align: justify; +} +html.foundation #foundation { + text-align: center; +} + +html.foundation #software p, +html.foundation #software article, +html.foundation #events p, +html.foundation #events article { + margin: 1em 0.5em; + font-size: smaller; +} +html.foundation #software article .version { + font-weight: bold; +} + +html.foundation #sites article { +} + +html.foundation #weaver_birds { + font-size: smaller; +} +.dharma_wheel { font-size: 400%; line-height: 20pt; display: block; margin: 0.5em auto; text-align: center } + +#sites { margin-top: 2em } + +#selected_site { + margin: 0.5em; +} +#selected_site img { + width: 48px; + margin-top: 6px; + margin-right: 12px; + height: 48px; + float: left; +} +#selected_site h1 { + display: inline; + font-size: 14pt; + margin: 0; +} +#selected_site h2 { + font-size: 12pt; + margin: 0; +} + +#events section h3 { + font-size: medium; + font-weight: normal; +} + +/** + * Software +**/ + +html.software #foundation { + width: 25%; +} +html.software #software { + width: 75%; +} +html.software #software article { + clear: both; +} +html.software #software ul { + list-style: none; + margin: 1em; + padding: 0; +} +html.software #software p { + text-align: justify; +} +html.software #software .logo { + float: left; + margin: 25px; +} +html.software #software .sponsors { + float: right; +} +html.software #software .release-info { + margin-top: 3em; +} +html.software #software .release-info .version { + font-weight: bold; +} +html.software .sponsors li.rastasoft { + display: block; + width: 7em; + border-top: 1.25em solid #f00; + background-color: #ff0; + border-bottom: 1.25em solid #0f0; + margin: 5px; + padding: 3px; + font-size: smaller; + text-align: center; +} +html.software .sponsors li.rastasoft a { + color: #000; +} +html.software .sponsors li.servus a { + font-size: larger; + color: #0f0; +} +html.software #foundation h3 { + padding-left: 1em +} +html.software #foundation dl { + font-size: smaller; + margin: 0 1em; +} +html.software #foundation dl dt { + font-weight: bold +} +html.software #foundation dl dd { + margin: 1em 0.25em; + text-align: justify; +} + +img.left { float: left; margin-right: 5px } +img.right { float: right; margin-left: 5px } + +/** + * Culture +**/ + +html.culture #foundation { width: 30%; } +html.culture #culture { width: 40%; } +html.culture #events { width: 30%; } + +/** + * Firefox fixes +**/ + +article { display: block } /* force article as blocks*/ +/* TODO: fix nav alignment */ + +/** + * Tabs +**/ + +ul.tabs { + margin: 0; + padding: 0; + float: left; + list-style: none; + height: 24px; /*--Set height of tabs--*/ + border-bottom: 1px solid #dcb; + border-left: 1px solid #dcb; + width: 99%; +} + +ul.tabs li { + float: left; + margin: 0; + padding: 0; + height: 23px; /*--Subtract 1px from the height of the unordered list--*/ + line-height: 23px; /*--Vertically aligns the text within the tab--*/ + border: 1px solid #dcb; + border-left: none; + margin-bottom: -1px; /*--Pull the list item down 1px--*/ + overflow: hidden; + position: relative; + background: #dcb; +} + +ul.tabs li a { + text-decoration: none; + color: #000; + display: block; + font-size: 10px; + padding: 0 20px; + border: 1px solid #fed; /*--Gives the bevel look with a 1px white border inside the list item--*/ + outline: none; +} + +ul.tabs li a:hover { + background: #000; color: #840; +} + +html ul.tabs li.active, html ul.tabs li.active a:hover { + /*--Makes sure that the active tab does not listen to the hover properties--*/ + background: #fed; + border-bottom: 1px solid #fed; /*--Makes the active tab look like it's connected with its content--*/ +} + +.tab_container { + border: 1px solid #dcb; + border-top: none; + overflow: hidden; + clear: both; + float: left; + width: 99%; + background: #fed; +} +.tab_content { + padding: 1em; +} + +#player_controls { + margin: 0; + padding: 0; + float: left; + list-style: none; + height: 14px; /*--Set height of tabs--*/ + width: 100%; +} +#player_controls li { + float: left; + margin: 0 0 0 5px; + padding: 0; + height: 14px; /*--Subtract 1px from the height of the unordered list--*/ + line-height: 14px; /*--Vertically aligns the text within the tab--*/ + border: 1px solid #dcb; + border-left: none; + overflow: hidden; + position: relative; +} +#player_controls li { font-size: 13px; line-height: 14px; font-weight: bold; width:14px; height:14px; text-align: center } +#player_controls li:hover { color: #840; } +#player_controls #player_pause { font-size: 14px; line-height: -1px } +#player_controls #player_play, +#player_controls #player_stop { line-height: 12px } + +#player_progress { + clear: both; + display: block; + font-family: monospace; + font-size: 5px; + height: 5px; + width: 275px; + background-color: #edc; + padding: 0; + line-height: 5px; + border: 1px solid #dcb; + top: 3px; + left: 3px; + right: 3px; + position: relative; +} +#player_progress_load_bar { + background-color: #987; + color: #fed; +} +#player_progress_play_bar { + background-color: #fed; + color: #fed; +} +#player_volume_bar { + display: block; + width:100px; + height:5px; + background-color: #dcb; + position:relative; + top: -15px; + left: 180px; +} +#player_volume_bar_value { + display:block; + background-color: #fed; + border: 1px solid #dcb; + height: 3px; +} + + +.tab_container h2 { + font-size: 10pt; + margin: 0; + line-height: 10pt; +} + +#playlist_list { + clear: both; + padding: 1px; +} +#playlist_list ul { + list-style: none; + padding: 0; +} +#playlist_list ul li { + font-family: monospace; + font-size: 10px; + margin: 0; + padding: 0; +} + +#playlist_list ul li.playlist_current { + background-color: #edc; + font-weight: bold; +} + +/** + * Events +**/ + +html.events #foundation { width: 40%; margin-left: 10% } +html.events #culture { width: 40%; margin-top: -2em; margin-right: 10% } +html.events #events { width: 100%; clear: left; margin-top: 1em } + +html.events article { padding: 0 1em } +html.events #culture #ascii_bulletin { padding: 0 2em; font-size: 12px } + +html.events section.list { text-align: left; } +html.events section.list article { margin-top: 0.5em; text-align: left; } + +html.events #google_calendar { border: 0; text-align: center; } + +#syndicate { + background: transparent url(/images/icons/feed_64x64.png) 0em 2em no-repeat; + height: 96px; +} +#syndicate ul { + list-style: none; + margin: 0 0 0 64px; + padding: 0; +} +#syndicate li { + margin: 0 0 1em 0; + padding: 0; +} + +#dyne_news input[type=submit] { + font-size: smaller; + font-family: monospace; + font-weight: bold; +} + +/* Google Calendar CSS */ +#mothertable { background: #fed !important } diff --git a/web/stylesheets/gallery.css b/web/stylesheets/gallery.css new file mode 100644 index 0000000..0a7ede3 --- /dev/null +++ b/web/stylesheets/gallery.css @@ -0,0 +1,14 @@ +#gallery { + width: 100%; + clear: right; + } +#gallery h3 { + margin-left: 2em; + } +#filter { + float: left; + width: 50%; + } +#parameters { + margin: 2em; + } \ No newline at end of file diff --git a/web/stylesheets/org-htmlize-src.css b/web/stylesheets/org-htmlize-src.css new file mode 100644 index 0000000..e22a3d2 --- /dev/null +++ b/web/stylesheets/org-htmlize-src.css @@ -0,0 +1,1724 @@ +.org-mode pre.src { + color: #F8F8F8; + background-color: #141414; + } + .org-better-fringes-bitmap { + /* better-fringes-bitmap */ + color: #f0e68c; + } + .org-better-fringes-important-bitmap { + /* better-fringes-important-bitmap */ + color: #ff0000; + } + .org-blue { + /* blue */ + color: #0000ff; + } + .org-bold { + /* bold */ + font-weight: bold; + } + .org-bold-italic { + /* bold-italic */ + font-weight: bold; + font-style: italic; + } + .org-bookmark-menu-heading { + /* bookmark-menu-heading */ + color: #9B703F; + } + .org-border { + /* border */ + background-color: #000000; + } + .org-border-glyph { + } + .org-buffer-menu-buffer { + /* buffer-menu-buffer */ + font-weight: bold; + } + .org-buffers-tab { + /* buffers-tab */ + color: #CACACA; + background-color: #141414; + } + .org-builtin { + /* font-lock-builtin-face */ + color: #CACACA; + } + .org-button { + /* button */ + text-decoration: underline; + } + .org-c-nonbreakable-space { + /* c-nonbreakable-space-face */ + color: #EE799F; + background-color: #ff0000; + } + .org-calendar-today { + /* calendar-today */ + text-decoration: underline; + } + .org-change-log-acknowledgement { + /* change-log-acknowledgement */ + color: #5F5A60; + } + .org-change-log-conditionals { + /* change-log-conditionals */ + color: #7587A6; + } + .org-change-log-date { + /* change-log-date */ + color: #8F9D6A; + } + .org-change-log-email { + /* change-log-email */ + color: #7587A6; + } + .org-change-log-file { + /* change-log-file */ + color: #9B703F; + } + .org-change-log-function { + /* change-log-function */ + color: #7587A6; + } + .org-change-log-list { + /* change-log-list */ + color: #CDA869; + } + .org-change-log-name { + /* change-log-name */ + color: #CF6A4C; + } + .org-comint-highlight-input { + /* comint-highlight-input */ + font-weight: bold; + } + .org-comint-highlight-prompt { + /* comint-highlight-prompt */ + color: #00ffff; + } + .org-comment { + /* font-lock-comment-face */ + color: #5F5A60; + } + .org-comment-delimiter { + /* font-lock-comment-delimiter-face */ + color: #5F5A60; + } + .org-compilation-column-number { + /* compilation-column-number */ + color: #9B703F; + } + .org-compilation-error { + /* compilation-error */ + color: #ff0000; + background-color: #EE799F; + font-weight: bold; + } + .org-compilation-info { + /* compilation-info */ + color: #00ff00; + font-weight: bold; + } + .org-compilation-line-number { + /* compilation-line-number */ + color: #7587A6; + } + .org-compilation-warning { + /* compilation-warning */ + color: #ffa500; + font-weight: bold; + } + .org-completions-common-part { + /* completions-common-part */ + color: #F8F8F8; + background-color: #141414; + } + .org-completions-first-difference { + /* completions-first-difference */ + font-weight: bold; + } + .org-constant { + /* font-lock-constant-face */ + color: #CF6A4C; + } + .org-cursor { + /* cursor */ + background-color: #A7A7A7; + } + .org-custom-button { + /* custom-button-face */ + color: #000000; + background-color: #d3d3d3; + } + .org-custom-button-1 { + /* custom-button */ + color: #000000; + background-color: #d3d3d3; + } + .org-custom-button-mouse { + /* custom-button-mouse */ + color: #000000; + background-color: #e5e5e5; + } + .org-custom-button-pressed { + /* custom-button-pressed */ + color: #000000; + background-color: #d3d3d3; + } + .org-custom-button-pressed-unraised { + /* custom-button-pressed-unraised */ + color: #ee82ee; + } + .org-custom-button-unraised { + } + .org-custom-changed { + /* custom-changed-face */ + color: #ffffff; + background-color: #0000ff; + } + .org-custom-changed-1 { + /* custom-changed */ + color: #ffffff; + background-color: #0000ff; + } + .org-custom-comment { + /* custom-comment */ + background-color: #696969; + } + .org-custom-comment-tag { + /* custom-comment-tag */ + color: #cccccc; + } + .org-custom-documentation { + } + .org-custom-documentation-1 { + } + .org-custom-face-tag { + /* custom-face-tag-face */ + color: #add8e6; + font-weight: bold; + } + .org-custom-face-tag-1 { + /* custom-face-tag */ + color: #add8e6; + font-weight: bold; + } + .org-custom-group-tag { + /* custom-group-tag-face */ + color: #add8e6; + font-size: 120%; + font-weight: bold; + } + .org-custom-group-tag-1 { + /* custom-group-tag-1 */ + color: #ffc0cb; + font-size: 120%; + font-weight: bold; + } + .org-custom-group-tag-2 { + /* custom-group-tag */ + color: #add8e6; + font-size: 120%; + font-weight: bold; + } + .org-custom-group-tag-face-1 { + /* custom-group-tag-face-1 */ + color: #ffc0cb; + font-size: 120%; + font-weight: bold; + } + .org-custom-invalid { + /* custom-invalid-face */ + color: #ffff00; + background-color: #ff0000; + } + .org-custom-invalid-1 { + /* custom-invalid */ + color: #ffff00; + background-color: #ff0000; + } + .org-custom-link { + /* custom-link */ + color: #00ffff; + text-decoration: underline; + } + .org-custom-modified { + /* custom-modified-face */ + color: #ffffff; + background-color: #0000ff; + } + .org-custom-modified-1 { + /* custom-modified */ + color: #ffffff; + background-color: #0000ff; + } + .org-custom-rogue { + /* custom-rogue-face */ + color: #ffc0cb; + background-color: #000000; + } + .org-custom-rogue-1 { + /* custom-rogue */ + color: #ffc0cb; + background-color: #000000; + } + .org-custom-saved { + /* custom-saved-face */ + text-decoration: underline; + } + .org-custom-saved-1 { + /* custom-saved */ + text-decoration: underline; + } + .org-custom-set { + /* custom-set-face */ + color: #0000ff; + background-color: #ffffff; + } + .org-custom-set-1 { + /* custom-set */ + color: #0000ff; + background-color: #ffffff; + } + .org-custom-state { + /* custom-state-face */ + color: #32cd32; + } + .org-custom-state-1 { + /* custom-state */ + color: #32cd32; + } + .org-custom-themed { + /* custom-themed */ + color: #ffffff; + background-color: #0000ff; + } + .org-custom-variable-button { + /* custom-variable-button-face */ + font-weight: bold; + text-decoration: underline; + } + .org-custom-variable-button-1 { + /* custom-variable-button */ + font-weight: bold; + text-decoration: underline; + } + .org-custom-variable-tag { + /* custom-variable-tag-face */ + color: #add8e6; + font-weight: bold; + } + .org-custom-variable-tag-1 { + /* custom-variable-tag */ + color: #add8e6; + font-weight: bold; + } + .org-custom-visibility { + /* custom-visibility */ + color: #00ffff; + font-size: 80%; + text-decoration: underline; + } + .org-default { + /* default */ + color: #F8F8F8; + background-color: #141414; + } + .org-diary { + /* diary */ + color: #ffff00; + } + .org-dired-directory { + /* dired-directory */ + color: #9B703F; + } + .org-dired-flagged { + /* dired-flagged */ + color: #ff0000; + background-color: #EE799F; + font-weight: bold; + } + .org-dired-header { + /* dired-header */ + color: #9B703F; + } + .org-dired-ignored { + /* dired-ignored */ + color: #b3b3b3; + } + .org-dired-mark { + /* dired-mark */ + color: #CF6A4C; + } + .org-dired-marked { + /* dired-marked */ + color: #ff0000; + background-color: #EE799F; + font-weight: bold; + } + .org-dired-perm-write { + /* dired-perm-write */ + color: #5F5A60; + } + .org-dired-symlink { + /* dired-symlink */ + color: #CDA869; + } + .org-dired-warning { + /* dired-warning */ + color: #ff0000; + background-color: #EE799F; + font-weight: bold; + } + .org-doc { + /* font-lock-doc-face */ + color: #8F9D6A; + } + .org-doc-string { + /* font-lock-doc-string-face */ + color: #ff8c00; + } + .org-ediff-current-diff-a { + /* ediff-current-diff-A */ + color: #b22222; + background-color: #98fb98; + } + .org-ediff-current-diff-ancestor { + /* ediff-current-diff-Ancestor */ + color: #000000; + background-color: #d02090; + } + .org-ediff-current-diff-b { + /* ediff-current-diff-B */ + color: #9932cc; + background-color: #ffff00; + } + .org-ediff-current-diff-c { + /* ediff-current-diff-C */ + color: #000080; + background-color: #ffc0cb; + } + .org-ediff-even-diff-a { + /* ediff-even-diff-A */ + color: #000000; + background-color: #d3d3d3; + } + .org-ediff-even-diff-ancestor { + /* ediff-even-diff-Ancestor */ + color: #ffffff; + background-color: #bebebe; + } + .org-ediff-even-diff-b { + /* ediff-even-diff-B */ + color: #ffffff; + background-color: #bebebe; + } + .org-ediff-even-diff-c { + /* ediff-even-diff-C */ + color: #000000; + background-color: #d3d3d3; + } + .org-ediff-fine-diff-a { + /* ediff-fine-diff-A */ + color: #000080; + background-color: #87ceeb; + } + .org-ediff-fine-diff-ancestor { + /* ediff-fine-diff-Ancestor */ + color: #000000; + background-color: #00ff00; + } + .org-ediff-fine-diff-b { + /* ediff-fine-diff-B */ + color: #000000; + background-color: #00ffff; + } + .org-ediff-fine-diff-c { + /* ediff-fine-diff-C */ + color: #000000; + background-color: #40e0d0; + } + .org-ediff-odd-diff-a { + /* ediff-odd-diff-A */ + color: #ffffff; + background-color: #bebebe; + } + .org-ediff-odd-diff-ancestor { + /* ediff-odd-diff-Ancestor */ + color: #00cdcd; + background-color: #666666; + } + .org-ediff-odd-diff-b { + /* ediff-odd-diff-B */ + color: #000000; + background-color: #d3d3d3; + } + .org-ediff-odd-diff-c { + /* ediff-odd-diff-C */ + color: #ffffff; + background-color: #bebebe; + } + .org-escape-glyph { + /* escape-glyph */ + color: #00ffff; + } + .org-file-name-shadow { + /* file-name-shadow */ + color: #b3b3b3; + } + .org-fixed-pitch { + } + .org-fl-comment { + /* fl-comment-face */ + color: #ffc0cb; + } + .org-fl-doc-string { + /* fl-doc-string-face */ + color: #a020f0; + } + .org-fl-function-name { + /* fl-function-name-face */ + color: #ff0000; + } + .org-fl-keyword { + /* fl-keyword-face */ + color: #00ffff; + } + .org-fl-string { + /* fl-string-face */ + color: #00ff00; + } + .org-fl-type { + /* fl-type-face */ + color: #ffff00; + } + .org-flymake-errline { + /* flymake-errline */ + background-color: #8b1a1a; + } + .org-flymake-warnline { + /* flymake-warnline */ + background-color: #00008b; + } + .org-flyspell-duplicate { + /* flyspell-duplicate */ + color: #cdad00; + font-weight: bold; + text-decoration: underline; + } + .org-flyspell-incorrect { + /* flyspell-incorrect */ + color: #ff4500; + font-weight: bold; + text-decoration: underline; + } + .org-fringe { + /* fringe */ + background-color: #1a1a1a; + } + .org-function-name { + /* font-lock-function-name-face */ + color: #9B703F; + } + .org-gnus-cite-attribution { + /* gnus-cite-attribution-face */ + font-style: italic; + } + .org-gnus-cite-face-1 { + /* gnus-cite-face-1 */ + color: #00bfff; + font-weight: bold; + } + .org-gnus-cite-face-10 { + /* gnus-cite-face-10 */ + color: #9370db; + } + .org-gnus-cite-face-11 { + /* gnus-cite-face-11 */ + color: #40e0d0; + } + .org-gnus-cite-face-2 { + /* gnus-cite-face-2 */ + color: #00ffff; + font-weight: bold; + } + .org-gnus-cite-face-3 { + /* gnus-cite-face-3 */ + color: #ffd700; + font-weight: bold; + } + .org-gnus-cite-face-4 { + /* gnus-cite-face-4 */ + color: #ffb6c1; + } + .org-gnus-cite-face-5 { + /* gnus-cite-face-5 */ + color: #98fb98; + } + .org-gnus-cite-face-6 { + /* gnus-cite-face-6 */ + color: #d2691e; + font-weight: bold; + } + .org-gnus-cite-face-7 { + /* gnus-cite-face-7 */ + color: #ffa500; + } + .org-gnus-cite-face-8 { + /* gnus-cite-face-8 */ + color: #ff00ff; + } + .org-gnus-cite-face-9 { + /* gnus-cite-face-9 */ + color: #ee82ee; + } + .org-gnus-emphasis-bold { + /* gnus-emphasis-bold */ + font-weight: bold; + } + .org-gnus-emphasis-bold-italic { + /* gnus-emphasis-bold-italic */ + font-weight: bold; + font-style: italic; + } + .org-gnus-emphasis-highlight-words { + /* gnus-emphasis-highlight-words */ + color: #ffff00; + background-color: #000000; + } + .org-gnus-emphasis-italic { + /* gnus-emphasis-italic */ + font-style: italic; + } + .org-gnus-emphasis-underline { + /* gnus-emphasis-underline */ + text-decoration: underline; + } + .org-gnus-emphasis-underline-bold { + /* gnus-emphasis-underline-bold */ + font-weight: bold; + text-decoration: underline; + } + .org-gnus-emphasis-underline-bold-italic { + /* gnus-emphasis-underline-bold-italic */ + font-weight: bold; + font-style: italic; + text-decoration: underline; + } + .org-gnus-emphasis-underline-italic { + /* gnus-emphasis-underline-italic */ + font-style: italic; + text-decoration: underline; + } + .org-gnus-group-mail-1 { + /* gnus-group-mail-1 */ + color: #7fffd4; + font-weight: bold; + } + .org-gnus-group-mail-1-empty { + /* gnus-group-mail-1-empty */ + color: #7fffd4; + } + .org-gnus-group-mail-2 { + /* gnus-group-mail-2 */ + color: #76eec6; + font-weight: bold; + } + .org-gnus-group-mail-2-empty { + /* gnus-group-mail-2-empty */ + color: #76eec6; + } + .org-gnus-group-mail-3 { + /* gnus-group-mail-3 */ + color: #66cdaa; + font-weight: bold; + } + .org-gnus-group-mail-3-empty { + /* gnus-group-mail-3-empty */ + color: #66cdaa; + } + .org-gnus-group-mail-low { + /* gnus-group-mail-low */ + color: #458b74; + font-weight: bold; + } + .org-gnus-group-mail-low-empty { + /* gnus-group-mail-low-empty */ + color: #458b74; + } + .org-gnus-group-news-1 { + /* gnus-group-news-1 */ + color: #afeeee; + font-weight: bold; + } + .org-gnus-group-news-1-empty { + /* gnus-group-news-1-empty */ + color: #afeeee; + } + .org-gnus-group-news-2 { + /* gnus-group-news-2 */ + color: #40e0d0; + font-weight: bold; + } + .org-gnus-group-news-2-empty { + /* gnus-group-news-2-empty */ + color: #40e0d0; + } + .org-gnus-group-news-3 { + /* gnus-group-news-3 */ + font-weight: bold; + } + .org-gnus-group-news-3-empty { + } + .org-gnus-group-news-4 { + /* gnus-group-news-4 */ + font-weight: bold; + } + .org-gnus-group-news-4-empty { + } + .org-gnus-group-news-5 { + /* gnus-group-news-5 */ + font-weight: bold; + } + .org-gnus-group-news-5-empty { + } + .org-gnus-group-news-6 { + /* gnus-group-news-6 */ + font-weight: bold; + } + .org-gnus-group-news-6-empty { + } + .org-gnus-group-news-low { + /* gnus-group-news-low */ + color: #00ced1; + font-weight: bold; + } + .org-gnus-group-news-low-empty { + /* gnus-group-news-low-empty */ + color: #00ced1; + } + .org-gnus-header-content { + /* gnus-header-content-face */ + color: #228b22; + font-style: italic; + } + .org-gnus-header-from { + /* gnus-header-from-face */ + color: #00ff7f; + font-weight: bold; + } + .org-gnus-header-name { + /* gnus-header-name-face */ + color: #00bfff; + } + .org-gnus-header-newsgroups { + /* gnus-header-newsgroups-face */ + color: #a020f0; + font-weight: bold; + font-style: italic; + } + .org-gnus-header-subject { + /* gnus-header-subject-face */ + color: #ffa500; + font-weight: bold; + } + .org-gnus-signature { + /* gnus-signature-face */ + color: #f0e68c; + font-weight: bold; + } + .org-gnus-splash { + /* gnus-splash */ + color: #a52a2a; + } + .org-gnus-summary-cancelled { + /* gnus-summary-cancelled */ + color: #ffff00; + background-color: #000000; + } + .org-gnus-summary-high-ancient { + /* gnus-summary-high-ancient */ + color: #87ceeb; + font-weight: bold; + } + .org-gnus-summary-high-read { + /* gnus-summary-high-read */ + color: #98fb98; + font-weight: bold; + } + .org-gnus-summary-high-ticked { + /* gnus-summary-high-ticked */ + color: #ffc0cb; + font-weight: bold; + } + .org-gnus-summary-high-undownloaded { + /* gnus-summary-high-undownloaded */ + color: #d3d3d3; + font-weight: bold; + } + .org-gnus-summary-high-unread { + /* gnus-summary-high-unread */ + font-weight: bold; + } + .org-gnus-summary-low-ancient { + /* gnus-summary-low-ancient */ + color: #87ceeb; + font-style: italic; + } + .org-gnus-summary-low-read { + /* gnus-summary-low-read */ + color: #98fb98; + font-style: italic; + } + .org-gnus-summary-low-ticked { + /* gnus-summary-low-ticked */ + color: #ffc0cb; + font-style: italic; + } + .org-gnus-summary-low-undownloaded { + /* gnus-summary-low-undownloaded */ + color: #d3d3d3; + font-style: italic; + } + .org-gnus-summary-low-unread { + /* gnus-summary-low-unread */ + font-style: italic; + } + .org-gnus-summary-normal-ancient { + /* gnus-summary-normal-ancient */ + color: #87ceeb; + } + .org-gnus-summary-normal-read { + /* gnus-summary-normal-read */ + color: #98fb98; + } + .org-gnus-summary-normal-ticked { + /* gnus-summary-normal-ticked */ + color: #ffc0cb; + } + .org-gnus-summary-normal-undownloaded { + /* gnus-summary-normal-undownloaded */ + color: #d3d3d3; + } + .org-gnus-summary-normal-unread { + } + .org-gnus-summary-selected { + /* gnus-summary-selected */ + text-decoration: underline; + } + .org-gui-element { + /* gui-element */ + color: #000000; + background-color: #D4D0C8; + } + .org-header-line { + /* header-line */ + color: #e5e5e5; + background-color: #333333; + } + .org-help-argument-name { + } + .org-hi-mumamo-black-b { + /* hi-mumamo-black-b */ + font-weight: bold; + text-decoration: underline; + } + .org-hi-mumamo-blue { + /* hi-mumamo-blue */ + text-decoration: underline; + } + .org-hi-mumamo-blue-b { + /* hi-mumamo-blue-b */ + font-weight: bold; + text-decoration: underline; + } + .org-hi-mumamo-green { + /* hi-mumamo-green */ + text-decoration: underline; + } + .org-hi-mumamo-green-b { + /* hi-mumamo-green-b */ + font-weight: bold; + text-decoration: underline; + } + .org-hi-mumamo-pink { + /* hi-mumamo-pink */ + text-decoration: underline; + } + .org-hi-mumamo-red-b { + /* hi-mumamo-red-b */ + font-weight: bold; + text-decoration: underline; + } + .org-hi-mumamo-yellow { + /* hi-mumamo-yellow */ + text-decoration: underline; + } + .org-highlight { + /* highlight */ + background-color: #111111; + } + .org-highline { + /* highline-face */ + background-color: #2e8b57; + } + .org-holiday { + /* holiday */ + background-color: #8b4513; + } + .org-ido-first-match { + /* ido-first-match */ + color: #8F9D6A; + } + .org-ido-incomplete-regexp { + /* ido-incomplete-regexp */ + color: #ff0000; + background-color: #EE799F; + font-weight: bold; + } + .org-ido-indicator { + /* ido-indicator */ + color: #ffff00; + background-color: #ff0000; + } + .org-ido-only-match { + /* ido-only-match */ + color: #8F9D6A; + } + .org-ido-subdir { + /* ido-subdir */ + color: #CF6A4C; + } + .org-info-header-node { + /* info-header-node */ + color: #ffffff; + font-weight: bold; + font-style: italic; + } + .org-info-header-xref { + /* info-header-xref */ + color: #00ffff; + text-decoration: underline; + } + .org-info-menu-header { + /* info-menu-header */ + font-weight: bold; + } + .org-info-menu-star { + /* info-menu-star */ + color: #ff0000; + } + .org-info-node { + /* info-node */ + color: #ffffff; + font-weight: bold; + font-style: italic; + } + .org-info-title-1 { + /* info-title-1 */ + font-size: 172%; + font-weight: bold; + } + .org-info-title-2 { + /* info-title-2 */ + font-size: 144%; + font-weight: bold; + } + .org-info-title-3 { + /* info-title-3 */ + font-size: 120%; + font-weight: bold; + } + .org-info-title-4 { + /* info-title-4 */ + font-weight: bold; + } + .org-info-xref { + /* info-xref */ + color: #00ffff; + text-decoration: underline; + } + .org-isearch { + /* isearch */ + color: #8b2323; + background-color: #0000ff; + } + .org-isearch-fail { + /* isearch-fail */ + background-color: #8b0000; + } + .org-iswitchb-current-match { + /* iswitchb-current-match */ + color: #9B703F; + } + .org-iswitchb-invalid-regexp { + /* iswitchb-invalid-regexp */ + color: #ff0000; + background-color: #EE799F; + font-weight: bold; + } + .org-iswitchb-single-match { + /* iswitchb-single-match */ + color: #5F5A60; + } + .org-iswitchb-virtual-matches { + /* iswitchb-virtual-matches */ + color: #CACACA; + } + .org-italic { + /* italic */ + font-style: italic; + text-decoration: underline; + } + .org-keyword { + /* font-lock-keyword-face */ + color: #CDA869; + } + .org-lazy-highlight { + /* lazy-highlight */ + background-color: #668b8b; + } + .org-left-margin { + } + .org-link { + /* link */ + color: #00ffff; + text-decoration: underline; + } + .org-link-visited { + /* link-visited */ + color: #ee82ee; + text-decoration: underline; + } + .org-match { + /* match */ + background-color: #3a5fcd; + } + .org-menu { + } + .org-message-cited-text { + /* message-cited-text */ + color: #ff0000; + font-weight: bold; + } + .org-message-header-cc { + /* message-header-cc */ + color: #008b00; + font-weight: bold; + } + .org-message-header-name { + /* message-header-name */ + color: #ffa500; + font-weight: bold; + } + .org-message-header-newsgroups { + /* message-header-newsgroups */ + color: #ee82ee; + font-weight: bold; + } + .org-message-header-other { + /* message-header-other */ + color: #d2691e; + font-weight: bold; + } + .org-message-header-subject { + /* message-header-subject */ + color: #ffff00; + font-weight: bold; + } + .org-message-header-to { + /* message-header-to */ + color: #00ffff; + font-weight: bold; + } + .org-message-header-xheader { + /* message-header-xheader */ + color: #add8e6; + font-weight: bold; + } + .org-message-mml { + /* message-mml */ + background-color: #00cd00; + font-weight: bold; + } + .org-message-separator { + /* message-separator */ + color: #0000cd; + } + .org-minibuffer-prompt { + /* minibuffer-prompt */ + color: #5F5A60; + } + .org-mlinks-link { + /* mlinks-link */ + color: #00ffff; + text-decoration: underline; + } + .org-mode-line { + /* mode-line */ + color: #000000; + background-color: #bfbfbf; + } + .org-mode-line-buffer-id { + /* mode-line-buffer-id */ + color: #000000; + background-color: #ffffff; + } + .org-mode-line-emphasis { + /* mode-line-emphasis */ + font-weight: bold; + } + .org-mode-line-highlight { + } + .org-mode-line-inactive { + /* mode-line-inactive */ + color: #cccccc; + background-color: #4d4d4d; + } + .org-modeline-mousable { + /* modeline-mousable */ + color: #000000; + background-color: #ffffff; + } + .org-modeline-mousable-minor-mode { + /* modeline-mousable-minor-mode */ + color: #000000; + background-color: #ffffff; + } + .org-mouse { + /* mouse */ + background-color: #ff8247; + } + .org-mumamo-background-chunk-major { + /* mumamo-background-chunk-major */ + background-color: #191970; + } + .org-mumamo-background-chunk-submode { + /* mumamo-background-chunk-submode */ + background-color: #222222; + } + .org-mumamo-background-chunk-submode1 { + /* mumamo-background-chunk-submode1 */ + background-color: #006400; + } + .org-mumamo-background-chunk-submode2 { + /* mumamo-background-chunk-submode2 */ + background-color: #006400; + } + .org-mumamo-background-chunk-submode3 { + /* mumamo-background-chunk-submode3 */ + background-color: #006400; + } + .org-mumamo-background-chunk-submode4 { + /* mumamo-background-chunk-submode4 */ + background-color: #006400; + } + .org-mumamo-border-face-in { + /* mumamo-border-face-in */ + color: #7fffd4; + font-weight: bold; + font-style: italic; + text-decoration: underline; + } + .org-mumamo-border-face-out { + /* mumamo-border-face-out */ + color: #7fffd4; + font-weight: bold; + font-style: italic; + } + .org-negation-char { + } + .org-next-error { + /* next-error */ + background-color: #27292A; + } + .org-nobreak-space { + /* nobreak-space */ + color: #00ffff; + text-decoration: underline; + } + .org-nxml-attribute-colon { + } + .org-nxml-attribute-local-name { + /* nxml-attribute-local-name */ + color: #7587A6; + } + .org-nxml-attribute-prefix { + /* nxml-attribute-prefix */ + color: #CACACA; + } + .org-nxml-attribute-value { + /* nxml-attribute-value */ + color: #8F9D6A; + } + .org-nxml-attribute-value-delimiter { + /* nxml-attribute-value-delimiter */ + color: #8F9D6A; + } + .org-nxml-cdata-section-cdata { + /* nxml-cdata-section-CDATA */ + color: #CACACA; + } + .org-nxml-cdata-section-content { + } + .org-nxml-cdata-section-delimiter { + } + .org-nxml-char-ref-delimiter { + /* nxml-char-ref-delimiter */ + color: #CF6A4C; + } + .org-nxml-char-ref-number { + /* nxml-char-ref-number */ + color: #CF6A4C; + } + .org-nxml-comment-content { + /* nxml-comment-content */ + color: #5F5A60; + } + .org-nxml-comment-delimiter { + /* nxml-comment-delimiter */ + color: #5F5A60; + } + .org-nxml-delimited-data { + /* nxml-delimited-data */ + color: #8F9D6A; + } + .org-nxml-delimiter { + } + .org-nxml-element-colon { + } + .org-nxml-element-local-name { + /* nxml-element-local-name */ + color: #9B703F; + } + .org-nxml-element-prefix { + /* nxml-element-prefix */ + color: #CACACA; + } + .org-nxml-entity-ref-delimiter { + /* nxml-entity-ref-delimiter */ + color: #CF6A4C; + } + .org-nxml-entity-ref-name { + /* nxml-entity-ref-name */ + color: #CF6A4C; + } + .org-nxml-glyph { + /* nxml-glyph */ + color: #000000; + background-color: #d3d3d3; + } + .org-nxml-hash { + /* nxml-hash */ + color: #CACACA; + } + .org-nxml-heading { + /* nxml-heading */ + font-weight: bold; + } + .org-nxml-markup-declaration-delimiter { + } + .org-nxml-name { + /* nxml-name */ + color: #CACACA; + } + .org-nxml-namespace-attribute-colon { + } + .org-nxml-namespace-attribute-prefix { + /* nxml-namespace-attribute-prefix */ + color: #7587A6; + } + .org-nxml-namespace-attribute-value { + /* nxml-namespace-attribute-value */ + color: #8F9D6A; + } + .org-nxml-namespace-attribute-value-delimiter { + /* nxml-namespace-attribute-value-delimiter */ + color: #8F9D6A; + } + .org-nxml-namespace-attribute-xmlns { + /* nxml-namespace-attribute-xmlns */ + color: #CACACA; + } + .org-nxml-outline-active-indicator { + /* nxml-outline-active-indicator */ + color: #F8F8F8; + background-color: #141414; + } + .org-nxml-outline-ellipsis { + /* nxml-outline-ellipsis */ + color: #F8F8F8; + background-color: #141414; + font-weight: bold; + } + .org-nxml-outline-indicator { + /* nxml-outline-indicator */ + color: #F8F8F8; + background-color: #141414; + } + .org-nxml-processing-instruction-content { + /* nxml-processing-instruction-content */ + color: #8F9D6A; + } + .org-nxml-processing-instruction-delimiter { + } + .org-nxml-processing-instruction-target { + /* nxml-processing-instruction-target */ + color: #CDA869; + } + .org-nxml-prolog-keyword { + /* nxml-prolog-keyword */ + color: #CDA869; + } + .org-nxml-prolog-literal-content { + /* nxml-prolog-literal-content */ + color: #8F9D6A; + } + .org-nxml-prolog-literal-delimiter { + /* nxml-prolog-literal-delimiter */ + color: #8F9D6A; + } + .org-nxml-ref { + /* nxml-ref */ + color: #CF6A4C; + } + .org-nxml-tag-delimiter { + } + .org-nxml-tag-slash { + } + .org-nxml-text { + } + .org-org-agenda-column-dateline { + /* org-agenda-column-dateline */ + background-color: #4d4d4d; + } + .org-org-agenda-date { + } + .org-org-agenda-date-today { + /* org-agenda-date-today */ + font-weight: bold; + font-style: italic; + } + .org-org-agenda-date-weekend { + /* org-agenda-date-weekend */ + font-weight: bold; + } + .org-org-agenda-dimmed-todo { + /* org-agenda-dimmed-todo-face */ + color: #7f7f7f; + } + .org-org-agenda-done { + /* org-agenda-done */ + color: #98fb98; + } + .org-org-agenda-restriction-lock { + /* org-agenda-restriction-lock */ + background-color: #4a708b; + } + .org-org-agenda-structure { + /* org-agenda-structure */ + color: #87cefa; + } + .org-org-archived { + /* org-archived */ + color: #b3b3b3; + } + .org-org-block { + /* org-block */ + color: #b3b3b3; + } + .org-org-checkbox { + /* org-checkbox */ + font-weight: bold; + } + .org-org-checkbox-statistics-done { + } + .org-org-checkbox-statistics-todo { + } + .org-org-clock-overlay { + /* org-clock-overlay */ + background-color: #4a708b; + } + .org-org-code { + /* org-code */ + color: #b3b3b3; + } + .org-org-column { + /* org-column */ + background-color: #4d4d4d; + } + .org-org-column-title { + /* org-column-title */ + background-color: #4d4d4d; + font-weight: bold; + text-decoration: underline; + } + .org-org-date { + /* org-date */ + color: #00ffff; + text-decoration: underline; + } + .org-org-done { + /* org-done */ + color: #98fb98; + font-weight: bold; + } + .org-org-drawer { + /* org-drawer */ + color: #87cefa; + } + .org-org-ellipsis { + /* org-ellipsis */ + color: #eedd82; + text-decoration: underline; + } + .org-org-eval { + /* org-eval */ + color: #999999; + } + .org-org-footnote { + /* org-footnote */ + color: #00ffff; + text-decoration: underline; + } + .org-org-formula { + /* org-formula */ + color: #ff7f24; + } + .org-org-headline-done { + /* org-headline-done */ + color: #ffa07a; + } + .org-org-hide { + /* org-hide */ + color: #000000; + } + .org-org-latex-and-export-specials { + /* org-latex-and-export-specials */ + color: #deb887; + } + .org-org-level-1 { + /* org-level-1 */ + color: #9B703F; + } + .org-org-level-2 { + /* org-level-2 */ + color: #7587A6; + } + .org-org-level-3 { + /* org-level-3 */ + color: #CDA869; + } + .org-org-level-4 { + /* org-level-4 */ + color: #5F5A60; + } + .org-org-level-5 { + /* org-level-5 */ + color: #9B703F; + } + .org-org-level-6 { + /* org-level-6 */ + color: #CF6A4C; + } + .org-org-level-7 { + /* org-level-7 */ + color: #CACACA; + } + .org-org-level-8 { + /* org-level-8 */ + color: #8F9D6A; + } + .org-org-link { + /* org-link */ + color: #00ffff; + text-decoration: underline; + } + .org-org-meta-line { + /* org-meta-line */ + color: #5F5A60; + } + .org-org-mode-line-clock { + } + .org-org-mtags { + /* org-mtags */ + color: #b3b3b3; + } + .org-org-property-value { + } + .org-org-scheduled { + /* org-scheduled */ + color: #98fb98; + } + .org-org-scheduled-previously { + /* org-scheduled-previously */ + color: #ff7f24; + } + .org-org-scheduled-today { + /* org-scheduled-today */ + color: #98fb98; + } + .org-org-sexp-date { + /* org-sexp-date */ + color: #00ffff; + } + .org-org-special-keyword { + /* org-special-keyword */ + color: #ffa07a; + } + .org-org-table { + /* org-table */ + color: #87cefa; + } + .org-org-tag { + /* org-tag */ + font-weight: bold; + } + .org-org-target { + /* org-target */ + text-decoration: underline; + } + .org-org-time-grid { + /* org-time-grid */ + color: #eedd82; + } + .org-org-todo { + /* org-todo */ + color: #ffc0cb; + font-weight: bold; + } + .org-org-upcoming-deadline { + /* org-upcoming-deadline */ + color: #ff7f24; + } + .org-org-verbatim { + /* org-verbatim */ + color: #b3b3b3; + } + .org-org-warning { + /* org-warning */ + color: #ff0000; + background-color: #EE799F; + font-weight: bold; + } + .org-orgpan-spaceline { + /* orgpan-spaceline */ + font-size: 20%; + } + .org-outline-1 { + /* outline-1 */ + color: #9B703F; + } + .org-outline-2 { + /* outline-2 */ + color: #7587A6; + } + .org-outline-3 { + /* outline-3 */ + color: #CDA869; + } + .org-outline-4 { + /* outline-4 */ + color: #5F5A60; + } + .org-outline-5 { + /* outline-5 */ + color: #9B703F; + } + .org-outline-6 { + /* outline-6 */ + color: #CF6A4C; + } + .org-outline-7 { + /* outline-7 */ + color: #CACACA; + } + .org-outline-8 { + /* outline-8 */ + color: #8F9D6A; + } + .org-preprocessor { + /* font-lock-preprocessor-face */ + color: #7fffd4; + } + .org-primary-selection { + /* primary-selection */ + background-color: #0000ff; + } + .org-query-replace { + /* query-replace */ + color: #8b2323; + background-color: #0000ff; + } + .org-reference { + /* font-lock-reference-face */ + color: #6a5acd; + } + .org-regexp-grouping-backslash { + /* font-lock-regexp-grouping-backslash */ + color: #E9C062; + } + .org-regexp-grouping-construct { + /* font-lock-regexp-grouping-construct */ + color: #ff0000; + } + .org-region { + /* region */ + background-color: #27292A; + } + .org-rng-error { + /* rng-error */ + color: #ff0000; + background-color: #EE799F; + font-weight: bold; + } + .org-rngalt-validation-header-bottom { + /* rngalt-validation-header-bottom */ + color: #ffffff; + background-color: #87cefa; + } + .org-rngalt-validation-header-top { + /* rngalt-validation-header-top */ + color: #87cefa; + background-color: #ffffff; + } + .org-scroll-bar { + } + .org-secondary-selection { + /* secondary-selection */ + background-color: #483d8b; + } + .org-sgml-namespace { + /* sgml-namespace */ + color: #CACACA; + } + .org-sh-escaped-newline { + /* sh-escaped-newline */ + color: #8F9D6A; + } + .org-sh-heredoc { + /* sh-heredoc */ + color: #ffff00; + font-weight: bold; + } + .org-sh-quoted-exec { + /* sh-quoted-exec */ + color: #fa8072; + } + .org-shadow { + /* shadow */ + color: #b3b3b3; + } + .org-speedbar-button { + /* speedbar-button-face */ + color: #00cd00; + } + .org-speedbar-directory { + /* speedbar-directory-face */ + color: #add8e6; + } + .org-speedbar-file { + /* speedbar-file-face */ + color: #00ffff; + } + .org-speedbar-highlight { + /* speedbar-highlight-face */ + background-color: #2e8b57; + } + .org-speedbar-selected { + /* speedbar-selected-face */ + color: #ff0000; + text-decoration: underline; + } + .org-speedbar-separator { + /* speedbar-separator-face */ + color: #ffffff; + background-color: #0000ff; + text-decoration: overline; + } + .org-speedbar-tag { + /* speedbar-tag-face */ + color: #ffff00; + } + .org-string { + /* font-lock-string-face */ + color: #8F9D6A; + } + .org-text-cursor { + /* text-cursor */ + color: #000000; + background-color: #ffff00; + } + .org-tool-bar { + } + .org-tooltip { + /* tooltip */ + color: #000000; + background-color: #ffffe0; + } + .org-trailing-whitespace { + /* trailing-whitespace */ + background-color: #ff0000; + } + .org-type { + /* font-lock-type-face */ + color: #9B703F; + } + .org-underline { + } + .org-variable-name { + /* font-lock-variable-name-face */ + color: #7587A6; + } + .org-variable-pitch { + } + .org-vertical-border { + } + .org-warning { + /* font-lock-warning-face */ + color: #ff0000; + background-color: #EE799F; + font-weight: bold; + } + .org-widget-button { + /* widget-button */ + font-weight: bold; + } + .org-widget-button-pressed { + /* widget-button-pressed */ + color: #ff0000; + } + .org-widget-documentation { + /* widget-documentation */ + color: #32cd32; + } + .org-widget-field { + /* widget-field */ + background-color: #696969; + } + .org-widget-inactive { + /* widget-inactive */ + color: #d3d3d3; + } + .org-widget-single-line-field { + /* widget-single-line-field */ + background-color: #696969; + } + .org-zmacs-region { + /* zmacs-region */ + color: #0000ff; + background-color: #fffafa; + } + + a { + color: inherit; + background-color: inherit; + font: inherit; + text-decoration: inherit; + } + a:hover { + text-decoration: underline; + } diff --git a/web/stylesheets/org-mode.css b/web/stylesheets/org-mode.css new file mode 100644 index 0000000..888fd99 --- /dev/null +++ b/web/stylesheets/org-mode.css @@ -0,0 +1,108 @@ + +.org-mode #logo { + float: right; + clear: right; + margin-right: 2px; + margin-top: -8em; + display: compact; + } + +.org-mode header hgroup h1 { + background: #ffeedd + url(http://dyne.org/pics/dynebggrl2r.png) repeat-y; + color: #222222; + overflow: hidden; /* don't crowd the menu */ + border: 0px; + border-bottom: 2px dotted #EECC99; + font-style: italic; + font-size: 28px; + padding: 0.5em; + margin-bottom: 0; + margin-left: 0; + white-space: nowrap; + } + +.org-mode .todo { color: red; } +.org-mode .done { color: green; } +.org-mode .tag { background-color: #add8e6; font-weight:normal } +.org-mode .target { } +.org-mode .timestamp { color: #bebebe; } +.org-mode .timestamp-kwd { color: #5f9ea0; } +.org-mode p.verse { margin-left: 3% } +.org-mode pre { + border: 1pt solid #AEBDCC; + background-color: #F3F5F7; + padding: 5pt; + font-family: monospace, courier; + font-size: 90% + overflow: auto; + } +.org-mode table { border-collapse: collapse; } +.org-mode td, .org-mode th { vertical-align: top; } +.org-mode dt { font-weight: bold; } +.org-mode div.figure { padding: 0.5em; } +.org-mode div.figure p { text-align: center; } +.org-mode .linenr { font-size:smaller } +.org-mode .code-highlighted {background-color:#ffff00;} +.org-mode .org-info-js_info-navigation { border-style:none; } +.org-mode #org-info-js_console-label { font-size:10px; font-weight:bold; + white-space:nowrap; } +.org-mode .org-info-js_search-highlight {background-color:#ffff00; color:#000000; + font-weight:bold; } + +.org-mode .outline-1 { text-align: center; } +.org-mode .outline-2 { margin-left: 10em; margin-right: 1em; } +.org-mode .outline-3 { margin-left: 1em; } + +.org-mode #postamble { opacity: 0.66; + font-size: 0.66em; + text-align: right; + display: none; + float: right; + clear: right; + width: 25em; + margin-right: 1.5em; + } + + +.org-mode #menu { + position: fixed; + } + + +.org-mode #document-types { + width: 15em; + float: left; + clear: left; + margin-left: 0.5em; + margin-right: 3em; + display: compact; + font-size: 0.88em; + text-align: left; + } + +/* TOC on top of sidebar */ +.org-mode #table-of-contents { + width: 15em; + float: left; + clear: left; + margin-left: 0.5em; + margin-right: 3em; + margin-bottom: 0.5em; + display: compact; + font-size: 0.88em; + } + +.org-mode #table-of-contents h2 { font-size: 1em; } +.org-mode #table-of-contents ul { list-style: none; margin: 0em 0em; padding: 0; } +.org-mode #table-of-contents li { margin: 0; padding: 0 0 0 0.5em; } + +/* first section is sidebar +.org-mode #outline-container-1 { + width: 15em; + float: left; + clear: left; + margin-right: 3em + display: compact; + font-size: 0.78em; + } */ \ No newline at end of file diff --git a/web/templates/_footer.tpl b/web/templates/_footer.tpl new file mode 100644 index 0000000..ad57fe4 --- /dev/null +++ b/web/templates/_footer.tpl @@ -0,0 +1,55 @@ +
+
+ + {if DYNE_DEBUG_RENDERING_TIME} +
+

Page Rendering Time: {$timer->stop()}ms.

+
+ {/if} + +
+

dyne.org

+

+ Copyleft 2000 - 2010 dyne.org foundation and respective authors. + Verbatim copying and distribution is permitted in any medium, + provided this notice is preserved. +

Send your enquiries & questions to dyne's hackers.

+

+
+ +
+

Recognition

+
    +
  • Dyne:bolic is listed on the GNU Free Distro page
  • +
  • Dyne and Freaknet are listed on the Unesco Archives portal since 2002
  • +
+
+ +
+

Internet Campains

+
    +
  • EFF Free Speech Campain
  • +
  • No Software Patents!
  • +
  • Play OGG
  • +
  • Digital Rights Now!
  • +
  • dyne.org software badge
  • +
+
+ +
+

Credits

+

dyne.org stamp

+

Dyne hosting is kindly provided by + nimk.nl + and + servus.at

+

+
+ +
+ + + + + diff --git a/web/templates/_header.tpl b/web/templates/_header.tpl new file mode 100644 index 0000000..e4c0b2b --- /dev/null +++ b/web/templates/_header.tpl @@ -0,0 +1,57 @@ + + + + :: d y n e . o r g :: {$page_title} + + + + + +{if isset($stylesheet) && $stylesheet neq ""} + +{/if} + + + + + + + + + + + + + + +{if isset($description) && $description neq ""} + +{else} + +{/if} + +{if isset($keywords) && $keywords neq ""} + +{else} + +{/if} + + + + + +
+ +
{$page_hgroup}
+
diff --git a/web/templates/list_params.js b/web/templates/list_params.js new file mode 100644 index 0000000..aed55bd --- /dev/null +++ b/web/templates/list_params.js @@ -0,0 +1,28 @@ +// freej script to enumerate frei0r parameters in html + +fr = new Filter("%filter_name%"); +if(!fr) quit(); + + +echo("

" + fr.description + "

"); +echo("

by: " + fr.author + "

"); + + +// PRINT OUT PARAMETERS +params = fr.parameters; +echo("
"); +if(params.length) { + echo("

Parameters:

"); + echo("
    "); + for(c=0; c" + c + ") " + params[c].type + + " : " + params[c].name + + " :: " + params[c].description + ""); + } + echo("
"); +} else { + echo("

This effect has no parameters

"); +} +echo("
"); + +quit(); diff --git a/web/templates/software/doctypes.tpl b/web/templates/software/doctypes.tpl new file mode 100644 index 0000000..38c0c6c --- /dev/null +++ b/web/templates/software/doctypes.tpl @@ -0,0 +1,7 @@ + +
+

+Document available
+in PDF and pure text +

+