\hypertarget{a00851_source}{}\doxysection{AAX\+\_\+\+Fast\+Interpolated\+Table\+Lookup.\+h}
\label{a00851_source}\index{AAX\_FastInterpolatedTableLookup.h@{AAX\_FastInterpolatedTableLookup.h}}
\mbox{\hyperlink{a00851}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{00001\ \textcolor{comment}{/*================================================================================================*/}}
\DoxyCodeLine{00002\ \textcolor{comment}{/*}}
\DoxyCodeLine{00003\ \textcolor{comment}{\ *\ \ Copyright\ 2013-\/2015,\ 2019,\ 2023-\/2024\ Avid\ Technology,\ Inc.}}
\DoxyCodeLine{00004\ \textcolor{comment}{\ *\ \ All\ rights\ reserved.}}
\DoxyCodeLine{00005\ \textcolor{comment}{\ *\ \ }}
\DoxyCodeLine{00006\ \textcolor{comment}{\ *\ \ This\ file\ is\ part\ of\ the\ Avid\ AAX\ SDK.}}
\DoxyCodeLine{00007\ \textcolor{comment}{\ *\ \ }}
\DoxyCodeLine{00008\ \textcolor{comment}{\ *\ \ The\ AAX\ SDK\ is\ subject\ to\ commercial\ or\ open-\/source\ licensing.}}
\DoxyCodeLine{00009\ \textcolor{comment}{\ *\ \ }}
\DoxyCodeLine{00010\ \textcolor{comment}{\ *\ \ By\ using\ the\ AAX\ SDK,\ you\ agree\ to\ the\ terms\ of\ both\ the\ Avid\ AAX\ SDK\ License}}
\DoxyCodeLine{00011\ \textcolor{comment}{\ *\ \ Agreement\ and\ Avid\ Privacy\ Policy.}}
\DoxyCodeLine{00012\ \textcolor{comment}{\ *\ \ }}
\DoxyCodeLine{00013\ \textcolor{comment}{\ *\ \ AAX\ SDK\ License:\ https://developer.avid.com/aax}}
\DoxyCodeLine{00014\ \textcolor{comment}{\ *\ \ Privacy\ Policy:\ https://www.avid.com/legal/privacy-\/policy-\/statement}}
\DoxyCodeLine{00015\ \textcolor{comment}{\ *\ \ }}
\DoxyCodeLine{00016\ \textcolor{comment}{\ *\ \ Or:\ You\ may\ also\ use\ this\ code\ under\ the\ terms\ of\ the\ GPL\ v3\ (see}}
\DoxyCodeLine{00017\ \textcolor{comment}{\ *\ \ www.gnu.org/licenses).}}
\DoxyCodeLine{00018\ \textcolor{comment}{\ *\ \ }}
\DoxyCodeLine{00019\ \textcolor{comment}{\ *\ \ THE\ AAX\ SDK\ IS\ PROVIDED\ "{}AS\ IS"{}\ WITHOUT\ ANY\ WARRANTY,\ AND\ ALL\ WARRANTIES,\ WHETHER}}
\DoxyCodeLine{00020\ \textcolor{comment}{\ *\ \ EXPRESSED\ OR\ IMPLIED,\ INCLUDING\ MERCHANTABILITY\ AND\ FITNESS\ FOR\ PURPOSE,\ ARE}}
\DoxyCodeLine{00021\ \textcolor{comment}{\ *\ \ DISCLAIMED.}}
\DoxyCodeLine{00022\ \textcolor{comment}{\ */}}
\DoxyCodeLine{00023\ }
\DoxyCodeLine{00031\ \textcolor{comment}{/*================================================================================================*/}}
\DoxyCodeLine{00032\ \textcolor{preprocessor}{\#pragma\ once}}
\DoxyCodeLine{00033\ }
\DoxyCodeLine{00034\ \textcolor{preprocessor}{\#ifndef\ AAX\_FASTINTERPOLATEDTABLELOOKUP\_H}}
\DoxyCodeLine{00035\ \textcolor{preprocessor}{\#define\ AAX\_FASTINTERPOLATEDTABLELOOKUP\_H}}
\DoxyCodeLine{00036\ }
\DoxyCodeLine{00037\ \textcolor{preprocessor}{\#include\ "{}\mbox{\hyperlink{a00866}{AAX\_Quantize.h}}"{}}}
\DoxyCodeLine{00038\ }
\DoxyCodeLine{00039\ \textcolor{comment}{//==============================================================================}}
\DoxyCodeLine{00040\ \textcolor{comment}{//}}
\DoxyCodeLine{00041\ \textcolor{comment}{//\ \ NOTE:}}
\DoxyCodeLine{00042\ \textcolor{comment}{//\ \ Construtors\ and\ destructors\ are\ not\ call\ because\ state\ and\ coefficientrs\ blocks\ }}
\DoxyCodeLine{00043\ \textcolor{comment}{//\ \ are\ not\ allocated\ as\ classes}}
\DoxyCodeLine{00044\ \textcolor{comment}{//}}
\DoxyCodeLine{00045\ }
\DoxyCodeLine{00046\ \textcolor{preprocessor}{\#include\ AAX\_ALIGN\_FILE\_BEGIN}}
\DoxyCodeLine{00047\ \textcolor{preprocessor}{\#include\ AAX\_ALIGN\_FILE\_ALG}}
\DoxyCodeLine{00048\ \textcolor{preprocessor}{\#include\ AAX\_ALIGN\_FILE\_END}}
\DoxyCodeLine{00049\ }
\DoxyCodeLine{00050\ \textcolor{keyword}{template}<\textcolor{keyword}{class}\ TFLOAT,\ \textcolor{keyword}{class}\ DFLOAT>}
\DoxyCodeLine{00051\ \textcolor{keyword}{class\ }\mbox{\hyperlink{a02470}{AAX\_FastInterpolatedTableLookup}}}
\DoxyCodeLine{00052\ \{}
\DoxyCodeLine{00053\ \textcolor{keyword}{public}:}
\DoxyCodeLine{00054\ \ \ \ \ }
\DoxyCodeLine{00069\ \ \ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{a02470_a74f25a087c55a337d8cdff14c73df7cb}{SetParameters}}(\textcolor{keywordtype}{int}\ iTableSize,\ TFLOAT\ iMin=0.0,\ TFLOAT\ iMax=1.0,\ \textcolor{keywordtype}{int}\ iNumTables=1)}
\DoxyCodeLine{00070\ \ \ \ \ \{}
\DoxyCodeLine{00071\ \ \ \ \ \ \ \ \ mTableSizeM1=(TFLOAT)(iTableSize-\/1);}
\DoxyCodeLine{00072\ \ \ \ \ \ \ \ \ mTableSize=(TFLOAT)iTableSize;}
\DoxyCodeLine{00073\ \ \ \ \ \ \ \ \ mIntTableSizeM1=iTableSize-\/1;}
\DoxyCodeLine{00074\ \ \ \ \ \ \ \ \ mMin=iMin;}
\DoxyCodeLine{00075\ \ \ \ \ \ \ \ \ mMax=iMax;}
\DoxyCodeLine{00076\ \ \ \ \ \ \ \ \ mMaxMinusMin=iMax-\/iMin;}
\DoxyCodeLine{00077\ \ \ \ \ \ \ \ \ mTableSizeM1DivMaxMinusMin=TFLOAT(iTableSize-\/1)/(iMax-\/iMin);\ \textcolor{comment}{//Two\ divides??}}
\DoxyCodeLine{00078\ \ \ \ \ \ \ \ \ mTableSizeDivMaxMinusMin=TFLOAT(iTableSize)/(iMax-\/iMin);}
\DoxyCodeLine{00079\ \ \ \ \ \ \ \ \ mNumTables=iNumTables;}
\DoxyCodeLine{00080\ \ \ \ \ \}}
\DoxyCodeLine{00081\ \ \ \ \ }
\DoxyCodeLine{00095\ \ \ \ \ DFLOAT\ \ \mbox{\hyperlink{a02470_aaad992e09c837d96ad715092fbefd91d}{DoTableLookupExtraFast}}(\textcolor{keyword}{const}\ TFLOAT*\ \textcolor{keyword}{const}\ iTable,\ DFLOAT\ iValue)\ \textcolor{keyword}{const};}
\DoxyCodeLine{00096\ \ \ \ \ \textcolor{keywordtype}{void}\ \ \ \ \mbox{\hyperlink{a02470_a60e89d13066ca0606c8f71cf5313f0e3}{DoTableLookupExtraFastMulti}}(\textcolor{keyword}{const}\ TFLOAT*\ iTable,\ DFLOAT\ iValue,\ DFLOAT*\ oValues)\ \textcolor{keyword}{const};}
\DoxyCodeLine{00097\ }
\DoxyCodeLine{00098\ \ \ \ \ \textcolor{keywordtype}{void}\ \ \ \ \mbox{\hyperlink{a02470_aaad992e09c837d96ad715092fbefd91d}{DoTableLookupExtraFast}}(\textcolor{keyword}{const}\ TFLOAT*\ \textcolor{keyword}{const}\ iTable,\ \textcolor{keyword}{const}\ TFLOAT*\ \textcolor{keyword}{const}\ inpBuf,\ DFLOAT*\ \textcolor{keyword}{const}\ outBuf,\ \textcolor{keywordtype}{int}\ blockSize);}
\DoxyCodeLine{00099\ }
\DoxyCodeLine{00100\ \ \ \ \ TFLOAT\ \mbox{\hyperlink{a02470_aabf15d98a86ea76bccbb0eab444bfab5}{GetMin}}()\ \ \ \ \ \ \ \ \ \{\ \textcolor{keywordflow}{return}\ mMin;\ \};}
\DoxyCodeLine{00101\ \ \ \ \ TFLOAT\ \mbox{\hyperlink{a02470_a7824f358e11c2ee1637f631230a8d967}{GetMaxMinusMin}}()\ \{\ \textcolor{keywordflow}{return}\ mMaxMinusMin;\ \};}
\DoxyCodeLine{00102\ }
\DoxyCodeLine{00103\ \textcolor{keyword}{private}:}
\DoxyCodeLine{00104\ }
\DoxyCodeLine{00105\ \ \ \ \ TFLOAT\ \ mTableSizeM1;}
\DoxyCodeLine{00106\ \ \ \ \ \textcolor{keywordtype}{int}\ \ \ \ \ mIntTableSizeM1;}
\DoxyCodeLine{00107\ \ \ \ \ TFLOAT\ \ mTableSizeM1DivMaxMinusMin;}
\DoxyCodeLine{00108\ \ \ \ \ TFLOAT\ \ mMin;}
\DoxyCodeLine{00109\ \ \ \ \ TFLOAT\ \ mMax;}
\DoxyCodeLine{00110\ \ \ \ \ TFLOAT\ \ mMaxMinusMin;}
\DoxyCodeLine{00111\ \ \ \ \ TFLOAT\ \ mTableSize;}
\DoxyCodeLine{00112\ \ \ \ \ TFLOAT\ \ mTableSizeDivMaxMinusMin;}
\DoxyCodeLine{00113\ \ \ \ \ \textcolor{keywordtype}{int}\ \ \ \ \ mNumTables;\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//This\ is\ used\ for\ multi-\/element\ lookups}}
\DoxyCodeLine{00114\ \};}
\DoxyCodeLine{00115\ }
\DoxyCodeLine{00116\ \textcolor{preprocessor}{\#include\ AAX\_ALIGN\_FILE\_BEGIN}}
\DoxyCodeLine{00117\ \textcolor{preprocessor}{\#include\ AAX\_ALIGN\_FILE\_RESET}}
\DoxyCodeLine{00118\ \textcolor{preprocessor}{\#include\ AAX\_ALIGN\_FILE\_END}}
\DoxyCodeLine{00119\ }
\DoxyCodeLine{00120\ \textcolor{comment}{//\ Template\ implementation}}
\DoxyCodeLine{00121\ \textcolor{preprocessor}{\#include\ "{}\mbox{\hyperlink{a00848}{AAX\_FastInterpolatedTableLookup.hpp}}"{}}}
\DoxyCodeLine{00122\ }
\DoxyCodeLine{00123\ \textcolor{preprocessor}{\#endif\ }\textcolor{comment}{//\ AAX\_FASTINTERPOLATEDTABLELOOKUP\_H}}

\end{DoxyCode}
