\hypertarget{a00839_source}{}\doxysection{AAX\+\_\+\+Fast\+Interpolated\+Table\+Lookup.\+h}
\label{a00839_source}\index{AAX\_FastInterpolatedTableLookup.h@{AAX\_FastInterpolatedTableLookup.h}}
\mbox{\hyperlink{a00839}{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\ Avid\ Technology,\ Inc.}}
\DoxyCodeLine{00004\ \textcolor{comment}{\ *\ \ All\ rights\ reserved.}}
\DoxyCodeLine{00005\ \textcolor{comment}{\ *\ \ }}
\DoxyCodeLine{00006\ \textcolor{comment}{\ *\ \ CONFIDENTIAL:\ this\ document\ contains\ confidential\ information\ of\ Avid.\ Do}}
\DoxyCodeLine{00007\ \textcolor{comment}{\ *\ \ not\ disclose\ to\ any\ third\ party.\ Use\ of\ the\ information\ contained\ in\ this}}
\DoxyCodeLine{00008\ \textcolor{comment}{\ *\ \ document\ is\ subject\ to\ an\ Avid\ SDK\ license.}}
\DoxyCodeLine{00009\ \textcolor{comment}{\ */}}
\DoxyCodeLine{00010\ }
\DoxyCodeLine{00018\ \textcolor{comment}{/*================================================================================================*/}}
\DoxyCodeLine{00019\ \textcolor{preprocessor}{\#pragma\ once}}
\DoxyCodeLine{00020\ }
\DoxyCodeLine{00021\ \textcolor{preprocessor}{\#ifndef\ AAX\_FASTINTERPOLATEDTABLELOOKUP\_H}}
\DoxyCodeLine{00022\ \textcolor{preprocessor}{\#define\ AAX\_FASTINTERPOLATEDTABLELOOKUP\_H}}
\DoxyCodeLine{00023\ }
\DoxyCodeLine{00024\ \textcolor{preprocessor}{\#include\ "{}\mbox{\hyperlink{a00854}{AAX\_Quantize.h}}"{}}}
\DoxyCodeLine{00025\ }
\DoxyCodeLine{00026\ \textcolor{comment}{//==============================================================================}}
\DoxyCodeLine{00027\ \textcolor{comment}{//}}
\DoxyCodeLine{00028\ \textcolor{comment}{//\ \ NOTE:}}
\DoxyCodeLine{00029\ \textcolor{comment}{//\ \ Construtors\ and\ destructors\ are\ not\ call\ because\ state\ and\ coefficientrs\ blocks\ }}
\DoxyCodeLine{00030\ \textcolor{comment}{//\ \ are\ not\ allocated\ as\ classes}}
\DoxyCodeLine{00031\ \textcolor{comment}{//}}
\DoxyCodeLine{00032\ }
\DoxyCodeLine{00033\ \textcolor{preprocessor}{\#include\ AAX\_ALIGN\_FILE\_BEGIN}}
\DoxyCodeLine{00034\ \textcolor{preprocessor}{\#include\ AAX\_ALIGN\_FILE\_ALG}}
\DoxyCodeLine{00035\ \textcolor{preprocessor}{\#include\ AAX\_ALIGN\_FILE\_END}}
\DoxyCodeLine{00036\ }
\DoxyCodeLine{00037\ \textcolor{keyword}{template}<\textcolor{keyword}{class}\ TFLOAT,\ \textcolor{keyword}{class}\ DFLOAT>}
\DoxyCodeLine{00038\ \textcolor{keyword}{class\ }\mbox{\hyperlink{a02441}{AAX\_FastInterpolatedTableLookup}}}
\DoxyCodeLine{00039\ \{}
\DoxyCodeLine{00040\ \textcolor{keyword}{public}:}
\DoxyCodeLine{00041\ \ \ \ \ }
\DoxyCodeLine{00056\ \ \ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{a02441_a74f25a087c55a337d8cdff14c73df7cb}{SetParameters}}(\textcolor{keywordtype}{int}\ iTableSize,\ TFLOAT\ iMin=0.0,\ TFLOAT\ iMax=1.0,\ \textcolor{keywordtype}{int}\ iNumTables=1)}
\DoxyCodeLine{00057\ \ \ \ \ \{}
\DoxyCodeLine{00058\ \ \ \ \ \ \ \ \ mTableSizeM1=(TFLOAT)(iTableSize-\/1);}
\DoxyCodeLine{00059\ \ \ \ \ \ \ \ \ mTableSize=(TFLOAT)iTableSize;}
\DoxyCodeLine{00060\ \ \ \ \ \ \ \ \ mIntTableSizeM1=iTableSize-\/1;}
\DoxyCodeLine{00061\ \ \ \ \ \ \ \ \ mMin=iMin;}
\DoxyCodeLine{00062\ \ \ \ \ \ \ \ \ mMax=iMax;}
\DoxyCodeLine{00063\ \ \ \ \ \ \ \ \ mMaxMinusMin=iMax-\/iMin;}
\DoxyCodeLine{00064\ \ \ \ \ \ \ \ \ mTableSizeM1DivMaxMinusMin=TFLOAT(iTableSize-\/1)/(iMax-\/iMin);\ \textcolor{comment}{//Two\ divides??}}
\DoxyCodeLine{00065\ \ \ \ \ \ \ \ \ mTableSizeDivMaxMinusMin=TFLOAT(iTableSize)/(iMax-\/iMin);}
\DoxyCodeLine{00066\ \ \ \ \ \ \ \ \ mNumTables=iNumTables;}
\DoxyCodeLine{00067\ \ \ \ \ \}}
\DoxyCodeLine{00068\ \ \ \ \ }
\DoxyCodeLine{00082\ \ \ \ \ DFLOAT\ \ \mbox{\hyperlink{a02441_aaad992e09c837d96ad715092fbefd91d}{DoTableLookupExtraFast}}(\textcolor{keyword}{const}\ TFLOAT*\ \textcolor{keyword}{const}\ iTable,\ DFLOAT\ iValue)\ \textcolor{keyword}{const};}
\DoxyCodeLine{00083\ \ \ \ \ \textcolor{keywordtype}{void}\ \ \ \ \mbox{\hyperlink{a02441_a60e89d13066ca0606c8f71cf5313f0e3}{DoTableLookupExtraFastMulti}}(\textcolor{keyword}{const}\ TFLOAT*\ iTable,\ DFLOAT\ iValue,\ DFLOAT*\ oValues)\ \textcolor{keyword}{const};}
\DoxyCodeLine{00084\ }
\DoxyCodeLine{00085\ \ \ \ \ \textcolor{keywordtype}{void}\ \ \ \ \mbox{\hyperlink{a02441_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{00086\ }
\DoxyCodeLine{00087\ \ \ \ \ TFLOAT\ \mbox{\hyperlink{a02441_aabf15d98a86ea76bccbb0eab444bfab5}{GetMin}}()\ \ \ \ \ \ \ \ \ \{\ \textcolor{keywordflow}{return}\ mMin;\ \};}
\DoxyCodeLine{00088\ \ \ \ \ TFLOAT\ \mbox{\hyperlink{a02441_a7824f358e11c2ee1637f631230a8d967}{GetMaxMinusMin}}()\ \{\ \textcolor{keywordflow}{return}\ mMaxMinusMin;\ \};}
\DoxyCodeLine{00089\ }
\DoxyCodeLine{00090\ \textcolor{keyword}{private}:}
\DoxyCodeLine{00091\ }
\DoxyCodeLine{00092\ \ \ \ \ TFLOAT\ \ mTableSizeM1;}
\DoxyCodeLine{00093\ \ \ \ \ \textcolor{keywordtype}{int}\ \ \ \ \ mIntTableSizeM1;}
\DoxyCodeLine{00094\ \ \ \ \ TFLOAT\ \ mTableSizeM1DivMaxMinusMin;}
\DoxyCodeLine{00095\ \ \ \ \ TFLOAT\ \ mMin;}
\DoxyCodeLine{00096\ \ \ \ \ TFLOAT\ \ mMax;}
\DoxyCodeLine{00097\ \ \ \ \ TFLOAT\ \ mMaxMinusMin;}
\DoxyCodeLine{00098\ \ \ \ \ TFLOAT\ \ mTableSize;}
\DoxyCodeLine{00099\ \ \ \ \ TFLOAT\ \ mTableSizeDivMaxMinusMin;}
\DoxyCodeLine{00100\ \ \ \ \ \textcolor{keywordtype}{int}\ \ \ \ \ mNumTables;\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//This\ is\ used\ for\ multi-\/element\ lookups}}
\DoxyCodeLine{00101\ \};}
\DoxyCodeLine{00102\ }
\DoxyCodeLine{00103\ \textcolor{preprocessor}{\#include\ AAX\_ALIGN\_FILE\_BEGIN}}
\DoxyCodeLine{00104\ \textcolor{preprocessor}{\#include\ AAX\_ALIGN\_FILE\_RESET}}
\DoxyCodeLine{00105\ \textcolor{preprocessor}{\#include\ AAX\_ALIGN\_FILE\_END}}
\DoxyCodeLine{00106\ }
\DoxyCodeLine{00107\ \textcolor{comment}{//\ Template\ implementation}}
\DoxyCodeLine{00108\ \textcolor{preprocessor}{\#include\ "{}\mbox{\hyperlink{a00836}{AAX\_FastInterpolatedTableLookup.hpp}}"{}}}
\DoxyCodeLine{00109\ }
\DoxyCodeLine{00110\ \textcolor{preprocessor}{\#endif\ }\textcolor{comment}{//\ AAX\_FASTINTERPOLATEDTABLELOOKUP\_H}}

\end{DoxyCode}
