diff options
author | Jean-Francois Mauguit <jfmauguit@mac.com> | 2024-09-24 09:03:25 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-24 09:03:25 -0400 |
commit | bab614c421ed7ae329d26bf028c4a3b1d2450f5a (patch) | |
tree | 12f17f78986871dd2cfb0a56e5e93b545c1ae0d0 /Src/replicant/nsmp3dec/polyphase.h | |
parent | 4bde6044fddf053f31795b9eaccdd2a5a527d21f (diff) | |
parent | 20d28e80a5c861a9d5f449ea911ab75b4f37ad0d (diff) | |
download | winamp-bab614c421ed7ae329d26bf028c4a3b1d2450f5a.tar.gz |
Merge pull request #5 from WinampDesktop/community
Merge to main
Diffstat (limited to 'Src/replicant/nsmp3dec/polyphase.h')
-rw-r--r-- | Src/replicant/nsmp3dec/polyphase.h | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/Src/replicant/nsmp3dec/polyphase.h b/Src/replicant/nsmp3dec/polyphase.h new file mode 100644 index 00000000..0d221274 --- /dev/null +++ b/Src/replicant/nsmp3dec/polyphase.h @@ -0,0 +1,61 @@ +/***************************************************************************\ + * +* MPEG Layer3-Audio Decoder +* © 1997-2006 by Fraunhofer IIS + * All Rights Reserved + * + * filename: polyphase.h + * project : ISO/MPEG-Decoder + * author : Stefan Gewinner + * date : 1998-05-26 + * contents/description: polyphase class - HEADER + * + * +\***************************************************************************/ + +/* + * $Date: 2011/02/14 14:48:56 $ + * $Id: polyphase.h,v 1.6 2011/02/14 14:48:56 bigg Exp $ + */ + +#pragma once +//#ifndef __POLYPHASE_H__ +//#define __POLYPHASE_H__ + +/* ------------------------ includes --------------------------------------*/ + +#include "mpeg.h" +#include "foundation/align.h" +/*-------------------------------------------------------------------------*/ + +#define HAN_SIZE 512 + +/*-------------------------------------------------------------------------*/ + +// Class for (inverse) Polyphase calculation. + +class CPolyphase +{ + +public: + + CPolyphase(const MPEG_INFO &_info); + + ~CPolyphase() {} + + void Init(); + float *Apply(POLYSPECTRUM &sample, float *pPcm, int frms=18); + static void Reorder(int channels, POLYSPECTRUM &output, const SPECTRUM &input); +protected: + + int bufOffset; + NALIGN(16) float syn_buf[2][HAN_SIZE]; + + const MPEG_INFO &info ; // info-structure + + void window_band_m(int bufOffset, float *out_samples) const; + void window_band_s(int bufOffset, float *out_samples) const; +}; + +/*-------------------------------------------------------------------------*/ +//#endif |