mp2decode.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #ifndef __MP2DECODE_H__
  2. #define __MP2DECODE_H__
  3. /* ------------------------ includes --------------------------------------*/
  4. #include "mpeg.h"
  5. #include "mpegbitstream.h"
  6. #include "polyphase.h"
  7. /*-------------------------------------------------------------------------*/
  8. //
  9. // MPEG Layer-2 decoding class.
  10. //
  11. // This is the main MPEG Layer-2 decoder object.
  12. //
  13. class CMp2Decode
  14. {
  15. public:
  16. CMp2Decode(CMpegBitStream &_Bs, DecoderHooks *_hooks=0);
  17. ~CMp2Decode();
  18. void Init(bool fFullReset = true);
  19. SSC Decode(void *pPcm, size_t cbPcm, size_t *pcbUsed);
  20. private:
  21. SSC Decode2(void *pPcm);
  22. SSC Decode1(void *pPcm);
  23. void ZeroPolySpectrum();
  24. void SetInfo();
  25. CPolyphase m_Polyphase; // polyphase
  26. MPEG_INFO m_Info; // info structure
  27. CMpegBitStream &m_Bs; // bitstream
  28. POLYSPECTRUM m_PolySpectrum; // spectrum (post-mdct)
  29. char m_tab_3[32 * 3];
  30. char m_tab_5[128 * 3];
  31. char m_tab_9[1024 * 3];
  32. float m_scales[27][64];
  33. DecoderHooks *hooks;
  34. };
  35. /*-------------------------------------------------------------------------*/
  36. #endif