Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

70 lines
1.7 KiB

  1. #ifndef NABTSPRV_H
  2. #define NABTSPRV_H
  3. #include "nabtsapi.h"
  4. /* Nabts private */
  5. //#define INTERPOLATE_ARRAY(a,f) ((a)[float2long(f)]+((f)-float2long(f))*((a)[float2long(f)+1]))
  6. inline Double _InterpDoubleArr(Double dArray[], Double dIndex)
  7. {
  8. unsigned long nIndex = float2long(dIndex);
  9. return (dArray[nIndex] + (dIndex-nIndex)*(dArray[nIndex+1]-dArray[nIndex]));
  10. }
  11. inline Double _InterpUCharArr(unsigned char cArray[], Double dIndex)
  12. {
  13. unsigned long nIndex = float2long(dIndex);
  14. return (cArray[nIndex] + (dIndex-nIndex)*(cArray[nIndex+1]-cArray[nIndex]));
  15. }
  16. #ifdef DEBUG
  17. #define EASSERT(exp) ((exp) || \
  18. (debug_printf(("\n%s(%d): EASSERT(%s) failed\n", \
  19. __FILE__, __LINE__, #exp)), \
  20. abort_execution(), \
  21. 0))
  22. #else //DEBUG
  23. #define EASSERT(exp) 0
  24. #endif //DEBUG
  25. #define SASSERT(exp) (void)(EASSERT(exp))
  26. /*
  27. extern Double* g_pdGCRSignal1;
  28. extern Double* g_pdGCRSignal2;
  29. */
  30. extern int g_nNabtsAdditionalTapsGCR;
  31. /* Equalization constants */
  32. #define GCR_SIZE 567
  33. #define GCR_SAMPLE_RATE 2
  34. #define NABSYNC_SIZE 115
  35. #define NABSYNC_SAMPLE_RATE 1
  36. #define GCR_START_DETECT 0
  37. #define GCR_END_DETECT 50
  38. #define NABSYNC_START_DETECT 15
  39. #define NABSYNC_END_DETECT 80
  40. /**************************/
  41. /* lower numbers must be better */
  42. typedef enum {fec_errs_0, fec_errs_1, fec_errs_multiple} fec_error_class;
  43. fec_error_class check_fec(unsigned char data[28]);
  44. typedef struct equalize_match_str {
  45. int nSignalSize;
  46. int nSignalSampleRate;
  47. int nSignalStartConv;
  48. int nSignalEndConv;
  49. Double *pdSignal;
  50. } EqualizeMatch;
  51. #endif