"L. Spiro Engine"

F:/My Projects/LSEngine/Modules/LSSoundLib/Src/Ogg/LSSVorbisMdct.h

00001 /********************************************************************
00002  *                                                                  *
00003  * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE.   *
00004  * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
00005  * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
00006  * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
00007  *                                                                  *
00008  * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009             *
00009  * by the Xiph.Org Foundation http://www.xiph.org/                  *
00010  *                                                                  *
00011  ********************************************************************
00012 
00013  function: modified discrete cosine transform prototypes
00014  last mod: $Id: mdct.h 16227 2009-07-08 06:58:46Z xiphmont $
00015 
00016  ********************************************************************/
00017 
00018 
00019 #ifndef __LSS_VORBISMDCT_H__
00020 #define __LSS_VORBISMDCT_H__
00021 
00022 #include "../LSSSoundLib.h"
00023 #include "LSSVorbisConstants.h"
00024 
00025 namespace lss {
00026 
00033         class CVorbisMdct {
00034         public :
00035                 // == Types.
00039                 typedef struct mdct_lookup {
00040                         LSINT32                                         n;
00041                         LSINT32                                         log2n;
00042 
00043                         DATA_TYPE *                                     trig;
00044                         LSINT32 *                                       bitrev;
00045 
00046                         DATA_TYPE                                       scale;
00047                 } * LPmdct_lookup, * const LPCmdct_lookup;
00048 
00049 
00050                 // == Functions.
00057                 static LSVOID                                   mdct_init( mdct_lookup * _plLookUp, LSINT32 _i32N );
00058 
00064                 static LSVOID                                   mdct_clear( mdct_lookup * _plLookUp );
00065 
00073                 static LSVOID                                   mdct_forward( mdct_lookup * _plInit, DATA_TYPE * _pdtIn, DATA_TYPE * _pdtOut );
00074 
00082                 static LSVOID                                   mdct_backward( mdct_lookup * _plInit, DATA_TYPE * _pdtIn, DATA_TYPE * _pdtOut );
00083 
00084 
00085         protected :
00086                 // == Functions.
00094                 static LSVOID                                   mdct_butterflies( mdct_lookup * _plInit,
00095                         DATA_TYPE * _pdtX,
00096                         LSINT32 _i32Points );
00097 
00104                 static LSVOID                                   mdct_bitreverse( mdct_lookup * _plInit,
00105                         DATA_TYPE * _pdtX );
00106 
00114                 static LSVOID                                   mdct_butterfly_first( DATA_TYPE * _pdtT,
00115                         DATA_TYPE * _pdtX,
00116                         LSINT32 _i32Points );
00117 
00126                 static LSVOID                                   mdct_butterfly_generic( DATA_TYPE * _pdtT,
00127                         DATA_TYPE *_pdtX,
00128                         LSINT32 _i32Points,
00129                         LSINT32 _i32TrigInt );
00130 
00136                 static LSVOID                                   mdct_butterfly_32( DATA_TYPE * _pdtX );
00137 
00143                 static LSVOID                                   mdct_butterfly_16( DATA_TYPE * _pdtX );
00144 
00150                 static LSVOID                                   mdct_butterfly_8( DATA_TYPE * _pdtX );
00151         };
00152 
00153 }       // namespace lss
00154 
00155 #endif  // __LSS_VORBISMDCT_H__
00156 
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator