Import initial work
This commit is contained in:
commit
ce36ca9ef5
46 changed files with 5070 additions and 0 deletions
1
src/docs/.params
Normal file
1
src/docs/.params
Normal file
|
|
@ -0,0 +1 @@
|
|||
docs doxygen docs
|
||||
207
src/docs/Doxyfile.in
Normal file
207
src/docs/Doxyfile.in
Normal file
|
|
@ -0,0 +1,207 @@
|
|||
# libiir/src/docs/Doxyfile.in
|
||||
#
|
||||
# Copyright: ©2010, Laurence Withers.
|
||||
# Author: Laurence Withers <l@lwithers.me.uk>
|
||||
# License: GPLv3
|
||||
#
|
||||
|
||||
DOXYFILE_ENCODING = UTF-8
|
||||
PROJECT_NAME = libiir
|
||||
OUTPUT_DIRECTORY =
|
||||
CREATE_SUBDIRS = NO
|
||||
OUTPUT_LANGUAGE = English
|
||||
BRIEF_MEMBER_DESC = YES
|
||||
REPEAT_BRIEF = YES
|
||||
ABBREVIATE_BRIEF =
|
||||
ALWAYS_DETAILED_SEC = NO
|
||||
INLINE_INHERITED_MEMB = YES
|
||||
FULL_PATH_NAMES = NO
|
||||
STRIP_FROM_PATH =
|
||||
STRIP_FROM_INC_PATH =
|
||||
SHORT_NAMES = NO
|
||||
JAVADOC_AUTOBRIEF = NO
|
||||
QT_AUTOBRIEF = NO
|
||||
MULTILINE_CPP_IS_BRIEF = YES
|
||||
INHERIT_DOCS = YES
|
||||
SEPARATE_MEMBER_PAGES = NO
|
||||
TAB_SIZE = 4
|
||||
ALIASES =
|
||||
OPTIMIZE_OUTPUT_FOR_C = YES
|
||||
OPTIMIZE_OUTPUT_JAVA = NO
|
||||
OPTIMIZE_FOR_FORTRAN = NO
|
||||
OPTIMIZE_OUTPUT_VHDL = NO
|
||||
BUILTIN_STL_SUPPORT = NO
|
||||
CPP_CLI_SUPPORT = NO
|
||||
SIP_SUPPORT = NO
|
||||
IDL_PROPERTY_SUPPORT = NO
|
||||
DISTRIBUTE_GROUP_DOC = NO
|
||||
SUBGROUPING = YES
|
||||
TYPEDEF_HIDES_STRUCT = NO
|
||||
SYMBOL_CACHE_SIZE = 0
|
||||
EXTRACT_ALL = NO
|
||||
EXTRACT_PRIVATE = NO
|
||||
EXTRACT_STATIC = NO
|
||||
EXTRACT_LOCAL_CLASSES = NO
|
||||
EXTRACT_LOCAL_METHODS = NO
|
||||
EXTRACT_ANON_NSPACES = NO
|
||||
HIDE_UNDOC_MEMBERS = NO
|
||||
HIDE_UNDOC_CLASSES = NO
|
||||
HIDE_FRIEND_COMPOUNDS = YES
|
||||
HIDE_IN_BODY_DOCS = NO
|
||||
INTERNAL_DOCS = NO
|
||||
CASE_SENSE_NAMES = YES
|
||||
HIDE_SCOPE_NAMES = NO
|
||||
SHOW_INCLUDE_FILES = NO
|
||||
INLINE_INFO = YES
|
||||
SORT_MEMBER_DOCS = NO
|
||||
SORT_BRIEF_DOCS = NO
|
||||
SORT_GROUP_NAMES = NO
|
||||
SORT_BY_SCOPE_NAME = NO
|
||||
GENERATE_TODOLIST = YES
|
||||
GENERATE_TESTLIST = YES
|
||||
GENERATE_BUGLIST = YES
|
||||
GENERATE_DEPRECATEDLIST= YES
|
||||
ENABLED_SECTIONS =
|
||||
MAX_INITIALIZER_LINES = 30
|
||||
SHOW_USED_FILES = NO
|
||||
SHOW_DIRECTORIES = NO
|
||||
SHOW_FILES = NO
|
||||
SHOW_NAMESPACES = YES
|
||||
FILE_VERSION_FILTER =
|
||||
LAYOUT_FILE =
|
||||
QUIET = YES
|
||||
WARNINGS = YES
|
||||
WARN_IF_UNDOCUMENTED = YES
|
||||
WARN_IF_DOC_ERROR = YES
|
||||
WARN_NO_PARAMDOC = YES
|
||||
WARN_FORMAT = "$file:$line: $text"
|
||||
WARN_LOGFILE =
|
||||
INPUT =
|
||||
INPUT_ENCODING = UTF-8
|
||||
FILE_PATTERNS =
|
||||
RECURSIVE = NO
|
||||
EXCLUDE =
|
||||
EXCLUDE_SYMLINKS = NO
|
||||
EXCLUDE_PATTERNS =
|
||||
EXCLUDE_SYMBOLS =
|
||||
EXAMPLE_PATH =
|
||||
EXAMPLE_PATTERNS =
|
||||
EXAMPLE_RECURSIVE = NO
|
||||
IMAGE_PATH = src/docs
|
||||
INPUT_FILTER =
|
||||
FILTER_PATTERNS =
|
||||
FILTER_SOURCE_FILES = NO
|
||||
SOURCE_BROWSER = NO
|
||||
INLINE_SOURCES = NO
|
||||
STRIP_CODE_COMMENTS = YES
|
||||
REFERENCED_BY_RELATION = YES
|
||||
REFERENCES_RELATION = YES
|
||||
REFERENCES_LINK_SOURCE = YES
|
||||
USE_HTAGS = NO
|
||||
VERBATIM_HEADERS = NO
|
||||
ALPHABETICAL_INDEX = YES
|
||||
COLS_IN_ALPHA_INDEX = 5
|
||||
IGNORE_PREFIX =
|
||||
GENERATE_HTML = YES
|
||||
HTML_OUTPUT = html
|
||||
HTML_FILE_EXTENSION = .html
|
||||
HTML_HEADER =
|
||||
HTML_FOOTER =
|
||||
HTML_STYLESHEET =
|
||||
HTML_ALIGN_MEMBERS = YES
|
||||
HTML_DYNAMIC_SECTIONS = YES
|
||||
GENERATE_DOCSET = NO
|
||||
DOCSET_FEEDNAME = "Doxygen generated docs"
|
||||
DOCSET_BUNDLE_ID = org.doxygen.Project
|
||||
GENERATE_HTMLHELP = NO
|
||||
CHM_FILE =
|
||||
HHC_LOCATION =
|
||||
GENERATE_CHI = NO
|
||||
CHM_INDEX_ENCODING =
|
||||
BINARY_TOC = NO
|
||||
TOC_EXPAND = NO
|
||||
GENERATE_QHP = NO
|
||||
QCH_FILE =
|
||||
QHP_NAMESPACE = org.doxygen.Project
|
||||
QHP_VIRTUAL_FOLDER = doc
|
||||
QHG_LOCATION =
|
||||
DISABLE_INDEX = NO
|
||||
ENUM_VALUES_PER_LINE = 4
|
||||
GENERATE_TREEVIEW = NO
|
||||
TREEVIEW_WIDTH = 250
|
||||
FORMULA_FONTSIZE = 10
|
||||
GENERATE_LATEX = NO
|
||||
LATEX_OUTPUT = latex
|
||||
LATEX_CMD_NAME = latex
|
||||
MAKEINDEX_CMD_NAME = makeindex
|
||||
COMPACT_LATEX = NO
|
||||
PAPER_TYPE = a4wide
|
||||
EXTRA_PACKAGES =
|
||||
LATEX_HEADER =
|
||||
PDF_HYPERLINKS = NO
|
||||
USE_PDFLATEX = NO
|
||||
LATEX_BATCHMODE = NO
|
||||
LATEX_HIDE_INDICES = NO
|
||||
GENERATE_RTF = NO
|
||||
RTF_OUTPUT = rtf
|
||||
COMPACT_RTF = NO
|
||||
RTF_HYPERLINKS = NO
|
||||
RTF_STYLESHEET_FILE =
|
||||
RTF_EXTENSIONS_FILE =
|
||||
GENERATE_MAN = NO
|
||||
MAN_OUTPUT = man
|
||||
MAN_EXTENSION = .3
|
||||
MAN_LINKS = NO
|
||||
GENERATE_XML = NO
|
||||
XML_OUTPUT = xml
|
||||
XML_SCHEMA =
|
||||
XML_DTD =
|
||||
XML_PROGRAMLISTING = YES
|
||||
GENERATE_AUTOGEN_DEF = NO
|
||||
GENERATE_PERLMOD = NO
|
||||
PERLMOD_LATEX = NO
|
||||
PERLMOD_PRETTY = YES
|
||||
PERLMOD_MAKEVAR_PREFIX =
|
||||
ENABLE_PREPROCESSING = YES
|
||||
MACRO_EXPANSION = YES
|
||||
EXPAND_ONLY_PREDEF = YES
|
||||
SEARCH_INCLUDES = YES
|
||||
INCLUDE_PATH =
|
||||
INCLUDE_FILE_PATTERNS =
|
||||
PREDEFINED = DOXYGEN \
|
||||
__attribute__()=
|
||||
EXPAND_AS_DEFINED =
|
||||
SKIP_FUNCTION_MACROS = YES
|
||||
TAGFILES =
|
||||
GENERATE_TAGFILE =
|
||||
ALLEXTERNALS = NO
|
||||
EXTERNAL_GROUPS = YES
|
||||
PERL_PATH = /usr/bin/perl
|
||||
CLASS_DIAGRAMS = YES
|
||||
MSCGEN_PATH =
|
||||
HIDE_UNDOC_RELATIONS = YES
|
||||
HAVE_DOT = YES
|
||||
DOT_FONTNAME = FreeSans
|
||||
DOT_FONTSIZE = 10
|
||||
DOT_FONTPATH =
|
||||
CLASS_GRAPH = YES
|
||||
COLLABORATION_GRAPH = YES
|
||||
GROUP_GRAPHS = NO
|
||||
UML_LOOK = NO
|
||||
TEMPLATE_RELATIONS = NO
|
||||
INCLUDE_GRAPH = NO
|
||||
INCLUDED_BY_GRAPH = NO
|
||||
CALL_GRAPH = NO
|
||||
CALLER_GRAPH = NO
|
||||
GRAPHICAL_HIERARCHY = YES
|
||||
DIRECTORY_GRAPH = NO
|
||||
DOT_IMAGE_FORMAT = png
|
||||
DOT_PATH =
|
||||
DOTFILE_DIRS =
|
||||
DOT_GRAPH_MAX_NODES = 50
|
||||
MAX_DOT_GRAPH_DEPTH = 0
|
||||
DOT_TRANSPARENT = YES
|
||||
DOT_MULTI_TARGETS = YES
|
||||
GENERATE_LEGEND = YES
|
||||
DOT_CLEANUP = YES
|
||||
SEARCHENGINE = NO
|
||||
55
src/docs/MainPage.dox
Normal file
55
src/docs/MainPage.dox
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
/* libiir/src/docs/MainPage.dox
|
||||
*
|
||||
* Copyright: ©2010, Laurence Withers.
|
||||
* Author: Laurence Withers <l@lwithers.me.uk>
|
||||
* License: GPLv3
|
||||
*/
|
||||
|
||||
/*! \mainpage
|
||||
|
||||
This library allows the implementation of arbitrary IIR filters in C. It has
|
||||
functions for generating and manipulating filters in terms of coefficients, for
|
||||
chaining arbitrary filters together, and for generating coefficients for some
|
||||
common types of filter. See \ref iir_structure for a definition of the IIR
|
||||
filter equation.
|
||||
|
||||
\section creation Filter creation
|
||||
|
||||
At a high level, filters may be specified as strings. See \ref string_desc for
|
||||
the required format and \ref iir_parse() for a C function returning a filter
|
||||
instance from such a string.
|
||||
|
||||
Otherwise, the library user must first create a set of coefficients using
|
||||
\ref iir_coeff_new(). Any number of filters can then be instantiated using that
|
||||
set of coefficients with \ref iir_filter_new(), or the coefficients can be
|
||||
chained on to the end of an existing filter instance with
|
||||
\ref iir_filter_chain(). See \ref common_filters for functions to generate
|
||||
coefficients.
|
||||
|
||||
\section operation Filter operation
|
||||
|
||||
The function \ref iir_filter() will actually process an input sample through the
|
||||
coefficient chain and produce the output sample. Effectively it produces
|
||||
<code>y(t)</code> given <code>x(t)</code>.
|
||||
|
||||
A filter may be copied, possibly including its state (for initial conditions),
|
||||
using the function \ref iir_filter_copy().
|
||||
|
||||
\section tools Tools
|
||||
|
||||
In the <code>tests</code> directory are some simple tools for examining and
|
||||
experimenting with filters. <code>run_filter</code> takes a stream of input
|
||||
samples <code>x(t)</code> and produces the filtered output samples
|
||||
<code>y(t)</code>.
|
||||
|
||||
Perhaps more interesting is <code>plot_filter</code> (requires GNUplot to be
|
||||
installed) which will generate a Bode plot for a given filter chain. Note the
|
||||
phase response can be a little rough due to the simplistic time-domain analysis
|
||||
of the output signal's phase.
|
||||
|
||||
*/
|
||||
|
||||
/* options for text editors
|
||||
kate: replace-trailing-space-save true; space-indent true; tab-width 4;
|
||||
vim: expandtab:ts=4:sw=4:syntax=doxygen
|
||||
*/
|
||||
1
src/docs/build.default
Normal file
1
src/docs/build.default
Normal file
|
|
@ -0,0 +1 @@
|
|||
source src/docs/build.docs
|
||||
43
src/docs/build.docs
Normal file
43
src/docs/build.docs
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
# These are external variables, and shouldn't clash with anything else
|
||||
# docs_BUILT
|
||||
#
|
||||
|
||||
MONOLITHIC_DOC="${MONOLITHIC_DOC} $(echo src/docs/*.dox)"
|
||||
build_target monolithic
|
||||
|
||||
if [ -z ${docs_BUILT} ]
|
||||
then
|
||||
echo "Building documentation with Doxygen..."
|
||||
|
||||
DOXYFILE=obj/Doxyfile.docs
|
||||
|
||||
if [ ! -e ${DOXYFILE} ]
|
||||
then
|
||||
do_cmd cp src/docs/Doxyfile.in ${DOXYFILE} || return 1
|
||||
echo "INPUT = ${MONOLITHIC_DOC}" >> ${DOXYFILE}
|
||||
echo "PROJECT_NUMBER = ${VERSION}" >> ${DOXYFILE}
|
||||
fi
|
||||
|
||||
MODIFIED=0
|
||||
for file in ${MONOLITHIC_DOC}
|
||||
do
|
||||
if [ ${file} -nt html/index.html ]
|
||||
then
|
||||
MODIFIED=1
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
if [ ${MODIFIED} -ne 0 ]
|
||||
then
|
||||
do_cmd doxygen ${DOXYFILE} || return 1
|
||||
print_success "Documentation built"
|
||||
else
|
||||
print_success "Documentation is up to date"
|
||||
fi
|
||||
|
||||
docs_BUILT=1
|
||||
fi
|
||||
|
||||
# kate: replace-trailing-space-save true; space-indent true; tab-width 4;
|
||||
# vim: syntax=sh:expandtab:ts=4:sw=4
|
||||
1
src/docs/build.install
Normal file
1
src/docs/build.install
Normal file
|
|
@ -0,0 +1 @@
|
|||
source src/docs/build.install-docs
|
||||
21
src/docs/build.install-docs
Normal file
21
src/docs/build.install-docs
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
build_target docs
|
||||
|
||||
# create documentation directories
|
||||
echo "Installing documentation into ${DOCSDIR}"
|
||||
build_dir_tree "${DOCSDIR}/html" || return 1
|
||||
|
||||
# copy across the Doxygen-generated documentation
|
||||
for file in html/*
|
||||
do
|
||||
install_file ${file} ${DOCSDIR}/html 0644 || return 1
|
||||
done
|
||||
|
||||
# copy across the generic files
|
||||
for file in COPYING README
|
||||
do
|
||||
install_file ${file} ${DOCSDIR} 0644 || return 1
|
||||
done
|
||||
|
||||
print_success "Documentation installed"
|
||||
# kate: replace-trailing-space-save true; space-indent true; tab-width 4;
|
||||
# vim: syntax=sh:expandtab:ts=4:sw=4
|
||||
29
src/docs/iir_structure.dox
Normal file
29
src/docs/iir_structure.dox
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
/* libiir/src/docs/iir_structure.dox
|
||||
*
|
||||
* Copyright: ©2010, Laurence Withers.
|
||||
* Author: Laurence Withers <l@lwithers.me.uk>
|
||||
* License: GPLv3
|
||||
*/
|
||||
|
||||
/*! \page iir_structure Structure of IIR filter
|
||||
|
||||
For the purposes of this library, the following notation is used:
|
||||
|
||||
\li <code>x(t)</code>: value of input function at time \a t (\a t = 0, 1, 2, …)
|
||||
\li <code>y(t)</code>: value of output at time \a t
|
||||
\li <code>c[n]</code>: array of \c x(t) coefficients
|
||||
\li <code>d[n]</code>: array of \c y(t) coefficients
|
||||
|
||||
This leads to a general IIR filter equation:
|
||||
|
||||
<code>y(t) = x(t).c[0] + x(t-1).c[1] + … + x(t-N).c[N] - y(t-1).d[0] - y(t-2).d[1] - … - y(t-1-M).d[M]</code>
|
||||
|
||||
For initial conditions, the library sets <code>y(t)</code> for t < 0 to 0,
|
||||
and <code>x(t)</code> for t < 0 to <code>x(0)</code>.
|
||||
|
||||
*/
|
||||
|
||||
/* options for text editors
|
||||
kate: replace-trailing-space-save true; space-indent true; tab-width 4;
|
||||
vim: expandtab:ts=4:sw=4:syntax=doxygen
|
||||
*/
|
||||
59
src/docs/string_desc.dox
Normal file
59
src/docs/string_desc.dox
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
/* libiir/src/docs/string_desc.dox
|
||||
*
|
||||
* Copyright: ©2010, Laurence Withers.
|
||||
* Author: Laurence Withers <l@lwithers.me.uk>
|
||||
* License: GPLv3
|
||||
*/
|
||||
|
||||
/*! \page string_desc Describing IIR filters as strings
|
||||
|
||||
This library allows the user to describe an IIR filter chain as a string, which
|
||||
is useful to allow configurable filtering using e.g. a configuration file. This
|
||||
page describes the format of such strings.
|
||||
|
||||
The string is first split into individual IIR filters. Each filter is written as
|
||||
\c type(params) and separated by whitespace. The string must contain at least
|
||||
one filter but may contain an arbitrary number.
|
||||
|
||||
|
||||
|
||||
\section string_desc_types Description of filter types
|
||||
|
||||
|
||||
|
||||
\subsection string_desc_coeff Raw coefficients
|
||||
|
||||
An IIR filter may be specified as raw coefficients, in which case the \c type
|
||||
is \c raw and the \c params consists of a string:
|
||||
|
||||
<code>c[0],c[1],…,c[n]/d[0],d[1]…d[n]</code>
|
||||
|
||||
The coefficients <code>c[0]…c[i]</code> and <code>d[0]…d[i]</code> are written
|
||||
in standard C floating-point notation. They are separated by commas, except the
|
||||
transition between \c c and \c d coefficients, which is separated by a slash.
|
||||
|
||||
|
||||
|
||||
\subsection string_desc_bwlp Butterworth filters
|
||||
|
||||
For a low-pass filter, type is \c butterworth_lowpass. For a high-pass filter,
|
||||
type is \c butterworth_highpass. Parameters as per
|
||||
\ref iir_butterworth_lowpass(), i.e.:
|
||||
|
||||
<code>order,gain,corner</code>
|
||||
|
||||
For band-pass filters, type is \c butterworth_bandpass. For band-stop filters,
|
||||
type is \c butterworth_bandstop. Parameters as per
|
||||
\ref iir_butterworth_bandpass(), i.e.:
|
||||
|
||||
<code>order,gain,low_corner,high_corner</code>
|
||||
|
||||
Anything greater than 4th order will be split into multiple 4th-order (or less)
|
||||
segments. Note however this will lead to the corner frequencies being off.
|
||||
|
||||
*/
|
||||
|
||||
/* options for text editors
|
||||
kate: replace-trailing-space-save true; space-indent true; tab-width 4;
|
||||
vim: expandtab:ts=4:sw=4:syntax=doxygen
|
||||
*/
|
||||
Loading…
Add table
Add a link
Reference in a new issue