home *** CD-ROM | disk | FTP | other *** search
/ Computer Shopper 275 / DPCS0111DVD.ISO / Toolkit / Audio-Visual / VirtualDub / Source / VirtualDub-1.9.10-src.7z / src / h / vd2 / Priss / convert.h next >
Encoding:
C/C++ Source or Header  |  2009-09-14  |  2.6 KB  |  65 lines

  1. //    VirtualDub - Video processing and capture application
  2. //    Audio processing library
  3. //    Copyright (C) 1998-2004 Avery Lee
  4. //
  5. //    This program is free software; you can redistribute it and/or modify
  6. //    it under the terms of the GNU General Public License as published by
  7. //    the Free Software Foundation; either version 2 of the License, or
  8. //    (at your option) any later version.
  9. //
  10. //    This program is distributed in the hope that it will be useful,
  11. //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13. //    GNU General Public License for more details.
  14. //
  15. //    You should have received a copy of the GNU General Public License
  16. //    along with this program; if not, write to the Free Software
  17. //    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  18.  
  19. #ifndef f_VD2_PRISS_CONVERT_H
  20. #define f_VD2_PRISS_CONVERT_H
  21.  
  22. #include <vd2/system/vdtypes.h>
  23.  
  24. /////// PCM conversion
  25.  
  26. typedef void (VDAPIENTRY *tpVDConvertPCM)(void *dst, const void *src, uint32 samples);
  27.  
  28. void VDConvertPCM32FToPCM8    (void *dst0, const void *src0, uint32 samples);
  29. void VDConvertPCM32FToPCM16    (void *dst0, const void *src0, uint32 samples);
  30. void VDConvertPCM16ToPCM8    (void *dst0, const void *src0, uint32 samples);
  31. void VDConvertPCM16ToPCM32F    (void *dst0, const void *src0, uint32 samples);
  32. void VDConvertPCM8ToPCM16    (void *dst0, const void *src0, uint32 samples);
  33. void VDConvertPCM8ToPCM32F    (void *dst0, const void *src0, uint32 samples);
  34.  
  35. void VDConvertPCM16ToPCM8_MMX    (void *dst0, const void *src0, uint32 samples);
  36. void VDConvertPCM8ToPCM16_MMX    (void *dst0, const void *src0, uint32 samples);
  37.  
  38. void VDConvertPCM32FToPCM8_SSE    (void *dst0, const void *src0, uint32 samples);
  39. void VDConvertPCM32FToPCM16_SSE    (void *dst0, const void *src0, uint32 samples);
  40. void VDConvertPCM16ToPCM32F_SSE    (void *dst0, const void *src0, uint32 samples);
  41. void VDConvertPCM8ToPCM32F_SSE    (void *dst0, const void *src0, uint32 samples);
  42.  
  43. typedef const tpVDConvertPCM (*tpVDConvertPCMVtbl)[3];
  44.  
  45. enum VDAudioSampleType {
  46.     kVDAudioSampleType8U,
  47.     kVDAudioSampleType16S,
  48.     kVDAudioSampleType32F,
  49.     kVDAudioSampleTypeCount
  50. };
  51.  
  52. tpVDConvertPCMVtbl VDGetPCMConversionVtable();
  53.  
  54. /////// FIR filtering
  55.  
  56. struct VDAudioFilterVtable {
  57.     sint16 (VDAPIENTRY *FilterPCM16)(const sint16 *src, const sint16 *filter, uint32 filterquadsize);
  58.     void (VDAPIENTRY *FilterPCM16End)();
  59.     void (VDAPIENTRY *FilterPCM16SymmetricArray)(sint16 *dst, ptrdiff_t dst_stride, const sint16 *src_center, uint32 count, const sint16 *filter, uint32 filterquadsizeminus1);
  60. };
  61.  
  62. const VDAudioFilterVtable *VDGetAudioFilterVtable(uint32 taps = 0);
  63.  
  64. #endif
  65.