1
0

polyphase.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /***************************************************************************\
  2. *
  3. * MPEG Layer3-Audio Decoder
  4. * © 1997-2006 by Fraunhofer IIS
  5. * All Rights Reserved
  6. *
  7. * filename: polyphase.h
  8. * project : ISO/MPEG-Decoder
  9. * author : Stefan Gewinner
  10. * date : 1998-05-26
  11. * contents/description: polyphase class - HEADER
  12. *
  13. *
  14. \***************************************************************************/
  15. /*
  16. * $Date: 2011/02/14 14:48:56 $
  17. * $Id: polyphase.h,v 1.6 2011/02/14 14:48:56 bigg Exp $
  18. */
  19. #pragma once
  20. //#ifndef __POLYPHASE_H__
  21. //#define __POLYPHASE_H__
  22. /* ------------------------ includes --------------------------------------*/
  23. #include "mpeg.h"
  24. #include "foundation/align.h"
  25. /*-------------------------------------------------------------------------*/
  26. #define HAN_SIZE 512
  27. /*-------------------------------------------------------------------------*/
  28. // Class for (inverse) Polyphase calculation.
  29. class CPolyphase
  30. {
  31. public:
  32. CPolyphase(const MPEG_INFO &_info);
  33. ~CPolyphase() {}
  34. void Init();
  35. float *Apply(POLYSPECTRUM &sample, float *pPcm, int frms=18);
  36. static void Reorder(int channels, POLYSPECTRUM &output, const SPECTRUM &input);
  37. protected:
  38. int bufOffset;
  39. NALIGN(16) float syn_buf[2][HAN_SIZE];
  40. const MPEG_INFO &info ; // info-structure
  41. void window_band_m(int bufOffset, float *out_samples) const;
  42. void window_band_s(int bufOffset, float *out_samples) const;
  43. };
  44. /*-------------------------------------------------------------------------*/
  45. //#endif