\doxysection{fe\+\_\+warp\+\_\+affine.\+h}
\label{fe__warp__affine_8h_source}\index{src/libsphinxbase/fe/fe\_warp\_affine.h@{src/libsphinxbase/fe/fe\_warp\_affine.h}}

\begin{DoxyCode}{0}
\DoxyCodeLine{00001\ \textcolor{comment}{/*\ ====================================================================}}
\DoxyCodeLine{00002\ \textcolor{comment}{\ *\ Copyright\ (c)\ 2006\ Carnegie\ Mellon\ University.\ \ All\ rights\ }}
\DoxyCodeLine{00003\ \textcolor{comment}{\ *\ reserved.}}
\DoxyCodeLine{00004\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00005\ \textcolor{comment}{\ *\ Redistribution\ and\ use\ in\ source\ and\ binary\ forms,\ with\ or\ without}}
\DoxyCodeLine{00006\ \textcolor{comment}{\ *\ modification,\ are\ permitted\ provided\ that\ the\ following\ conditions}}
\DoxyCodeLine{00007\ \textcolor{comment}{\ *\ are\ met:}}
\DoxyCodeLine{00008\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00009\ \textcolor{comment}{\ *\ 1.\ Redistributions\ of\ source\ code\ must\ retain\ the\ above\ copyright}}
\DoxyCodeLine{00010\ \textcolor{comment}{\ *\ \ \ \ notice,\ this\ list\ of\ conditions\ and\ the\ following\ disclaimer.\ }}
\DoxyCodeLine{00011\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00012\ \textcolor{comment}{\ *\ 2.\ Redistributions\ in\ binary\ form\ must\ reproduce\ the\ above\ copyright}}
\DoxyCodeLine{00013\ \textcolor{comment}{\ *\ \ \ \ notice,\ this\ list\ of\ conditions\ and\ the\ following\ disclaimer\ in}}
\DoxyCodeLine{00014\ \textcolor{comment}{\ *\ \ \ \ the\ documentation\ and/or\ other\ materials\ provided\ with\ the}}
\DoxyCodeLine{00015\ \textcolor{comment}{\ *\ \ \ \ distribution.}}
\DoxyCodeLine{00016\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00017\ \textcolor{comment}{\ *\ This\ work\ was\ supported\ in\ part\ by\ funding\ from\ the\ Defense\ Advanced\ }}
\DoxyCodeLine{00018\ \textcolor{comment}{\ *\ Research\ Projects\ Agency\ and\ the\ National\ Science\ Foundation\ of\ the\ }}
\DoxyCodeLine{00019\ \textcolor{comment}{\ *\ United\ States\ of\ America,\ and\ the\ CMU\ Sphinx\ Speech\ Consortium.}}
\DoxyCodeLine{00020\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00021\ \textcolor{comment}{\ *\ THIS\ SOFTWARE\ IS\ PROVIDED\ BY\ CARNEGIE\ MELLON\ UNIVERSITY\ \`{}\`{}AS\ IS''\ AND\ }}
\DoxyCodeLine{00022\ \textcolor{comment}{\ *\ ANY\ EXPRESSED\ OR\ IMPLIED\ WARRANTIES,\ INCLUDING,\ BUT\ NOT\ LIMITED\ TO,\ }}
\DoxyCodeLine{00023\ \textcolor{comment}{\ *\ THE\ IMPLIED\ WARRANTIES\ OF\ MERCHANTABILITY\ AND\ FITNESS\ FOR\ A\ PARTICULAR}}
\DoxyCodeLine{00024\ \textcolor{comment}{\ *\ PURPOSE\ ARE\ DISCLAIMED.\ \ IN\ NO\ EVENT\ SHALL\ CARNEGIE\ MELLON\ UNIVERSITY}}
\DoxyCodeLine{00025\ \textcolor{comment}{\ *\ NOR\ ITS\ EMPLOYEES\ BE\ LIABLE\ FOR\ ANY\ DIRECT,\ INDIRECT,\ INCIDENTAL,}}
\DoxyCodeLine{00026\ \textcolor{comment}{\ *\ SPECIAL,\ EXEMPLARY,\ OR\ CONSEQUENTIAL\ DAMAGES\ (INCLUDING,\ BUT\ NOT\ }}
\DoxyCodeLine{00027\ \textcolor{comment}{\ *\ LIMITED\ TO,\ PROCUREMENT\ OF\ SUBSTITUTE\ GOODS\ OR\ SERVICES;\ LOSS\ OF\ USE,\ }}
\DoxyCodeLine{00028\ \textcolor{comment}{\ *\ DATA,\ OR\ PROFITS;\ OR\ BUSINESS\ INTERRUPTION)\ HOWEVER\ CAUSED\ AND\ ON\ ANY\ }}
\DoxyCodeLine{00029\ \textcolor{comment}{\ *\ THEORY\ OF\ LIABILITY,\ WHETHER\ IN\ CONTRACT,\ STRICT\ LIABILITY,\ OR\ TORT\ }}
\DoxyCodeLine{00030\ \textcolor{comment}{\ *\ (INCLUDING\ NEGLIGENCE\ OR\ OTHERWISE)\ ARISING\ IN\ ANY\ WAY\ OUT\ OF\ THE\ USE\ }}
\DoxyCodeLine{00031\ \textcolor{comment}{\ *\ OF\ THIS\ SOFTWARE,\ EVEN\ IF\ ADVISED\ OF\ THE\ POSSIBILITY\ OF\ SUCH\ DAMAGE.}}
\DoxyCodeLine{00032\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00033\ \textcolor{comment}{\ *\ ====================================================================}}
\DoxyCodeLine{00034\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00035\ \textcolor{comment}{\ */}}
\DoxyCodeLine{00036\ }
\DoxyCodeLine{00037\ \textcolor{preprocessor}{\#ifndef\ FE\_WARP\_AFFINE\_H}}
\DoxyCodeLine{00038\ \textcolor{preprocessor}{\#define\ FE\_WARP\_AFFINE\_H}}
\DoxyCodeLine{00039\ }
\DoxyCodeLine{00040\ \textcolor{preprocessor}{\#include\ "{}sphinxbase/fe.h"{}}}
\DoxyCodeLine{00041\ }
\DoxyCodeLine{00042\ }
\DoxyCodeLine{00043\ \textcolor{preprocessor}{\#ifdef\ \_\_cplusplus}}
\DoxyCodeLine{00044\ \textcolor{keyword}{extern}\ \textcolor{stringliteral}{"{}C"{}}\ \{}
\DoxyCodeLine{00045\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{00046\ \textcolor{preprocessor}{\#if\ 0}}
\DoxyCodeLine{00047\ \textcolor{comment}{/*\ Fool\ Emacs.\ */}}
\DoxyCodeLine{00048\ \}}
\DoxyCodeLine{00049\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{00050\ }
\DoxyCodeLine{00051\ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *}
\DoxyCodeLine{00052\ fe\_warp\_affine\_doc(\textcolor{keywordtype}{void});}
\DoxyCodeLine{00053\ }
\DoxyCodeLine{00054\ uint32}
\DoxyCodeLine{00055\ fe\_warp\_affine\_id(\textcolor{keywordtype}{void});}
\DoxyCodeLine{00056\ }
\DoxyCodeLine{00057\ uint32}
\DoxyCodeLine{00058\ fe\_warp\_affine\_n\_param(\textcolor{keywordtype}{void});}
\DoxyCodeLine{00059\ }
\DoxyCodeLine{00060\ \textcolor{keywordtype}{void}}
\DoxyCodeLine{00061\ fe\_warp\_affine\_set\_parameters(\textcolor{keywordtype}{char}\ \textcolor{keyword}{const}\ *param\_str,\ \textcolor{keywordtype}{float}\ sampling\_rate);}
\DoxyCodeLine{00062\ }
\DoxyCodeLine{00063\ \textcolor{keywordtype}{float}}
\DoxyCodeLine{00064\ fe\_warp\_affine\_warped\_to\_unwarped(\textcolor{keywordtype}{float}\ nonlinear);}
\DoxyCodeLine{00065\ }
\DoxyCodeLine{00066\ \textcolor{keywordtype}{float}}
\DoxyCodeLine{00067\ fe\_warp\_affine\_unwarped\_to\_warped(\textcolor{keywordtype}{float}\ linear);}
\DoxyCodeLine{00068\ }
\DoxyCodeLine{00069\ \textcolor{keywordtype}{void}}
\DoxyCodeLine{00070\ fe\_warp\_affine\_print(\textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *label);}
\DoxyCodeLine{00071\ }
\DoxyCodeLine{00072\ \textcolor{preprocessor}{\#ifdef\ \_\_cplusplus}}
\DoxyCodeLine{00073\ \}}
\DoxyCodeLine{00074\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{00075\ }
\DoxyCodeLine{00076\ }
\DoxyCodeLine{00077\ \textcolor{preprocessor}{\#endif\ }\textcolor{comment}{/*\ FE\_WARP\_AFFINE\_H\ */}\textcolor{preprocessor}{\ }}
\DoxyCodeLine{00078\ }
\DoxyCodeLine{00079\ }
\DoxyCodeLine{00080\ \textcolor{comment}{/*}}
\DoxyCodeLine{00081\ \textcolor{comment}{\ *\ Log\ record.\ \ Maintained\ by\ RCS.}}
\DoxyCodeLine{00082\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00083\ \textcolor{comment}{\ *\ \$Log:\ fe\_warp\_affine.h,v\ \$}}
\DoxyCodeLine{00084\ \textcolor{comment}{\ *\ Revision\ 1.1\ \ 2006/02/16\ 00:18:26\ \ egouvea}}
\DoxyCodeLine{00085\ \textcolor{comment}{\ *\ Implemented\ flexible\ warping\ function.\ The\ user\ can\ specify\ at\ run}}
\DoxyCodeLine{00086\ \textcolor{comment}{\ *\ time\ which\ of\ several\ shapes\ they\ want\ to\ use.\ Currently\ implemented}}
\DoxyCodeLine{00087\ \textcolor{comment}{\ *\ are\ an\ affine\ function\ (y\ =\ ax\ +\ b),\ an\ inverse\ linear\ (y\ =\ a/x)\ and\ a}}
\DoxyCodeLine{00088\ \textcolor{comment}{\ *\ piecewise\ linear\ (y\ =\ ax,\ up\ to\ a\ frequency\ F,\ and\ then\ it\ "{}breaks"{}\ so}}
\DoxyCodeLine{00089\ \textcolor{comment}{\ *\ Nyquist\ frequency\ matches\ in\ both\ scales.}}
\DoxyCodeLine{00090\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00091\ \textcolor{comment}{\ *\ Added\ two\ switches,\ -\/warp\_type\ and\ -\/warp\_params.\ The\ first\ specifies}}
\DoxyCodeLine{00092\ \textcolor{comment}{\ *\ the\ type,\ which\ valid\ values:}}
\DoxyCodeLine{00093\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00094\ \textcolor{comment}{\ *\ -\/inverse\ or\ inverse\_linear}}
\DoxyCodeLine{00095\ \textcolor{comment}{\ *\ -\/linear\ or\ affine}}
\DoxyCodeLine{00096\ \textcolor{comment}{\ *\ -\/piecewise\ or\ piecewise\_linear}}
\DoxyCodeLine{00097\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00098\ \textcolor{comment}{\ *\ The\ inverse\_linear\ is\ the\ same\ as\ implemented\ by\ EHT.\ The\ -\/mel\_warp}}
\DoxyCodeLine{00099\ \textcolor{comment}{\ *\ switch\ was\ kept\ for\ compatibility\ (maybe\ remove\ it\ in\ the}}
\DoxyCodeLine{00100\ \textcolor{comment}{\ *\ future?).\ The\ code\ is\ compatible\ with\ EHT's\ changes:\ cepstra\ created}}
\DoxyCodeLine{00101\ \textcolor{comment}{\ *\ from\ code\ after\ his\ changes\ should\ be\ the\ same\ as\ now.\ Scripts\ that}}
\DoxyCodeLine{00102\ \textcolor{comment}{\ *\ worked\ with\ his\ changes\ should\ work\ now\ without\ changes.\ Tested\ a\ few}}
\DoxyCodeLine{00103\ \textcolor{comment}{\ *\ cases,\ same\ results.}}
\DoxyCodeLine{00104\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00105\ \textcolor{comment}{\ */}}

\end{DoxyCode}
